peddler 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -6
- data/lib/peddler/acronyms.rb +1 -0
- data/lib/peddler/api.rb +35 -62
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb +11 -11
- data/lib/peddler/apis/aplus_content_2020_11_01.rb +10 -10
- data/lib/peddler/apis/application_integrations_2024_04_01.rb +3 -3
- data/lib/peddler/apis/application_management_2023_11_30.rb +1 -1
- data/lib/peddler/apis/catalog_items_2020_12_01.rb +2 -2
- data/lib/peddler/apis/catalog_items_2022_04_01.rb +2 -2
- data/lib/peddler/apis/catalog_items_v0.rb +1 -1
- data/lib/peddler/apis/data_kiosk_2023_11_15.rb +5 -5
- data/lib/peddler/apis/delivery_by_amazon_2022_07_01/error.rb +23 -0
- data/lib/peddler/apis/delivery_by_amazon_2022_07_01/error_list.rb +18 -0
- data/lib/peddler/apis/delivery_by_amazon_2022_07_01/get_invoice_status_response.rb +26 -0
- data/lib/peddler/apis/delivery_by_amazon_2022_07_01/submit_invoice_request.rb +31 -0
- data/lib/peddler/apis/delivery_by_amazon_2022_07_01/submit_invoice_response.rb +17 -0
- data/lib/peddler/apis/delivery_by_amazon_2022_07_01.rb +59 -0
- data/lib/peddler/apis/easy_ship_2022_03_23.rb +5 -5
- data/lib/peddler/apis/external_fulfillment_shipments_2024_09_11/shipment.rb +3 -0
- data/lib/peddler/apis/fba_inbound_eligibility_v1.rb +1 -1
- data/lib/peddler/apis/fba_inventory_v1.rb +1 -1
- data/lib/peddler/apis/feeds_2021_06_30.rb +6 -6
- data/lib/peddler/apis/finances_2024_06_19/amazon_pay_context.rb +2 -2
- data/lib/peddler/apis/finances_2024_06_19/breakdown.rb +3 -4
- data/lib/peddler/apis/finances_2024_06_19/context.rb +11 -11
- data/lib/peddler/apis/finances_2024_06_19/contexts.rb +1 -1
- data/lib/peddler/apis/finances_2024_06_19/deferred_context.rb +1 -1
- data/lib/peddler/apis/finances_2024_06_19/error.rb +1 -1
- data/lib/peddler/apis/finances_2024_06_19/error_list.rb +1 -1
- data/lib/peddler/apis/finances_2024_06_19/item.rb +3 -3
- data/lib/peddler/apis/finances_2024_06_19/item_related_identifier.rb +1 -1
- data/lib/peddler/apis/finances_2024_06_19/item_related_identifiers.rb +1 -1
- data/lib/peddler/apis/finances_2024_06_19/items.rb +1 -1
- data/lib/peddler/apis/finances_2024_06_19/marketplace_details.rb +2 -3
- data/lib/peddler/apis/finances_2024_06_19/payments_context.rb +5 -5
- data/lib/peddler/apis/finances_2024_06_19/product_context.rb +4 -4
- data/lib/peddler/apis/finances_2024_06_19/related_identifier.rb +2 -2
- data/lib/peddler/apis/finances_2024_06_19/selling_partner_metadata.rb +3 -3
- data/lib/peddler/apis/finances_2024_06_19/time_range_context.rb +3 -3
- data/lib/peddler/apis/finances_2024_06_19/transaction.rb +8 -10
- data/lib/peddler/apis/finances_2024_06_19/transactions.rb +1 -1
- data/lib/peddler/apis/finances_2024_06_19/transactions_payload.rb +4 -2
- data/lib/peddler/apis/finances_2024_06_19.rb +24 -13
- data/lib/peddler/apis/finances_v0/adhoc_disbursement_event.rb +1 -3
- data/lib/peddler/apis/finances_v0/adjustment_event.rb +11 -18
- data/lib/peddler/apis/finances_v0/adjustment_item.rb +3 -3
- data/lib/peddler/apis/finances_v0/affordability_expense_event.rb +6 -7
- data/lib/peddler/apis/finances_v0/capacity_reservation_billing_event.rb +1 -1
- data/lib/peddler/apis/finances_v0/charge_component.rb +37 -35
- data/lib/peddler/apis/finances_v0/charge_refund_event.rb +2 -6
- data/lib/peddler/apis/finances_v0/coupon_payment_event.rb +1 -1
- data/lib/peddler/apis/finances_v0/debt_recovery_event.rb +1 -5
- data/lib/peddler/apis/finances_v0/debt_recovery_item.rb +4 -4
- data/lib/peddler/apis/finances_v0/direct_payment.rb +7 -7
- data/lib/peddler/apis/finances_v0/ebt_refund_reimbursement_only_event.rb +23 -0
- data/lib/peddler/apis/finances_v0/ebt_refund_reimbursement_only_event_list.rb +18 -0
- data/lib/peddler/apis/finances_v0/failed_adhoc_disbursement_event.rb +3 -9
- data/lib/peddler/apis/finances_v0/failed_adhoc_disbursement_event_list.rb +1 -1
- data/lib/peddler/apis/finances_v0/fba_liquidation_event.rb +1 -1
- data/lib/peddler/apis/finances_v0/financial_event_group.rb +5 -7
- data/lib/peddler/apis/finances_v0/financial_events.rb +4 -1
- data/lib/peddler/apis/finances_v0/list_financial_event_groups_payload.rb +1 -1
- data/lib/peddler/apis/finances_v0/list_financial_event_groups_response.rb +3 -3
- data/lib/peddler/apis/finances_v0/list_financial_events_payload.rb +1 -1
- data/lib/peddler/apis/finances_v0/list_financial_events_response.rb +3 -3
- data/lib/peddler/apis/finances_v0/loan_servicing_event.rb +3 -3
- data/lib/peddler/apis/finances_v0/network_commingling_transaction_event.rb +3 -3
- data/lib/peddler/apis/finances_v0/pay_with_amazon_event.rb +5 -5
- data/lib/peddler/apis/finances_v0/product_ads_payment_event.rb +4 -4
- data/lib/peddler/apis/finances_v0/removal_shipment_adjustment_event.rb +2 -2
- data/lib/peddler/apis/finances_v0/removal_shipment_adjustment_event_list.rb +1 -1
- data/lib/peddler/apis/finances_v0/removal_shipment_event.rb +2 -2
- data/lib/peddler/apis/finances_v0/removal_shipment_item.rb +5 -6
- data/lib/peddler/apis/finances_v0/removal_shipment_item_adjustment.rb +8 -9
- data/lib/peddler/apis/finances_v0/removal_shipment_item_list.rb +1 -1
- data/lib/peddler/apis/finances_v0/rental_transaction_event.rb +17 -16
- data/lib/peddler/apis/finances_v0/retrocharge_event.rb +2 -2
- data/lib/peddler/apis/finances_v0/retrocharge_event_list.rb +1 -1
- data/lib/peddler/apis/finances_v0/safet_reimbursement_event_list.rb +1 -1
- data/lib/peddler/apis/finances_v0/safet_reimbursement_item_list.rb +1 -1
- data/lib/peddler/apis/finances_v0/seller_deal_payment_event.rb +2 -2
- data/lib/peddler/apis/finances_v0/seller_review_enrollment_payment_event.rb +1 -1
- data/lib/peddler/apis/finances_v0/solution_provider_credit_event.rb +1 -1
- data/lib/peddler/apis/finances_v0/solution_provider_credit_event_list.rb +1 -1
- data/lib/peddler/apis/finances_v0/tax_withheld_component.rb +2 -3
- data/lib/peddler/apis/finances_v0/tax_withholding_event.rb +1 -1
- data/lib/peddler/apis/finances_v0/tax_withholding_event_list.rb +1 -1
- data/lib/peddler/apis/finances_v0/tax_withholding_period.rb +1 -1
- data/lib/peddler/apis/finances_v0/value_added_service_charge_event.rb +1 -3
- data/lib/peddler/apis/finances_v0.rb +60 -47
- data/lib/peddler/apis/fulfillment_inbound_2024_03_20/delivery_window_option.rb +2 -1
- data/lib/peddler/apis/fulfillment_inbound_2024_03_20/selected_delivery_window.rb +2 -1
- data/lib/peddler/apis/fulfillment_inbound_2024_03_20.rb +90 -142
- data/lib/peddler/apis/fulfillment_inbound_v0.rb +6 -6
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01.rb +14 -17
- data/lib/peddler/apis/invoices_2024_06_19.rb +7 -7
- data/lib/peddler/apis/listings_items_2020_09_01.rb +3 -3
- data/lib/peddler/apis/listings_items_2021_08_01.rb +5 -5
- data/lib/peddler/apis/listings_restrictions_2021_08_01.rb +1 -1
- data/lib/peddler/apis/merchant_fulfillment_v0.rb +5 -5
- data/lib/peddler/apis/messaging_v1.rb +11 -11
- data/lib/peddler/apis/notifications_v1.rb +8 -8
- data/lib/peddler/apis/orders_v0/buyer_info.rb +0 -3
- data/lib/peddler/apis/orders_v0/order_buyer_info.rb +0 -3
- data/lib/peddler/apis/orders_v0.rb +12 -15
- data/lib/peddler/apis/product_fees_v0.rb +3 -3
- data/lib/peddler/apis/product_pricing_2022_05_01.rb +2 -2
- data/lib/peddler/apis/product_pricing_v0.rb +6 -6
- data/lib/peddler/apis/product_type_definitions_2020_09_01.rb +2 -2
- data/lib/peddler/apis/replenishment_2022_11_07/get_selling_partner_metrics_response_metric.rb +66 -22
- data/lib/peddler/apis/replenishment_2022_11_07/list_offer_metrics_response_offer.rb +13 -13
- data/lib/peddler/apis/replenishment_2022_11_07.rb +3 -3
- data/lib/peddler/apis/reports_2021_06_30.rb +9 -9
- data/lib/peddler/apis/sales_v1.rb +1 -1
- data/lib/peddler/apis/seller_wallet_2024_03_01/bank_account.rb +23 -18
- data/lib/peddler/apis/seller_wallet_2024_03_01/payee_contact_information.rb +54 -0
- data/lib/peddler/apis/seller_wallet_2024_03_01/transaction.rb +7 -3
- data/lib/peddler/apis/seller_wallet_2024_03_01/transaction_initiation_request.rb +3 -3
- data/lib/peddler/apis/seller_wallet_2024_03_01.rb +7 -2
- data/lib/peddler/apis/sellers_v1.rb +2 -2
- data/lib/peddler/apis/services_v1.rb +17 -17
- data/lib/peddler/apis/shipment_invoicing_v0.rb +3 -3
- data/lib/peddler/apis/shipping_v1.rb +9 -9
- data/lib/peddler/apis/shipping_v2.rb +19 -19
- data/lib/peddler/apis/solicitations_v1.rb +2 -2
- data/lib/peddler/apis/tokens_2021_03_01.rb +1 -1
- data/lib/peddler/apis/transfers_2024_06_01.rb +2 -2
- data/lib/peddler/apis/uploads_2020_11_01.rb +1 -1
- data/lib/peddler/apis/vendor_direct_fulfillment_inventory_v1.rb +1 -1
- data/lib/peddler/apis/vendor_direct_fulfillment_orders_2021_12_28.rb +3 -3
- data/lib/peddler/apis/vendor_direct_fulfillment_orders_v1.rb +3 -3
- data/lib/peddler/apis/vendor_direct_fulfillment_payments_v1.rb +1 -1
- data/lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb +11 -11
- data/lib/peddler/apis/vendor_direct_fulfillment_shipping_v1.rb +9 -9
- data/lib/peddler/apis/vendor_direct_fulfillment_transactions_2021_12_28.rb +1 -1
- data/lib/peddler/apis/vendor_direct_fulfillment_transactions_v1.rb +1 -1
- data/lib/peddler/apis/vendor_invoices_v1.rb +1 -1
- data/lib/peddler/apis/vendor_orders_v1.rb +4 -4
- data/lib/peddler/apis/vendor_shipments_v1/package_item_details.rb +16 -0
- data/lib/peddler/apis/vendor_shipments_v1/regulation_references.rb +32 -0
- data/lib/peddler/apis/vendor_shipments_v1.rb +5 -5
- data/lib/peddler/apis/vendor_transaction_status_v1.rb +1 -1
- data/lib/peddler/data_kiosk/economics20240315/analytics_economics20240315.rb +5 -0
- data/lib/peddler/data_kiosk/economics20240315.json +340 -7
- data/lib/peddler/data_kiosk/vendor_analytics20240930/traffic.rb +5 -0
- data/lib/peddler/data_kiosk/vendor_analytics20240930.json +12 -0
- data/lib/peddler/response.rb +1 -1
- data/lib/peddler/version.rb +1 -1
- data/lib/peddler.rb +2 -0
- data/sig/peddler/api.rbs +13 -23
- data/sig/peddler/apis/delivery_by_amazon_2022_07_01.rbs +85 -0
- data/sig/peddler/apis/external_fulfillment_shipments_2024_09_11.rbs +8 -7
- data/sig/peddler/apis/finances_2024_06_19.rbs +1 -1
- data/sig/peddler/apis/finances_v0.rbs +30 -7
- data/sig/peddler/apis/fulfillment_inbound_2024_03_20.rbs +45 -45
- data/sig/peddler/apis/fulfillment_outbound_2020_07_01.rbs +1 -1
- data/sig/peddler/apis/orders_v0.rbs +15 -17
- data/sig/peddler/apis/replenishment_2022_11_07.rbs +18 -7
- data/sig/peddler/apis/seller_wallet_2024_03_01.rbs +49 -42
- data/sig/peddler/apis/vendor_shipments_v1.rbs +30 -41
- data/sig/peddler/data_kiosk/economics20240315.rbs +8 -7
- data/sig/peddler/data_kiosk/vendor_analytics20240930.rbs +8 -7
- data/sig/peddler.rbs +4 -0
- metadata +13 -5
- data/lib/peddler/apis/seller_wallet_2024_03_01/account_holder_address.rb +0 -36
- data/lib/peddler/apis/vendor_shipments_v1/packed_quantity.rb +0 -25
- data/lib/peddler/apis/vendor_shipments_v1/purchase_order_item_details.rb +0 -18
|
@@ -24,7 +24,7 @@ module Peddler
|
|
|
24
24
|
# @return [String] The date when the financial event was posted.
|
|
25
25
|
attribute?(:posted_date, String, from: "PostedDate")
|
|
26
26
|
|
|
27
|
-
# @return [Array<RemovalShipmentItemAdjustment>] A comma-delimited list of
|
|
27
|
+
# @return [Array<RemovalShipmentItemAdjustment>] A comma-delimited list of `RemovalShipmentItemAdjustment`
|
|
28
28
|
# details for FBA inventory.
|
|
29
29
|
attribute?(:removal_shipment_item_adjustment_list, [RemovalShipmentItemAdjustment], from: "RemovalShipmentItemAdjustmentList")
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ module Peddler
|
|
|
32
32
|
#
|
|
33
33
|
# Possible values:
|
|
34
34
|
#
|
|
35
|
-
# * WHOLESALE_LIQUIDATION
|
|
35
|
+
# * `WHOLESALE_LIQUIDATION`.
|
|
36
36
|
attribute?(:transaction_type, String, from: "TransactionType")
|
|
37
37
|
end
|
|
38
38
|
end
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
module Peddler
|
|
6
6
|
module APIs
|
|
7
7
|
class FinancesV0
|
|
8
|
-
# A comma-delimited list of
|
|
8
|
+
# A comma-delimited list of `RemovalShipmentAdjustment` details for FBA inventory.
|
|
9
9
|
class RemovalShipmentAdjustmentEventList < Array
|
|
10
10
|
class << self
|
|
11
11
|
def parse(array)
|
|
@@ -9,7 +9,7 @@ module Peddler
|
|
|
9
9
|
class FinancesV0
|
|
10
10
|
# A removal shipment event for a removal order.
|
|
11
11
|
RemovalShipmentEvent = Structure.new do
|
|
12
|
-
# @return [String] The merchant removal orderId
|
|
12
|
+
# @return [String] The merchant removal `orderId`.
|
|
13
13
|
attribute?(:merchant_order_id, String, from: "MerchantOrderId")
|
|
14
14
|
|
|
15
15
|
# @return [String] The identifier for the removal shipment order.
|
|
@@ -28,7 +28,7 @@ module Peddler
|
|
|
28
28
|
#
|
|
29
29
|
# Possible values:
|
|
30
30
|
#
|
|
31
|
-
# * WHOLESALE_LIQUIDATION
|
|
31
|
+
# * `WHOLESALE_LIQUIDATION`
|
|
32
32
|
attribute?(:transaction_type, String, from: "TransactionType")
|
|
33
33
|
end
|
|
34
34
|
end
|
|
@@ -28,19 +28,18 @@ module Peddler
|
|
|
28
28
|
# @return [Money] Tax collected on the revenue.
|
|
29
29
|
attribute?(:tax_amount, Money, from: "TaxAmount")
|
|
30
30
|
|
|
31
|
-
# @return [String] The tax collection model applied to the item.
|
|
31
|
+
# @return [String] The tax collection model that is applied to the item.
|
|
32
32
|
#
|
|
33
33
|
# Possible values:
|
|
34
34
|
#
|
|
35
|
-
# * MarketplaceFacilitator
|
|
35
|
+
# * `MarketplaceFacilitator`: Tax is withheld and remitted to the taxing authority by Amazon on behalf of the
|
|
36
36
|
# seller.
|
|
37
|
-
#
|
|
38
|
-
# * Standard - Tax is paid to the seller and not remitted to the taxing authority by Amazon.
|
|
37
|
+
# * `Standard`: Tax is paid to the seller and not remitted to the taxing authority by Amazon.
|
|
39
38
|
attribute?(:tax_collection_model, String, from: "TaxCollectionModel")
|
|
40
39
|
|
|
41
40
|
# @return [Money] The tax withheld and remitted to the taxing authority by Amazon on behalf of the seller. If
|
|
42
|
-
# TaxCollectionModel=MarketplaceFacilitator
|
|
43
|
-
# negative number). Otherwise TaxWithheld=0
|
|
41
|
+
# `TaxCollectionModel` = `MarketplaceFacilitator`, then `TaxWithheld` = `TaxAmount` (except when the
|
|
42
|
+
# `TaxWithheld` amount is a negative number). Otherwise, `TaxWithheld` = `0`.
|
|
44
43
|
attribute?(:tax_withheld, Money, from: "TaxWithheld")
|
|
45
44
|
end
|
|
46
45
|
end
|
|
@@ -9,7 +9,7 @@ module Peddler
|
|
|
9
9
|
class FinancesV0
|
|
10
10
|
# Item-level information for a removal shipment item adjustment.
|
|
11
11
|
RemovalShipmentItemAdjustment = Structure.new do
|
|
12
|
-
# @return [Integer] Adjusted quantity of
|
|
12
|
+
# @return [Integer] Adjusted quantity of `RemovalShipmentItemAdjustment` items.
|
|
13
13
|
attribute?(:adjusted_quantity, Integer, from: "AdjustedQuantity")
|
|
14
14
|
|
|
15
15
|
# @return [String] The Amazon fulfillment network SKU for the item.
|
|
@@ -21,22 +21,21 @@ module Peddler
|
|
|
21
21
|
# @return [Money] The total amount adjusted for disputed items.
|
|
22
22
|
attribute?(:revenue_adjustment, Money, from: "RevenueAdjustment")
|
|
23
23
|
|
|
24
|
-
# @return [Money] Adjustment on the
|
|
24
|
+
# @return [Money] Adjustment on the tax collected amount on the adjusted revenue.
|
|
25
25
|
attribute?(:tax_amount_adjustment, Money, from: "TaxAmountAdjustment")
|
|
26
26
|
|
|
27
|
-
# @return [String] The tax collection model applied to the item.
|
|
27
|
+
# @return [String] The tax collection model that is applied to the item.
|
|
28
28
|
#
|
|
29
29
|
# Possible values:
|
|
30
30
|
#
|
|
31
|
-
# * MarketplaceFacilitator
|
|
31
|
+
# * `MarketplaceFacilitator`: Tax is withheld and remitted to the taxing authority by Amazon on behalf of the
|
|
32
32
|
# seller.
|
|
33
|
-
#
|
|
34
|
-
# * Standard - Tax is paid to the seller and not remitted to the taxing authority by Amazon.
|
|
33
|
+
# * `Standard`: Tax is paid to the seller and not remitted to the taxing authority by Amazon.
|
|
35
34
|
attribute?(:tax_collection_model, String, from: "TaxCollectionModel")
|
|
36
35
|
|
|
37
|
-
# @return [Money] Adjustment the tax withheld and remitted to the taxing authority by Amazon on
|
|
38
|
-
# seller. If TaxCollectionModel=MarketplaceFacilitator
|
|
39
|
-
# amount is a negative number). Otherwise TaxWithheld=0
|
|
36
|
+
# @return [Money] Adjustment of the tax that is withheld and remitted to the taxing authority by Amazon on
|
|
37
|
+
# behalf of the seller. If `TaxCollectionModel` = `MarketplaceFacilitator`, then `TaxWithheld` = `TaxAmount`
|
|
38
|
+
# (except when the `TaxWithheld` amount is a negative number). Otherwise, `TaxWithheld` = `0`.
|
|
40
39
|
attribute?(:tax_withheld_adjustment, Money, from: "TaxWithheldAdjustment")
|
|
41
40
|
end
|
|
42
41
|
end
|
|
@@ -13,7 +13,7 @@ module Peddler
|
|
|
13
13
|
attribute?(:amazon_order_id, String, from: "AmazonOrderId")
|
|
14
14
|
|
|
15
15
|
# @return [Integer] The number of days that the buyer extended an already rented item. This value is only
|
|
16
|
-
# returned for RentalCustomerPayment-Extension and RentalCustomerRefund-Extension events.
|
|
16
|
+
# returned for `RentalCustomerPayment-Extension` and `RentalCustomerRefund-Extension` events.
|
|
17
17
|
attribute?(:extension_length, Integer, from: "ExtensionLength")
|
|
18
18
|
|
|
19
19
|
# @return [String] The name of the marketplace.
|
|
@@ -29,37 +29,38 @@ module Peddler
|
|
|
29
29
|
#
|
|
30
30
|
# Possible values:
|
|
31
31
|
#
|
|
32
|
-
# * RentalCustomerPayment-Buyout
|
|
33
|
-
# item.
|
|
32
|
+
# * `RentalCustomerPayment-Buyout`: A transaction type that represents when the customer wants to buy out a
|
|
33
|
+
# rented item.
|
|
34
34
|
#
|
|
35
|
-
# * RentalCustomerPayment-Extension
|
|
35
|
+
# * `RentalCustomerPayment-Extension`: A transaction type that represents when the customer wants to extend the
|
|
36
36
|
# rental period.
|
|
37
37
|
#
|
|
38
|
-
# * RentalCustomerRefund-Buyout
|
|
39
|
-
# buyout of the rented item.
|
|
38
|
+
# * `RentalCustomerRefund-Buyout`: A transaction type that represents when the customer requests a refund for
|
|
39
|
+
# the buyout of the rented item.
|
|
40
40
|
#
|
|
41
|
-
# * RentalCustomerRefund-Extension
|
|
42
|
-
# the extension on the rented item.
|
|
41
|
+
# * `RentalCustomerRefund-Extension`: A transaction type that represents when the customer requests a refund
|
|
42
|
+
# over the extension on the rented item.
|
|
43
43
|
#
|
|
44
|
-
# * RentalHandlingFee
|
|
44
|
+
# * `RentalHandlingFee`: A transaction type that represents the fee that Amazon charges sellers who rent through
|
|
45
45
|
# Amazon.
|
|
46
46
|
#
|
|
47
|
-
# * RentalChargeFailureReimbursement
|
|
48
|
-
# compensate for a failed charge.
|
|
47
|
+
# * `RentalChargeFailureReimbursement`: A transaction type that represents when Amazon sends money to the seller
|
|
48
|
+
# to compensate for a failed charge.
|
|
49
49
|
#
|
|
50
|
-
# * RentalLostItemReimbursement
|
|
50
|
+
# * `RentalLostItemReimbursement`: A transaction type that represents when Amazon sends money to the seller to
|
|
51
51
|
# compensate for a lost item.
|
|
52
52
|
attribute?(:rental_event_type, String, from: "RentalEventType")
|
|
53
53
|
|
|
54
54
|
# @return [Array<FeeComponent>] A list of fees associated with the rental event.
|
|
55
55
|
attribute?(:rental_fee_list, [FeeComponent], from: "RentalFeeList")
|
|
56
56
|
|
|
57
|
-
# @return [Money] The amount of money the customer originally paid to rent the item. This value is only
|
|
58
|
-
# for RentalChargeFailureReimbursement and RentalLostItemReimbursement events.
|
|
57
|
+
# @return [Money] The amount of money that the customer originally paid to rent the item. This value is only
|
|
58
|
+
# returned for `RentalChargeFailureReimbursement` and `RentalLostItemReimbursement` events.
|
|
59
59
|
attribute?(:rental_initial_value, Money, from: "RentalInitialValue")
|
|
60
60
|
|
|
61
|
-
# @return [Money] The amount of money Amazon sends the seller to compensate for a lost item or a failed
|
|
62
|
-
# This value is only returned for RentalChargeFailureReimbursement and RentalLostItemReimbursement
|
|
61
|
+
# @return [Money] The amount of money that Amazon sends the seller to compensate for a lost item or a failed
|
|
62
|
+
# charge. This value is only returned for `RentalChargeFailureReimbursement` and `RentalLostItemReimbursement`
|
|
63
|
+
# events.
|
|
63
64
|
attribute?(:rental_reimbursement, Money, from: "RentalReimbursement")
|
|
64
65
|
|
|
65
66
|
# @return [Array<TaxWithheldComponent>] A list of taxes withheld information for a rental item.
|
|
@@ -25,9 +25,9 @@ module Peddler
|
|
|
25
25
|
#
|
|
26
26
|
# Possible values:
|
|
27
27
|
#
|
|
28
|
-
# * Retrocharge
|
|
28
|
+
# * `Retrocharge`
|
|
29
29
|
#
|
|
30
|
-
# * RetrochargeReversal
|
|
30
|
+
# * `RetrochargeReversal`
|
|
31
31
|
attribute?(:retrocharge_event_type, String, from: "RetrochargeEventType")
|
|
32
32
|
|
|
33
33
|
# @return [Array<TaxWithheldComponent>] A list of information about taxes withheld.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
module Peddler
|
|
6
6
|
module APIs
|
|
7
7
|
class FinancesV0
|
|
8
|
-
# A list of information about Retrocharge or RetrochargeReversal events.
|
|
8
|
+
# A list of information about `Retrocharge` or `RetrochargeReversal` events.
|
|
9
9
|
class RetrochargeEventList < Array
|
|
10
10
|
class << self
|
|
11
11
|
def parse(array)
|
|
@@ -15,13 +15,13 @@ module Peddler
|
|
|
15
15
|
# @return [String] The unique identifier of the deal.
|
|
16
16
|
attribute?(:deal_id, String, from: "dealId")
|
|
17
17
|
|
|
18
|
-
# @return [String] The type of event: SellerDealComplete
|
|
18
|
+
# @return [String] The type of event: `SellerDealComplete`.
|
|
19
19
|
attribute?(:event_type, String, from: "eventType")
|
|
20
20
|
|
|
21
21
|
# @return [Money] The monetary amount of the fee.
|
|
22
22
|
attribute?(:fee_amount, Money, from: "feeAmount")
|
|
23
23
|
|
|
24
|
-
# @return [String] The type of fee: RunLightningDealFee
|
|
24
|
+
# @return [String] The type of fee: `RunLightningDealFee`.
|
|
25
25
|
attribute?(:fee_type, String, from: "feeType")
|
|
26
26
|
|
|
27
27
|
# @return [String] The date and time when the financial event was posted.
|
|
@@ -25,7 +25,7 @@ module Peddler
|
|
|
25
25
|
# @return [String] The date and time when the financial event was posted.
|
|
26
26
|
attribute?(:posted_date, String, from: "PostedDate")
|
|
27
27
|
|
|
28
|
-
# @return [Money] The FeeComponent value plus the ChargeComponent value.
|
|
28
|
+
# @return [Money] The `FeeComponent` value plus the `ChargeComponent` value.
|
|
29
29
|
attribute?(:total_amount, Money, from: "TotalAmount")
|
|
30
30
|
end
|
|
31
31
|
end
|
|
@@ -38,7 +38,7 @@ module Peddler
|
|
|
38
38
|
attribute?(:transaction_amount, Money, from: "TransactionAmount")
|
|
39
39
|
|
|
40
40
|
# @return [String] The date and time that the credit transaction was created, in [ISO
|
|
41
|
-
# 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date
|
|
41
|
+
# 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
|
|
42
42
|
attribute?(:transaction_creation_date, String, from: "TransactionCreationDate")
|
|
43
43
|
end
|
|
44
44
|
end
|
|
@@ -13,10 +13,9 @@ module Peddler
|
|
|
13
13
|
#
|
|
14
14
|
# Possible values:
|
|
15
15
|
#
|
|
16
|
-
# * MarketplaceFacilitator
|
|
16
|
+
# * `MarketplaceFacilitator`: Tax is withheld and remitted to the taxing authority by Amazon on behalf of the
|
|
17
17
|
# seller.
|
|
18
|
-
#
|
|
19
|
-
# * Standard - Tax is paid to the seller and not remitted to the taxing authority by Amazon.
|
|
18
|
+
# * `Standard`: Tax is paid to the seller and not remitted to the taxing authority by Amazon.
|
|
20
19
|
attribute?(:tax_collection_model, String, from: "TaxCollectionModel")
|
|
21
20
|
|
|
22
21
|
# @return [Array<ChargeComponent>] A list of charges that represent the types and amounts of taxes withheld.
|
|
@@ -7,7 +7,7 @@ require "structure"
|
|
|
7
7
|
module Peddler
|
|
8
8
|
module APIs
|
|
9
9
|
class FinancesV0
|
|
10
|
-
# A
|
|
10
|
+
# A tax withholding event on a seller's account.
|
|
11
11
|
TaxWithholdingEvent = Structure.new do
|
|
12
12
|
# @return [Money] The amount which tax was withheld against.
|
|
13
13
|
attribute?(:base_amount, Money, from: "BaseAmount")
|
|
@@ -7,7 +7,7 @@ require "structure"
|
|
|
7
7
|
module Peddler
|
|
8
8
|
module APIs
|
|
9
9
|
class FinancesV0
|
|
10
|
-
#
|
|
10
|
+
# The period during which tax withholding on a seller's account is calculated.
|
|
11
11
|
TaxWithholdingPeriod = Structure.new do
|
|
12
12
|
# @return [String] End of the time range.
|
|
13
13
|
attribute?(:end_date, String, from: "EndDate")
|
|
@@ -18,9 +18,7 @@ module Peddler
|
|
|
18
18
|
# @return [Money] The amount of the service charge event.
|
|
19
19
|
attribute?(:transaction_amount, Money, from: "TransactionAmount")
|
|
20
20
|
|
|
21
|
-
# @return [String]
|
|
22
|
-
#
|
|
23
|
-
# Example: 'Other Support Service fees'
|
|
21
|
+
# @return [String] The transaction type. For example, 'Other Support Service fees'
|
|
24
22
|
attribute?(:transaction_type, String, from: "TransactionType")
|
|
25
23
|
end
|
|
26
24
|
end
|
|
@@ -6,28 +6,31 @@ module Peddler
|
|
|
6
6
|
module APIs
|
|
7
7
|
# Selling Partner API for Finances
|
|
8
8
|
#
|
|
9
|
-
# The Selling Partner API for Finances
|
|
9
|
+
# The Selling Partner API for Finances provides financial information that is relevant to a seller's business. You
|
|
10
10
|
# can obtain financial events for a given order, financial event group, or date range without having to wait until a
|
|
11
11
|
# statement period closes. You can also obtain financial event groups for a given date range.
|
|
12
12
|
#
|
|
13
13
|
# @see https://github.com/amzn/selling-partner-api-models/blob/main/models/finances-api-model/financesV0.json
|
|
14
14
|
class FinancesV0 < API
|
|
15
|
-
# Returns financial event groups for a given date range.
|
|
15
|
+
# Returns financial event groups for a given date range. Orders from the last 48 hours might not be included in
|
|
16
16
|
# financial events.
|
|
17
17
|
#
|
|
18
18
|
# @note This operation can make a static sandbox call.
|
|
19
|
-
# @param max_results_per_page [Integer] The maximum number of results
|
|
20
|
-
#
|
|
21
|
-
# @param financial_event_group_started_before [String] A date
|
|
22
|
-
#
|
|
23
|
-
# 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. The date-time must be
|
|
24
|
-
# FinancialEventGroupStartedAfter and
|
|
25
|
-
# FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no
|
|
19
|
+
# @param max_results_per_page [Integer] The maximum number of results per page. If the response exceeds the
|
|
20
|
+
# maximum number of transactions or 10 MB, the response is `InvalidInput`.
|
|
21
|
+
# @param financial_event_group_started_before [String] A date that selects financial event groups that opened
|
|
22
|
+
# before (but not at) a specified date and time, in [ISO
|
|
23
|
+
# 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. The date-time must be after
|
|
24
|
+
# `FinancialEventGroupStartedAfter` and more than two minutes before the time of request. If
|
|
25
|
+
# `FinancialEventGroupStartedAfter` and `FinancialEventGroupStartedBefore` are more than 180 days apart, no
|
|
26
26
|
# financial event groups are returned.
|
|
27
|
-
# @param financial_event_group_started_after [String] A date
|
|
28
|
-
#
|
|
29
|
-
# format. The date-time must be
|
|
30
|
-
# @param next_token [String]
|
|
27
|
+
# @param financial_event_group_started_after [String] A date that selects financial event groups that opened after
|
|
28
|
+
# (or at) a specified date and time, in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601)
|
|
29
|
+
# format. The date-time must be more than two minutes before you submit the request.
|
|
30
|
+
# @param next_token [String] The response includes `nextToken` when the number of results exceeds the specified
|
|
31
|
+
# `pageSize` value. To get the next page of results, call the operation with this token and include the same
|
|
32
|
+
# arguments as the call that produced the token. To get a complete list, call this operation until `nextToken`
|
|
33
|
+
# is null. Note that this operation can return empty pages.
|
|
31
34
|
# @param rate_limit [Float] Requests per second
|
|
32
35
|
# @return [Peddler::Response] The API response
|
|
33
36
|
def list_financial_event_groups(max_results_per_page: 10, financial_event_group_started_before: nil,
|
|
@@ -40,29 +43,32 @@ module Peddler
|
|
|
40
43
|
"NextToken" => next_token,
|
|
41
44
|
}.compact
|
|
42
45
|
parser = -> { ListFinancialEventGroupsResponse }
|
|
43
|
-
|
|
46
|
+
get(path, params:, rate_limit:, parser:)
|
|
44
47
|
end
|
|
45
48
|
|
|
46
|
-
# Returns all financial events for the specified financial event group.
|
|
47
|
-
#
|
|
49
|
+
# Returns all financial events for the specified financial event group. Orders from the last 48 hours might not be
|
|
50
|
+
# included in financial events.
|
|
48
51
|
#
|
|
49
|
-
# **Note:** This operation
|
|
50
|
-
#
|
|
52
|
+
# **Note:** This operation only retrieves a group's data for the past two years. A request for data spanning more
|
|
53
|
+
# than two years produces an empty response.
|
|
51
54
|
#
|
|
52
55
|
# @note This operation can make a static sandbox call.
|
|
53
56
|
# @param max_results_per_page [Integer] The maximum number of results to return per page. If the response exceeds
|
|
54
|
-
# the maximum number of transactions or 10 MB, the
|
|
55
|
-
# @param posted_after [String]
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
# @param posted_before [String]
|
|
59
|
-
#
|
|
60
|
-
#
|
|
61
|
-
# `PostedAfter` and `PostedBefore` are more than 180 days apart,
|
|
62
|
-
#
|
|
63
|
-
# minutes.
|
|
57
|
+
# the maximum number of transactions or 10 MB, the response is `InvalidInput`.
|
|
58
|
+
# @param posted_after [String] The response includes financial events posted after (or on) this date. This date
|
|
59
|
+
# must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time
|
|
60
|
+
# must be more than two minutes before the time of the request.
|
|
61
|
+
# @param posted_before [String] The response includes financial events posted before (but not on) this date. This
|
|
62
|
+
# date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The
|
|
63
|
+
# date-time must be later than `PostedAfter` and more than two minutes before the request was submitted. If
|
|
64
|
+
# `PostedAfter` and `PostedBefore` are more than 180 days apart, the response is empty. If you include the
|
|
65
|
+
# `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two
|
|
66
|
+
# minutes before the time of the request.
|
|
64
67
|
# @param event_group_id [String] The identifier of the financial event group to which the events belong.
|
|
65
|
-
# @param next_token [String]
|
|
68
|
+
# @param next_token [String] The response includes `nextToken` when the number of results exceeds the specified
|
|
69
|
+
# `pageSize` value. To get the next page of results, call the operation with this token and include the same
|
|
70
|
+
# arguments as the call that produced the token. To get a complete list, call this operation until `nextToken`
|
|
71
|
+
# is null. Note that this operation can return empty pages.
|
|
66
72
|
# @param rate_limit [Float] Requests per second
|
|
67
73
|
# @return [Peddler::Response] The API response
|
|
68
74
|
def list_financial_events_by_group_id(event_group_id, max_results_per_page: 100, posted_after: nil,
|
|
@@ -75,17 +81,20 @@ module Peddler
|
|
|
75
81
|
"NextToken" => next_token,
|
|
76
82
|
}.compact
|
|
77
83
|
parser = -> { ListFinancialEventsResponse }
|
|
78
|
-
|
|
84
|
+
get(path, params:, rate_limit:, parser:)
|
|
79
85
|
end
|
|
80
86
|
|
|
81
|
-
# Returns all financial events for the specified order.
|
|
87
|
+
# Returns all financial events for the specified order. Orders from the last 48 hours might not be included in
|
|
82
88
|
# financial events.
|
|
83
89
|
#
|
|
84
90
|
# @note This operation can make a static sandbox call.
|
|
85
91
|
# @param order_id [String] An Amazon-defined order identifier, in 3-7-7 format.
|
|
86
92
|
# @param max_results_per_page [Integer] The maximum number of results to return per page. If the response exceeds
|
|
87
|
-
# the maximum number of transactions or 10 MB, the
|
|
88
|
-
# @param next_token [String]
|
|
93
|
+
# the maximum number of transactions or 10 MB, the response is `InvalidInput`.
|
|
94
|
+
# @param next_token [String] The response includes `nextToken` when the number of results exceeds the specified
|
|
95
|
+
# `pageSize` value. To get the next page of results, call the operation with this token and include the same
|
|
96
|
+
# arguments as the call that produced the token. To get a complete list, call this operation until `nextToken`
|
|
97
|
+
# is null. Note that this operation can return empty pages.
|
|
89
98
|
# @param rate_limit [Float] Requests per second
|
|
90
99
|
# @return [Peddler::Response] The API response
|
|
91
100
|
def list_financial_events_by_order_id(order_id, max_results_per_page: 100, next_token: nil, rate_limit: 0.5)
|
|
@@ -95,26 +104,30 @@ module Peddler
|
|
|
95
104
|
"NextToken" => next_token,
|
|
96
105
|
}.compact
|
|
97
106
|
parser = -> { ListFinancialEventsResponse }
|
|
98
|
-
|
|
107
|
+
get(path, params:, rate_limit:, parser:)
|
|
99
108
|
end
|
|
100
109
|
|
|
101
|
-
# Returns financial events for the specified data range.
|
|
110
|
+
# Returns financial events for the specified data range. Orders from the last 48 hours might not be included in
|
|
102
111
|
# financial events.
|
|
103
112
|
#
|
|
104
|
-
# **Note:** in `ListFinancialEvents`, deferred events don't show up in responses until
|
|
113
|
+
# **Note:** in `ListFinancialEvents`, deferred events don't show up in responses until they are released.
|
|
105
114
|
#
|
|
106
115
|
# @note This operation can make a static sandbox call.
|
|
107
116
|
# @param max_results_per_page [Integer] The maximum number of results to return per page. If the response exceeds
|
|
108
|
-
# the maximum number of transactions or 10 MB, the
|
|
109
|
-
# @param posted_after [String]
|
|
110
|
-
#
|
|
111
|
-
#
|
|
112
|
-
# @param posted_before [String]
|
|
113
|
-
#
|
|
114
|
-
#
|
|
115
|
-
# PostedAfter and PostedBefore are more than 180 days apart,
|
|
116
|
-
#
|
|
117
|
-
#
|
|
117
|
+
# the maximum number of transactions or 10 MB, the response is `InvalidInput`.
|
|
118
|
+
# @param posted_after [String] The response includes financial events posted after (or on) this date. This date
|
|
119
|
+
# must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time
|
|
120
|
+
# must be more than two minutes before the time of the request.
|
|
121
|
+
# @param posted_before [String] The response includes financial events posted before (but not on) this date. This
|
|
122
|
+
# date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The
|
|
123
|
+
# date-time must be later than `PostedAfter` and more than two minutes before the request was submitted. If
|
|
124
|
+
# `PostedAfter` and `PostedBefore` are more than 180 days apart, the response is empty. If you include the
|
|
125
|
+
# `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two
|
|
126
|
+
# minutes before the time of the request.
|
|
127
|
+
# @param next_token [String] The response includes `nextToken` when the number of results exceeds the specified
|
|
128
|
+
# `pageSize` value. To get the next page of results, call the operation with this token and include the same
|
|
129
|
+
# arguments as the call that produced the token. To get a complete list, call this operation until `nextToken`
|
|
130
|
+
# is null. Note that this operation can return empty pages.
|
|
118
131
|
# @param rate_limit [Float] Requests per second
|
|
119
132
|
# @return [Peddler::Response] The API response
|
|
120
133
|
def list_financial_events(max_results_per_page: 100, posted_after: nil, posted_before: nil, next_token: nil,
|
|
@@ -127,7 +140,7 @@ module Peddler
|
|
|
127
140
|
"NextToken" => next_token,
|
|
128
141
|
}.compact
|
|
129
142
|
parser = -> { ListFinancialEventsResponse }
|
|
130
|
-
|
|
143
|
+
get(path, params:, rate_limit:, parser:)
|
|
131
144
|
end
|
|
132
145
|
end
|
|
133
146
|
end
|
|
@@ -10,7 +10,8 @@ module Peddler
|
|
|
10
10
|
class FulfillmentInbound20240320
|
|
11
11
|
# Contains information pertaining to a delivery window option.
|
|
12
12
|
DeliveryWindowOption = Structure.new do
|
|
13
|
-
# @return [String]
|
|
13
|
+
# @return [String] The type of delivery window availability. Values: `AVAILABLE`, `BLOCKED`, `CONGESTED`,
|
|
14
|
+
# `DISCOUNTED`
|
|
14
15
|
attribute(:availability_type, String, from: "availabilityType")
|
|
15
16
|
|
|
16
17
|
# @return [String] Identifier of a delivery window option. A delivery window option represent one option for
|
|
@@ -10,7 +10,8 @@ module Peddler
|
|
|
10
10
|
class FulfillmentInbound20240320
|
|
11
11
|
# Selected delivery window attributes.
|
|
12
12
|
SelectedDeliveryWindow = Structure.new do
|
|
13
|
-
# @return [String]
|
|
13
|
+
# @return [String] The type of delivery window availability. Values: `AVAILABLE`, `BLOCKED`, `CONGESTED`,
|
|
14
|
+
# `DISCOUNTED`
|
|
14
15
|
attribute(:availability_type, String, from: "availabilityType")
|
|
15
16
|
|
|
16
17
|
# @return [String] Identifier of a delivery window option. A delivery window option represent one option for
|