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
@@ -0,0 +1,136 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "peddler/api"
|
4
|
+
|
5
|
+
module Peddler
|
6
|
+
class << self
|
7
|
+
def listings_items_2021_08_01(...)
|
8
|
+
APIs::ListingsItems20210801.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module APIs
|
13
|
+
# Listings Items v2021-08-01
|
14
|
+
#
|
15
|
+
# The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner
|
16
|
+
# listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which
|
17
|
+
# you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more
|
18
|
+
# information, see the [Listings Items API Use Case
|
19
|
+
# Guide](https://developer-docs.amazon.com/sp-api/docs/listings-items-api-v2021-08-01-use-case-guide).
|
20
|
+
class ListingsItems20210801 < API
|
21
|
+
# Delete a listings item for a selling partner. **Note:** The parameters associated with this operation may
|
22
|
+
# contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when
|
23
|
+
# encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).
|
24
|
+
#
|
25
|
+
# @note This operation can make a static sandbox call.
|
26
|
+
# @param seller_id [String] A selling partner identifier, such as a merchant account or vendor code.
|
27
|
+
# @param sku [String] A selling partner provided identifier for an Amazon listing.
|
28
|
+
# @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
|
29
|
+
# @param issue_locale [String] A locale for localization of issues. When not provided, the default language code
|
30
|
+
# of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US`
|
31
|
+
# when a localization is not available in the specified locale.
|
32
|
+
# @param rate_limit [Float] Requests per second
|
33
|
+
# @return [Peddler::Response] The API response
|
34
|
+
def delete_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, rate_limit: 5.0)
|
35
|
+
path = "/listings/2021-08-01/items/#{seller_id}/#{sku}"
|
36
|
+
params = {
|
37
|
+
"marketplaceIds" => marketplace_ids,
|
38
|
+
"issueLocale" => issue_locale,
|
39
|
+
}.compact
|
40
|
+
|
41
|
+
meter(rate_limit).delete(path, params:)
|
42
|
+
end
|
43
|
+
|
44
|
+
# Returns details about a listings item for a selling partner. **Note:** The parameters associated with this
|
45
|
+
# operation may contain special characters that must be encoded to successfully call the API. To avoid errors with
|
46
|
+
# SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).
|
47
|
+
#
|
48
|
+
# @note This operation can make a static sandbox call.
|
49
|
+
# @param seller_id [String] A selling partner identifier, such as a merchant account or vendor code.
|
50
|
+
# @param sku [String] A selling partner provided identifier for an Amazon listing.
|
51
|
+
# @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
|
52
|
+
# @param issue_locale [String] A locale for localization of issues. When not provided, the default language code
|
53
|
+
# of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US`
|
54
|
+
# when a localization is not available in the specified locale.
|
55
|
+
# @param included_data [Array<String>] A comma-delimited list of data sets to include in the response. Default:
|
56
|
+
# `summaries`.
|
57
|
+
# @param rate_limit [Float] Requests per second
|
58
|
+
# @return [Peddler::Response] The API response
|
59
|
+
def get_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, included_data: ["summaries"],
|
60
|
+
rate_limit: 5.0)
|
61
|
+
path = "/listings/2021-08-01/items/#{seller_id}/#{sku}"
|
62
|
+
params = {
|
63
|
+
"marketplaceIds" => marketplace_ids,
|
64
|
+
"issueLocale" => issue_locale,
|
65
|
+
"includedData" => included_data,
|
66
|
+
}.compact
|
67
|
+
|
68
|
+
meter(rate_limit).get(path, params:)
|
69
|
+
end
|
70
|
+
|
71
|
+
# Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be
|
72
|
+
# patched. Patching nested attributes is not supported. **Note:** This operation has a throttling rate of one
|
73
|
+
# request per second when `mode` is `VALIDATION_PREVIEW`. **Note:** The parameters associated with this operation
|
74
|
+
# may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when
|
75
|
+
# encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).
|
76
|
+
#
|
77
|
+
# @note This operation can make a static sandbox call.
|
78
|
+
# @param seller_id [String] A selling partner identifier, such as a merchant account or vendor code.
|
79
|
+
# @param sku [String] A selling partner provided identifier for an Amazon listing.
|
80
|
+
# @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
|
81
|
+
# @param included_data [Array<String>] A comma-delimited list of data sets to include in the response. Default:
|
82
|
+
# `issues`.
|
83
|
+
# @param mode [String] The mode of operation for the request.
|
84
|
+
# @param issue_locale [String] A locale for localization of issues. When not provided, the default language code
|
85
|
+
# of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US`
|
86
|
+
# when a localization is not available in the specified locale.
|
87
|
+
# @param body [Hash] The request body schema for the `patchListingsItem` operation.
|
88
|
+
# @param rate_limit [Float] Requests per second
|
89
|
+
# @return [Peddler::Response] The API response
|
90
|
+
def patch_listings_item(seller_id, sku, marketplace_ids, body, included_data: ["issues"], mode: nil,
|
91
|
+
issue_locale: nil, rate_limit: 5.0)
|
92
|
+
path = "/listings/2021-08-01/items/#{seller_id}/#{sku}"
|
93
|
+
params = {
|
94
|
+
"marketplaceIds" => marketplace_ids,
|
95
|
+
"includedData" => included_data,
|
96
|
+
"mode" => mode,
|
97
|
+
"issueLocale" => issue_locale,
|
98
|
+
}.compact
|
99
|
+
|
100
|
+
meter(rate_limit).patch(path, body:, params:)
|
101
|
+
end
|
102
|
+
|
103
|
+
# Creates or fully updates an existing listings item for a selling partner. **Note:** This operation has a
|
104
|
+
# throttling rate of one request per second when `mode` is `VALIDATION_PREVIEW`. **Note:** The parameters
|
105
|
+
# associated with this operation may contain special characters that must be encoded to successfully call the API.
|
106
|
+
# To avoid errors with SKUs when encoding URLs, refer to [URL
|
107
|
+
# Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).
|
108
|
+
#
|
109
|
+
# @note This operation can make a static sandbox call.
|
110
|
+
# @param seller_id [String] A selling partner identifier, such as a merchant account or vendor code.
|
111
|
+
# @param sku [String] A selling partner provided identifier for an Amazon listing.
|
112
|
+
# @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
|
113
|
+
# @param included_data [Array<String>] A comma-delimited list of data sets to include in the response. Default:
|
114
|
+
# `issues`.
|
115
|
+
# @param mode [String] The mode of operation for the request.
|
116
|
+
# @param issue_locale [String] A locale for localization of issues. When not provided, the default language code
|
117
|
+
# of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US`
|
118
|
+
# when a localization is not available in the specified locale.
|
119
|
+
# @param body [Hash] The request body schema for the `putListingsItem` operation.
|
120
|
+
# @param rate_limit [Float] Requests per second
|
121
|
+
# @return [Peddler::Response] The API response
|
122
|
+
def put_listings_item(seller_id, sku, marketplace_ids, body, included_data: ["issues"], mode: nil,
|
123
|
+
issue_locale: nil, rate_limit: 5.0)
|
124
|
+
path = "/listings/2021-08-01/items/#{seller_id}/#{sku}"
|
125
|
+
params = {
|
126
|
+
"marketplaceIds" => marketplace_ids,
|
127
|
+
"includedData" => included_data,
|
128
|
+
"mode" => mode,
|
129
|
+
"issueLocale" => issue_locale,
|
130
|
+
}.compact
|
131
|
+
|
132
|
+
meter(rate_limit).put(path, body:, params:)
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
@@ -3,24 +3,34 @@
|
|
3
3
|
require "peddler/api"
|
4
4
|
|
5
5
|
module Peddler
|
6
|
-
class
|
6
|
+
class << self
|
7
|
+
def listings_restrictions_2021_08_01(...)
|
8
|
+
APIs::ListingsRestrictions20210801.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module APIs
|
7
13
|
# Selling Partner API for Listings Restrictions
|
8
14
|
#
|
9
15
|
# The Selling Partner API for Listings Restrictions provides programmatic access to restrictions on Amazon catalog
|
10
|
-
# listings. For more information, see the
|
11
|
-
#
|
16
|
+
# listings. For more information, see the
|
17
|
+
# {https://developer-docs.amazon.com/sp-api/docs/listings-restrictions-api-v2021-08-01-use-case-guide Listings
|
18
|
+
# Restrictions API Use Case Guide}.
|
12
19
|
class ListingsRestrictions20210801 < API
|
13
20
|
# Returns listing restrictions for an item in the Amazon Catalog.
|
14
21
|
#
|
15
|
-
# @
|
16
|
-
# @param [String]
|
17
|
-
# @param [String]
|
18
|
-
# @param [
|
19
|
-
# @param [String]
|
22
|
+
# @note This operation can make a static sandbox call.
|
23
|
+
# @param asin [String] The Amazon Standard Identification Number (ASIN) of the item.
|
24
|
+
# @param condition_type [String] The condition used to filter restrictions.
|
25
|
+
# @param seller_id [String] A selling partner identifier, such as a merchant account.
|
26
|
+
# @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
|
27
|
+
# @param reason_locale [String] A locale for reason text localization. When not provided, the default language
|
20
28
|
# code of the first marketplace is used. Examples: "en_US", "fr_CA", "fr_FR". Localized messages default to
|
21
29
|
# "en_US" when a localization is not available in the specified locale.
|
22
|
-
# @
|
23
|
-
|
30
|
+
# @param rate_limit [Float] Requests per second
|
31
|
+
# @return [Peddler::Response] The API response
|
32
|
+
def get_listings_restrictions(asin, seller_id, marketplace_ids, condition_type: nil, reason_locale: nil,
|
33
|
+
rate_limit: 5.0)
|
24
34
|
path = "/listings/2021-08-01/restrictions"
|
25
35
|
params = {
|
26
36
|
"asin" => asin,
|
@@ -30,7 +40,7 @@ module Peddler
|
|
30
40
|
"reasonLocale" => reason_locale,
|
31
41
|
}.compact
|
32
42
|
|
33
|
-
rate_limit
|
43
|
+
meter(rate_limit).get(path, params:)
|
34
44
|
end
|
35
45
|
end
|
36
46
|
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "peddler/api"
|
4
|
+
|
5
|
+
module Peddler
|
6
|
+
class << self
|
7
|
+
def merchant_fulfillment_v0(...)
|
8
|
+
APIs::MerchantFulfillmentV0.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module APIs
|
13
|
+
# Selling Partner API for Merchant Fulfillment
|
14
|
+
#
|
15
|
+
# With the Selling Partner API for Merchant Fulfillment, you can build applications that sellers can use to purchase
|
16
|
+
# shipping for non-Prime and Prime orders using Amazon's Buy Shipping Services.
|
17
|
+
class MerchantFulfillmentV0 < API
|
18
|
+
# Returns a list of shipping service offers that satisfy the specified shipment request details.
|
19
|
+
#
|
20
|
+
# @note This operation can make a static sandbox call.
|
21
|
+
# @param body [Hash] The request schema for the `GetEligibleShipmentServices` operation.
|
22
|
+
# @param rate_limit [Float] Requests per second
|
23
|
+
# @return [Peddler::Response] The API response
|
24
|
+
def get_eligible_shipment_services(body, rate_limit: 6.0)
|
25
|
+
path = "/mfn/v0/eligibleShippingServices"
|
26
|
+
|
27
|
+
meter(rate_limit).post(path, body:)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Returns the shipment information for an existing shipment.
|
31
|
+
#
|
32
|
+
# @note This operation can make a static sandbox call.
|
33
|
+
# @param shipment_id [String] The Amazon-defined shipment identifier for the shipment.
|
34
|
+
# @param rate_limit [Float] Requests per second
|
35
|
+
# @return [Peddler::Response] The API response
|
36
|
+
def get_shipment(shipment_id, rate_limit: 1.0)
|
37
|
+
path = "/mfn/v0/shipments/#{shipment_id}"
|
38
|
+
|
39
|
+
meter(rate_limit).get(path)
|
40
|
+
end
|
41
|
+
|
42
|
+
# Cancel the shipment indicated by the specified shipment identifier.
|
43
|
+
#
|
44
|
+
# @note This operation can make a static sandbox call.
|
45
|
+
# @param shipment_id [String] The Amazon-defined shipment identifier for the shipment to cancel.
|
46
|
+
# @param rate_limit [Float] Requests per second
|
47
|
+
# @return [Peddler::Response] The API response
|
48
|
+
def cancel_shipment(shipment_id, rate_limit: 1.0)
|
49
|
+
path = "/mfn/v0/shipments/#{shipment_id}"
|
50
|
+
|
51
|
+
meter(rate_limit).delete(path)
|
52
|
+
end
|
53
|
+
|
54
|
+
# Create a shipment with the information provided.
|
55
|
+
#
|
56
|
+
# @note This operation can make a static sandbox call.
|
57
|
+
# @param body [Hash] The request schema for the `CreateShipment` operation.
|
58
|
+
# @param rate_limit [Float] Requests per second
|
59
|
+
# @return [Peddler::Response] The API response
|
60
|
+
def create_shipment(body, rate_limit: 2.0)
|
61
|
+
path = "/mfn/v0/shipments"
|
62
|
+
|
63
|
+
meter(rate_limit).post(path, body:)
|
64
|
+
end
|
65
|
+
|
66
|
+
# Gets a list of additional seller inputs required for a ship method. This is generally used for international
|
67
|
+
# shipping.
|
68
|
+
#
|
69
|
+
# @note This operation can make a static sandbox call.
|
70
|
+
# @param body [Hash] The request schema for the `GetAdditionalSellerInputs` operation.
|
71
|
+
# @param rate_limit [Float] Requests per second
|
72
|
+
# @return [Peddler::Response] The API response
|
73
|
+
def get_additional_seller_inputs(body, rate_limit: 1.0)
|
74
|
+
path = "/mfn/v0/additionalSellerInputs"
|
75
|
+
|
76
|
+
meter(rate_limit).post(path, body:)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -3,7 +3,13 @@
|
|
3
3
|
require "peddler/api"
|
4
4
|
|
5
5
|
module Peddler
|
6
|
-
class
|
6
|
+
class << self
|
7
|
+
def messaging_v1(...)
|
8
|
+
APIs::MessagingV1.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module APIs
|
7
13
|
# Selling Partner API for Messaging
|
8
14
|
#
|
9
15
|
# With the Messaging API you can build applications that send messages to buyers. You can get a list of message
|
@@ -15,220 +21,246 @@ module Peddler
|
|
15
21
|
# by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to
|
16
22
|
# call an operation that sends a message.
|
17
23
|
#
|
18
|
-
# @
|
24
|
+
# @note This operation can make a static sandbox call.
|
25
|
+
# @param amazon_order_id [String] An Amazon order identifier. This specifies the order for which you want a list
|
19
26
|
# of available message types.
|
20
|
-
# @param [Array<String>]
|
27
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This specifies the marketplace in which the
|
21
28
|
# order was placed. Only one marketplace can be specified.
|
22
|
-
# @
|
23
|
-
|
29
|
+
# @param rate_limit [Float] Requests per second
|
30
|
+
# @return [Peddler::Response] The API response
|
31
|
+
def get_messaging_actions_for_order(amazon_order_id, marketplace_ids, rate_limit: 1.0)
|
24
32
|
path = "/messaging/v1/orders/#{amazon_order_id}"
|
25
33
|
params = {
|
26
34
|
"marketplaceIds" => marketplace_ids,
|
27
35
|
}.compact
|
28
36
|
|
29
|
-
rate_limit
|
37
|
+
meter(rate_limit).get(path, params:)
|
30
38
|
end
|
31
39
|
|
32
40
|
# Sends a message asking a buyer to provide or verify customization details such as name spelling, images,
|
33
41
|
# initials, etc.
|
34
42
|
#
|
35
|
-
# @
|
43
|
+
# @note This operation can make a static sandbox call.
|
44
|
+
# @param amazon_order_id [String] An Amazon order identifier. This specifies the order for which a message is
|
36
45
|
# sent.
|
37
|
-
# @param [Array<String>]
|
46
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This specifies the marketplace in which the
|
38
47
|
# order was placed. Only one marketplace can be specified.
|
39
|
-
# @param [Hash]
|
40
|
-
# @
|
41
|
-
|
48
|
+
# @param body [Hash]
|
49
|
+
# @param rate_limit [Float] Requests per second
|
50
|
+
# @return [Peddler::Response] The API response
|
51
|
+
def confirm_customization_details(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
42
52
|
path = "/messaging/v1/orders/#{amazon_order_id}/messages/confirmCustomizationDetails"
|
43
53
|
params = {
|
44
54
|
"marketplaceIds" => marketplace_ids,
|
45
55
|
}.compact
|
46
56
|
|
47
|
-
rate_limit
|
57
|
+
meter(rate_limit).post(path, body:, params:)
|
48
58
|
end
|
49
59
|
|
50
60
|
# Sends a message to a buyer to arrange a delivery or to confirm contact information for making a delivery.
|
51
61
|
#
|
52
|
-
# @
|
62
|
+
# @note This operation can make a static sandbox call.
|
63
|
+
# @param amazon_order_id [String] An Amazon order identifier. This specifies the order for which a message is
|
53
64
|
# sent.
|
54
|
-
# @param [Array<String>]
|
65
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This specifies the marketplace in which the
|
55
66
|
# order was placed. Only one marketplace can be specified.
|
56
|
-
# @param [Hash]
|
57
|
-
# @
|
58
|
-
|
67
|
+
# @param body [Hash]
|
68
|
+
# @param rate_limit [Float] Requests per second
|
69
|
+
# @return [Peddler::Response] The API response
|
70
|
+
def create_confirm_delivery_details(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
59
71
|
path = "/messaging/v1/orders/#{amazon_order_id}/messages/confirmDeliveryDetails"
|
60
72
|
params = {
|
61
73
|
"marketplaceIds" => marketplace_ids,
|
62
74
|
}.compact
|
63
75
|
|
64
|
-
rate_limit
|
76
|
+
meter(rate_limit).post(path, body:, params:)
|
65
77
|
end
|
66
78
|
|
67
79
|
# Sends a critical message that contains documents that a seller is legally obligated to provide to the buyer.
|
68
80
|
# This message should only be used to deliver documents that are required by law.
|
69
81
|
#
|
70
|
-
# @
|
82
|
+
# @note This operation can make a static sandbox call.
|
83
|
+
# @param amazon_order_id [String] An Amazon order identifier. This specifies the order for which a message is
|
71
84
|
# sent.
|
72
|
-
# @param [Array<String>]
|
85
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This specifies the marketplace in which the
|
73
86
|
# order was placed. Only one marketplace can be specified.
|
74
|
-
# @param [Hash]
|
75
|
-
# @
|
76
|
-
|
87
|
+
# @param body [Hash]
|
88
|
+
# @param rate_limit [Float] Requests per second
|
89
|
+
# @return [Peddler::Response] The API response
|
90
|
+
def create_legal_disclosure(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
77
91
|
path = "/messaging/v1/orders/#{amazon_order_id}/messages/legalDisclosure"
|
78
92
|
params = {
|
79
93
|
"marketplaceIds" => marketplace_ids,
|
80
94
|
}.compact
|
81
95
|
|
82
|
-
rate_limit
|
96
|
+
meter(rate_limit).post(path, body:, params:)
|
83
97
|
end
|
84
98
|
|
85
99
|
# Sends a non-critical message that asks a buyer to remove their negative feedback. This message should only be
|
86
100
|
# sent after the seller has resolved the buyer's problem.
|
87
101
|
#
|
88
|
-
# @
|
102
|
+
# @note This operation can make a static sandbox call.
|
103
|
+
# @param amazon_order_id [String] An Amazon order identifier. This specifies the order for which a message is
|
89
104
|
# sent.
|
90
|
-
# @param [Array<String>]
|
105
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This specifies the marketplace in which the
|
91
106
|
# order was placed. Only one marketplace can be specified.
|
92
|
-
# @
|
93
|
-
|
107
|
+
# @param rate_limit [Float] Requests per second
|
108
|
+
# @return [Peddler::Response] The API response
|
109
|
+
def create_negative_feedback_removal(amazon_order_id, marketplace_ids, rate_limit: 1.0)
|
94
110
|
path = "/messaging/v1/orders/#{amazon_order_id}/messages/negativeFeedbackRemoval"
|
95
111
|
params = {
|
96
112
|
"marketplaceIds" => marketplace_ids,
|
97
113
|
}.compact
|
98
114
|
|
99
|
-
rate_limit
|
115
|
+
meter(rate_limit).post(path, params:)
|
100
116
|
end
|
101
117
|
|
102
118
|
# Sends a message to ask a buyer an order-related question prior to shipping their order.
|
103
119
|
#
|
104
|
-
# @
|
120
|
+
# @note This operation can make a static sandbox call.
|
121
|
+
# @param amazon_order_id [String] An Amazon order identifier. This specifies the order for which a message is
|
105
122
|
# sent.
|
106
|
-
# @param [Array<String>]
|
123
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This specifies the marketplace in which the
|
107
124
|
# order was placed. Only one marketplace can be specified.
|
108
|
-
# @param [Hash]
|
109
|
-
# @
|
110
|
-
|
125
|
+
# @param body [Hash]
|
126
|
+
# @param rate_limit [Float] Requests per second
|
127
|
+
# @return [Peddler::Response] The API response
|
128
|
+
def create_confirm_order_details(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
111
129
|
path = "/messaging/v1/orders/#{amazon_order_id}/messages/confirmOrderDetails"
|
112
130
|
params = {
|
113
131
|
"marketplaceIds" => marketplace_ids,
|
114
132
|
}.compact
|
115
133
|
|
116
|
-
rate_limit
|
134
|
+
meter(rate_limit).post(path, body:, params:)
|
117
135
|
end
|
118
136
|
|
119
137
|
# Sends a message to contact a Home Service customer to arrange a service call or to gather information prior to a
|
120
138
|
# service call.
|
121
139
|
#
|
122
|
-
# @
|
140
|
+
# @note This operation can make a static sandbox call.
|
141
|
+
# @param amazon_order_id [String] An Amazon order identifier. This specifies the order for which a message is
|
123
142
|
# sent.
|
124
|
-
# @param [Array<String>]
|
143
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This specifies the marketplace in which the
|
125
144
|
# order was placed. Only one marketplace can be specified.
|
126
|
-
# @param [Hash]
|
127
|
-
# @
|
128
|
-
|
145
|
+
# @param body [Hash]
|
146
|
+
# @param rate_limit [Float] Requests per second
|
147
|
+
# @return [Peddler::Response] The API response
|
148
|
+
def create_confirm_service_details(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
129
149
|
path = "/messaging/v1/orders/#{amazon_order_id}/messages/confirmServiceDetails"
|
130
150
|
params = {
|
131
151
|
"marketplaceIds" => marketplace_ids,
|
132
152
|
}.compact
|
133
153
|
|
134
|
-
rate_limit
|
154
|
+
meter(rate_limit).post(path, body:, params:)
|
135
155
|
end
|
136
156
|
|
137
157
|
# Sends a message to a buyer to provide details about an Amazon Motors order. This message can only be sent by
|
138
158
|
# Amazon Motors sellers.
|
139
159
|
#
|
140
|
-
# @
|
160
|
+
# @note This operation can make a static sandbox call.
|
161
|
+
# @param amazon_order_id [String] An Amazon order identifier. This specifies the order for which a message is
|
141
162
|
# sent.
|
142
|
-
# @param [Array<String>]
|
163
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This specifies the marketplace in which the
|
143
164
|
# order was placed. Only one marketplace can be specified.
|
144
|
-
# @param [Hash]
|
145
|
-
# @
|
146
|
-
|
165
|
+
# @param body [Hash]
|
166
|
+
# @param rate_limit [Float] Requests per second
|
167
|
+
# @return [Peddler::Response] The API response
|
168
|
+
def create_amazon_motors(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
147
169
|
path = "/messaging/v1/orders/#{amazon_order_id}/messages/amazonMotors"
|
148
170
|
params = {
|
149
171
|
"marketplaceIds" => marketplace_ids,
|
150
172
|
}.compact
|
151
173
|
|
152
|
-
rate_limit
|
174
|
+
meter(rate_limit).post(path, body:, params:)
|
153
175
|
end
|
154
176
|
|
155
177
|
# Sends a message to a buyer to provide details about warranty information on a purchase in their order.
|
156
178
|
#
|
157
|
-
# @
|
179
|
+
# @note This operation can make a static sandbox call.
|
180
|
+
# @param amazon_order_id [String] An Amazon order identifier. This specifies the order for which a message is
|
158
181
|
# sent.
|
159
|
-
# @param [Array<String>]
|
182
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This specifies the marketplace in which the
|
160
183
|
# order was placed. Only one marketplace can be specified.
|
161
|
-
# @param [Hash]
|
162
|
-
# @
|
163
|
-
|
184
|
+
# @param body [Hash]
|
185
|
+
# @param rate_limit [Float] Requests per second
|
186
|
+
# @return [Peddler::Response] The API response
|
187
|
+
def create_warranty(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
164
188
|
path = "/messaging/v1/orders/#{amazon_order_id}/messages/warranty"
|
165
189
|
params = {
|
166
190
|
"marketplaceIds" => marketplace_ids,
|
167
191
|
}.compact
|
168
192
|
|
169
|
-
rate_limit
|
193
|
+
meter(rate_limit).post(path, body:, params:)
|
170
194
|
end
|
171
195
|
|
172
196
|
# Returns a response containing attributes related to an order. This includes buyer preferences.
|
173
197
|
#
|
174
|
-
# @
|
198
|
+
# @note This operation can make a static sandbox call.
|
199
|
+
# @param amazon_order_id [String] An Amazon order identifier. This specifies the order for which a message is
|
175
200
|
# sent.
|
176
|
-
# @param [Array<String>]
|
201
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This specifies the marketplace in which the
|
177
202
|
# order was placed. Only one marketplace can be specified.
|
178
|
-
# @
|
179
|
-
|
203
|
+
# @param rate_limit [Float] Requests per second
|
204
|
+
# @return [Peddler::Response] The API response
|
205
|
+
def get_attributes(amazon_order_id, marketplace_ids, rate_limit: 1.0)
|
180
206
|
path = "/messaging/v1/orders/#{amazon_order_id}/attributes"
|
181
207
|
params = {
|
182
208
|
"marketplaceIds" => marketplace_ids,
|
183
209
|
}.compact
|
184
210
|
|
185
|
-
rate_limit
|
211
|
+
meter(rate_limit).get(path, params:)
|
186
212
|
end
|
187
213
|
|
188
214
|
# Sends a message to a buyer to share a digital access key needed to utilize digital content in their order.
|
189
215
|
#
|
190
|
-
# @
|
216
|
+
# @note This operation can make a static sandbox call.
|
217
|
+
# @param amazon_order_id [String] An Amazon order identifier. This specifies the order for which a message is
|
191
218
|
# sent.
|
192
|
-
# @param [Array<String>]
|
219
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This specifies the marketplace in which the
|
193
220
|
# order was placed. Only one marketplace can be specified.
|
194
|
-
# @param [Hash]
|
195
|
-
# @
|
196
|
-
|
221
|
+
# @param body [Hash]
|
222
|
+
# @param rate_limit [Float] Requests per second
|
223
|
+
# @return [Peddler::Response] The API response
|
224
|
+
def create_digital_access_key(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
197
225
|
path = "/messaging/v1/orders/#{amazon_order_id}/messages/digitalAccessKey"
|
198
226
|
params = {
|
199
227
|
"marketplaceIds" => marketplace_ids,
|
200
228
|
}.compact
|
201
229
|
|
202
|
-
rate_limit
|
230
|
+
meter(rate_limit).post(path, body:, params:)
|
203
231
|
end
|
204
232
|
|
205
233
|
# Sends a critical message to a buyer that an unexpected problem was encountered affecting the completion of the
|
206
234
|
# order.
|
207
235
|
#
|
208
|
-
# @
|
236
|
+
# @note This operation can make a static sandbox call.
|
237
|
+
# @param amazon_order_id [String] An Amazon order identifier. This specifies the order for which a message is
|
209
238
|
# sent.
|
210
|
-
# @param [Array<String>]
|
239
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This specifies the marketplace in which the
|
211
240
|
# order was placed. Only one marketplace can be specified.
|
212
|
-
# @param [Hash]
|
213
|
-
# @
|
214
|
-
|
241
|
+
# @param body [Hash]
|
242
|
+
# @param rate_limit [Float] Requests per second
|
243
|
+
# @return [Peddler::Response] The API response
|
244
|
+
def create_unexpected_problem(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
215
245
|
path = "/messaging/v1/orders/#{amazon_order_id}/messages/unexpectedProblem"
|
216
246
|
params = {
|
217
247
|
"marketplaceIds" => marketplace_ids,
|
218
248
|
}.compact
|
219
249
|
|
220
|
-
rate_limit
|
250
|
+
meter(rate_limit).post(path, body:, params:)
|
221
251
|
end
|
222
252
|
|
223
253
|
# Sends a message providing the buyer an invoice
|
224
254
|
#
|
225
|
-
# @
|
255
|
+
# @note This operation can make a static sandbox call.
|
256
|
+
# @param amazon_order_id [String] An Amazon order identifier. This specifies the order for which a message is
|
226
257
|
# sent.
|
227
|
-
# @param [Array<String>]
|
258
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This specifies the marketplace in which the
|
228
259
|
# order was placed. Only one marketplace can be specified.
|
229
|
-
# @param [Hash]
|
230
|
-
# @
|
231
|
-
|
260
|
+
# @param body [Hash]
|
261
|
+
# @param rate_limit [Float] Requests per second
|
262
|
+
# @return [Peddler::Response] The API response
|
263
|
+
def send_invoice(amazon_order_id, marketplace_ids, body, rate_limit: nil)
|
232
264
|
path = "/messaging/v1/orders/#{amazon_order_id}/messages/invoice"
|
233
265
|
params = {
|
234
266
|
"marketplaceIds" => marketplace_ids,
|