peddler 5.3.1 → 5.4.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 (114) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +55 -11
  3. data/lib/peddler/api.rb +3 -3
  4. data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11/address.rb +4 -1
  5. data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11/distance.rb +20 -0
  6. data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11/geocodes.rb +23 -0
  7. data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11/handover_location.rb +23 -0
  8. data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11/ship_label_metadata.rb +4 -0
  9. data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11/shipment_info.rb +3 -0
  10. data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11/shipping_options.rb +4 -0
  11. data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11.rb +1 -1
  12. data/lib/peddler/apis/feeds_2021_06_30.rb +8 -2
  13. data/lib/peddler/apis/fulfillment_outbound_2020_07_01/amount.rb +2 -2
  14. data/lib/peddler/apis/fulfillment_outbound_2020_07_01/delivery_document.rb +2 -2
  15. data/lib/peddler/apis/fulfillment_outbound_2020_07_01/delivery_information.rb +2 -1
  16. data/lib/peddler/apis/fulfillment_outbound_2020_07_01/delivery_preferences.rb +1 -1
  17. data/lib/peddler/apis/fulfillment_outbound_2020_07_01/delivery_window.rb +3 -4
  18. data/lib/peddler/apis/fulfillment_outbound_2020_07_01/drop_off_location.rb +9 -7
  19. data/lib/peddler/apis/fulfillment_outbound_2020_07_01/feature_settings.rb +5 -1
  20. data/lib/peddler/apis/fulfillment_outbound_2020_07_01/feature_sku.rb +1 -1
  21. data/lib/peddler/apis/fulfillment_outbound_2020_07_01/fulfillment_order.rb +2 -2
  22. data/lib/peddler/apis/fulfillment_outbound_2020_07_01/fulfillment_preview_shipment.rb +6 -6
  23. data/lib/peddler/apis/fulfillment_outbound_2020_07_01/fulfillment_shipment_package.rb +3 -4
  24. data/lib/peddler/apis/fulfillment_outbound_2020_07_01/get_feature_inventory_response.rb +1 -1
  25. data/lib/peddler/apis/fulfillment_outbound_2020_07_01/get_feature_sku_result.rb +12 -3
  26. data/lib/peddler/apis/fulfillment_outbound_2020_07_01/origin.rb +2 -1
  27. data/lib/peddler/apis/fulfillment_outbound_2020_07_01/tracking_event.rb +1 -2
  28. data/lib/peddler/apis/orders_2026_01_01/associated_order_item.rb +27 -0
  29. data/lib/peddler/apis/orders_2026_01_01/item_packing.rb +3 -0
  30. data/lib/peddler/apis/orders_2026_01_01/item_picking.rb +1 -1
  31. data/lib/peddler/apis/orders_2026_01_01/item_proceeds_detailed_breakdown.rb +1 -1
  32. data/lib/peddler/apis/orders_2026_01_01/item_tax.rb +20 -0
  33. data/lib/peddler/apis/orders_2026_01_01/item_tax_calculation_breakdown.rb +21 -0
  34. data/lib/peddler/apis/orders_2026_01_01/item_tax_collection.rb +24 -0
  35. data/lib/peddler/apis/orders_2026_01_01/order.rb +8 -1
  36. data/lib/peddler/apis/orders_2026_01_01/order_item.rb +7 -0
  37. data/lib/peddler/apis/orders_2026_01_01/order_payment.rb +17 -0
  38. data/lib/peddler/apis/orders_2026_01_01/order_tax.rb +20 -0
  39. data/lib/peddler/apis/orders_2026_01_01/order_tax_invoicing.rb +34 -0
  40. data/lib/peddler/apis/orders_2026_01_01/order_tax_registration.rb +39 -0
  41. data/lib/peddler/apis/orders_2026_01_01/package_status.rb +4 -3
  42. data/lib/peddler/apis/orders_2026_01_01/pagination.rb +5 -5
  43. data/lib/peddler/apis/orders_2026_01_01/payment_execution.rb +39 -0
  44. data/lib/peddler/apis/orders_2026_01_01/search_orders_response.rb +10 -11
  45. data/lib/peddler/apis/orders_2026_01_01/serial_number_requirement.rb +19 -0
  46. data/lib/peddler/apis/orders_2026_01_01/tax_registration_attribute.rb +22 -0
  47. data/lib/peddler/apis/orders_2026_01_01.rb +15 -13
  48. data/lib/peddler/apis/orders_v0/address.rb +3 -3
  49. data/lib/peddler/apis/orders_v0/address_extended_fields.rb +9 -2
  50. data/lib/peddler/apis/orders_v0/buyer_info.rb +3 -0
  51. data/lib/peddler/apis/orders_v0/geo_coordinates.rb +20 -0
  52. data/lib/peddler/apis/orders_v0/order_buyer_info.rb +3 -0
  53. data/lib/peddler/apis/orders_v0.rb +6 -2
  54. data/lib/peddler/apis/product_pricing_2022_05_01/competitive_summary_response_body.rb +3 -0
  55. data/lib/peddler/apis/product_pricing_2022_05_01/item.rb +17 -0
  56. data/lib/peddler/apis/product_pricing_2022_05_01/points.rb +1 -1
  57. data/lib/peddler/apis/product_pricing_2022_05_01/similar_items.rb +17 -0
  58. data/lib/peddler/apis/replenishment_2022_11_07/deliveries_condition.rb +22 -0
  59. data/lib/peddler/apis/replenishment_2022_11_07/forecast_deliveries.rb +26 -0
  60. data/lib/peddler/apis/replenishment_2022_11_07/get_selling_partner_metrics_request.rb +3 -3
  61. data/lib/peddler/apis/replenishment_2022_11_07/get_selling_partner_metrics_response_metric.rb +5 -1
  62. data/lib/peddler/apis/replenishment_2022_11_07/list_offer_metrics_request_filters.rb +1 -1
  63. data/lib/peddler/apis/replenishment_2022_11_07/list_offer_metrics_response_offer.rb +30 -23
  64. data/lib/peddler/apis/replenishment_2022_11_07/list_offers_request_filters.rb +7 -3
  65. data/lib/peddler/apis/replenishment_2022_11_07/list_offers_response_offer.rb +27 -1
  66. data/lib/peddler/apis/replenishment_2022_11_07/offer_program_configuration.rb +1 -1
  67. data/lib/peddler/apis/replenishment_2022_11_07/time_interval.rb +1 -1
  68. data/lib/peddler/apis/reports_2021_06_30.rb +8 -2
  69. data/lib/peddler/apis/seller_wallet_2024_03_01/balance.rb +6 -6
  70. data/lib/peddler/apis/seller_wallet_2024_03_01/balance_listing.rb +2 -2
  71. data/lib/peddler/apis/seller_wallet_2024_03_01/bank_account.rb +5 -5
  72. data/lib/peddler/apis/seller_wallet_2024_03_01/bank_account_listing.rb +2 -2
  73. data/lib/peddler/apis/seller_wallet_2024_03_01/delete_transfer_schedule.rb +3 -2
  74. data/lib/peddler/apis/seller_wallet_2024_03_01/fee.rb +4 -7
  75. data/lib/peddler/apis/seller_wallet_2024_03_01/fx_rate_details.rb +6 -6
  76. data/lib/peddler/apis/seller_wallet_2024_03_01/payee_contact_information.rb +5 -5
  77. data/lib/peddler/apis/seller_wallet_2024_03_01/payment_preference.rb +2 -3
  78. data/lib/peddler/apis/seller_wallet_2024_03_01/schedule_expression.rb +4 -5
  79. data/lib/peddler/apis/seller_wallet_2024_03_01/transaction.rb +13 -14
  80. data/lib/peddler/apis/seller_wallet_2024_03_01/transaction_account.rb +8 -8
  81. data/lib/peddler/apis/seller_wallet_2024_03_01/transaction_initiation_request.rb +8 -7
  82. data/lib/peddler/apis/seller_wallet_2024_03_01/transaction_instrument_details.rb +6 -7
  83. data/lib/peddler/apis/seller_wallet_2024_03_01/transaction_listing.rb +6 -5
  84. data/lib/peddler/apis/seller_wallet_2024_03_01/transfer_rate_preview.rb +4 -3
  85. data/lib/peddler/apis/seller_wallet_2024_03_01/transfer_schedule.rb +11 -12
  86. data/lib/peddler/apis/seller_wallet_2024_03_01/transfer_schedule_failures.rb +3 -3
  87. data/lib/peddler/apis/seller_wallet_2024_03_01/transfer_schedule_information.rb +5 -6
  88. data/lib/peddler/apis/seller_wallet_2024_03_01/transfer_schedule_listing.rb +6 -5
  89. data/lib/peddler/apis/seller_wallet_2024_03_01/transfer_schedule_request.rb +11 -13
  90. data/lib/peddler/apis/seller_wallet_2024_03_01.rb +30 -28
  91. data/lib/peddler/apis/services_v1/money_amount.rb +20 -0
  92. data/lib/peddler/apis/services_v1/payment.rb +20 -0
  93. data/lib/peddler/apis/services_v1/service_job.rb +3 -0
  94. data/lib/peddler/apis/services_v1.rb +1 -1
  95. data/lib/peddler/apis/shipment_invoicing_v0/payment_information.rb +6 -6
  96. data/lib/peddler/apis/shipment_invoicing_v0/payment_information_list.rb +1 -1
  97. data/lib/peddler/data_kiosk/economics20240315.json +6 -6
  98. data/lib/peddler/data_kiosk/sales_and_traffic20231115.json +6 -6
  99. data/lib/peddler/data_kiosk/sales_and_traffic20240424.json +6 -6
  100. data/lib/peddler/data_kiosk/vendor_analytics20240930.json +6 -6
  101. data/lib/peddler/errors.rb +1 -0
  102. data/lib/peddler/version.rb +1 -1
  103. data/sig/peddler/api.rbs +1 -1
  104. data/sig/peddler/apis/external_fulfillment_shipments_2024_09_11.rbs +85 -28
  105. data/sig/peddler/apis/feeds_2021_06_30.rbs +1 -1
  106. data/sig/peddler/apis/fulfillment_outbound_2020_07_01.rbs +11 -8
  107. data/sig/peddler/apis/orders_2026_01_01.rbs +220 -23
  108. data/sig/peddler/apis/orders_v0.rbs +42 -22
  109. data/sig/peddler/apis/product_pricing_2022_05_01.rbs +40 -7
  110. data/sig/peddler/apis/replenishment_2022_11_07.rbs +76 -28
  111. data/sig/peddler/apis/reports_2021_06_30.rbs +1 -1
  112. data/sig/peddler/apis/services_v1.rbs +42 -7
  113. data/sig/peddler/errors.rbs +3 -0
  114. metadata +32 -5
