Class: Peddler::APIs::VendorDirectFulfillmentShipping20211228

Inherits:
Peddler::API
  • Object
show all
Defined in:
lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb

Overview

Selling Partner API for Direct Fulfillment Shipping

Use the Selling Partner API for Direct Fulfillment Shipping to access a direct fulfillment vendor's shipping data.

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?, #typed, #typed?, #use, #via

Constructor Details

This class inherits a constructor from Peddler::API

Instance Method Details

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

Note:

This operation can make a dynamic sandbox call.

Creates a container (pallet) label for the associated shipment package.

Parameters:

  • body (Hash)

    Request body containing the container label data.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



211
212
213
214
215
# File 'lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb', line 211

def create_container_label(body, rate_limit: 10.0)
  path = "/vendor/directFulfillment/shipping/2021-12-28/containerLabel"
  parser = Peddler::Types::VendorDirectFulfillmentShipping20211228::CreateContainerLabelResponse if typed?
  meter(rate_limit).post(path, body:, parser:)
end

#create_shipping_labels(purchase_order_number, body, rate_limit: 10.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Creates shipping labels for a purchase order and returns the labels.

Parameters:

  • purchase_order_number (String)

    The purchase order number for which you want to return the shipping labels. It should be the same number as the purchaseOrderNumber in the order.

  • body (Hash)

    The request payload that contains the parameters for creating shipping labels.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



86
87
88
89
90
# File 'lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb', line 86

def create_shipping_labels(purchase_order_number, body, rate_limit: 10.0)
  path = "/vendor/directFulfillment/shipping/2021-12-28/shippingLabels/#{percent_encode(purchase_order_number)}"
  parser = Peddler::Types::VendorDirectFulfillmentShipping20211228::ShippingLabel if typed?
  meter(rate_limit).post(path, body:, parser:)
end

#get_customer_invoice(purchase_order_number, rate_limit: 10.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns a customer invoice based on the purchaseOrderNumber that you specify.

Parameters:

  • purchase_order_number (String)

    Purchase order number of the shipment for which to return the invoice.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



156
157
158
159
160
# File 'lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb', line 156

def get_customer_invoice(purchase_order_number, rate_limit: 10.0)
  path = "/vendor/directFulfillment/shipping/2021-12-28/customerInvoices/#{percent_encode(purchase_order_number)}"
  parser = Peddler::Types::VendorDirectFulfillmentShipping20211228::CustomerInvoice if typed?
  meter(rate_limit).get(path, parser:)
end

#get_customer_invoices(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order: nil, next_token: nil, rate_limit: 10.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns a list of customer invoices created during a time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must be no more than 7 days.

Parameters:

  • ship_from_party_id (String) (defaults to: nil)

    The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses.

  • limit (Integer) (defaults to: nil)

    The limit to the number of records returned

  • created_after (String)

    Orders that became available after this date and time will be included in the result. Values are in ISO 8601 date-time format.

  • created_before (String)

    Orders that became available before this date and time will be included in the result. Values are in ISO 8601 date-time format.

  • sort_order (String) (defaults to: nil)

    Sort ASC or DESC by order creation date.

  • next_token (String) (defaults to: nil)

    Used for pagination when there are more orders than the specified result size limit. The token value is returned in the previous API call.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb', line 135

def get_customer_invoices(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order: nil,
  next_token: nil, rate_limit: 10.0)
  path = "/vendor/directFulfillment/shipping/2021-12-28/customerInvoices"
  params = {
    "shipFromPartyId" => ship_from_party_id,
    "limit" => limit,
    "createdAfter" => created_after,
    "createdBefore" => created_before,
    "sortOrder" => sort_order,
    "nextToken" => next_token,
  }.compact
  parser = Peddler::Types::VendorDirectFulfillmentShipping20211228::CustomerInvoiceList if typed?
  meter(rate_limit).get(path, params:, parser:)
end

#get_packing_slip(purchase_order_number, rate_limit: 10.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns a packing slip based on the purchaseOrderNumber that you specify.

Parameters:

  • purchase_order_number (String)

    The purchaseOrderNumber for the packing slip that you want.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



199
200
201
202
203
# File 'lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb', line 199

def get_packing_slip(purchase_order_number, rate_limit: 10.0)
  path = "/vendor/directFulfillment/shipping/2021-12-28/packingSlips/#{percent_encode(purchase_order_number)}"
  parser = Peddler::Types::VendorDirectFulfillmentShipping20211228::PackingSlip if typed?
  meter(rate_limit).get(path, parser:)
end

#get_packing_slips(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order: "ASC", next_token: nil, rate_limit: 10.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns a list of packing slips for the purchase orders that match the criteria specified. Date range to search must not be more than 7 days.

Parameters:

  • ship_from_party_id (String) (defaults to: nil)

    The vendor warehouseId for order fulfillment. If not specified, the result contains orders for all warehouses.

  • limit (Integer) (defaults to: nil)

    The maximum number of records to return.

  • created_after (String)

    Packing slips that become available after this date and time will be included in the result. Values are in ISO 8601 date-time format.

  • created_before (String)

    Packing slips that became available before this date and time will be included in the result. Values are in ISO 8601 date-time format.

  • sort_order (String) (defaults to: "ASC")

    The packing slip creation dates, which are sorted by ascending or descending order.

  • next_token (String) (defaults to: nil)

    Used for pagination when there are more packing slips than the specified result size limit. The token value is returned in the previous API call.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb', line 178

