Class: Peddler::APIs::VendorOrdersV1

Inherits:
Peddler::API show all
Defined in:
lib/peddler/apis/vendor_orders_v1.rb,
lib/peddler/apis/vendor_orders_v1/error.rb,
lib/peddler/apis/vendor_orders_v1/order.rb,
lib/peddler/apis/vendor_orders_v1/address.rb,
lib/peddler/apis/vendor_orders_v1/error_list.rb,
lib/peddler/apis/vendor_orders_v1/order_item.rb,
lib/peddler/apis/vendor_orders_v1/order_list.rb,
lib/peddler/apis/vendor_orders_v1/pagination.rb,
lib/peddler/apis/vendor_orders_v1/item_status.rb,
lib/peddler/apis/vendor_orders_v1/order_status.rb,
lib/peddler/apis/vendor_orders_v1/item_quantity.rb,
lib/peddler/apis/vendor_orders_v1/order_details.rb,
lib/peddler/apis/vendor_orders_v1/import_details.rb,
lib/peddler/apis/vendor_orders_v1/transaction_id.rb,
lib/peddler/apis/vendor_orders_v1/order_item_status.rb,
lib/peddler/apis/vendor_orders_v1/order_list_status.rb,
lib/peddler/apis/vendor_orders_v1/party_identification.rb,
lib/peddler/apis/vendor_orders_v1/order_acknowledgement.rb,
lib/peddler/apis/vendor_orders_v1/ordered_quantity_details.rb,
lib/peddler/apis/vendor_orders_v1/tax_registration_details.rb,
lib/peddler/apis/vendor_orders_v1/order_acknowledgement_item.rb,
lib/peddler/apis/vendor_orders_v1/order_item_acknowledgement.rb,
lib/peddler/apis/vendor_orders_v1/get_purchase_order_response.rb,
lib/peddler/apis/vendor_orders_v1/get_purchase_orders_response.rb,
lib/peddler/apis/vendor_orders_v1/acknowledgement_status_details.rb,
lib/peddler/apis/vendor_orders_v1/submit_acknowledgement_request.rb,
lib/peddler/apis/vendor_orders_v1/submit_acknowledgement_response.rb,
lib/peddler/apis/vendor_orders_v1/get_purchase_orders_status_response.rb

Overview

Selling Partner API for Retail Procurement Orders

The Selling Partner API for Retail Procurement Orders provides programmatic access to vendor orders data.

Defined Under Namespace

Classes: ErrorList, ItemStatus

Constant Summary collapse

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
Order =

Represents an order placed by Amazon, including the purchase order number, current state, and order details.

Structure.new do
  # @return [String] The purchase order number for this order. Formatting Notes: 8-character alpha-numeric code.
  attribute(:purchase_order_number, String, from: "purchaseOrderNumber")

  # @return [String] This field will contain the current state of the purchase order.
  attribute(:purchase_order_state, String, from: "purchaseOrderState")

  # @return [OrderDetails] Details of an order.
  attribute?(:order_details, OrderDetails, from: "orderDetails")
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 address information, if required.
  attribute?(:address_line2, String, from: "addressLine2")

  # @return [String] Additional 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 conatins 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
OrderItem =

Represents an individual item in an order, including item details, quantities, pricing, and backorder information.

Structure.new do
  # @return [:boolean] When true, we will accept backorder confirmations for this item.
  attribute(:back_order_allowed, :boolean, from: "isBackOrderAllowed")

  # @return [String] Numbering of the item on the purchase order. The first item will be 1, the second 2, and so
  # on.
  attribute(:item_sequence_number, String, from: "itemSequenceNumber")

  # @return [ItemQuantity] Item quantity ordered.
  attribute(:ordered_quantity, ItemQuantity, from: "orderedQuantity")

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

  # @return [Money] The list price of an item per each or weight unit.
  attribute?(:list_price, Money, from: "listPrice")

  # @return [Money] The net cost of an item per each or weight unit.
  attribute?(:net_cost, Money, from: "netCost")

  # @return [String] The vendor selected product identification of the item.
  attribute?(:vendor_product_identifier, String, from: "vendorProductIdentifier")
end
OrderList =

A list of orders returned as response.

