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
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is generated. Do not edit.
|
|
4
|
+
|
|
5
|
+
module Peddler
|
|
6
|
+
module APIs
|
|
7
|
+
# The Selling Partner API for Orders
|
|
8
|
+
#
|
|
9
|
+
# The Selling Partner API for Orders returns orders information. This API supports the following types of orders:
|
|
10
|
+
#
|
|
11
|
+
# - FBM (Fulfilled by Merchant) - FBA (Fulfilled by Amazon) - read only - Amazon Fresh
|
|
12
|
+
#
|
|
13
|
+
# This API does not display order data that is more than two years old, except in the JP, AU, and SG marketplaces,
|
|
14
|
+
# for which data from 2016 and after is available.
|
|
15
|
+
#
|
|
16
|
+
# @see https://github.com/amzn/selling-partner-api-models/blob/main/models/orders-api-model/orders_2026-01-01.json
|
|
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.
|
|
20
|
+
#
|
|
21
|
+
# @note This operation can make a static sandbox call.
|
|
22
|
+
# @param created_after [String] The response includes orders created at or after this time. The date must be in
|
|
23
|
+
# [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: You must provide exactly
|
|
24
|
+
# one of `createdAfter` and `lastUpdatedAfter` in your request. If `createdAfter` is provided, neither
|
|
25
|
+
# `lastUpdatedAfter` nor `lastUpdatedBefore` may be provided.
|
|
26
|
+
# @param created_before [String] The response includes orders created at or before this time. The date must be in
|
|
27
|
+
# [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: If you include
|
|
28
|
+
# `createdAfter` in the request, `createdBefore` is optional, and if provided must be equal to or after the
|
|
29
|
+
# `createdAfter` date and at least two minutes before the time of the request. If `createdBefore` is provided,
|
|
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.
|
|
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
|
|
39
|
+
# `lastUpdatedAfter` in the request, `lastUpdatedBefore` is optional, and if provided must be equal to or after
|
|
40
|
+
# the `lastUpdatedAfter` date and at least two minutes before the time of the request. If `lastUpdatedBefore` is
|
|
41
|
+
# provided, neither `createdAfter` nor `createdBefore` may be provided.
|
|
42
|
+
# @param fulfillment_statuses [Array<String>] A list of `FulfillmentStatus` values you can use to filter the
|
|
43
|
+
# results.
|
|
44
|
+
# @param marketplace_ids [Array<String>] The response includes orders that were placed in marketplaces you include
|
|
45
|
+
# in this list. Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) for a
|
|
46
|
+
# complete list of `marketplaceId` values.
|
|
47
|
+
# @param fulfilled_by [Array<String>] The response includes orders that are fulfilled by the parties that you
|
|
48
|
+
# include in this list.
|
|
49
|
+
# @param max_results_per_page [Integer] The maximum number of orders that can be returned per page. The value must
|
|
50
|
+
# be between 1 and 100. **Default:** 100.
|
|
51
|
+
# @param pagination_token [String] Pagination occurs when a request produces a response that exceeds the
|
|
52
|
+
# `maxResultsPerPage`. This means that the response is divided into individual pages. To retrieve the next page,
|
|
53
|
+
# you must pass the `nextToken` value as the `paginationToken` query parameter in the next request. You will not
|
|
54
|
+
# receive a `nextToken` value on the last page.
|
|
55
|
+
# @param included_data [Array<String>] A list of datasets to include in the response.
|
|
56
|
+
# @return [Peddler::Response] The API response
|
|
57
|
+
def search_orders(created_after: nil, created_before: nil, last_updated_after: nil, last_updated_before: nil,
|
|
58
|
+
fulfillment_statuses: nil, marketplace_ids: nil, fulfilled_by: nil, max_results_per_page: nil,
|
|
59
|
+
pagination_token: nil, included_data: nil)
|
|
60
|
+
path = "/orders/2026-01-01/orders"
|
|
61
|
+
params = {
|
|
62
|
+
"createdAfter" => created_after,
|
|
63
|
+
"createdBefore" => created_before,
|
|
64
|
+
"lastUpdatedAfter" => last_updated_after,
|
|
65
|
+
"lastUpdatedBefore" => last_updated_before,
|
|
66
|
+
"fulfillmentStatuses" => stringify_array(fulfillment_statuses),
|
|
67
|
+
"marketplaceIds" => stringify_array(marketplace_ids),
|
|
68
|
+
"fulfilledBy" => stringify_array(fulfilled_by),
|
|
69
|
+
"maxResultsPerPage" => max_results_per_page,
|
|
70
|
+
"paginationToken" => pagination_token,
|
|
71
|
+
"includedData" => stringify_array(included_data),
|
|
72
|
+
}.compact
|
|
73
|
+
parser = -> { SearchOrdersResponse }
|
|
74
|
+
get(path, params:, parser:)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Returns the order that you specify.
|
|
78
|
+
#
|
|
79
|
+
# @note This operation can make a static sandbox call.
|
|
80
|
+
# @param order_id [String] An Amazon-defined order identifier.
|
|
81
|
+
# @param included_data [Array<String>] A list of datasets to include in the response.
|
|
82
|
+
# @return [Peddler::Response] The API response
|
|
83
|
+
def get_order(order_id, included_data: nil)
|
|
84
|
+
path = "/orders/2026-01-01/orders/#{percent_encode(order_id)}"
|
|
85
|
+
params = {
|
|
86
|
+
"includedData" => stringify_array(included_data),
|
|
87
|
+
}.compact
|
|
88
|
+
parser = -> { GetOrderResponse }
|
|
89
|
+
get(path, params:, parser:)
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
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 OrdersV0
|
|
10
|
+
# Contains information that is related to the export of an order item.
|
|
11
|
+
ExportInfo = Structure.new do
|
|
12
|
+
# @return [Money] Holds the export/import charge for an order item.
|
|
13
|
+
attribute?(:export_charge, Money, from: "ExportCharge")
|
|
14
|
+
|
|
15
|
+
# @return [String] Holds the `ExportCharge` collection model that is associated with the specified order item.
|
|
16
|
+
#
|
|
17
|
+
# **Possible values**: `AMAZON_FACILITATED`: Import/export charge is withheld by Amazon and remitted to the
|
|
18
|
+
# customs authority by the carrier on behalf of the buyer/seller.
|
|
19
|
+
attribute?(:export_charge_model, String, from: "ExportChargeModel")
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
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 OrdersV0
|
|
10
|
+
# Contains all fulfillment plans for the order
|
|
11
|
+
FulfillmentInstructions = Structure.new do
|
|
12
|
+
# @return [String] An Amazon-defined order identifier, in 3-7-7 format.
|
|
13
|
+
attribute(:amazon_order_id, String, from: "AmazonOrderId")
|
|
14
|
+
|
|
15
|
+
# @return [Array<FulfillmentPlan>] List of all fulfillment plans for the given order id
|
|
16
|
+
attribute?(:fulfillment_plans, [FulfillmentPlan], from: "FulfillmentPlans")
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
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 OrdersV0
|
|
10
|
+
# Represents a location from which the plan is to be fulfilled.
|
|
11
|
+
FulfillmentLocation = Structure.new do
|
|
12
|
+
# @return [String] The fulfillment location identifier.
|
|
13
|
+
attribute?(:supply_source_id, String, from: "SupplySourceId")
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
# A collection of order items that are to be fulfilled from the same location with the same shipping, pickup, and
|
|
11
|
+
# service instructions.
|
|
12
|
+
FulfillmentPlan = Structure.new do
|
|
13
|
+
# @return [String] Time when the fulfillment plan was created in [ISO
|
|
14
|
+
# 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
|
|
15
|
+
attribute(:creation_date, String, from: "CreationDate")
|
|
16
|
+
|
|
17
|
+
# @return [String] Unique identifier for a fulfillment plan.
|
|
18
|
+
attribute(:fulfillment_plan_id, String, from: "FulfillmentPlanId")
|
|
19
|
+
|
|
20
|
+
# @return [Array<FulfillmentPlanItem>] The details of the order items that are included in the fulfillment plan.
|
|
21
|
+
attribute(:fulfillment_plan_items, [FulfillmentPlanItem], from: "FulfillmentPlanItems")
|
|
22
|
+
|
|
23
|
+
# @return [String] The fulfillment plan status.
|
|
24
|
+
attribute(:fulfillment_plan_status, String, from: "FulfillmentPlanStatus")
|
|
25
|
+
|
|
26
|
+
# @return [String] Type of fulfillment
|
|
27
|
+
attribute(:fulfillment_type, String, from: "FulfillmentType")
|
|
28
|
+
|
|
29
|
+
# @return [String] The time when the fulfillment plan's status was last updated in [ISO
|
|
30
|
+
# 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
|
|
31
|
+
attribute(:last_status_update_date, String, from: "LastStatusUpdateDate")
|
|
32
|
+
|
|
33
|
+
# @return [FulfillmentLocation] Represents the location where the plan is fulfilled.
|
|
34
|
+
attribute?(:fulfillment_location, FulfillmentLocation, from: "FulfillmentLocation")
|
|
35
|
+
|
|
36
|
+
# @return [ShippingInstructions] The shipping-related information for a delivery.
|
|
37
|
+
attribute?(:shipping_instructions, ShippingInstructions, from: "ShippingInstructions")
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
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 OrdersV0
|
|
10
|
+
# The order items associated with this fulfillment plan.
|
|
11
|
+
FulfillmentPlanItem = Structure.new do
|
|
12
|
+
# @return [Measurement] Measurement information for the order item.
|
|
13
|
+
attribute(:measurement, Measurement, from: "Measurement")
|
|
14
|
+
|
|
15
|
+
# @return [String] An Amazon-defined associated order item's order item identifier.
|
|
16
|
+
attribute(:order_item_id, String, from: "OrderItemId")
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
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 OrdersV0
|
|
10
|
+
# Delivery constraints applicable to this order.
|
|
11
|
+
FulfillmentPlanShippingConstraints = Structure.new do
|
|
12
|
+
# @return [String] Indicates if the line item needs to be delivered by pallet.
|
|
13
|
+
attribute?(:pallet_delivery, String, from: "PalletDelivery")
|
|
14
|
+
|
|
15
|
+
# @return [String] Indicates that the recipient of the line item needs to sign to confirm its delivery.
|
|
16
|
+
attribute?(:signature_confirmation, String, from: "SignatureConfirmation")
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
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 OrdersV0
|
|
10
|
+
# The response schema for the `getOrderFulfillmentInstructions` operation.
|
|
11
|
+
GetOrderFulfillmentInstructionsResponse = Structure.new do
|
|
12
|
+
# @return [Array<Error>] One or more unexpected errors occurred during the `getOrderFulfillmentInstructions`
|
|
13
|
+
# operation.
|
|
14
|
+
attribute?(:errors, [Error])
|
|
15
|
+
|
|
16
|
+
# @return [FulfillmentInstructions] The payload for the `getOrderFulfillmentInstructions` operation.
|
|
17
|
+
attribute?(:payload, FulfillmentInstructions)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -59,6 +59,9 @@ module Peddler
|
|
|
59
59
|
# EU and is used to help them meet the VAT Deemed Reseller tax laws in the EU and UK.
|
|
60
60
|
attribute?(:deemed_reseller_category, String, from: "DeemedResellerCategory")
|
|
61
61
|
|
|
62
|
+
# @return [ExportInfo] Contains information that is related to the export of an order item.
|
|
63
|
+
attribute?(:export_info, ExportInfo, from: "ExportInfo")
|
|
64
|
+
|
|
62
65
|
# @return [String] The IOSS number of the marketplace. Sellers shipping to the EU from outside the EU must
|
|
63
66
|
# provide this IOSS number to their carrier when Amazon has collected the VAT on the sale.
|
|
64
67
|
attribute?(:ioss_number, String, from: "IossNumber")
|
|
@@ -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 OrdersV0
|
|
10
|
+
# The shipping-related information of a delivery.
|
|
11
|
+
ShippingInstructions = Structure.new do
|
|
12
|
+
# @return [String] The name of the carrier that delivers the package.
|
|
13
|
+
attribute?(:carrier_code, String, from: "CarrierCode")
|
|
14
|
+
|
|
15
|
+
# @return [FulfillmentPlanShippingConstraints] Models constraints around shipping
|
|
16
|
+
attribute?(:shipping_constraints, FulfillmentPlanShippingConstraints, from: "ShippingConstraints")
|
|
17
|
+
|
|
18
|
+
# @return [String] The ship method that is used for the order.
|
|
19
|
+
attribute?(:shipping_method, String, from: "ShippingMethod")
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -93,10 +93,10 @@ module Peddler
|
|
|
93
93
|
# @param is_ispu [Boolean] When true, this order is marked to be picked up from a store rather than delivered.
|
|
94
94
|
# @param store_chain_store_id [String] The store chain store identifier. Linked to a specific store in a store
|
|
95
95
|
# chain.
|
|
96
|
-
# @param earliest_delivery_date_before [String] Use this date to select orders with
|
|
96
|
+
# @param earliest_delivery_date_before [String] Use this date to select orders with an earliest delivery date
|
|
97
97
|
# before (or at) a specified time. The date must be in [ISO
|
|
98
98
|
# 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
|
|
99
|
-
# @param earliest_delivery_date_after [String] Use this date to select orders with
|
|
99
|
+
# @param earliest_delivery_date_after [String] Use this date to select orders with an earliest delivery date after
|
|
100
100
|
# (or at) a specified time. The date must be in [ISO
|
|
101
101
|
# 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
|
|
102
102
|
# @param latest_delivery_date_before [String] Use this date to select orders with a latest delivery date before
|
|
@@ -178,6 +178,18 @@ module Peddler
|
|
|
178
178
|
get(path, rate_limit:, parser:)
|
|
179
179
|
end
|
|
180
180
|
|
|
181
|
+
# Returns the fulfillment instructions for the order that you specify.
|
|
182
|
+
#
|
|
183
|
+
# @note This operation can make a static sandbox call.
|
|
184
|
+
# @param order_id [String] The Amazon order identifier in 3-7-7 format.
|
|
185
|
+
# @param rate_limit [Float] Requests per second
|
|
186
|
+
# @return [Peddler::Response] The API response
|
|
187
|
+
def get_order_fulfillment_instructions(order_id, rate_limit: 0.5)
|
|
188
|
+
path = "/orders/v0/orders/#{percent_encode(order_id)}/fulfillmentInstructions"
|
|
189
|
+
parser = -> { GetOrderFulfillmentInstructionsResponse }
|
|
190
|
+
get(path, rate_limit:, parser:)
|
|
191
|
+
end
|
|
192
|
+
|
|
181
193
|
# Returns detailed order item information for the order that you specify. If `NextToken` is provided, it's used to
|
|
182
194
|
# retrieve the next page of order items.
|
|
183
195
|
#
|
|
@@ -10,6 +10,10 @@ module Peddler
|
|
|
10
10
|
# Item details for be provided for every item in shipment at either the item or carton or pallet level, whichever
|
|
11
11
|
# is appropriate.
|
|
12
12
|
ItemDetails = Structure.new do
|
|
13
|
+
# @return [String] The two-character country code for the country where the product was manufactured or
|
|
14
|
+
# originates. Use ISO 3166-1 alpha-2 format.
|
|
15
|
+
attribute?(:country_of_origin, String, from: "countryOfOrigin")
|
|
16
|
+
|
|
13
17
|
# @return [Expiry] Expiry refers to the collection of dates required for certain items. These could be either
|
|
14
18
|
# expiryDate or mfgDate and expiryAfterDuration. These are mandatory for perishable items.
|
|
15
19
|
attribute?(:expiry, Expiry)
|
|
@@ -22,6 +26,15 @@ module Peddler
|
|
|
22
26
|
# the trade item itself or to items contained. This field is mandatory for all perishable items.
|
|
23
27
|
attribute?(:lot_number, String, from: "lotNumber")
|
|
24
28
|
|
|
29
|
+
# @return [String] The location identifier where the product receives a traceability lot number. Provide this
|
|
30
|
+
# field for products subject to the FDA Food Safety Modernization Act (FSMA) Section 204. When you provide
|
|
31
|
+
# `lotNumberSourceReference`, you must also specify the corresponding `lotNumberSourceType` field.
|
|
32
|
+
attribute?(:lot_number_source_reference, String, from: "lotNumberSourceReference")
|
|
33
|
+
|
|
34
|
+
# @return [String] The identifier type used for the lot number source. Provide this field when you specify
|
|
35
|
+
# `lotNumberSourceReference`.
|
|
36
|
+
attribute?(:lot_number_source_type, String, from: "lotNumberSourceType")
|
|
37
|
+
|
|
25
38
|
# @return [Money] Maximum retail price of the item being shipped.
|
|
26
39
|
attribute?(:maximum_retail_price, Money, from: "maximumRetailPrice")
|
|
27
40
|
|
|
@@ -30,6 +43,9 @@ module Peddler
|
|
|
30
43
|
# provide the purchaseOrderNumber at the appropriate carton or pallet level. Formatting Notes: 8-character
|
|
31
44
|
# alpha-numeric code.
|
|
32
45
|
attribute?(:purchase_order_number, String, from: "purchaseOrderNumber")
|
|
46
|
+
|
|
47
|
+
# @return [RegulationReferences] Regulatory requirements and compliance information for the item.
|
|
48
|
+
attribute?(:regulation_references, RegulationReferences, from: "regulationReferences")
|
|
33
49
|
end
|
|
34
50
|
end
|
|
35
51
|
end
|
|
@@ -10,10 +10,6 @@ module Peddler
|
|
|
10
10
|
# Item details for be provided for every item in shipment at either the item or carton or pallet level, whichever
|
|
11
11
|
# is appropriate.
|
|
12
12
|
PackageItemDetails = Structure.new do
|
|
13
|
-
# @return [String] The two digit country code in ISO 3166-1 alpha-2 format representing the country where the
|
|
14
|
-
# product was manufactured or originated.
|
|
15
|
-
attribute?(:country_of_origin, String, from: "countryOfOrigin")
|
|
16
|
-
|
|
17
13
|
# @return [Expiry] Either expiryDate or mfgDate and expiryAfterDuration are mandatory for perishable items.
|
|
18
14
|
attribute?(:expiry, Expiry)
|
|
19
15
|
|
|
@@ -22,23 +18,11 @@ module Peddler
|
|
|
22
18
|
# the trade item itself or to items contained. This field is mandatory for all perishable items.
|
|
23
19
|
attribute?(:lot_number, String, from: "lotNumber")
|
|
24
20
|
|
|
25
|
-
# @return [String] This is a reference to the lot number source location meaning the place where the product was
|
|
26
|
-
# assigned a traceability lot number. This is mandatory for goods in scope of the FDA Food Safety
|
|
27
|
-
# Modernization Act (FSMA 204). If provided, lotNumberSourceType must also be specified.
|
|
28
|
-
attribute?(:lot_number_source_reference, String, from: "lotNumberSourceReference")
|
|
29
|
-
|
|
30
|
-
# @return [String] The type of reference for the lot number source. Must be provided when
|
|
31
|
-
# lotNumberSourceReference is specified.
|
|
32
|
-
attribute?(:lot_number_source_type, String, from: "lotNumberSourceType")
|
|
33
|
-
|
|
34
21
|
# @return [String] The purchase order number for the shipment being confirmed. If the items in this shipment
|
|
35
22
|
# belong to multiple purchase order numbers that are in particular carton or pallet within the shipment, then
|
|
36
23
|
# provide the purchaseOrderNumber at the appropriate carton or pallet level. Formatting Notes: 8-character
|
|
37
24
|
# alpha-numeric code.
|
|
38
25
|
attribute?(:purchase_order_number, String, from: "purchaseOrderNumber")
|
|
39
|
-
|
|
40
|
-
# @return [RegulationReferences] References to regulatory requirements and compliance information for the item.
|
|
41
|
-
attribute?(:regulation_references, RegulationReferences, from: "regulationReferences")
|
|
42
26
|
end
|
|
43
27
|
end
|
|
44
28
|
end
|
|
@@ -0,0 +1,25 @@
|
|
|
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 VendorShipmentsV1
|
|
10
|
+
# Details of item quantity.
|
|
11
|
+
PackedQuantity = Structure.new do
|
|
12
|
+
# @return [Integer] Amount of units shipped for a specific item at a shipment level. If the item is present only
|
|
13
|
+
# in certain cartons or pallets within the shipment, please provide this at the appropriate carton or pallet
|
|
14
|
+
# level.
|
|
15
|
+
attribute(:amount, Integer)
|
|
16
|
+
|
|
17
|
+
# @return [String] Unit of measure for the shipped quantity.
|
|
18
|
+
attribute(:unit_of_measure, String, from: "unitOfMeasure")
|
|
19
|
+
|
|
20
|
+
# @return [Integer] The case size, in the event that we ordered using cases. Otherwise, 1.
|
|
21
|
+
attribute?(:unit_size, Integer, from: "unitSize")
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
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 VendorShipmentsV1
|
|
10
|
+
# Item details for be provided for every item in shipment at either the item or carton or pallet level, whichever
|
|
11
|
+
# is appropriate.
|
|
12
|
+
PurchaseOrderItemDetails = Structure.new do
|
|
13
|
+
# @return [Money] Maximum retail price of the item being shipped.
|
|
14
|
+
attribute?(:maximum_retail_price, Money, from: "maximumRetailPrice")
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -7,24 +7,22 @@ require "structure"
|
|
|
7
7
|
module Peddler
|
|
8
8
|
module APIs
|
|
9
9
|
class VendorShipmentsV1
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
10
|
+
# Regulatory requirements and compliance information for the item, including reference numbers, verification
|
|
11
|
+
# codes, and exemption codes. Use this field to specify applicable regulations such as EU Deforestation Regulation
|
|
12
|
+
# (EUDR).
|
|
13
13
|
RegulationReferences = Structure.new do
|
|
14
|
-
# @return [String] The
|
|
15
|
-
# diligence requirements.
|
|
14
|
+
# @return [String] The exemption code for EUDR products exempt from due diligence requirements.
|
|
16
15
|
attribute?(:due_diligence_exemption_code, String, from: "dueDiligenceExemptionCode")
|
|
17
16
|
|
|
18
|
-
# @return [String] The EUDR Due Diligence
|
|
19
|
-
# within Amazon compliance collection experience.
|
|
17
|
+
# @return [String] The EUDR Due Diligence information pre-loaded in Vendor Central.
|
|
20
18
|
attribute?(:due_diligence_information, String, from: "dueDiligenceInformation")
|
|
21
19
|
|
|
22
|
-
# @return [String] The
|
|
23
|
-
#
|
|
20
|
+
# @return [String] The reference number from the vendor's EUDR Due Diligence Statement (DDS) submitted to the EU
|
|
21
|
+
# Commission portal or provided to Amazon through ONIX feed.
|
|
24
22
|
attribute?(:due_diligence_reference, String, from: "dueDiligenceReference")
|
|
25
23
|
|
|
26
|
-
# @return [String] The EUDR Due Diligence
|
|
27
|
-
#
|
|
24
|
+
# @return [String] The EUDR Due Diligence verification number provided by the EU Commission for the submitted
|
|
25
|
+
# DDS.
|
|
28
26
|
attribute?(:due_diligence_verification, String, from: "dueDiligenceVerification")
|
|
29
27
|
end
|
|
30
28
|
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 VendorShipmentsV1
|
|
10
|
+
# The request schema for the SubmitShipmentConfirmation operation.
|
|
11
|
+
SubmitShipmentConfirmationRequest = Structure.new do
|
|
12
|
+
# @return [ShipmentConfirmation] One shipment confirmation.
|
|
13
|
+
attribute(:shipment_confirmation, ShipmentConfirmation, from: "shipmentConfirmation")
|
|
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 VendorShipmentsV1
|
|
10
|
+
# The response schema for the SubmitShipmentConfirmation operation.
|
|
11
|
+
SubmitShipmentConfirmationResponse = Structure.new do
|
|
12
|
+
# @return [Array<Error>]
|
|
13
|
+
attribute?(:errors, [Error])
|
|
14
|
+
|
|
15
|
+
# @return [SubmitShipmentConfirmationResult] The response payload for the SubmitShipmentConfirmation operation.
|
|
16
|
+
attribute?(:payload, SubmitShipmentConfirmationResult)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
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 VendorShipmentsV1
|
|
10
|
+
# Result payload for successful ASN submission.
|
|
11
|
+
SubmitShipmentConfirmationResult = Structure.new do
|
|
12
|
+
# @return [String] Success message for the operation SubmitShipmentConfirmation
|
|
13
|
+
attribute?(:message, String)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -23,6 +23,18 @@ module Peddler
|
|
|
23
23
|
post(path, body:, rate_limit:, parser:)
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
+
# Submits one shipment confirmation for vendor orders and get response immediately.
|
|
27
|
+
#
|
|
28
|
+
# @note This operation can make a static sandbox call.
|
|
29
|
+
# @param body [Hash] A request to submit shipment confirmation.
|
|
30
|
+
# @param rate_limit [Float] Requests per second
|
|
31
|
+
# @return [Peddler::Response] The API response
|
|
32
|
+
def submit_shipment_confirmation(body, rate_limit: 10.0)
|
|
33
|
+
path = "/vendor/shipping/v1/shipmentConfirmation"
|
|
34
|
+
parser = -> { SubmitShipmentConfirmationResponse }
|
|
35
|
+
post(path, body:, rate_limit:, parser:)
|
|
36
|
+
end
|
|
37
|
+
|
|
26
38
|
# Submits one or more shipment request for vendor Orders.
|
|
27
39
|
#
|
|
28
40
|
# @param body [Hash] A request to submit shipment request.
|
|
@@ -18,6 +18,15 @@ module Peddler
|
|
|
18
18
|
# populated when the seller is a B2B seller.
|
|
19
19
|
attribute?(:ordered_product_sales_b2b, Amount, from: "orderedProductSalesB2B")
|
|
20
20
|
|
|
21
|
+
# @return [Float] The percentage conversion metric indicating how many orders were refunded, calculated by
|
|
22
|
+
# dividing unitsRefunded by unitsOrdered for the selected time period.
|
|
23
|
+
attribute?(:refund_rate, Float, null: false, from: "refundRate")
|
|
24
|
+
|
|
25
|
+
# @return [Float] The percentage conversion metric indicating how many orders were refunded by Amazon Business
|
|
26
|
+
# customers, calculated by dividing unitsRefundedB2B by unitsOrderedB2B for the selected time period. Note:
|
|
27
|
+
# This field is only populated when the seller is a B2B seller.
|
|
28
|
+
attribute?(:refund_rate_b2b, Float, from: "refundRateB2B")
|
|
29
|
+
|
|
21
30
|
# @return [String] The number of items that were ordered for the selected time period.
|
|
22
31
|
attribute?(:total_order_items, String, null: false, from: "totalOrderItems")
|
|
23
32
|
|
|
@@ -31,6 +40,13 @@ module Peddler
|
|
|
31
40
|
# @return [String] The number of units ordered by Amazon Business customers. Note: This field is only populated
|
|
32
41
|
# when the seller is a B2B seller.
|
|
33
42
|
attribute?(:units_ordered_b2b, String, from: "unitsOrderedB2B")
|
|
43
|
+
|
|
44
|
+
# @return [String] The number of units refunded for the selected time period.
|
|
45
|
+
attribute?(:units_refunded, String, null: false, from: "unitsRefunded")
|
|
46
|
+
|
|
47
|
+
# @return [String] The number of units refunded by Amazon Business customers for the selected time period. Note:
|
|
48
|
+
# This field is only populated when the seller is a B2B seller.
|
|
49
|
+
attribute?(:units_refunded_b2b, String, from: "unitsRefundedB2B")
|
|
34
50
|
end
|
|
35
51
|
end
|
|
36
52
|
end
|