@@ -0,0 +1,21 @@
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 Orders20260101
10
+ # Tax calculation breakdowns for an order item.
11
+ ItemTaxCalculationBreakdown = Structure.new do
12
+ # @return [String] The tax reporting scheme applied to this order item.
13
+ #
14
+ # **Possible values**:
15
+ # - `UOSS` (Union one stop shop. The item being purchased is held in the EU for shipment) - `IOSS` (Import one
16
+ # stop shop. The item being purchased is not held in the EU for shipment)
17
+ attribute?(:reporting_scheme, String, from: "reportingScheme")
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,24 @@
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 Orders20260101
10
+ # Tax collection information for an order item.
11
+ ItemTaxCollection = Structure.new do
12
+ # @return [String] The tax collection model applied to the item.
13
+ #
14
+ # **Possible values**:
15
+ # - `MARKETPLACE_FACILITATOR` (Tax is withheld and remitted to the taxing authority by Amazon on behalf of the
16
+ # seller)
17
+ attribute?(:model, String)
18
+
19
+ # @return [String] The party responsible for withholding the taxes and remitting them to the taxing authority.
20
+ attribute?(:responsible_party, String, from: "responsibleParty")
21
+ end
22
+ end
23
+ end
24
+ end
@@ -45,6 +45,9 @@ module Peddler
45
45
  # **Note:** Only available for merchant-fulfilled (FBM) orders.
