peddler 5.0.0 → 5.1.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 (168) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -6
  3. data/lib/peddler/acronyms.rb +1 -0
  4. data/lib/peddler/api.rb +35 -62
  5. data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb +11 -11
  6. data/lib/peddler/apis/aplus_content_2020_11_01.rb +10 -10
  7. data/lib/peddler/apis/application_integrations_2024_04_01.rb +3 -3
  8. data/lib/peddler/apis/application_management_2023_11_30.rb +1 -1
  9. data/lib/peddler/apis/catalog_items_2020_12_01.rb +2 -2
  10. data/lib/peddler/apis/catalog_items_2022_04_01.rb +2 -2
  11. data/lib/peddler/apis/catalog_items_v0.rb +1 -1
  12. data/lib/peddler/apis/data_kiosk_2023_11_15.rb +5 -5
  13. data/lib/peddler/apis/delivery_by_amazon_2022_07_01/error.rb +23 -0
  14. data/lib/peddler/apis/delivery_by_amazon_2022_07_01/error_list.rb +18 -0
  15. data/lib/peddler/apis/delivery_by_amazon_2022_07_01/get_invoice_status_response.rb +26 -0
  16. data/lib/peddler/apis/delivery_by_amazon_2022_07_01/submit_invoice_request.rb +31 -0
  17. data/lib/peddler/apis/delivery_by_amazon_2022_07_01/submit_invoice_response.rb +17 -0
  18. data/lib/peddler/apis/delivery_by_amazon_2022_07_01.rb +59 -0
  19. data/lib/peddler/apis/easy_ship_2022_03_23.rb +5 -5
  20. data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11/shipment.rb +3 -0
  21. data/lib/peddler/apis/fba_inbound_eligibility_v1.rb +1 -1
  22. data/lib/peddler/apis/fba_inventory_v1.rb +1 -1
  23. data/lib/peddler/apis/feeds_2021_06_30.rb +6 -6
  24. data/lib/peddler/apis/finances_2024_06_19/amazon_pay_context.rb +2 -2
  25. data/lib/peddler/apis/finances_2024_06_19/breakdown.rb +3 -4
  26. data/lib/peddler/apis/finances_2024_06_19/context.rb +11 -11
  27. data/lib/peddler/apis/finances_2024_06_19/contexts.rb +1 -1
  28. data/lib/peddler/apis/finances_2024_06_19/deferred_context.rb +1 -1
  29. data/lib/peddler/apis/finances_2024_06_19/error.rb +1 -1
  30. data/lib/peddler/apis/finances_2024_06_19/error_list.rb +1 -1
  31. data/lib/peddler/apis/finances_2024_06_19/item.rb +3 -3
  32. data/lib/peddler/apis/finances_2024_06_19/item_related_identifier.rb +1 -1
  33. data/lib/peddler/apis/finances_2024_06_19/item_related_identifiers.rb +1 -1
  34. data/lib/peddler/apis/finances_2024_06_19/items.rb +1 -1
  35. data/lib/peddler/apis/finances_2024_06_19/marketplace_details.rb +2 -3
  36. data/lib/peddler/apis/finances_2024_06_19/payments_context.rb +5 -5
  37. data/lib/peddler/apis/finances_2024_06_19/product_context.rb +4 -4
  38. data/lib/peddler/apis/finances_2024_06_19/related_identifier.rb +2 -2
  39. data/lib/peddler/apis/finances_2024_06_19/selling_partner_metadata.rb +3 -3
  40. data/lib/peddler/apis/finances_2024_06_19/time_range_context.rb +3 -3
  41. data/lib/peddler/apis/finances_2024_06_19/transaction.rb +8 -10
  42. data/lib/peddler/apis/finances_2024_06_19/transactions.rb +1 -1
  43. data/lib/peddler/apis/finances_2024_06_19/transactions_payload.rb +4 -2
  44. data/lib/peddler/apis/finances_2024_06_19.rb +24 -13
  45. data/lib/peddler/apis/finances_v0/adhoc_disbursement_event.rb +1 -3
  46. data/lib/peddler/apis/finances_v0/adjustment_event.rb +11 -18
  47. data/lib/peddler/apis/finances_v0/adjustment_item.rb +3 -3
  48. data/lib/peddler/apis/finances_v0/affordability_expense_event.rb +6 -7
  49. data/lib/peddler/apis/finances_v0/capacity_reservation_billing_event.rb +1 -1
  50. data/lib/peddler/apis/finances_v0/charge_component.rb +37 -35
  51. data/lib/peddler/apis/finances_v0/charge_refund_event.rb +2 -6
  52. data/lib/peddler/apis/finances_v0/coupon_payment_event.rb +1 -1
  53. data/lib/peddler/apis/finances_v0/debt_recovery_event.rb +1 -5
  54. data/lib/peddler/apis/finances_v0/debt_recovery_item.rb +4 -4
  55. data/lib/peddler/apis/finances_v0/direct_payment.rb +7 -7
  56. data/lib/peddler/apis/finances_v0/ebt_refund_reimbursement_only_event.rb +23 -0
  57. data/lib/peddler/apis/finances_v0/ebt_refund_reimbursement_only_event_list.rb +18 -0
  58. data/lib/peddler/apis/finances_v0/failed_adhoc_disbursement_event.rb +3 -9
  59. data/lib/peddler/apis/finances_v0/failed_adhoc_disbursement_event_list.rb +1 -1
  60. data/lib/peddler/apis/finances_v0/fba_liquidation_event.rb +1 -1
  61. data/lib/peddler/apis/finances_v0/financial_event_group.rb +5 -7
  62. data/lib/peddler/apis/finances_v0/financial_events.rb +4 -1
  63. data/lib/peddler/apis/finances_v0/list_financial_event_groups_payload.rb +1 -1
  64. data/lib/peddler/apis/finances_v0/list_financial_event_groups_response.rb +3 -3
  65. data/lib/peddler/apis/finances_v0/list_financial_events_payload.rb +1 -1
  66. data/lib/peddler/apis/finances_v0/list_financial_events_response.rb +3 -3
  67. data/lib/peddler/apis/finances_v0/loan_servicing_event.rb +3 -3
  68. data/lib/peddler/apis/finances_v0/network_commingling_transaction_event.rb +3 -3
  69. data/lib/peddler/apis/finances_v0/pay_with_amazon_event.rb +5 -5
  70. data/lib/peddler/apis/finances_v0/product_ads_payment_event.rb +4 -4
  71. data/lib/peddler/apis/finances_v0/removal_shipment_adjustment_event.rb +2 -2
  72. data/lib/peddler/apis/finances_v0/removal_shipment_adjustment_event_list.rb +1 -1
  73. data/lib/peddler/apis/finances_v0/removal_shipment_event.rb +2 -2
  74. data/lib/peddler/apis/finances_v0/removal_shipment_item.rb +5 -6
  75. data/lib/peddler/apis/finances_v0/removal_shipment_item_adjustment.rb +8 -9
  76. data/lib/peddler/apis/finances_v0/removal_shipment_item_list.rb +1 -1
  77. data/lib/peddler/apis/finances_v0/rental_transaction_event.rb +17 -16
  78. data/lib/peddler/apis/finances_v0/retrocharge_event.rb +2 -2
  79. data/lib/peddler/apis/finances_v0/retrocharge_event_list.rb +1 -1
  80. data/lib/peddler/apis/finances_v0/safet_reimbursement_event_list.rb +1 -1
  81. data/lib/peddler/apis/finances_v0/safet_reimbursement_item_list.rb +1 -1
  82. data/lib/peddler/apis/finances_v0/seller_deal_payment_event.rb +2 -2
  83. data/lib/peddler/apis/finances_v0/seller_review_enrollment_payment_event.rb +1 -1
  84. data/lib/peddler/apis/finances_v0/solution_provider_credit_event.rb +1 -1
  85. data/lib/peddler/apis/finances_v0/solution_provider_credit_event_list.rb +1 -1
  86. data/lib/peddler/apis/finances_v0/tax_withheld_component.rb +2 -3
  87. data/lib/peddler/apis/finances_v0/tax_withholding_event.rb +1 -1
  88. data/lib/peddler/apis/finances_v0/tax_withholding_event_list.rb +1 -1
  89. data/lib/peddler/apis/finances_v0/tax_withholding_period.rb +1 -1
  90. data/lib/peddler/apis/finances_v0/value_added_service_charge_event.rb +1 -3
  91. data/lib/peddler/apis/finances_v0.rb +60 -47
  92. data/lib/peddler/apis/fulfillment_inbound_2024_03_20/delivery_window_option.rb +2 -1
  93. data/lib/peddler/apis/fulfillment_inbound_2024_03_20/selected_delivery_window.rb +2 -1
  94. data/lib/peddler/apis/fulfillment_inbound_2024_03_20.rb +90 -142
  95. data/lib/peddler/apis/fulfillment_inbound_v0.rb +6 -6
  96. data/lib/peddler/apis/fulfillment_outbound_2020_07_01.rb +14 -17
  97. data/lib/peddler/apis/invoices_2024_06_19.rb +7 -7
  98. data/lib/peddler/apis/listings_items_2020_09_01.rb +3 -3
  99. data/lib/peddler/apis/listings_items_2021_08_01.rb +5 -5
  100. data/lib/peddler/apis/listings_restrictions_2021_08_01.rb +1 -1
  101. data/lib/peddler/apis/merchant_fulfillment_v0.rb +5 -5
  102. data/lib/peddler/apis/messaging_v1.rb +11 -11
  103. data/lib/peddler/apis/notifications_v1.rb +8 -8
  104. data/lib/peddler/apis/orders_v0/buyer_info.rb +0 -3
  105. data/lib/peddler/apis/orders_v0/order_buyer_info.rb +0 -3
  106. data/lib/peddler/apis/orders_v0.rb +12 -15
  107. data/lib/peddler/apis/product_fees_v0.rb +3 -3
  108. data/lib/peddler/apis/product_pricing_2022_05_01.rb +2 -2
  109. data/lib/peddler/apis/product_pricing_v0.rb +6 -6
  110. data/lib/peddler/apis/product_type_definitions_2020_09_01.rb +2 -2
  111. data/lib/peddler/apis/replenishment_2022_11_07/get_selling_partner_metrics_response_metric.rb +66 -22
  112. data/lib/peddler/apis/replenishment_2022_11_07/list_offer_metrics_response_offer.rb +13 -13
  113. data/lib/peddler/apis/replenishment_2022_11_07.rb +3 -3
  114. data/lib/peddler/apis/reports_2021_06_30.rb +9 -9
  115. data/lib/peddler/apis/sales_v1.rb +1 -1
  116. data/lib/peddler/apis/seller_wallet_2024_03_01/bank_account.rb +23 -18
  117. data/lib/peddler/apis/seller_wallet_2024_03_01/payee_contact_information.rb +54 -0
  118. data/lib/peddler/apis/seller_wallet_2024_03_01/transaction.rb +7 -3
  119. data/lib/peddler/apis/seller_wallet_2024_03_01/transaction_initiation_request.rb +3 -3
  120. data/lib/peddler/apis/seller_wallet_2024_03_01.rb +7 -2
  121. data/lib/peddler/apis/sellers_v1.rb +2 -2
  122. data/lib/peddler/apis/services_v1.rb +17 -17
  123. data/lib/peddler/apis/shipment_invoicing_v0.rb +3 -3
  124. data/lib/peddler/apis/shipping_v1.rb +9 -9
  125. data/lib/peddler/apis/shipping_v2.rb +19 -19
  126. data/lib/peddler/apis/solicitations_v1.rb +2 -2
  127. data/lib/peddler/apis/tokens_2021_03_01.rb +1 -1
  128. data/lib/peddler/apis/transfers_2024_06_01.rb +2 -2
  129. data/lib/peddler/apis/uploads_2020_11_01.rb +1 -1
  130. data/lib/peddler/apis/vendor_direct_fulfillment_inventory_v1.rb +1 -1
  131. data/lib/peddler/apis/vendor_direct_fulfillment_orders_2021_12_28.rb +3 -3
  132. data/lib/peddler/apis/vendor_direct_fulfillment_orders_v1.rb +3 -3
  133. data/lib/peddler/apis/vendor_direct_fulfillment_payments_v1.rb +1 -1
  134. data/lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb +11 -11
  135. data/lib/peddler/apis/vendor_direct_fulfillment_shipping_v1.rb +9 -9
  136. data/lib/peddler/apis/vendor_direct_fulfillment_transactions_2021_12_28.rb +1 -1
  137. data/lib/peddler/apis/vendor_direct_fulfillment_transactions_v1.rb +1 -1
  138. data/lib/peddler/apis/vendor_invoices_v1.rb +1 -1
  139. data/lib/peddler/apis/vendor_orders_v1.rb +4 -4
  140. data/lib/peddler/apis/vendor_shipments_v1/package_item_details.rb +16 -0
  141. data/lib/peddler/apis/vendor_shipments_v1/regulation_references.rb +32 -0
  142. data/lib/peddler/apis/vendor_shipments_v1.rb +5 -5
  143. data/lib/peddler/apis/vendor_transaction_status_v1.rb +1 -1
  144. data/lib/peddler/data_kiosk/economics20240315/analytics_economics20240315.rb +5 -0
  145. data/lib/peddler/data_kiosk/economics20240315.json +340 -7
  146. data/lib/peddler/data_kiosk/vendor_analytics20240930/traffic.rb +5 -0
  147. data/lib/peddler/data_kiosk/vendor_analytics20240930.json +12 -0
  148. data/lib/peddler/response.rb +1 -1
  149. data/lib/peddler/version.rb +1 -1
  150. data/lib/peddler.rb +2 -0
  151. data/sig/peddler/api.rbs +13 -23
  152. data/sig/peddler/apis/delivery_by_amazon_2022_07_01.rbs +85 -0
  153. data/sig/peddler/apis/external_fulfillment_shipments_2024_09_11.rbs +8 -7
  154. data/sig/peddler/apis/finances_2024_06_19.rbs +1 -1
  155. data/sig/peddler/apis/finances_v0.rbs +30 -7
  156. data/sig/peddler/apis/fulfillment_inbound_2024_03_20.rbs +45 -45
  157. data/sig/peddler/apis/fulfillment_outbound_2020_07_01.rbs +1 -1
  158. data/sig/peddler/apis/orders_v0.rbs +15 -17
  159. data/sig/peddler/apis/replenishment_2022_11_07.rbs +18 -7
  160. data/sig/peddler/apis/seller_wallet_2024_03_01.rbs +49 -42
  161. data/sig/peddler/apis/vendor_shipments_v1.rbs +30 -41
  162. data/sig/peddler/data_kiosk/economics20240315.rbs +8 -7
  163. data/sig/peddler/data_kiosk/vendor_analytics20240930.rbs +8 -7
  164. data/sig/peddler.rbs +4 -0
  165. metadata +13 -5
  166. data/lib/peddler/apis/seller_wallet_2024_03_01/account_holder_address.rb +0 -36
  167. data/lib/peddler/apis/vendor_shipments_v1/packed_quantity.rb +0 -25
  168. data/lib/peddler/apis/vendor_shipments_v1/purchase_order_item_details.rb +0 -18
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is generated. Do not edit.
4
+
5
+ require "structure"
6
+
7
+ module Peddler
8
+ module APIs
9
+ class SellerWallet20240301
10
+ # The contact information of the payee. This field is required when the request `bankAccountOwnershipType` is
11
+ # `THIRD_PARTY`. The contact information is used for payee verification and registration purposes.
12
+ PayeeContactInformation = Structure.new do
13
+ # @return [String] Address Line 1 of the public address
14
+ attribute(:address_line1, String, from: "addressLine1")
15
+
16
+ # @return [String] City name of the public address
17
+ attribute(:city, String)
18
+
19
+ # @return [String] The two digit country code, in ISO 3166 format.
20
+ attribute(:country_code, String, from: "countryCode")
21
+
22
+ # @return [String] Email address of the payee.
23
+ attribute(:email_address, String, from: "emailAddress")
24
+
25
+ # @return [String] Type of entity of the payee.
26
+ attribute(:payee_entity_type, String, from: "payeeEntityType")
27
+
28
+ # @return [String] First name of the payee. There is a 50 character limit.
29
+ attribute(:payee_first_name, String, from: "payeeFirstName")
30
+
31
+ # @return [String] Last name of the payee. There is a 50 character limit.
32
+ attribute(:payee_last_name, String, from: "payeeLastName")
33
+
34
+ # @return [String] Valid phone number of the payee.
35
+ attribute(:phone_number, String, from: "phoneNumber")
36
+
37
+ # @return [String] Postal code of the public address
38
+ attribute(:postal_code, String, from: "postalCode")
39
+
40
+ # @return [String] State name of the public address. This is the state or region for China-based addresses.
41
+ attribute(:state, String)
42
+
43
+ # @return [String] Address Line 2 of the public address
44
+ attribute?(:address_line2, String, from: "addressLine2")
45
+
46
+ # @return [String] Country name of the public address
47
+ attribute?(:country, String)
48
+
49
+ # @return [String] Middle name of the payee. There is a 50 character limit.
50
+ attribute?(:payee_middle_name, String, from: "payeeMiddleName")
51
+ end
52
+ end
53
+ end
54
+ end
@@ -10,6 +10,10 @@ module Peddler
10
10
  class SellerWallet20240301
