Class: Peddler::APIs::VendorShipmentsV1

Inherits:
Peddler::API show all
Defined in:
lib/peddler/apis/vendor_shipments_v1.rb,
lib/peddler/apis/vendor_shipments_v1/item.rb,
lib/peddler/apis/vendor_shipments_v1/stop.rb,
lib/peddler/apis/vendor_shipments_v1/error.rb,
lib/peddler/apis/vendor_shipments_v1/route.rb,
lib/peddler/apis/vendor_shipments_v1/carton.rb,
lib/peddler/apis/vendor_shipments_v1/expiry.rb,
lib/peddler/apis/vendor_shipments_v1/pallet.rb,
lib/peddler/apis/vendor_shipments_v1/volume.rb,
lib/peddler/apis/vendor_shipments_v1/weight.rb,
lib/peddler/apis/vendor_shipments_v1/address.rb,
lib/peddler/apis/vendor_shipments_v1/duration.rb,
lib/peddler/apis/vendor_shipments_v1/location.rb,
lib/peddler/apis/vendor_shipments_v1/shipment.rb,
lib/peddler/apis/vendor_shipments_v1/containers.rb,
lib/peddler/apis/vendor_shipments_v1/dimensions.rb,
lib/peddler/apis/vendor_shipments_v1/error_list.rb,
lib/peddler/apis/vendor_shipments_v1/label_data.rb,
lib/peddler/apis/vendor_shipments_v1/pagination.rb,
lib/peddler/apis/vendor_shipments_v1/item_details.rb,
lib/peddler/apis/vendor_shipments_v1/packed_items.rb,
lib/peddler/apis/vendor_shipments_v1/total_weight.rb,
lib/peddler/apis/vendor_shipments_v1/item_quantity.rb,
lib/peddler/apis/vendor_shipments_v1/container_item.rb,
lib/peddler/apis/vendor_shipments_v1/import_details.rb,
lib/peddler/apis/vendor_shipments_v1/vendor_details.rb,
lib/peddler/apis/vendor_shipments_v1/carrier_details.rb,
lib/peddler/apis/vendor_shipments_v1/packed_quantity.rb,
lib/peddler/apis/vendor_shipments_v1/purchase_orders.rb,
lib/peddler/apis/vendor_shipments_v1/transport_label.rb,
lib/peddler/apis/vendor_shipments_v1/shipment_details.rb,
lib/peddler/apis/vendor_shipments_v1/submit_shipments.rb,
lib/peddler/apis/vendor_shipments_v1/get_shipment_labels.rb,
lib/peddler/apis/vendor_shipments_v1/package_item_details.rb,
lib/peddler/apis/vendor_shipments_v1/party_identification.rb,
lib/peddler/apis/vendor_shipments_v1/purchase_order_items.rb,
lib/peddler/apis/vendor_shipments_v1/shipment_information.rb,
lib/peddler/apis/vendor_shipments_v1/shipment_confirmation.rb,
lib/peddler/apis/vendor_shipments_v1/shipment_measurements.rb,
lib/peddler/apis/vendor_shipments_v1/transaction_reference.rb,
lib/peddler/apis/vendor_shipments_v1/transportation_labels.rb,
lib/peddler/apis/vendor_shipments_v1/transportation_details.rb,
lib/peddler/apis/vendor_shipments_v1/shipment_status_details.rb,
lib/peddler/apis/vendor_shipments_v1/carton_reference_details.rb,
lib/peddler/apis/vendor_shipments_v1/container_identification.rb,
lib/peddler/apis/vendor_shipments_v1/inner_containers_details.rb,
lib/peddler/apis/vendor_shipments_v1/tax_registration_details.rb,
lib/peddler/apis/vendor_shipments_v1/container_sequence_numbers.rb,
lib/peddler/apis/vendor_shipments_v1/purchase_order_item_details.rb,
lib/peddler/apis/vendor_shipments_v1/get_shipment_details_response.rb,
lib/peddler/apis/vendor_shipments_v1/collect_freight_pickup_details.rb,
lib/peddler/apis/vendor_shipments_v1/transport_shipment_measurements.rb,
lib/peddler/apis/vendor_shipments_v1/submit_shipment_confirmations_request.rb,
lib/peddler/apis/vendor_shipments_v1/submit_shipment_confirmations_response.rb,
lib/peddler/apis/vendor_shipments_v1/transportation_details_for_shipment_confirmation.rb

Overview

Selling Partner API for Retail Procurement Shipments

The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.

Defined Under Namespace

Classes: ErrorList

Constant Summary collapse

Item =

Details of the item being shipped.

Structure.new do
  # @return [String] Item sequence number for the item. The first item will be 001, the second 002, and so on.
  # This number is used as a reference to refer to this item from the carton or pallet level.
  attribute(:item_sequence_number, String, from: "itemSequenceNumber")

  # @return [ItemQuantity] Total item quantity shipped in this shipment.
  attribute(:shipped_quantity, ItemQuantity, from: "shippedQuantity")

  # @return [String] Buyer Standard Identification Number (ASIN) of an item.
  attribute?(:amazon_product_identifier, String, from: "amazonProductIdentifier")

  # @return [ItemDetails]
  attribute?(:item_details, ItemDetails, from: "itemDetails")

  # @return [String] The vendor selected product identification of the item. Should be the same as was sent in the
  # purchase order.
  attribute?(:vendor_product_identifier, String, from: "vendorProductIdentifier")
end
Stop =

Contractual or operational port or point relevant to the movement of the cargo.

Structure.new do
  # @return [String] Provide the function code.
  attribute(:function_code, String, from: "functionCode")

  # @return [Time] Date and time of the arrival of the cargo.
  attribute?(:arrival_time, Time, from: "arrivalTime")

  # @return [Time] Date and time of the departure of the cargo.
  attribute?(:departure_time, Time, from: "departureTime")

  # @return [Location]
  attribute?(:location_identification, Location, from: "locationIdentification")
end
Error =

Error response returned when the request is unsuccessful.

Structure.new do
  # @return [String] An error code that identifies the type of error that occurred.
  attribute(:code, String)

  # @return [String] A message that describes the error condition.
  attribute(:message, String)

  # @return [String] Additional details that can help the caller understand or fix the issue.
  attribute?(:details, String)
end
Route =

This is used only for direct import shipment confirmations.

Structure.new do
  # @return [Array<Stop>] The port or location involved in transporting the cargo, as specified in transportation
  # contracts or operational plans.
  attribute(:stops, [Stop])
end
Carton =

Details of the carton/package being shipped.

