peddler 3.0.0.beta1 → 4.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 +4 -4
- data/README.md +108 -110
- data/lib/peddler/api.rb +56 -18
- data/lib/peddler/{api → apis}/amazon_warehousing_and_distribution_2024_05_09.rb +38 -26
- data/lib/peddler/{api → apis}/aplus_content_2020_11_01.rb +97 -59
- data/lib/peddler/apis/application_integrations_2024_04_01.rb +56 -0
- data/lib/peddler/{api → apis}/application_management_2023_11_30.rb +14 -4
- data/lib/peddler/{api → apis}/catalog_items_2020_12_01.rb +34 -23
- data/lib/peddler/{api → apis}/catalog_items_2022_04_01.rb +39 -29
- data/lib/peddler/{api → apis}/catalog_items_v0.rb +43 -30
- data/lib/peddler/{api → apis}/data_kiosk_2023_11_15.rb +47 -31
- data/lib/peddler/apis/easy_ship_2022_03_23.rb +126 -0
- data/lib/peddler/{api → apis}/fba_inbound_eligibility_v1.rb +15 -7
- data/lib/peddler/{api → apis}/fba_inventory_v1.rb +45 -29
- data/lib/peddler/{api → apis}/feeds_2021_06_30.rb +54 -33
- data/lib/peddler/apis/finances_2024_06_19.rb +50 -0
- data/lib/peddler/{api → apis}/finances_v0.rb +50 -36
- data/lib/peddler/{api → apis}/fulfillment_inbound_2024_03_20.rb +384 -255
- data/lib/peddler/{api → apis}/fulfillment_inbound_v0.rb +138 -93
- data/lib/peddler/{api → apis}/fulfillment_outbound_2020_07_01.rb +105 -68
- data/lib/peddler/apis/invoices_2024_06_19.rb +180 -0
- data/lib/peddler/apis/listings_items_2020_09_01.rb +95 -0
- data/lib/peddler/apis/listings_items_2021_08_01.rb +136 -0
- data/lib/peddler/{api → apis}/listings_restrictions_2021_08_01.rb +21 -11
- data/lib/peddler/apis/merchant_fulfillment_v0.rb +80 -0
- data/lib/peddler/{api → apis}/messaging_v1.rb +107 -75
- data/lib/peddler/{api → apis}/notifications_v1.rb +63 -32
- data/lib/peddler/{api → apis}/orders_v0.rb +99 -84
- data/lib/peddler/apis/product_fees_v0.rb +77 -0
- data/lib/peddler/{api → apis}/product_pricing_2022_05_01.rb +24 -13
- data/lib/peddler/{api → apis}/product_pricing_v0.rb +70 -52
- data/lib/peddler/{api → apis}/product_type_definitions_2020_09_01.rb +32 -21
- data/lib/peddler/{api → apis}/replenishment_2022_11_07.rb +25 -13
- data/lib/peddler/{api → apis}/reports_2021_06_30.rb +71 -47
- data/lib/peddler/{api → apis}/sales_v1.rb +22 -14
- data/lib/peddler/{api → apis}/sellers_v1.rb +19 -7
- data/lib/peddler/{api → apis}/services_v1.rb +156 -116
- data/lib/peddler/apis/shipment_invoicing_v0.rb +59 -0
- data/lib/peddler/apis/shipping_v1.rb +132 -0
- data/lib/peddler/{api → apis}/shipping_v2.rb +150 -98
- data/lib/peddler/{api → apis}/solicitations_v1.rb +21 -11
- data/lib/peddler/apis/supply_sources_2020_07_01.rb +100 -0
- data/lib/peddler/{api → apis}/tokens_2021_03_01.rb +15 -7
- data/lib/peddler/{api → apis}/uploads_2020_11_01.rb +18 -8
- data/lib/peddler/{api → apis}/vendor_direct_fulfillment_inventory_v1.rb +14 -6
- data/lib/peddler/{api → apis}/vendor_direct_fulfillment_orders_2021_12_28.rb +33 -21
- data/lib/peddler/{api → apis}/vendor_direct_fulfillment_orders_v1.rb +33 -21
- data/lib/peddler/{api → apis}/vendor_direct_fulfillment_payments_v1.rb +13 -5
- data/lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +45 -0
- data/lib/peddler/{api → apis}/vendor_direct_fulfillment_shipping_2021_12_28.rb +86 -60
- data/lib/peddler/apis/vendor_direct_fulfillment_shipping_v1.rb +189 -0
- data/lib/peddler/{api → apis}/vendor_direct_fulfillment_transactions_2021_12_28.rb +14 -6
- data/lib/peddler/{api → apis}/vendor_direct_fulfillment_transactions_v1.rb +14 -6
- data/lib/peddler/apis/vendor_invoices_v1.rb +30 -0
- data/lib/peddler/{api → apis}/vendor_orders_v1.rb +59 -48
- data/lib/peddler/apis/vendor_shipments_v1.rb +132 -0
- data/lib/peddler/{api → apis}/vendor_transaction_status_v1.rb +14 -5
- data/lib/peddler/endpoint.rb +51 -0
- data/lib/peddler/error.rb +21 -11
- data/lib/peddler/helpers/feeds_2021_06_30.rb +26 -0
- data/lib/peddler/json_feed_document.rb +31 -0
- data/lib/peddler/marketplace.rb +93 -0
- data/lib/peddler/response.rb +46 -0
- data/lib/peddler/token.rb +70 -0
- data/lib/peddler/version.rb +1 -1
- data/lib/peddler.rb +55 -52
- metadata +64 -57
- data/lib/peddler/access_token.rb +0 -76
- data/lib/peddler/api/easy_ship_2022_03_23.rb +0 -108
- data/lib/peddler/api/listings_items_2020_09_01.rb +0 -84
- data/lib/peddler/api/listings_items_2021_08_01.rb +0 -154
- data/lib/peddler/api/merchant_fulfillment_v0.rb +0 -64
- data/lib/peddler/api/product_fees_v0.rb +0 -69
- data/lib/peddler/api/shipment_invoicing_v0.rb +0 -46
- data/lib/peddler/api/shipping_v1.rb +0 -107
- data/lib/peddler/api/supply_sources_2020_07_01.rb +0 -82
- data/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +0 -35
- data/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb +0 -165
- data/lib/peddler/api/vendor_invoices_v1.rb +0 -22
- data/lib/peddler/api/vendor_shipments_v1.rb +0 -120
- data/lib/peddler/region.rb +0 -30
@@ -3,7 +3,13 @@
|
|
3
3
|
require "peddler/api"
|
4
4
|
|
5
5
|
module Peddler
|
6
|
-
class
|
6
|
+
class << self
|
7
|
+
def amazon_warehousing_and_distribution_2024_05_09(...)
|
8
|
+
APIs::AmazonWarehousingAndDistribution20240509.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module APIs
|
7
13
|
# The Selling Partner API for Amazon Warehousing and Distribution
|
8
14
|
#
|
9
15
|
# The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information
|
@@ -11,35 +17,39 @@ module Peddler
|
|
11
17
|
class AmazonWarehousingAndDistribution20240509 < API
|
12
18
|
# Retrieves an AWD inbound shipment.
|
13
19
|
#
|
14
|
-
# @
|
15
|
-
# @param [String]
|
20
|
+
# @note This operation can make a static sandbox call.
|
21
|
+
# @param shipment_id [String] ID for the shipment. A shipment contains the cases being inbounded.
|
22
|
+
# @param sku_quantities [String] If equal to `SHOW`, the response includes the shipment SKU quantity details.
|
16
23
|
# Defaults to `HIDE`, in which case the response does not contain SKU quantities
|
17
|
-
# @
|
18
|
-
|
24
|
+
# @param rate_limit [Float] Requests per second
|
25
|
+
# @return [Peddler::Response] The API response
|
26
|
+
def get_inbound_shipment(shipment_id, sku_quantities: nil, rate_limit: 2.0)
|
19
27
|
path = "/awd/2024-05-09/inboundShipments/#{shipment_id}"
|
20
28
|
params = {
|
21
29
|
"skuQuantities" => sku_quantities,
|
22
30
|
}.compact
|
23
31
|
|
24
|
-
rate_limit
|
32
|
+
meter(rate_limit).get(path, params:)
|
25
33
|
end
|
26
34
|
|
27
35
|
# Retrieves a summary of all the inbound AWD shipments associated with a merchant, with the ability to apply
|
28
36
|
# optional filters.
|
29
37
|
#
|
30
|
-
# @
|
31
|
-
# @param [String]
|
38
|
+
# @note This operation can make a static sandbox call.
|
39
|
+
# @param sort_by [String] Field to sort results by. By default, the response will be sorted by UPDATED_AT.
|
40
|
+
# @param sort_order [String] Sort the response in ASCENDING or DESCENDING order. By default, the response will be
|
32
41
|
# sorted in DESCENDING order.
|
33
|
-
# @param [String]
|
34
|
-
# @param [String]
|
35
|
-
# date must be in
|
36
|
-
# @param [String]
|
37
|
-
# The date must be in
|
38
|
-
# @param [Integer]
|
39
|
-
# @param [String]
|
40
|
-
# @
|
42
|
+
# @param shipment_status [String] Filter by inbound shipment status.
|
43
|
+
# @param updated_after [String] List the inbound shipments that were updated after a certain time (inclusive). The
|
44
|
+
# date must be in {https://developer-docs.amazon.com/sp-api/docs/iso-8601 ISO 8601} format.
|
45
|
+
# @param updated_before [String] List the inbound shipments that were updated before a certain time (inclusive).
|
46
|
+
# The date must be in {https://developer-docs.amazon.com/sp-api/docs/iso-8601 ISO 8601} format.
|
47
|
+
# @param max_results [Integer] Maximum number of results to return.
|
48
|
+
# @param next_token [String] Token to retrieve the next set of paginated results.
|
49
|
+
# @param rate_limit [Float] Requests per second
|
50
|
+
# @return [Peddler::Response] The API response
|
41
51
|
def list_inbound_shipments(sort_by: nil, sort_order: nil, shipment_status: nil, updated_after: nil,
|
42
|
-
updated_before: nil, max_results:
|
52
|
+
updated_before: nil, max_results: 25, next_token: nil, rate_limit: 1.0)
|
43
53
|
path = "/awd/2024-05-09/inboundShipments"
|
44
54
|
params = {
|
45
55
|
"sortBy" => sort_by,
|
@@ -51,19 +61,21 @@ module Peddler
|
|
51
61
|
"nextToken" => next_token,
|
52
62
|
}.compact
|
53
63
|
|
54
|
-
rate_limit
|
64
|
+
meter(rate_limit).get(path, params:)
|
55
65
|
end
|
56
66
|
|
57
67
|
# Lists AWD inventory associated with a merchant with the ability to apply optional filters.
|
58
68
|
#
|
59
|
-
# @
|
60
|
-
# @param [String]
|
61
|
-
# @param [String]
|
69
|
+
# @note This operation can make a static sandbox call.
|
70
|
+
# @param sku [String] Filter by seller or merchant SKU for the item.
|
71
|
+
# @param sort_order [String] Sort the response in `ASCENDING` or `DESCENDING` order.
|
72
|
+
# @param details [String] Set to `SHOW` to return summaries with additional inventory details. Defaults to `HIDE,`
|
62
73
|
# which returns only inventory summary totals.
|
63
|
-
# @param [String]
|
64
|
-
# @param [Integer]
|
65
|
-
# @
|
66
|
-
|
74
|
+
# @param next_token [String] Token to retrieve the next set of paginated results.
|
75
|
+
# @param max_results [Integer] Maximum number of results to return.
|
76
|
+
# @param rate_limit [Float] Requests per second
|
77
|
+
# @return [Peddler::Response] The API response
|
78
|
+
def list_inventory(sku: nil, sort_order: nil, details: nil, next_token: nil, max_results: 25, rate_limit: 2.0)
|
67
79
|
path = "/awd/2024-05-09/inventory"
|
68
80
|
params = {
|
69
81
|
"sku" => sku,
|
@@ -73,7 +85,7 @@ module Peddler
|
|
73
85
|
"maxResults" => max_results,
|
74
86
|
}.compact
|
75
87
|
|
76
|
-
rate_limit
|
88
|
+
meter(rate_limit).get(path, params:)
|
77
89
|
end
|
78
90
|
end
|
79
91
|
end
|
@@ -3,7 +3,13 @@
|
|
3
3
|
require "peddler/api"
|
4
4
|
|
5
5
|
module Peddler
|
6
|
-
class
|
6
|
+
class << self
|
7
|
+
def aplus_content_2020_11_01(...)
|
8
|
+
APIs::AplusContent20201101.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module APIs
|
7
13
|
# Selling Partner API for A+ Content Management
|
8
14
|
#
|
9
15
|
# With the A+ Content API, you can build applications that help selling partners add rich marketing content to their
|
@@ -15,92 +21,108 @@ module Peddler
|
|
15
21
|
# metadata of the A+ Content documents. Call the getContentDocument operation to get the actual contents of the A+
|
16
22
|
# Content documents.
|
17
23
|
#
|
18
|
-
# @param [String]
|
19
|
-
# @param [String]
|
24
|
+
# @param marketplace_id [String] The identifier for the marketplace where the A+ Content is published.
|
25
|
+
# @param page_token [String] A page token from the nextPageToken response element returned by your previous call
|
20
26
|
# to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next
|
21
27
|
# page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any
|
22
28
|
# other parameter will cause the request to fail. When no nextPageToken value is returned there are no more
|
23
29
|
# pages to return. A pageToken value is not usable across different operations.
|
24
|
-
# @
|
25
|
-
|
30
|
+
# @param rate_limit [Float] Requests per second
|
31
|
+
# @return [Peddler::Response] The API response
|
32
|
+
def search_content_documents(marketplace_id, page_token: nil, rate_limit: 10.0)
|
33
|
+
cannot_sandbox!
|
34
|
+
|
26
35
|
path = "/aplus/2020-11-01/contentDocuments"
|
27
36
|
params = {
|
28
37
|
"marketplaceId" => marketplace_id,
|
29
38
|
"pageToken" => page_token,
|
30
39
|
}.compact
|
31
40
|
|
32
|
-
rate_limit
|
41
|
+
meter(rate_limit).get(path, params:)
|
33
42
|
end
|
34
43
|
|
35
44
|
# Creates a new A+ Content document.
|
36
45
|
#
|
37
|
-
# @param [String]
|
38
|
-
# @param [Hash]
|
39
|
-
# @
|
40
|
-
|
46
|
+
# @param marketplace_id [String] The identifier for the marketplace where the A+ Content is published.
|
47
|
+
# @param post_content_document_request [Hash] The content document request details.
|
48
|
+
# @param rate_limit [Float] Requests per second
|
49
|
+
# @return [Peddler::Response] The API response
|
50
|
+
def create_content_document(marketplace_id, post_content_document_request, rate_limit: 10.0)
|
51
|
+
cannot_sandbox!
|
52
|
+
|
41
53
|
path = "/aplus/2020-11-01/contentDocuments"
|
42
54
|
body = post_content_document_request
|
43
55
|
params = {
|
44
56
|
"marketplaceId" => marketplace_id,
|
45
57
|
}.compact
|
46
58
|
|
47
|
-
rate_limit
|
59
|
+
meter(rate_limit).post(path, body:, params:)
|
48
60
|
end
|
49
61
|
|
50
62
|
# Returns an A+ Content document, if available.
|
51
63
|
#
|
52
|
-
# @param [String]
|
64
|
+
# @param content_reference_key [String] The unique reference key for the A+ Content document. A content reference
|
53
65
|
# key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match
|
54
66
|
# any A+ Content identifier.
|
55
|
-
# @param [String]
|
56
|
-
# @param [Array<String>]
|
57
|
-
# @
|
58
|
-
|
67
|
+
# @param marketplace_id [String] The identifier for the marketplace where the A+ Content is published.
|
68
|
+
# @param included_data_set [Array<String>] The set of A+ Content data types to include in the response.
|
69
|
+
# @param rate_limit [Float] Requests per second
|
70
|
+
# @return [Peddler::Response] The API response
|
71
|
+
def get_content_document(content_reference_key, marketplace_id, included_data_set, rate_limit: 10.0)
|
72
|
+
cannot_sandbox!
|
73
|
+
|
59
74
|
path = "/aplus/2020-11-01/contentDocuments/#{content_reference_key}"
|
60
75
|
params = {
|
61
76
|
"marketplaceId" => marketplace_id,
|
62
77
|
"includedDataSet" => included_data_set,
|
63
78
|
}.compact
|
64
79
|
|
65
|
-
rate_limit
|
80
|
+
meter(rate_limit).get(path, params:)
|
66
81
|
end
|
67
82
|
|
68
83
|
# Updates an existing A+ Content document.
|
69
84
|
#
|
70
|
-
# @param [String]
|
85
|
+
# @param content_reference_key [String] The unique reference key for the A+ Content document. A content reference
|
71
86
|
# key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match
|
72
87
|
# any A+ Content identifier.
|
73
|
-
# @param [String]
|
74
|
-
# @param [Hash]
|
75
|
-
# @
|
76
|
-
|
88
|
+
# @param marketplace_id [String] The identifier for the marketplace where the A+ Content is published.
|
89
|
+
# @param post_content_document_request [Hash] The content document request details.
|
90
|
+
# @param rate_limit [Float] Requests per second
|
91
|
+
# @return [Peddler::Response] The API response
|
92
|
+
def update_content_document(content_reference_key, marketplace_id, post_content_document_request,
|
93
|
+
rate_limit: 10.0)
|
94
|
+
cannot_sandbox!
|
95
|
+
|
77
96
|
path = "/aplus/2020-11-01/contentDocuments/#{content_reference_key}"
|
78
97
|
body = post_content_document_request
|
79
98
|
params = {
|
80
99
|
"marketplaceId" => marketplace_id,
|
81
100
|
}.compact
|
82
101
|
|
83
|
-
rate_limit
|
102
|
+
meter(rate_limit).post(path, body:, params:)
|
84
103
|
end
|
85
104
|
|
86
105
|
# Returns a list of ASINs related to the specified A+ Content document, if available. If you do not include the
|
87
106
|
# asinSet parameter, the operation returns all ASINs related to the content document.
|
88
107
|
#
|
89
|
-
# @param [String]
|
108
|
+
# @param content_reference_key [String] The unique reference key for the A+ Content document. A content reference
|
90
109
|
# key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match
|
91
110
|
# any A+ Content identifier.
|
92
|
-
# @param [String]
|
93
|
-
# @param [Array<String>]
|
111
|
+
# @param marketplace_id [String] The identifier for the marketplace where the A+ Content is published.
|
112
|
+
# @param included_data_set [Array<String>] The set of A+ Content data types to include in the response. If you do
|
94
113
|
# not include this parameter, the operation returns the related ASINs without metadata.
|
95
|
-
# @param [Array<String>]
|
96
|
-
# @param [String]
|
114
|
+
# @param asin_set [Array<String>] The set of ASINs.
|
115
|
+
# @param page_token [String] A page token from the nextPageToken response element returned by your previous call
|
97
116
|
# to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next
|
98
117
|
# page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any
|
99
118
|
# other parameter will cause the request to fail. When no nextPageToken value is returned there are no more
|
100
119
|
# pages to return. A pageToken value is not usable across different operations.
|
101
|
-
# @
|
120
|
+
# @param rate_limit [Float] Requests per second
|
121
|
+
# @return [Peddler::Response] The API response
|
102
122
|
def list_content_document_asin_relations(content_reference_key, marketplace_id, included_data_set: nil,
|
103
|
-
asin_set: nil, page_token: nil)
|
123
|
+
asin_set: nil, page_token: nil, rate_limit: 10.0)
|
124
|
+
cannot_sandbox!
|
125
|
+
|
104
126
|
path = "/aplus/2020-11-01/contentDocuments/#{content_reference_key}/asins"
|
105
127
|
params = {
|
106
128
|
"marketplaceId" => marketplace_id,
|
@@ -109,37 +131,44 @@ module Peddler
|
|
109
131
|
"pageToken" => page_token,
|
110
132
|
}.compact
|
111
133
|
|
112
|
-
rate_limit
|
134
|
+
meter(rate_limit).get(path, params:)
|
113
135
|
end
|
114
136
|
|
115
137
|
# Replaces all ASINs related to the specified A+ Content document, if available. This may add or remove ASINs,
|
116
138
|
# depending on the current set of related ASINs. Removing an ASIN has the side effect of suspending the content
|
117
139
|
# document from that ASIN.
|
118
140
|
#
|
119
|
-
# @param [String]
|
141
|
+
# @param content_reference_key [String] The unique reference key for the A+ Content document. A content reference
|
120
142
|
# key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match
|
121
143
|
# any A+ content identifier.
|
122
|
-
# @param [String]
|
123
|
-
# @param [Hash]
|
124
|
-
# @
|
144
|
+
# @param marketplace_id [String] The identifier for the marketplace where the A+ Content is published.
|
145
|
+
# @param post_content_document_asin_relations_request [Hash] The content document ASIN relations request details.
|
146
|
+
# @param rate_limit [Float] Requests per second
|
147
|
+
# @return [Peddler::Response] The API response
|
125
148
|
def post_content_document_asin_relations(content_reference_key, marketplace_id,
|
126
|
-
post_content_document_asin_relations_request)
|
149
|
+
post_content_document_asin_relations_request, rate_limit: 10.0)
|
150
|
+
cannot_sandbox!
|
151
|
+
|
127
152
|
path = "/aplus/2020-11-01/contentDocuments/#{content_reference_key}/asins"
|
128
153
|
body = post_content_document_asin_relations_request
|
129
154
|
params = {
|
130
155
|
"marketplaceId" => marketplace_id,
|
131
156
|
}.compact
|
132
157
|
|
133
|
-
rate_limit
|
158
|
+
meter(rate_limit).post(path, body:, params:)
|
134
159
|
end
|
135
160
|
|
136
161
|
# Checks if the A+ Content document is valid for use on a set of ASINs.
|
137
162
|
#
|
138
|
-
# @param [String]
|
139
|
-
# @param [Array<String>]
|
140
|
-
# @param [Hash]
|
141
|
-
# @
|
142
|
-
|
163
|
+
# @param marketplace_id [String] The identifier for the marketplace where the A+ Content is published.
|
164
|
+
# @param asin_set [Array<String>] The set of ASINs.
|
165
|
+
# @param post_content_document_request [Hash] The content document request details.
|
166
|
+
# @param rate_limit [Float] Requests per second
|
167
|
+
# @return [Peddler::Response] The API response
|
168
|
+
def validate_content_document_asin_relations(marketplace_id, post_content_document_request, asin_set: nil,
|
169
|
+
rate_limit: 10.0)
|
170
|
+
cannot_sandbox!
|
171
|
+
|
143
172
|
path = "/aplus/2020-11-01/contentAsinValidations"
|
144
173
|
body = post_content_document_request
|
145
174
|
params = {
|
@@ -147,20 +176,23 @@ module Peddler
|
|
147
176
|
"asinSet" => asin_set,
|
148
177
|
}.compact
|
149
178
|
|
150
|
-
rate_limit
|
179
|
+
meter(rate_limit).post(path, body:, params:)
|
151
180
|
end
|
152
181
|
|
153
182
|
# Searches for A+ Content publishing records, if available.
|
154
183
|
#
|
155
|
-
# @param [String]
|
156
|
-
# @param [String]
|
157
|
-
# @param [String]
|
184
|
+
# @param marketplace_id [String] The identifier for the marketplace where the A+ Content is published.
|
185
|
+
# @param asin [String] The Amazon Standard Identification Number (ASIN).
|
186
|
+
# @param page_token [String] A page token from the nextPageToken response element returned by your previous call
|
158
187
|
# to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next
|
159
188
|
# page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any
|
160
189
|
# other parameter will cause the request to fail. When no nextPageToken value is returned there are no more
|
161
190
|
# pages to return. A pageToken value is not usable across different operations.
|
162
|
-
# @
|
163
|
-
|
191
|
+
# @param rate_limit [Float] Requests per second
|
192
|
+
# @return [Peddler::Response] The API response
|
193
|
+
def search_content_publish_records(marketplace_id, asin, page_token: nil, rate_limit: 10.0)
|
194
|
+
cannot_sandbox!
|
195
|
+
|
164
196
|
path = "/aplus/2020-11-01/contentPublishRecords"
|
165
197
|
params = {
|
166
198
|
"marketplaceId" => marketplace_id,
|
@@ -168,40 +200,46 @@ module Peddler
|
|
168
200
|
"pageToken" => page_token,
|
169
201
|
}.compact
|
170
202
|
|
171
|
-
rate_limit
|
203
|
+
meter(rate_limit).get(path, params:)
|
172
204
|
end
|
173
205
|
|
174
206
|
# Submits an A+ Content document for review, approval, and publishing.
|
175
207
|
#
|
176
|
-
# @param [String]
|
208
|
+
# @param content_reference_key [String] The unique reference key for the A+ Content document. A content reference
|
177
209
|
# key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match
|
178
210
|
# any A+ content identifier.
|
179
|
-
# @param [String]
|
180
|
-
# @
|
181
|
-
|
211
|
+
# @param marketplace_id [String] The identifier for the marketplace where the A+ Content is published.
|
212
|
+
# @param rate_limit [Float] Requests per second
|
213
|
+
# @return [Peddler::Response] The API response
|
214
|
+
def post_content_document_approval_submission(content_reference_key, marketplace_id, rate_limit: 10.0)
|
215
|
+
cannot_sandbox!
|
216
|
+
|
182
217
|
path = "/aplus/2020-11-01/contentDocuments/#{content_reference_key}/approvalSubmissions"
|
183
218
|
params = {
|
184
219
|
"marketplaceId" => marketplace_id,
|
185
220
|
}.compact
|
186
221
|
|
187
|
-
rate_limit
|
222
|
+
meter(rate_limit).post(path, params:)
|
188
223
|
end
|
189
224
|
|
190
225
|
# Submits a request to suspend visible A+ Content. This neither deletes the content document nor the ASIN
|
191
226
|
# relations.
|
192
227
|
#
|
193
|
-
# @param [String]
|
228
|
+
# @param content_reference_key [String] The unique reference key for the A+ Content document. A content reference
|
194
229
|
# key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match
|
195
230
|
# any A+ content identifier.
|
196
|
-
# @param [String]
|
197
|
-
# @
|
198
|
-
|
231
|
+
# @param marketplace_id [String] The identifier for the marketplace where the A+ Content is published.
|
232
|
+
# @param rate_limit [Float] Requests per second
|
233
|
+
# @return [Peddler::Response] The API response
|
234
|
+
def post_content_document_suspend_submission(content_reference_key, marketplace_id, rate_limit: 10.0)
|
235
|
+
cannot_sandbox!
|
236
|
+
|
199
237
|
path = "/aplus/2020-11-01/contentDocuments/#{content_reference_key}/suspendSubmissions"
|
200
238
|
params = {
|
201
239
|
"marketplaceId" => marketplace_id,
|
202
240
|
}.compact
|
203
241
|
|
204
|
-
rate_limit
|
242
|
+
meter(rate_limit).post(path, params:)
|
205
243
|
end
|
206
244
|
end
|
207
245
|
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "peddler/api"
|
4
|
+
|
5
|
+
module Peddler
|
6
|
+
class << self
|
7
|
+
def application_integrations_2024_04_01(...)
|
8
|
+
APIs::ApplicationIntegrations20240401.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module APIs
|
13
|
+
# The Selling Partner API for third party application integrations.
|
14
|
+
#
|
15
|
+
# With the AppIntegrations API v2024-04-01, you can send notifications to Amazon Selling Partners and display the
|
16
|
+
# notifications in Seller Central.
|
17
|
+
class ApplicationIntegrations20240401 < API
|
18
|
+
# Create a notification for sellers in Seller Central.
|
19
|
+
#
|
20
|
+
# @note This operation can make a static sandbox call.
|
21
|
+
# @param body [Hash] The request body for the `createNotification` operation.
|
22
|
+
# @param rate_limit [Float] Requests per second
|
23
|
+
# @return [Peddler::Response] The API response
|
24
|
+
def create_notification(body, rate_limit: 1.0)
|
25
|
+
path = "/appIntegrations/2024-04-01/notifications"
|
26
|
+
|
27
|
+
meter(rate_limit).post(path, body:)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Remove your application's notifications from the Appstore notifications dashboard.
|
31
|
+
#
|
32
|
+
# @note This operation can make a static sandbox call.
|
33
|
+
# @param body [Hash] The request body for the `deleteNotifications` operation.
|
34
|
+
# @param rate_limit [Float] Requests per second
|
35
|
+
# @return [Peddler::Response] The API response
|
36
|
+
def delete_notifications(body, rate_limit: 1.0)
|
37
|
+
path = "/appIntegrations/2024-04-01/notifications/deletion"
|
38
|
+
|
39
|
+
meter(rate_limit).post(path, body:)
|
40
|
+
end
|
41
|
+
|
42
|
+
# Records the seller's response to a notification.
|
43
|
+
#
|
44
|
+
# @note This operation can make a static sandbox call.
|
45
|
+
# @param notification_id [String] A `notificationId` uniquely identifies a notification.
|
46
|
+
# @param body [Hash] The request body for the `recordActionFeedback` operation.
|
47
|
+
# @param rate_limit [Float] Requests per second
|
48
|
+
# @return [Peddler::Response] The API response
|
49
|
+
def record_action_feedback(notification_id, body, rate_limit: 1.0)
|
50
|
+
path = "/appIntegrations/2024-04-01/notifications/#{notification_id}/feedback"
|
51
|
+
|
52
|
+
meter(rate_limit).post(path, body:)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -3,7 +3,13 @@
|
|
3
3
|
require "peddler/api"
|
4
4
|
|
5
5
|
module Peddler
|
6
|
-
class
|
6
|
+
class << self
|
7
|
+
def application_management_2023_11_30(...)
|
8
|
+
APIs::ApplicationManagement20231130.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module APIs
|
7
13
|
# Selling Partner API for Application Management
|
8
14
|
#
|
9
15
|
# The Selling Partner API for Application Management lets you programmatically update the client secret on
|
@@ -14,11 +20,15 @@ module Peddler
|
|
14
20
|
# generated and sent to the developer-registered queue. For more information, refer to [Rotate your application
|
15
21
|
# client
|
16
22
|
# secret](https://developer-docs.amazon.com/sp-api/v0/docs/application-management-api-v2023-11-30-use-case-guide#tutorial-rotate-your-applications-client-secret).
|
17
|
-
#
|
18
|
-
|
23
|
+
#
|
24
|
+
# @param rate_limit [Float] Requests per second
|
25
|
+
# @return [Peddler::Response] The API response
|
26
|
+
def rotate_application_client_secret(rate_limit: 0.0167)
|
27
|
+
cannot_sandbox!
|
28
|
+
|
19
29
|
path = "/applications/2023-11-30/clientSecret"
|
20
30
|
|
21
|
-
rate_limit
|
31
|
+
meter(rate_limit).post(path)
|
22
32
|
end
|
23
33
|
end
|
24
34
|
end
|
@@ -3,32 +3,41 @@
|
|
3
3
|
require "peddler/api"
|
4
4
|
|
5
5
|
module Peddler
|
6
|
-
class
|
6
|
+
class << self
|
7
|
+
def catalog_items_2020_12_01(...)
|
8
|
+
APIs::CatalogItems20201201.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module APIs
|
7
13
|
# Selling Partner API for Catalog Items
|
8
14
|
#
|
9
15
|
# The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon
|
10
|
-
# catalog. For more information, see the
|
11
|
-
#
|
16
|
+
# catalog. For more information, see the
|
17
|
+
# {https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2020-12-01-use-case-guide Catalog Items API Use
|
18
|
+
# Case Guide}.
|
12
19
|
class CatalogItems20201201 < API
|
13
20
|
# Search for and return a list of Amazon catalog items and associated information.
|
14
21
|
#
|
15
|
-
# @
|
22
|
+
# @note This operation can make a static sandbox call.
|
23
|
+
# @param keywords [Array<String>] A comma-delimited list of words or item identifiers to search the Amazon catalog
|
16
24
|
# for.
|
17
|
-
# @param [Array<String>]
|
18
|
-
# @param [Array<String>]
|
25
|
+
# @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
|
26
|
+
# @param included_data [Array<String>] A comma-delimited list of data sets to include in the response. Default:
|
19
27
|
# summaries.
|
20
|
-
# @param [Array<String>]
|
21
|
-
# @param [Array<String>]
|
28
|
+
# @param brand_names [Array<String>] A comma-delimited list of brand names to limit the search to.
|
29
|
+
# @param classification_ids [Array<String>] A comma-delimited list of classification identifiers to limit the
|
22
30
|
# search to.
|
23
|
-
# @param [Integer]
|
24
|
-
# @param [String]
|
25
|
-
# @param [String]
|
31
|
+
# @param page_size [Integer] Number of results to be returned per page.
|
32
|
+
# @param page_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
33
|
+
# @param keywords_locale [String] The language the keywords are provided in. Defaults to the primary locale of the
|
26
34
|
# marketplace.
|
27
|
-
# @param [String]
|
35
|
+
# @param locale [String] Locale for retrieving localized summaries. Defaults to the primary locale of the
|
28
36
|
# marketplace.
|
29
|
-
# @
|
30
|
-
|
31
|
-
|
37
|
+
# @param rate_limit [Float] Requests per second
|
38
|
+
# @return [Peddler::Response] The API response
|
39
|
+
def search_catalog_items(keywords, marketplace_ids, included_data: "summaries", brand_names: nil,
|
40
|
+
classification_ids: nil, page_size: 10, page_token: nil, keywords_locale: nil, locale: nil, rate_limit: 2.0)
|
32
41
|
path = "/catalog/2020-12-01/items"
|
33
42
|
params = {
|
34
43
|
"keywords" => keywords,
|
@@ -42,20 +51,22 @@ module Peddler
|
|
42
51
|
"locale" => locale,
|
43
52
|
}.compact
|
44
53
|
|
45
|
-
rate_limit
|
54
|
+
meter(rate_limit).get(path, params:)
|
46
55
|
end
|
47
56
|
|
48
57
|
# Retrieves details for an item in the Amazon catalog.
|
49
58
|
#
|
50
|
-
# @
|
51
|
-
# @param [
|
59
|
+
# @note This operation can make a static sandbox call.
|
60
|
+
# @param asin [String] The Amazon Standard Identification Number (ASIN) of the item.
|
61
|
+
# @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers. Data sets in
|
52
62
|
# the response contain data only for the specified marketplaces.
|
53
|
-
# @param [Array<String>]
|
63
|
+
# @param included_data [Array<String>] A comma-delimited list of data sets to include in the response. Default:
|
54
64
|
# summaries.
|
55
|
-
# @param [String]
|
65
|
+
# @param locale [String] Locale for retrieving localized summaries. Defaults to the primary locale of the
|
56
66
|
# marketplace.
|
57
|
-
# @
|
58
|
-
|
67
|
+
# @param rate_limit [Float] Requests per second
|
68
|
+
# @return [Peddler::Response] The API response
|
69
|
+
def get_catalog_item(asin, marketplace_ids, included_data: "summaries", locale: nil, rate_limit: 2.0)
|
59
70
|
path = "/catalog/2020-12-01/items/#{asin}"
|
60
71
|
params = {
|
61
72
|
"marketplaceIds" => marketplace_ids,
|
@@ -63,7 +74,7 @@ module Peddler
|
|
63
74
|
"locale" => locale,
|
64
75
|
}.compact
|
65
76
|
|
66
|
-
rate_limit
|
77
|
+
meter(rate_limit).get(path, params:)
|
67
78
|
end
|
68
79
|
end
|
69
80
|
end
|