11
11
  # The current transaction status and related historical details.
12
12
  Transaction = Structure.new do
13
+ # @return [String] The unique identifier of the Amazon Seller Wallet bank account from which the money is
14
+ # debited.
15
+ attribute(:account_id, String, from: "accountId")
16
+
13
17
  # @return [Time] The last update date on the transaction
14
18
  attribute(:last_update_date, Time, from: "lastUpdateDate")
15
19
 
@@ -33,9 +37,6 @@ module Peddler
33
37
  # the customer used to start the transaction.
34
38
  attribute(:transaction_requester_source, String, from: "transactionRequesterSource")
35
39
 
36
- # @return [TransactionAccount] Source bank account details in the transaction
37
- attribute(:transaction_source_account, TransactionAccount, from: "transactionSourceAccount")
38
-
39
40
  # @return [String] Execution Status of the transaction
40
41
  attribute(:transaction_status, String, from: "transactionStatus")
41
42
 
@@ -61,6 +62,9 @@ module Peddler
61
62
  # @return [Money] Specifies the amount of completed transaction in the destination account currency, this will
62
63
  # be populated only for international transactions
63
64
  attribute?(:transaction_final_amount, Money, from: "transactionFinalAmount")
65
+
66
+ # @return [TransactionAccount] Source bank account details in the transaction
67
+ attribute?(:transaction_source_account, TransactionAccount, from: "transactionSourceAccount")
64
68
  end