Structure.new do
  # @return [String] Carton sequence number for the carton. The first carton will be 001, the second 002, and so
  # on. This number is used as a reference to refer to this carton from the pallet level.
  attribute(:carton_sequence_number, String, from: "cartonSequenceNumber")

  # @return [Array<ContainerItem>] A list of container item details.
  attribute(:items, [ContainerItem])

  # @return [Array<ContainerIdentification>] A list of carton identifiers.
  attribute?(:carton_identifiers, [ContainerIdentification], from: "cartonIdentifiers")

  # @return [Dimensions]
  attribute?(:dimensions, Dimensions)

  # @return [String] This is required to be provided for every carton in the small parcel shipments.
  attribute?(:tracking_number, String, from: "trackingNumber")

  # @return [Weight]
  attribute?(:weight, Weight)
end
Expiry =

Expiry refers to the collection of dates required for certain items. These could be either expiryDate or mfgDate and expiryAfterDuration. These are mandatory for perishable items.

Structure.new do
  # @return [Duration] Duration after manufacturing date during which the product is valid for consumption.
  attribute?(:expiry_after_duration, Duration, from: "expiryAfterDuration")

  # @return [Time] The date that determines the limit of consumption or use of a product. Its meaning is
  # determined based on the trade item context.
  attribute?(:expiry_date, Time, from: "expiryDate")

  # @return [Time] Production, packaging or assembly date determined by the manufacturer. Its meaning is
  # determined based on the trade item context.
  attribute?(:manufacturer_date, Time, from: "manufacturerDate")
end
Pallet =

Details of the Pallet/Tare being shipped.

Structure.new do
  # @return [Array<ContainerIdentification>] A list of pallet identifiers.
  attribute(:pallet_identifiers, [ContainerIdentification], from: "palletIdentifiers")

  # @return [Integer] Number of cartons per layer on the pallet. Only applicable to container type Pallet.
  attribute?(:block, Integer)

  # @return [CartonReferenceDetails] Carton reference details.
  attribute?(:carton_reference_details, CartonReferenceDetails, from: "cartonReferenceDetails")

  # @return [Dimensions]
  attribute?(:dimensions, Dimensions)

  # @return [Array<ContainerItem>] A list of container item details.
  attribute?(:items, [ContainerItem])

  # @return [Integer] Number of layers per pallet. Only applicable to container type Pallet.
  attribute?(:tier, Integer)

  # @return [Weight]
  attribute?(:weight, Weight)
end
Volume =

The volume of the shipment.

Structure.new do
  # @return [String] The unit of measurement.
  attribute(:unit_of_measure, String, from: "unitOfMeasure")

  # @return [String] The measurement value.
  attribute(:value, String)
end
Weight =

The weight of the shipment.

Structure.new do
  # @return [String] The unit of measurement.
  attribute(:unit_of_measure, String, from: "unitOfMeasure")

  # @return [String] The measurement value.
  attribute(:value, String)
end
Address =

Address of the party.

Structure.new do
  # @return [String] First line of the address.
  attribute(:address_line1, String, from: "addressLine1")

  # @return [String] The two digit country code in ISO 3166-1 alpha-2 format.
  attribute(:country_code, String, from: "countryCode")

  # @return [String] The name of the person, business or institution at that address.
  attribute(:name, String)

  # @return [String] Additional street address information, if required.
  attribute?(:address_line2, String, from: "addressLine2")

  # @return [String] Additional street address information, if required.
  attribute?(:address_line3, String, from: "addressLine3")

  # @return [String] The city where the person, business or institution is located.
  attribute?(:city, String)

  # @return [String] The county where person, business or institution is located.
  attribute?(:county, String)

  # @return [String] The district where person, business or institution is located.
  attribute?(:district, String)

  # @return [String] The phone number of the person, business or institution located at that address.
  attribute?(:phone, String)

  # @return [String] The postal code of that address. It contains a series of letters or digits or both, sometimes
  # including spaces or punctuation.
  attribute?(:postal_code, String, from: "postalCode")

  # @return [String] The state or region where person, business or institution is located.
  attribute?(:state_or_region, String, from: "stateOrRegion")
end
Duration =

Duration after manufacturing date during which the product is valid for consumption.

Structure.new do
  # @return [String] Unit for duration.
  attribute(:duration_unit, String, from: "durationUnit")

  # @return [Integer] Value for the duration in terms of the durationUnit.
  attribute(:duration_value, Integer, from: "durationValue")
end
Location =

Location identifier.

Structure.new do
  # @return [String] The two digit country code. In ISO 3166-1 alpha-2 format.
  attribute?(:country_code, String, from: "countryCode")

  # @return [String] Location code.
  attribute?(:location_code, String, from: "locationCode")

  # @return [String] Type of location identification.
  attribute?(:type, String)
end
Shipment =

A list of one or more shipments with respective details.