46
46
  attribute?(:packages, [OrderPackage])
47
47
 
48
+ # @return [OrderPayment] Payment information for the order.
49
+ attribute?(:payment, OrderPayment)
50
+
48
51
  # @return [OrderProceeds] Financial information about this order.
49
52
  attribute?(:proceeds, OrderProceeds)
50
53
 
@@ -52,11 +55,15 @@ module Peddler
52
55
  # experience.
53
56
  #
54
57
  # **Possible values**: `AMAZON_BAZAAR`, `AMAZON_BUSINESS`, `AMAZON_EASY_SHIP`, `AMAZON_HAUL`,
55
- # `DELIVERY_BY_AMAZON`, `FBM_SHIP_PLUS`, `IN_STORE_PICK_UP`, `PREMIUM`, `PREORDER`, `PRIME`
58
+ # `DELIVERY_BY_AMAZON`, `FBM_SHIP_PLUS`, `INVOICE_BY_AMAZON`, `IN_STORE_PICK_UP`, `PREMIUM`, `PREORDER`,
59
+ # `PRIME`
56
60
  attribute?(:programs, [String])
57
61
 
58
62
  # @return [Recipient] Information about the person or location where this order should be delivered.
59
63
  attribute?(:recipient, Recipient)
64
+
65
+ # @return [OrderTax] Tax-related information for the order.
66
+ attribute?(:tax, OrderTax)
60
67
  end
61
68
  end
62
69
  end
@@ -18,6 +18,10 @@ module Peddler
18
18
  # @return [Integer] The number of units of this item that the customer ordered.
19
19
  attribute(:quantity_ordered, Integer, null: false, from: "quantityOrdered")
20
20
 
21
+ # @return [Array<AssociatedOrderItem>] A list of order items associated with this item. For example, a value-add
22
+ # service purchased with the product.
23
+ attribute?(:associated_order_items, [AssociatedOrderItem], from: "associatedOrderItems")
24
+
21
25
  # @return [ItemCancellation] The cancellation information of the order item.
22
26
  attribute?(:cancellation, ItemCancellation)
23
27
 
@@ -42,6 +46,9 @@ module Peddler
42
46
 
43
47
  # @return [ItemPromotion] Details about any discounts, coupons, or promotional offers applied to this item.
44
48
  attribute?(:promotion, ItemPromotion)