65
69
  end
66
70
  end
@@ -29,13 +29,13 @@ module Peddler
29
29
  # sensitive information other than VAT-ID.
30
30
  attribute?(:customer_payment_reference, String, from: "customerPaymentReference")
31
31
 
32
- # @return [AccountHolderAddress] Destination bank account details of the transaction request
33
- attribute?(:destination_account_holder_address, AccountHolderAddress, from: "destinationAccountHolderAddress")
34
-
35
32
  # @return [String] Optional field to specify the unique identifier of the destination bank account where the
36
33
  # money needs to be deposited
37
34
  attribute?(:destination_account_id, String, from: "destinationAccountId")
38
35
 
36
+ # @return [PayeeContactInformation] The contact information of a payee.
37
+ attribute?(:payee_contact_information, PayeeContactInformation, from: "payeeContactInformation")
38
+
39
39
  # @return [String] A description of the transaction.
40
40
  attribute?(:transaction_description, String, from: "transactionDescription")
41
41
 
@@ -119,8 +119,13 @@ module Peddler
119
119
  #
120
120
  # @note This operation can make a static sandbox call.
121
121
  # @param body [Hash] Defines the actual payload of the request
122
- # @param dest_account_digital_signature [String] Digital signature for the destination bank account details.
123
- # @param amount_digital_signature [String] Digital signature for the source currency transaction amount.
122
+ # @param dest_account_digital_signature [String] Digital signature for the destination bank account details. For
123
+ # more information, refer to [Third-Party Provider Signature
124
+ # Guidance](https://developer-docs.amazon.com/sp-api/docs/tpp-registration-signature-guidance).
125
+ # @param amount_digital_signature [String] Digital signature for the source currency transaction amount. Sign in
126
+ # the order of the request definitions. You can omit empty or optional fields. For more information, refer to
127
+ # [Third-Party Provider Signature
128
+ # Guidance](https://developer-docs.amazon.com/sp-api/docs/tpp-registration-signature-guidance).
124
129
  # @param marketplace_id [String] The marketplace for which items are returned. The marketplace ID is the globally