Structure.new do
  # @return [PartyIdentification] Name/Address and tax details of the selling party.
  attribute(:selling_party, PartyIdentification, from: "sellingParty")

  # @return [PartyIdentification] Name/Address and tax details of the ship from party.
  attribute(:ship_from_party, PartyIdentification, from: "shipFromParty")

  # @return [PartyIdentification] Name/Address of the destination warehouse where the shipment is being shipped
  # to.
  attribute(:ship_to_party, PartyIdentification, from: "shipToParty")

  # @return [Time] Date on which the transportation request was submitted.
  attribute(:transaction_date, Time, from: "transactionDate")

  # @return [String] Indicates the type of transportation request (for example, `New` or `Cancel`). Each
  # `transactionType` has a unique set of operations and there are corresponding details to be populated for each
  # operation.
  attribute(:transaction_type, String, from: "transactionType")

  # @return [String] Unique Transportation ID created by Vendor (Should not be used over the last 365 days).
  attribute(:vendor_shipment_identifier, String, from: "vendorShipmentIdentifier")

  # @return [String] The buyer Reference Number is a unique identifier generated by buyer for all Collect/WePay
  # shipments when you submit a transportation request. This field is mandatory for Collect/WePay shipments.
  attribute?(:buyer_reference_number, String, from: "buyerReferenceNumber")

  # @return [CollectFreightPickupDetails] Indicates the earliest pickup date for the transportation from vendor
  # warehouse. This information is mandatory to be filled for requesting transportation from Buyer
  # (WePay/Collect).
  attribute?(:collect_freight_pickup_details, CollectFreightPickupDetails, from: "collectFreightPickupDetails")

  # @return [Array<Containers>] A list of the items in this transportation and their associated inner container
  # details. If any of the item detail fields are common at a carton or a pallet level, provide them at the
  # corresponding carton or pallet level.
  attribute?(:containers, [Containers])

  # @return [String] Indicates the current shipment status.
  attribute?(:current_shipment_status, String, from: "currentShipmentStatus")

  # @return [Time] Date and time when the last status was updated.
  attribute?(:currentshipment_status_date, Time, from: "currentshipmentStatusDate")

  # @return [ImportDetails] Provide these fields only if this shipment is a direct import.
  attribute?(:import_details, ImportDetails, from: "importDetails")

  # @return [Time] The date and time of the package label created for the shipment by buyer.
  attribute?(:package_label_create_date, Time, from: "packageLabelCreateDate")

  # @return [Array<PurchaseOrders>] Indicates the purchase orders involved for the transportation request. This
  # group is an array create 1 for each PO and list their corresponding items. This information is used for
  # deciding the route,truck allocation and storage efficiently. This is a mandatory information for Buyer
  # performing transportation from vendor warehouse (WePay/Collect)
  attribute?(:purchase_orders, [PurchaseOrders], from: "purchaseOrders")

  # @return [Time] The date and time of the departure of the shipment from the vendor's location. Vendors are
  # requested to send ASNs within 30 minutes of departure from their warehouse/distribution center or at least 6
  # hours prior to the appointment time at the Buyer destination warehouse, whichever is sooner. Shipped date
  # mentioned in the shipment confirmation should not be in the future.
  attribute?(:shipment_confirm_date, Time, from: "shipmentConfirmDate")

  # @return [Time] The date and time of the shipment request created by vendor.
  attribute?(:shipment_create_date, Time, from: "shipmentCreateDate")

  # @return [String] Specifies if payment is Collect (WePay) or Prepaid (TheyPay). Required.
  attribute?(:shipment_freight_term, String, from: "shipmentFreightTerm")

  # @return [TransportShipmentMeasurements] Indicates the shipment measurement details on how many cartons and
  # pallets and the total transportation weight and volume as part of this request. This is a mandatory detail
  # which will help determining the transportation cost, truck allocations and route determination efficiently.
  attribute?(:shipment_measurements, TransportShipmentMeasurements, from: "shipmentMeasurements")

  # @return [Array<ShipmentStatusDetails>] Indicates the list of current shipment status details and when the last
  # update was received from carrier this is available on shipment Details response.
  attribute?(:shipment_status_details, [ShipmentStatusDetails], from: "shipmentStatusDetails")

  # @return [TransportationDetails] Transportation details this a mandatory information which states delivery
  # date, shipping date and carrier details.
  attribute?(:transportation_details, TransportationDetails, from: "transportationDetails")
end
Containers =

A list of the items in this transportation and their associated inner container details. If any of the item detail fields are common at a carton or a pallet level, provide them at the corresponding carton or pallet level.

Structure.new do
  # @return [Array<ContainerIdentification>] A list of carton identifiers.
  attribute(:container_identifiers, [ContainerIdentification], from: "containerIdentifiers")

  # @return [String] The type of container.
  attribute(:container_type, String, from: "containerType")

  # @return [Integer] Number of cartons per layer on the pallet.
  attribute?(:block, Integer)

  # @return [String] An integer that must be submitted for multi-box shipments only, where one item may come in
  # separate packages.
  attribute?(:container_sequence_number, String, from: "containerSequenceNumber")

  # @return [Dimensions]
  attribute?(:dimensions, Dimensions)

  # @return [InnerContainersDetails]
  attribute?(:inner_containers_details, InnerContainersDetails, from: "innerContainersDetails")

  # @return [Array<PackedItems>] A list of packed items.
  attribute?(:packed_items, [PackedItems], from: "packedItems")

  # @return [Integer] Number of layers per pallet.
  attribute?(:tier, Integer)

  # @return [String] The tracking number used for identifying the shipment.
  attribute?(:tracking_number, String, from: "trackingNumber")

  # @return [Weight]
  attribute?(:weight, Weight)
end
Dimensions =

Physical dimensional measurements of a container.

Structure.new do
  # @return [String] The height of the container.
  attribute(:height, String)

  # @return [String] The length of the container.
  attribute(:length, String)

  # @return [String] The unit of measure for dimensions.
  attribute(:unit_of_measure, String, from: "unitOfMeasure")

  # @return [String] The width of the container.
  attribute(:width, String)
end
LabelData =

Label details as part of the transport label response

Structure.new do
  # @return [String] Unique identification of the carrier.
  attribute?(:carrier_code, String, from: "carrierCode")

  # @return [String] The base-64 encoded string that represents the shipment label.
  attribute?(:label, String)

  # @return [String] The format of the label.
  attribute?(:label_format, String, from: "labelFormat")

  # @return [Integer] A sequential number assigned to each label within a shipment.
  attribute?(:label_sequence_number, Integer, from: "labelSequenceNumber")

  # @return [String] Tracking Id for the transportation.
  attribute?(:tracking_id, String, from: "trackingId")
end
Pagination =

The pagination elements required to retrieve the remaining data.

Structure.new do
  # @return [String] A generated string used to pass information to your next request. If NextToken is returned,
  # pass the value of NextToken to the next request. If NextToken is not returned, there are no more shipment
  # items to return.
  attribute?(:next_token, String, from: "nextToken")
end
ItemDetails =

Item details for be provided for every item in shipment at either the item or carton or pallet level, whichever is appropriate.

Structure.new do
  # @return [Expiry] Expiry refers to the collection of dates required for certain items. These could be either
  # expiryDate or mfgDate and expiryAfterDuration. These are mandatory for perishable items.
  attribute?(:expiry, Expiry)

  # @return [String] Identification of the instructions on how specified item/carton/pallet should be handled.
  attribute?(:handling_code, String, from: "handlingCode")

  # @return [String] The batch or lot number associates an item with information the manufacturer considers
  # relevant for traceability of the trade item to which the Element String is applied. The data may refer to the
  # trade item itself or to items contained. This field is mandatory for all perishable items.
  attribute?(:lot_number, String, from: "lotNumber")

  # @return [Money] Maximum retail price of the item being shipped.
  attribute?(:maximum_retail_price, Money, from: "maximumRetailPrice")

  # @return [String] The purchase order number for the shipment being confirmed. If the items in this shipment
  # belong to multiple purchase order numbers that are in particular carton or pallet within the shipment, then
  # provide the purchaseOrderNumber at the appropriate carton or pallet level. Formatting Notes: 8-character
  # alpha-numeric code.
  attribute?(:purchase_order_number, String, from: "purchaseOrderNumber")
end
PackedItems =

Details of the item being shipped.

Structure.new do
  # @return [String] Buyer Standard Identification Number (ASIN) of an item.
  attribute?(:buyer_product_identifier, String, from: "buyerProductIdentifier")

  # @return [PackageItemDetails]
  attribute?(:item_details, PackageItemDetails, from: "itemDetails")

  # @return [String] Item sequence number for the item. The first item will be 001, the second 002, and so on.
  # This number is used as a reference to refer to this item from the carton or pallet level.
  attribute?(:item_sequence_number, String, from: "itemSequenceNumber")

  # @return [ItemQuantity] Total item quantity shipped in this shipment.
  attribute?(:packed_quantity, ItemQuantity, from: "packedQuantity")

  # @return [String] The vendor selected product identification of the item. Should be the same as was sent in the
  # purchase order.
  attribute?(:vendor_product_identifier, String, from: "vendorProductIdentifier")
