peddler 5.3.1 → 5.5.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/README.md +74 -11
- data/lib/peddler/api.rb +30 -6
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/order_attribute.rb +20 -0
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_execution_error.rb +24 -0
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_listing.rb +24 -0
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_order.rb +60 -0
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_order_creation_data.rb +23 -0
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_order_reference.rb +18 -0
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_shipment.rb +43 -0
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/shipment_label_page_types.rb +20 -0
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb +100 -0
- data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11/address.rb +4 -1
- data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11/distance.rb +20 -0
- data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11/geocodes.rb +23 -0
- data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11/handover_location.rb +23 -0
- data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11/ship_label_metadata.rb +4 -0
- data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11/shipment_info.rb +3 -0
- data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11/shipping_options.rb +4 -0
- data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11.rb +1 -1
- data/lib/peddler/apis/feeds_2021_06_30.rb +8 -2
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01/amount.rb +2 -2
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01/delivery_document.rb +2 -2
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01/delivery_information.rb +2 -1
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01/delivery_preferences.rb +1 -1
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01/delivery_window.rb +3 -4
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01/drop_off_location.rb +9 -7
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01/feature_settings.rb +5 -1
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01/feature_sku.rb +1 -1
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01/fulfillment_order.rb +2 -2
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01/fulfillment_preview_shipment.rb +6 -6
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01/fulfillment_shipment_package.rb +3 -4
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01/get_feature_inventory_response.rb +1 -1
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01/get_feature_sku_result.rb +12 -3
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01/origin.rb +2 -1
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01/tracking_event.rb +1 -2
- data/lib/peddler/apis/listings_restrictions_2021_08_01/restriction_list.rb +1 -1
- data/lib/peddler/apis/listings_restrictions_2021_08_01.rb +4 -1
- data/lib/peddler/apis/notifications_v1/aggregation_filter.rb +2 -2
- data/lib/peddler/apis/notifications_v1/destination.rb +1 -1
- data/lib/peddler/apis/notifications_v1/event_bridge_resource.rb +2 -2
- data/lib/peddler/apis/notifications_v1/event_filter.rb +6 -6
- data/lib/peddler/apis/notifications_v1/marketplace_filter.rb +1 -1
- data/lib/peddler/apis/notifications_v1/marketplace_ids.rb +2 -2
- data/lib/peddler/apis/notifications_v1/order_change_type_filter.rb +2 -1
- data/lib/peddler/apis/notifications_v1/order_change_types.rb +2 -2
- data/lib/peddler/apis/notifications_v1/processing_directive.rb +18 -7
- data/lib/peddler/apis/notifications_v1/send_test_notification_request.rb +20 -0
- data/lib/peddler/apis/notifications_v1/send_test_notification_response.rb +20 -0
- data/lib/peddler/apis/notifications_v1/test_notification.rb +22 -0
- data/lib/peddler/apis/notifications_v1.rb +45 -17
- data/lib/peddler/apis/orders_2026_01_01/associated_order_item.rb +27 -0
- data/lib/peddler/apis/orders_2026_01_01/fulfillment_order.rb +19 -0
- data/lib/peddler/apis/orders_2026_01_01/item_packing.rb +3 -0
- data/lib/peddler/apis/orders_2026_01_01/item_picking.rb +1 -1
- data/lib/peddler/apis/orders_2026_01_01/item_proceeds_breakdown.rb +5 -5
- data/lib/peddler/apis/orders_2026_01_01/item_proceeds_detailed_breakdown.rb +1 -1
- data/lib/peddler/apis/orders_2026_01_01/item_tax.rb +20 -0
- data/lib/peddler/apis/orders_2026_01_01/item_tax_calculation_breakdown.rb +21 -0
- data/lib/peddler/apis/orders_2026_01_01/item_tax_collection.rb +24 -0
- data/lib/peddler/apis/orders_2026_01_01/order.rb +13 -1
- data/lib/peddler/apis/orders_2026_01_01/order_item.rb +7 -0
- data/lib/peddler/apis/orders_2026_01_01/order_payment.rb +17 -0
- data/lib/peddler/apis/orders_2026_01_01/order_proceeds.rb +5 -0
- data/lib/peddler/apis/orders_2026_01_01/order_proceeds_breakdown.rb +30 -0
- data/lib/peddler/apis/orders_2026_01_01/order_tax.rb +20 -0
- data/lib/peddler/apis/orders_2026_01_01/order_tax_invoicing.rb +34 -0
- data/lib/peddler/apis/orders_2026_01_01/order_tax_registration.rb +39 -0
- data/lib/peddler/apis/orders_2026_01_01/package_status.rb +4 -3
- data/lib/peddler/apis/orders_2026_01_01/pagination.rb +5 -5
- data/lib/peddler/apis/orders_2026_01_01/payment_execution.rb +39 -0
- data/lib/peddler/apis/orders_2026_01_01/search_orders_response.rb +10 -11
- data/lib/peddler/apis/orders_2026_01_01/serial_number_requirement.rb +19 -0
- data/lib/peddler/apis/orders_2026_01_01/tax_registration_attribute.rb +22 -0
- data/lib/peddler/apis/orders_2026_01_01.rb +15 -13
- data/lib/peddler/apis/orders_v0/address.rb +3 -3
- data/lib/peddler/apis/orders_v0/address_extended_fields.rb +9 -2
- data/lib/peddler/apis/orders_v0/approved_alternative_details.rb +20 -0
- data/lib/peddler/apis/orders_v0/approved_attribute.rb +23 -0
- data/lib/peddler/apis/orders_v0/buyer_info.rb +3 -0
- data/lib/peddler/apis/orders_v0/geo_coordinates.rb +20 -0
- data/lib/peddler/apis/orders_v0/interim_status_detail.rb +24 -0
- data/lib/peddler/apis/orders_v0/order_buyer_info.rb +3 -0
- data/lib/peddler/apis/orders_v0/regulated_order_verification_status.rb +5 -0
- data/lib/peddler/apis/orders_v0/valid_interim_status_code.rb +21 -0
- data/lib/peddler/apis/orders_v0/valid_verification_detail.rb +2 -1
- data/lib/peddler/apis/orders_v0/verification_details.rb +8 -0
- data/lib/peddler/apis/orders_v0.rb +6 -2
- data/lib/peddler/apis/product_pricing_2022_05_01/competitive_summary_response_body.rb +3 -0
- data/lib/peddler/apis/product_pricing_2022_05_01/item.rb +17 -0
- data/lib/peddler/apis/product_pricing_2022_05_01/points.rb +1 -1
- data/lib/peddler/apis/product_pricing_2022_05_01/similar_items.rb +17 -0
- data/lib/peddler/apis/product_type_definitions_2020_09_01/error_list.rb +1 -1
- data/lib/peddler/apis/product_type_definitions_2020_09_01/product_type.rb +1 -1
- data/lib/peddler/apis/product_type_definitions_2020_09_01/product_type_list.rb +1 -1
- data/lib/peddler/apis/product_type_definitions_2020_09_01/schema_link.rb +2 -1
- data/lib/peddler/apis/product_type_definitions_2020_09_01.rb +12 -8
- data/lib/peddler/apis/replenishment_2022_11_07/deliveries_condition.rb +22 -0
- data/lib/peddler/apis/replenishment_2022_11_07/forecast_deliveries.rb +26 -0
- data/lib/peddler/apis/replenishment_2022_11_07/get_selling_partner_metrics_request.rb +8 -3
- data/lib/peddler/apis/replenishment_2022_11_07/get_selling_partner_metrics_request_filters.rb +48 -0
- data/lib/peddler/apis/replenishment_2022_11_07/get_selling_partner_metrics_response_metric.rb +14 -10
- data/lib/peddler/apis/replenishment_2022_11_07/list_offer_metrics_request.rb +2 -2
- data/lib/peddler/apis/replenishment_2022_11_07/list_offer_metrics_request_filters.rb +17 -4
- data/lib/peddler/apis/replenishment_2022_11_07/list_offer_metrics_response_offer.rb +37 -23
- data/lib/peddler/apis/replenishment_2022_11_07/list_offers_request.rb +2 -2
- data/lib/peddler/apis/replenishment_2022_11_07/list_offers_request_filters.rb +7 -3
- data/lib/peddler/apis/replenishment_2022_11_07/list_offers_response_offer.rb +27 -1
- data/lib/peddler/apis/replenishment_2022_11_07/offer_program_configuration.rb +1 -1
- data/lib/peddler/apis/replenishment_2022_11_07/time_interval.rb +10 -6
- data/lib/peddler/apis/reports_2021_06_30.rb +8 -2
- data/lib/peddler/apis/seller_wallet_2024_03_01/balance.rb +6 -6
- data/lib/peddler/apis/seller_wallet_2024_03_01/balance_listing.rb +2 -2
- data/lib/peddler/apis/seller_wallet_2024_03_01/bank_account.rb +5 -5
- data/lib/peddler/apis/seller_wallet_2024_03_01/bank_account_listing.rb +2 -2
- data/lib/peddler/apis/seller_wallet_2024_03_01/delete_transfer_schedule.rb +3 -2
- data/lib/peddler/apis/seller_wallet_2024_03_01/fee.rb +4 -7
- data/lib/peddler/apis/seller_wallet_2024_03_01/fx_rate_details.rb +6 -6
- data/lib/peddler/apis/seller_wallet_2024_03_01/payee_contact_information.rb +5 -5
- data/lib/peddler/apis/seller_wallet_2024_03_01/payment_preference.rb +2 -3
- data/lib/peddler/apis/seller_wallet_2024_03_01/schedule_expression.rb +4 -5
- data/lib/peddler/apis/seller_wallet_2024_03_01/transaction.rb +13 -14
- data/lib/peddler/apis/seller_wallet_2024_03_01/transaction_account.rb +8 -8
- data/lib/peddler/apis/seller_wallet_2024_03_01/transaction_initiation_request.rb +8 -7
- data/lib/peddler/apis/seller_wallet_2024_03_01/transaction_instrument_details.rb +6 -7
- data/lib/peddler/apis/seller_wallet_2024_03_01/transaction_listing.rb +6 -5
- data/lib/peddler/apis/seller_wallet_2024_03_01/transfer_rate_preview.rb +4 -3
- data/lib/peddler/apis/seller_wallet_2024_03_01/transfer_schedule.rb +11 -12
- data/lib/peddler/apis/seller_wallet_2024_03_01/transfer_schedule_failures.rb +3 -3
- data/lib/peddler/apis/seller_wallet_2024_03_01/transfer_schedule_information.rb +5 -6
- data/lib/peddler/apis/seller_wallet_2024_03_01/transfer_schedule_listing.rb +6 -5
- data/lib/peddler/apis/seller_wallet_2024_03_01/transfer_schedule_request.rb +11 -13
- data/lib/peddler/apis/seller_wallet_2024_03_01.rb +30 -28
- data/lib/peddler/apis/services_v1/associated_item.rb +3 -0
- data/lib/peddler/apis/services_v1/linked_asset.rb +24 -0
- data/lib/peddler/apis/services_v1/money_amount.rb +20 -0
- data/lib/peddler/apis/services_v1/payment.rb +20 -0
- data/lib/peddler/apis/services_v1/service_job.rb +9 -0
- data/lib/peddler/apis/services_v1.rb +11 -5
- data/lib/peddler/apis/shipment_invoicing_v0/payment_information.rb +6 -6
- data/lib/peddler/apis/shipment_invoicing_v0/payment_information_list.rb +1 -1
- data/lib/peddler/apis/uploads_2020_11_01.rb +1 -1
- data/lib/peddler/data_kiosk/economics20240315.json +6 -6
- data/lib/peddler/data_kiosk/sales_and_traffic20231115.json +6 -6
- data/lib/peddler/data_kiosk/sales_and_traffic20240424.json +6 -6
- data/lib/peddler/data_kiosk/vendor_analytics20240930.json +6 -6
- data/lib/peddler/errors.rb +1 -0
- data/lib/peddler/notifications/order_change/notification.rb +4 -3
- data/lib/peddler/notifications/order_change/order_change_notification.rb +2 -2
- data/lib/peddler/notifications/order_change/order_change_trigger.rb +4 -4
- data/lib/peddler/notifications/order_change/order_item.rb +7 -7
- data/lib/peddler/notifications/order_change/summary.rb +17 -17
- data/lib/peddler/version.rb +1 -1
- data/sig/peddler/api.rbs +3 -1
- data/sig/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rbs +167 -0
- data/sig/peddler/apis/external_fulfillment_shipments_2024_09_11.rbs +85 -28
- data/sig/peddler/apis/feeds_2021_06_30.rbs +1 -1
- data/sig/peddler/apis/fulfillment_outbound_2020_07_01.rbs +11 -8
- data/sig/peddler/apis/listings_restrictions_2021_08_01.rbs +1 -1
- data/sig/peddler/apis/notifications_v1.rbs +61 -7
- data/sig/peddler/apis/orders_2026_01_01.rbs +272 -39
- data/sig/peddler/apis/orders_v0.rbs +115 -36
- data/sig/peddler/apis/product_pricing_2022_05_01.rbs +40 -7
- data/sig/peddler/apis/product_type_definitions_2020_09_01.rbs +1 -1
- data/sig/peddler/apis/replenishment_2022_11_07.rbs +117 -42
- data/sig/peddler/apis/reports_2021_06_30.rbs +1 -1
- data/sig/peddler/apis/services_v1.rbs +71 -15
- data/sig/peddler/errors.rbs +3 -0
- metadata +51 -5
|
@@ -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 ServicesV1
|
|
10
|
+
# Payment information for the service job.
|
|
11
|
+
Payment = Structure.new do
|
|
12
|
+
# @return [MoneyAmount] The payment amount.
|
|
13
|
+
attribute?(:amount, MoneyAmount)
|
|
14
|
+
|
|
15
|
+
# @return [String] The payment instrument used for the transaction.
|
|
16
|
+
attribute?(:instrument, String)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -25,10 +25,16 @@ module Peddler
|
|
|
25
25
|
# @return [String] The marketplace identifier.
|
|
26
26
|
attribute?(:marketplace_id, String, from: "marketplaceId")
|
|
27
27
|
|
|
28
|
+
# @return [Array<Payment>] A list that contains payment information for the service job.
|
|
29
|
+
attribute?(:payments, [Payment])
|
|
30
|
+
|
|
28
31
|
# @return [Array<AppointmentTime>] A list of appointment windows preferred by the buyer. Included only if the
|
|
29
32
|
# buyer selected appointment windows when creating the order.
|
|
30
33
|
attribute?(:preferred_appointment_times, [AppointmentTime], from: "preferredAppointmentTimes")
|
|
31
34
|
|
|
35
|
+
# @return [Array<String>] A list of associated product order IDs for the service job.
|
|
36
|
+
attribute?(:product_order_ids, [String], from: "productOrderIds")
|
|
37
|
+
|
|
32
38
|
# @return [ScopeOfWork] The scope of work for the order.
|
|
33
39
|
attribute?(:scope_of_work, ScopeOfWork, from: "scopeOfWork")
|
|
34
40
|
|
|
@@ -52,6 +58,9 @@ module Peddler
|
|
|
52
58
|
|
|
53
59
|
# @return [String] The Amazon-defined identifier for the region scope.
|
|
54
60
|
attribute?(:store_id, String, from: "storeId")
|
|
61
|
+
|
|
62
|
+
# @return [Array<String>] A list of associated product tracking IDs for the service job.
|
|
63
|
+
attribute?(:tracking_ids, [String], from: "trackingIds")
|
|
55
64
|
end
|
|
56
65
|
end
|
|
57
66
|
end
|
|
@@ -57,6 +57,10 @@ module Peddler
|
|
|
57
57
|
# @note This operation can make a static sandbox call.
|
|
58
58
|
# @param service_order_ids [Array<String>] List of service order ids for the query you want to perform.Max values
|
|
59
59
|
# supported 20.
|
|
60
|
+
# @param product_order_ids [Array<String>] A list of up to 20 associated product order IDs. You can use these IDs
|
|
61
|
+
# to query service jobs.
|
|
62
|
+
# @param tracking_ids [Array<String>] A list of up to 20 associated product tracking IDs. You can use these IDs to
|
|
63
|
+
# query service jobs.
|
|
60
64
|
# @param service_job_status [Array<String>] A list of one or more job status by which to filter the list of jobs.
|
|
61
65
|
# @param page_token [String] String returned in the response of your previous request.
|
|
62
66
|
# @param page_size [Integer] A non-negative integer that indicates the maximum number of jobs to return in the
|
|
@@ -87,13 +91,15 @@ module Peddler
|
|
|
87
91
|
# is 50.
|
|
88
92
|
# @param rate_limit [Float] Requests per second
|
|
89
93
|
# @return [Peddler::Response] The API response
|
|
90
|
-
def get_service_jobs(marketplace_ids, service_order_ids: nil,
|
|
91
|
-
page_size: 20, sort_field: nil, sort_order: nil, created_after: nil,
|
|
92
|
-
|
|
93
|
-
required_skills: nil, store_ids: nil, rate_limit: 10.0)
|
|
94
|
+
def get_service_jobs(marketplace_ids, service_order_ids: nil, product_order_ids: nil, tracking_ids: nil,
|
|
95
|
+
service_job_status: nil, page_token: nil, page_size: 20, sort_field: nil, sort_order: nil, created_after: nil,
|
|
96
|
+
created_before: nil, last_updated_after: nil, last_updated_before: nil, schedule_start_date: nil,
|
|
97
|
+
schedule_end_date: nil, asins: nil, required_skills: nil, store_ids: nil, rate_limit: 10.0)
|
|
94
98
|
path = "/service/v1/serviceJobs"
|
|
95
99
|
params = {
|
|
96
100
|
"serviceOrderIds" => stringify_array(service_order_ids),
|
|
101
|
+
"productOrderIds" => stringify_array(product_order_ids),
|
|
102
|
+
"trackingIds" => stringify_array(tracking_ids),
|
|
97
103
|
"serviceJobStatus" => stringify_array(service_job_status),
|
|
98
104
|
"pageToken" => page_token,
|
|
99
105
|
"pageSize" => page_size,
|
|
@@ -148,7 +154,7 @@ module Peddler
|
|
|
148
154
|
# @param service_job_id [String] An Amazon-defined service job identifier. Get this value by calling the
|
|
149
155
|
# `getServiceJobs` operation of the Services API.
|
|
150
156
|
# @param appointment_id [String] An Amazon-defined identifier of active service job appointment.
|
|
151
|
-
# @param body [Hash]
|
|
157
|
+
# @param body [Hash] Input containing the resource details to be assigned to the appointment.
|
|
152
158
|
# @param rate_limit [Float] Requests per second
|
|
153
159
|
# @return [Peddler::Response] The API response
|
|
154
160
|
def assign_appointment_resources(service_job_id, appointment_id, body, rate_limit: 1.0)
|
|
@@ -7,21 +7,21 @@ require "structure"
|
|
|
7
7
|
module Peddler
|
|
8
8
|
module APIs
|
|
9
9
|
class ShipmentInvoicingV0
|
|
10
|
-
#
|
|
10
|
+
# Information about a payment transaction.
|
|
11
11
|
PaymentInformation = Structure.new do
|
|
12
|
-
# @return [String]
|
|
12
|
+
# @return [String] The government ID of the acquirer.
|
|
13
13
|
attribute?(:acquirer_id, String, from: "AcquirerId")
|
|
14
14
|
|
|
15
|
-
# @return [String]
|
|
15
|
+
# @return [String] The authorization code of this payment.
|
|
16
16
|
attribute?(:authorization_code, String, from: "AuthorizationCode")
|
|
17
17
|
|
|
18
|
-
# @return [String]
|
|
18
|
+
# @return [String] The credit card brand if the payment method is `CreditCard`.
|
|
19
19
|
attribute?(:card_brand, String, from: "CardBrand")
|
|
20
20
|
|
|
21
|
-
# @return [String]
|
|
21
|
+
# @return [String] The name of the payment method.
|
|
22
22
|
attribute?(:payment_method, String, from: "PaymentMethod")
|
|
23
23
|
|
|
24
|
-
# @return [Money]
|
|
24
|
+
# @return [Money] The amount paid in this payment.
|
|
25
25
|
attribute?(:payment_value, Money, from: "PaymentValue")
|
|
26
26
|
end
|
|
27
27
|
end
|
|
@@ -26,7 +26,7 @@ module Peddler
|
|
|
26
26
|
# create an upload destination for an Aplus content document, the `{resource}` would be
|
|
27
27
|
# `aplus/2020-11-01/contentDocuments` and the path would be
|
|
28
28
|
# `/uploads/2020-11-01/uploadDestinations/aplus/2020-11-01/contentDocuments`.
|
|
29
|
-
# @param content_type [String] The content type of the file you upload.
|
|
29
|
+
# @param content_type [String] The content type of the file you upload. This parameter is required for A+ content.
|
|
30
30
|
# @param rate_limit [Float] Requests per second
|
|
31
31
|
# @return [Peddler::Response] The API response
|
|
32
32
|
def create_upload_destination_for_resource(marketplace_ids, content_md5, resource, content_type: nil,
|
|
@@ -2035,6 +2035,12 @@
|
|
|
2035
2035
|
"isDeprecated": false,
|
|
2036
2036
|
"deprecationReason": null
|
|
2037
2037
|
},
|
|
2038
|
+
{
|
|
2039
|
+
"name": "VARIABLE_DEFINITION",
|
|
2040
|
+
"description": "Location adjacent to a variable definition.",
|
|
2041
|
+
"isDeprecated": false,
|
|
2042
|
+
"deprecationReason": null
|
|
2043
|
+
},
|
|
2038
2044
|
{
|
|
2039
2045
|
"name": "SCHEMA",
|
|
2040
2046
|
"description": "Location adjacent to a schema definition.",
|
|
@@ -2100,12 +2106,6 @@
|
|
|
2100
2106
|
"description": "Location adjacent to an input object field definition.",
|
|
2101
2107
|
"isDeprecated": false,
|
|
2102
2108
|
"deprecationReason": null
|
|
2103
|
-
},
|
|
2104
|
-
{
|
|
2105
|
-
"name": "VARIABLE_DEFINITION",
|
|
2106
|
-
"description": "Location adjacent to a variable definition.",
|
|
2107
|
-
"isDeprecated": false,
|
|
2108
|
-
"deprecationReason": null
|
|
2109
2109
|
}
|
|
2110
2110
|
],
|
|
2111
2111
|
"possibleTypes": null
|
|
@@ -1900,6 +1900,12 @@
|
|
|
1900
1900
|
"isDeprecated": false,
|
|
1901
1901
|
"deprecationReason": null
|
|
1902
1902
|
},
|
|
1903
|
+
{
|
|
1904
|
+
"name": "VARIABLE_DEFINITION",
|
|
1905
|
+
"description": "Location adjacent to a variable definition.",
|
|
1906
|
+
"isDeprecated": false,
|
|
1907
|
+
"deprecationReason": null
|
|
1908
|
+
},
|
|
1903
1909
|
{
|
|
1904
1910
|
"name": "SCHEMA",
|
|
1905
1911
|
"description": "Location adjacent to a schema definition.",
|
|
@@ -1965,12 +1971,6 @@
|
|
|
1965
1971
|
"description": "Location adjacent to an input object field definition.",
|
|
1966
1972
|
"isDeprecated": false,
|
|
1967
1973
|
"deprecationReason": null
|
|
1968
|
-
},
|
|
1969
|
-
{
|
|
1970
|
-
"name": "VARIABLE_DEFINITION",
|
|
1971
|
-
"description": "Location adjacent to a variable definition.",
|
|
1972
|
-
"isDeprecated": false,
|
|
1973
|
-
"deprecationReason": null
|
|
1974
1974
|
}
|
|
1975
1975
|
],
|
|
1976
1976
|
"possibleTypes": null
|
|
@@ -2465,6 +2465,12 @@
|
|
|
2465
2465
|
"isDeprecated": false,
|
|
2466
2466
|
"deprecationReason": null
|
|
2467
2467
|
},
|
|
2468
|
+
{
|
|
2469
|
+
"name": "VARIABLE_DEFINITION",
|
|
2470
|
+
"description": "Location adjacent to a variable definition.",
|
|
2471
|
+
"isDeprecated": false,
|
|
2472
|
+
"deprecationReason": null
|
|
2473
|
+
},
|
|
2468
2474
|
{
|
|
2469
2475
|
"name": "SCHEMA",
|
|
2470
2476
|
"description": "Location adjacent to a schema definition.",
|
|
@@ -2530,12 +2536,6 @@
|
|
|
2530
2536
|
"description": "Location adjacent to an input object field definition.",
|
|
2531
2537
|
"isDeprecated": false,
|
|
2532
2538
|
"deprecationReason": null
|
|
2533
|
-
},
|
|
2534
|
-
{
|
|
2535
|
-
"name": "VARIABLE_DEFINITION",
|
|
2536
|
-
"description": "Location adjacent to a variable definition.",
|
|
2537
|
-
"isDeprecated": false,
|
|
2538
|
-
"deprecationReason": null
|
|
2539
2539
|
}
|
|
2540
2540
|
],
|
|
2541
2541
|
"possibleTypes": null
|
|
@@ -2067,6 +2067,12 @@
|
|
|
2067
2067
|
"isDeprecated": false,
|
|
2068
2068
|
"deprecationReason": null
|
|
2069
2069
|
},
|
|
2070
|
+
{
|
|
2071
|
+
"name": "VARIABLE_DEFINITION",
|
|
2072
|
+
"description": "Location adjacent to a variable definition.",
|
|
2073
|
+
"isDeprecated": false,
|
|
2074
|
+
"deprecationReason": null
|
|
2075
|
+
},
|
|
2070
2076
|
{
|
|
2071
2077
|
"name": "SCHEMA",
|
|
2072
2078
|
"description": "Location adjacent to a schema definition.",
|
|
@@ -2132,12 +2138,6 @@
|
|
|
2132
2138
|
"description": "Location adjacent to an input object field definition.",
|
|
2133
2139
|
"isDeprecated": false,
|
|
2134
2140
|
"deprecationReason": null
|
|
2135
|
-
},
|
|
2136
|
-
{
|
|
2137
|
-
"name": "VARIABLE_DEFINITION",
|
|
2138
|
-
"description": "Location adjacent to a variable definition.",
|
|
2139
|
-
"isDeprecated": false,
|
|
2140
|
-
"deprecationReason": null
|
|
2141
2141
|
}
|
|
2142
2142
|
],
|
|
2143
2143
|
"possibleTypes": null
|
data/lib/peddler/errors.rb
CHANGED
|
@@ -9,20 +9,21 @@ module Peddler
|
|
|
9
9
|
module OrderChange
|
|
10
10
|
# The notification response schema that comprises the entire JSON document for ORDER_CHANGE notification.
|
|
11
11
|
Notification = Structure.new do
|
|
12
|
-
# @return [String] The time when this notification was published, in ISO-8601 date/time format.
|
|
12
|
+
# @return [String] The time when this notification was published, presented in ISO-8601 date/time format.
|
|
13
13
|
attribute(:event_time, String, null: false, from: "EventTime")
|
|
14
14
|
|
|
15
15
|
# @return [Hash] The notification metadata.
|
|
16
16
|
attribute(:notification_metadata, Hash, null: false, from: "NotificationMetadata")
|
|
17
17
|
|
|
18
18
|
# @return [String] The type of this notification, used to differentiate different notifications. Combined with
|
|
19
|
-
# payload version
|
|
19
|
+
# payload version controls the structure of payload object.
|
|
20
20
|
attribute(:notification_type, String, null: false, from: "NotificationType")
|
|
21
21
|
|
|
22
22
|
# @return [String] The notification version.
|
|
23
23
|
attribute(:notification_version, String, null: false, from: "NotificationVersion")
|
|
24
24
|
|
|
25
|
-
# @return [Payload] The payload for
|
|
25
|
+
# @return [Payload] The payload for this ORDER_CHANGE notification. It's unique for different event type and
|
|
26
|
+
# will provide more in-depth information about this notification.
|
|
26
27
|
attribute(:payload, Payload, null: false, from: "Payload")
|
|
27
28
|
|
|
28
29
|
# @return [String] The payload version of the notification.
|
|
@@ -18,8 +18,8 @@ module Peddler
|
|
|
18
18
|
# @return [OrderChangeTrigger]
|
|
19
19
|
attribute(:order_change_trigger, OrderChangeTrigger, null: false, from: "OrderChangeTrigger")
|
|
20
20
|
|
|
21
|
-
# @return [String]
|
|
22
|
-
#
|
|
21
|
+
# @return [String] Change type of this notification. The possible values include BuyerRequestedChange,
|
|
22
|
+
# DeliveryTipChange, OrderStatusChange.
|
|
23
23
|
attribute(:order_change_type, String, null: false, from: "OrderChangeType")
|
|
24
24
|
|
|
25
25
|
# @return [String] The selling partner identifier.
|
|
@@ -7,13 +7,13 @@ require "structure"
|
|
|
7
7
|
module Peddler
|
|
8
8
|
module Notifications
|
|
9
9
|
module OrderChange
|
|
10
|
-
# Details about what
|
|
10
|
+
# Details about what triggered this ORDER_CHANGE notification.
|
|
11
11
|
OrderChangeTrigger = Structure.new do
|
|
12
|
-
# @return [String] The reason this ORDER_CHANGE notification
|
|
12
|
+
# @return [String] The reason for this ORDER_CHANGE notification.
|
|
13
13
|
attribute(:change_reason, String, null: false, from: "ChangeReason")
|
|
14
14
|
|
|
15
|
-
# @return [String] The
|
|
16
|
-
# null when there is no related timestamp.
|
|
15
|
+
# @return [String] The timestamp for the change that caused this notification, presented in ISO-8601 date/time
|
|
16
|
+
# format. It will be null when there is no related timestamp.
|
|
17
17
|
attribute(:time_of_order_change, String, from: "TimeOfOrderChange")
|
|
18
18
|
end
|
|
19
19
|
end
|
|
@@ -15,24 +15,24 @@ module Peddler
|
|
|
15
15
|
# @return [Integer] The number of items in the order.
|
|
16
16
|
attribute(:quantity, Integer, null: false, from: "Quantity")
|
|
17
17
|
|
|
18
|
-
# @return [String] The seller-specific SKU for an item.
|
|
18
|
+
# @return [String] The seller-specific SKU identifier for an item.
|
|
19
19
|
attribute(:seller_sku, String, null: false, from: "SellerSKU")
|
|
20
20
|
|
|
21
|
-
# @return [String] The unique identifier of the supply source.
|
|
21
|
+
# @return [String] The unique identifier of the supply source. It will be null when there is no related
|
|
22
22
|
# information.
|
|
23
23
|
attribute(:supply_source_id, String, from: "SupplySourceId")
|
|
24
24
|
|
|
25
|
-
# @return [:boolean]
|
|
25
|
+
# @return [:boolean] Information about whether or not a buyer requested cancellation. When true, the buyer has
|
|
26
|
+
# requested cancellation.
|
|
26
27
|
attribute?(:buyer_requested_cancel, :boolean, from: "IsBuyerRequestedCancel")
|
|
27
28
|
|
|
28
|
-
# @return [String] The start of the time period
|
|
29
|
+
# @return [String] The start of the time period within which you have committed to fulfill the order item.
|
|
29
30
|
attribute?(:item_earliest_delivery_date, String, from: "ItemEarliestDeliveryDate")
|
|
30
31
|
|
|
31
|
-
# @return [String] The end of the time period
|
|
32
|
+
# @return [String] The end of the time period within which you have committed to fulfill the order item.
|
|
32
33
|
attribute?(:item_latest_delivery_date, String, from: "ItemLatestDeliveryDate")
|
|
33
34
|
|
|
34
|
-
# @return [String] The current status of the order item.
|
|
35
|
-
# statuses are different.
|
|
35
|
+
# @return [String] The current status of the order item. Will display it when items' status are different.
|
|
36
36
|
attribute?(:order_item_status, String, from: "OrderItemStatus")
|
|
37
37
|
|
|
38
38
|
# @return [Integer] The number of items shipped.
|
|
@@ -7,7 +7,7 @@ require "structure"
|
|
|
7
7
|
module Peddler
|
|
8
8
|
module Notifications
|
|
9
9
|
module OrderChange
|
|
10
|
-
# Information about
|
|
10
|
+
# Information about order and order items that had the change.
|
|
11
11
|
Summary = Structure.new do
|
|
12
12
|
# @return [String] The destination postal code. It will be null when there is no related information.
|
|
13
13
|
attribute(:destination_postal_code, String, from: "DestinationPostalCode")
|
|
@@ -19,7 +19,7 @@ module Peddler
|
|
|
19
19
|
attribute(:marketplace_id, String, null: false, from: "MarketplaceId")
|
|
20
20
|
|
|
21
21
|
# @return [Array<OrderItem>] Information about order items included in this order. For OrderItemLevel
|
|
22
|
-
#
|
|
22
|
+
# notification, one payload include one item, while for OrderLevel notification, one payload include all
|
|
23
23
|
# items.
|
|
24
24
|
attribute(:order_items, [OrderItem], null: false, from: "OrderItems")
|
|
25
25
|
|
|
@@ -29,20 +29,20 @@ module Peddler
|
|
|
29
29
|
# @return [String] The type of the order.
|
|
30
30
|
attribute(:order_type, String, null: false, from: "OrderType")
|
|
31
31
|
|
|
32
|
-
# @return [String] The purchase date of the order, in ISO-8601 date/time format. It will be null when
|
|
33
|
-
# no related information.
|
|
32
|
+
# @return [String] The purchase date of the order, presented in ISO-8601 date/time format. It will be null when
|
|
33
|
+
# there is no related information.
|
|
34
34
|
attribute(:purchase_date, String, from: "PurchaseDate")
|
|
35
35
|
|
|
36
|
-
# @return [String] The end of the time period
|
|
37
|
-
#
|
|
36
|
+
# @return [String] The end of the time period which you cancel notify for the order, presented in ISO-8601
|
|
37
|
+
# date/time format.
|
|
38
38
|
attribute?(:cancel_notify_date, String, from: "CancelNotifyDate")
|
|
39
39
|
|
|
40
|
-
# @return [String] The start of the time period
|
|
41
|
-
# date/time format. Returned only for seller-fulfilled orders.
|
|
40
|
+
# @return [String] The start of the time period within which you have committed to fulfill the order, presented
|
|
41
|
+
# in ISO-8601 date/time format. Returned only for seller-fulfilled orders.
|
|
42
42
|
attribute?(:earliest_delivery_date, String, from: "EarliestDeliveryDate")
|
|
43
43
|
|
|
44
|
-
# @return [String] The start of the time period
|
|
45
|
-
# date/time format.
|
|
44
|
+
# @return [String] The start of the time period within which you have committed to ship the order, presented in
|
|
45
|
+
# ISO-8601 date/time format.
|
|
46
46
|
attribute?(:earliest_ship_date, String, from: "EarliestShipDate")
|
|
47
47
|
|
|
48
48
|
# @return [String] The status of the Amazon Easy Ship order. This property is included only for Amazon Easy Ship
|
|
@@ -52,13 +52,13 @@ module Peddler
|
|
|
52
52
|
# @return [String] The status of the electronic invoice.
|
|
53
53
|
attribute?(:electronic_invoice_status, String, from: "ElectronicInvoiceStatus")
|
|
54
54
|
|
|
55
|
-
# @return [String] The end of the time period
|
|
56
|
-
# date/time format. Returned only for seller-fulfilled orders that do not have a PendingAvailability,
|
|
57
|
-
# or Canceled status.
|
|
55
|
+
# @return [String] The end of the time period within which you have committed to fulfill the order, presented in
|
|
56
|
+
# ISO-8601 date/time format. Returned only for seller-fulfilled orders that do not have a PendingAvailability,
|
|
57
|
+
# Pending, or Canceled status.
|
|
58
58
|
attribute?(:latest_delivery_date, String, from: "LatestDeliveryDate")
|
|
59
59
|
|
|
60
|
-
# @return [String] The end of the time period
|
|
61
|
-
# date/time format.
|
|
60
|
+
# @return [String] The end of the time period within which you have committed to ship the order, presented in
|
|
61
|
+
# ISO-8601 date/time format.
|
|
62
62
|
attribute?(:latest_ship_date, String, from: "LatestShipDate")
|
|
63
63
|
|
|
64
64
|
# @return [Integer] The number of items shipped.
|
|
@@ -67,10 +67,10 @@ module Peddler
|
|
|
67
67
|
# @return [Integer] The number of items unshipped.
|
|
68
68
|
attribute?(:number_of_items_unshipped, Integer, from: "NumberOfItemsUnshipped")
|
|
69
69
|
|
|
70
|
-
# @return [Array<String>] The order programs in which this order participates.
|
|
70
|
+
# @return [Array<String>] The order programs, if any, in which this order participates.
|
|
71
71
|
attribute?(:order_programs, [String], from: "OrderPrograms")
|
|
72
72
|
|
|
73
|
-
# @return [Array<String>] The shipping programs in which this order participates.
|
|
73
|
+
# @return [Array<String>] The shipping programs, if any, in which this order participates.
|
|
74
74
|
attribute?(:shipping_programs, [String], from: "ShippingPrograms")
|
|
75
75
|
end
|
|
76
76
|
end
|
data/lib/peddler/version.rb
CHANGED
data/sig/peddler/api.rbs
CHANGED
|
@@ -6,6 +6,8 @@ module Peddler
|
|
|
6
6
|
class MustSandbox < StandardError
|
|
7
7
|
end
|
|
8
8
|
|
|
9
|
+
TRANSIENT_STATUSES: Array[Integer]
|
|
10
|
+
|
|
9
11
|
@access_token: String
|
|
10
12
|
@endpoint: Endpoint
|
|
11
13
|
@http: HTTP::Client
|
|
@@ -21,7 +23,7 @@ module Peddler
|
|
|
21
23
|
def endpoint_uri: () -> URI::HTTPS
|
|
22
24
|
def sandbox: () -> self
|
|
23
25
|
def sandbox?: () -> bool
|
|
24
|
-
def http: (?rate_limit: Float?) -> HTTP::
|
|
26
|
+
def http: (?rate_limit: Float?) -> HTTP::Session
|
|
25
27
|
|
|
26
28
|
private
|
|
27
29
|
|