125
130
  # unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace
126
131
  # IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
@@ -26,7 +26,7 @@ module Peddler
26
26
  def get_marketplace_participations(rate_limit: 0.016)
27
27
  path = "/sellers/v1/marketplaceParticipations"
28
28
  parser = -> { GetMarketplaceParticipationsResponse }
29
- meter(rate_limit).get(path, parser:)
29
+ get(path, rate_limit:, parser:)
30
30
  end
31
31
 
32
32
  # Returns information about a seller account and its marketplaces.
@@ -37,7 +37,7 @@ module Peddler
37
37
  def get_account(rate_limit: 0.016)
38
38
  path = "/sellers/v1/account"
39
39
  parser = -> { GetAccountResponse }
40
- meter(rate_limit).get(path, parser:)
40
+ get(path, rate_limit:, parser:)
41
41
  end
42
42
  end
43
43
  end
@@ -20,7 +20,7 @@ module Peddler
20
20
  def get_service_job_by_service_job_id(service_job_id, rate_limit: 20.0)
21
21
  path = "/service/v1/serviceJobs/#{percent_encode(service_job_id)}"
22
22
  parser = -> { GetServiceJobByServiceJobIdResponse }
23
- meter(rate_limit).get(path, parser:)
23
+ get(path, rate_limit:, parser:)
24
24
  end
25
25
 
26
26
  # Cancels the service job indicated by the service job identifier specified.
@@ -37,7 +37,7 @@ module Peddler
37
37
  "cancellationReasonCode" => cancellation_reason_code,
38
38
  }.compact
39
39
  parser = -> { CancelServiceJobByServiceJobIdResponse }
40
- meter(rate_limit).put(path, params:, parser:)
40
+ put(path, params:, rate_limit:, parser:)
41
41
  end
42
42
 
43
43
  # Completes the service job indicated by the service job identifier specified.
@@ -49,7 +49,7 @@ module Peddler
49
49
  def complete_service_job_by_service_job_id(service_job_id, rate_limit: 5.0)
50
50
  path = "/service/v1/serviceJobs/#{percent_encode(service_job_id)}/completions"
51
51
  parser = -> { CompleteServiceJobByServiceJobIdResponse }
52
- meter(rate_limit).put(path, parser:)
52
+ put(path, rate_limit:, parser:)
53
53
  end
54
54
 
55
55
  # Gets service job details for the specified filter query.
@@ -111,7 +111,7 @@ module Peddler
111
111
  "storeIds" => stringify_array(store_ids),
112
112
  }.compact
113
113
  parser = -> { GetServiceJobsResponse }
114
- meter(rate_limit).get(path, params:, parser:)
114
+ get(path, params:, rate_limit:, parser:)
115
115
  end
116
116
 
117
117
  # Adds an appointment to the service job indicated by the service job identifier specified.
@@ -124,7 +124,7 @@ module Peddler
124
124
  def add_appointment_for_service_job_by_service_job_id(service_job_id, body, rate_limit: 5.0)