end
TotalWeight =

The total weight of units that are sold by weight in a shipment.

Structure.new do
  # @return [String]
  attribute(:amount, String)

  # @return [String] The unit of measure for the weight of items that are ordered by cases and support pricing by
  # weight.
  attribute(:unit_of_measure, String, from: "unitOfMeasure")
end
ItemQuantity =

Details of item quantity.

Structure.new do
  # @return [Integer] Amount of units shipped for a specific item at a shipment level. If the item is present only
  # in certain cartons or pallets within the shipment, please provide this at the appropriate carton or pallet
  # level.
  attribute(:amount, Integer)

  # @return [String] Unit of measure for the shipped quantity.
  attribute(:unit_of_measure, String, from: "unitOfMeasure")

  # @return [TotalWeight]
  attribute?(:total_weight, TotalWeight, from: "totalWeight")

  # @return [Integer] The case size, in the event that we ordered using cases. Otherwise, 1.
  attribute?(:unit_size, Integer, from: "unitSize")
end
ContainerItem =

Carton/Pallet level details for the item.

Structure.new do
  # @return [String] The reference number for the item. Please provide the itemSequenceNumber from the 'items'
  # segment to refer to that item's details here.
  attribute(:item_reference, String, from: "itemReference")

  # @return [ItemQuantity] Total item quantity shipped in this carton/pallet.
  attribute(:shipped_quantity, ItemQuantity, from: "shippedQuantity")

  # @return [ItemDetails]
  attribute?(:item_details, ItemDetails, from: "itemDetails")
end
ImportDetails =

Provide these fields only if this shipment is a direct import.

Structure.new do
  # @return [Weight] Billable weight of the direct imports shipment.
  attribute?(:billable_weight, Weight, from: "billableWeight")

  # @return [Time] Date on which the shipment is expected to be shipped. This value should not be in the past and
  # not more than 60 days out in the future.
  attribute?(:estimated_ship_by_date, Time, from: "estimatedShipByDate")

  # @return [String] Identification of the instructions on how specified item/carton/pallet should be handled.
  attribute?(:handling_instructions, String, from: "handlingInstructions")

  # @return [String] Types and numbers of container(s) for import purchase orders. Can be a comma-separated list
  # if shipment has multiple containers.
  attribute?(:import_containers, String, from: "importContainers")

  # @return [String] This is used for import purchase orders only. If the recipient requests, this field will
  # contain the shipment method of payment.
  attribute?(:method_of_payment, String, from: "methodOfPayment")

  # @return [Route] The route and stop details for this shipment.
  attribute?(:route, Route)

  # @return [String] The container's seal number.
  attribute?(:seal_number, String, from: "sealNumber")
end
VendorDetails =

Vendor Details as part of Label response.

Structure.new do
  # @return [PartyIdentification] Name/Address and tax details of the selling party.
  attribute?(:selling_party, PartyIdentification, from: "sellingParty")

  # @return [String] Unique vendor shipment id which is not used in last 365 days
  attribute?(:vendor_shipment_identifier, String, from: "vendorShipmentIdentifier")
end
CarrierDetails =

Indicates the carrier details and their contact informations

Structure.new do
  # @return [String] Code that identifies the carrier for the shipment. The Standard Carrier Alpha Code (SCAC) is
  # a unique two to four letter code used to identify a carrier. Carrier SCAC codes are assigned and maintained by
  # the NMFTA (National Motor Freight Association).
  attribute?(:code, String)

  # @return [String] The field is used to represent the carrier Email id.
  attribute?(:email, String)

  # @return [String] The field is used to represent the carrier used for performing the shipment.
  attribute?(:name, String)

  # @return [String] The field is used to represent the Carrier contact number.
  attribute?(:phone, String)

  # @return [String] The field is also known as PRO number is a unique number assigned by the carrier. It is used
  # to identify and track the shipment that goes out for delivery. This field is mandatory for US, CA, MX shipment
  # confirmations.
  attribute?(:shipment_reference_number, String, from: "shipmentReferenceNumber")
end
PackedQuantity =

Details of item quantity.

Structure.new do
  # @return [Integer] Amount of units shipped for a specific item at a shipment level. If the item is present only
  # in certain cartons or pallets within the shipment, please provide this at the appropriate carton or pallet
  # level.
  attribute(:amount, Integer)

  # @return [String] Unit of measure for the shipped quantity.
  attribute(:unit_of_measure, String, from: "unitOfMeasure")

  # @return [Integer] The case size, in the event that we ordered using cases. Otherwise, 1.
  attribute?(:unit_size, Integer, from: "unitSize")
end
PurchaseOrders =

Transport Request pickup date

Structure.new do
  # @return [Array<PurchaseOrderItems>] A list of the items that are associated to the PO in this transport and
  # their associated details.
  attribute?(:items, [PurchaseOrderItems])

  # @return [Time] Purchase order numbers involved in this shipment, list all the PO that are involved as part of
  # this shipment.
  attribute?(:purchase_order_date, Time, from: "purchaseOrderDate")

  # @return [String] Purchase order numbers involved in this shipment, list all the PO that are involved as part
  # of this shipment.
  attribute?(:purchase_order_number, String, from: "purchaseOrderNumber")

  # @return [String] Date range in which shipment is expected for these purchase orders.
  attribute?(:ship_window, String, from: "shipWindow")
end
TransportLabel =

A list of one or more ShipmentLabels.

Structure.new do
  # @return [Time] Date on which label is created.
  attribute?(:label_create_date_time, Time, from: "labelCreateDateTime")

  # @return [Array<LabelData>] Indicates the label data,format and type associated .
  attribute?(:label_data, [LabelData], from: "labelData")

  # @return [ShipmentInformation] Indicates the shipment Information details like warehouse and business reference
  # details like ARN, Selling Party detail and Vendor Warehouse details
  attribute?(:shipment_information, ShipmentInformation, from: "shipmentInformation")
end
ShipmentDetails =

The request schema for the GetShipmentDetails operation.

Structure.new do
  # @return [Pagination]
  attribute?(:pagination, Pagination)

  # @return [Array<Shipment>] A list of one or more shipments with underlying details.
  attribute?(:shipments, [Shipment])
end
SubmitShipments =

The request schema for the SubmitShipments operation.

Structure.new do
  # @return [Array<Shipment>] A list of one or more shipments with underlying details.
  attribute?(:shipments, [Shipment])
end
GetShipmentLabels =

The response schema for the GetShipmentLabels operation.

