Class: AmznSpApi::FeedsApiModel::FeedsApi
- Inherits:
-
Object
- Object
- AmznSpApi::FeedsApiModel::FeedsApi
- Defined in:
- lib/feeds_api_model/api/feeds_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#cancel_feed(feed_id, opts = {}) ⇒ nil
Cancels the feed that you specify.
-
#cancel_feed_with_http_info(feed_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Cancels the feed that you specify.
-
#create_feed(body, opts = {}) ⇒ CreateFeedResponse
Creates a feed.
-
#create_feed_document(body, opts = {}) ⇒ CreateFeedDocumentResponse
Creates a feed document for the feed type that you specify.
-
#create_feed_document_with_http_info(body, opts = {}) ⇒ Array<(CreateFeedDocumentResponse, Integer, Hash)>
Creates a feed document for the feed type that you specify.
-
#create_feed_with_http_info(body, opts = {}) ⇒ Array<(CreateFeedResponse, Integer, Hash)>
Creates a feed.
-
#get_feed(feed_id, opts = {}) ⇒ Feed
Returns feed details (including the resultDocumentId, if available) for the feed that you specify.
-
#get_feed_document(feed_document_id, opts = {}) ⇒ FeedDocument
Returns the information required for retrieving a feed document’s contents.
-
#get_feed_document_with_http_info(feed_document_id, opts = {}) ⇒ Array<(FeedDocument, Integer, Hash)>
Returns the information required for retrieving a feed document's contents.
-
#get_feed_with_http_info(feed_id, opts = {}) ⇒ Array<(Feed, Integer, Hash)>
Returns feed details (including the resultDocumentId, if available) for the feed that you specify.
-
#get_feeds(opts = {}) ⇒ GetFeedsResponse
Returns feed details for the feeds that match the filters that you specify.
-
#get_feeds_with_http_info(opts = {}) ⇒ Array<(GetFeedsResponse, Integer, Hash)>
Returns feed details for the feeds that match the filters that you specify.
-
#initialize(api_client = ApiClient.default) ⇒ FeedsApi
constructor
A new instance of FeedsApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
12 13 14 |
# File 'lib/feeds_api_model/api/feeds_api.rb', line 12 def api_client @api_client end |
Instance Method Details
#cancel_feed(feed_id, opts = {}) ⇒ nil
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 and 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 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](developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
22 23 24 25 |
# File 'lib/feeds_api_model/api/feeds_api.rb', line 22 def cancel_feed(feed_id, opts = {}) cancel_feed_with_http_info(feed_id, opts) nil end |
#cancel_feed_with_http_info(feed_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
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 and 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 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](developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/feeds_api_model/api/feeds_api.rb', line 31 def cancel_feed_with_http_info(feed_id, opts = {}) @api_client.config.logger.debug 'Calling API: FeedsApi.cancel_feed ...' if @api_client.config.debugging # verify the required parameter 'feed_id' is set raise ArgumentError, "Missing the required parameter 'feed_id' when calling FeedsApi.cancel_feed" if @api_client.config.client_side_validation && feed_id.nil? # resource path local_var_path = '/feeds/2021-06-30/feeds/{feedId}'.sub('{' + 'feedId' + '}', feed_id.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type) @api_client.config.logger.debug "API called: FeedsApi#cancel_feed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging [data, status_code, headers] end |
#create_feed(body, opts = {}) ⇒ CreateFeedResponse
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 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](developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
72 73 74 75 |
# File 'lib/feeds_api_model/api/feeds_api.rb', line 72 def create_feed(body, opts = {}) data, _status_code, _headers = create_feed_with_http_info(body, opts) data end |
#create_feed_document(body, opts = {}) ⇒ CreateFeedDocumentResponse
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 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 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](developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
124 125 126 127 |
# File 'lib/feeds_api_model/api/feeds_api.rb', line 124 def create_feed_document(body, opts = {}) data, _status_code, _headers = create_feed_document_with_http_info(body, opts) data end |
#create_feed_document_with_http_info(body, opts = {}) ⇒ Array<(CreateFeedDocumentResponse, Integer, Hash)>
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 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 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](developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/feeds_api_model/api/feeds_api.rb', line 133 def create_feed_document_with_http_info(body, opts = {}) @api_client.config.logger.debug 'Calling API: FeedsApi.create_feed_document ...' if @api_client.config.debugging # verify the required parameter 'body' is set raise ArgumentError, "Missing the required parameter 'body' when calling FeedsApi.create_feed_document" if @api_client.config.client_side_validation && body.nil? # resource path local_var_path = '/feeds/2021-06-30/documents' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'CreateFeedDocumentResponse' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type) @api_client.config.logger.debug "API called: FeedsApi#create_feed_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging [data, status_code, headers] end |
#create_feed_with_http_info(body, opts = {}) ⇒ Array<(CreateFeedResponse, Integer, Hash)>
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 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](developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/feeds_api_model/api/feeds_api.rb', line 81 def create_feed_with_http_info(body, opts = {}) @api_client.config.logger.debug 'Calling API: FeedsApi.create_feed ...' if @api_client.config.debugging # verify the required parameter 'body' is set raise ArgumentError, "Missing the required parameter 'body' when calling FeedsApi.create_feed" if @api_client.config.client_side_validation && body.nil? # resource path local_var_path = '/feeds/2021-06-30/feeds' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'CreateFeedResponse' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type) @api_client.config.logger.debug "API called: FeedsApi#create_feed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging [data, status_code, headers] end |
#get_feed(feed_id, opts = {}) ⇒ Feed
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 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](developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
176 177 178 179 |
# File 'lib/feeds_api_model/api/feeds_api.rb', line 176 def get_feed(feed_id, opts = {}) data, _status_code, _headers = get_feed_with_http_info(feed_id, opts) data end |
#get_feed_document(feed_document_id, opts = {}) ⇒ FeedDocument
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 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](developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
226 227 228 229 |
# File 'lib/feeds_api_model/api/feeds_api.rb', line 226 def get_feed_document(feed_document_id, opts = {}) data, _status_code, _headers = get_feed_document_with_http_info(feed_document_id, opts) data end |
#get_feed_document_with_http_info(feed_document_id, opts = {}) ⇒ Array<(FeedDocument, Integer, Hash)>
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 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](developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/feeds_api_model/api/feeds_api.rb', line 235 def get_feed_document_with_http_info(feed_document_id, opts = {}) @api_client.config.logger.debug 'Calling API: FeedsApi.get_feed_document ...' if @api_client.config.debugging # verify the required parameter 'feed_document_id' is set raise ArgumentError, "Missing the required parameter 'feed_document_id' when calling FeedsApi.get_feed_document" if @api_client.config.client_side_validation && feed_document_id.nil? # resource path local_var_path = '/feeds/2021-06-30/documents/{feedDocumentId}'.sub('{' + 'feedDocumentId' + '}', feed_document_id.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'FeedDocument' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type) @api_client.config.logger.debug "API called: FeedsApi#get_feed_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging [data, status_code, headers] end |
#get_feed_with_http_info(feed_id, opts = {}) ⇒ Array<(Feed, Integer, Hash)>
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 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](developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/feeds_api_model/api/feeds_api.rb', line 185 def get_feed_with_http_info(feed_id, opts = {}) @api_client.config.logger.debug 'Calling API: FeedsApi.get_feed ...' if @api_client.config.debugging # verify the required parameter 'feed_id' is set raise ArgumentError, "Missing the required parameter 'feed_id' when calling FeedsApi.get_feed" if @api_client.config.client_side_validation && feed_id.nil? # resource path local_var_path = '/feeds/2021-06-30/feeds/{feedId}'.sub('{' + 'feedId' + '}', feed_id.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'Feed' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type) @api_client.config.logger.debug "API called: FeedsApi#get_feed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging [data, status_code, headers] end |
#get_feeds(opts = {}) ⇒ GetFeedsResponse
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 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](developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
282 283 284 285 |
# File 'lib/feeds_api_model/api/feeds_api.rb', line 282 def get_feeds(opts = {}) data, _status_code, _headers = get_feeds_with_http_info(opts) data end |
#get_feeds_with_http_info(opts = {}) ⇒ Array<(GetFeedsResponse, Integer, Hash)>
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 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](developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/feeds_api_model/api/feeds_api.rb', line 297 def get_feeds_with_http_info(opts = {}) @api_client.config.logger.debug 'Calling API: FeedsApi.get_feeds ...' if @api_client.config.debugging raise ArgumentError, 'invalid value for "processing_statuses", must include one of CANCELLED, DONE, FATAL, IN_PROGRESS, IN_QUEUE' if @api_client.config.client_side_validation && opts[:processing_statuses] && !opts[:processing_statuses].all? { |item| %w[CANCELLED DONE FATAL IN_PROGRESS IN_QUEUE].include?(item) } # resource path local_var_path = '/feeds/2021-06-30/feeds' # query parameters query_params = opts[:query_params] || {} query_params[:feedTypes] = @api_client.build_collection_param(opts[:feed_types], :csv) unless opts[:feed_types].nil? query_params[:marketplaceIds] = @api_client.build_collection_param(opts[:marketplace_ids], :csv) unless opts[:marketplace_ids].nil? query_params[:pageSize] = opts[:page_size] unless opts[:page_size].nil? query_params[:processingStatuses] = @api_client.build_collection_param(opts[:processing_statuses], :csv) unless opts[:processing_statuses].nil? query_params[:createdSince] = opts[:created_since] unless opts[:created_since].nil? query_params[:createdUntil] = opts[:created_until] unless opts[:created_until].nil? query_params[:nextToken] = opts[:next_token] unless opts[:next_token].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'GetFeedsResponse' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type) @api_client.config.logger.debug "API called: FeedsApi#get_feeds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging [data, status_code, headers] end |