125
125
  path = "/service/v1/serviceJobs/#{percent_encode(service_job_id)}/appointments"
126
126
  parser = -> { SetAppointmentResponse }
127
- meter(rate_limit).post(path, body:, parser:)
127
+ post(path, body:, rate_limit:, parser:)
128
128
  end
129
129
 
130
130
  # Reschedules an appointment for the service job indicated by the service job identifier specified.
@@ -139,7 +139,7 @@ module Peddler
139
139
  rate_limit: 5.0)
140
140
  path = "/service/v1/serviceJobs/#{percent_encode(service_job_id)}/appointments/#{percent_encode(appointment_id)}"
141
141
  parser = -> { SetAppointmentResponse }
142
- meter(rate_limit).post(path, body:, parser:)
142
+ post(path, body:, rate_limit:, parser:)
143
143
  end
144
144
 
145
145
  # Assigns new resource(s) or overwrite/update the existing one(s) to a service job appointment.
@@ -154,7 +154,7 @@ module Peddler
154
154
  def assign_appointment_resources(service_job_id, appointment_id, body, rate_limit: 1.0)
155
155
  path = "/service/v1/serviceJobs/#{percent_encode(service_job_id)}/appointments/#{percent_encode(appointment_id)}/resources"
156
156
  parser = -> { AssignAppointmentResourcesResponse }
157
- meter(rate_limit).put(path, body:, parser:)
157
+ put(path, body:, rate_limit:, parser:)
158
158
  end
159
159
 
160
160
  # Updates the appointment fulfillment data related to a given `jobID` and `appointmentID`.
@@ -168,7 +168,7 @@ module Peddler
168
168
  # @return [Peddler::Response] The API response
169
169
  def set_appointment_fulfillment_data(service_job_id, appointment_id, body, rate_limit: 5.0)
170
170
  path = "/service/v1/serviceJobs/#{percent_encode(service_job_id)}/appointments/#{percent_encode(appointment_id)}/fulfillment"
171
- meter(rate_limit).put(path, body:)
171
+ put(path, body:, rate_limit:)
172
172
  end
173
173
 
174
174
  # Provides capacity slots in a format similar to availability records.
@@ -187,7 +187,7 @@ module Peddler
187
187
  "nextPageToken" => next_page_token,
188
188
  }.compact
189
189
  parser = -> { RangeSlotCapacity }
190
- meter(rate_limit).post(path, body:, params:, parser:)
190
+ post(path, body:, params:, rate_limit:, parser:)
191
191
  end
192
192
 
193
193
  # Provides capacity in fixed-size slots.
@@ -206,7 +206,7 @@ module Peddler
206
206
  "nextPageToken" => next_page_token,
207
207
  }.compact
208
208
  parser = -> { FixedSlotCapacity }
209
- meter(rate_limit).post(path, body:, params:, parser:)
209
+ post(path, body:, params:, rate_limit:, parser:)
210
210
  end
211
211
 
212
212
  # Update the schedule of the given resource.
@@ -223,7 +223,7 @@ module Peddler
223
223
  "marketplaceIds" => stringify_array(marketplace_ids),
224
224
  }.compact
225
225
  parser = -> { UpdateScheduleResponse }
226
- meter(rate_limit).put(path, body:, params:, parser:)
226
+ put(path, body:, params:, rate_limit:, parser:)
227
227
  end
228
228
 
229
229
  # Create a reservation.
@@ -239,7 +239,7 @@ module Peddler
239
239
  "marketplaceIds" => stringify_array(marketplace_ids),
240
240
  }.compact
241
241
  parser = -> { CreateReservationResponse }
242
- meter(rate_limit).post(path, body:, params:, parser:)
242
+ post(path, body:, params:, rate_limit:, parser:)
243
243
  end
244
244
 
245
245
  # Update a reservation.
@@ -256,7 +256,7 @@ module Peddler
256
256
  "marketplaceIds" => stringify_array(marketplace_ids),
257
257
  }.compact
258
258
  parser = -> { UpdateReservationResponse }
259
- meter(rate_limit).put(path, body:, params:, parser:)
259
+ put(path, body:, params:, rate_limit:, parser:)
260
260
  end
261
261
 
262
262
  # Cancel a reservation.
@@ -272,7 +272,7 @@ module Peddler
272
272
  "marketplaceIds" => stringify_array(marketplace_ids),
273
273
  }.compact
274
274
  parser = -> { CancelReservationResponse }
275
- meter(rate_limit).delete(path, params:, parser:)
275
+ delete(path, params:, rate_limit:, parser:)
276
276
  end
277
277
 
278
278
  # Gets appointment slots for the service associated with the service job id specified.
@@ -297,7 +297,7 @@ module Peddler
297
297
  "endTime" => end_time,
298
298
  }.compact
299
299
  parser = -> { GetAppointmentSlotsResponse }
300
- meter(rate_limit).get(path, params:, parser:)
300
+ get(path, params:, rate_limit:, parser:)
301
301
  end
302
302
 
303
303
  # Gets appointment slots as per the service context specified.
@@ -324,7 +324,7 @@ module Peddler
324
324
  "endTime" => end_time,
325
325
  }.compact
326
326
  parser = -> { GetAppointmentSlotsResponse }
327
- meter(rate_limit).get(path, params:, parser:)
327
+ get(path, params:, rate_limit:, parser:)
328
328
  end
329
329
 
330
330
  # Creates an upload destination.
@@ -336,7 +336,7 @@ module Peddler
336
336
  def create_service_document_upload_destination(body, rate_limit: 5.0)
337
337
  path = "/service/v1/documents"
338
338
  parser = -> { CreateServiceDocumentUploadDestination }
339
- meter(rate_limit).post(path, body:, parser:)
339
+ post(path, body:, rate_limit:, parser:)
340
340
  end
341
341
  end
342
342
  end
@@ -23,7 +23,7 @@ module Peddler
23
23
  def get_shipment_details(shipment_id, rate_limit: 1.133)
24
24
  path = "/fba/outbound/brazil/v0/shipments/#{percent_encode(shipment_id)}"