Structure.new do
  # @return [Array<Error>]
  attribute?(:errors, [Error])

  # @return [TransportationLabels]
  attribute?(:payload, TransportationLabels)
end
PackageItemDetails =

Item details for be provided for every item in shipment at either the item or carton or pallet level, whichever is appropriate.

Structure.new do
  # @return [Expiry] Either expiryDate or mfgDate and expiryAfterDuration are mandatory for perishable items.
  attribute?(:expiry, Expiry)

  # @return [String] The batch or lot number associates an item with information the manufacturer considers
  # relevant for traceability of the trade item to which the Element String is applied. The data may refer to the
  # trade item itself or to items contained. This field is mandatory for all perishable items.
  attribute?(:lot_number, String, from: "lotNumber")

  # @return [String] The purchase order number for the shipment being confirmed. If the items in this shipment
  # belong to multiple purchase order numbers that are in particular carton or pallet within the shipment, then
  # provide the purchaseOrderNumber at the appropriate carton or pallet level. Formatting Notes: 8-character
  # alpha-numeric code.
  attribute?(:purchase_order_number, String, from: "purchaseOrderNumber")
end
PartyIdentification =

Name/Address and tax details of the party.

Structure.new do
  # @return [String] Assigned identification for the party.
  attribute(:party_id, String, from: "partyId")

  # @return [Address] Identification of the party by address.
  attribute?(:address, Address)

  # @return [Array<TaxRegistrationDetails>] Tax registration details of the entity.
  attribute?(:tax_registration_details, [TaxRegistrationDetails], from: "taxRegistrationDetails")
end
PurchaseOrderItems =

Details of the item being shipped.

Structure.new do
  # @return [String] Item sequence number for the item. The first item will be 001, the second 002, and so on.
  # This number is used as a reference to refer to this item from the carton or pallet level.
  attribute(:item_sequence_number, String, from: "itemSequenceNumber")

  # @return [ItemQuantity] Total item quantity shipped in this shipment.
  attribute(:shipped_quantity, ItemQuantity, from: "shippedQuantity")

  # @return [String] Amazon Standard Identification Number (ASIN) for a SKU
  attribute?(:buyer_product_identifier, String, from: "buyerProductIdentifier")

  # @return [Money]
  attribute?(:maximum_retail_price, Money, from: "maximumRetailPrice")

  # @return [String] The vendor selected product identification of the item. Should be the same as was sent in the
  # purchase order.
  attribute?(:vendor_product_identifier, String, from: "vendorProductIdentifier")
end
ShipmentInformation =

Shipment Information details for Label request.

Structure.new do
  # @return [String] The buyer reference number is a unique identifier generated by the buyer for all Collect and
  # WePay shipments.
  attribute?(:buyer_reference_number, String, from: "buyerReferenceNumber")

  # @return [String] Unique Id with which the shipment can be tracked for Small Parcels.
  attribute?(:master_tracking_id, String, from: "masterTrackingId")

  # @return [PartyIdentification] Name/Address of the destination warehouse where the shipment is being shipped
  # to.
  attribute?(:ship_from_party, PartyIdentification, from: "shipFromParty")

  # @return [String] Type of shipment whether it is Small Parcel
  attribute?(:ship_mode, String, from: "shipMode")

  # @return [PartyIdentification] The name and address of the destination warehouse where the shipment is being
  # shipped.
  attribute?(:ship_to_party, PartyIdentification, from: "shipToParty")

  # @return [Integer] Number of Labels that are created as part of this shipment.
  attribute?(:total_label_count, Integer, from: "totalLabelCount")

  # @return [VendorDetails] Vendor Details requesting for Shipment Label
  attribute?(:vendor_details, VendorDetails, from: "vendorDetails")

  # @return [String] Vendor Warehouse ID from where the shipment is scheduled to be picked up by buyer / Carrier.
  attribute?(:warehouse_id, String, from: "warehouseId")
end
ShipmentConfirmation =

A list of one or more shipment confirmations.

Structure.new do
  # @return [PartyIdentification] Name/Address and tax details of the selling party.
  attribute(:selling_party, PartyIdentification, from: "sellingParty")

  # @return [PartyIdentification] Name/Address and tax details of the ship from party.
  attribute(:ship_from_party, PartyIdentification, from: "shipFromParty")

  # @return [PartyIdentification] Name/Address of the destination warehouse where the shipment is being shipped
  # to.
  attribute(:ship_to_party, PartyIdentification, from: "shipToParty")

  # @return [Time] Date on which the shipment confirmation was submitted.
  attribute(:shipment_confirmation_date, Time, from: "shipmentConfirmationDate")

  # @return [String] Indicates if this shipment confirmation is the initial confirmation, or intended to replace
  # an already posted shipment confirmation. If replacing an existing shipment confirmation, be sure to provide
  # the identical shipmentIdentifier and sellingParty information as in the previous confirmation.
  attribute(:shipment_confirmation_type, String, from: "shipmentConfirmationType")

  # @return [String] Unique shipment ID (not used over the last 365 days).
  attribute(:shipment_identifier, String, from: "shipmentIdentifier")

  # @return [Array<Item>] A list of the items in this shipment and their associated details. If any of the item
  # detail fields are common at a carton or a pallet level, provide them at the corresponding carton or pallet
  # level.
  attribute(:shipped_items, [Item], from: "shippedItems")

  # @return [String] The Amazon Reference Number is a unique identifier generated by Amazon for all Collect/WePay
  # shipments when you submit a routing request. This field is mandatory for Collect/WePay shipments.
  attribute?(:amazon_reference_number, String, from: "amazonReferenceNumber")

  # @return [Array<Carton>] A list of the cartons in this shipment.
  attribute?(:cartons, [Carton])

  # @return [Time] The date and time on which the shipment is estimated to reach buyer's warehouse. It needs to be
  # an estimate based on the average transit time between ship from location and the destination. The exact
  # appointment time will be provided by the buyer and is potentially not known when creating the shipment
  # confirmation.
  attribute?(:estimated_delivery_date, Time, from: "estimatedDeliveryDate")

  # @return [ImportDetails] Provide these fields only if this shipment is a direct import.
  attribute?(:import_details, ImportDetails, from: "importDetails")

  # @return [Array<Pallet>] A list of the pallets in this shipment.
  attribute?(:pallets, [Pallet])

  # @return [ShipmentMeasurements]
  attribute?(:shipment_measurements, ShipmentMeasurements, from: "shipmentMeasurements")

  # @return [String] Shipment hierarchical structure.
  attribute?(:shipment_structure, String, from: "shipmentStructure")

  # @return [String] The type of shipment.
  attribute?(:shipment_type, String, from: "shipmentType")

  # @return [Time] The date and time of the departure of the shipment from the vendor's location. Vendors are
  # requested to send ASNs within 30 minutes of departure from their warehouse/distribution center or at least 6
  # hours prior to the appointment time at the buyer destination warehouse, whichever is sooner. Shipped date
  # mentioned in the shipment confirmation should not be in the future.
  attribute?(:shipped_date, Time, from: "shippedDate")

  # @return [TransportationDetailsForShipmentConfirmation] Transportation details for this shipment.
  attribute?(:transportation_details, TransportationDetailsForShipmentConfirmation, from: "transportationDetails")
