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,42 +3,50 @@
|
|
3
3
|
require "peddler/api"
|
4
4
|
|
5
5
|
module Peddler
|
6
|
-
class
|
7
|
-
|
6
|
+
class << self
|
7
|
+
def catalog_items_2022_04_01(...)
|
8
|
+
APIs::CatalogItems20220401.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module APIs
|
13
|
+
# Catalog Items v2022-04-01
|
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, refer to the
|
11
|
-
#
|
16
|
+
# catalog. For more information, refer to the
|
17
|
+
# {https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2022-04-01-use-case-guide Catalog Items API Use
|
18
|
+
# Case Guide}.
|
12
19
|
class CatalogItems20220401 < API
|
13
20
|
# Search for and return a list of Amazon catalog items and associated information either by identifier or by
|
14
21
|
# keywords.
|
15
22
|
#
|
16
|
-
# @
|
23
|
+
# @note This operation can make a static sandbox call.
|
24
|
+
# @param identifiers [Array<String>] A comma-delimited list of product identifiers to search the Amazon catalog
|
17
25
|
# for. **Note:** Cannot be used with `keywords`.
|
18
|
-
# @param [String]
|
26
|
+
# @param identifiers_type [String] Type of product identifiers to search the Amazon catalog for. **Note:**
|
19
27
|
# Required when `identifiers` are provided.
|
20
|
-
# @param [Array<String>]
|
21
|
-
# @param [Array<String>]
|
28
|
+
# @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
|
29
|
+
# @param included_data [Array<String>] A comma-delimited list of data sets to include in the response. Default:
|
22
30
|
# `summaries`.
|
23
|
-
# @param [String]
|
31
|
+
# @param locale [String] Locale for retrieving localized summaries. Defaults to the primary locale of the
|
24
32
|
# marketplace.
|
25
|
-
# @param [String]
|
33
|
+
# @param seller_id [String] A selling partner identifier, such as a seller account or vendor code. **Note:**
|
26
34
|
# Required when `identifiersType` is `SKU`.
|
27
|
-
# @param [Array<String>]
|
35
|
+
# @param keywords [Array<String>] A comma-delimited list of words to search the Amazon catalog for. **Note:**
|
28
36
|
# Cannot be used with `identifiers`.
|
29
|
-
# @param [Array<String>]
|
37
|
+
# @param brand_names [Array<String>] A comma-delimited list of brand names to limit the search for
|
30
38
|
# `keywords`-based queries. **Note:** Cannot be used with `identifiers`.
|
31
|
-
# @param [Array<String>]
|
39
|
+
# @param classification_ids [Array<String>] A comma-delimited list of classification identifiers to limit the
|
32
40
|
# search for `keywords`-based queries. **Note:** Cannot be used with `identifiers`.
|
33
|
-
# @param [Integer]
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
41
|
+
# @param page_size [Integer] Number of results to be returned per page.
|
42
|
+
# @param page_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
43
|
+
# @param keywords_locale [String] The language of the keywords provided for `keywords`-based queries. Defaults to
|
36
44
|
# the primary locale of the marketplace. **Note:** Cannot be used with `identifiers`.
|
37
|
-
# @
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
45
|
+
# @param rate_limit [Float] Requests per second
|
46
|
+
# @return [Peddler::Response] The API response
|
47
|
+
def search_catalog_items(marketplace_ids, identifiers: nil, identifiers_type: nil, included_data: ["summaries"],
|
48
|
+
locale: nil, seller_id: nil, keywords: nil, brand_names: nil, classification_ids: nil, page_size: 10,
|
49
|
+
page_token: nil, keywords_locale: nil, rate_limit: 2.0)
|
42
50
|
path = "/catalog/2022-04-01/items"
|
43
51
|
params = {
|
44
52
|
"identifiers" => identifiers,
|
@@ -55,20 +63,22 @@ module Peddler
|
|
55
63
|
"keywordsLocale" => keywords_locale,
|
56
64
|
}.compact
|
57
65
|
|
58
|
-
rate_limit
|
66
|
+
meter(rate_limit).get(path, params:)
|
59
67
|
end
|
60
68
|
|
61
69
|
# Retrieves details for an item in the Amazon catalog.
|
62
70
|
#
|
63
|
-
# @
|
64
|
-
# @param [
|
71
|
+
# @note This operation can make a static sandbox call.
|
72
|
+
# @param asin [String] The Amazon Standard Identification Number (ASIN) of the item.
|
73
|
+
# @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers. Data sets in
|
65
74
|
# the response contain data only for the specified marketplaces.
|
66
|
-
# @param [Array<String>]
|
75
|
+
# @param included_data [Array<String>] A comma-delimited list of data sets to include in the response. Default:
|
67
76
|
# `summaries`.
|
68
|
-
# @param [String]
|
77
|
+
# @param locale [String] Locale for retrieving localized summaries. Defaults to the primary locale of the
|
69
78
|
# marketplace.
|
70
|
-
# @
|
71
|
-
|
79
|
+
# @param rate_limit [Float] Requests per second
|
80
|
+
# @return [Peddler::Response] The API response
|
81
|
+
def get_catalog_item(asin, marketplace_ids, included_data: ["summaries"], locale: nil, rate_limit: 2.0)
|
72
82
|
path = "/catalog/2022-04-01/items/#{asin}"
|
73
83
|
params = {
|
74
84
|
"marketplaceIds" => marketplace_ids,
|
@@ -76,7 +86,7 @@ module Peddler
|
|
76
86
|
"locale" => locale,
|
77
87
|
}.compact
|
78
88
|
|
79
|
-
rate_limit
|
89
|
+
meter(rate_limit).get(path, params:)
|
80
90
|
end
|
81
91
|
end
|
82
92
|
end
|
@@ -3,7 +3,13 @@
|
|
3
3
|
require "peddler/api"
|
4
4
|
|
5
5
|
module Peddler
|
6
|
-
class
|
6
|
+
class << self
|
7
|
+
def catalog_items_v0(...)
|
8
|
+
APIs::CatalogItemsV0.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 helps you programmatically retrieve item details for items in the
|
@@ -11,29 +17,32 @@ module Peddler
|
|
11
17
|
class CatalogItemsV0 < API
|
12
18
|
# Effective September 30, 2022, the `listCatalogItems` operation will no longer be available in the Selling
|
13
19
|
# Partner API for Catalog Items v0. As an alternative, `searchCatalogItems` is available in the latest version of
|
14
|
-
# the
|
15
|
-
# Integrations that rely on the `listCatalogItems` operation should migrate to the
|
16
|
-
# to avoid service disruption. _Note:_ The
|
17
|
-
# being deprecated and you can continue to
|
20
|
+
# the {https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2022-04-01-reference Selling Partner API
|
21
|
+
# for Catalog Items v2022-04-01}. Integrations that rely on the `listCatalogItems` operation should migrate to the
|
22
|
+
# `searchCatalogItems`operation to avoid service disruption. _Note:_ The
|
23
|
+
# [`listCatalogCategories`](#get-catalogv0categories) operation is not being deprecated and you can continue to
|
24
|
+
# make calls to it.
|
18
25
|
#
|
19
|
-
# @
|
20
|
-
# @param [String]
|
21
|
-
# @param [String]
|
26
|
+
# @note This operation can make a static sandbox call.
|
27
|
+
# @param marketplace_id [String] A marketplace identifier. Specifies the marketplace for which items are returned.
|
28
|
+
# @param query [String] Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'.
|
29
|
+
# @param query_context_id [String] An identifier for the context within which the given search will be performed.
|
22
30
|
# A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example,
|
23
31
|
# the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter
|
24
32
|
# specifies such a subset. If it is omitted, the search will be performed using the default context for the
|
25
33
|
# marketplace, which will typically contain the largest set of items.
|
26
|
-
# @param [String]
|
34
|
+
# @param seller_sku [String] Used to identify an item in the given marketplace. SellerSKU is qualified by the
|
27
35
|
# seller's SellerId, which is included with every operation that you submit.
|
28
|
-
# @param [String]
|
29
|
-
# @param [String]
|
36
|
+
# @param upc [String] A 12-digit bar code used for retail packaging.
|
37
|
+
# @param ean [String] A European article number that uniquely identifies the catalog item, manufacturer, and its
|
30
38
|
# attributes.
|
31
|
-
# @param [String]
|
32
|
-
# @param [String]
|
39
|
+
# @param isbn [String] The unique commercial book identifier used to identify books internationally.
|
40
|
+
# @param jan [String] A Japanese article number that uniquely identifies the product, manufacturer, and its
|
33
41
|
# attributes.
|
34
|
-
# @
|
42
|
+
# @param rate_limit [Float] Requests per second
|
43
|
+
# @return [Peddler::Response] The API response
|
35
44
|
def list_catalog_items(marketplace_id, query: nil, query_context_id: nil, seller_sku: nil, upc: nil, ean: nil,
|
36
|
-
isbn: nil, jan: nil)
|
45
|
+
isbn: nil, jan: nil, rate_limit: nil)
|
37
46
|
path = "/catalog/v0/items"
|
38
47
|
params = {
|
39
48
|
"MarketplaceId" => marketplace_id,
|
@@ -50,16 +59,18 @@ module Peddler
|
|
50
59
|
end
|
51
60
|
|
52
61
|
# Effective September 30, 2022, the `getCatalogItem` operation will no longer be available in the Selling Partner
|
53
|
-
# API for Catalog Items v0. This operation is available in the latest version of the
|
54
|
-
#
|
55
|
-
# operation should migrate to the latest version to
|
56
|
-
# [`listCatalogCategories`](#get-catalogv0categories) operation is not being
|
57
|
-
# make calls to it.
|
62
|
+
# API for Catalog Items v0. This operation is available in the latest version of the
|
63
|
+
# {https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2022-04-01-reference Selling Partner API for
|
64
|
+
# Catalog Items v2022-04-01}. Integrations that rely on this operation should migrate to the latest version to
|
65
|
+
# avoid service disruption. _Note:_ The [`listCatalogCategories`](#get-catalogv0categories) operation is not being
|
66
|
+
# deprecated and you can continue to make calls to it.
|
58
67
|
#
|
59
|
-
# @
|
60
|
-
# @param [String]
|
61
|
-
# @
|
62
|
-
|
68
|
+
# @note This operation can make a static sandbox call.
|
69
|
+
# @param marketplace_id [String] A marketplace identifier. Specifies the marketplace for the item.
|
70
|
+
# @param asin [String] The Amazon Standard Identification Number (ASIN) of the item.
|
71
|
+
# @param rate_limit [Float] Requests per second
|
72
|
+
# @return [Peddler::Response] The API response
|
73
|
+
def get_catalog_item(marketplace_id, asin, rate_limit: nil)
|
63
74
|
path = "/catalog/v0/items/#{asin}"
|
64
75
|
params = {
|
65
76
|
"MarketplaceId" => marketplace_id,
|
@@ -70,12 +81,14 @@ module Peddler
|
|
70
81
|
|
71
82
|
# Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU.
|
72
83
|
#
|
73
|
-
# @
|
74
|
-
# @param [String]
|
75
|
-
# @param [String]
|
84
|
+
# @note This operation can make a static sandbox call.
|
85
|
+
# @param marketplace_id [String] A marketplace identifier. Specifies the marketplace for the item.
|
86
|
+
# @param asin [String] The Amazon Standard Identification Number (ASIN) of the item.
|
87
|
+
# @param seller_sku [String] Used to identify items in the given marketplace. SellerSKU is qualified by the
|
76
88
|
# seller's SellerId, which is included with every operation that you submit.
|
77
|
-
# @
|
78
|
-
|
89
|
+
# @param rate_limit [Float] Requests per second
|
90
|
+
# @return [Peddler::Response] The API response
|
91
|
+
def list_catalog_categories(marketplace_id, asin: nil, seller_sku: nil, rate_limit: 1.0)
|
79
92
|
path = "/catalog/v0/categories"
|
80
93
|
params = {
|
81
94
|
"MarketplaceId" => marketplace_id,
|
@@ -83,7 +96,7 @@ module Peddler
|
|
83
96
|
"SellerSKU" => seller_sku,
|
84
97
|
}.compact
|
85
98
|
|
86
|
-
rate_limit
|
99
|
+
meter(rate_limit).get(path, params:)
|
87
100
|
end
|
88
101
|
end
|
89
102
|
end
|
@@ -3,7 +3,13 @@
|
|
3
3
|
require "peddler/api"
|
4
4
|
|
5
5
|
module Peddler
|
6
|
-
class
|
6
|
+
class << self
|
7
|
+
def data_kiosk_2023_11_15(...)
|
8
|
+
APIs::DataKiosk20231115.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module APIs
|
7
13
|
# Selling Partner API for Data Kiosk
|
8
14
|
#
|
9
15
|
# The Selling Partner API for Data Kiosk lets you submit GraphQL queries from a variety of schemas to help selling
|
@@ -12,20 +18,22 @@ module Peddler
|
|
12
18
|
# Returns details for the Data Kiosk queries that match the specified filters. See the `createQuery` operation for
|
13
19
|
# details about query retention.
|
14
20
|
#
|
15
|
-
# @
|
16
|
-
# @param [
|
17
|
-
# @param [
|
21
|
+
# @note This operation can make a static sandbox call.
|
22
|
+
# @param processing_statuses [Array<String>] A list of processing statuses used to filter queries.
|
23
|
+
# @param page_size [Integer] The maximum number of queries to return in a single call.
|
24
|
+
# @param created_since [String] The earliest query creation date and time for queries to include in the response,
|
18
25
|
# in ISO 8601 date time format. The default is 90 days ago.
|
19
|
-
# @param [String]
|
26
|
+
# @param created_until [String] The latest query creation date and time for queries to include in the response, in
|
20
27
|
# ISO 8601 date time format. The default is the time of the `getQueries` request.
|
21
|
-
# @param [String]
|
28
|
+
# @param pagination_token [String] A token to fetch a certain page of results when there are multiple pages of
|
22
29
|
# results available. The value of this token is fetched from the `pagination.nextToken` field returned in the
|
23
30
|
# `GetQueriesResponse` object. All other parameters must be provided with the same values that were provided
|
24
31
|
# with the request that generated this token, with the exception of `pageSize` which can be modified between
|
25
32
|
# calls to `getQueries`. In the absence of this token value, `getQueries` returns the first page of results.
|
26
|
-
# @
|
27
|
-
|
28
|
-
|
33
|
+
# @param rate_limit [Float] Requests per second
|
34
|
+
# @return [Peddler::Response] The API response
|
35
|
+
def get_queries(processing_statuses: nil, page_size: 10, created_since: nil, created_until: nil,
|
36
|
+
pagination_token: nil, rate_limit: 0.0222)
|
29
37
|
path = "/dataKiosk/2023-11-15/queries"
|
30
38
|
params = {
|
31
39
|
"processingStatuses" => processing_statuses,
|
@@ -35,21 +43,23 @@ module Peddler
|
|
35
43
|
"paginationToken" => pagination_token,
|
36
44
|
}.compact
|
37
45
|
|
38
|
-
rate_limit
|
46
|
+
meter(rate_limit).get(path, params:)
|
39
47
|
end
|
40
48
|
|
41
|
-
# Creates a Data Kiosk query request.
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
49
|
+
# Creates a Data Kiosk query request. **Note:** The retention of a query varies based on the fields requested.
|
50
|
+
# Each field within a schema is annotated with a `@resultRetention` directive that defines how long a query
|
51
|
+
# containing that field will be retained. When a query contains multiple fields with different retentions, the
|
52
|
+
# shortest (minimum) retention is applied. The retention of a query's resulting documents always matches the
|
53
|
+
# retention of the query.
|
46
54
|
#
|
47
|
-
# @
|
48
|
-
# @
|
49
|
-
|
55
|
+
# @note This operation can make a static sandbox call.
|
56
|
+
# @param body [Hash] The body of the request.
|
57
|
+
# @param rate_limit [Float] Requests per second
|
58
|
+
# @return [Peddler::Response] The API response
|
59
|
+
def create_query(body, rate_limit: 0.0167)
|
50
60
|
path = "/dataKiosk/2023-11-15/queries"
|
51
61
|
|
52
|
-
rate_limit
|
62
|
+
meter(rate_limit).post(path, body:)
|
53
63
|
end
|
54
64
|
|
55
65
|
# Cancels the query specified by the `queryId` parameter. Only queries with a non-terminal `processingStatus`
|
@@ -57,35 +67,41 @@ module Peddler
|
|
57
67
|
# `CANCELLED` will no-op. Cancelled queries are returned in subsequent calls to the `getQuery` and `getQueries`
|
58
68
|
# operations.
|
59
69
|
#
|
60
|
-
# @
|
70
|
+
# @note This operation can make a static sandbox call.
|
71
|
+
# @param query_id [String] The identifier for the query. This identifier is unique only in combination with a
|
61
72
|
# selling partner account ID.
|
62
|
-
# @
|
63
|
-
|
73
|
+
# @param rate_limit [Float] Requests per second
|
74
|
+
# @return [Peddler::Response] The API response
|
75
|
+
def cancel_query(query_id, rate_limit: 0.0222)
|
64
76
|
path = "/dataKiosk/2023-11-15/queries/#{query_id}"
|
65
77
|
|
66
|
-
rate_limit
|
78
|
+
meter(rate_limit).delete(path)
|
67
79
|
end
|
68
80
|
|
69
81
|
# Returns query details for the query specified by the `queryId` parameter. See the `createQuery` operation for
|
70
82
|
# details about query retention.
|
71
83
|
#
|
72
|
-
# @
|
73
|
-
# @
|
74
|
-
|
84
|
+
# @note This operation can make a static sandbox call.
|
85
|
+
# @param query_id [String] The query identifier.
|
86
|
+
# @param rate_limit [Float] Requests per second
|
87
|
+
# @return [Peddler::Response] The API response
|
88
|
+
def get_query(query_id, rate_limit: 2.0)
|
75
89
|
path = "/dataKiosk/2023-11-15/queries/#{query_id}"
|
76
90
|
|
77
|
-
rate_limit
|
91
|
+
meter(rate_limit).get(path)
|
78
92
|
end
|
79
93
|
|
80
94
|
# Returns the information required for retrieving a Data Kiosk document's contents. See the `createQuery`
|
81
95
|
# operation for details about document retention.
|
82
96
|
#
|
83
|
-
# @
|
84
|
-
# @
|
85
|
-
|
97
|
+
# @note This operation can make a static sandbox call.
|
98
|
+
# @param document_id [String] The identifier for the Data Kiosk document.
|
99
|
+
# @param rate_limit [Float] Requests per second
|
100
|
+
# @return [Peddler::Response] The API response
|
101
|
+
def get_document(document_id, rate_limit: 0.0167)
|
86
102
|
path = "/dataKiosk/2023-11-15/documents/#{document_id}"
|
87
103
|
|
88
|
-
rate_limit
|
104
|
+
meter(rate_limit).get(path)
|
89
105
|
end
|
90
106
|
end
|
91
107
|
end
|
@@ -0,0 +1,126 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "peddler/api"
|
4
|
+
|
5
|
+
module Peddler
|
6
|
+
class << self
|
7
|
+
def easy_ship_2022_03_23(...)
|
8
|
+
APIs::EasyShip20220323.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module APIs
|
13
|
+
# Selling Partner API for Easy Ship
|
14
|
+
#
|
15
|
+
# The Selling Partner API for Easy Ship helps you build applications that help sellers manage and ship Amazon Easy
|
16
|
+
# Ship orders. Your Easy Ship applications can: * Get available time slots for packages to be scheduled for
|
17
|
+
# delivery. * Schedule, reschedule, and cancel Easy Ship orders. * Print labels, invoices, and warranties. See the
|
18
|
+
# {https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table
|
19
|
+
# Marketplace Support Table} for the differences in Easy Ship operations by marketplace.
|
20
|
+
class EasyShip20220323 < API
|
21
|
+
# Returns time slots available for Easy Ship orders to be scheduled based on the package weight and dimensions
|
22
|
+
# that the seller specifies. This operation is available for scheduled and unscheduled orders based on marketplace
|
23
|
+
# support. See **Get Time Slots** in the
|
24
|
+
# {https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table
|
25
|
+
# Marketplace Support Table}. This operation can return time slots that have either pickup or drop-off handover
|
26
|
+
# methods - see **Supported Handover Methods** in the
|
27
|
+
# {https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table
|
28
|
+
# Marketplace Support Table}.
|
29
|
+
#
|
30
|
+
# @note This operation can make a static sandbox call.
|
31
|
+
# @param list_handover_slots_request [Hash] The request schema for the `listHandoverSlots` operation.
|
32
|
+
# @param rate_limit [Float] Requests per second
|
33
|
+
# @return [Peddler::Response] The API response
|
34
|
+
def list_handover_slots(list_handover_slots_request: nil, rate_limit: 1.0)
|
35
|
+
path = "/easyShip/2022-03-23/timeSlot"
|
36
|
+
body = list_handover_slots_request
|
37
|
+
|
38
|
+
meter(rate_limit).post(path, body:)
|
39
|
+
end
|
40
|
+
|
41
|
+
# Returns information about a package, including dimensions, weight, time slot information for handover, invoice
|
42
|
+
# and item information, and status.
|
43
|
+
#
|
44
|
+
# @note This operation can make a static sandbox call.
|
45
|
+
# @param amazon_order_id [String] An Amazon-defined order identifier. Identifies the order that the seller wants
|
46
|
+
# to deliver using Amazon Easy Ship.
|
47
|
+
# @param marketplace_id [String] An identifier for the marketplace in which the seller is selling.
|
48
|
+
# @param rate_limit [Float] Requests per second
|
49
|
+
# @return [Peddler::Response] The API response
|
50
|
+
def get_scheduled_package(amazon_order_id, marketplace_id, rate_limit: 1.0)
|
51
|
+
path = "/easyShip/2022-03-23/package"
|
52
|
+
params = {
|
53
|
+
"amazonOrderId" => amazon_order_id,
|
54
|
+
"marketplaceId" => marketplace_id,
|
55
|
+
}.compact
|
56
|
+
|
57
|
+
meter(rate_limit).get(path, params:)
|
58
|
+
end
|
59
|
+
|
60
|
+
# Schedules an Easy Ship order and returns the scheduled package information. This operation does the following: *
|
61
|
+
# Specifies the time slot and handover method for the order to be scheduled for delivery. * Updates the Easy Ship
|
62
|
+
# order status. * Generates a shipping label and an invoice. Calling `createScheduledPackage` also generates a
|
63
|
+
# warranty document if you specify a `SerialNumber` value. To get these documents, see
|
64
|
+
# {https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide How to get invoice,
|
65
|
+
# shipping label, and warranty documents}. * Shows the status of Easy Ship orders when you call the `getOrders`
|
66
|
+
# operation of the Selling Partner API for Orders and examine the `EasyShipShipmentStatus` property in the
|
67
|
+
# response body. See the **Shipping Label**, **Invoice**, and **Warranty** columns in the
|
68
|
+
# {https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table
|
69
|
+
# Marketplace Support Table} to see which documents are supported in each marketplace.
|
70
|
+
#
|
71
|
+
# @note This operation can make a static sandbox call.
|
72
|
+
# @param create_scheduled_package_request [Hash] The request schema for the `createScheduledPackage` operation.
|
73
|
+
# @param rate_limit [Float] Requests per second
|
74
|
+
# @return [Peddler::Response] The API response
|
75
|
+
def create_scheduled_package(create_scheduled_package_request, rate_limit: 1.0)
|
76
|
+
path = "/easyShip/2022-03-23/package"
|
77
|
+
body = create_scheduled_package_request
|
78
|
+
|
79
|
+
meter(rate_limit).post(path, body:)
|
80
|
+
end
|
81
|
+
|
82
|
+
# Updates the time slot for handing over the package indicated by the specified `scheduledPackageId`. You can get
|
83
|
+
# the new `slotId` value for the time slot by calling the `listHandoverSlots` operation before making another
|
84
|
+
# `patch` call. See the **Update Package** column in the
|
85
|
+
# {https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table
|
86
|
+
# Marketplace Support Table} to see which marketplaces this operation is supported in.
|
87
|
+
#
|
88
|
+
# @note This operation can make a static sandbox call.
|
89
|
+
# @param update_scheduled_packages_request [Hash] The request schema for the `updateScheduledPackages` operation.
|
90
|
+
# @param rate_limit [Float] Requests per second
|
91
|
+
# @return [Peddler::Response] The API response
|
92
|
+
def update_scheduled_packages(update_scheduled_packages_request: nil, rate_limit: 1.0)
|
93
|
+
path = "/easyShip/2022-03-23/package"
|
94
|
+
body = update_scheduled_packages_request
|
95
|
+
|
96
|
+
meter(rate_limit).patch(path, body:)
|
97
|
+
end
|
98
|
+
|
99
|
+
# This operation automatically schedules a time slot for all specified `amazonOrderId` values and generates the
|
100
|
+
# associated shipping labels and compliance documents based on the marketplace. For more information, refer to the
|
101
|
+
# [marketplace support
|
102
|
+
# table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table).
|
103
|
+
# You can optionally assign a `packageDetails` object to input a preferred time slot for each order in your
|
104
|
+
# request. In such cases, Amazon schedules the respective packages using the specified optional settings. If you
|
105
|
+
# don't specify a time slot, Amazon assigns the earliest available time slot. You can choose PDF or ZPL for your
|
106
|
+
# shipping label's file format and Amazon creates the label accordingly. This operation returns an array that
|
107
|
+
# contains the scheduled packages, and a temporary URL that you can use to access a ZIP file. The ZIP file
|
108
|
+
# includes the generated shipping labels and any other documents that are required for your marketplace. If an
|
109
|
+
# order can't be scheduled, Amazon adds the `rejectedOrders` list in the response. The response contains an entry
|
110
|
+
# for each order that could not be processed. Each entry contains an error message that describes the reason for
|
111
|
+
# the failure. The following table contains the supported request and burst maximum rates:
|
112
|
+
#
|
113
|
+
# @note This operation can make a static sandbox call.
|
114
|
+
# @param create_scheduled_packages_request [Hash] The request schema for the `createScheduledPackageBulk`
|
115
|
+
# operation.
|
116
|
+
# @param rate_limit [Float] Requests per second
|
117
|
+
# @return [Peddler::Response] The API response
|
118
|
+
def create_scheduled_package_bulk(create_scheduled_packages_request, rate_limit: 1.0)
|
119
|
+
path = "/easyShip/2022-03-23/packages/bulk"
|
120
|
+
body = create_scheduled_packages_request
|
121
|
+
|
122
|
+
meter(rate_limit).post(path, body:)
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
@@ -3,7 +3,13 @@
|
|
3
3
|
require "peddler/api"
|
4
4
|
|
5
5
|
module Peddler
|
6
|
-
class
|
6
|
+
class << self
|
7
|
+
def fba_inbound_eligibility_v1(...)
|
8
|
+
APIs::FBAInboundEligibilityV1.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module APIs
|
7
13
|
# Selling Partner API for FBA Inbound Eligibilty
|
8
14
|
#
|
9
15
|
# With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for
|
@@ -16,12 +22,14 @@ module Peddler
|
|
16
22
|
# preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which
|
17
23
|
# you want to determine the item's eligibility.
|
18
24
|
#
|
19
|
-
# @
|
25
|
+
# @note This operation can make a static sandbox call.
|
26
|
+
# @param marketplace_ids [Array<String>] The identifier for the marketplace in which you want to determine
|
20
27
|
# eligibility. Required only when program=INBOUND.
|
21
|
-
# @param [String]
|
22
|
-
# @param [String]
|
23
|
-
# @
|
24
|
-
|
28
|
+
# @param asin [String] The ASIN of the item for which you want an eligibility preview.
|
29
|
+
# @param program [String] The program that you want to check eligibility against.
|
30
|
+
# @param rate_limit [Float] Requests per second
|
31
|
+
# @return [Peddler::Response] The API response
|
32
|
+
def get_item_eligibility_preview(asin, program, marketplace_ids: nil, rate_limit: 1.0)
|
25
33
|
path = "/fba/inbound/v1/eligibility/itemPreview"
|
26
34
|
params = {
|
27
35
|
"marketplaceIds" => marketplace_ids,
|
@@ -29,7 +37,7 @@ module Peddler
|
|
29
37
|
"program" => program,
|
30
38
|
}.compact
|
31
39
|
|
32
|
-
rate_limit
|
40
|
+
meter(rate_limit).get(path, params:)
|
33
41
|
end
|
34
42
|
end
|
35
43
|
end
|