25
25
  parser = -> { GetShipmentDetailsResponse }
26
- meter(rate_limit).get(path, parser:)
26
+ get(path, rate_limit:, parser:)
27
27
  end
28
28
 
29
29
  # Submits a shipment invoice document for a given shipment.
@@ -36,7 +36,7 @@ module Peddler
36
36
  def submit_invoice(shipment_id, body, rate_limit: 1.133)
37
37
  path = "/fba/outbound/brazil/v0/shipments/#{percent_encode(shipment_id)}/invoice"
38
38
  parser = -> { SubmitInvoiceResponse }
39
- meter(rate_limit).post(path, body:, parser:)
39
+ post(path, body:, rate_limit:, parser:)
40
40
  end
41
41
 
42
42
  # Returns the invoice status for the shipment you specify.
@@ -48,7 +48,7 @@ module Peddler
48
48
  def get_invoice_status(shipment_id, rate_limit: 1.133)
49
49
  path = "/fba/outbound/brazil/v0/shipments/#{percent_encode(shipment_id)}/invoice/status"
50
50
  parser = -> { GetInvoiceStatusResponse }
51
- meter(rate_limit).get(path, parser:)
51
+ get(path, rate_limit:, parser:)
52
52
  end
53
53
  end
54
54
  end
@@ -23,7 +23,7 @@ module Peddler
23
23
  def create_shipment(body, rate_limit: 5.0)
24
24
  path = "/shipping/v1/shipments"
25
25
  parser = -> { CreateShipmentResponse }
26
- meter(rate_limit).post(path, body:, parser:)
26
+ post(path, body:, rate_limit:, parser:)
27
27
  end
28
28
 
29
29
  # Return the entire shipment object for the shipmentId.
@@ -35,7 +35,7 @@ module Peddler
35
35
  def get_shipment(shipment_id, rate_limit: 5.0)
36
36
  path = "/shipping/v1/shipments/#{percent_encode(shipment_id)}"
37
37
  parser = -> { GetShipmentResponse }
38
- meter(rate_limit).get(path, parser:)
38
+ get(path, rate_limit:, parser:)
39
39
  end
40
40
 
41
41
  # Cancel a shipment by the given shipmentId.
@@ -47,7 +47,7 @@ module Peddler
47
47
  def cancel_shipment(shipment_id, rate_limit: 5.0)
48
48
  path = "/shipping/v1/shipments/#{percent_encode(shipment_id)}/cancel"
49
49
  parser = -> { CancelShipmentResponse }
50
- meter(rate_limit).post(path, parser:)
50
+ post(path, rate_limit:, parser:)
51
51
  end
52
52
 
53
53
  # Purchase shipping labels based on a given rate.
@@ -60,7 +60,7 @@ module Peddler
60
60
  def purchase_labels(shipment_id, body, rate_limit: 5.0)
61
61
  path = "/shipping/v1/shipments/#{percent_encode(shipment_id)}/purchaseLabels"
62
62
  parser = -> { PurchaseLabelsResponse }
63
- meter(rate_limit).post(path, body:, parser:)
63
+ post(path, body:, rate_limit:, parser:)
64
64
  end
65
65
 
66
66
  # Retrieve shipping label based on the shipment id and tracking id.
@@ -74,7 +74,7 @@ module Peddler
74
74
  def retrieve_shipping_label(shipment_id, tracking_id, body, rate_limit: 5.0)
75
75
  path = "/shipping/v1/shipments/#{percent_encode(shipment_id)}/containers/#{percent_encode(tracking_id)}/label"
76
76
  parser = -> { RetrieveShippingLabelResponse }
77
- meter(rate_limit).post(path, body:, parser:)
77
+ post(path, body:, rate_limit:, parser:)
78
78
  end
79
79
 
80
80
  # Purchase shipping labels.
@@ -86,7 +86,7 @@ module Peddler
86
86
  def purchase_shipment(body, rate_limit: 5.0)
87
87
  path = "/shipping/v1/purchaseShipment"
88
88
  parser = -> { PurchaseShipmentResponse }
89
- meter(rate_limit).post(path, body:, parser:)
89
+ post(path, body:, rate_limit:, parser:)
90
90
  end
91
91
 
92
92
  # Get service rates.
@@ -98,7 +98,7 @@ module Peddler
98
98
  def get_rates(body, rate_limit: 5.0)
99
99
  path = "/shipping/v1/rates"
100
100
  parser = -> { GetRatesResponse }
101
- meter(rate_limit).post(path, body:, parser:)
101
+ post(path, body:, rate_limit:, parser:)
102
102
  end
103
103
 
104
104
  # Verify if the current account is valid.
@@ -109,7 +109,7 @@ module Peddler
109
109
  def get_account(rate_limit: 5.0)
110
110
  path = "/shipping/v1/account"
111
111
  parser = -> { GetAccountResponse }
112
- meter(rate_limit).get(path, parser:)
112
+ get(path, rate_limit:, parser:)
113
113
  end
114
114
 
115
115
  # Return the tracking information of a shipment.
@@ -121,7 +121,7 @@ module Peddler
121
121
  def get_tracking_information(tracking_id, rate_limit: 1.0)
122
122
  path = "/shipping/v1/tracking/#{percent_encode(tracking_id)}"
123
123
  parser = -> { GetTrackingInformationResponse }
124
- meter(rate_limit).get(path, parser:)
124
+ get(path, rate_limit:, parser:)
125
125
  end
126
126
  end
127
127
  end
@@ -23,7 +23,7 @@ module Peddler
23
23
  def get_rates(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
24
24
  path = "/shipping/v2/shipments/rates"
25
25
  parser = -> { GetRatesResponse }
26
- meter(rate_limit).post(path, body:, parser:)
26
+ post(path, body:, rate_limit:, parser:)
27
27
  end
28
28
 
29
29
  # Purchases the shipping service for a shipment using the best fit service offering. Returns purchase related
@@ -44,7 +44,7 @@ module Peddler
44
44
  rate_limit: 80.0)
45
45
  path = "/shipping/v2/shipments/directPurchase"
