peddler 5.1.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/distribution_ineligible_reason.rb +24 -0
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/distribution_product.rb +24 -0
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_shipment_summary.rb +30 -0
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_order.rb +48 -0
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_order_creation_data.rb +21 -0
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_order_listing.rb +24 -0
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_order_reference.rb +18 -0
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_preferences.rb +17 -0
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb +70 -0
- data/lib/peddler/apis/finances_2024_06_19.rb +4 -4
- data/lib/peddler/apis/invoices_2024_06_19/carrier_details_context.rb +38 -0
- data/lib/peddler/apis/invoices_2024_06_19/government_invoice_request.rb +36 -0
- data/lib/peddler/apis/invoices_2024_06_19/government_invoice_status_response.rb +23 -0
- data/lib/peddler/apis/invoices_2024_06_19/govt_invoice_document_response.rb +17 -0
- data/lib/peddler/apis/invoices_2024_06_19/invoice_document.rb +18 -0
- data/lib/peddler/apis/invoices_2024_06_19/invoice_error.rb +20 -0
- data/lib/peddler/apis/invoices_2024_06_19.rb +66 -0
- data/lib/peddler/apis/orders_2026_01_01/address_extended_fields.rb +29 -0
- data/lib/peddler/apis/orders_2026_01_01/alias.rb +22 -0
- data/lib/peddler/apis/orders_2026_01_01/associated_order.rb +22 -0
- data/lib/peddler/apis/orders_2026_01_01/business_hour.rb +22 -0
- data/lib/peddler/apis/orders_2026_01_01/buyer.rb +28 -0
- data/lib/peddler/apis/orders_2026_01_01/customer_address.rb +66 -0
- data/lib/peddler/apis/orders_2026_01_01/date_time_range.rb +23 -0
- data/lib/peddler/apis/orders_2026_01_01/delivery_preference.rb +28 -0
- data/lib/peddler/apis/orders_2026_01_01/error.rb +23 -0
- data/lib/peddler/apis/orders_2026_01_01/error_list.rb +17 -0
- data/lib/peddler/apis/orders_2026_01_01/exception_date.rb +25 -0
- data/lib/peddler/apis/orders_2026_01_01/get_order_response.rb +17 -0
- data/lib/peddler/apis/orders_2026_01_01/gift_option.rb +20 -0
- data/lib/peddler/apis/orders_2026_01_01/hour_minute.rb +20 -0
- data/lib/peddler/apis/orders_2026_01_01/item_cancellation.rb +17 -0
- data/lib/peddler/apis/orders_2026_01_01/item_cancellation_request.rb +22 -0
- data/lib/peddler/apis/orders_2026_01_01/item_condition.rb +30 -0
- data/lib/peddler/apis/orders_2026_01_01/item_customization.rb +17 -0
- data/lib/peddler/apis/orders_2026_01_01/item_expense.rb +17 -0
- data/lib/peddler/apis/orders_2026_01_01/item_fulfillment.rb +29 -0
- data/lib/peddler/apis/orders_2026_01_01/item_international_shipping.rb +19 -0
- data/lib/peddler/apis/orders_2026_01_01/item_packing.rb +17 -0
- data/lib/peddler/apis/orders_2026_01_01/item_picking.rb +18 -0
- data/lib/peddler/apis/orders_2026_01_01/item_points_cost.rb +18 -0
- data/lib/peddler/apis/orders_2026_01_01/item_price.rb +24 -0
- data/lib/peddler/apis/orders_2026_01_01/item_proceeds.rb +20 -0
- data/lib/peddler/apis/orders_2026_01_01/item_proceeds_breakdown.rb +25 -0
- data/lib/peddler/apis/orders_2026_01_01/item_proceeds_detailed_breakdown.rb +23 -0
- data/lib/peddler/apis/orders_2026_01_01/item_product.rb +36 -0
- data/lib/peddler/apis/orders_2026_01_01/item_promotion.rb +17 -0
- data/lib/peddler/apis/orders_2026_01_01/item_promotion_breakdown.rb +17 -0
- data/lib/peddler/apis/orders_2026_01_01/item_shipping.rb +24 -0
- data/lib/peddler/apis/orders_2026_01_01/item_shipping_constraints.rb +30 -0
- data/lib/peddler/apis/orders_2026_01_01/item_substitution_option.rb +30 -0
- data/lib/peddler/apis/orders_2026_01_01/item_substitution_preference.rb +21 -0
- data/lib/peddler/apis/orders_2026_01_01/measurement.rb +21 -0
- data/lib/peddler/apis/orders_2026_01_01/merchant_address.rb +44 -0
- data/lib/peddler/apis/orders_2026_01_01/order.rb +63 -0
- data/lib/peddler/apis/orders_2026_01_01/order_fulfillment.rb +37 -0
- data/lib/peddler/apis/orders_2026_01_01/order_item.rb +48 -0
- data/lib/peddler/apis/orders_2026_01_01/order_package.rb +47 -0
- data/lib/peddler/apis/orders_2026_01_01/order_proceeds.rb +17 -0
- data/lib/peddler/apis/orders_2026_01_01/package_item.rb +23 -0
- data/lib/peddler/apis/orders_2026_01_01/package_status.rb +32 -0
- data/lib/peddler/apis/orders_2026_01_01/pagination.rb +22 -0
- data/lib/peddler/apis/orders_2026_01_01/points_granted.rb +20 -0
- data/lib/peddler/apis/orders_2026_01_01/preferred_delivery_time.rb +21 -0
- data/lib/peddler/apis/orders_2026_01_01/recipient.rb +21 -0
- data/lib/peddler/apis/orders_2026_01_01/sales_channel.rb +26 -0
- data/lib/peddler/apis/orders_2026_01_01/search_orders_response.rb +35 -0
- data/lib/peddler/apis/orders_2026_01_01/time_window.rb +20 -0
- data/lib/peddler/apis/orders_2026_01_01.rb +93 -0
- data/lib/peddler/apis/orders_v0/export_info.rb +23 -0
- data/lib/peddler/apis/orders_v0/fulfillment_instructions.rb +20 -0
- data/lib/peddler/apis/orders_v0/fulfillment_location.rb +17 -0
- data/lib/peddler/apis/orders_v0/fulfillment_plan.rb +41 -0
- data/lib/peddler/apis/orders_v0/fulfillment_plan_item.rb +20 -0
- data/lib/peddler/apis/orders_v0/fulfillment_plan_shipping_constraints.rb +20 -0
- data/lib/peddler/apis/orders_v0/get_order_fulfillment_instructions_response.rb +21 -0
- data/lib/peddler/apis/orders_v0/order_item.rb +3 -0
- data/lib/peddler/apis/orders_v0/shipping_instructions.rb +23 -0
- data/lib/peddler/apis/orders_v0.rb +14 -2
- data/lib/peddler/apis/vendor_shipments_v1/item_details.rb +16 -0
- data/lib/peddler/apis/vendor_shipments_v1/package_item_details.rb +0 -16
- data/lib/peddler/apis/vendor_shipments_v1/packed_quantity.rb +25 -0
- data/lib/peddler/apis/vendor_shipments_v1/purchase_order_item_details.rb +18 -0
- data/lib/peddler/apis/vendor_shipments_v1/regulation_references.rb +9 -11
- data/lib/peddler/apis/vendor_shipments_v1/submit_shipment_confirmation_request.rb +17 -0
- data/lib/peddler/apis/vendor_shipments_v1/submit_shipment_confirmation_response.rb +20 -0
- data/lib/peddler/apis/vendor_shipments_v1/submit_shipment_confirmation_result.rb +17 -0
- data/lib/peddler/apis/vendor_shipments_v1.rb +12 -0
- data/lib/peddler/data_kiosk/sales_and_traffic20240424/by_asin_sales.rb +16 -0
- data/lib/peddler/data_kiosk/sales_and_traffic20240424/by_date_sales.rb +28 -8
- data/lib/peddler/data_kiosk/sales_and_traffic20240424/by_date_traffic.rb +19 -6
- data/lib/peddler/data_kiosk/sales_and_traffic20240424.json +153 -13
- data/lib/peddler/notifications/any_offer_changed/notification.rb +3 -3
- data/lib/peddler/version.rb +1 -1
- data/lib/peddler.rb +2 -1
- data/sig/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rbs +153 -0
- data/sig/peddler/apis/invoices_2024_06_19.rbs +115 -0
- data/sig/peddler/apis/orders_2026_01_01.rbs +940 -0
- data/sig/peddler/apis/orders_v0.rbs +151 -7
- data/sig/peddler/apis/vendor_shipments_v1.rbs +103 -18
- data/sig/peddler/data_kiosk/sales_and_traffic20240424.rbs +32 -21
- data/sig/peddler/notifications/any_offer_changed.rbs +7 -7
- data/sig/peddler.rbs +3 -1
- metadata +81 -10
- data/lib/peddler/notifications/mfn_order_status_change/notification.rb +0 -32
- data/lib/peddler/notifications/mfn_order_status_change/payload.rb +0 -17
- data/lib/peddler/notifications/mfn_order_status_change.rb +0 -18
- data/lib/peddler/notifications/order_status_change/notification.rb +0 -32
- data/lib/peddler/notifications/order_status_change/order_status_change_notification.rb +0 -48
- data/lib/peddler/notifications/order_status_change/payload.rb +0 -17
- data/lib/peddler/notifications/order_status_change.rb +0 -18
- data/sig/peddler/notifications/mfn_order_status_change.rbs +0 -44
- data/sig/peddler/notifications/order_status_change.rbs +0 -70
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e044749a9fe4a33798eafa2500ddeeb5f98e89a2c50deaff3edbc94a2fa1228d
|
|
4
|
+
data.tar.gz: d0c258dfc38b440abfe2e37eecf57449b7c5b27c24d16fc9b2ff35d3c9e3904f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e7e061d9e1ecb068b9e7a84e0e728ccc0288152fc358f1bd8b19c69cfd85698870110f793f348eb9122e6ed2c93be6bf8f499fa73c1acb7b7e3628e82ef32ade
|
|
7
|
+
data.tar.gz: 2b3782bb19640b32803bb767cc89841215a37cf1f31fff83f30be162ec853d89de3708b9ebc759fba80d3c672e1b3a60dd6c8c489133e4079392aa8ea2f32711
|
|
@@ -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 AmazonWarehousingAndDistribution20240509
|
|
10
|
+
# Execution errors associated with the replenishment order. This field will be populated if the order failed
|
|
11
|
+
# validation.
|
|
12
|
+
DistributionIneligibleReason = Structure.new do
|
|
13
|
+
# @return [String] Failure code details of the error.
|
|
14
|
+
attribute(:failure_code, String, from: "failureCode")
|
|
15
|
+
|
|
16
|
+
# @return [Array<String>] Failure reasons of the error.
|
|
17
|
+
attribute(:failure_reasons, [String], from: "failureReasons")
|
|
18
|
+
|
|
19
|
+
# @return [String] SKU associated with the error.
|
|
20
|
+
attribute?(:sku, String)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
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 AmazonWarehousingAndDistribution20240509
|
|
10
|
+
# Represents a product with sku details and corresponding quantity
|
|
11
|
+
DistributionProduct = Structure.new do
|
|
12
|
+
# @return [Integer] Quantity of the product
|
|
13
|
+
attribute(:quantity, Integer)
|
|
14
|
+
|
|
15
|
+
# @return [String] The seller/merchant stock keeping unit (SKU).
|
|
16
|
+
attribute(:sku, String)
|
|
17
|
+
|
|
18
|
+
# @return [Array<ProductAttribute>] Attributes for this instance of the product, i.e. already-prepped, or other
|
|
19
|
+
# attributes that distinguish the product beyond the SKU.
|
|
20
|
+
attribute?(:attributes, [ProductAttribute])
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_shipment_summary.rb
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is generated. Do not edit.
|
|
4
|
+
|
|
5
|
+
require "structure"
|
|
6
|
+
require "time"
|
|
7
|
+
|
|
8
|
+
module Peddler
|
|
9
|
+
module APIs
|
|
10
|
+
class AmazonWarehousingAndDistribution20240509
|
|
11
|
+
# Summary of an AWD inbound shipment containing the shipment ID which can be used to fetch the actual shipment
|
|
12
|
+
OutboundShipmentSummary = Structure.new do
|
|
13
|
+
# @return [String] Order ID of AWD inbound order this inbound shipment belongs to
|
|
14
|
+
attribute(:order_id, String, from: "orderId")
|
|
15
|
+
|
|
16
|
+
# @return [String] Unique shipment ID
|
|
17
|
+
attribute(:shipment_id, String, from: "shipmentId")
|
|
18
|
+
|
|
19
|
+
# @return [String]
|
|
20
|
+
attribute(:shipment_status, String, from: "shipmentStatus")
|
|
21
|
+
|
|
22
|
+
# @return [Time] Timestamp denoting when the shipment was created
|
|
23
|
+
attribute?(:created_at, Time, from: "createdAt")
|
|
24
|
+
|
|
25
|
+
# @return [Time] Timestamp denoting when the shipment was updated
|
|
26
|
+
attribute?(:updated_at, Time, from: "updatedAt")
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is generated. Do not edit.
|
|
4
|
+
|
|
5
|
+
require "structure"
|
|
6
|
+
require "time"
|
|
7
|
+
|
|
8
|
+
module Peddler
|
|
9
|
+
module APIs
|
|
10
|
+
class AmazonWarehousingAndDistribution20240509
|
|
11
|
+
# Represents an AWD replenishment order.
|
|
12
|
+
ReplenishmentOrder = Structure.new do
|
|
13
|
+
# @return [String] Order Id of the replenishment order.
|
|
14
|
+
attribute(:order_id, String, from: "orderId")
|
|
15
|
+
|
|
16
|
+
# @return [Array<OutboundShipmentSummary>] List of outbound shipments that are part of this order.
|
|
17
|
+
attribute(:outbound_shipments, [OutboundShipmentSummary], from: "outboundShipments")
|
|
18
|
+
|
|
19
|
+
# @return [String]
|
|
20
|
+
attribute(:status, String)
|
|
21
|
+
|
|
22
|
+
# @return [Time] Date on which this replenishment order was confirmed.
|
|
23
|
+
attribute?(:confirmed_on, Time, from: "confirmedOn")
|
|
24
|
+
|
|
25
|
+
# @return [Time] Date on which this replenishment order was created.
|
|
26
|
+
attribute?(:created_at, Time, from: "createdAt")
|
|
27
|
+
|
|
28
|
+
# @return [Array<DistributionIneligibleReason>] Distribution errors associated with the order related to the
|
|
29
|
+
# products or packages to replenish.
|
|
30
|
+
# This field will be populated if the order has products or packages which failed validation.
|
|
31
|
+
attribute?(:distribution_ineligible_reasons, [DistributionIneligibleReason], from: "distributionIneligibleReasons")
|
|
32
|
+
|
|
33
|
+
# @return [Array<DistributionProduct>] List of product units that are eligible for replenishment.
|
|
34
|
+
attribute?(:eligible_products, [DistributionProduct], from: "eligibleProducts")
|
|
35
|
+
|
|
36
|
+
# @return [Array<DistributionProduct>] Requested amount of single product units to be replenished.
|
|
37
|
+
attribute?(:products, [DistributionProduct])
|
|
38
|
+
|
|
39
|
+
# @return [Array<DistributionProduct>] Outbound product units that are shipped after the execution has completed
|
|
40
|
+
# post confirmation.
|
|
41
|
+
attribute?(:shipped_products, [DistributionProduct], from: "shippedProducts")
|
|
42
|
+
|
|
43
|
+
# @return [Time] Date on which this replenishment order was last updated.
|
|
44
|
+
attribute?(:updated_at, Time, from: "updatedAt")
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -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 AmazonWarehousingAndDistribution20240509
|
|
10
|
+
# This structure represents the payload for creating an AFN Replenishment Order.
|
|
11
|
+
# By default, all replenishment orders created support Partial order preferences.
|
|
12
|
+
ReplenishmentOrderCreationData = Structure.new do
|
|
13
|
+
# @return [ReplenishmentPreferences]
|
|
14
|
+
attribute?(:preferences, ReplenishmentPreferences)
|
|
15
|
+
|
|
16
|
+
# @return [Array<DistributionProduct>] Requested amount of single product units to be replenished.
|
|
17
|
+
attribute?(:products, [DistributionProduct])
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_order_listing.rb
ADDED
|
@@ -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 AmazonWarehousingAndDistribution20240509
|
|
10
|
+
# A list of paginated replenishment orders filtered by the attributes passed in the request.
|
|
11
|
+
ReplenishmentOrderListing = Structure.new do
|
|
12
|
+
# @return [String] A token that is used to retrieve the next page of results. The response includes `nextToken`
|
|
13
|
+
# when the number of results exceeds the specified `maxResults` value. To get the next page of results, call
|
|
14
|
+
# the operation with this token and include the same arguments as the call that produced the token. To get a
|
|
15
|
+
# complete list, call this operation until `nextToken` is null. Note that this operation can return empty
|
|
16
|
+
# pages.
|
|
17
|
+
attribute?(:next_token, String, from: "nextToken")
|
|
18
|
+
|
|
19
|
+
# @return [Array<ReplenishmentOrder>] List of replenishment orders.
|
|
20
|
+
attribute?(:orders, [ReplenishmentOrder])
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
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 AmazonWarehousingAndDistribution20240509
|
|
10
|
+
# Response containing the reference identifier for the newly created/updated replenishment order consisting of the
|
|
11
|
+
# order ID.
|
|
12
|
+
ReplenishmentOrderReference = Structure.new do
|
|
13
|
+
# @return [String] Order ID of the Replenishment order.
|
|
14
|
+
attribute(:order_id, String, from: "orderId")
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_preferences.rb
ADDED
|
@@ -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 AmazonWarehousingAndDistribution20240509
|
|
10
|
+
# Preferences that can be passed in context of a replenishment order
|
|
11
|
+
ReplenishmentPreferences = Structure.new do
|
|
12
|
+
# @return [String] Confirmation Mode to use for the created Replenishment order.
|
|
13
|
+
attribute?(:confirmation, String)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -196,6 +196,76 @@ module Peddler
|
|
|
196
196
|
parser = -> { InventoryListing }
|
|
197
197
|
get(path, params:, rate_limit:, parser:)
|
|
198
198
|
end
|
|
199
|
+
|
|
200
|
+
# Retrieves all the AWD replenishment orders pertaining to a merchant with optional filters.
|
|
201
|
+
# API by default will sort orders by updatedAt attribute in descending order.
|
|
202
|
+
#
|
|
203
|
+
# @note This operation can make a static sandbox call.
|
|
204
|
+
# @param updated_after [String] Get the replenishment orders updated after certain time (Inclusive) Date should be
|
|
205
|
+
# in ISO 8601 format as defined by date-time in - https://www.rfc-editor.org/rfc/rfc3339.
|
|
206
|
+
# @param updated_before [String] Get the replenishment orders updated before certain time (Inclusive) Date should
|
|
207
|
+
# be in ISO 8601 format as defined by date-time in - https://www.rfc-editor.org/rfc/rfc3339.
|
|
208
|
+
# @param sort_order [String] Sort the response in ASCENDING or DESCENDING order. The default sort order is
|
|
209
|
+
# DESCENDING.
|
|
210
|
+
# @param max_results [Integer] Maximum results to be returned in a single response.
|
|
211
|
+
# @param next_token [String] A token that is used to retrieve the next page of results. The response includes
|
|
212
|
+
# `nextToken` when the number of results exceeds the specified `maxResults` value. To get the next page of
|
|
213
|
+
# results, call the operation with this token and include the same arguments as the call that produced the
|
|
214
|
+
# token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can
|
|
215
|
+
# return empty pages.
|
|
216
|
+
# @return [Peddler::Response] The API response
|
|
217
|
+
def list_replenishment_orders(updated_after: nil, updated_before: nil, sort_order: nil, max_results: 25,
|
|
218
|
+
next_token: nil)
|
|
219
|
+
path = "/awd/2024-05-09/replenishmentOrders"
|
|
220
|
+
params = {
|
|
221
|
+
"updatedAfter" => updated_after,
|
|
222
|
+
"updatedBefore" => updated_before,
|
|
223
|
+
"sortOrder" => sort_order,
|
|
224
|
+
"maxResults" => max_results,
|
|
225
|
+
"nextToken" => next_token,
|
|
226
|
+
}.compact
|
|
227
|
+
parser = -> { ReplenishmentOrderListing }
|
|
228
|
+
get(path, params:, parser:)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Creates an AWD replenishment order with given products to replenish.
|
|
232
|
+
# The API will return the order ID of the newly created order and also start an async validation check on the
|
|
233
|
+
# products to e.
|
|
234
|
+
# The order status will transition to ELIGIBLE/INELIGIBLE status from VALIDATING post validation check
|
|
235
|
+
#
|
|
236
|
+
# @note This operation can make a static sandbox call.
|
|
237
|
+
# @param body [Hash] Payload for creating a replenishment order.
|
|
238
|
+
# @return [Peddler::Response] The API response
|
|
239
|
+
def create_replenishment_order(body)
|
|
240
|
+
path = "/awd/2024-05-09/replenishmentOrders"
|
|
241
|
+
parser = -> { ReplenishmentOrderReference }
|
|
242
|
+
post(path, body:, parser:)
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Retrieves an AWD Replenishment order with a set of shipments containing items that is/was planned to be
|
|
246
|
+
# replenished into an FBA node.
|
|
247
|
+
#
|
|
248
|
+
# @note This operation can make a static sandbox call.
|
|
249
|
+
# @param order_id [String] ID of the replenishment order to be retrieved.
|
|
250
|
+
# @return [Peddler::Response] The API response
|
|
251
|
+
def get_replenishment_order(order_id)
|
|
252
|
+
path = "/awd/2024-05-09/replenishmentOrders/#{percent_encode(order_id)}"
|
|
253
|
+
parser = -> { ReplenishmentOrder }
|
|
254
|
+
get(path, parser:)
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# Confirms an AWD replenishment order in ELIGIBLE state with a set of shipments containing items that are needed
|
|
258
|
+
# to be replenished to an FBA node.
|
|
259
|
+
# Order can only be confirmed in ELIGIBLE state.
|
|
260
|
+
#
|
|
261
|
+
# @param order_id [String] ID of the replenishment order to be confirmed.
|
|
262
|
+
# @return [Peddler::Response] The API response
|
|
263
|
+
def confirm_replenishment_order(order_id)
|
|
264
|
+
cannot_sandbox!
|
|
265
|
+
|
|
266
|
+
path = "/awd/2024-05-09/replenishmentOrders/#{percent_encode(order_id)}/confirmation"
|
|
267
|
+
post(path)
|
|
268
|
+
end
|
|
199
269
|
end
|
|
200
270
|
end
|
|
201
271
|
end
|
|
@@ -31,10 +31,10 @@ module Peddler
|
|
|
31
31
|
# the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated
|
|
32
32
|
# to `DEFERRED_RELEASED` when the transaction is released.
|
|
33
33
|
# @param related_identifier_name [String] The name of the `relatedIdentifier`. **Possible values:** *
|
|
34
|
-
# `FINANCIAL_EVENT_GROUP_ID`: the financial event group ID associated with the transaction.
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
# filtering purposes.
|
|
34
|
+
# `FINANCIAL_EVENT_GROUP_ID`: the financial event group ID associated with the transaction. * `ORDER_ID`: the
|
|
35
|
+
# order ID associated with the transaction. **Note:** FINANCIAL_EVENT_GROUP_ID and ORDER_ID are the only
|
|
36
|
+
# `relatedIdentifier` with filtering capabilities at the moment. While other `relatedIdentifier` values will be
|
|
37
|
+
# included in the response when available, they cannot be used for filtering purposes.
|
|
38
38
|
# @param related_identifier_value [String] The value of the `relatedIdentifier`.
|
|
39
39
|
# @param next_token [String] The response includes `nextToken` when the number of results exceeds the specified
|
|
40
40
|
# `pageSize` value. To get the next page of results, call the operation with this token and include the same
|
|
@@ -0,0 +1,38 @@
|
|
|
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 Invoices20240619
|
|
10
|
+
# Additional information about a carrier.
|
|
11
|
+
CarrierDetailsContext = Structure.new do
|
|
12
|
+
# @return [String] The address of the carrier, as registered in state and federal tax authorities.
|
|
13
|
+
attribute?(:address, String)
|
|
14
|
+
|
|
15
|
+
# @return [String] Type of additional information.
|
|
16
|
+
attribute?(:context_type, String, from: "contextType")
|
|
17
|
+
|
|
18
|
+
# @return [String] Tax Identification number of the carrier.
|
|
19
|
+
attribute?(:federal_tax_id, String, from: "federalTaxId")
|
|
20
|
+
|
|
21
|
+
# @return [String] The name of the carrier, as registered in state and federal tax authorities.
|
|
22
|
+
attribute?(:name, String)
|
|
23
|
+
|
|
24
|
+
# @return [String] The code of the federal subdivision in which the carrier is registered.
|
|
25
|
+
attribute?(:region_code, String, from: "regionCode")
|
|
26
|
+
|
|
27
|
+
# @return [String] The regional tax registration number of the carrier.
|
|
28
|
+
attribute?(:region_tax_id, String, from: "regionTaxId")
|
|
29
|
+
|
|
30
|
+
# @return [String] The identifier for the carrier vehicle as printed in its registration plate.
|
|
31
|
+
attribute?(:vehicle_license_plate, String, from: "vehicleLicensePlate")
|
|
32
|
+
|
|
33
|
+
# @return [String] The code of the federal subdivision in which the carrier vehicle is registered.
|
|
34
|
+
attribute?(:vehicle_registration_region_code, String, from: "vehicleRegistrationRegionCode")
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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 Invoices20240619
|
|
10
|
+
# Information required to create the government invoice.
|
|
11
|
+
GovernmentInvoiceRequest = Structure.new do
|
|
12
|
+
# @return [String] Marketplace specific classification of the invoice type. Check 'invoiceType' options using
|
|
13
|
+
# 'getInvoicesAttributes' operation.
|
|
14
|
+
attribute(:invoice_type, String, from: "invoiceType")
|
|
15
|
+
|
|
16
|
+
# @return [String] The government invoices creation request will match the national authoritative source of the
|
|
17
|
+
# given marketplace.
|
|
18
|
+
attribute(:marketplace_id, String, from: "marketplaceId")
|
|
19
|
+
|
|
20
|
+
# @return [String] The unique shipment identifier to get an invoice for.
|
|
21
|
+
attribute(:shipment_id, String, from: "shipmentId")
|
|
22
|
+
|
|
23
|
+
# @return [String] Marketplace specific classification of the transaction type that originated the invoice.
|
|
24
|
+
# Check 'transactionType' options using 'getInvoicesAttributes' operation.
|
|
25
|
+
attribute(:transaction_type, String, from: "transactionType")
|
|
26
|
+
|
|
27
|
+
# @return [Array<CarrierDetailsContext>] Object that contains additional invoice creation information
|
|
28
|
+
attribute?(:contexts, [CarrierDetailsContext])
|
|
29
|
+
|
|
30
|
+
# @return [String] The unique InboundPlan identifier in which the shipment is contained and for which the
|
|
31
|
+
# invoice will be created.
|
|
32
|
+
attribute?(:inbound_plan_id, String, from: "inboundPlanId")
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
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 Invoices20240619
|
|
10
|
+
# Success.
|
|
11
|
+
GovernmentInvoiceStatusResponse = Structure.new do
|
|
12
|
+
# @return [Array<InvoiceError>] The errors that occurred during invoice creation.
|
|
13
|
+
attribute?(:invoice_errors, [InvoiceError], from: "invoiceErrors")
|
|
14
|
+
|
|
15
|
+
# @return [String] Government Invoice ID of a successfully authorized invoice.
|
|
16
|
+
attribute?(:invoice_external_document_id, String, from: "invoiceExternalDocumentId")
|
|
17
|
+
|
|
18
|
+
# @return [String]
|
|
19
|
+
attribute?(:status, String)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
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 Invoices20240619
|
|
10
|
+
# Success.
|
|
11
|
+
GovtInvoiceDocumentResponse = Structure.new do
|
|
12
|
+
# @return [InvoiceDocument]
|
|
13
|
+
attribute?(:invoice_document, InvoiceDocument, from: "invoiceDocument")
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
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 Invoices20240619
|
|
10
|
+
# Object containing the documentId and a S3 pre-signed URL to download the specified document file.
|
|
11
|
+
InvoiceDocument = Structure.new do
|
|
12
|
+
# @return [String] A pre-signed URL to download the invoice document in its original format. This URL expires
|
|
13
|
+
# after 30 seconds.
|
|
14
|
+
attribute?(:invoice_document_url, String, from: "invoiceDocumentUrl")
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
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 Invoices20240619
|
|
10
|
+
# An invoice creation error occurrence.
|
|
11
|
+
InvoiceError = Structure.new do
|
|
12
|
+
# @return [String] A text description of the error.
|
|
13
|
+
attribute?(:description, String)
|
|
14
|
+
|
|
15
|
+
# @return [String] The code of the error.
|
|
16
|
+
attribute?(:error_code, String, from: "errorCode")
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -96,6 +96,72 @@ module Peddler
|
|
|
96
96
|
get(path, rate_limit:, parser:)
|
|
97
97
|
end
|
|
98
98
|
|
|
99
|
+
# Submits an asynchronous government invoice creation request.
|
|
100
|
+
#
|
|
101
|
+
# @note This operation can make a static sandbox call.
|
|
102
|
+
# @param body [Hash] Information required to create the government invoice.
|
|
103
|
+
# @param rate_limit [Float] Requests per second
|
|
104
|
+
# @return [Peddler::Response] The API response
|
|
105
|
+
def create_government_invoice(body, rate_limit: 0.0167)
|
|
106
|
+
path = "/tax/invoices/2024-06-19/governmentInvoiceRequests"
|
|
107
|
+
post(path, body:, rate_limit:)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Returns the status of an invoice generation request.
|
|
111
|
+
#
|
|
112
|
+
# @note This operation can make a static sandbox call.
|
|
113
|
+
# @param marketplace_id [String] The invoices status will match the marketplace that you specify.
|
|
114
|
+
# @param transaction_type [String] Marketplace specific classification of the transaction type that originated the
|
|
115
|
+
# invoice. Check 'transactionType' options using 'getInvoicesAttributes' operation.
|
|
116
|
+
# @param shipment_id [String] The unique shipment identifier to get an invoice for.
|
|
117
|
+
# @param invoice_type [String] Marketplace specific classification of the invoice type. Check 'invoiceType'
|
|
118
|
+
# options using 'getInvoicesAttributes' operation.
|
|
119
|
+
# @param inbound_plan_id [String] The unique InboundPlan identifier in which the shipment is contained and for
|
|
120
|
+
# which the invoice will be created.
|
|
121
|
+
# @param rate_limit [Float] Requests per second
|
|
122
|
+
# @return [Peddler::Response] The API response
|
|
123
|
+
def get_government_invoice_status(marketplace_id, transaction_type, shipment_id, invoice_type,
|
|
124
|
+
inbound_plan_id: nil, rate_limit: 0.0167)
|
|
125
|
+
path = "/tax/invoices/2024-06-19/governmentInvoiceRequests"
|
|
126
|
+
params = {
|
|
127
|
+
"marketplaceId" => marketplace_id,
|
|
128
|
+
"transactionType" => transaction_type,
|
|
129
|
+
"shipmentId" => shipment_id,
|
|
130
|
+
"invoiceType" => invoice_type,
|
|
131
|
+
"inboundPlanId" => inbound_plan_id,
|
|
132
|
+
}.compact
|
|
133
|
+
parser = -> { GovernmentInvoiceStatusResponse }
|
|
134
|
+
get(path, params:, rate_limit:, parser:)
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Returns an invoiceDocument object containing an invoiceDocumentUrl .
|
|
138
|
+
#
|
|
139
|
+
# @note This operation can make a static sandbox call.
|
|
140
|
+
# @param marketplace_id [String] The invoices returned will match the marketplace that you specify.
|
|
141
|
+
# @param transaction_type [String] Marketplace specific classification of the transaction type that originated the
|
|
142
|
+
# invoice. Check 'transactionType' options using 'getInvoicesAttributes' operation.
|
|
143
|
+
# @param shipment_id [String] The unique shipment identifier to get an invoice for.
|
|
144
|
+
# @param invoice_type [String] Marketplace specific classification of the invoice type. Check 'invoiceType'
|
|
145
|
+
# options using 'getInvoicesAttributes' operation.
|
|
146
|
+
# @param inbound_plan_id [String] The unique InboundPlan identifier in which the shipment is contained and for
|
|
147
|
+
# which the invoice will be created.
|
|
148
|
+
# @param file_format [String] Requested file format. Default is XML
|
|
149
|
+
# @param rate_limit [Float] Requests per second
|
|
150
|
+
# @return [Peddler::Response] The API response
|
|
151
|
+
def get_government_invoice_document(marketplace_id, transaction_type, shipment_id, invoice_type,
|
|
152
|
+
inbound_plan_id: nil, file_format: nil, rate_limit: 0.0167)
|
|
153
|
+
path = "/tax/invoices/2024-06-19/governmentInvoiceRequests/#{percent_encode(shipment_id)}"
|
|
154
|
+
params = {
|
|
155
|
+
"marketplaceId" => marketplace_id,
|
|
156
|
+
"transactionType" => transaction_type,
|
|
157
|
+
"invoiceType" => invoice_type,
|
|
158
|
+
"inboundPlanId" => inbound_plan_id,
|
|
159
|
+
"fileFormat" => file_format,
|
|
160
|
+
}.compact
|
|
161
|
+
parser = -> { GovtInvoiceDocumentResponse }
|
|
162
|
+
get(path, params:, rate_limit:, parser:)
|
|
163
|
+
end
|
|
164
|
+
|
|
99
165
|
# Returns invoice details for the invoices that match the filters that you specify.
|
|
100
166
|
#
|
|
101
167
|
# @note This operation can make a static sandbox call.
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
# Additional address components that provide more detailed location information, helping with precise delivery
|
|
11
|
+
# routing.
|
|
12
|
+
#
|
|
13
|
+
# **Note**: Only available with Brazil shipping addresses.
|
|
14
|
+
AddressExtendedFields = Structure.new do
|
|
15
|
+
# @return [String] The floor number / unit number.
|
|
16
|
+
attribute?(:complement, String)
|
|
17
|
+
|
|
18
|
+
# @return [String] The neighborhood. This value is only used in some countries (such as Brazil).
|
|
19
|
+
attribute?(:neighborhood, String)
|
|
20
|
+
|
|
21
|
+
# @return [String] The name of the street.
|
|
22
|
+
attribute?(:street_name, String, from: "streetName")
|
|
23
|
+
|
|
24
|
+
# @return [String] The house, building, or property number associated with the location's street address.
|
|
25
|
+
attribute?(:street_number, String, from: "streetNumber")
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
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 alternative identifier that provides a different way to reference the same order.
|
|
11
|
+
Alias = Structure.new do
|
|
12
|
+
# @return [String] The alternative identifier value that can be used to reference this order.
|
|
13
|
+
attribute(:alias_id, String, from: "aliasId")
|
|
14
|
+
|
|
15
|
+
# @return [String] The kind of alternative identifier this represents.
|
|
16
|
+
#
|
|
17
|
+
# **Possible values**: `SELLER_ORDER_ID`
|
|
18
|
+
attribute(:alias_type, String, from: "aliasType")
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
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
|
+
# Another order that has a direct business relationship with the current order, such as replacements or exchanges.
|
|
11
|
+
AssociatedOrder = Structure.new do
|
|
12
|
+
# @return [String] The relationship between the current order and the associated order.
|
|
13
|
+
#
|
|
14
|
+
# **Possible values**: `REPLACEMENT_ORIGINAL_ID`, `EXCHANGE_ORIGINAL_ID`
|
|
15
|
+
attribute?(:association_type, String, from: "associationType")
|
|
16
|
+
|
|
17
|
+
# @return [String] The unique identifier of the related order that is associated with the current order.
|
|
18
|
+
attribute?(:order_id, String, from: "orderId")
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is generated. Do not edit.
|
|
4
|
+
|
|
5
|
+
require "structure"
|
|
6
|
+
require "time"
|
|
7
|
+
|
|
8
|
+
module Peddler
|
|
9
|
+
module APIs
|
|
10
|
+
class Orders20260101
|
|
11
|
+
# Business days and hours when the destination is open for deliveries.
|
|
12
|
+
BusinessHour = Structure.new do
|
|
13
|
+
# @return [String] Specific day of the week for which operating hours are being defined.
|
|
14
|
+
attribute?(:day_of_week, String, from: "dayOfWeek")
|
|
15
|
+
|
|
16
|
+
# @return [Array<TimeWindow>] Collection of time windows during which the location is available for deliveries
|
|
17
|
+
# on the specified day.
|
|
18
|
+
attribute?(:time_windows, [TimeWindow], from: "timeWindows")
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|