49
+
50
+ # @return [ItemTax] Tax-related information for this order item.
51
+ attribute?(:tax, ItemTax)
45
52
  end
46
53
  end
47
54
  end
@@ -0,0 +1,17 @@
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 Orders20260101
10
+ # Payment information about the order.
11
+ OrderPayment = Structure.new do
12
+ # @return [Array<PaymentExecution>] A list of payment executions for the order.
13
+ attribute?(:payment_executions, [PaymentExecution], from: "paymentExecutions")
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,20 @@
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 Orders20260101
10
+ # Tax information about the order.
11
+ OrderTax = Structure.new do
12
+ # @return [OrderTaxInvoicing] Tax invoicing information for the order.
13
+ attribute?(:tax_invoicing, OrderTaxInvoicing, from: "taxInvoicing")
14
+
15
+ # @return [Array<OrderTaxRegistration>] A list of tax registrations associated with the order.
16
+ attribute?(:tax_registrations, [OrderTaxRegistration], from: "taxRegistrations")
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,34 @@
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 Orders20260101
10
+ # Tax invoicing information for the order.
11
+ OrderTaxInvoicing = Structure.new do
12
+ # @return [String] The buyer's invoicing preference, which indicates whether the seller should issue an
13
+ # individual or a business invoice to the buyer.
14
+ #
15
+ # **Note**: This attribute is only available in the Turkey marketplace.
16
+ #
17
+ # **Possible values**:
18
+ # - `INDIVIDUAL` (Issues an individual invoice to the buyer) - `BUSINESS` (Issues a business invoice to the
19
+ # buyer)
20
+ attribute?(:buyer_invoice_preference, String, from: "buyerInvoicePreference")
21
+
22
+ # @return [String] The status of the invoice. Only available for Easy Ship orders and orders in the Brazil
23
+ # marketplace.
24
+ #
25
+ # **Possible values**:
26
+ # - `NOT_REQUIRED` (The order does not require an electronic invoice to be uploaded) - `NOT_FOUND` (The order
27
+ # requires an electronic invoice but it is not uploaded) - `PROCESSING` (The required electronic invoice was
28
+ # uploaded and is processing) - `ERRORED` (The uploaded electronic invoice was not accepted) - `ACCEPTED` (The
29
+ # uploaded electronic invoice was accepted)
30
+ attribute?(:invoice_status, String, from: "invoiceStatus")
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,39 @@
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 Orders20260101
10
+ # Tax registration information for an entity associated with the order.
11
+ OrderTaxRegistration = Structure.new do
12
+ # @return [String] The type of entity that the tax registration belongs to.
13
+ #
14
+ # **Possible values**:
15
+ # - `BUYER` (Indicates that this is the buyer's tax registration information) - `MERCHANT` (Indicates that this
16
+ # is the merchant's tax registration information) - `MARKETPLACE` (Indicates that this is the marketplace's
17
+ # tax registration information)
18
+ attribute?(:entity_type, String, from: "entityType")
19
+
20
+ # @return [String] The legal name associated with the tax registration.
21
+ attribute?(:legal_name, String, from: "legalName")
22
+
23
+ # @return [CustomerAddress] The address associated with the tax registration.
24
+ attribute?(:tax_registration_address, CustomerAddress, from: "taxRegistrationAddress")
25
+
26
+ # @return [Array<TaxRegistrationAttribute>] Additional attributes related to the tax registration.
27
+ attribute?(:tax_registration_attributes, [TaxRegistrationAttribute], from: "taxRegistrationAttributes")
28
+
29
+ # @return [String] The tax registration number that identifies the entity for tax purposes.
30
+ attribute?(:tax_registration_number, String, from: "taxRegistrationNumber")
31
+
32
+ # @return [String] The type of the tax registration number.
33
+ #
34
+ # **Possible values**: `BUSINESS`, `VAT`, `CST`, `CPF`, `CNPJ`
35
+ attribute?(:tax_registration_type, String, from: "taxRegistrationType")
36
+ end
37
+ end
38
+ end
39
+ end
@@ -15,9 +15,10 @@ module Peddler
15
15
  # @return [String] Granular status information providing specific details about the package's current location
16
16
  # and handling stage.
17
17
  #
18
- # **Possible values:** - `PENDING_SCHEDULE` (Package awaiting pickup scheduling) - `PENDING_PICK_UP` (Package
19
- # ready for carrier collection from seller) - `PENDING_DROP_OFF` (Package awaiting seller delivery to carrier)
20
- # - `LABEL_CANCELLED` (Shipping label canceled by seller) - `PICKED_UP` (Package collected by carrier from
18
+ # **Possible values**:
19
+ # - `PENDING_SCHEDULE` (Package awaiting pickup scheduling) - `PENDING_PICK_UP` (Package ready for carrier
20
+ # collection from seller) - `PENDING_DROP_OFF` (Package awaiting seller delivery to carrier) -
21
+ # `LABEL_CANCELLED` (Shipping label canceled by seller) - `PICKED_UP` (Package collected by carrier from
21
22
  # seller location) - `DROPPED_OFF` (Package delivered to carrier by seller) - `AT_ORIGIN_FC` (Package at
