NAME

Amazon::MWS::XML::ShippedOrder

DESCRIPTION

Class to validate and generate a shipping confirmation feed. While Amazon::MWS::XML::Order is meant to be used to parse the response, this is meant to produce the XML, generating a structure suitable to satisfy the Amazon XSD.

SYNOPSIS

my $shipped = Amazon::MWS::XML::ShippedOrder->new(....); # see below the accessors
print Dumper($shipped->as_shipping_confirmation_hashref);

CONSTRUCTOR ARGUMENTS/ACCESSORS

amazon_order_id

merchant_order_id

This will be used if amazon_order_id is not provided. This should work as long as the order aknowledgement sent it back, so Amazon is able to pair it with its own id.

merchant_fulfillment_id

Optional and not used by Amazon

fulfillment_date

The date the item was actually shipped or picked up, depending on the fulfillment method specified in the order.

A DateTime object is required. It will default to the current datetime if not provided.

carrier

The "standard" carrier code or the carrier name. The module will try to match it with the Amazon codes.

shipping_method

The shipping method for the carrier. Optional.

shipping_tracking_number

The tracking number. Optional.

items

A arrayref of hashrefs with the codes and quantities of shipped items. The following keys (most of them optional) are expected:

amazon_order_item_code

If not provided will use merchant_order_item_code instead (provided that the orderline id was passed in the aknowledgement).

merchant_order_item_code

Our orderline ID which should have been passed to in the order aknowledgement.

merchant_fulfillment_item_id

Optional.

quantity

The quantity shipped (if more than one of a given item was purchased, and all of them are not shipped together).

METHODS

as_shipping_confirmation_hashref

Return an hashref which can be fed into an Amazon message XSD.