peddler 3.0.0.beta1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +96 -106
  3. data/lib/peddler/api/amazon_warehousing_and_distribution_2024_05_09.rb +34 -22
  4. data/lib/peddler/api/aplus_content_2020_11_01.rb +86 -48
  5. data/lib/peddler/api/application_integrations_2024_04_01.rb +56 -0
  6. data/lib/peddler/api/application_management_2023_11_30.rb +12 -2
  7. data/lib/peddler/api/catalog_items_2020_12_01.rb +31 -20
  8. data/lib/peddler/api/catalog_items_2022_04_01.rb +35 -25
  9. data/lib/peddler/api/catalog_items_v0.rb +39 -26
  10. data/lib/peddler/api/data_kiosk_2023_11_15.rb +41 -25
  11. data/lib/peddler/api/easy_ship_2022_03_23.rb +62 -43
  12. data/lib/peddler/api/fba_inbound_eligibility_v1.rb +13 -5
  13. data/lib/peddler/api/fba_inventory_v1.rb +40 -24
  14. data/lib/peddler/api/feeds_2021_06_30.rb +43 -25
  15. data/lib/peddler/api/finances_2024_06_19.rb +50 -0
  16. data/lib/peddler/api/finances_v0.rb +86 -59
  17. data/lib/peddler/api/fulfillment_inbound_2024_03_20.rb +304 -205
  18. data/lib/peddler/api/fulfillment_inbound_v0.rb +112 -74
  19. data/lib/peddler/api/fulfillment_outbound_2020_07_01.rb +90 -53
  20. data/lib/peddler/api/invoices_2024_06_19.rb +180 -0
  21. data/lib/peddler/api/listings_items_2020_09_01.rb +44 -33
  22. data/lib/peddler/api/listings_items_2021_08_01.rb +76 -60
  23. data/lib/peddler/api/listings_restrictions_2021_08_01.rb +19 -9
  24. data/lib/peddler/api/merchant_fulfillment_v0.rb +31 -15
  25. data/lib/peddler/api/messaging_v1.rb +93 -61
  26. data/lib/peddler/api/notifications_v1.rb +54 -23
  27. data/lib/peddler/api/orders_v0.rb +87 -72
  28. data/lib/peddler/api/product_fees_v0.rb +39 -31
  29. data/lib/peddler/api/product_pricing_2022_05_01.rb +17 -6
  30. data/lib/peddler/api/product_pricing_v0.rb +63 -45
  31. data/lib/peddler/api/product_type_definitions_2020_09_01.rb +29 -18
  32. data/lib/peddler/api/replenishment_2022_11_07.rb +21 -9
  33. data/lib/peddler/api/reports_2021_06_30.rb +60 -36
  34. data/lib/peddler/api/sales_v1.rb +20 -12
  35. data/lib/peddler/api/sellers_v1.rb +16 -4
  36. data/lib/peddler/api/services_v1.rb +138 -98
  37. data/lib/peddler/api/shipment_invoicing_v0.rb +25 -12
  38. data/lib/peddler/api/shipping_v1.rb +54 -29
  39. data/lib/peddler/api/shipping_v2.rb +132 -80
  40. data/lib/peddler/api/solicitations_v1.rb +18 -8
  41. data/lib/peddler/api/supply_sources_2020_07_01.rb +33 -15
  42. data/lib/peddler/api/tokens_2021_03_01.rb +13 -5
  43. data/lib/peddler/api/uploads_2020_11_01.rb +16 -6
  44. data/lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb +12 -4
  45. data/lib/peddler/api/vendor_direct_fulfillment_orders_2021_12_28.rb +29 -17
  46. data/lib/peddler/api/vendor_direct_fulfillment_orders_v1.rb +29 -17
  47. data/lib/peddler/api/vendor_direct_fulfillment_payments_v1.rb +11 -3
  48. data/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +14 -4
  49. data/lib/peddler/api/vendor_direct_fulfillment_shipping_2021_12_28.rb +74 -48
  50. data/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb +74 -50
  51. data/lib/peddler/api/vendor_direct_fulfillment_transactions_2021_12_28.rb +11 -3
  52. data/lib/peddler/api/vendor_direct_fulfillment_transactions_v1.rb +11 -3
  53. data/lib/peddler/api/vendor_invoices_v1.rb +11 -3
  54. data/lib/peddler/api/vendor_orders_v1.rb +54 -43
  55. data/lib/peddler/api/vendor_shipments_v1.rb +63 -51
  56. data/lib/peddler/api/vendor_transaction_status_v1.rb +12 -3
  57. data/lib/peddler/api.rb +41 -18
  58. data/lib/peddler/endpoint.rb +51 -0
  59. data/lib/peddler/error.rb +1 -0
  60. data/lib/peddler/marketplace.rb +49 -0
  61. data/lib/peddler/token.rb +70 -0
  62. data/lib/peddler/version.rb +1 -1
  63. data/lib/peddler.rb +56 -52
  64. metadata +10 -6
  65. data/lib/peddler/access_token.rb +0 -76
  66. data/lib/peddler/region.rb +0 -30