Structure.new do
  # @return [Array<Order>] Represents an individual order within the OrderList.
  attribute?(:orders, [Order])

  # @return [Pagination]
  attribute?(:pagination, Pagination)
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 purchase
  # order items to return.
  attribute?(:next_token, String, from: "nextToken")
end
OrderStatus =

Current status of a purchase order.

Structure.new do
  # @return [Array<OrderItemStatus>] Detailed order status.
  attribute(:item_status, [OrderItemStatus], from: "itemStatus")

  # @return [Time] The date the purchase order was placed. Must be in ISO-8601 date/time format.
  attribute(:purchase_order_date, Time, from: "purchaseOrderDate")

  # @return [String] The buyer's purchase order number for this order. Formatting Notes: 8-character alpha-numeric
  # code.
  attribute(:purchase_order_number, String, from: "purchaseOrderNumber")

  # @return [String] The status of the buyer's purchase order for this order.
  attribute(:purchase_order_status, String, from: "purchaseOrderStatus")

  # @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 to party. Find a list of fulfillment
  # center addresses for a region on the [Resources page of Amazon Vendor
  # Central](https://vendorcentral.amazon.com/hz/vendor/members/support/help/node/GPZ88XH8HQM97ZV6).
  attribute(:ship_to_party, PartyIdentification, from: "shipToParty")

  # @return [Time] The date when the purchase order was last updated. Must be in ISO-8601 date/time format.
  attribute?(:last_updated_date, Time, from: "lastUpdatedDate")
end
ItemQuantity =

Details of quantity ordered.

Structure.new do
  # @return [Integer] Acknowledged quantity. This value should not be zero.
  attribute?(:amount, Integer)

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

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

Details of an order.

Structure.new do
  # @return [Array<OrderItem>] A list of items in this purchase order.
  attribute(:items, [OrderItem])

  # @return [Time] The date the purchase order was placed. Must be in ISO-8601 date/time format.
  attribute(:purchase_order_date, Time, from: "purchaseOrderDate")

  # @return [Time] The date when current purchase order state was changed. Current purchase order state is
  # available in the field 'purchaseOrderState'. Must be in ISO-8601 date/time format.
  attribute(:purchase_order_state_changed_date, Time, from: "purchaseOrderStateChangedDate")

  # @return [PartyIdentification] Name/Address and tax details of the bill to party.
  attribute?(:bill_to_party, PartyIdentification, from: "billToParty")

  # @return [PartyIdentification] Name/Address and tax details of the buying party.
  attribute?(:buying_party, PartyIdentification, from: "buyingParty")

  # @return [String] If requested by the recipient, this field will contain a promotional/deal number. The
  # discount code line is optional. It is used to obtain a price discount on items on the order.
  attribute?(:deal_code, String, from: "dealCode")

  # @return [String] This indicates the delivery window. Format is start and end date separated by double hyphen
  # (--). For example, 2007-03-01T13:00:00Z--2007-03-11T15:30:00Z.
  attribute?(:delivery_window, String, from: "deliveryWindow")

  # @return [ImportDetails] If the purchase order is an import order, the details for the import order.
  attribute?(:import_details, ImportDetails, from: "importDetails")

  # @return [String] Payment method used.
  attribute?(:payment_method, String, from: "paymentMethod")

  # @return [Time] The date when purchase order was last changed by Amazon after the order was placed. This date
  # will be greater than 'purchaseOrderDate'. This means the PO data was changed on that date and vendors are
  # required to fulfill the updated PO. The PO changes can be related to Item Quantity, Ship to Location, Ship
  # Window etc. This field will not be present in orders that have not changed after creation. Must be in ISO-8601
  # date/time format.
  attribute?(:purchase_order_changed_date, Time, from: "purchaseOrderChangedDate")

  # @return [String] Type of purchase order.
  attribute?(:purchase_order_type, String, from: "purchaseOrderType")

  # @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 to party. Find a list of fulfillment
  # center addresses for a region on the [Resources page of Amazon Vendor
  # Central](https://vendorcentral.amazon.com/hz/vendor/members/support/help/node/GPZ88XH8HQM97ZV6).
  attribute?(:ship_to_party, PartyIdentification, from: "shipToParty")

  # @return [String] This indicates the ship window. Format is start and end date separated by double hyphen (--).
  # For example, 2007-03-01T13:00:00Z--2007-03-11T15:30:00Z.
  attribute?(:ship_window, String, from: "shipWindow")
