sp_api_clients 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +161 -0
- data/LICENSE +21 -0
- data/README.md +284 -0
- data/lib/amazon_sp_clients/adapter_loader.rb +28 -0
- data/lib/amazon_sp_clients/api_client.rb +309 -0
- data/lib/amazon_sp_clients/api_error.rb +37 -0
- data/lib/amazon_sp_clients/api_response.rb +54 -0
- data/lib/amazon_sp_clients/configuration.rb +144 -0
- data/lib/amazon_sp_clients/marketplaces.rb +63 -0
- data/lib/amazon_sp_clients/middlewares/raise_error.rb +166 -0
- data/lib/amazon_sp_clients/session.rb +124 -0
- data/lib/amazon_sp_clients/sp_fba_inventory.rb +8 -0
- data/lib/amazon_sp_clients/sp_feeds_2021.rb +8 -0
- data/lib/amazon_sp_clients/sp_fulfillment_outbound_2020.rb +8 -0
- data/lib/amazon_sp_clients/sp_listings_items_2021.rb +8 -0
- data/lib/amazon_sp_clients/sp_orders_v0.rb +8 -0
- data/lib/amazon_sp_clients/sp_reports_2021.rb +8 -0
- data/lib/amazon_sp_clients/sp_tokens_2021.rb +8 -0
- data/lib/amazon_sp_clients/sp_vdf_inventory_v1.rb +8 -0
- data/lib/amazon_sp_clients/sp_vdf_orders_v1.rb +8 -0
- data/lib/amazon_sp_clients/sp_vdf_shipping_v1.rb +8 -0
- data/lib/amazon_sp_clients/sp_vendor_invoices.rb +8 -0
- data/lib/amazon_sp_clients/sp_vendor_orders.rb +8 -0
- data/lib/amazon_sp_clients/sp_vendor_transaction_status.rb +8 -0
- data/lib/amazon_sp_clients/sp_vendors_shipments.rb +8 -0
- data/lib/amazon_sp_clients/token_exchange_auth.rb +82 -0
- data/lib/amazon_sp_clients/uploader.rb +77 -0
- data/lib/amazon_sp_clients/v2/api.rb +43 -0
- data/lib/amazon_sp_clients/v2/apis/fba_inventory.rb +80 -0
- data/lib/amazon_sp_clients/v2/apis/feeds_2021.rb +86 -0
- data/lib/amazon_sp_clients/v2/apis/fulfillment_outbound_2020.rb +184 -0
- data/lib/amazon_sp_clients/v2/apis/listings_items_2021.rb +144 -0
- data/lib/amazon_sp_clients/v2/apis/orders_v0.rb +165 -0
- data/lib/amazon_sp_clients/v2/apis/reports_2021.rb +117 -0
- data/lib/amazon_sp_clients/v2/apis/tokens_2021.rb +25 -0
- data/lib/amazon_sp_clients/v2/apis/vdf_inventory_v1.rb +26 -0
- data/lib/amazon_sp_clients/v2/apis/vdf_orders_v1.rb +61 -0
- data/lib/amazon_sp_clients/v2/apis/vdf_shipping_v1.rb +139 -0
- data/lib/amazon_sp_clients/v2/apis/vendor_invoices.rb +25 -0
- data/lib/amazon_sp_clients/v2/apis/vendor_orders.rb +106 -0
- data/lib/amazon_sp_clients/v2/apis/vendor_transaction_status.rb +25 -0
- data/lib/amazon_sp_clients/v2/apis/vendors_shipments.rb +120 -0
- data/lib/amazon_sp_clients/v2/apis.rb +82 -0
- data/lib/amazon_sp_clients/v2/client.rb +198 -0
- data/lib/amazon_sp_clients/v2/config.rb +85 -0
- data/lib/amazon_sp_clients/v2/credentials.rb +91 -0
- data/lib/amazon_sp_clients/v2/documents.rb +115 -0
- data/lib/amazon_sp_clients/v2/error_mapper.rb +235 -0
- data/lib/amazon_sp_clients/v2/errors.rb +117 -0
- data/lib/amazon_sp_clients/v2/lwa.rb +100 -0
- data/lib/amazon_sp_clients/v2/rdt.rb +104 -0
- data/lib/amazon_sp_clients/v2/token.rb +39 -0
- data/lib/amazon_sp_clients/v2.rb +33 -0
- data/lib/amazon_sp_clients/version.rb +3 -0
- data/lib/amazon_sp_clients.rb +69 -0
- data/lib/sp_api_clients.rb +6 -0
- data/sp_api_clients.gemspec +53 -0
- data/vendor/fba_inventory/lib/sp_fba_inventory/api/fba_inventory_api.rb +289 -0
- data/vendor/fba_inventory/lib/sp_fba_inventory.rb +12 -0
- data/vendor/feeds_2021/lib/sp_feeds_2021/api/feeds_api.rb +367 -0
- data/vendor/feeds_2021/lib/sp_feeds_2021.rb +12 -0
- data/vendor/fulfillment_outbound_2020/lib/sp_fulfillment_outbound_2020/api/fba_outbound_api.rb +845 -0
- data/vendor/fulfillment_outbound_2020/lib/sp_fulfillment_outbound_2020.rb +12 -0
- data/vendor/listings_items_2021/lib/sp_listings_items_2021/api/listings_api.rb +480 -0
- data/vendor/listings_items_2021/lib/sp_listings_items_2021.rb +12 -0
- data/vendor/orders_v0/lib/sp_orders_v0/api/orders_v0_api.rb +593 -0
- data/vendor/orders_v0/lib/sp_orders_v0/api/shipment_api.rb +83 -0
- data/vendor/orders_v0/lib/sp_orders_v0.rb +13 -0
- data/vendor/reports_2021/lib/sp_reports_2021/api/reports_api.rb +530 -0
- data/vendor/reports_2021/lib/sp_reports_2021.rb +12 -0
- data/vendor/tokens_2021/lib/sp_tokens_2021/api/tokens_api.rb +77 -0
- data/vendor/tokens_2021/lib/sp_tokens_2021.rb +12 -0
- data/vendor/vdf_inventory_v1/lib/sp_vdf_inventory_v1/api/update_inventory_api.rb +83 -0
- data/vendor/vdf_inventory_v1/lib/sp_vdf_inventory_v1.rb +12 -0
- data/vendor/vdf_orders_v1/lib/sp_vdf_orders_v1/api/vendor_orders_api.rb +217 -0
- data/vendor/vdf_orders_v1/lib/sp_vdf_orders_v1.rb +12 -0
- data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1/api/customer_invoices_api.rb +152 -0
- data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1/api/vendor_shipping_api.rb +264 -0
- data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1/api/vendor_shipping_labels_api.rb +208 -0
- data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1.rb +14 -0
- data/vendor/vendor_invoices/lib/sp_vendor_invoices/api/vendor_payments_api.rb +77 -0
- data/vendor/vendor_invoices/lib/sp_vendor_invoices.rb +12 -0
- data/vendor/vendor_orders/lib/sp_vendor_orders/api/vendor_orders_api.rb +323 -0
- data/vendor/vendor_orders/lib/sp_vendor_orders.rb +12 -0
- data/vendor/vendor_transaction_status/lib/sp_vendor_transaction_status/api/vendor_transaction_api.rb +75 -0
- data/vendor/vendor_transaction_status/lib/sp_vendor_transaction_status.rb +12 -0
- data/vendor/vendors_shipments/lib/sp_vendors_shipments/api/vendor_shipping_api.rb +337 -0
- data/vendor/vendors_shipments/lib/sp_vendors_shipments.rb +12 -0
- metadata +321 -0
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Selling Partner API for Retail Procurement Shipments
|
|
3
|
+
|
|
4
|
+
#The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: v1
|
|
7
|
+
|
|
8
|
+
Generated by: lib/generator (bundle exec rake generate)
|
|
9
|
+
=end
|
|
10
|
+
|
|
11
|
+
module AmazonSpClients
|
|
12
|
+
module SpVendorsShipments
|
|
13
|
+
class VendorShippingApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(session)
|
|
17
|
+
@api_client = AmazonSpClients::ApiClient.new(session)
|
|
18
|
+
end
|
|
19
|
+
# GetShipmentDetails
|
|
20
|
+
# 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. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
21
|
+
# @param [Hash] opts the optional parameters
|
|
22
|
+
# @option opts [Integer] :limit The limit to the number of records returned. Default value is 50 records.
|
|
23
|
+
# @option opts [String] :sort_order Sort in ascending or descending order by purchase order creation date.
|
|
24
|
+
# @option opts [String] :next_token Used for pagination when there are more shipments than the specified result size limit.
|
|
25
|
+
# @option opts [DateTime] :created_after Get Shipment Details that became available after this timestamp will be included in the result. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
26
|
+
# @option opts [DateTime] :created_before Get Shipment Details that became available before this timestamp will be included in the result. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
27
|
+
# @option opts [DateTime] :shipment_confirmed_before Get Shipment Details by passing Shipment confirmed create Date Before. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
28
|
+
# @option opts [DateTime] :shipment_confirmed_after Get Shipment Details by passing Shipment confirmed create Date After. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
29
|
+
# @option opts [DateTime] :package_label_created_before Get Shipment Details by passing Package label create Date by buyer. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
30
|
+
# @option opts [DateTime] :package_label_created_after Get Shipment Details by passing Package label create Date After by buyer. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
31
|
+
# @option opts [DateTime] :shipped_before Get Shipment Details by passing Shipped Date Before. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
32
|
+
# @option opts [DateTime] :shipped_after Get Shipment Details by passing Shipped Date After. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
33
|
+
# @option opts [DateTime] :estimated_delivery_before Get Shipment Details by passing Estimated Delivery Date Before. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
34
|
+
# @option opts [DateTime] :estimated_delivery_after Get Shipment Details by passing Estimated Delivery Date Before. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
35
|
+
# @option opts [DateTime] :shipment_delivery_before Get Shipment Details by passing Shipment Delivery Date Before. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
36
|
+
# @option opts [DateTime] :shipment_delivery_after Get Shipment Details by passing Shipment Delivery Date After. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
37
|
+
# @option opts [DateTime] :requested_pick_up_before Get Shipment Details by passing Before Requested pickup date. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
38
|
+
# @option opts [DateTime] :requested_pick_up_after Get Shipment Details by passing After Requested pickup date. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
39
|
+
# @option opts [DateTime] :scheduled_pick_up_before Get Shipment Details by passing Before scheduled pickup date. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
40
|
+
# @option opts [DateTime] :scheduled_pick_up_after Get Shipment Details by passing After Scheduled pickup date. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
41
|
+
# @option opts [String] :current_shipment_status Get Shipment Details by passing Current shipment status.
|
|
42
|
+
# @option opts [String] :vendor_shipment_identifier Get Shipment Details by passing Vendor Shipment ID
|
|
43
|
+
# @option opts [String] :buyer_reference_number Get Shipment Details by passing buyer Reference ID
|
|
44
|
+
# @option opts [String] :buyer_warehouse_code Get Shipping Details based on buyer warehouse code. This value should be same as 'shipToParty.partyId' in the Shipment.
|
|
45
|
+
# @option opts [String] :seller_warehouse_code Get Shipping Details based on vendor warehouse code. This value should be same as 'sellingParty.partyId' in the Shipment.
|
|
46
|
+
# @return [GetShipmentDetailsResponse]
|
|
47
|
+
def get_shipment_details(opts = {})
|
|
48
|
+
data = get_shipment_details_with_http_info(opts)
|
|
49
|
+
return data
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# GetShipmentDetails
|
|
53
|
+
# 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. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
54
|
+
# @param [Hash] opts the optional parameters
|
|
55
|
+
# @option opts [Integer] :limit The limit to the number of records returned. Default value is 50 records.
|
|
56
|
+
# @option opts [String] :sort_order Sort in ascending or descending order by purchase order creation date.
|
|
57
|
+
# @option opts [String] :next_token Used for pagination when there are more shipments than the specified result size limit.
|
|
58
|
+
# @option opts [DateTime] :created_after Get Shipment Details that became available after this timestamp will be included in the result. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
59
|
+
# @option opts [DateTime] :created_before Get Shipment Details that became available before this timestamp will be included in the result. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
60
|
+
# @option opts [DateTime] :shipment_confirmed_before Get Shipment Details by passing Shipment confirmed create Date Before. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
61
|
+
# @option opts [DateTime] :shipment_confirmed_after Get Shipment Details by passing Shipment confirmed create Date After. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
62
|
+
# @option opts [DateTime] :package_label_created_before Get Shipment Details by passing Package label create Date by buyer. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
63
|
+
# @option opts [DateTime] :package_label_created_after Get Shipment Details by passing Package label create Date After by buyer. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
64
|
+
# @option opts [DateTime] :shipped_before Get Shipment Details by passing Shipped Date Before. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
65
|
+
# @option opts [DateTime] :shipped_after Get Shipment Details by passing Shipped Date After. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
66
|
+
# @option opts [DateTime] :estimated_delivery_before Get Shipment Details by passing Estimated Delivery Date Before. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
67
|
+
# @option opts [DateTime] :estimated_delivery_after Get Shipment Details by passing Estimated Delivery Date Before. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
68
|
+
# @option opts [DateTime] :shipment_delivery_before Get Shipment Details by passing Shipment Delivery Date Before. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
69
|
+
# @option opts [DateTime] :shipment_delivery_after Get Shipment Details by passing Shipment Delivery Date After. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
70
|
+
# @option opts [DateTime] :requested_pick_up_before Get Shipment Details by passing Before Requested pickup date. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
71
|
+
# @option opts [DateTime] :requested_pick_up_after Get Shipment Details by passing After Requested pickup date. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
72
|
+
# @option opts [DateTime] :scheduled_pick_up_before Get Shipment Details by passing Before scheduled pickup date. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
73
|
+
# @option opts [DateTime] :scheduled_pick_up_after Get Shipment Details by passing After Scheduled pickup date. Must be in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.
|
|
74
|
+
# @option opts [String] :current_shipment_status Get Shipment Details by passing Current shipment status.
|
|
75
|
+
# @option opts [String] :vendor_shipment_identifier Get Shipment Details by passing Vendor Shipment ID
|
|
76
|
+
# @option opts [String] :buyer_reference_number Get Shipment Details by passing buyer Reference ID
|
|
77
|
+
# @option opts [String] :buyer_warehouse_code Get Shipping Details based on buyer warehouse code. This value should be same as 'shipToParty.partyId' in the Shipment.
|
|
78
|
+
# @option opts [String] :seller_warehouse_code Get Shipping Details based on vendor warehouse code. This value should be same as 'sellingParty.partyId' in the Shipment.
|
|
79
|
+
# @return [Array<(GetShipmentDetailsResponse)>] GetShipmentDetailsResponse data, response status code and response headers
|
|
80
|
+
def get_shipment_details_with_http_info(opts = {})
|
|
81
|
+
if @api_client.config.debugging
|
|
82
|
+
@api_client.config.logger.debug 'Calling API: VendorShippingApi.get_shipment_details ...'
|
|
83
|
+
end
|
|
84
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !['ASC', 'DESC'].include?(opts[:'sort_order'])
|
|
85
|
+
fail ArgumentError, 'invalid value for "sort_order", must be one of ASC, DESC'
|
|
86
|
+
end
|
|
87
|
+
# resource path
|
|
88
|
+
local_var_path = '/vendor/shipping/v1/shipments'
|
|
89
|
+
|
|
90
|
+
# query parameters
|
|
91
|
+
query_params = opts[:query_params] || {}
|
|
92
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
93
|
+
query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
94
|
+
query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
|
|
95
|
+
query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
|
96
|
+
query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
|
|
97
|
+
query_params[:'shipmentConfirmedBefore'] = opts[:'shipment_confirmed_before'] if !opts[:'shipment_confirmed_before'].nil?
|
|
98
|
+
query_params[:'shipmentConfirmedAfter'] = opts[:'shipment_confirmed_after'] if !opts[:'shipment_confirmed_after'].nil?
|
|
99
|
+
query_params[:'packageLabelCreatedBefore'] = opts[:'package_label_created_before'] if !opts[:'package_label_created_before'].nil?
|
|
100
|
+
query_params[:'packageLabelCreatedAfter'] = opts[:'package_label_created_after'] if !opts[:'package_label_created_after'].nil?
|
|
101
|
+
query_params[:'shippedBefore'] = opts[:'shipped_before'] if !opts[:'shipped_before'].nil?
|
|
102
|
+
query_params[:'shippedAfter'] = opts[:'shipped_after'] if !opts[:'shipped_after'].nil?
|
|
103
|
+
query_params[:'estimatedDeliveryBefore'] = opts[:'estimated_delivery_before'] if !opts[:'estimated_delivery_before'].nil?
|
|
104
|
+
query_params[:'estimatedDeliveryAfter'] = opts[:'estimated_delivery_after'] if !opts[:'estimated_delivery_after'].nil?
|
|
105
|
+
query_params[:'shipmentDeliveryBefore'] = opts[:'shipment_delivery_before'] if !opts[:'shipment_delivery_before'].nil?
|
|
106
|
+
query_params[:'shipmentDeliveryAfter'] = opts[:'shipment_delivery_after'] if !opts[:'shipment_delivery_after'].nil?
|
|
107
|
+
query_params[:'requestedPickUpBefore'] = opts[:'requested_pick_up_before'] if !opts[:'requested_pick_up_before'].nil?
|
|
108
|
+
query_params[:'requestedPickUpAfter'] = opts[:'requested_pick_up_after'] if !opts[:'requested_pick_up_after'].nil?
|
|
109
|
+
query_params[:'scheduledPickUpBefore'] = opts[:'scheduled_pick_up_before'] if !opts[:'scheduled_pick_up_before'].nil?
|
|
110
|
+
query_params[:'scheduledPickUpAfter'] = opts[:'scheduled_pick_up_after'] if !opts[:'scheduled_pick_up_after'].nil?
|
|
111
|
+
query_params[:'currentShipmentStatus'] = opts[:'current_shipment_status'] if !opts[:'current_shipment_status'].nil?
|
|
112
|
+
query_params[:'vendorShipmentIdentifier'] = opts[:'vendor_shipment_identifier'] if !opts[:'vendor_shipment_identifier'].nil?
|
|
113
|
+
query_params[:'buyerReferenceNumber'] = opts[:'buyer_reference_number'] if !opts[:'buyer_reference_number'].nil?
|
|
114
|
+
query_params[:'buyerWarehouseCode'] = opts[:'buyer_warehouse_code'] if !opts[:'buyer_warehouse_code'].nil?
|
|
115
|
+
query_params[:'sellerWarehouseCode'] = opts[:'seller_warehouse_code'] if !opts[:'seller_warehouse_code'].nil?
|
|
116
|
+
|
|
117
|
+
# header parameters
|
|
118
|
+
header_params = opts[:header_params] || {}
|
|
119
|
+
# HTTP header 'Accept' (if needed)
|
|
120
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
121
|
+
|
|
122
|
+
# form parameters
|
|
123
|
+
form_params = opts[:form_params] || {}
|
|
124
|
+
|
|
125
|
+
# http body (model)
|
|
126
|
+
post_body = opts[:body]
|
|
127
|
+
|
|
128
|
+
return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
|
|
129
|
+
|
|
130
|
+
auth_names = opts[:auth_names] || []
|
|
131
|
+
data = @api_client.call_api(:GET, local_var_path,
|
|
132
|
+
:header_params => header_params,
|
|
133
|
+
:query_params => query_params,
|
|
134
|
+
:form_params => form_params,
|
|
135
|
+
:body => post_body,
|
|
136
|
+
:auth_names => auth_names,
|
|
137
|
+
:return_type => return_type)
|
|
138
|
+
|
|
139
|
+
if @api_client.config.debugging
|
|
140
|
+
@api_client.config.logger.debug "API called: VendorShippingApi#get_shipment_details\nData: #{data.inspect}"
|
|
141
|
+
end
|
|
142
|
+
return data
|
|
143
|
+
end
|
|
144
|
+
# Returns small parcel shipment labels based on the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
145
|
+
# @param [Hash] opts the optional parameters
|
|
146
|
+
# @option opts [Integer] :limit The limit to the number of records returned. Default value is 50 records.
|
|
147
|
+
# @option opts [String] :sort_order Sort the list by shipment label creation date in ascending or descending order.
|
|
148
|
+
# @option opts [String] :next_token A token that is used to retrieve the next page of results. The response includes `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.
|
|
149
|
+
# @option opts [DateTime] :label_created_after Shipment labels created after this time will be included in the result. This field must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format.
|
|
150
|
+
# @option opts [DateTime] :label_created_before Shipment labels created before this time will be included in the result. This field must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format.
|
|
151
|
+
# @option opts [String] :buyer_reference_number Get Shipment labels by passing buyer reference number.
|
|
152
|
+
# @option opts [String] :vendor_shipment_identifier Get Shipment labels by passing vendor shipment identifier.
|
|
153
|
+
# @option opts [String] :seller_warehouse_code Get Shipping labels based on vendor warehouse code. This value must be same as the `sellingParty.partyId` in the shipment.
|
|
154
|
+
# @return [GetShipmentLabels]
|
|
155
|
+
def get_shipment_labels(opts = {})
|
|
156
|
+
data = get_shipment_labels_with_http_info(opts)
|
|
157
|
+
return data
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Returns small parcel shipment labels based on the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
161
|
+
# @param [Hash] opts the optional parameters
|
|
162
|
+
# @option opts [Integer] :limit The limit to the number of records returned. Default value is 50 records.
|
|
163
|
+
# @option opts [String] :sort_order Sort the list by shipment label creation date in ascending or descending order.
|
|
164
|
+
# @option opts [String] :next_token A token that is used to retrieve the next page of results. The response includes `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.
|
|
165
|
+
# @option opts [DateTime] :label_created_after Shipment labels created after this time will be included in the result. This field must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format.
|
|
166
|
+
# @option opts [DateTime] :label_created_before Shipment labels created before this time will be included in the result. This field must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format.
|
|
167
|
+
# @option opts [String] :buyer_reference_number Get Shipment labels by passing buyer reference number.
|
|
168
|
+
# @option opts [String] :vendor_shipment_identifier Get Shipment labels by passing vendor shipment identifier.
|
|
169
|
+
# @option opts [String] :seller_warehouse_code Get Shipping labels based on vendor warehouse code. This value must be same as the `sellingParty.partyId` in the shipment.
|
|
170
|
+
# @return [Array<(GetShipmentLabels)>] GetShipmentLabels data, response status code and response headers
|
|
171
|
+
def get_shipment_labels_with_http_info(opts = {})
|
|
172
|
+
if @api_client.config.debugging
|
|
173
|
+
@api_client.config.logger.debug 'Calling API: VendorShippingApi.get_shipment_labels ...'
|
|
174
|
+
end
|
|
175
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !['ASC', 'DESC'].include?(opts[:'sort_order'])
|
|
176
|
+
fail ArgumentError, 'invalid value for "sort_order", must be one of ASC, DESC'
|
|
177
|
+
end
|
|
178
|
+
# resource path
|
|
179
|
+
local_var_path = '/vendor/shipping/v1/transportLabels'
|
|
180
|
+
|
|
181
|
+
# query parameters
|
|
182
|
+
query_params = opts[:query_params] || {}
|
|
183
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
184
|
+
query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
185
|
+
query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
|
|
186
|
+
query_params[:'labelCreatedAfter'] = opts[:'label_created_after'] if !opts[:'label_created_after'].nil?
|
|
187
|
+
query_params[:'labelCreatedBefore'] = opts[:'label_created_before'] if !opts[:'label_created_before'].nil?
|
|
188
|
+
query_params[:'buyerReferenceNumber'] = opts[:'buyer_reference_number'] if !opts[:'buyer_reference_number'].nil?
|
|
189
|
+
query_params[:'vendorShipmentIdentifier'] = opts[:'vendor_shipment_identifier'] if !opts[:'vendor_shipment_identifier'].nil?
|
|
190
|
+
query_params[:'sellerWarehouseCode'] = opts[:'seller_warehouse_code'] if !opts[:'seller_warehouse_code'].nil?
|
|
191
|
+
|
|
192
|
+
# header parameters
|
|
193
|
+
header_params = opts[:header_params] || {}
|
|
194
|
+
# HTTP header 'Accept' (if needed)
|
|
195
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
196
|
+
|
|
197
|
+
# form parameters
|
|
198
|
+
form_params = opts[:form_params] || {}
|
|
199
|
+
|
|
200
|
+
# http body (model)
|
|
201
|
+
post_body = opts[:body]
|
|
202
|
+
|
|
203
|
+
return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
|
|
204
|
+
|
|
205
|
+
auth_names = opts[:auth_names] || []
|
|
206
|
+
data = @api_client.call_api(:GET, local_var_path,
|
|
207
|
+
:header_params => header_params,
|
|
208
|
+
:query_params => query_params,
|
|
209
|
+
:form_params => form_params,
|
|
210
|
+
:body => post_body,
|
|
211
|
+
:auth_names => auth_names,
|
|
212
|
+
:return_type => return_type)
|
|
213
|
+
|
|
214
|
+
if @api_client.config.debugging
|
|
215
|
+
@api_client.config.logger.debug "API called: VendorShippingApi#get_shipment_labels\nData: #{data.inspect}"
|
|
216
|
+
end
|
|
217
|
+
return data
|
|
218
|
+
end
|
|
219
|
+
# SubmitShipmentConfirmations
|
|
220
|
+
# Submits one or more shipment confirmations for vendor orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
221
|
+
# @param body A request to submit shipment confirmation.
|
|
222
|
+
# @param [Hash] opts the optional parameters
|
|
223
|
+
# @return [SubmitShipmentConfirmationsResponse]
|
|
224
|
+
def submit_shipment_confirmations(body, opts = {})
|
|
225
|
+
data = submit_shipment_confirmations_with_http_info(body, opts)
|
|
226
|
+
return data
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# SubmitShipmentConfirmations
|
|
230
|
+
# Submits one or more shipment confirmations for vendor orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
231
|
+
# @param body A request to submit shipment confirmation.
|
|
232
|
+
# @param [Hash] opts the optional parameters
|
|
233
|
+
# @return [Array<(SubmitShipmentConfirmationsResponse)>] SubmitShipmentConfirmationsResponse data, response status code and response headers
|
|
234
|
+
def submit_shipment_confirmations_with_http_info(body, opts = {})
|
|
235
|
+
if @api_client.config.debugging
|
|
236
|
+
@api_client.config.logger.debug 'Calling API: VendorShippingApi.submit_shipment_confirmations ...'
|
|
237
|
+
end
|
|
238
|
+
# verify the required parameter 'body' is set
|
|
239
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
240
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling VendorShippingApi.submit_shipment_confirmations"
|
|
241
|
+
end
|
|
242
|
+
# resource path
|
|
243
|
+
local_var_path = '/vendor/shipping/v1/shipmentConfirmations'
|
|
244
|
+
|
|
245
|
+
# query parameters
|
|
246
|
+
query_params = opts[:query_params] || {}
|
|
247
|
+
|
|
248
|
+
# header parameters
|
|
249
|
+
header_params = opts[:header_params] || {}
|
|
250
|
+
# HTTP header 'Accept' (if needed)
|
|
251
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
252
|
+
# HTTP header 'Content-Type'
|
|
253
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
254
|
+
|
|
255
|
+
# form parameters
|
|
256
|
+
form_params = opts[:form_params] || {}
|
|
257
|
+
|
|
258
|
+
# http body (model)
|
|
259
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
260
|
+
|
|
261
|
+
return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
|
|
262
|
+
|
|
263
|
+
auth_names = opts[:auth_names] || []
|
|
264
|
+
data = @api_client.call_api(:POST, local_var_path,
|
|
265
|
+
:header_params => header_params,
|
|
266
|
+
:query_params => query_params,
|
|
267
|
+
:form_params => form_params,
|
|
268
|
+
:body => post_body,
|
|
269
|
+
:auth_names => auth_names,
|
|
270
|
+
:return_type => return_type)
|
|
271
|
+
|
|
272
|
+
if @api_client.config.debugging
|
|
273
|
+
@api_client.config.logger.debug "API called: VendorShippingApi#submit_shipment_confirmations\nData: #{data.inspect}"
|
|
274
|
+
end
|
|
275
|
+
return data
|
|
276
|
+
end
|
|
277
|
+
# SubmitShipments
|
|
278
|
+
# Submits one or more shipment request for vendor Orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
279
|
+
# @param body A request to submit shipment request.
|
|
280
|
+
# @param [Hash] opts the optional parameters
|
|
281
|
+
# @return [SubmitShipmentConfirmationsResponse]
|
|
282
|
+
def submit_shipments(body, opts = {})
|
|
283
|
+
data = submit_shipments_with_http_info(body, opts)
|
|
284
|
+
return data
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# SubmitShipments
|
|
288
|
+
# Submits one or more shipment request for vendor Orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
289
|
+
# @param body A request to submit shipment request.
|
|
290
|
+
# @param [Hash] opts the optional parameters
|
|
291
|
+
# @return [Array<(SubmitShipmentConfirmationsResponse)>] SubmitShipmentConfirmationsResponse data, response status code and response headers
|
|
292
|
+
def submit_shipments_with_http_info(body, opts = {})
|
|
293
|
+
if @api_client.config.debugging
|
|
294
|
+
@api_client.config.logger.debug 'Calling API: VendorShippingApi.submit_shipments ...'
|
|
295
|
+
end
|
|
296
|
+
# verify the required parameter 'body' is set
|
|
297
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
298
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling VendorShippingApi.submit_shipments"
|
|
299
|
+
end
|
|
300
|
+
# resource path
|
|
301
|
+
local_var_path = '/vendor/shipping/v1/shipments'
|
|
302
|
+
|
|
303
|
+
# query parameters
|
|
304
|
+
query_params = opts[:query_params] || {}
|
|
305
|
+
|
|
306
|
+
# header parameters
|
|
307
|
+
header_params = opts[:header_params] || {}
|
|
308
|
+
# HTTP header 'Accept' (if needed)
|
|
309
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
310
|
+
# HTTP header 'Content-Type'
|
|
311
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
312
|
+
|
|
313
|
+
# form parameters
|
|
314
|
+
form_params = opts[:form_params] || {}
|
|
315
|
+
|
|
316
|
+
# http body (model)
|
|
317
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
318
|
+
|
|
319
|
+
return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
|
|
320
|
+
|
|
321
|
+
auth_names = opts[:auth_names] || []
|
|
322
|
+
data = @api_client.call_api(:POST, local_var_path,
|
|
323
|
+
:header_params => header_params,
|
|
324
|
+
:query_params => query_params,
|
|
325
|
+
:form_params => form_params,
|
|
326
|
+
:body => post_body,
|
|
327
|
+
:auth_names => auth_names,
|
|
328
|
+
:return_type => return_type)
|
|
329
|
+
|
|
330
|
+
if @api_client.config.debugging
|
|
331
|
+
@api_client.config.logger.debug "API called: VendorShippingApi#submit_shipments\nData: #{data.inspect}"
|
|
332
|
+
end
|
|
333
|
+
return data
|
|
334
|
+
end
|
|
335
|
+
end
|
|
336
|
+
end
|
|
337
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Selling Partner API for Retail Procurement Shipments
|
|
3
|
+
|
|
4
|
+
#The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: v1
|
|
7
|
+
|
|
8
|
+
Generated by: lib/generator (bundle exec rake generate)
|
|
9
|
+
=end
|
|
10
|
+
|
|
11
|
+
# APIs
|
|
12
|
+
require_relative './sp_vendors_shipments/api/vendor_shipping_api'
|