@@ -3,6 +3,12 @@
3
3
  require "peddler/api"
4
4
 
5
5
  module Peddler
6
+ class << self
7
+ def listings_items_2021_08_01(...)
8
+ API::ListingsItems20210801.new(...)
9
+ end
10
+ end
11
+
6
12
  class API
7
13
  # Selling Partner API for Listings Items
8
14
  #
@@ -12,43 +18,46 @@ module Peddler
12
18
  # information, see the [Listings Items API Use Case
13
19
  # Guide](https://developer-docs.amazon.com/sp-api/docs/listings-items-api-v2021-08-01-use-case-guide).
14
20
  class ListingsItems20210801 < API
15
- # Delete a listings item for a selling partner.
16
- # @note The parameters associated with this operation may contain special characters that must be encoded to
17
- # successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL
18
- # Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).
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).
19
24
  #
20
- # @param [String] seller_id A selling partner identifier, such as a merchant account or vendor code.
21
- # @param [String] sku A selling partner provided identifier for an Amazon listing.
22
- # @param [Array<String>] marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request.
23
- # @param [String] issue_locale A locale for localization of issues. When not provided, the default language code
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
24
30
  # of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US`
25
31
  # when a localization is not available in the specified locale.
32
+ # @param rate_limit [Float] Requests per second
26
33
  # @return [Hash] The API response
27
- def delete_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil)
34
+ def delete_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, rate_limit: 5.0)
28
35
  path = "/listings/2021-08-01/items/#{seller_id}/#{sku}"
29
36
  params = {
30
37
  "marketplaceIds" => marketplace_ids,
31
38
  "issueLocale" => issue_locale,
32
39
  }.compact
33
40
 
34
- rate_limit(5.0).delete(path, params:)
41
+ meter(rate_limit).delete(path, params:)
35
42
  end
36
43
 
37
- # Returns details about a listings item for a selling partner.
38
- # @note The parameters associated with this operation may contain special characters that must be encoded to
39
- # successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL
40
- # Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).
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).
41
47
  #
42
- # @param [String] seller_id A selling partner identifier, such as a merchant account or vendor code.
43
- # @param [String] sku A selling partner provided identifier for an Amazon listing.
44
- # @param [Array<String>] marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request.
45
- # @param [String] issue_locale A locale for localization of issues. When not provided, the default language code
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
46
53
  # of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US`
47
54
  # when a localization is not available in the specified locale.
48
- # @param [Array<String>] included_data A comma-delimited list of data sets to include in the response. Default:
55
+ # @param included_data [Array<String>] A comma-delimited list of data sets to include in the response. Default:
49
56
  # `summaries`.
57
+ # @param rate_limit [Float] Requests per second
50
58
  # @return [Hash] The API response
51
- def get_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, included_data: nil)
59
+ def get_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, included_data: ["summaries"],
60
+ rate_limit: 5.0)
52
61
  path = "/listings/2021-08-01/items/#{seller_id}/#{sku}"