end
ImportDetails =

Import details for an import order.

Structure.new do
  # @return [String] Types and numbers of container(s) for import purchase orders. Can be a comma-separated list
  # if the shipment has multiple containers. HC signifies a high-capacity container. Free-text field, limited to
  # 64 characters. The format will be a comma-delimited list containing values of the type:
  # $NUMBER_OF_CONTAINERS_OF_THIS_TYPE-$CONTAINER_TYPE. The list of values for the container type is: 40'(40-foot
  # container), 40'HC (40-foot high-capacity container), 45', 45'HC, 30', 30'HC, 20', 20'HC.
  attribute?(:import_containers, String, from: "importContainers")

  # @return [String] Incoterms (International Commercial Terms) are used to divide transaction costs and
  # responsibilities between buyer and seller and reflect state-of-the-art transportation practices. This is for
  # import purchase orders only.
  attribute?(:international_commercial_terms, String, from: "internationalCommercialTerms")

  # @return [String] If the recipient requests, contains the shipment method of payment. This is for import PO's
  # only.
  attribute?(:method_of_payment, String, from: "methodOfPayment")

  # @return [String] The port where goods on an import purchase order must be delivered by the vendor. This should
  # only be specified when the internationalCommercialTerms is FOB.
  attribute?(:port_of_delivery, String, from: "portOfDelivery")

  # @return [String] Special instructions regarding the shipment. This field is for import purchase orders.
  attribute?(:shipping_instructions, String, from: "shippingInstructions")
end
TransactionId =

Response containing the transaction ID.

Structure.new do
  # @return [String] GUID assigned by Amazon 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
OrderItemStatus =

Represents the current status of an order item, including acknowledgement and receiving details.

Structure.new do
  # @return [String] Numbering of the item on the purchase order. The first item will be 1, the second 2, and so
  # on.
  attribute(:item_sequence_number, String, from: "itemSequenceNumber")

  # @return [Hash] Acknowledgement status information.
  attribute?(:acknowledgement_status, Hash, from: "acknowledgementStatus")

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

  # @return [Money] The list price of an item per each or weight unit.
  attribute?(:list_price, Money, from: "listPrice")

  # @return [Money] The net cost of an item per each or weight unit.
  attribute?(:net_cost, Money, from: "netCost")

  # @return [Hash] Ordered quantity information.
  attribute?(:ordered_quantity, Hash, from: "orderedQuantity")

  # @return [Hash] Item receive status at the buyer's warehouse.
  attribute?(:receiving_status, Hash, from: "receivingStatus")

  # @return [String] The vendor selected product identification of the item.
  attribute?(:vendor_product_identifier, String, from: "vendorProductIdentifier")
end
OrderListStatus =

A list of order statuses.

Structure.new do
  # @return [Array<OrderStatus>] Represents an order status within the OrderListStatus.
  attribute?(:orders_status, [OrderStatus], from: "ordersStatus")

  # @return [Pagination]
  attribute?(:pagination, Pagination)
end
PartyIdentification =

Name, address and tax details of a party.

Structure.new do
  # @return [String] Assigned identification for the party. For example, warehouse code or vendor code. Please
  # refer to specific party for more details.
  attribute(:party_id, String, from: "partyId")

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

  # @return [TaxRegistrationDetails] Tax registration details of the party.
  attribute?(:tax_info, TaxRegistrationDetails, from: "taxInfo")
end
OrderAcknowledgement =

Represents an acknowledgement for an order, including the purchase order number, selling party details, acknowledgement date, and a list of acknowledged items.

Structure.new do
  # @return [Time] The date and time when the purchase order is acknowledged, in ISO-8601 date/time format.
  attribute(:acknowledgement_date, Time, from: "acknowledgementDate")

  # @return [Array<OrderAcknowledgementItem>] A list of the items being acknowledged with associated details.
  attribute(:items, [OrderAcknowledgementItem])

  # @return [String] The purchase order number. Formatting Notes: 8-character alpha-numeric code.
  attribute(:purchase_order_number, String, from: "purchaseOrderNumber")

  # @return [PartyIdentification] Name, address and tax details of the party receiving a shipment of products.
  attribute(:selling_party, PartyIdentification, from: "sellingParty")