22
23
  # originating fulfillment center) - `AT_DESTINATION_FC` (Package at destination fulfillment center) -
23
24
  # `DELIVERED` (Package successfully delivered to recipient) - `REJECTED_BY_BUYER` (Package refused by intended
@@ -7,11 +7,11 @@ require "structure"
7
7
  module Peddler
8
8
  module APIs
9
9
  class Orders20260101
10
- # When a request has results that are not included in the response, pagination occurs. This means the results are
11
- # divided into individual pages. To retrieve a different page, you must pass the token value as the
12
- # `paginationToken` query parameter in the subsequent request. All other parameters must be provided with the same
13
- # values that were provided with the request that generated this token, with the exception of `maxResultsPerPage`
14
- # and `includedData`, which can be modified between calls. The token will expire after 24 hours. When there are no
10
+ # Pagination occurs when a request has results that exceed the response limit. This means the results are divided
11
+ # into individual pages. To retrieve a different page, you must pass the token value as the `paginationToken`
12
+ # query parameter in the subsequent request. All other parameters must be provided with the same values that were
13
+ # provided with the request that generated this token, with the exception of `maxResultsPerPage` and
14
+ # `includedData`, which can be modified between calls. The token will expire after 24 hours. When there are no
15
15
  # other pages to fetch, the `pagination` field will be absent from the response.
16
16
  Pagination = Structure.new do
17
17
  # @return [String] A token that can be used to fetch the next page of results.
@@ -0,0 +1,39 @@
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 Orders20260101
10
+ # Payment execution details for an order.
11
+ PaymentExecution = Structure.new do
12
+ # @return [String] The unique identifier of the payment processor or acquiring bank that authorizes the payment.
13
+ #
14
+ # **Note**: This attribute is only available for orders in the Brazil (BR) marketplace when the `paymentMethod`
15
+ # is `CreditCard` or `Pix`.
16
+ attribute?(:acquirer_id, String, from: "acquirerId")
17
+
18
+ # @return [String] The unique code that confirms the payment authorization.
19
+ #
20
+ # **Note**: This attribute is only available for orders in the Brazil (BR) marketplace when the `paymentMethod`
21
+ # is `CreditCard` or `Pix`.
22
+ attribute?(:authorization_code, String, from: "authorizationCode")
23
+
24
+ # @return [String] The card network or brand used in the payment transaction (for example, Visa or Mastercard).
25
+ #
26
+ # **Note**: This attribute is only available for orders in the Brazil (BR) marketplace when the `paymentMethod`
27
+ # is `CreditCard`.
28
+ attribute?(:card_brand, String, from: "cardBrand")
29
+
30
+ # @return [Money] The monetary value of the payment execution.
31
+ attribute?(:payment_amount, Money, from: "paymentAmount")
32
+
33
+ # @return [String] The payment method used for this payment execution (for example, CashOnDelivery,
34
+ # ConvenienceStore, CreditCard, Invoice, Pix, and so on).
35
+ attribute?(:payment_method, String, from: "paymentMethod")
36
+ end
37
+ end
38
+ end
39
+ end
@@ -13,21 +13,20 @@ module Peddler
13
13
  # @return [Array<Order>] An array containing all orders that match the search criteria.
14
14
  attribute(:orders, [Order], null: false)
15
15
 
16
- # @return [Time] Only orders placed before the specified time are returned. The date must be in
17
- # {https://developer-docs.amazon.com/sp-api/docs/iso-8601 ISO 8601} format.
16
+ # @return [Time] Only orders placed before the specified time are returned. The date must be in [ISO
17
+ # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
18
18
  attribute?(:created_before, Time, from: "createdBefore")
19
19
 
20
- # @return [Time] Only orders updated before the specified time are returned. The date must be in
21
- # {https://developer-docs.amazon.com/sp-api/docs/iso-8601 ISO 8601} format.
20
+ # @return [Time] Only orders updated before the specified time are returned. The date must be in [ISO
21
+ # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
22
22
  attribute?(:last_updated_before, Time, from: "lastUpdatedBefore")
23
23
 