53
62
  params = {
54
63
  "marketplaceIds" => marketplace_ids,
@@ -56,28 +65,30 @@ module Peddler
56
65
  "includedData" => included_data,
57
66
  }.compact
58
67
 
59
- rate_limit(5.0).get(path, params:)
68
+ meter(rate_limit).get(path, params:)
60
69
  end
61
70
 
62
71
  # Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be
63
- # patched. Patching nested attributes is not supported.
64
- # @note This operation has a throttling rate of one request per second when `mode` is `VALIDATION_PREVIEW`.
65
- # @note The parameters associated with this operation may contain special characters that must be encoded to
66
- # successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL
67
- # Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).
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).
68
76
  #
69
- # @param [String] seller_id A selling partner identifier, such as a merchant account or vendor code.
70
- # @param [String] sku A selling partner provided identifier for an Amazon listing.
71
- # @param [Array<String>] marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request.
72
- # @param [Array<String>] included_data A comma-delimited list of data sets to include in the response. Default:
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:
73
82
  # `issues`.
74
- # @param [String] mode The mode of operation for the request.
75
- # @param [String] issue_locale A locale for localization of issues. When not provided, the default language code
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
76
85
  # of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US`
77
86
  # when a localization is not available in the specified locale.
78
- # @param [Hash] body The request body schema for the `patchListingsItem` operation.
87
+ # @param body [Hash] The request body schema for the `patchListingsItem` operation.
88
+ # @param rate_limit [Float] Requests per second
79
89
  # @return [Hash] The API response
80
- def patch_listings_item(seller_id, sku, marketplace_ids, body, included_data: nil, mode: nil, issue_locale: nil)
90
+ def patch_listings_item(seller_id, sku, marketplace_ids, body, included_data: ["issues"], mode: nil,
91
+ issue_locale: nil, rate_limit: 5.0)
81
92
  path = "/listings/2021-08-01/items/#{seller_id}/#{sku}"
82
93
  params = {
83
94
  "marketplaceIds" => marketplace_ids,
@@ -86,27 +97,30 @@ module Peddler
86
97
  "issueLocale" => issue_locale,
87
98
  }.compact
88
99
 
89
- rate_limit(5.0).patch(path, body:, params:)
100
+ meter(rate_limit).patch(path, body:, params:)
90
101
  end
91
102
 
92
- # Creates or fully updates an existing listings item for a selling partner.
93
- # @note This operation has a throttling rate of one request per second when `mode` is `VALIDATION_PREVIEW`.
94
- # @note The parameters associated with this operation may contain special characters that must be encoded to
95
- # successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL
96
- # Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).
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).
97
108
  #
98
- # @param [String] seller_id A selling partner identifier, such as a merchant account or vendor code.
99
- # @param [String] sku A selling partner provided identifier for an Amazon listing.
100
- # @param [Array<String>] marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request.
101
- # @param [Array<String>] included_data A comma-delimited list of data sets to include in the response. Default:
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:
102
114
  # `issues`.
103
- # @param [String] mode The mode of operation for the request.
104
- # @param [String] issue_locale A locale for localization of issues. When not provided, the default language code
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
105
117
  # of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US`
106
118
  # when a localization is not available in the specified locale.
107
- # @param [Hash] body The request body schema for the `putListingsItem` operation.
119
+ # @param body [Hash] The request body schema for the `putListingsItem` operation.
120
+ # @param rate_limit [Float] Requests per second
108
121
  # @return [Hash] The API response
109
- def put_listings_item(seller_id, sku, marketplace_ids, body, included_data: nil, mode: nil, issue_locale: nil)
122
+ def put_listings_item(seller_id, sku, marketplace_ids, body, included_data: ["issues"], mode: nil,
123
+ issue_locale: nil, rate_limit: 5.0)
110
124
  path = "/listings/2021-08-01/items/#{seller_id}/#{sku}"
111
125
  params = {
112
126
  "marketplaceIds" => marketplace_ids,
@@ -115,27 +129,29 @@ module Peddler
115
129
  "issueLocale" => issue_locale,
116
130
  }.compact
117
131
 