end
OrderedQuantityDetails =

Details of item quantity ordered.

Structure.new do
  # @return [ItemQuantity] Item quantity ordered.
  attribute?(:cancelled_quantity, ItemQuantity, from: "cancelledQuantity")

  # @return [ItemQuantity] Item quantity ordered.
  attribute?(:ordered_quantity, ItemQuantity, from: "orderedQuantity")

  # @return [Time] The date when the line item quantity was updated by buyer. Must be in ISO-8601 date/time
  # format.
  attribute?(:updated_date, Time, from: "updatedDate")
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
OrderAcknowledgementItem =

Details of the item being acknowledged.

Structure.new do
  # @return [Array<OrderItemAcknowledgement>] This is used to indicate acknowledged quantity.
  attribute(:item_acknowledgements, [OrderItemAcknowledgement], from: "itemAcknowledgements")

  # @return [ItemQuantity] The quantity of this item ordered.
  attribute(:ordered_quantity, ItemQuantity, from: "orderedQuantity")

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

  # @return [String] The discount multiplier that should be applied to the price if a vendor sells books with a
  # list price. This is a multiplier factor to arrive at a final discounted price. A multiplier of .90 would be
  # the factor if a 10% discount is given.
  attribute?(:discount_multiplier, String, from: "discountMultiplier")

  # @return [String] Line item sequence number for the item.
  attribute?(:item_sequence_number, String, from: "itemSequenceNumber")

  # @return [Money] The list price of an item per each or weight unit. Required only if a vendor sells books at
  # list price.
  attribute?(:list_price, Money, from: "listPrice")

  # @return [Money] The net cost of an item per each or weight unit that must match the cost on the invoice. This
  # is a required field. If left blank, Amazon systems will reject the file. Price information must not be zero or
  # negative.
  attribute?(:net_cost, Money, from: "netCost")

  # @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
OrderItemAcknowledgement =

Represents the acknowledgement details for an individual order item, including the acknowledgement code, acknowledged quantity, scheduled ship and delivery dates, and rejection reason (if applicable).

Structure.new do
  # @return [ItemQuantity] Details of quantity acknowledged with the above acknowledgement code.
  attribute(:acknowledged_quantity, ItemQuantity, from: "acknowledgedQuantity")

  # @return [String] This indicates the acknowledgement code.
  attribute(:acknowledgement_code, String, from: "acknowledgementCode")

  # @return [String] Indicates the reason for rejection.
  attribute?(:rejection_reason, String, from: "rejectionReason")

  # @return [Time] Estimated delivery date per line item. Must be in ISO-8601 date/time format.
  attribute?(:scheduled_delivery_date, Time, from: "scheduledDeliveryDate")

  # @return [Time] Estimated ship date per line item. Must be in ISO-8601 date/time format.
  attribute?(:scheduled_ship_date, Time, from: "scheduledShipDate")
end
GetPurchaseOrderResponse =

The response schema for the getPurchaseOrder operation.

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

  # @return [Order] The details of the requested order
  attribute?(:payload, Order)
end
GetPurchaseOrdersResponse =

The response schema for the getPurchaseOrders operation.

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

  # @return [OrderList] A list of orders.
  attribute?(:payload, OrderList)
end
AcknowledgementStatusDetails =

Details of item quantity ordered

Structure.new do
  # @return [ItemQuantity] Item quantity accepted by vendor to be shipped.
  attribute?(:accepted_quantity, ItemQuantity, from: "acceptedQuantity")

  # @return [Time] The date when the line item was confirmed by vendor. Must be in ISO-8601 date/time format.
  attribute?(:acknowledgement_date, Time, from: "acknowledgementDate")

  # @return [ItemQuantity] Item quantity rejected by vendor.
  attribute?(:rejected_quantity, ItemQuantity, from: "rejectedQuantity")
end
SubmitAcknowledgementRequest =

The request schema for the submitAcknowledgment operation.

Structure.new do
  # @return [Array<OrderAcknowledgement>] An array of order acknowledgements to be submitted.
  attribute?(:acknowledgements, [OrderAcknowledgement])
end
SubmitAcknowledgementResponse =

The response schema for the submitAcknowledgement operation

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

  # @return [TransactionId] The payload for the submitAcknowledgement operation.
  attribute?(:payload, TransactionId)