end
ShipmentMeasurements =

Shipment measurement details.

Structure.new do
  # @return [Integer] Number of cartons present in the shipment. Provide the cartonCount only for non-palletized
  # shipments.
  attribute?(:carton_count, Integer, from: "cartonCount")

  # @return [Weight] Gross weight of the shipment.
  attribute?(:gross_shipment_weight, Weight, from: "grossShipmentWeight")

  # @return [Integer] Number of pallets present in the shipment. Provide the palletCount only for palletized
  # shipments.
  attribute?(:pallet_count, Integer, from: "palletCount")

  # @return [Volume] Gross Volume of the shipment.
  attribute?(:shipment_volume, Volume, from: "shipmentVolume")
end
TransactionReference =

The response payload for the SubmitShipmentConfirmations operation.

Structure.new do
  # @return [String] GUID assigned by Buyer to identify this transaction. This value can be used with the
  # Transaction Status API to return the status of this transaction.
  attribute?(:transaction_id, String, from: "transactionId")
end
TransportationLabels =

The request schema for the GetShipmentLabels operation.

Structure.new do
  # @return [Pagination]
  attribute?(:pagination, Pagination)

  # @return [Array<TransportLabel>] A list of one or more ShipmentLabels.
  attribute?(:transport_labels, [TransportLabel], from: "transportLabels")
end
TransportationDetails =

Transportation details for this shipment.

Structure.new do
  # @return [String] The Bill of Lading (BOL) number is a unique number assigned to each shipment of goods by the
  # vendor or shipper during the creation of the Bill of Lading. This number must be unique for every shipment and
  # cannot be a date/time or single character. The BOL numer is mandatory in Shipment Confirmation message for FTL
  # and LTL shipments, and must match the paper BOL provided with the shipment. Instead of BOL, an alternative
  # reference number (like Delivery Note Number) for the shipment can also be sent in this field.
  attribute?(:bill_of_lading_number, String, from: "billOfLadingNumber")

  # @return [CarrierDetails] Indicates the carrier details and their contact informations
  attribute?(:carrier_details, CarrierDetails, from: "carrierDetails")

  # @return [Time] Estimated Date on which shipment will be delivered from Vendor to Buyer
  attribute?(:estimated_delivery_date, Time, from: "estimatedDeliveryDate")

  # @return [String] The type of shipment.
  attribute?(:ship_mode, String, from: "shipMode")

  # @return [Time] Date on which shipment will be delivered from Vendor to Buyer
  attribute?(:shipment_delivery_date, Time, from: "shipmentDeliveryDate")

  # @return [Time] Date when shipment is performed by the Vendor to Buyer
  attribute?(:shipped_date, Time, from: "shippedDate")

  # @return [String] The mode of transportation for this shipment.
  attribute?(:transportation_mode, String, from: "transportationMode")
end
ShipmentStatusDetails =

Shipment Status details.

Structure.new do
  # @return [String] Current status of the shipment on whether it is picked up or scheduled.
  attribute?(:shipment_status, String, from: "shipmentStatus")

  # @return [Time] Date and time on last status update received for the shipment
  attribute?(:shipment_status_date, Time, from: "shipmentStatusDate")
end
CartonReferenceDetails =

Carton reference details.

Structure.new do
  # @return [Array<String>] Array of reference numbers for the carton that are part of this pallet/shipment.
  # Please provide the cartonSequenceNumber from the 'cartons' segment to refer to that carton's details here.
  attribute(:carton_reference_numbers, [String], from: "cartonReferenceNumbers")

  # @return [Integer] Pallet level carton count is mandatory for single item pallet and optional for mixed item
  # pallet.
  attribute?(:carton_count, Integer, from: "cartonCount")
end
ContainerIdentification =

A list of carton identifiers.

Structure.new do
  # @return [String] Container identification number that adheres to the definition of the container
  # identification type.
  attribute(:container_identification_number, String, from: "containerIdentificationNumber")

  # @return [String] The container identification type.
  attribute(:container_identification_type, String, from: "containerIdentificationType")
end
InnerContainersDetails =

Details of the innerContainersDetails.

Structure.new do
  # @return [Integer] Total containers as part of the shipment
  attribute?(:container_count, Integer, from: "containerCount")

  # @return [Array<ContainerSequenceNumbers>] Container sequence numbers that are involved in this shipment.
  attribute?(:container_sequence_numbers, [ContainerSequenceNumbers], from: "containerSequenceNumbers")
end
TaxRegistrationDetails =

Tax registration details of the entity.

Structure.new do
  # @return [String] Tax registration number for the entity. For example, VAT ID.
  attribute(:tax_registration_number, String, from: "taxRegistrationNumber")

  # @return [String] Tax registration type for the entity.
  attribute(:tax_registration_type, String, from: "taxRegistrationType")
end
ContainerSequenceNumbers =

Container sequence numbers that are involved in this shipment.

Structure.new do
  # @return [String] A list of containers shipped
  attribute?(:container_sequence_number, String, from: "containerSequenceNumber")
end
PurchaseOrderItemDetails =

Item details for be provided for every item in shipment at either the item or carton or pallet level, whichever is appropriate.

Structure.new do
  # @return [Money] Maximum retail price of the item being shipped.
  attribute?(:maximum_retail_price, Money, from: "maximumRetailPrice")
end
GetShipmentDetailsResponse =

The response schema for the GetShipmentDetails operation.

Structure.new do
  # @return [Array<Error>]
  attribute?(:errors, [Error])

  # @return [ShipmentDetails]
  attribute?(:payload, ShipmentDetails)
end
CollectFreightPickupDetails =

Transport Request pickup date from Vendor Warehouse by Buyer

Structure.new do
  # @return [Time] Date on which the carrier is being scheduled to pickup items from vendor warehouse by Byer used
  # for WePay/Collect vendors.
  attribute?(:carrier_assignment_date, Time, from: "carrierAssignmentDate")

  # @return [Time] Date on which the items can be picked up from vendor warehouse by Buyer used for WePay/Collect
  # vendors.
  attribute?(:requested_pick_up, Time, from: "requestedPickUp")

  # @return [Time] Date on which the items are scheduled to be picked from vendor warehouse by Buyer used for
  # WePay/Collect vendors.
  attribute?(:scheduled_pick_up, Time, from: "scheduledPickUp")