118
- rate_limit(5.0).put(path, body:, params:)
132
+ meter(rate_limit).put(path, body:, params:)
119
133
  end
120
134
 
121
135
  # Search for and return list of listings items and respective details for a selling partner.
122
136
  #
123
- # @param [String] seller_id A selling partner identifier, such as a merchant account or vendor code.
124
- # @param [Array<String>] marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request.
125
- # @param [Array<String>] identifiers A comma-delimited list of product identifiers to search for listings items
137
+ # @note This operation can make a static sandbox call.
138
+ # @param seller_id [String] A selling partner identifier, such as a merchant account or vendor code.
139
+ # @param marketplace_ids [Array<String>] A comma-delimited list of Amazon marketplace identifiers for the request.
140
+ # @param identifiers [Array<String>] A comma-delimited list of product identifiers to search for listings items
126
141
  # by. **Note**: 1. Required when `identifiersType` is provided.
127
- # @param [String] identifiers_type Type of product identifiers to search for listings items by. **Note**: 1.
142
+ # @param identifiers_type [String] Type of product identifiers to search for listings items by. **Note**: 1.
128
143
  # Required when `identifiers` is provided.
129
- # @param [Integer] page_size Number of results to be returned per page.
130
- # @param [String] page_token A token to fetch a certain page when there are multiple pages worth of results.
131
- # @param [Array<String>] included_data A comma-delimited list of data sets to include in the response. Default:
144
+ # @param page_size [Integer] Number of results to be returned per page.
145
+ # @param page_token [String] A token to fetch a certain page when there are multiple pages worth of results.
146
+ # @param included_data [Array<String>] A comma-delimited list of data sets to include in the response. Default:
132
147
  # summaries.
133
- # @param [String] issue_locale A locale for localization of issues. When not provided, the default language code
148
+ # @param issue_locale [String] A locale for localization of issues. When not provided, the default language code
134
149
  # of the first marketplace is used. Examples: "en_US", "fr_CA", "fr_FR". Localized messages default to "en_US"
135
150
  # when a localization is not available in the specified locale.
151
+ # @param rate_limit [Float] Requests per second
136
152
  # @return [Hash] The API response
137
- def search_listings_items(seller_id, marketplace_ids, identifiers: nil, identifiers_type: nil, page_size: nil,
138
- page_token: nil, included_data: nil, issue_locale: nil)
153
+ def search_listings_items(seller_id, marketplace_ids, identifiers: nil, identifiers_type: nil, page_size: 10,
154
+ page_token: nil, included_data: ["summaries"], issue_locale: nil, rate_limit: 5.0)
139
155
  path = "/listings/2021-08-01/items/#{seller_id}"
140
156
  params = {
141
157
  "marketplaceIds" => marketplace_ids,
@@ -147,7 +163,7 @@ module Peddler
147
163
  "issueLocale" => issue_locale,
148
164
  }.compact
149
165
 
150
- rate_limit(5.0).get(path, params:)
166
+ meter(rate_limit).get(path, params:)
151
167
  end
152
168
  end
153
169
  end
@@ -3,24 +3,34 @@
3
3
  require "peddler/api"
4
4
 
5
5
  module Peddler
