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.
Files changed (90) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +161 -0
  3. data/LICENSE +21 -0
  4. data/README.md +284 -0
  5. data/lib/amazon_sp_clients/adapter_loader.rb +28 -0
  6. data/lib/amazon_sp_clients/api_client.rb +309 -0
  7. data/lib/amazon_sp_clients/api_error.rb +37 -0
  8. data/lib/amazon_sp_clients/api_response.rb +54 -0
  9. data/lib/amazon_sp_clients/configuration.rb +144 -0
  10. data/lib/amazon_sp_clients/marketplaces.rb +63 -0
  11. data/lib/amazon_sp_clients/middlewares/raise_error.rb +166 -0
  12. data/lib/amazon_sp_clients/session.rb +124 -0
  13. data/lib/amazon_sp_clients/sp_fba_inventory.rb +8 -0
  14. data/lib/amazon_sp_clients/sp_feeds_2021.rb +8 -0
  15. data/lib/amazon_sp_clients/sp_fulfillment_outbound_2020.rb +8 -0
  16. data/lib/amazon_sp_clients/sp_listings_items_2021.rb +8 -0
  17. data/lib/amazon_sp_clients/sp_orders_v0.rb +8 -0
  18. data/lib/amazon_sp_clients/sp_reports_2021.rb +8 -0
  19. data/lib/amazon_sp_clients/sp_tokens_2021.rb +8 -0
  20. data/lib/amazon_sp_clients/sp_vdf_inventory_v1.rb +8 -0
  21. data/lib/amazon_sp_clients/sp_vdf_orders_v1.rb +8 -0
  22. data/lib/amazon_sp_clients/sp_vdf_shipping_v1.rb +8 -0
  23. data/lib/amazon_sp_clients/sp_vendor_invoices.rb +8 -0
  24. data/lib/amazon_sp_clients/sp_vendor_orders.rb +8 -0
  25. data/lib/amazon_sp_clients/sp_vendor_transaction_status.rb +8 -0
  26. data/lib/amazon_sp_clients/sp_vendors_shipments.rb +8 -0
  27. data/lib/amazon_sp_clients/token_exchange_auth.rb +82 -0
  28. data/lib/amazon_sp_clients/uploader.rb +77 -0
  29. data/lib/amazon_sp_clients/v2/api.rb +43 -0
  30. data/lib/amazon_sp_clients/v2/apis/fba_inventory.rb +80 -0
  31. data/lib/amazon_sp_clients/v2/apis/feeds_2021.rb +86 -0
  32. data/lib/amazon_sp_clients/v2/apis/fulfillment_outbound_2020.rb +184 -0
  33. data/lib/amazon_sp_clients/v2/apis/listings_items_2021.rb +144 -0
  34. data/lib/amazon_sp_clients/v2/apis/orders_v0.rb +165 -0
  35. data/lib/amazon_sp_clients/v2/apis/reports_2021.rb +117 -0
  36. data/lib/amazon_sp_clients/v2/apis/tokens_2021.rb +25 -0
  37. data/lib/amazon_sp_clients/v2/apis/vdf_inventory_v1.rb +26 -0
  38. data/lib/amazon_sp_clients/v2/apis/vdf_orders_v1.rb +61 -0
  39. data/lib/amazon_sp_clients/v2/apis/vdf_shipping_v1.rb +139 -0
  40. data/lib/amazon_sp_clients/v2/apis/vendor_invoices.rb +25 -0
  41. data/lib/amazon_sp_clients/v2/apis/vendor_orders.rb +106 -0
  42. data/lib/amazon_sp_clients/v2/apis/vendor_transaction_status.rb +25 -0
  43. data/lib/amazon_sp_clients/v2/apis/vendors_shipments.rb +120 -0
  44. data/lib/amazon_sp_clients/v2/apis.rb +82 -0
  45. data/lib/amazon_sp_clients/v2/client.rb +198 -0
  46. data/lib/amazon_sp_clients/v2/config.rb +85 -0
  47. data/lib/amazon_sp_clients/v2/credentials.rb +91 -0
  48. data/lib/amazon_sp_clients/v2/documents.rb +115 -0
  49. data/lib/amazon_sp_clients/v2/error_mapper.rb +235 -0
  50. data/lib/amazon_sp_clients/v2/errors.rb +117 -0
  51. data/lib/amazon_sp_clients/v2/lwa.rb +100 -0
  52. data/lib/amazon_sp_clients/v2/rdt.rb +104 -0
  53. data/lib/amazon_sp_clients/v2/token.rb +39 -0
  54. data/lib/amazon_sp_clients/v2.rb +33 -0
  55. data/lib/amazon_sp_clients/version.rb +3 -0
  56. data/lib/amazon_sp_clients.rb +69 -0
  57. data/lib/sp_api_clients.rb +6 -0
  58. data/sp_api_clients.gemspec +53 -0
  59. data/vendor/fba_inventory/lib/sp_fba_inventory/api/fba_inventory_api.rb +289 -0
  60. data/vendor/fba_inventory/lib/sp_fba_inventory.rb +12 -0
  61. data/vendor/feeds_2021/lib/sp_feeds_2021/api/feeds_api.rb +367 -0
  62. data/vendor/feeds_2021/lib/sp_feeds_2021.rb +12 -0
  63. data/vendor/fulfillment_outbound_2020/lib/sp_fulfillment_outbound_2020/api/fba_outbound_api.rb +845 -0
  64. data/vendor/fulfillment_outbound_2020/lib/sp_fulfillment_outbound_2020.rb +12 -0
  65. data/vendor/listings_items_2021/lib/sp_listings_items_2021/api/listings_api.rb +480 -0
  66. data/vendor/listings_items_2021/lib/sp_listings_items_2021.rb +12 -0
  67. data/vendor/orders_v0/lib/sp_orders_v0/api/orders_v0_api.rb +593 -0
  68. data/vendor/orders_v0/lib/sp_orders_v0/api/shipment_api.rb +83 -0
  69. data/vendor/orders_v0/lib/sp_orders_v0.rb +13 -0
  70. data/vendor/reports_2021/lib/sp_reports_2021/api/reports_api.rb +530 -0
  71. data/vendor/reports_2021/lib/sp_reports_2021.rb +12 -0
  72. data/vendor/tokens_2021/lib/sp_tokens_2021/api/tokens_api.rb +77 -0
  73. data/vendor/tokens_2021/lib/sp_tokens_2021.rb +12 -0
  74. data/vendor/vdf_inventory_v1/lib/sp_vdf_inventory_v1/api/update_inventory_api.rb +83 -0
  75. data/vendor/vdf_inventory_v1/lib/sp_vdf_inventory_v1.rb +12 -0
  76. data/vendor/vdf_orders_v1/lib/sp_vdf_orders_v1/api/vendor_orders_api.rb +217 -0
  77. data/vendor/vdf_orders_v1/lib/sp_vdf_orders_v1.rb +12 -0
  78. data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1/api/customer_invoices_api.rb +152 -0
  79. data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1/api/vendor_shipping_api.rb +264 -0
  80. data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1/api/vendor_shipping_labels_api.rb +208 -0
  81. data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1.rb +14 -0
  82. data/vendor/vendor_invoices/lib/sp_vendor_invoices/api/vendor_payments_api.rb +77 -0
  83. data/vendor/vendor_invoices/lib/sp_vendor_invoices.rb +12 -0
  84. data/vendor/vendor_orders/lib/sp_vendor_orders/api/vendor_orders_api.rb +323 -0
  85. data/vendor/vendor_orders/lib/sp_vendor_orders.rb +12 -0
  86. data/vendor/vendor_transaction_status/lib/sp_vendor_transaction_status/api/vendor_transaction_api.rb +75 -0
  87. data/vendor/vendor_transaction_status/lib/sp_vendor_transaction_status.rb +12 -0
  88. data/vendor/vendors_shipments/lib/sp_vendors_shipments/api/vendor_shipping_api.rb +337 -0
  89. data/vendor/vendors_shipments/lib/sp_vendors_shipments.rb +12 -0
  90. metadata +321 -0