46
46
  parser = -> { DirectPurchaseResponse }
47
- meter(rate_limit).post(path, body:, parser:)
47
+ post(path, body:, rate_limit:, parser:)
48
48
  end
49
49
 
50
50
  # Purchases a shipping service and returns purchase related details and documents.
@@ -64,7 +64,7 @@ module Peddler
64
64
  def purchase_shipment(body, x_amzn_idempotency_key: nil, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
65
65
  path = "/shipping/v2/shipments"
66
66
  parser = -> { PurchaseShipmentResponse }
67
- meter(rate_limit).post(path, body:, parser:)
67
+ post(path, body:, rate_limit:, parser:)
68
68
  end
69
69
 
70
70
  # Purchases a shipping service identifier and returns purchase-related details and documents.
@@ -78,7 +78,7 @@ module Peddler
78
78
  def one_click_shipment(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
79
79
  path = "/shipping/v2/oneClickShipment"
80
80
  parser = -> { OneClickShipmentResponse }
81
- meter(rate_limit).post(path, body:, parser:)
81
+ post(path, body:, rate_limit:, parser:)
82
82
  end
83
83
 
84
84
  # Returns tracking information for a purchased shipment.
@@ -99,7 +99,7 @@ module Peddler
99
99
  "carrierId" => carrier_id,
100
100
  }.compact
101
101
  parser = -> { GetTrackingResponse }
102
- meter(rate_limit).get(path, params:, parser:)
102
+ get(path, params:, rate_limit:, parser:)
103
103
  end
104
104
 
105
105
  # Returns the shipping documents associated with a package in a shipment.
@@ -125,7 +125,7 @@ module Peddler
125
125
  "dpi" => dpi,
126
126
  }.compact
127
127
  parser = -> { GetShipmentDocumentsResponse }
128
- meter(rate_limit).get(path, params:, parser:)
128
+ get(path, params:, rate_limit:, parser:)
129
129
  end
130
130
 
131
131
  # Cancels a purchased shipment. Returns an empty object if the shipment is successfully cancelled.
@@ -139,7 +139,7 @@ module Peddler
139
139
  def cancel_shipment(shipment_id, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
140
140
  path = "/shipping/v2/shipments/#{percent_encode(shipment_id)}/cancel"
141
141
  parser = -> { CancelShipmentResponse }
142
- meter(rate_limit).put(path, parser:)
142
+ put(path, rate_limit:, parser:)
143
143
  end
144
144
 
145
145
  # Returns the JSON schema to use for providing additional inputs when needed to purchase a shipping offering. Call
@@ -161,7 +161,7 @@ module Peddler
161
161
  "rateId" => rate_id,
162
162
  }.compact
163
163
  parser = -> { GetAdditionalInputsResponse }
164
- meter(rate_limit).get(path, params:, parser:)
164
+ get(path, params:, rate_limit:, parser:)
165
165
  end
166
166
 
167
167
  # This API will return a list of input schema required to register a shipper account with the carrier.
@@ -175,7 +175,7 @@ module Peddler
175
175
 
176
176
  path = "/shipping/v2/carrierAccountFormInputs"
177
177
  parser = -> { GetCarrierAccountFormInputsResponse }
178
- meter(rate_limit).get(path, parser:)
178
+ get(path, rate_limit:, parser:)
179
179
  end
180
180
 
181
181
  # This API will return Get all carrier accounts for a merchant.
@@ -190,7 +190,7 @@ module Peddler
190
190
 
191
191
  path = "/shipping/v2/carrierAccounts"
192
192
  parser = -> { GetCarrierAccountsResponse }
193
- meter(rate_limit).put(path, body:, parser:)
193
+ put(path, body:, rate_limit:, parser:)
194
194
  end
195
195
 
196
196
  # This API associates/links the specified carrier account with the merchant.
@@ -205,7 +205,7 @@ module Peddler
205
205
  def link_carrier_account(carrier_id, body, x_amzn_shipping_business_id: nil, rate_limit: 5.0)
206
206
  path = "/shipping/v2/carrierAccounts/#{percent_encode(carrier_id)}"
207
207
  parser = -> { LinkCarrierAccountResponse }
208
- meter(rate_limit).post(path, body:, parser:)
208
+ post(path, body:, rate_limit:, parser:)
209
209
  end
210
210
 
211
211
  # This API Unlink the specified carrier account with the merchant.
@@ -221,7 +221,7 @@ module Peddler
221
221
 
222
222
  path = "/shipping/v2/carrierAccounts/#{percent_encode(carrier_id)}/unlink"
223
223
  parser = -> { UnlinkCarrierAccountResponse }
224
- meter(rate_limit).put(path, body:, parser:)
224
+ put(path, body:, rate_limit:, parser:)
225
225
  end
226
226
 
227
227
  # This API Call to generate the collection form.
@@ -239,7 +239,7 @@ module Peddler
239
239
 
240
240
  path = "/shipping/v2/collectionForms"
241
241
  parser = -> { GenerateCollectionFormResponse }
242
- meter(rate_limit).post(path, body:, parser:)
242
+ post(path, body:, rate_limit:, parser:)
243
243
  end
244
244
 
245
245
  # This API Call to get the history of the previously generated collection forms.
@@ -254,7 +254,7 @@ module Peddler
254
254
 
255
255
  path = "/shipping/v2/collectionForms/history"
256
256
  parser = -> { GetCollectionFormHistoryResponse }
257
- meter(rate_limit).put(path, body:, parser:)
257
+ put(path, body:, rate_limit:, parser:)
258
258
  end
259
259
 
260
260
  # This API Get all unmanifested carriers with shipment locations. Any locations which has unmanifested shipments
@@ -270,7 +270,7 @@ module Peddler
270
270
 
271
271
  path = "/shipping/v2/unmanifestedShipments"
272
272
  parser = -> { GetUnmanifestedShipmentsResponse }
273
- meter(rate_limit).put(path, body:, parser:)
273
+ put(path, body:, rate_limit:, parser:)
274
274
  end