24
- # @return [Pagination] When a request has results that are not included in the response, pagination occurs. This
25
- # means the results are divided into individual pages. To retrieve a different page, you must pass the token
26
- # value as the `paginationToken` query parameter in the subsequent request. All other parameters must be
27
- # provided with the same values that were provided with the request that generated this token, with the
28
- # exception of `maxResultsPerPage` and `includedData`, which can be modified between calls. The token will
29
- # expire after 24 hours. When there are no other pages to fetch, the `pagination` field will be absent from
30
- # the response.
24
+ # @return [Pagination] Pagination occurs when a request has results that exceed the response limit. This means
25
+ # the results are divided into individual pages. To retrieve a different page, you must pass the token value
26
+ # as the `paginationToken` query parameter in the subsequent request. All other parameters must be provided
27
+ # with the same values that were provided with the request that generated this token, with the exception of
28
+ # `maxResultsPerPage` and `includedData`, which can be modified between calls. The token will expire after 24
29
+ # hours. When there are no other pages to fetch, the `pagination` field will be absent from the response.
31
30
  attribute?(:pagination, Pagination)
32
31
  end
33
32
  end
@@ -0,0 +1,19 @@
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 Orders20260101
10
+ # Whether serial numbers must be provided for this line item.
11
+ SerialNumberRequirement = Structure.new do
12
+ # @return [String] The requirement type for this request.
13
+ #
14
+ # **Possible values**: `REQUIRED`
15
+ attribute?(:requirement_type, String, from: "requirementType")
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,22 @@
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 Orders20260101
10
+ # An additional attribute associated with a tax registration.
11
+ TaxRegistrationAttribute = Structure.new do
12
+ # @return [String] The name of the tax registration attribute.
13
+ #
14
+ # **Possible values**: `TAX_OFFICE`
15
+ attribute?(:key, String)
16
+
17
+ # @return [String] The value of the tax registration attribute.
18
+ attribute?(:value, String)
19
+ end
20
+ end
21
+ end
22
+ end
@@ -15,8 +15,8 @@ module Peddler
15
15
  #
16
16
  # @see https://github.com/amzn/selling-partner-api-models/blob/main/models/orders-api-model/orders_2026-01-01.json
17
17
  class Orders20260101 < API
18
- # Returns orders that are created or updated during the time period that you specify. You can filter the response
19
- # for specific types of orders.
18
+ # Returns orders created or updated during the time period that you specify. You can filter the response for
19
+ # specific types of orders.
20
20
  #
21
21
  # @note This operation can make a static sandbox call.
22
22
  # @param created_after [String] The response includes orders created at or after this time. The date must be in
@@ -28,14 +28,14 @@ module Peddler
28
28
  # `createdAfter` in the request, `createdBefore` is optional, and if provided must be equal to or after the
29
29
  # `createdAfter` date and at least two minutes before the time of the request. If `createdBefore` is provided,
30
30
  # neither `lastUpdatedAfter` nor `lastUpdatedBefore` may be provided.
31
- # @param last_updated_after [String] The response includes orders updated at or after this time. An update is
32
- # defined as any change made by Amazon or by the seller, including an update to the order status. The date must
33
- # be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: You must provide
34
- # exactly one of `createdAfter` and `lastUpdatedAfter`. If `lastUpdatedAfter` is provided, neither
35
- # `createdAfter` nor `createdBefore` may be provided.
31
+ # @param last_updated_after [String] The response includes orders updated at or after this time. An update is any
32
+ # change made by Amazon or the seller, including changes to order status. The date must be in [ISO
33
+ # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: You must provide exactly one
34
+ # of `createdAfter` and `lastUpdatedAfter`. If `lastUpdatedAfter` is provided, neither `createdAfter` nor
35
+ # `createdBefore` may be provided.
36
36
  # @param last_updated_before [String] The response includes orders updated at or before this time. An update is
37
- # defined as any change made by Amazon or by the seller, including an update to the order status. The date must
38
- # be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: If you include
37
+ # any change made by Amazon or the seller, including changes to order status. The date must be in [ISO
38
+ # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: If you include
39
39
  # `lastUpdatedAfter` in the request, `lastUpdatedBefore` is optional, and if provided must be equal to or after
40
40
  # the `lastUpdatedAfter` date and at least two minutes before the time of the request. If `lastUpdatedBefore` is
41
41
  # provided, neither `createdAfter` nor `createdBefore` may be provided.
@@ -53,10 +53,11 @@ module Peddler
53
53
  # you must pass the `nextToken` value as the `paginationToken` query parameter in the next request. You will not
54
54
  # receive a `nextToken` value on the last page.
55
55
  # @param included_data [Array<String>] A list of datasets to include in the response.
56
+ # @param rate_limit [Float] Requests per second
56
57
  # @return [Peddler::Response] The API response
57
58
  def search_orders(created_after: nil, created_before: nil, last_updated_after: nil, last_updated_before: nil,
58
59
  fulfillment_statuses: nil, marketplace_ids: nil, fulfilled_by: nil, max_results_per_page: nil,
59
- pagination_token: nil, included_data: nil)
60
+ pagination_token: nil, included_data: nil, rate_limit: 0.0056)
60
61
  path = "/orders/2026-01-01/orders"
61
62
  params = {
62
63
  "createdAfter" => created_after,
@@ -71,7 +72,7 @@ module Peddler
71
72
  "includedData" => stringify_array(included_data),
72
73
  }.compact