end
GetPurchaseOrdersStatusResponse =

The response schema for the getPurchaseOrdersStatus operation.

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

  # @return [OrderListStatus] Current status of list of purchase orders.
  attribute?(:payload, OrderListStatus)
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_purchase_order(purchase_order_number, rate_limit: 10.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns a purchase order based on the purchaseOrderNumber value that you specify.

Notes: 8-character alpha-numeric code.

Parameters:

  • purchase_order_number (String)

    The purchase order identifier for the order that you want. Formatting

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



75
76
77
78
79
# File 'lib/peddler/apis/vendor_orders_v1.rb', line 75

def get_purchase_order(purchase_order_number, rate_limit: 10.0)
  path = "/vendor/orders/v1/purchaseOrders/#{percent_encode(purchase_order_number)}"
  parser = -> { GetPurchaseOrderResponse }
  meter(rate_limit).get(path, parser:)
end

#get_purchase_orders(limit: nil, created_after: nil, created_before: nil, sort_order: nil, next_token: nil, include_details: nil, changed_after: nil, changed_before: nil, po_item_state: nil, is_po_changed: nil, purchase_order_state: nil, ordering_vendor_code: nil, rate_limit: 10.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns a list of purchase orders created or changed during the time frame that you specify. You define the time frame using the createdAfter, createdBefore, changedAfter and changedBefore parameters. The date range to search must not be more than 7 days. You can choose to get only the purchase order numbers by setting includeDetails to false. You can then use the getPurchaseOrder operation to receive details for a specific purchase order.

result. Must be in ISO-8601 date/time format. result. Must be in ISO-8601 date/time format. limit. The token value is returned in the previous API call purchase order numbers are returned. Default value is true. Must be in ISO-8601 date/time format. result. Must be in ISO-8601 date/time format. will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero. Vendors are required to pull the changed purchase order and fulfill the updated purchase order and not the original one. Default value is false. value should be same as 'sellingParty.partyId' in the purchase order. If not included in the filter, all purchase orders for all of the vendor codes that exist in the vendor group used to authorize the API client application are returned.

Parameters:

  • limit (Integer) (defaults to: nil)

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

  • created_after (String) (defaults to: nil)

    Purchase orders that became available after this time will be included in the

  • created_before (String) (defaults to: nil)

    Purchase orders that became available before this time will be included in the

  • 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 is more purchase orders than the specified result size

  • include_details (String) (defaults to: nil)

    When true, returns purchase orders with complete details. Otherwise, only

  • changed_after (String) (defaults to: nil)

    Purchase orders that changed after this timestamp will be included in the result.

  • changed_before (String) (defaults to: nil)

    Purchase orders that changed before this timestamp will be included in the

  • po_item_state (String) (defaults to: nil)

    Current state of the purchase order item. If this value is Cancelled, this API

  • is_po_changed (String) (defaults to: nil)

    When true, returns purchase orders which were modified after the order was placed.

  • purchase_order_state (String) (defaults to: nil)

    Filters purchase orders based on the purchase order state.

  • ordering_vendor_code (String) (defaults to: nil)

    Filters purchase orders based on the specified ordering vendor code. This

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/peddler/apis/vendor_orders_v1.rb', line 46

def get_purchase_orders(limit: nil, created_after: nil, created_before: nil, sort_order: nil, next_token: nil,
  include_details: nil, changed_after: nil, changed_before: nil, po_item_state: nil, is_po_changed: nil,
  purchase_order_state: nil, ordering_vendor_code: nil, rate_limit: 10.0)
  path = "/vendor/orders/v1/purchaseOrders"
  params = {
    "limit" => limit,
    "createdAfter" => created_after,
    "createdBefore" => created_before,
    "sortOrder" => sort_order,
    "nextToken" => next_token,
    "includeDetails" => include_details,
    "changedAfter" => changed_after,
    "changedBefore" => changed_before,
    "poItemState" => po_item_state,
    "isPOChanged" => is_po_changed,
    "purchaseOrderState" => purchase_order_state,
    "orderingVendorCode" => ordering_vendor_code,
  }.compact
  parser = -> { GetPurchaseOrdersResponse }
  meter(rate_limit).get(path, params:, parser:)
end

#get_purchase_orders_status(limit: nil, sort_order: nil, next_token: nil, created_after: nil, created_before: nil, updated_after: nil, updated_before: nil, purchase_order_number: nil, purchase_order_status: nil, item_confirmation_status: nil, item_receive_status: nil, ordering_vendor_code: nil, ship_to_party_id: nil, rate_limit: 10.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns purchase order statuses based on the filters that you specify. Date range to search must not be more than 7 days. You can return a list of purchase order statuses using the available filters, or a single purchase order status by providing the purchase order number.

size limit. result. Must be in ISO-8601 date/time format. the result. Must be in ISO-8601 date/time format. timestamp will be included in the result. Must be in ISO-8601 date/time format. timestamp will be included in the result. Must be in ISO-8601 date/time format. not included in filter, this will return purchase orders for all statuses. item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included. If the item receive status is not included in the filter, purchase orders for all receive statuses are included. value should be same as 'sellingParty.partyId' in the purchase order. If not included in filter, all purchase orders for all the vendor codes that exist in the vendor group used to authorize API client application are returned. providing ship to location id here. This value should be same as 'shipToParty.partyId' in the purchase order. If not included in filter, this will return purchase orders for all the buyer's warehouses used for vendor group purchase orders.

Parameters:

  • limit (Integer) (defaults to: nil)

    The limit to the number of records returned. Default value is 100 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 purchase orders than the specified result

  • created_after (String) (defaults to: nil)

    Purchase orders that became available after this timestamp will be included in the

  • created_before (String) (defaults to: nil)

    Purchase orders that became available before this timestamp will be included in

  • updated_after (String) (defaults to: nil)

    Purchase orders for which the last purchase order update happened after this

  • updated_before (String) (defaults to: nil)

    Purchase orders for which the last purchase order update happened before this

  • purchase_order_number (String) (defaults to: nil)

    Provides purchase order status for the specified purchase order number.

  • purchase_order_status (String) (defaults to: nil)

    Filters purchase orders based on the specified purchase order status. If

  • item_confirmation_status (String) (defaults to: nil)

    Filters purchase orders based on their item confirmation status. If the

  • item_receive_status (String) (defaults to: nil)

    Filters purchase orders based on the purchase order's item receive status.

  • ordering_vendor_code (String) (defaults to: nil)

    Filters purchase orders based on the specified ordering vendor code. This

  • ship_to_party_id (String) (defaults to: nil)

    Filters purchase orders for a specific buyer's Fulfillment Center/warehouse by

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/peddler/apis/vendor_orders_v1.rb', line 128

def get_purchase_orders_status(limit: nil, sort_order: nil, next_token: nil, created_after: nil,
  created_before: nil, updated_after: nil, updated_before: nil, purchase_order_number: nil,
  purchase_order_status: nil, item_confirmation_status: nil, item_receive_status: nil, ordering_vendor_code: nil,
  ship_to_party_id: nil, rate_limit: 10.0)
  path = "/vendor/orders/v1/purchaseOrdersStatus"
  params = {
    "limit" => limit,
    "sortOrder" => sort_order,
    "nextToken" => next_token,
    "createdAfter" => created_after,
    "createdBefore" => created_before,
    "updatedAfter" => updated_after,
    "updatedBefore" => updated_before,
    "purchaseOrderNumber" => purchase_order_number,
    "purchaseOrderStatus" => purchase_order_status,
    "itemConfirmationStatus" => item_confirmation_status,
    "itemReceiveStatus" => item_receive_status,
    "orderingVendorCode" => ordering_vendor_code,
    "shipToPartyId" => ship_to_party_id,
  }.compact
  parser = -> { GetPurchaseOrdersStatusResponse }
  meter(rate_limit).get(path, params:, parser:)
end

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

Note:

This operation can make a static sandbox call.

Submits acknowledgements for one or more purchase orders.

Parameters:

  • body (Hash)

    Submits acknowledgements for one or more purchase orders from a vendor.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



87
88
89
90
91
# File 'lib/peddler/apis/vendor_orders_v1.rb', line 87

def submit_acknowledgement(body, rate_limit: 10.0)
  path = "/vendor/orders/v1/acknowledgements"
  parser = -> { SubmitAcknowledgementResponse }
  meter(rate_limit).post(path, body:, parser:)
end