def get_packing_slips(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order: "ASC",
  next_token: nil, rate_limit: 10.0)
  path = "/vendor/directFulfillment/shipping/2021-12-28/packingSlips"
  params = {
    "shipFromPartyId" => ship_from_party_id,
    "limit" => limit,
    "createdAfter" => created_after,
    "createdBefore" => created_before,
    "sortOrder" => sort_order,
    "nextToken" => next_token,
  }.compact
  parser = Peddler::Types::VendorDirectFulfillmentShipping20211228::PackingSlipList if typed?
  meter(rate_limit).get(path, params:, parser:)
end

#get_shipping_label(purchase_order_number, rate_limit: 10.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns a shipping label for the purchaseOrderNumber that you specify.

Parameters:

  • purchase_order_number (String)

    The purchase order number for which you want to return the shipping label. It should be the same purchaseOrderNumber that you received in the order.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



72
73
74
75
76
# File 'lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb', line 72

def get_shipping_label(purchase_order_number, rate_limit: 10.0)
  path = "/vendor/directFulfillment/shipping/2021-12-28/shippingLabels/#{percent_encode(purchase_order_number)}"
  parser = Peddler::Types::VendorDirectFulfillmentShipping20211228::ShippingLabel if typed?
  meter(rate_limit).get(path, parser:)
end

#get_shipping_labels(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order: "ASC", next_token: nil, rate_limit: 10.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns a list of shipping labels created during the time frame that you specify. Use the createdAfter and createdBefore parameters to define the time frame. You must use both of these parameters. The date range to search must not be more than seven days.

Parameters:

  • ship_from_party_id (String) (defaults to: nil)

    The vendor warehouseId for order fulfillment. If not specified, the result contains orders for all warehouses.

  • limit (Integer) (defaults to: nil)

    The limit to the number of records returned.

  • created_after (String)

    Shipping labels that became available after this date and time will be included in the result. Values are in ISO 8601 date-time format.

  • created_before (String)

    Shipping labels that became available before this date and time will be included in the result. Values are in ISO 8601 date-time format.

  • sort_order (String) (defaults to: "ASC")

    The sort order creation date. You can choose between ascending (ASC) or descending (DESC) sort order.

  • next_token (String) (defaults to: nil)

    Used for pagination when there are more ship labels than the specified result size limit. The token value is returned in the previous API call.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb', line 38

def get_shipping_labels(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order: "ASC",
  next_token: nil, rate_limit: 10.0)
  path = "/vendor/directFulfillment/shipping/2021-12-28/shippingLabels"
  params = {
    "shipFromPartyId" => ship_from_party_id,
    "limit" => limit,
    "createdAfter" => created_after,
    "createdBefore" => created_before,
    "sortOrder" => sort_order,
    "nextToken" => next_token,
  }.compact
  parser = Peddler::Types::VendorDirectFulfillmentShipping20211228::ShippingLabelList if typed?
  meter(rate_limit).get(path, params:, parser:)
end

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

Note:

This operation can make a dynamic sandbox call.

Submits one or more shipment confirmations for vendor orders.

Parameters:

  • body (Hash)

    Request body containing the shipment confirmations data.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



98
99
100
101
102
# File 'lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb', line 98

def submit_shipment_confirmations(body, rate_limit: 10.0)
  path = "/vendor/directFulfillment/shipping/2021-12-28/shipmentConfirmations"
  parser = Peddler::Types::VendorDirectFulfillmentShipping20211228::TransactionReference if typed?
  meter(rate_limit).post(path, body:, parser:)
end

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

Note:

This operation can make a dynamic sandbox call.

This operation is only to be used by Vendor-Own-Carrier (VOC) vendors. Calling this API submits a shipment status update for the package that a vendor has shipped. It will provide the Amazon customer visibility on their order, when the package is outside of Amazon Network visibility.

Parameters:

  • body (Hash)

    Request body containing the shipment status update data.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



112
113
114
115
116
# File 'lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb', line 112

def submit_shipment_status_updates(body, rate_limit: 10.0)
  path = "/vendor/directFulfillment/shipping/2021-12-28/shipmentStatusUpdates"
  parser = Peddler::Types::VendorDirectFulfillmentShipping20211228::TransactionReference if typed?
  meter(rate_limit).post(path, body:, parser:)
end

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

Note:

This operation can make a dynamic sandbox call.

Creates a shipping label for a purchase order and returns a transactionId for reference.

Parameters:

  • body (Hash)

    The request body that contains the shipping labels data.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



59
60
61
62
63
# File 'lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb', line 59

def submit_shipping_label_request(body, rate_limit: 10.0)
  path = "/vendor/directFulfillment/shipping/2021-12-28/shippingLabels"
  parser = Peddler::Types::VendorDirectFulfillmentShipping20211228::TransactionReference if typed?
  meter(rate_limit).post(path, body:, parser:)
end