73
74
  parser = -> { SearchOrdersResponse }
74
- get(path, params:, parser:)
75
+ get(path, params:, rate_limit:, parser:)
75
76
  end
76
77
 
77
78
  # Returns the order that you specify.
@@ -79,14 +80,15 @@ module Peddler
79
80
  # @note This operation can make a static sandbox call.
80
81
  # @param order_id [String] An Amazon-defined order identifier.
81
82
  # @param included_data [Array<String>] A list of datasets to include in the response.
83
+ # @param rate_limit [Float] Requests per second
82
84
  # @return [Peddler::Response] The API response
83
- def get_order(order_id, included_data: nil)
85
+ def get_order(order_id, included_data: nil, rate_limit: 0.5)
84
86
  path = "/orders/2026-01-01/orders/#{percent_encode(order_id)}"
85
87
  params = {
86
88
  "includedData" => stringify_array(included_data),
87
89
  }.compact
88
90
  parser = -> { GetOrderResponse }
89
- get(path, params:, parser:)
91
+ get(path, params:, rate_limit:, parser:)
90
92
  end
91
93
  end
92
94
  end
@@ -38,10 +38,10 @@ module Peddler
38
38
  # @return [String] The district.
39
39
  attribute?(:district, String, from: "District")
40
40
 
41
- # @return [AddressExtendedFields] The container for address extended fields. For example, street name or street
42
- # number.
41
+ # @return [AddressExtendedFields] Extended address fields for additional address components including the street
42
+ # name or number.
43
43
  #
44
- # **Note**: This attribute is currently only available with Brazil shipping addresses.
44
+ # Note: Available for grocery sellers and Brazil shipping addresses.
45
45
  attribute?(:extended_fields, AddressExtendedFields, from: "ExtendedFields")
46
46
 
47
47
  # @return [String] The municipality.
@@ -7,12 +7,19 @@ require "structure"
7
7
  module Peddler
8
8
  module APIs
9
9
  class OrdersV0
10
- # The container for address extended fields (such as `street name` and `street number`). Currently only available
11
- # with Brazil shipping addresses.
10
+ # Extended address fields for additional address components including the street name or number.
11
+ #
12
+ # Note: Available for grocery sellers and Brazil shipping addresses.
12
13
  AddressExtendedFields = Structure.new do
13
14
  # @return [String] The floor number/unit number in the building/private house number.
14
15
  attribute?(:complement, String, from: "Complement")
15
16
 
17
+ # @return [GeoCoordinates] Latitude and longitude coordinates for the shipping address using the WGS84
18
+ # coordinate system.
19
+ #
20
+ # Note: Available for sellers that support geographic coordinates.
21
+ attribute?(:geo_coordinates, GeoCoordinates, from: "GeoCoordinates")
22
+
16
23
  # @return [String] The neighborhood. This value is only used in some countries (such as Brazil).
17
24
  attribute?(:neighborhood, String, from: "Neighborhood")
18
25
 
@@ -14,6 +14,9 @@ module Peddler
14
14
  # **Note**: This attribute is only available in the Brazil marketplace.
15
15
  attribute?(:buyer_county, String, from: "BuyerCounty")
16
16
 
17
+ # @return [String] The anonymized email address of the buyer.
18
+ attribute?(:buyer_email, String, from: "BuyerEmail")
19
+
17
20
  # @return [String] The buyer name or the recipient name.
18
21
  attribute?(:buyer_name, String, from: "BuyerName")
19
22
 
@@ -0,0 +1,20 @@
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 OrdersV0
10
+ # The latitude and longitude coordinates of the shipping address using the WGS84 coordinate system.
11
+ GeoCoordinates = Structure.new do
12
+ # @return [Float] The latitude coordinate of the shipping address using the WGS84 coordinate system.
13
+ attribute?(:latitude, Float, from: "Latitude")
14
+
15
+ # @return [Float] The longitude coordinate of the shipping address using the WGS84 coordinate system.
16
+ attribute?(:longitude, Float, from: "Longitude")
17
+ end
18
+ end
19
+ end
20
+ end
@@ -17,6 +17,9 @@ module Peddler
17
17
  # **Note**: This attribute is only available in the Brazil marketplace.
18
18
  attribute?(:buyer_county, String, from: "BuyerCounty")
19
19
 
20
+ # @return [String] The anonymized email address of the buyer.
21
+ attribute?(:buyer_email, String, from: "BuyerEmail")
22
+
20
23
  # @return [String] The buyer name or the recipient name.
21
24
  attribute?(:buyer_name, String, from: "BuyerName")
22
25
 
@@ -61,9 +61,12 @@ module Peddler
61
61
  # @param payment_methods [Array<String>] A list of payment method values. Use this field to select orders that
62
62
  # were paid with the specified payment methods. **Possible values**: `COD` (cash on delivery), `CVS`
