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,367 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Selling Partner API for Feeds
|
|
3
|
+
|
|
4
|
+
#The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 2021-06-30
|
|
7
|
+
|
|
8
|
+
Generated by: lib/generator (bundle exec rake generate)
|
|
9
|
+
=end
|
|
10
|
+
|
|
11
|
+
module AmazonSpClients
|
|
12
|
+
module SpFeeds2021
|
|
13
|
+
class FeedsApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(session)
|
|
17
|
+
@api_client = AmazonSpClients::ApiClient.new(session)
|
|
18
|
+
end
|
|
19
|
+
# Cancels the feed that you specify. Only feeds with `processingStatus=IN_QUEUE` can be cancelled. Cancelled feeds are returned in subsequent calls to the [`getFeed`](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference#getfeed) and [`getFeeds`](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference#getfeeds) operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
|
|
20
|
+
# @param feed_id The identifier for the feed. This identifier is unique only in combination with a seller ID.
|
|
21
|
+
# @param [Hash] opts the optional parameters
|
|
22
|
+
# @return [nil]
|
|
23
|
+
def cancel_feed(feed_id, opts = {})
|
|
24
|
+
cancel_feed_with_http_info(feed_id, opts)
|
|
25
|
+
return nil
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Cancels the feed that you specify. Only feeds with `processingStatus=IN_QUEUE` can be cancelled. Cancelled feeds are returned in subsequent calls to the [`getFeed`](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference#getfeed) and [`getFeeds`](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference#getfeeds) operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
|
|
29
|
+
# @param feed_id The identifier for the feed. This identifier is unique only in combination with a seller ID.
|
|
30
|
+
# @param [Hash] opts the optional parameters
|
|
31
|
+
# @return [Array<(nil)>] nil, response status code and response headers
|
|
32
|
+
def cancel_feed_with_http_info(feed_id, opts = {})
|
|
33
|
+
if @api_client.config.debugging
|
|
34
|
+
@api_client.config.logger.debug 'Calling API: FeedsApi.cancel_feed ...'
|
|
35
|
+
end
|
|
36
|
+
# verify the required parameter 'feed_id' is set
|
|
37
|
+
if @api_client.config.client_side_validation && feed_id.nil?
|
|
38
|
+
fail ArgumentError, "Missing the required parameter 'feed_id' when calling FeedsApi.cancel_feed"
|
|
39
|
+
end
|
|
40
|
+
# resource path
|
|
41
|
+
local_var_path = '/feeds/2021-06-30/feeds/{feedId}'.sub('{' + 'feedId' + '}', feed_id.to_s)
|
|
42
|
+
|
|
43
|
+
# query parameters
|
|
44
|
+
query_params = opts[:query_params] || {}
|
|
45
|
+
|
|
46
|
+
# header parameters
|
|
47
|
+
header_params = opts[:header_params] || {}
|
|
48
|
+
# HTTP header 'Accept' (if needed)
|
|
49
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
50
|
+
|
|
51
|
+
# form parameters
|
|
52
|
+
form_params = opts[:form_params] || {}
|
|
53
|
+
|
|
54
|
+
# http body (model)
|
|
55
|
+
post_body = opts[:body]
|
|
56
|
+
|
|
57
|
+
return_type = opts[:return_type]
|
|
58
|
+
|
|
59
|
+
auth_names = opts[:auth_names] || []
|
|
60
|
+
data = @api_client.call_api(:DELETE, local_var_path,
|
|
61
|
+
:header_params => header_params,
|
|
62
|
+
:query_params => query_params,
|
|
63
|
+
:form_params => form_params,
|
|
64
|
+
:body => post_body,
|
|
65
|
+
:auth_names => auth_names,
|
|
66
|
+
:return_type => return_type)
|
|
67
|
+
|
|
68
|
+
if @api_client.config.debugging
|
|
69
|
+
@api_client.config.logger.debug "API called: FeedsApi#cancel_feed\nData: #{data.inspect}"
|
|
70
|
+
end
|
|
71
|
+
return data
|
|
72
|
+
end
|
|
73
|
+
# Creates a feed. Upload the contents of the feed document before calling this operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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). The rate limit for the [`JSON_LISTINGS_FEED`](https://developer-docs.amazon.com/sp-api/docs/listings-feed-type-values#listings-feed) feed type differs from the rate limit for the [`createFeed`](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference#post-feeds2021-06-30feeds) operation. For more information, refer to the [Building Listings Management Workflows Guide](https://developer-docs.amazon.com/sp-api/docs/building-listings-management-workflows-guide#should-i-submit-in-bulk-using-the-json_listings_feed-or-individually-with-the-listings-items-api).
|
|
74
|
+
# @param body Information required to create the feed.
|
|
75
|
+
# @param [Hash] opts the optional parameters
|
|
76
|
+
# @return [CreateFeedResponse]
|
|
77
|
+
def create_feed(body, opts = {})
|
|
78
|
+
data = create_feed_with_http_info(body, opts)
|
|
79
|
+
return data
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Creates a feed. Upload the contents of the feed document before calling this operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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). The rate limit for the [`JSON_LISTINGS_FEED`](https://developer-docs.amazon.com/sp-api/docs/listings-feed-type-values#listings-feed) feed type differs from the rate limit for the [`createFeed`](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference#post-feeds2021-06-30feeds) operation. For more information, refer to the [Building Listings Management Workflows Guide](https://developer-docs.amazon.com/sp-api/docs/building-listings-management-workflows-guide#should-i-submit-in-bulk-using-the-json_listings_feed-or-individually-with-the-listings-items-api).
|
|
83
|
+
# @param body Information required to create the feed.
|
|
84
|
+
# @param [Hash] opts the optional parameters
|
|
85
|
+
# @return [Array<(CreateFeedResponse)>] CreateFeedResponse data, response status code and response headers
|
|
86
|
+
def create_feed_with_http_info(body, opts = {})
|
|
87
|
+
if @api_client.config.debugging
|
|
88
|
+
@api_client.config.logger.debug 'Calling API: FeedsApi.create_feed ...'
|
|
89
|
+
end
|
|
90
|
+
# verify the required parameter 'body' is set
|
|
91
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
92
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling FeedsApi.create_feed"
|
|
93
|
+
end
|
|
94
|
+
# resource path
|
|
95
|
+
local_var_path = '/feeds/2021-06-30/feeds'
|
|
96
|
+
|
|
97
|
+
# query parameters
|
|
98
|
+
query_params = opts[:query_params] || {}
|
|
99
|
+
|
|
100
|
+
# header parameters
|
|
101
|
+
header_params = opts[:header_params] || {}
|
|
102
|
+
# HTTP header 'Accept' (if needed)
|
|
103
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
104
|
+
# HTTP header 'Content-Type'
|
|
105
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
106
|
+
|
|
107
|
+
# form parameters
|
|
108
|
+
form_params = opts[:form_params] || {}
|
|
109
|
+
|
|
110
|
+
# http body (model)
|
|
111
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
112
|
+
|
|
113
|
+
return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
|
|
114
|
+
|
|
115
|
+
auth_names = opts[:auth_names] || []
|
|
116
|
+
data = @api_client.call_api(:POST, local_var_path,
|
|
117
|
+
:header_params => header_params,
|
|
118
|
+
:query_params => query_params,
|
|
119
|
+
:form_params => form_params,
|
|
120
|
+
:body => post_body,
|
|
121
|
+
:auth_names => auth_names,
|
|
122
|
+
:return_type => return_type)
|
|
123
|
+
|
|
124
|
+
if @api_client.config.debugging
|
|
125
|
+
@api_client.config.logger.debug "API called: FeedsApi#create_feed\nData: #{data.inspect}"
|
|
126
|
+
end
|
|
127
|
+
return data
|
|
128
|
+
end
|
|
129
|
+
# Creates a feed document for the feed type that you specify. This operation returns a presigned URL for uploading the feed document contents. It also returns a `feedDocumentId` value that you can pass in with a subsequent call to the [`createFeed`](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference#createfeed) operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
|
|
130
|
+
# @param body Specifies the content type for the createFeedDocument operation.
|
|
131
|
+
# @param [Hash] opts the optional parameters
|
|
132
|
+
# @return [CreateFeedDocumentResponse]
|
|
133
|
+
def create_feed_document(body, opts = {})
|
|
134
|
+
data = create_feed_document_with_http_info(body, opts)
|
|
135
|
+
return data
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Creates a feed document for the feed type that you specify. This operation returns a presigned URL for uploading the feed document contents. It also returns a `feedDocumentId` value that you can pass in with a subsequent call to the [`createFeed`](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference#createfeed) operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
|
|
139
|
+
# @param body Specifies the content type for the createFeedDocument operation.
|
|
140
|
+
# @param [Hash] opts the optional parameters
|
|
141
|
+
# @return [Array<(CreateFeedDocumentResponse)>] CreateFeedDocumentResponse data, response status code and response headers
|
|
142
|
+
def create_feed_document_with_http_info(body, opts = {})
|
|
143
|
+
if @api_client.config.debugging
|
|
144
|
+
@api_client.config.logger.debug 'Calling API: FeedsApi.create_feed_document ...'
|
|
145
|
+
end
|
|
146
|
+
# verify the required parameter 'body' is set
|
|
147
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
148
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling FeedsApi.create_feed_document"
|
|
149
|
+
end
|
|
150
|
+
# resource path
|
|
151
|
+
local_var_path = '/feeds/2021-06-30/documents'
|
|
152
|
+
|
|
153
|
+
# query parameters
|
|
154
|
+
query_params = opts[:query_params] || {}
|
|
155
|
+
|
|
156
|
+
# header parameters
|
|
157
|
+
header_params = opts[:header_params] || {}
|
|
158
|
+
# HTTP header 'Accept' (if needed)
|
|
159
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
160
|
+
# HTTP header 'Content-Type'
|
|
161
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
162
|
+
|
|
163
|
+
# form parameters
|
|
164
|
+
form_params = opts[:form_params] || {}
|
|
165
|
+
|
|
166
|
+
# http body (model)
|
|
167
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
168
|
+
|
|
169
|
+
return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
|
|
170
|
+
|
|
171
|
+
auth_names = opts[:auth_names] || []
|
|
172
|
+
data = @api_client.call_api(:POST, local_var_path,
|
|
173
|
+
:header_params => header_params,
|
|
174
|
+
:query_params => query_params,
|
|
175
|
+
:form_params => form_params,
|
|
176
|
+
:body => post_body,
|
|
177
|
+
:auth_names => auth_names,
|
|
178
|
+
:return_type => return_type)
|
|
179
|
+
|
|
180
|
+
if @api_client.config.debugging
|
|
181
|
+
@api_client.config.logger.debug "API called: FeedsApi#create_feed_document\nData: #{data.inspect}"
|
|
182
|
+
end
|
|
183
|
+
return data
|
|
184
|
+
end
|
|
185
|
+
# Returns feed details (including the `resultDocumentId`, if available) for the feed that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
|
|
186
|
+
# @param feed_id The identifier for the feed. This identifier is unique only in combination with a seller ID.
|
|
187
|
+
# @param [Hash] opts the optional parameters
|
|
188
|
+
# @return [Feed]
|
|
189
|
+
def get_feed(feed_id, opts = {})
|
|
190
|
+
data = get_feed_with_http_info(feed_id, opts)
|
|
191
|
+
return data
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Returns feed details (including the `resultDocumentId`, if available) for the feed that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
|
|
195
|
+
# @param feed_id The identifier for the feed. This identifier is unique only in combination with a seller ID.
|
|
196
|
+
# @param [Hash] opts the optional parameters
|
|
197
|
+
# @return [Array<(Feed)>] Feed data, response status code and response headers
|
|
198
|
+
def get_feed_with_http_info(feed_id, opts = {})
|
|
199
|
+
if @api_client.config.debugging
|
|
200
|
+
@api_client.config.logger.debug 'Calling API: FeedsApi.get_feed ...'
|
|
201
|
+
end
|
|
202
|
+
# verify the required parameter 'feed_id' is set
|
|
203
|
+
if @api_client.config.client_side_validation && feed_id.nil?
|
|
204
|
+
fail ArgumentError, "Missing the required parameter 'feed_id' when calling FeedsApi.get_feed"
|
|
205
|
+
end
|
|
206
|
+
# resource path
|
|
207
|
+
local_var_path = '/feeds/2021-06-30/feeds/{feedId}'.sub('{' + 'feedId' + '}', feed_id.to_s)
|
|
208
|
+
|
|
209
|
+
# query parameters
|
|
210
|
+
query_params = opts[:query_params] || {}
|
|
211
|
+
|
|
212
|
+
# header parameters
|
|
213
|
+
header_params = opts[:header_params] || {}
|
|
214
|
+
# HTTP header 'Accept' (if needed)
|
|
215
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
216
|
+
|
|
217
|
+
# form parameters
|
|
218
|
+
form_params = opts[:form_params] || {}
|
|
219
|
+
|
|
220
|
+
# http body (model)
|
|
221
|
+
post_body = opts[:body]
|
|
222
|
+
|
|
223
|
+
return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
|
|
224
|
+
|
|
225
|
+
auth_names = opts[:auth_names] || []
|
|
226
|
+
data = @api_client.call_api(:GET, local_var_path,
|
|
227
|
+
:header_params => header_params,
|
|
228
|
+
:query_params => query_params,
|
|
229
|
+
:form_params => form_params,
|
|
230
|
+
:body => post_body,
|
|
231
|
+
:auth_names => auth_names,
|
|
232
|
+
:return_type => return_type)
|
|
233
|
+
|
|
234
|
+
if @api_client.config.debugging
|
|
235
|
+
@api_client.config.logger.debug "API called: FeedsApi#get_feed\nData: #{data.inspect}"
|
|
236
|
+
end
|
|
237
|
+
return data
|
|
238
|
+
end
|
|
239
|
+
# Returns the information required for retrieving a feed document's contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
|
|
240
|
+
# @param feed_document_id The identifier of the feed document.
|
|
241
|
+
# @param [Hash] opts the optional parameters
|
|
242
|
+
# @return [FeedDocument]
|
|
243
|
+
def get_feed_document(feed_document_id, opts = {})
|
|
244
|
+
data = get_feed_document_with_http_info(feed_document_id, opts)
|
|
245
|
+
return data
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Returns the information required for retrieving a feed document's contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
|
|
249
|
+
# @param feed_document_id The identifier of the feed document.
|
|
250
|
+
# @param [Hash] opts the optional parameters
|
|
251
|
+
# @return [Array<(FeedDocument)>] FeedDocument data, response status code and response headers
|
|
252
|
+
def get_feed_document_with_http_info(feed_document_id, opts = {})
|
|
253
|
+
if @api_client.config.debugging
|
|
254
|
+
@api_client.config.logger.debug 'Calling API: FeedsApi.get_feed_document ...'
|
|
255
|
+
end
|
|
256
|
+
# verify the required parameter 'feed_document_id' is set
|
|
257
|
+
if @api_client.config.client_side_validation && feed_document_id.nil?
|
|
258
|
+
fail ArgumentError, "Missing the required parameter 'feed_document_id' when calling FeedsApi.get_feed_document"
|
|
259
|
+
end
|
|
260
|
+
# resource path
|
|
261
|
+
local_var_path = '/feeds/2021-06-30/documents/{feedDocumentId}'.sub('{' + 'feedDocumentId' + '}', feed_document_id.to_s)
|
|
262
|
+
|
|
263
|
+
# query parameters
|
|
264
|
+
query_params = opts[:query_params] || {}
|
|
265
|
+
|
|
266
|
+
# header parameters
|
|
267
|
+
header_params = opts[:header_params] || {}
|
|
268
|
+
# HTTP header 'Accept' (if needed)
|
|
269
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
270
|
+
|
|
271
|
+
# form parameters
|
|
272
|
+
form_params = opts[:form_params] || {}
|
|
273
|
+
|
|
274
|
+
# http body (model)
|
|
275
|
+
post_body = opts[:body]
|
|
276
|
+
|
|
277
|
+
return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
|
|
278
|
+
|
|
279
|
+
auth_names = opts[:auth_names] || []
|
|
280
|
+
data = @api_client.call_api(:GET, local_var_path,
|
|
281
|
+
:header_params => header_params,
|
|
282
|
+
:query_params => query_params,
|
|
283
|
+
:form_params => form_params,
|
|
284
|
+
:body => post_body,
|
|
285
|
+
:auth_names => auth_names,
|
|
286
|
+
:return_type => return_type)
|
|
287
|
+
|
|
288
|
+
if @api_client.config.debugging
|
|
289
|
+
@api_client.config.logger.debug "API called: FeedsApi#get_feed_document\nData: #{data.inspect}"
|
|
290
|
+
end
|
|
291
|
+
return data
|
|
292
|
+
end
|
|
293
|
+
# Returns feed details for the feeds that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
|
|
294
|
+
# @param [Hash] opts the optional parameters
|
|
295
|
+
# @option opts [Array<String>] :feed_types A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required.
|
|
296
|
+
# @option opts [Array<String>] :marketplace_ids A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify.
|
|
297
|
+
# @option opts [Integer] :page_size The maximum number of feeds to return in a single call. (default to 10)
|
|
298
|
+
# @option opts [Array<String>] :processing_statuses A list of processing statuses used to filter feeds.
|
|
299
|
+
# @option opts [DateTime] :created_since The earliest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is 90 days ago. Feeds are retained for a maximum of 90 days.
|
|
300
|
+
# @option opts [DateTime] :created_until The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
|
|
301
|
+
# @option opts [String] :next_token A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getFeeds operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail.
|
|
302
|
+
# @return [GetFeedsResponse]
|
|
303
|
+
def get_feeds(opts = {})
|
|
304
|
+
data = get_feeds_with_http_info(opts)
|
|
305
|
+
return data
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Returns feed details for the feeds that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
|
|
309
|
+
# @param [Hash] opts the optional parameters
|
|
310
|
+
# @option opts [Array<String>] :feed_types A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required.
|
|
311
|
+
# @option opts [Array<String>] :marketplace_ids A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify.
|
|
312
|
+
# @option opts [Integer] :page_size The maximum number of feeds to return in a single call.
|
|
313
|
+
# @option opts [Array<String>] :processing_statuses A list of processing statuses used to filter feeds.
|
|
314
|
+
# @option opts [DateTime] :created_since The earliest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is 90 days ago. Feeds are retained for a maximum of 90 days.
|
|
315
|
+
# @option opts [DateTime] :created_until The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
|
|
316
|
+
# @option opts [String] :next_token A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getFeeds operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail.
|
|
317
|
+
# @return [Array<(GetFeedsResponse)>] GetFeedsResponse data, response status code and response headers
|
|
318
|
+
def get_feeds_with_http_info(opts = {})
|
|
319
|
+
if @api_client.config.debugging
|
|
320
|
+
@api_client.config.logger.debug 'Calling API: FeedsApi.get_feeds ...'
|
|
321
|
+
end
|
|
322
|
+
if @api_client.config.client_side_validation && opts[:'processing_statuses'] && !opts[:'processing_statuses'].all? { |item| ['CANCELLED', 'DONE', 'FATAL', 'IN_PROGRESS', 'IN_QUEUE'].include?(item) }
|
|
323
|
+
fail ArgumentError, 'invalid value for "processing_statuses", must include one of CANCELLED, DONE, FATAL, IN_PROGRESS, IN_QUEUE'
|
|
324
|
+
end
|
|
325
|
+
# resource path
|
|
326
|
+
local_var_path = '/feeds/2021-06-30/feeds'
|
|
327
|
+
|
|
328
|
+
# query parameters
|
|
329
|
+
query_params = opts[:query_params] || {}
|
|
330
|
+
query_params[:'feedTypes'] = @api_client.build_collection_param(opts[:'feed_types'], :csv) if !opts[:'feed_types'].nil?
|
|
331
|
+
query_params[:'marketplaceIds'] = @api_client.build_collection_param(opts[:'marketplace_ids'], :csv) if !opts[:'marketplace_ids'].nil?
|
|
332
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
333
|
+
query_params[:'processingStatuses'] = @api_client.build_collection_param(opts[:'processing_statuses'], :csv) if !opts[:'processing_statuses'].nil?
|
|
334
|
+
query_params[:'createdSince'] = opts[:'created_since'] if !opts[:'created_since'].nil?
|
|
335
|
+
query_params[:'createdUntil'] = opts[:'created_until'] if !opts[:'created_until'].nil?
|
|
336
|
+
query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
|
|
337
|
+
|
|
338
|
+
# header parameters
|
|
339
|
+
header_params = opts[:header_params] || {}
|
|
340
|
+
# HTTP header 'Accept' (if needed)
|
|
341
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
342
|
+
|
|
343
|
+
# form parameters
|
|
344
|
+
form_params = opts[:form_params] || {}
|
|
345
|
+
|
|
346
|
+
# http body (model)
|
|
347
|
+
post_body = opts[:body]
|
|
348
|
+
|
|
349
|
+
return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
|
|
350
|
+
|
|
351
|
+
auth_names = opts[:auth_names] || []
|
|
352
|
+
data = @api_client.call_api(:GET, local_var_path,
|
|
353
|
+
:header_params => header_params,
|
|
354
|
+
:query_params => query_params,
|
|
355
|
+
:form_params => form_params,
|
|
356
|
+
:body => post_body,
|
|
357
|
+
:auth_names => auth_names,
|
|
358
|
+
:return_type => return_type)
|
|
359
|
+
|
|
360
|
+
if @api_client.config.debugging
|
|
361
|
+
@api_client.config.logger.debug "API called: FeedsApi#get_feeds\nData: #{data.inspect}"
|
|
362
|
+
end
|
|
363
|
+
return data
|
|
364
|
+
end
|
|
365
|
+
end
|
|
366
|
+
end
|
|
367
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Selling Partner API for Feeds
|
|
3
|
+
|
|
4
|
+
#The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 2021-06-30
|
|
7
|
+
|
|
8
|
+
Generated by: lib/generator (bundle exec rake generate)
|
|
9
|
+
=end
|
|
10
|
+
|
|
11
|
+
# APIs
|
|
12
|
+
require_relative './sp_feeds_2021/api/feeds_api'
|