end
TransportShipmentMeasurements =

Shipment measurement details.

Structure.new do
  # @return [Volume] Total Volume of the shipment.
  attribute?(:shipment_volume, Volume, from: "shipmentVolume")

  # @return [Weight] Total Weight of the shipment.
  attribute?(:shipment_weight, Weight, from: "shipmentWeight")

  # @return [Integer] Total number of cartons present in the shipment. Provide the cartonCount only for
  # non-palletized shipments.
  attribute?(:total_carton_count, Integer, from: "totalCartonCount")

  # @return [Integer] Total number of Non Stackable Pallets present in the shipment.
  attribute?(:total_pallet_non_stackable, Integer, from: "totalPalletNonStackable")

  # @return [Integer] Total number of Stackable Pallets present in the shipment.
  attribute?(:total_pallet_stackable, Integer, from: "totalPalletStackable")
end
SubmitShipmentConfirmationsRequest =

The request schema for the SubmitShipmentConfirmations operation.

Structure.new do
  # @return [Array<ShipmentConfirmation>] A list of one or more shipment confirmations.
  attribute?(:shipment_confirmations, [ShipmentConfirmation], from: "shipmentConfirmations")
end
SubmitShipmentConfirmationsResponse =

The response schema for the SubmitShipmentConfirmations operation.

Structure.new do
  # @return [Array<Error>]
  attribute?(:errors, [Error])

  # @return [TransactionReference] The response payload for the SubmitShipmentConfirmations operation.
  attribute?(:payload, TransactionReference)
end
TransportationDetailsForShipmentConfirmation =

Transportation details for this shipment.

Structure.new do
  # @return [String] The Bill of Lading (BOL) number is a unique number assigned to each shipment of goods by the
  # vendor or shipper during the creation of the Bill of Lading. This number must be unique for every shipment and
  # cannot be a date/time or single character. The BOL numer is mandatory in Shipment Confirmation message for FTL
  # and LTL shipments, and must match the paper BOL provided with the shipment. Instead of BOL, an alternative
  # reference number (like Delivery Note Number) for the shipment can also be sent in this field.
  attribute?(:bill_of_lading_number, String, from: "billOfLadingNumber")

  # @return [String] Code that identifies the carrier for the shipment. The Standard Carrier Alpha Code (SCAC) is
  # a unique two to four letter code used to identify a carrier. Carrier SCAC codes are assigned and maintained by
  # the NMFTA (National Motor Freight Association). This field is mandatory for US, CA, MX shipment confirmations.
  attribute?(:carrier_scac, String, from: "carrierScac")

  # @return [String] The field also known as PRO number is a unique number assigned by the carrier. It is used to
  # identify and track the shipment that goes out for delivery. This field is mandatory for UA, CA, MX shipment
  # confirmations.
  attribute?(:carrier_shipment_reference_number, String, from: "carrierShipmentReferenceNumber")

  # @return [String] The mode of transportation for this shipment.
  attribute?(:transportation_mode, String, from: "transportationMode")
end

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #endpoint, #retries

Instance Method Summary collapse

Methods inherited from Peddler::API

#endpoint_uri, #http, #initialize, #meter, #retriable, #sandbox, #sandbox?, #use, #via

Constructor Details

This class inherits a constructor from Peddler::API

Instance Method Details

#get_shipment_details(limit: nil, sort_order: nil, next_token: nil, created_after: nil, created_before: nil, shipment_confirmed_before: nil, shipment_confirmed_after: nil, package_label_created_before: nil, package_label_created_after: nil, shipped_before: nil, shipped_after: nil, estimated_delivery_before: nil, estimated_delivery_after: nil, shipment_delivery_before: nil, shipment_delivery_after: nil, requested_pick_up_before: nil, requested_pick_up_after: nil, scheduled_pick_up_before: nil, scheduled_pick_up_after: nil, current_shipment_status: nil, vendor_shipment_identifier: nil, buyer_reference_number: nil, buyer_warehouse_code: nil, seller_warehouse_code: nil, rate_limit: 10.0) ⇒ Peddler::Response

Returns the Details about Shipment, Carrier Details, status of the shipment, container details and other details related to shipment based on the filter parameters value that you specify.

limit. in the result. Must be in ISO 8601 format. in the result. Must be in ISO 8601 format. Must be in ISO 8601 format. Must be in ISO 8601 format. Must be in ISO 8601 format. buyer. Must be in ISO 8601 format. ISO 8601 format. ISO 8601 format. be in ISO 8601 format. in ISO 8601 format. in ISO 8601 format. ISO 8601 format. in ISO 8601 format. ISO 8601 format. in ISO 8601 format. ISO 8601 format. same as 'shipToParty.partyId' in the Shipment. same as 'sellingParty.partyId' in the Shipment.

Parameters:

  • limit (Integer) (defaults to: nil)

    The limit to the number of records returned. Default value is 50 records.

  • sort_order (String) (defaults to: nil)

    Sort in ascending or descending order by purchase order creation date.

  • next_token (String) (defaults to: nil)

    Used for pagination when there are more shipments than the specified result size

  • created_after (String) (defaults to: nil)

    Get Shipment Details that became available after this timestamp will be included

  • created_before (String) (defaults to: nil)

    Get Shipment Details that became available before this timestamp will be included

  • shipment_confirmed_before (String) (defaults to: nil)

    Get Shipment Details by passing Shipment confirmed create Date Before.

  • shipment_confirmed_after (String) (defaults to: nil)

    Get Shipment Details by passing Shipment confirmed create Date After.

  • package_label_created_before (String) (defaults to: nil)

    Get Shipment Details by passing Package label create Date by buyer.

  • package_label_created_after (String) (defaults to: nil)

    Get Shipment Details by passing Package label create Date After by

  • shipped_before (String) (defaults to: nil)

    Get Shipment Details by passing Shipped Date Before. Must be in

  • shipped_after (String) (defaults to: nil)

    Get Shipment Details by passing Shipped Date After. Must be in

  • estimated_delivery_before (String) (defaults to: nil)

    Get Shipment Details by passing Estimated Delivery Date Before. Must

  • estimated_delivery_after (String) (defaults to: nil)

    Get Shipment Details by passing Estimated Delivery Date Before. Must be

  • shipment_delivery_before (String) (defaults to: nil)

    Get Shipment Details by passing Shipment Delivery Date Before. Must be

  • shipment_delivery_after (String) (defaults to: nil)

    Get Shipment Details by passing Shipment Delivery Date After. Must be in

  • requested_pick_up_before (String) (defaults to: nil)

    Get Shipment Details by passing Before Requested pickup date. Must be

  • requested_pick_up_after (String) (defaults to: nil)

    Get Shipment Details by passing After Requested pickup date. Must be in

  • scheduled_pick_up_before (String) (defaults to: nil)

    Get Shipment Details by passing Before scheduled pickup date. Must be

  • scheduled_pick_up_after (String) (defaults to: nil)

    Get Shipment Details by passing After Scheduled pickup date. Must be in

  • current_shipment_status (String) (defaults to: nil)

    Get Shipment Details by passing Current shipment status.

  • vendor_shipment_identifier (String) (defaults to: nil)

    Get Shipment Details by passing Vendor Shipment ID

  • buyer_reference_number (String) (defaults to: nil)

    Get Shipment Details by passing buyer Reference ID

  • buyer_warehouse_code (String) (defaults to: nil)

    Get Shipping Details based on buyer warehouse code. This value should be

  • seller_warehouse_code (String) (defaults to: nil)

    Get Shipping Details based on vendor warehouse code. This value should be

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/peddler/apis/vendor_shipments_v1.rb', line 87