63
63
  # (convenience store), `Other` (Any payment method other than COD or CVS).
64
+ # @param buyer_email [String] The email address of a buyer. Used to select orders that contain the specified email
65
+ # address.
64
66
  # @param seller_order_id [String] An order identifier that is specified by the seller. Used to select only the
65
67
  # orders that match the order identifier. If `SellerOrderId` is specified, then `FulfillmentChannels`,
66
- # `OrderStatuses`, `PaymentMethod`, `LastUpdatedAfter`, and `LastUpdatedBefore` cannot be specified.
68
+ # `OrderStatuses`, `PaymentMethod`, `LastUpdatedAfter`, `LastUpdatedBefore`, and `BuyerEmail` cannot be
69
+ # specified.
67
70
  # @param max_results_per_page [Integer] A number that indicates the maximum number of orders that can be returned
68
71
  # per page. Value must be 1 - 100. Default 100.
69
72
  # @param easy_ship_shipment_statuses [Array<String>] A list of `EasyShipShipmentStatus` values. Used to select
@@ -109,7 +112,7 @@ module Peddler
109
112
  # @return [Peddler::Response] The API response
110
113
  def get_orders(marketplace_ids, created_after: nil, created_before: nil, last_updated_after: nil,
111
114
  last_updated_before: nil, order_statuses: nil, fulfillment_channels: nil, payment_methods: nil,
112
- seller_order_id: nil, max_results_per_page: nil, easy_ship_shipment_statuses: nil,
115
+ buyer_email: nil, seller_order_id: nil, max_results_per_page: nil, easy_ship_shipment_statuses: nil,
113
116
  electronic_invoice_statuses: nil, next_token: nil, amazon_order_ids: nil,
114
117
  actual_fulfillment_supply_source_id: nil, is_ispu: nil, store_chain_store_id: nil,
115
118
  earliest_delivery_date_before: nil, earliest_delivery_date_after: nil, latest_delivery_date_before: nil,
@@ -124,6 +127,7 @@ module Peddler
124
127
  "MarketplaceIds" => stringify_array(marketplace_ids),
125
128
  "FulfillmentChannels" => stringify_array(fulfillment_channels),
126
129
  "PaymentMethods" => stringify_array(payment_methods),
130
+ "BuyerEmail" => buyer_email,
127
131
  "SellerOrderId" => seller_order_id,
128
132
  "MaxResultsPerPage" => max_results_per_page,
129
133
  "EasyShipShipmentStatuses" => stringify_array(easy_ship_shipment_statuses),
@@ -28,6 +28,9 @@ module Peddler
28
28
 
29
29
  # @return [Array<ReferencePrice>] A list of reference prices for the specified ASIN `marketplaceId` combination.
30
30
  attribute?(:reference_prices, [ReferencePrice], from: "referencePrices")
31
+
32
+ # @return [Array<SimilarItems>] A list of similar items for the specified ASIN `marketplaceId` combination.
33
+ attribute?(:similar_items, [SimilarItems], from: "similarItems")
31
34
  end
32
35
  end
33
36
  end
@@ -0,0 +1,17 @@
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 ProductPricing20220501
10
+ # A similar item for the specified ASIN `marketplaceId` combination.
11
+ Item = Structure.new do
12
+ # @return [String] The Amazon identifier for the item.
13
+ attribute(:asin, String, null: false)
14
+ end
15
+ end
16
+ end
17
+ end
@@ -10,7 +10,7 @@ module Peddler
10
10
  # The number of Amazon Points that are offered with the purchase of an item and the monetary value of these
11
11
  # points.
12
12
  Points = Structure.new do
13
- # @return [Money] The monetary value of the Amazon Points.
13
+ # @return [Money] The monetary value of Amazon Points.
14
14
  attribute?(:points_monetary_value, Money, from: "pointsMonetaryValue")
15
15
 
16
16
  # @return [Integer] The number of Amazon Points.
@@ -0,0 +1,17 @@
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 ProductPricing20220501
10
+ # The summary of similar items for the specified ASIN `marketplaceId` combination.
11
+ SimilarItems = Structure.new do
12
+ # @return [Array<Item>] A list of similar items for the specified ASIN `marketplaceId` combination.
13
+ attribute?(:items, [Item])
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,22 @@
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 Replenishment20221107
10
+ # An object which contains the delivery condition and the quantity of upcoming deliveries associated with that
11
+ # condition for an offer.
12
+ DeliveriesCondition = Structure.new do
13
+ # @return [String] The condition type of upcoming deliveries for the offer.
14
+ attribute?(:condition, String)
15
+
16
+ # @return [Integer] The number of upcoming deliveries in the next 30 days associated with this delivery
17
+ # condition.
18
+ attribute?(:next30_days_deliveries, Integer, from: "next30DaysDeliveries")
19
+ end
20
+ end
21
+ end
22
+ end