6
+ class << self
7
+ def listings_restrictions_2021_08_01(...)
8
+ API::ListingsRestrictions20210801.new(...)
9
+ end
10
+ end
11
+
6
12
  class API
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 [Listings Restrictions API Use Case
11
- # Guide](doc:listings-restrictions-api-v2021-08-01-use-case-guide).
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
- # @param [String] asin The Amazon Standard Identification Number (ASIN) of the item.
16
- # @param [String] condition_type The condition used to filter restrictions.
17
- # @param [String] seller_id A selling partner identifier, such as a merchant account.
18
- # @param [Array<String>] marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request.
19
- # @param [String] reason_locale A locale for reason text localization. When not provided, the default language
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.
30
+ # @param rate_limit [Float] Requests per second
22
31
  # @return [Hash] The API response
23
- def get_listings_restrictions(asin, seller_id, marketplace_ids, condition_type: nil, reason_locale: nil)
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(5.0).get(path, params:)
43
+ meter(rate_limit).get(path, params:)
34
44
  end
35
45
  end
36
46
  end
@@ -3,6 +3,12 @@
3
3
  require "peddler/api"
4
4
 
5
5
  module Peddler
6
+ class << self
7
+ def merchant_fulfillment_v0(...)
8
+ API::MerchantFulfillmentV0.new(...)
9
+ end
10
+ end
11
+
6
12
  class API
7
13
  # Selling Partner API for Merchant Fulfillment
8
14
  #
@@ -11,53 +17,63 @@ module Peddler
11
17
  class MerchantFulfillmentV0 < API
12
18
  # Returns a list of shipping service offers that satisfy the specified shipment request details.
13
19
  #
14
- # @param [Hash] body Request schema for GetEligibleShipmentServices operation.
20
+ # @note This operation can make a static sandbox call.
21
+ # @param body [Hash] Request schema for GetEligibleShipmentServices operation.
22
+ # @param rate_limit [Float] Requests per second
15
23
  # @return [Hash] The API response
16
- def get_eligible_shipment_services(body)
24
+ def get_eligible_shipment_services(body, rate_limit: 5.0)
17
25
  path = "/mfn/v0/eligibleShippingServices"
18
26
 
19
- rate_limit(5.0).post(path, body:)
27
+ meter(rate_limit).post(path, body:)
20
28
  end
21
29
 
22
30
  # Returns the shipment information for an existing shipment.
23
31
  #
24
- # @param [String] shipment_id The Amazon-defined shipment identifier for the shipment.
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
25
35
  # @return [Hash] The API response
26
- def get_shipment(shipment_id)
36
+ def get_shipment(shipment_id, rate_limit: 1.0)
27
37
  path = "/mfn/v0/shipments/#{shipment_id}"
28
38
 
29
- rate_limit(1.0).get(path)
39
+ meter(rate_limit).get(path)
30
40
  end
31
41
 
32
42
  # Cancel the shipment indicated by the specified shipment identifier.
33
43
  #
34
- # @param [String] shipment_id The Amazon-defined shipment identifier for the shipment to cancel.
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
35
47
  # @return [Hash] The API response
36
- def cancel_shipment(shipment_id)
48
+ def cancel_shipment(shipment_id, rate_limit: 1.0)
37
49
  path = "/mfn/v0/shipments/#{shipment_id}"
38
50
 
39
- rate_limit(1.0).delete(path)
51
+ meter(rate_limit).delete(path)
40
52
  end
41
53
 
42
54
  # Create a shipment with the information provided.
43
55
  #
44
- # @param [Hash] body Request schema for CreateShipment operation.
56
+ # @note This operation can make a static sandbox call.
57
+ # @param body [Hash] Request schema for CreateShipment operation.
58
+ # @param rate_limit [Float] Requests per second
45
59
  # @return [Hash] The API response
46
- def create_shipment(body)
60
+ def create_shipment(body, rate_limit: 1.0)
47
61
  path = "/mfn/v0/shipments"
48
62
 
49
- rate_limit(1.0).post(path, body:)
63
+ meter(rate_limit).post(path, body:)
50
64
  end
51
65
 
52
66
  # Gets a list of additional seller inputs required for a ship method. This is generally used for international
53
67
  # shipping.
54
68
  #
55
- # @param [Hash] body Request schema for GetAdditionalSellerInputs operation.
69
+ # @note This operation can make a static sandbox call.
70
+ # @param body [Hash] Request schema for GetAdditionalSellerInputs operation.
71
+ # @param rate_limit [Float] Requests per second
56
72
  # @return [Hash] The API response
57
- def get_additional_seller_inputs(body)
73
+ def get_additional_seller_inputs(body, rate_limit: 1.0)
58
74
  path = "/mfn/v0/additionalSellerInputs"
59
75
 
60
- rate_limit(1.0).post(path, body:)
76
+ meter(rate_limit).post(path, body:)
61
77
  end
62
78
  end
63
79
  end