def get_shipment_details(limit: nil, sort_order: nil, next_token: nil, created_after: nil, created_before: nil,
  shipment_confirmed_before: nil, shipment_confirmed_after: nil, package_label_created_before: nil,
  package_label_created_after: nil, shipped_before: nil, shipped_after: nil, estimated_delivery_before: nil,
  estimated_delivery_after: nil, shipment_delivery_before: nil, shipment_delivery_after: nil,
  requested_pick_up_before: nil, requested_pick_up_after: nil, scheduled_pick_up_before: nil,
  scheduled_pick_up_after: nil, current_shipment_status: nil, vendor_shipment_identifier: nil,
  buyer_reference_number: nil, buyer_warehouse_code: nil, seller_warehouse_code: nil, rate_limit: 10.0)
  cannot_sandbox!

  path = "/vendor/shipping/v1/shipments"
  params = {
    "limit" => limit,
    "sortOrder" => sort_order,
    "nextToken" => next_token,
    "createdAfter" => created_after,
    "createdBefore" => created_before,
    "shipmentConfirmedBefore" => shipment_confirmed_before,
    "shipmentConfirmedAfter" => shipment_confirmed_after,
    "packageLabelCreatedBefore" => package_label_created_before,
    "packageLabelCreatedAfter" => package_label_created_after,
    "shippedBefore" => shipped_before,
    "shippedAfter" => shipped_after,
    "estimatedDeliveryBefore" => estimated_delivery_before,
    "estimatedDeliveryAfter" => estimated_delivery_after,
    "shipmentDeliveryBefore" => shipment_delivery_before,
    "shipmentDeliveryAfter" => shipment_delivery_after,
    "requestedPickUpBefore" => requested_pick_up_before,
    "requestedPickUpAfter" => requested_pick_up_after,
    "scheduledPickUpBefore" => scheduled_pick_up_before,
    "scheduledPickUpAfter" => scheduled_pick_up_after,
    "currentShipmentStatus" => current_shipment_status,
    "vendorShipmentIdentifier" => vendor_shipment_identifier,
    "buyerReferenceNumber" => buyer_reference_number,
    "buyerWarehouseCode" => buyer_warehouse_code,
    "sellerWarehouseCode" => seller_warehouse_code,
  }.compact
  parser = -> { GetShipmentDetailsResponse }
  meter(rate_limit).get(path, params:, parser:)
end

#get_shipment_labels(limit: nil, sort_order: nil, next_token: nil, label_created_after: nil, label_created_before: nil, buyer_reference_number: nil, vendor_shipment_identifier: nil, seller_warehouse_code: nil, rate_limit: 10.0) ⇒ Peddler::Response

Returns small parcel shipment labels based on the filters that you specify.

nextToken when the number of results exceeds the specified pageSize value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until nextToken is null. Note that this operation can return empty pages. field must be in ISO 8601 datetime format. This field must be in ISO 8601 datetime format. same as the sellingParty.partyId in the shipment.

Parameters:

  • limit (Integer) (defaults to: nil)

    The limit to the number of records returned. Default value is 50 records.

  • sort_order (String) (defaults to: nil)

    Sort the list by shipment label creation date in ascending or descending order.

  • next_token (String) (defaults to: nil)

    A token that you use to retrieve the next page of results. The response includes

  • label_created_after (String) (defaults to: nil)

    Shipment labels created after this time will be included in the result. This

  • label_created_before (String) (defaults to: nil)

    Shipment labels created before this time will be included in the result.

  • buyer_reference_number (String) (defaults to: nil)

    Get Shipment labels by passing buyer reference number.

  • vendor_shipment_identifier (String) (defaults to: nil)

    Get Shipment labels by passing vendor shipment identifier.

  • seller_warehouse_code (String) (defaults to: nil)

    Get Shipping labels based on vendor warehouse code. This value must be

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/peddler/apis/vendor_shipments_v1.rb', line 145

def get_shipment_labels(limit: nil, sort_order: nil, next_token: nil, label_created_after: nil,
  label_created_before: nil, buyer_reference_number: nil, vendor_shipment_identifier: nil,
  seller_warehouse_code: nil, rate_limit: 10.0)
  cannot_sandbox!

  path = "/vendor/shipping/v1/transportLabels"
  params = {
    "limit" => limit,
    "sortOrder" => sort_order,
    "nextToken" => next_token,
    "labelCreatedAfter" => label_created_after,
    "labelCreatedBefore" => label_created_before,
    "buyerReferenceNumber" => buyer_reference_number,
    "vendorShipmentIdentifier" => vendor_shipment_identifier,
    "sellerWarehouseCode" => seller_warehouse_code,
  }.compact
  parser = -> { GetShipmentLabels }
  meter(rate_limit).get(path, params:, parser:)
end

#submit_shipment_confirmations(body, rate_limit: 10.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Submits one or more shipment confirmations for vendor orders.

Parameters:

  • body (Hash)

    A request to submit shipment confirmation.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



20
21
22
23
24
# File 'lib/peddler/apis/vendor_shipments_v1.rb', line 20

def submit_shipment_confirmations(body, rate_limit: 10.0)
  path = "/vendor/shipping/v1/shipmentConfirmations"
  parser = -> { SubmitShipmentConfirmationsResponse }
  meter(rate_limit).post(path, body:, parser:)
end

#submit_shipments(body, rate_limit: 10.0) ⇒ Peddler::Response

Submits one or more shipment request for vendor Orders.

Parameters:

  • body (Hash)

    A request to submit shipment request.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



31
32
33
34
35
36
37
# File 'lib/peddler/apis/vendor_shipments_v1.rb', line 31

def submit_shipments(body, rate_limit: 10.0)
  cannot_sandbox!

  path = "/vendor/shipping/v1/shipments"
  parser = -> { SubmitShipmentConfirmationsResponse }
  meter(rate_limit).post(path, body:, parser:)
end