275
275
 
276
276
  # This API reprint a collection form.
@@ -285,7 +285,7 @@ module Peddler
285
285
 
286
286
  path = "/shipping/v2/collectionForms/#{percent_encode(collection_form_id)}"
287
287
  parser = -> { GetCollectionFormResponse }
288
- meter(rate_limit).get(path, parser:)
288
+ get(path, rate_limit:, parser:)
289
289
  end
290
290
 
291
291
  # Returns a list of access points in proximity of input postal code.
@@ -307,7 +307,7 @@ module Peddler
307
307
  "postalCode" => postal_code,
308
308
  }.compact
309
309
  parser = -> { GetAccessPointsResponse }
310
- meter(rate_limit).get(path, params:, parser:)
310
+ get(path, params:, rate_limit:, parser:)
311
311
  end
312
312
 
313
313
  # This API submits the NDR (Non-delivery Report) Feedback for any eligible shipment.
@@ -320,7 +320,7 @@ module Peddler
320
320
  # @return [Peddler::Response] The API response
321
321
  def submit_ndr_feedback(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
322
322
  path = "/shipping/v2/ndrFeedback"
323
- meter(rate_limit).post(path, body:)
323
+ post(path, body:, rate_limit:)
324
324
  end
325
325
 
326
326
  # This API will be used to create claim for single eligible shipment.
@@ -334,7 +334,7 @@ module Peddler
334
334
  def create_claim(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
335
335
  path = "/shipping/v2/claims"
336
336
  parser = -> { CreateClaimResponse }
337
- meter(rate_limit).post(path, body:, parser:)
337
+ post(path, body:, rate_limit:, parser:)
338
338
  end
339
339
  end
340
340
  end
@@ -33,7 +33,7 @@ module Peddler
33
33
  "marketplaceIds" => stringify_array(marketplace_ids),
34
34
  }.compact
35
35
  parser = -> { GetSolicitationActionsForOrderResponse }
36
- meter(rate_limit).get(path, params:, parser:)
36
+ get(path, params:, rate_limit:, parser:)
37
37
  end
38
38
 
39
39
  # Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send
@@ -52,7 +52,7 @@ module Peddler
52
52
  "marketplaceIds" => stringify_array(marketplace_ids),
53
53
  }.compact
54
54
  parser = -> { CreateProductReviewAndSellerFeedbackSolicitationResponse }
55
- meter(rate_limit).post(path, params:, parser:)
55
+ post(path, params:, rate_limit:, parser:)
56
56
  end
57
57
  end
58
58
  end
@@ -29,7 +29,7 @@ module Peddler
29
29
  def create_restricted_data_token(body, rate_limit: 1.0)
30
30
  path = "/tokens/2021-03-01/restrictedDataToken"
31
31
  parser = -> { CreateRestrictedDataTokenResponse }
32
- meter(rate_limit).post(path, body:, parser:)
32
+ post(path, body:, rate_limit:, parser:)
33
33
  end
34
34
  end
35
35
  end
@@ -22,7 +22,7 @@ module Peddler
22
22
  def initiate_payout(body, rate_limit: 0.017)
23
23
  path = "/finances/transfers/2024-06-01/payouts"
24
24
  parser = -> { InitiatePayoutResponse }
25
- meter(rate_limit).post(path, body:, parser:)
25
+ post(path, body:, rate_limit:, parser:)
26
26
  end
27
27
 
28
28
  # Returns the list of payment methods for the seller, which can be filtered by method type.
@@ -42,7 +42,7 @@ module Peddler
42
42
  "paymentMethodTypes" => stringify_array(payment_method_types),
43
43
  }.compact
44
44
  parser = -> { GetPaymentMethodsResponse }
45
- meter(rate_limit).get(path, params:, parser:)
45
+ get(path, params:, rate_limit:, parser:)
46
46
  end
47
47
  end
48
48
  end
@@ -40,7 +40,7 @@ module Peddler
40
40
  "contentType" => content_type,
41
41
  }.compact
42
42
  parser = -> { CreateUploadDestinationResponse }
43
- meter(rate_limit).post(path, params:, parser:)
43
+ post(path, params:, rate_limit:, parser:)
44
44
  end
45
45
  end
46
46
  end
@@ -21,7 +21,7 @@ module Peddler
21
21
  def submit_inventory_update(body, warehouse_id, rate_limit: 10.0)
22
22
  path = "/vendor/directFulfillment/inventory/v1/warehouses/#{percent_encode(warehouse_id)}/items"
23
23
  parser = -> { SubmitInventoryUpdateResponse }
24
- meter(rate_limit).post(path, body:, parser:)
24
+ post(path, body:, rate_limit:, parser:)
25
25
  end
26
26
  end
27
27
  end
@@ -48,7 +48,7 @@ module Peddler
48
48
  "includeDetails" => include_details,
49
49
  }.compact
50
50
  parser = -> { OrderList }
51
- meter(rate_limit).get(path, params:, parser:)
51
+ get(path, params:, rate_limit:, parser:)
52
52
  end
53
53
 
54
54
  # Returns purchase order information for the purchaseOrderNumber that you specify.
@@ -61,7 +61,7 @@ module Peddler
61
61
  def get_order(purchase_order_number, rate_limit: 10.0)
62
62
  path = "/vendor/directFulfillment/orders/2021-12-28/purchaseOrders/#{percent_encode(purchase_order_number)}"
63
63
  parser = -> { Order }
64
- meter(rate_limit).get(path, parser:)
64
+ get(path, rate_limit:, parser:)
65
65
  end
66
66
 
67
67
  # Submits acknowledgements for one or more purchase orders.
@@ -73,7 +73,7 @@ module Peddler
73
73
  def submit_acknowledgement(body, rate_limit: 10.0)
74
74
  path = "/vendor/directFulfillment/orders/2021-12-28/acknowledgements"
75
75
  parser = -> { TransactionId }
76
- meter(rate_limit).post(path, body:, parser:)
76
+ post(path, body:, rate_limit:, parser:)
77
77
  end
78
78
  end
79
79
  end