@@ -0,0 +1,80 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated by lib/generator (bundle exec rake generate). Do not edit.
4
+
5
+ require 'amazon_sp_clients/v2/api'
6
+
7
+ module AmazonSpClients
8
+ module V2
9
+ # Selling Partner API for FBA Inventory
10
+ #
11
+ # The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network.
12
+ #
13
+ # OpenAPI spec version: v1
14
+ class FbaInventory < Api
15
+ # Requests that Amazon add items to the Sandbox Inventory with desired amount of quantity in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
16
+ #
17
+ # @param body [Hash] List of items to add to Sandbox inventory. (AddInventoryRequest)
18
+ # @param x_amzn_idempotency_token [String] A unique token/requestId provided with each call to ensure idempotency.
19
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
20
+ # @return [AmazonSpClients::ApiResponse]
21
+ def add_inventory(body, x_amzn_idempotency_token, rdt: nil)
22
+ headers = {
23
+ 'x-amzn-idempotency-token' => x_amzn_idempotency_token
24
+ }
25
+
26
+ request(:post, '/fba/inventory/v1/items/inventory', headers: headers, body: body, rdt: rdt)
27
+ end
28
+
29
+ # Requests that Amazon create product-details in the Sandbox Inventory in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
30
+ #
31
+ # @param body [Hash] CreateInventoryItem Request Body Parameter. (CreateInventoryItemRequest)
32
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
33
+ # @return [AmazonSpClients::ApiResponse]
34
+ def create_inventory_item(body, rdt: nil)
35
+ request(:post, '/fba/inventory/v1/items', body: body, rdt: rdt)
36
+ end
37
+
38
+ # Requests that Amazon Deletes an item from the Sandbox Inventory in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
39
+ #
40
+ # @param seller_sku [String] A single seller SKU used for querying the specified seller SKU inventory summaries.
41
+ # @param marketplace_id [String] The marketplace ID for the marketplace for which the sellerSku is to be deleted.
42
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
43
+ # @return [AmazonSpClients::ApiResponse]
44
+ def delete_inventory_item(seller_sku, marketplace_id, rdt: nil)
45
+ query = {
46
+ 'marketplaceId' => marketplace_id
47
+ }
48
+
49
+ request(:delete, "/fba/inventory/v1/items/#{encode(seller_sku)}", query: query, rdt: rdt)
50
+ end
51
+
52
+ # Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime, sellerSkus and sellerSku parameters: - All inventory summaries with available details are returned when the startDateTime, sellerSkus and sellerSku parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus and sellerSku parameters are ignored. Important: To avoid errors, use both startDateTime and nextToken to get the next page of inventory summaries that have changed after the date and time specified. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. The sellerSku parameter is ignored. - When the sellerSku parameter is provided, the operation returns inventory summaries for only the specified sellerSku. Note: The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). Usage Plan: | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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).
53
+ #
54
+ # @param granularity_type [String] The granularity type for the inventory aggregation level.
55
+ # @param granularity_id [String] The granularity ID for the inventory aggregation level.
56
+ # @param marketplace_ids [Array<String>] The marketplace ID for the marketplace for which to return inventory summaries.
57
+ # @param details [Boolean, nil] true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value).
58
+ # @param start_date_time [String, nil] A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected.
59
+ # @param seller_skus [Array<String>, nil] A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs.
60
+ # @param seller_sku [String, nil] A single seller SKU used for querying the specified seller SKU inventory summaries.
61
+ # @param next_token [String, nil] String token returned in the response of your previous request. The string token will expire 30 seconds after being created.
62
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
63
+ # @return [AmazonSpClients::ApiResponse]
64
+ def get_inventory_summaries(granularity_type, granularity_id, marketplace_ids, details: nil, start_date_time: nil, seller_skus: nil, seller_sku: nil, next_token: nil, rdt: nil)
65
+ query = {
66
+ 'details' => details,
67
+ 'granularityType' => granularity_type,
68
+ 'granularityId' => granularity_id,
69
+ 'startDateTime' => start_date_time,
70
+ 'sellerSkus' => csv(seller_skus),
71
+ 'sellerSku' => seller_sku,
72
+ 'nextToken' => next_token,
73
+ 'marketplaceIds' => csv(marketplace_ids)
74
+ }
75
+
76
+ request(:get, '/fba/inventory/v1/summaries', query: query, rdt: rdt)
77
+ end
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,86 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated by lib/generator (bundle exec rake generate). Do not edit.
4
+
5
+ require 'amazon_sp_clients/v2/api'
6
+
7
+ module AmazonSpClients
8
+ module V2
9
+ # Selling Partner API for Feeds
10
+ #
11
+ # The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner.
12
+ #
13
+ # OpenAPI spec version: 2021-06-30
14
+ class Feeds2021 < Api
15
+ # 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).
16
+ #
17
+ # @param feed_id [String] The identifier for the feed. This identifier is unique only in combination with a seller ID.
18
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
19
+ # @return [AmazonSpClients::ApiResponse]
20
+ def cancel_feed(feed_id, rdt: nil)
21
+ request(:delete, "/feeds/2021-06-30/feeds/#{encode(feed_id)}", rdt: rdt)
22
+ end
23
+
24
+ # 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).
25
+ #
26
+ # @param body [Hash] Information required to create the feed. (CreateFeedSpecification)
27
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
28
+ # @return [AmazonSpClients::ApiResponse]
29
+ def create_feed(body, rdt: nil)
30
+ request(:post, '/feeds/2021-06-30/feeds', body: body, rdt: rdt)
31
+ end
32
+
33
+ # 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).
34
+ #
35
+ # @param body [Hash] Specifies the content type for the createFeedDocument operation. (CreateFeedDocumentSpecification)
36
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
37
+ # @return [AmazonSpClients::ApiResponse]
38
+ def create_feed_document(body, rdt: nil)
39
+ request(:post, '/feeds/2021-06-30/documents', body: body, rdt: rdt)
40
+ end
41
+
42
+ # 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).
43
+ #
44
+ # @param feed_id [String] The identifier for the feed. This identifier is unique only in combination with a seller ID.
45
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
46
+ # @return [AmazonSpClients::ApiResponse]
47
+ def get_feed(feed_id, rdt: nil)
48
+ request(:get, "/feeds/2021-06-30/feeds/#{encode(feed_id)}", rdt: rdt)
49
+ end
50
+
51
+ # 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).
52
+ #
53
+ # @param feed_document_id [String] The identifier of the feed document.
54
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
55
+ # @return [AmazonSpClients::ApiResponse]
56
+ def get_feed_document(feed_document_id, rdt: nil)
57
+ request(:get, "/feeds/2021-06-30/documents/#{encode(feed_document_id)}", rdt: rdt)
58
+ end
59
+
60
+ # 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).
61
+ #
62
+ # @param feed_types [Array<String>, nil] 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.
63
+ # @param marketplace_ids [Array<String>, nil] A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify.
64
+ # @param page_size [Integer, nil] The maximum number of feeds to return in a single call.
65
+ # @param processing_statuses [Array<String>, nil] A list of processing statuses used to filter feeds.
66
+ # @param created_since [String, nil] 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.
67
+ # @param created_until [String, nil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
68
+ # @param next_token [String, nil] 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.
69
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
70
+ # @return [AmazonSpClients::ApiResponse]
71
+ def get_feeds(feed_types: nil, marketplace_ids: nil, page_size: nil, processing_statuses: nil, created_since: nil, created_until: nil, next_token: nil, rdt: nil)
72
+ query = {
73
+ 'feedTypes' => csv(feed_types),
74
+ 'marketplaceIds' => csv(marketplace_ids),
75
+ 'pageSize' => page_size,
76
+ 'processingStatuses' => csv(processing_statuses),
77
+ 'createdSince' => created_since,
78
+ 'createdUntil' => created_until,
79
+ 'nextToken' => next_token
80
+ }
81
+
82
+ request(:get, '/feeds/2021-06-30/feeds', query: query, rdt: rdt)
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,184 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated by lib/generator (bundle exec rake generate). Do not edit.
4
+
5
+ require 'amazon_sp_clients/v2/api'
6
+
7
+ module AmazonSpClients
8
+ module V2
9
+ # Selling Partner APIs for Fulfillment Outbound
10
+ #
11
+ # The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.
12
+ #
13
+ # OpenAPI spec version: 2020-07-01
14
+ class FulfillmentOutbound2020 < Api
15
+ # Requests that Amazon stop attempting to fulfill the fulfillment order indicated by the specified order identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | 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 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).
16
+ #
17
+ # @param seller_fulfillment_order_id [String] The identifier assigned to the item by the seller when the fulfillment order was created.
18
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
19
+ # @return [AmazonSpClients::ApiResponse]
20
+ def cancel_fulfillment_order(seller_fulfillment_order_id, rdt: nil)
21
+ request(:put, "/fba/outbound/2020-07-01/fulfillmentOrders/#{encode(seller_fulfillment_order_id)}/cancel", rdt: rdt)
22
+ end
23
+
24
+ # Requests that Amazon ship items from the seller's inventory in Amazon's fulfillment network to a destination address. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | 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 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)
25
+ #
26
+ # @param body [Hash] CreateFulfillmentOrderRequest parameter (CreateFulfillmentOrderRequest)
27
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
28
+ # @return [AmazonSpClients::ApiResponse]
29
+ def create_fulfillment_order(body, rdt: nil)
30
+ request(:post, '/fba/outbound/2020-07-01/fulfillmentOrders', body: body, rdt: rdt)
31
+ end
32
+
33
+ # Creates a fulfillment return. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | 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 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).
34
+ #
35
+ # @param body [Hash] CreateFulfillmentReturnRequest parameter (CreateFulfillmentReturnRequest)
36
+ # @param seller_fulfillment_order_id [String] An identifier assigned by the seller to the fulfillment order at the time it was created. The seller uses their own records to find the correct `SellerFulfillmentOrderId` value based on the buyer's request to return items.
37
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
38
+ # @return [AmazonSpClients::ApiResponse]
39
+ def create_fulfillment_return(body, seller_fulfillment_order_id, rdt: nil)
40
+ request(:put, "/fba/outbound/2020-07-01/fulfillmentOrders/#{encode(seller_fulfillment_order_id)}/return", body: body, rdt: rdt)
41
+ end
42
+
43
+ # Returns delivery options that include an estimated delivery date and offer expiration, based on criteria that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 30 | 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 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).
44
+ #
45
+ # @param body [Hash] GetDeliveryOffersRequest parameter (GetDeliveryOffersRequest)
46
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
47
+ # @return [AmazonSpClients::ApiResponse]
48
+ def delivery_offers(body, rdt: nil)
49
+ request(:post, '/fba/outbound/2020-07-01/deliveryOffers', body: body, rdt: rdt)
50
+ end
51
+
52
+ # Returns a list of inventory items that are eligible for the fulfillment feature you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | 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 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)..
53
+ #
54
+ # @param marketplace_id [String] The marketplace for which to return a list of the inventory that is eligible for the specified feature.
55
+ # @param feature_name [String] The name of the feature for which to return a list of eligible inventory.
56
+ # @param next_token [String, nil] A string token returned in the response to your previous request that is used to return the next response page. A value of null will return the first page.
57
+ # @param query_start_date [String, nil] A date that you can use to select inventory that has been updated since a specified date. An update is defined as any change in feature-enabled inventory availability. The date must be in the format yyyy-MM-ddTHH:mm:ss.sssZ
58
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
59
+ # @return [AmazonSpClients::ApiResponse]
60
+ def get_feature_inventory(marketplace_id, feature_name, next_token: nil, query_start_date: nil, rdt: nil)
61
+ query = {
62
+ 'marketplaceId' => marketplace_id,
63
+ 'nextToken' => next_token,
64
+ 'queryStartDate' => query_start_date
65
+ }
66
+
67
+ request(:get, "/fba/outbound/2020-07-01/features/inventory/#{encode(feature_name)}", query: query, rdt: rdt)
68
+ end
69
+
70
+ # Returns the number of items with the sellerSKU you specify that can have orders fulfilled using the specified feature. Note that if the sellerSKU isn't eligible, the response will contain an empty skuInfo object. The parameters for this operation may contain special characters that require URL encoding. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | 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 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).
71
+ #
72
+ # @param marketplace_id [String] The marketplace for which to return the count.
73
+ # @param feature_name [String] The name of the feature.
74
+ # @param seller_sku [String] Used to identify an item in the given marketplace. `SellerSKU` is qualified by the seller's `SellerId`, which is included with every operation that you submit.
75
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
76
+ # @return [AmazonSpClients::ApiResponse]
77
+ def get_feature_sku(marketplace_id, feature_name, seller_sku, rdt: nil)
78
+ query = {
79
+ 'marketplaceId' => marketplace_id
80
+ }
81
+
82
+ request(:get, "/fba/outbound/2020-07-01/features/inventory/#{encode(feature_name)}/#{encode(seller_sku)}", query: query, rdt: rdt)
83
+ end
84
+
85
+ # Returns a list of features available for Multi-Channel Fulfillment orders in the marketplace you specify, and whether the seller for which you made the call is enrolled for each feature. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | 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 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).
86
+ #
87
+ # @param marketplace_id [String] The marketplace for which to return the list of features.
88
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
89
+ # @return [AmazonSpClients::ApiResponse]
90
+ def get_features(marketplace_id, rdt: nil)
91
+ query = {
92
+ 'marketplaceId' => marketplace_id
93
+ }
94
+
95
+ request(:get, '/fba/outbound/2020-07-01/features', query: query, rdt: rdt)
96
+ end
97
+
98
+ # Returns the fulfillment order indicated by the specified order identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | 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 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).
99
+ #
100
+ # @param seller_fulfillment_order_id [String] The identifier assigned to the item by the seller when the fulfillment order was created.
101
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
102
+ # @return [AmazonSpClients::ApiResponse]
103
+ def get_fulfillment_order(seller_fulfillment_order_id, rdt: nil)
104
+ request(:get, "/fba/outbound/2020-07-01/fulfillmentOrders/#{encode(seller_fulfillment_order_id)}", rdt: rdt)
105
+ end
106
+
107
+ # Returns a list of fulfillment order previews based on shipping criteria that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | 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 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).
108
+ #
109
+ # @param body [Hash] GetFulfillmentPreviewRequest parameter (GetFulfillmentPreviewRequest)
110
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
111
+ # @return [AmazonSpClients::ApiResponse]
112
+ def get_fulfillment_preview(body, rdt: nil)
113
+ request(:post, '/fba/outbound/2020-07-01/fulfillmentOrders/preview', body: body, rdt: rdt)
114
+ end
115
+
116
+ # Returns delivery tracking information for a package in an outbound shipment for a Multi-Channel Fulfillment order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | 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 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).
117
+ #
118
+ # @param package_number [Integer] The unencrypted package identifier returned by the `getFulfillmentOrder` operation.
119
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
120
+ # @return [AmazonSpClients::ApiResponse]
121
+ def get_package_tracking_details(package_number, rdt: nil)
122
+ query = {
123
+ 'packageNumber' => package_number
124
+ }
125
+
126
+ request(:get, '/fba/outbound/2020-07-01/tracking', query: query, rdt: rdt)
127
+ end
128
+
129
+ # Returns a list of fulfillment orders fulfilled after (or at) a specified date-time, or indicated by the next token parameter. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | 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 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
+ #
131
+ # @param query_start_date [String, nil] A date used to select fulfillment orders that were last updated after (or at) a specified time. An update is defined as any change in fulfillment order status, including the creation of a new fulfillment order.
132
+ # @param next_token [String, nil] A string token returned in the response to your previous request.
133
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
134
+ # @return [AmazonSpClients::ApiResponse]
135
+ def list_all_fulfillment_orders(query_start_date: nil, next_token: nil, rdt: nil)
136
+ query = {
137
+ 'queryStartDate' => query_start_date,
138
+ 'nextToken' => next_token
139
+ }
140
+
141
+ request(:get, '/fba/outbound/2020-07-01/fulfillmentOrders', query: query, rdt: rdt)
142
+ end
143
+
144
+ # Returns a list of return reason codes for a seller SKU in a given marketplace. The parameters for this operation may contain special characters that require URL encoding. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | 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 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).
145
+ #
146
+ # @param seller_sku [String] The seller SKU for which return reason codes are required.
147
+ # @param marketplace_id [String, nil] The marketplace for which the seller wants return reason codes.
148
+ # @param seller_fulfillment_order_id [String, nil] The identifier assigned to the item by the seller when the fulfillment order was created. The service uses this value to determine the marketplace for which the seller wants return reason codes.
149
+ # @param language [String, nil] The language that the `TranslatedDescription` property of the `ReasonCodeDetails` response object should be translated into.
150
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
151
+ # @return [AmazonSpClients::ApiResponse]
152
+ def list_return_reason_codes(seller_sku, marketplace_id: nil, seller_fulfillment_order_id: nil, language: nil, rdt: nil)
153
+ query = {
154
+ 'sellerSku' => seller_sku,
155
+ 'marketplaceId' => marketplace_id,
156
+ 'sellerFulfillmentOrderId' => seller_fulfillment_order_id,
157
+ 'language' => language
158
+ }
159
+
160
+ request(:get, '/fba/outbound/2020-07-01/returnReasonCodes', query: query, rdt: rdt)
161
+ end
162
+
163
+ # Requests that Amazon update the status of an order in the sandbox testing environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Fulfillment Outbound Dynamic Sandbox Guide](https://developer-docs.amazon.com/sp-api/docs/fulfillment-outbound-dynamic-sandbox-guide) and [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
164
+ #
165
+ # @param body [Hash] The identifier assigned to the item by the seller when the fulfillment order was created. (SubmitFulfillmentOrderStatusUpdateRequest)
166
+ # @param seller_fulfillment_order_id [String] The identifier assigned to the item by the seller when the fulfillment order was created.
167
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
168
+ # @return [AmazonSpClients::ApiResponse]
169
+ def submit_fulfillment_order_status_update(body, seller_fulfillment_order_id, rdt: nil)
170
+ request(:put, "/fba/outbound/2020-07-01/fulfillmentOrders/#{encode(seller_fulfillment_order_id)}/status", body: body, rdt: rdt)
171
+ end
172
+
173
+ # Updates and/or requests shipment for a fulfillment order with an order hold on it. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | 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 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).
174
+ #
175
+ # @param body [Hash] UpdateFulfillmentOrderRequest parameter (UpdateFulfillmentOrderRequest)
176
+ # @param seller_fulfillment_order_id [String] The identifier assigned to the item by the seller when the fulfillment order was created.
177
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
178
+ # @return [AmazonSpClients::ApiResponse]
179
+ def update_fulfillment_order(body, seller_fulfillment_order_id, rdt: nil)
180
+ request(:put, "/fba/outbound/2020-07-01/fulfillmentOrders/#{encode(seller_fulfillment_order_id)}", body: body, rdt: rdt)
181
+ end
182
+ end
183
+ end
184
+ end
@@ -0,0 +1,144 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated by lib/generator (bundle exec rake generate). Do not edit.
4
+
5
+ require 'amazon_sp_clients/v2/api'
6
+
7
+ module AmazonSpClients
8
+ module V2
9
+ # Selling Partner API for Listings Items
10
+ #
11
+ # The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/listings-items-api-v2021-08-01-use-case-guide).
12
+ #
13
+ # OpenAPI spec version: 2021-08-01
14
+ class ListingsItems2021 < Api
15
+ # Delete a listings item for a selling partner. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 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).
16
+ #
17
+ # @param seller_id [String] A selling partner identifier, such as a merchant account or vendor code.
18
+ # @param sku [String] A selling partner provided identifier for an Amazon listing.
19
+ # @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
20
+ # @param issue_locale [String, nil] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when a localization is not available in the specified locale.
21
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
22
+ # @return [AmazonSpClients::ApiResponse]
23
+ def delete_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, rdt: nil)
24
+ query = {
25
+ 'marketplaceIds' => csv(marketplace_ids),
26
+ 'issueLocale' => issue_locale
27
+ }
28
+
29
+ request(:delete, "/listings/2021-08-01/items/#{encode(seller_id)}/#{encode(sku)}", query: query, rdt: rdt)
30
+ end
31
+
32
+ # Returns details about a listings item for a selling partner. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 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).
33
+ #
34
+ # @param seller_id [String] A selling partner identifier, such as a merchant account or vendor code.
35
+ # @param sku [String] A selling partner provided identifier for an Amazon listing.
36
+ # @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
37
+ # @param issue_locale [String, nil] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when a localization is not available in the specified locale.
38
+ # @param included_data [Array<String>, nil] A comma-delimited list of data sets to include in the response. Default: `summaries`.
39
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
40
+ # @return [AmazonSpClients::ApiResponse]
41
+ def get_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, included_data: nil, rdt: nil)
42
+ query = {
43
+ 'marketplaceIds' => csv(marketplace_ids),
44
+ 'issueLocale' => issue_locale,
45
+ 'includedData' => csv(included_data)
46
+ }
47
+
48
+ request(:get, "/listings/2021-08-01/items/#{encode(seller_id)}/#{encode(sku)}", query: query, rdt: rdt)
49
+ end
50
+
51
+ # Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | 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 can receive higher rate and burst values then 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) in the Selling Partner API documentation.
52
+ #
53
+ # @param body [Hash] The request body schema for the `patchListingsItem` operation. (ListingsItemPatchRequest)
54
+ # @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
55
+ # @param seller_id [String] A selling partner identifier, such as a merchant account or vendor code.
56
+ # @param sku [String] A selling partner provided identifier for an Amazon listing.
57
+ # @param included_data [Array<String>, nil] A comma-delimited list of data sets to include in the response. Default: `issues`.
58
+ # @param mode [String, nil] The mode of operation for the request.
59
+ # @param issue_locale [String, nil] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when a localization is not available in the specified locale.
60
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
61
+ # @return [AmazonSpClients::ApiResponse]
62
+ def patch_listings_item(body, marketplace_ids, seller_id, sku, included_data: nil, mode: nil, issue_locale: nil, rdt: nil)
63
+ query = {
64
+ 'marketplaceIds' => csv(marketplace_ids),
65
+ 'includedData' => csv(included_data),
66
+ 'mode' => mode,
67
+ 'issueLocale' => issue_locale
68
+ }
69
+
70
+ request(:patch, "/listings/2021-08-01/items/#{encode(seller_id)}/#{encode(sku)}", query: query, body: body, rdt: rdt)
71
+ end
72
+
73
+ # Creates or fully updates an existing listings item for a selling partner. **Note:** This operation has a throttling rate of one request per second when `mode` is `VALIDATION_PREVIEW`. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 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).
74
+ #
75
+ # @param body [Hash] The request body schema for the `putListingsItem` operation. (ListingsItemPutRequest)
76
+ # @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
77
+ # @param seller_id [String] A selling partner identifier, such as a merchant account or vendor code.
78
+ # @param sku [String] A selling partner provided identifier for an Amazon listing.
79
+ # @param included_data [Array<String>, nil] A comma-delimited list of data sets to include in the response. Default: `issues`.
80
+ # @param mode [String, nil] The mode of operation for the request.
81
+ # @param issue_locale [String, nil] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when a localization is not available in the specified locale.
82
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
83
+ # @return [AmazonSpClients::ApiResponse]
84
+ def put_listings_item(body, marketplace_ids, seller_id, sku, included_data: nil, mode: nil, issue_locale: nil, rdt: nil)
85
+ query = {
86
+ 'marketplaceIds' => csv(marketplace_ids),
87
+ 'includedData' => csv(included_data),
88
+ 'mode' => mode,
89
+ 'issueLocale' => issue_locale
90
+ }
91
+
92
+ request(:put, "/listings/2021-08-01/items/#{encode(seller_id)}/#{encode(sku)}", query: query, body: body, rdt: rdt)
93
+ end
94
+
95
+ # Search for and return a list of selling partner listings items and their respective details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested 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).
96
+ #
97
+ # @param seller_id [String] A selling partner identifier, such as a merchant account or vendor code.
98
+ # @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
99
+ # @param issue_locale [String, nil] A locale that is used to localize issues. When not provided, the default language code of the first marketplace is used. Examples: "en_US", "fr_CA", "fr_FR". When a localization is not available in the specified locale, localized messages default to "en_US".
100
+ # @param included_data [Array<String>, nil] A comma-delimited list of datasets that you want to include in the response. Default: `summaries`.
101
+ # @param identifiers [Array<String>, nil] A comma-delimited list of product identifiers that you can use to search for listings items. **Note**: 1. This is required when you specify `identifiersType`. 2. You cannot use 'identifiers' if you specify `variationParentSku` or `packageHierarchySku`.
102
+ # @param identifiers_type [String, nil] A type of product identifiers that you can use to search for listings items. **Note**: This is required when `identifiers` is provided.
103
+ # @param variation_parent_sku [String, nil] Filters results to include listing items that are variation children of the specified SKU. **Note**: You cannot use `variationParentSku` if you include `identifiers` or `packageHierarchySku` in your request.
104
+ # @param package_hierarchy_sku [String, nil] Filter results to include listing items that contain or are contained by the specified SKU. **Note**: You cannot use `packageHierarchySku` if you include `identifiers` or `variationParentSku` in your request.
105
+ # @param created_after [String, nil] A date-time that is used to filter listing items. The response includes listings items that were created at or after this time. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
106
+ # @param created_before [String, nil] A date-time that is used to filter listing items. The response includes listings items that were created at or before this time. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
107
+ # @param last_updated_after [String, nil] A date-time that is used to filter listing items. The response includes listings items that were last updated at or after this time. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
108
+ # @param last_updated_before [String, nil] A date-time that is used to filter listing items. The response includes listings items that were last updated at or before this time. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
109
+ # @param with_issue_severity [Array<String>, nil] Filter results to include only listing items that have issues that match one or more of the specified severity levels.
110
+ # @param with_status [Array<String>, nil] Filter results to include only listing items that have the specified status.
111
+ # @param without_status [Array<String>, nil] Filter results to include only listing items that don't contain the specified statuses.
112
+ # @param sort_by [String, nil] An attribute by which to sort the returned listing items.
113
+ # @param sort_order [String, nil] The order in which to sort the result items.
114
+ # @param page_size [Integer, nil] The number of results that you want to include on each page.
115
+ # @param page_token [String, nil] A token that you can use to fetch a specific page when there are multiple pages of results.
116
+ # @param rdt [Array<RDT::Resource>, nil] send a restricted data token for these resources
117
+ # @return [AmazonSpClients::ApiResponse]
118
+ def search_listings_items(seller_id, marketplace_ids, issue_locale: nil, included_data: nil, identifiers: nil, identifiers_type: nil, variation_parent_sku: nil, package_hierarchy_sku: nil, created_after: nil, created_before: nil, last_updated_after: nil, last_updated_before: nil, with_issue_severity: nil, with_status: nil, without_status: nil, sort_by: nil, sort_order: nil, page_size: nil, page_token: nil, rdt: nil)
119
+ query = {
120
+ 'marketplaceIds' => csv(marketplace_ids),
121
+ 'issueLocale' => issue_locale,
122
+ 'includedData' => csv(included_data),
123
+ 'identifiers' => csv(identifiers),
124
+ 'identifiersType' => identifiers_type,
125
+ 'variationParentSku' => variation_parent_sku,
126
+ 'packageHierarchySku' => package_hierarchy_sku,
127
+ 'createdAfter' => created_after,
128
+ 'createdBefore' => created_before,
129
+ 'lastUpdatedAfter' => last_updated_after,
130
+ 'lastUpdatedBefore' => last_updated_before,
131
+ 'withIssueSeverity' => csv(with_issue_severity),
132
+ 'withStatus' => csv(with_status),
133
+ 'withoutStatus' => csv(without_status),
134
+ 'sortBy' => sort_by,
135
+ 'sortOrder' => sort_order,
136
+ 'pageSize' => page_size,
137
+ 'pageToken' => page_token
138
+ }
139
+
140
+ request(:get, "/listings/2021-08-01/items/#{encode(seller_id)}", query: query, rdt: rdt)
141
+ end
142
+ end
143
+ end
144
+ end