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
|
@@ -61,11 +61,9 @@ module Peddler
|
|
|
61
61
|
# @param payment_methods [Array<String>] A list of payment method values. Use this field to select orders that
|
|
62
62
|
# were paid with the specified payment methods. **Possible values**: `COD` (cash on delivery), `CVS`
|
|
63
63
|
# (convenience store), `Other` (Any payment method other than COD or CVS).
|
|
64
|
-
# @param buyer_email [String] The email address of a buyer. Used to select orders that contain the specified email
|
|
65
|
-
# address.
|
|
66
64
|
# @param seller_order_id [String] An order identifier that is specified by the seller. Used to select only the
|
|
67
65
|
# orders that match the order identifier. If `SellerOrderId` is specified, then `FulfillmentChannels`,
|
|
68
|
-
# `OrderStatuses`, `PaymentMethod`, `LastUpdatedAfter`,
|
|
66
|
+
# `OrderStatuses`, `PaymentMethod`, `LastUpdatedAfter`, and `LastUpdatedBefore` cannot be specified.
|
|
69
67
|
# @param max_results_per_page [Integer] A number that indicates the maximum number of orders that can be returned
|
|
70
68
|
# per page. Value must be 1 - 100. Default 100.
|
|
71
69
|
# @param easy_ship_shipment_statuses [Array<String>] A list of `EasyShipShipmentStatus` values. Used to select
|
|
@@ -111,7 +109,7 @@ module Peddler
|
|
|
111
109
|
# @return [Peddler::Response] The API response
|
|
112
110
|
def get_orders(marketplace_ids, created_after: nil, created_before: nil, last_updated_after: nil,
|
|
113
111
|
last_updated_before: nil, order_statuses: nil, fulfillment_channels: nil, payment_methods: nil,
|
|
114
|
-
|
|
112
|
+
seller_order_id: nil, max_results_per_page: nil, easy_ship_shipment_statuses: nil,
|
|
115
113
|
electronic_invoice_statuses: nil, next_token: nil, amazon_order_ids: nil,
|
|
116
114
|
actual_fulfillment_supply_source_id: nil, is_ispu: nil, store_chain_store_id: nil,
|
|
117
115
|
earliest_delivery_date_before: nil, earliest_delivery_date_after: nil, latest_delivery_date_before: nil,
|
|
@@ -126,7 +124,6 @@ module Peddler
|
|
|
126
124
|
"MarketplaceIds" => stringify_array(marketplace_ids),
|
|
127
125
|
"FulfillmentChannels" => stringify_array(fulfillment_channels),
|
|
128
126
|
"PaymentMethods" => stringify_array(payment_methods),
|
|
129
|
-
"BuyerEmail" => buyer_email,
|
|
130
127
|
"SellerOrderId" => seller_order_id,
|
|
131
128
|
"MaxResultsPerPage" => max_results_per_page,
|
|
132
129
|
"EasyShipShipmentStatuses" => stringify_array(easy_ship_shipment_statuses),
|
|
@@ -142,7 +139,7 @@ module Peddler
|
|
|
142
139
|
"LatestDeliveryDateAfter" => latest_delivery_date_after,
|
|
143
140
|
}.compact
|
|
144
141
|
parser = -> { GetOrdersResponse }
|
|
145
|
-
|
|
142
|
+
get(path, params:, rate_limit:, parser:)
|
|
146
143
|
end
|
|
147
144
|
|
|
148
145
|
# Returns the order that you specify.
|
|
@@ -154,7 +151,7 @@ module Peddler
|
|
|
154
151
|
def get_order(order_id, rate_limit: 0.5)
|
|
155
152
|
path = "/orders/v0/orders/#{percent_encode(order_id)}"
|
|
156
153
|
parser = -> { GetOrderResponse }
|
|
157
|
-
|
|
154
|
+
get(path, rate_limit:, parser:)
|
|
158
155
|
end
|
|
159
156
|
|
|
160
157
|
# Returns buyer information for the order that you specify.
|
|
@@ -166,7 +163,7 @@ module Peddler
|
|
|
166
163
|
def get_order_buyer_info(order_id, rate_limit: 0.5)
|
|
167
164
|
path = "/orders/v0/orders/#{percent_encode(order_id)}/buyerInfo"
|
|
168
165
|
parser = -> { GetOrderBuyerInfoResponse }
|
|
169
|
-
|
|
166
|
+
get(path, rate_limit:, parser:)
|
|
170
167
|
end
|
|
171
168
|
|
|
172
169
|
# Returns the shipping address for the order that you specify.
|
|
@@ -178,7 +175,7 @@ module Peddler
|
|
|
178
175
|
def get_order_address(order_id, rate_limit: 0.5)
|
|
179
176
|
path = "/orders/v0/orders/#{percent_encode(order_id)}/address"
|
|
180
177
|
parser = -> { GetOrderAddressResponse }
|
|
181
|
-
|
|
178
|
+
get(path, rate_limit:, parser:)
|
|
182
179
|
end
|
|
183
180
|
|
|
184
181
|
# Returns detailed order item information for the order that you specify. If `NextToken` is provided, it's used to
|
|
@@ -202,7 +199,7 @@ module Peddler
|
|
|
202
199
|
"NextToken" => next_token,
|
|
203
200
|
}.compact
|
|
204
201
|
parser = -> { GetOrderItemsResponse }
|
|
205
|
-
|
|
202
|
+
get(path, params:, rate_limit:, parser:)
|
|
206
203
|
end
|
|
207
204
|
|
|
208
205
|
# Returns buyer information for the order items in the order that you specify.
|
|
@@ -218,7 +215,7 @@ module Peddler
|
|
|
218
215
|
"NextToken" => next_token,
|
|
219
216
|
}.compact
|
|
220
217
|
parser = -> { GetOrderItemsBuyerInfoResponse }
|
|
221
|
-
|
|
218
|
+
get(path, params:, rate_limit:, parser:)
|
|
222
219
|
end
|
|
223
220
|
|
|
224
221
|
# Update the shipment status for an order that you specify.
|
|
@@ -231,7 +228,7 @@ module Peddler
|
|
|
231
228
|
def update_shipment_status(order_id, payload, rate_limit: 5.0)
|
|
232
229
|
path = "/orders/v0/orders/#{percent_encode(order_id)}/shipment"
|
|
233
230
|
body = payload
|
|
234
|
-
|
|
231
|
+
post(path, body:, rate_limit:)
|
|
235
232
|
end
|
|
236
233
|
|
|
237
234
|
# Returns regulated information for the order that you specify.
|
|
@@ -243,7 +240,7 @@ module Peddler
|
|
|
243
240
|
def get_order_regulated_info(order_id, rate_limit: 0.5)
|
|
244
241
|
path = "/orders/v0/orders/#{percent_encode(order_id)}/regulatedInfo"
|
|
245
242
|
parser = -> { GetOrderRegulatedInfoResponse }
|
|
246
|
-
|
|
243
|
+
get(path, rate_limit:, parser:)
|
|
247
244
|
end
|
|
248
245
|
|
|
249
246
|
# Updates (approves or rejects) the verification status of an order containing regulated products.
|
|
@@ -256,7 +253,7 @@ module Peddler
|
|
|
256
253
|
def update_verification_status(order_id, payload, rate_limit: 0.5)
|
|
257
254
|
path = "/orders/v0/orders/#{percent_encode(order_id)}/regulatedInfo"
|
|
258
255
|
body = payload
|
|
259
|
-
|
|
256
|
+
patch(path, body:, rate_limit:)
|
|
260
257
|
end
|
|
261
258
|
|
|
262
259
|
# Updates the shipment confirmation status for a specified order.
|
|
@@ -269,7 +266,7 @@ module Peddler
|
|
|
269
266
|
def confirm_shipment(order_id, payload, rate_limit: 2.0)
|
|
270
267
|
path = "/orders/v0/orders/#{percent_encode(order_id)}/shipmentConfirmation"
|
|
271
268
|
body = payload
|
|
272
|
-
|
|
269
|
+
post(path, body:, rate_limit:)
|
|
273
270
|
end
|
|
274
271
|
end
|
|
275
272
|
end
|
|
@@ -39,7 +39,7 @@ module Peddler
|
|
|
39
39
|
def get_my_fees_estimate_for_sku(body, seller_sku, rate_limit: 1.0)
|
|
40
40
|
path = "/products/fees/v0/listings/#{percent_encode(seller_sku)}/feesEstimate"
|
|
41
41
|
parser = -> { GetMyFeesEstimateResponse }
|
|
42
|
-
|
|
42
|
+
post(path, body:, rate_limit:, parser:)
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
# Returns the estimated fees for the item indicated by the specified ASIN in the marketplace specified in the
|
|
@@ -66,7 +66,7 @@ module Peddler
|
|
|
66
66
|
def get_my_fees_estimate_for_asin(body, asin, rate_limit: 1.0)
|
|
67
67
|
path = "/products/fees/v0/items/#{percent_encode(asin)}/feesEstimate"
|
|
68
68
|
parser = -> { GetMyFeesEstimateResponse }
|
|
69
|
-
|
|
69
|
+
post(path, body:, rate_limit:, parser:)
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
# Returns the estimated fees for a list of products.
|
|
@@ -78,7 +78,7 @@ module Peddler
|
|
|
78
78
|
def get_my_fees_estimates(body, rate_limit: 0.5)
|
|
79
79
|
path = "/products/fees/v0/feesEstimate"
|
|
80
80
|
parser = -> { GetMyFeesEstimatesResponse }
|
|
81
|
-
|
|
81
|
+
post(path, body:, rate_limit:, parser:)
|
|
82
82
|
end
|
|
83
83
|
end
|
|
84
84
|
end
|
|
@@ -31,7 +31,7 @@ module Peddler
|
|
|
31
31
|
path = "/batches/products/pricing/2022-05-01/offer/featuredOfferExpectedPrice"
|
|
32
32
|
body = get_featured_offer_expected_price_batch_request_body
|
|
33
33
|
parser = -> { GetFeaturedOfferExpectedPriceBatchResponse }
|
|
34
|
-
|
|
34
|
+
post(path, body:, rate_limit:, parser:)
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
# Returns the competitive summary response, including featured buying options for the ASIN and `marketplaceId`
|
|
@@ -45,7 +45,7 @@ module Peddler
|
|
|
45
45
|
path = "/batches/products/pricing/2022-05-01/items/competitiveSummary"
|
|
46
46
|
body = requests
|
|
47
47
|
parser = -> { CompetitiveSummaryBatchResponse }
|
|
48
|
-
|
|
48
|
+
post(path, body:, rate_limit:, parser:)
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
end
|
|
@@ -46,7 +46,7 @@ module Peddler
|
|
|
46
46
|
"OfferType" => offer_type,
|
|
47
47
|
}.compact
|
|
48
48
|
parser = -> { GetPricingResponse }
|
|
49
|
-
|
|
49
|
+
get(path, params:, rate_limit:, parser:)
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
# Returns competitive pricing information for a seller's offer listings based on seller SKU or ASIN.
|
|
@@ -80,7 +80,7 @@ module Peddler
|
|
|
80
80
|
"CustomerType" => customer_type,
|
|
81
81
|
}.compact
|
|
82
82
|
parser = -> { GetPricingResponse }
|
|
83
|
-
|
|
83
|
+
get(path, params:, rate_limit:, parser:)
|
|
84
84
|
end
|
|
85
85
|
|
|
86
86
|
# Returns the lowest priced offers for a single SKU listing.
|
|
@@ -107,7 +107,7 @@ module Peddler
|
|
|
107
107
|
"CustomerType" => customer_type,
|
|
108
108
|
}.compact
|
|
109
109
|
parser = -> { GetOffersResponse }
|
|
110
|
-
|
|
110
|
+
get(path, params:, rate_limit:, parser:)
|
|
111
111
|
end
|
|
112
112
|
|
|
113
113
|
# Returns the lowest priced offers for a single item based on ASIN.
|
|
@@ -129,7 +129,7 @@ module Peddler
|
|
|
129
129
|
"CustomerType" => customer_type,
|
|
130
130
|
}.compact
|
|
131
131
|
parser = -> { GetOffersResponse }
|
|
132
|
-
|
|
132
|
+
get(path, params:, rate_limit:, parser:)
|
|
133
133
|
end
|
|
134
134
|
|
|
135
135
|
# Returns the lowest priced offers for a batch of items based on ASIN.
|
|
@@ -142,7 +142,7 @@ module Peddler
|
|
|
142
142
|
path = "/batches/products/pricing/v0/itemOffers"
|
|
143
143
|
body = get_item_offers_batch_request_body
|
|
144
144
|
parser = -> { GetItemOffersBatchResponse }
|
|
145
|
-
|
|
145
|
+
post(path, body:, rate_limit:, parser:)
|
|
146
146
|
end
|
|
147
147
|
|
|
148
148
|
# Returns the lowest priced offers for a batch of listings by SKU.
|
|
@@ -156,7 +156,7 @@ module Peddler
|
|
|
156
156
|
path = "/batches/products/pricing/v0/listingOffers"
|
|
157
157
|
body = get_listing_offers_batch_request_body
|
|
158
158
|
parser = -> { GetListingOffersBatchResponse }
|
|
159
|
-
|
|
159
|
+
post(path, body:, rate_limit:, parser:)
|
|
160
160
|
end
|
|
161
161
|
end
|
|
162
162
|
end
|
|
@@ -41,7 +41,7 @@ module Peddler
|
|
|
41
41
|
"searchLocale" => search_locale,
|
|
42
42
|
}.compact
|
|
43
43
|
parser = -> { ProductTypeList }
|
|
44
|
-
|
|
44
|
+
get(path, params:, rate_limit:, parser:)
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
# Retrieve an Amazon product type definition.
|
|
@@ -76,7 +76,7 @@ module Peddler
|
|
|
76
76
|
"locale" => locale,
|
|
77
77
|
}.compact
|
|
78
78
|
parser = -> { ProductTypeDefinition }
|
|
79
|
-
|
|
79
|
+
get(path, params:, rate_limit:, parser:)
|
|
80
80
|
end
|
|
81
81
|
end
|
|
82
82
|
end
|
data/lib/peddler/apis/replenishment_2022_11_07/get_selling_partner_metrics_response_metric.rb
CHANGED
|
@@ -10,90 +10,134 @@ module Peddler
|
|
|
10
10
|
class Replenishment20221107
|
|
11
11
|
# An object which contains metric data for a selling partner.
|
|
12
12
|
GetSellingPartnerMetricsResponseMetric = Structure.new do
|
|
13
|
-
# @return [Float] The number of active subscriptions present at the end of the period. Applicable to
|
|
14
|
-
# timePeriodType
|
|
13
|
+
# @return [Float] The number of active subscriptions present at the end of the period. Applicable to
|
|
14
|
+
# `PERFORMANCE` `timePeriodType`.
|
|
15
15
|
attribute?(:active_subscriptions, Float, from: "activeSubscriptions")
|
|
16
16
|
|
|
17
17
|
# @return [Float] The percentage of revenue from ASINs with coupons out of total revenue from all ASINs.
|
|
18
|
-
# Applicable to PERFORMANCE timePeriodType
|
|
18
|
+
# Applicable to `PERFORMANCE` `timePeriodType`.
|
|
19
19
|
attribute?(:coupons_revenue_penetration, Float, from: "couponsRevenuePenetration")
|
|
20
20
|
|
|
21
21
|
# @return [String] The currency code in ISO 4217 format.
|
|
22
22
|
attribute?(:currency_code, String, from: "currencyCode")
|
|
23
23
|
|
|
24
|
+
# @return [Float] Revenue from one-time purchase orders placed by customers who have maintained an active
|
|
25
|
+
# subscription with your catalog for more than 12 months.
|
|
26
|
+
attribute?(:established_subscriber_life_time_value_from_otp, Float, from: "establishedSubscriberLifeTimeValueFromOTP")
|
|
27
|
+
|
|
28
|
+
# @return [Float] Revenue from Subscribe & Save orders placed by customers who have maintained an active
|
|
29
|
+
# subscription with your catalog for more than 12 months.
|
|
30
|
+
attribute?(:established_subscriber_life_time_value_from_sns, Float, from: "establishedSubscriberLifeTimeValueFromSNS")
|
|
31
|
+
|
|
32
|
+
# @return [Float] Revenue from one-time purchase orders placed by customers who started their first subscription
|
|
33
|
+
# with your catalog within the past 12 months.
|
|
34
|
+
attribute?(:growing_subscriber_life_time_value_from_otp, Float, from: "growingSubscriberLifeTimeValueFromOTP")
|
|
35
|
+
|
|
36
|
+
# @return [Float] Revenue from Subscribe & Save orders placed by customers who started their first subscription
|
|
37
|
+
# with your catalog within the past 12 months.
|
|
38
|
+
attribute?(:growing_subscriber_life_time_value_from_sns, Float, from: "growingSubscriberLifeTimeValueFromSNS")
|
|
39
|
+
|
|
24
40
|
# @return [Float] The revenue that would have been generated had there not been out of stock. Applicable to
|
|
25
|
-
# PERFORMANCE timePeriodType
|
|
41
|
+
# `PERFORMANCE` `timePeriodType`.
|
|
26
42
|
attribute?(:lost_revenue_due_to_oos, Float, from: "lostRevenueDueToOOS")
|
|
27
43
|
|
|
44
|
+
# @return [Float] Revenue from one-time purchase orders placed by customers who previously had subscriptions but
|
|
45
|
+
# currently have none active in your catalog.
|
|
46
|
+
attribute?(:lost_subscriber_life_time_value_from_otp, Float, from: "lostSubscriberLifeTimeValueFromOTP")
|
|
47
|
+
|
|
48
|
+
# @return [Float] Revenue from Subscribe & Save orders placed by customers who previously had subscriptions but
|
|
49
|
+
# currently have none active in your catalog.
|
|
50
|
+
attribute?(:lost_subscriber_life_time_value_from_sns, Float, from: "lostSubscriberLifeTimeValueFromSNS")
|
|
51
|
+
|
|
28
52
|
# @return [Float] The average reorders per non-subscriber of the program over a period of past 12 months.
|
|
29
|
-
# Applicable to PERFORMANCE timePeriodType
|
|
53
|
+
# Applicable to `PERFORMANCE` `timePeriodType`.
|
|
30
54
|
attribute?(:non_subscriber_average_reorders, Float, from: "nonSubscriberAverageReorders")
|
|
31
55
|
|
|
32
56
|
# @return [Float] The average revenue per non-subscriber of the program over a period of past 12 months for
|
|
33
|
-
# sellers and 6 months for vendors. Applicable to PERFORMANCE timePeriodType
|
|
57
|
+
# sellers and 6 months for vendors. Applicable to `PERFORMANCE` `timePeriodType`.
|
|
34
58
|
attribute?(:non_subscriber_average_revenue, Float, from: "nonSubscriberAverageRevenue")
|
|
35
59
|
|
|
60
|
+
# @return [Float] Total revenue from customers who have made purchases from your catalog but have never
|
|
61
|
+
# subscribed to any products
|
|
62
|
+
attribute?(:non_subscriber_life_time_value_from_otp, Float, from: "nonSubscriberLifeTimeValueFromOTP")
|
|
63
|
+
|
|
36
64
|
# @return [Float] The percentage of items that were not shipped out of the total shipped units over a period of
|
|
37
|
-
# time due to being out of stock. Applicable to PERFORMANCE timePeriodType
|
|
65
|
+
# time due to being out of stock. Applicable to `PERFORMANCE` `timePeriodType`.
|
|
38
66
|
attribute?(:not_delivered_due_to_oos, Float, from: "notDeliveredDueToOOS")
|
|
39
67
|
|
|
40
68
|
# @return [Float] The subscription revenue generated from active subscriptions with one delivery over the past
|
|
41
|
-
# 12 months. Applicable to PERFORMANCE timePeriodType
|
|
69
|
+
# 12 months. Applicable to `PERFORMANCE` `timePeriodType`.
|
|
42
70
|
attribute?(:revenue_from_active_subscriptions_with_single_delivery, Float, from: "revenueFromActiveSubscriptionsWithSingleDelivery")
|
|
43
71
|
|
|
44
72
|
# @return [Float] The subscription revenue generated from subscriptions which are cancelled after one delivery
|
|
45
|
-
# over the past 12 months. Applicable to PERFORMANCE timePeriodType
|
|
73
|
+
# over the past 12 months. Applicable to `PERFORMANCE` `timePeriodType`.
|
|
46
74
|
attribute?(:revenue_from_cancelled_subscriptions_after_single_delivery, Float, from: "revenueFromCancelledSubscriptionsAfterSingleDelivery")
|
|
47
75
|
|
|
48
76
|
# @return [Float] The subscription revenue generated from subscriptions with over two deliveries over the past
|
|
49
|
-
# 12 months. Applicable to PERFORMANCE timePeriodType
|
|
77
|
+
# 12 months. Applicable to `PERFORMANCE` `timePeriodType`.
|
|
50
78
|
attribute?(:revenue_from_subscriptions_with_multiple_deliveries, Float, from: "revenueFromSubscriptionsWithMultipleDeliveries")
|
|
51
79
|
|
|
52
80
|
# @return [Float] The percentage of subscription revenue generated by offers with 0% seller-funded discount over
|
|
53
|
-
# the last 12 months. Applicable to PERFORMANCE timePeriodType
|
|
81
|
+
# the last 12 months. Applicable to `PERFORMANCE` `timePeriodType`.
|
|
54
82
|
attribute?(:revenue_penetration_for0_percent_seller_funding, Float, from: "revenuePenetrationFor0PercentSellerFunding")
|
|
55
83
|
|
|
56
84
|
# @return [Float] [Applicable only for Sellers] The percentage of subscription revenue generated by offers with
|
|
57
|
-
# 10% seller-funded discount over the last 12 months. Applicable to PERFORMANCE timePeriodType
|
|
85
|
+
# 10% seller-funded discount over the last 12 months. Applicable to `PERFORMANCE` `timePeriodType`.
|
|
58
86
|
attribute?(:revenue_penetration_for10_percent_seller_funding, Float, from: "revenuePenetrationFor10PercentSellerFunding")
|
|
59
87
|
|
|
60
88
|
# @return [Float] [Applicable only for Sellers] The percentage of subscription revenue generated by offers with
|
|
61
|
-
# 5% seller-funded discount over the last 12 months. Applicable to PERFORMANCE timePeriodType
|
|
89
|
+
# 5% seller-funded discount over the last 12 months. Applicable to `PERFORMANCE` `timePeriodType`.
|
|
62
90
|
attribute?(:revenue_penetration_for5_percent_seller_funding, Float, from: "revenuePenetrationFor5PercentSellerFunding")
|
|
63
91
|
|
|
64
92
|
# @return [Float] [Applicable only for vendors] The percentage of subscription revenue generated by offers with
|
|
65
|
-
# 5% or above seller-funded discount over the last 12 months. Applicable to PERFORMANCE timePeriodType
|
|
93
|
+
# 5% or above seller-funded discount over the last 12 months. Applicable to `PERFORMANCE` `timePeriodType`.
|
|
66
94
|
attribute?(:revenue_penetration_for5_plus_percent_seller_funding, Float, from: "revenuePenetrationFor5PlusPercentSellerFunding")
|
|
67
95
|
|
|
68
|
-
# @return [Float] The percentage of new subscriptions acquired through coupons. Applicable to PERFORMANCE
|
|
69
|
-
# timePeriodType
|
|
96
|
+
# @return [Float] The percentage of new subscriptions acquired through coupons. Applicable to `PERFORMANCE`
|
|
97
|
+
# `timePeriodType`.
|
|
70
98
|
attribute?(:share_of_coupon_subscriptions, Float, from: "shareOfCouponSubscriptions")
|
|
71
99
|
|
|
72
100
|
# @return [Float] The number of units shipped to the subscribers over a period of time. Applicable for both the
|
|
73
|
-
# PERFORMANCE and FORECAST timePeriodType
|
|
101
|
+
# `PERFORMANCE` and `FORECAST` `timePeriodType`.
|
|
74
102
|
attribute?(:shipped_subscription_units, Float, from: "shippedSubscriptionUnits")
|
|
75
103
|
|
|
104
|
+
# @return [Float] Percentage of subscriptions created by offers with 0% seller-funded discount out of the total
|
|
105
|
+
# number of new orders placed over the past 12 months
|
|
106
|
+
attribute?(:signup_conversion_for0_percent_seller_funding, Float, from: "signupConversionFor0PercentSellerFunding")
|
|
107
|
+
|
|
108
|
+
# @return [Float] [Applicable only for Sellers] Percentage of subscriptions created by offers with 10%
|
|
109
|
+
# seller-funded discount out of the total number of new orders placed over the past 12 months
|
|
110
|
+
attribute?(:signup_conversion_for10_percent_seller_funding, Float, from: "signupConversionFor10PercentSellerFunding")
|
|
111
|
+
|
|
112
|
+
# @return [Float] [Applicable only for Sellers] Percentage of subscriptions created by offers with 5%
|
|
113
|
+
# seller-funded discount out of the total number of new orders placed over the past 12 months
|
|
114
|
+
attribute?(:signup_conversion_for5_percent_seller_funding, Float, from: "signupConversionFor5PercentSellerFunding")
|
|
115
|
+
|
|
116
|
+
# @return [Float] [Applicable only for Vendors] Percentage of subscriptions created by offers with 5% or above
|
|
117
|
+
# seller-funded discount out of the total number of new orders placed over the past 12 months
|
|
118
|
+
attribute?(:signup_conversion_for5_plus_percent_seller_funding, Float, from: "signupConversionFor5PlusPercentSellerFunding")
|
|
119
|
+
|
|
76
120
|
# @return [Float] The average reorders per subscriber of the program over a period of 12 months. Applicable to
|
|
77
|
-
# PERFORMANCE timePeriodType
|
|
121
|
+
# `PERFORMANCE` `timePeriodType`.
|
|
78
122
|
attribute?(:subscriber_average_reorders, Float, from: "subscriberAverageReorders")
|
|
79
123
|
|
|
80
124
|
# @return [Float] The average revenue per subscriber of the program over a period of past 12 months for sellers
|
|
81
|
-
# and 6 months for vendors. Applicable to PERFORMANCE timePeriodType
|
|
125
|
+
# and 6 months for vendors. Applicable to `PERFORMANCE` `timePeriodType`.
|
|
82
126
|
attribute?(:subscriber_average_revenue, Float, from: "subscriberAverageRevenue")
|
|
83
127
|
|
|
84
128
|
# @return [Float] The percentage of subscriptions retained after 30 days of subscription creation. Applicable to
|
|
85
|
-
# PERFORMANCE timePeriodType
|
|
129
|
+
# `PERFORMANCE` `timePeriodType`.
|
|
86
130
|
attribute?(:subscriber_retention_for30_days, Float, from: "subscriberRetentionFor30Days")
|
|
87
131
|
|
|
88
132
|
# @return [Float] The percentage of subscriptions retained after 90 days of subscription creation. Applicable to
|
|
89
|
-
# PERFORMANCE timePeriodType
|
|
133
|
+
# `PERFORMANCE` `timePeriodType`.
|
|
90
134
|
attribute?(:subscriber_retention_for90_days, Float, from: "subscriberRetentionFor90Days")
|
|
91
135
|
|
|
92
136
|
# @return [TimeInterval] A time interval used to compute metrics.
|
|
93
137
|
attribute?(:time_interval, TimeInterval, from: "timeInterval")
|
|
94
138
|
|
|
95
139
|
# @return [Float] The revenue generated from subscriptions over a period of time. Applicable for both the
|
|
96
|
-
# PERFORMANCE and FORECAST timePeriodType
|
|
140
|
+
# `PERFORMANCE` and `FORECAST` `timePeriodType`.
|
|
97
141
|
attribute?(:total_subscriptions_revenue, Float, from: "totalSubscriptionsRevenue")
|
|
98
142
|
end
|
|
99
143
|
end
|
|
@@ -10,22 +10,22 @@ module Peddler
|
|
|
10
10
|
class Replenishment20221107
|
|
11
11
|
# An object which contains offer metrics.
|
|
12
12
|
ListOfferMetricsResponseOffer = Structure.new do
|
|
13
|
-
# @return [Float] The number of active subscriptions present at the end of the period. Applicable to
|
|
14
|
-
# timePeriodType
|
|
13
|
+
# @return [Float] The number of active subscriptions present at the end of the period. Applicable to `FORECAST`
|
|
14
|
+
# `timePeriodType`.
|
|
15
15
|
attribute?(:active_subscriptions, Float, from: "activeSubscriptions")
|
|
16
16
|
|
|
17
17
|
# @return [String] The Amazon Standard Identification Number (ASIN).
|
|
18
18
|
attribute?(:asin, String)
|
|
19
19
|
|
|
20
20
|
# @return [Float] The percentage of revenue from ASINs with coupons out of total revenue from all ASINs.
|
|
21
|
-
# Applicable to
|
|
21
|
+
# Applicable to `FORECAST` `timePeriodType`.
|
|
22
22
|
attribute?(:coupons_revenue_penetration, Float, from: "couponsRevenuePenetration")
|
|
23
23
|
|
|
24
24
|
# @return [String] The currency code in ISO 4217 format.
|
|
25
25
|
attribute?(:currency_code, String, from: "currencyCode")
|
|
26
26
|
|
|
27
27
|
# @return [Float] The revenue that would have been generated had there not been out of stock. Applicable to
|
|
28
|
-
#
|
|
28
|
+
# `FORECAST` `timePeriodType`.
|
|
29
29
|
attribute?(:lost_revenue_due_to_oos, Float, from: "lostRevenueDueToOOS")
|
|
30
30
|
|
|
31
31
|
# @return [Float] The forecasted shipped subscription units for the next 30 days. Applicable to FORECAST
|
|
@@ -53,26 +53,26 @@ module Peddler
|
|
|
53
53
|
attribute?(:next90_day_total_subscriptions_revenue, Float, from: "next90DayTotalSubscriptionsRevenue")
|
|
54
54
|
|
|
55
55
|
# @return [Float] The percentage of items that were not shipped out of the total shipped units over a period of
|
|
56
|
-
# time due to being out of stock. Applicable to
|
|
56
|
+
# time due to being out of stock. Applicable to `FORECAST` `timePeriodType`.
|
|
57
57
|
attribute?(:not_delivered_due_to_oos, Float, from: "notDeliveredDueToOOS")
|
|
58
58
|
|
|
59
|
-
# @return [Float] The percentage of total program revenue out of total product revenue. Applicable to
|
|
60
|
-
#
|
|
59
|
+
# @return [Float] The percentage of total program revenue out of total product revenue. Applicable to `FORECAST`
|
|
60
|
+
# `timePeriodType`.
|
|
61
61
|
attribute?(:revenue_penetration, Float, from: "revenuePenetration")
|
|
62
62
|
|
|
63
|
-
# @return [Float] The percentage of new subscriptions acquired through coupons. Applicable to
|
|
64
|
-
# timePeriodType
|
|
63
|
+
# @return [Float] The percentage of new subscriptions acquired through coupons. Applicable to `FORECAST`
|
|
64
|
+
# `timePeriodType`.
|
|
65
65
|
attribute?(:share_of_coupon_subscriptions, Float, from: "shareOfCouponSubscriptions")
|
|
66
66
|
|
|
67
|
-
# @return [Float] The number of units shipped to the subscribers over a period of time. Applicable to
|
|
68
|
-
#
|
|
67
|
+
# @return [Float] The number of units shipped to the subscribers over a period of time. Applicable to `FORECAST`
|
|
68
|
+
# `timePeriodType`.
|
|
69
69
|
attribute?(:shipped_subscription_units, Float, from: "shippedSubscriptionUnits")
|
|
70
70
|
|
|
71
71
|
# @return [TimeInterval] A time interval used to compute metrics.
|
|
72
72
|
attribute?(:time_interval, TimeInterval, from: "timeInterval")
|
|
73
73
|
|
|
74
|
-
# @return [Float] The revenue generated from subscriptions over a period of time. Applicable to
|
|
75
|
-
# timePeriodType
|
|
74
|
+
# @return [Float] The revenue generated from subscriptions over a period of time. Applicable to `FORECAST`
|
|
75
|
+
# `timePeriodType`.
|
|
76
76
|
attribute?(:total_subscriptions_revenue, Float, from: "totalSubscriptionsRevenue")
|
|
77
77
|
end
|
|
78
78
|
end
|
|
@@ -24,7 +24,7 @@ module Peddler
|
|
|
24
24
|
def get_selling_partner_metrics(body: nil, rate_limit: 1.0)
|
|
25
25
|
path = "/replenishment/2022-11-07/sellingPartners/metrics/search"
|
|
26
26
|
parser = -> { GetSellingPartnerMetricsResponse }
|
|
27
|
-
|
|
27
|
+
post(path, body:, rate_limit:, parser:)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
# Returns aggregated replenishment program metrics for a selling partner's offers.
|
|
@@ -36,7 +36,7 @@ module Peddler
|
|
|
36
36
|
def list_offer_metrics(body: nil, rate_limit: 1.0)
|
|
37
37
|
path = "/replenishment/2022-11-07/offers/metrics/search"
|
|
38
38
|
parser = -> { ListOfferMetricsResponse }
|
|
39
|
-
|
|
39
|
+
post(path, body:, rate_limit:, parser:)
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
# Returns the details of a selling partner's replenishment program offers.
|
|
@@ -48,7 +48,7 @@ module Peddler
|
|
|
48
48
|
def list_offers(body: nil, rate_limit: 1.0)
|
|
49
49
|
path = "/replenishment/2022-11-07/offers/search"
|
|
50
50
|
parser = -> { ListOffersResponse }
|
|
51
|
-
|
|
51
|
+
post(path, body:, rate_limit:, parser:)
|
|
52
52
|
end
|
|
53
53
|
end
|
|
54
54
|
end
|
|
@@ -48,7 +48,7 @@ module Peddler
|
|
|
48
48
|
"nextToken" => next_token,
|
|
49
49
|
}.compact
|
|
50
50
|
parser = -> { GetReportsResponse }
|
|
51
|
-
|
|
51
|
+
get(path, params:, rate_limit:, parser:)
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
# Creates a report.
|
|
@@ -60,7 +60,7 @@ module Peddler
|
|
|
60
60
|
def create_report(body, rate_limit: 0.0167)
|
|
61
61
|
path = "/reports/2021-06-30/reports"
|
|
62
62
|
parser = -> { CreateReportResponse }
|
|
63
|
-
|
|
63
|
+
post(path, body:, rate_limit:, parser:)
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
# Cancels the report that you specify. Only reports with `processingStatus=IN_QUEUE` can be cancelled. Cancelled
|
|
@@ -73,7 +73,7 @@ module Peddler
|
|
|
73
73
|
# @return [Peddler::Response] The API response
|
|
74
74
|
def cancel_report(report_id, rate_limit: 0.0222)
|
|
75
75
|
path = "/reports/2021-06-30/reports/#{percent_encode(report_id)}"
|
|
76
|
-
|
|
76
|
+
delete(path, rate_limit:)
|
|
77
77
|
end
|
|
78
78
|
|
|
79
79
|
# Returns report details (including the `reportDocumentId`, if available) for the report that you specify.
|
|
@@ -86,7 +86,7 @@ module Peddler
|
|
|
86
86
|
def get_report(report_id, rate_limit: 2.0)
|
|
87
87
|
path = "/reports/2021-06-30/reports/#{percent_encode(report_id)}"
|
|
88
88
|
parser = -> { Report }
|
|
89
|
-
|
|
89
|
+
get(path, rate_limit:, parser:)
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
# Returns report schedule details that match the filters that you specify.
|
|
@@ -102,7 +102,7 @@ module Peddler
|
|
|
102
102
|
"reportTypes" => stringify_array(report_types),
|
|
103
103
|
}.compact
|
|
104
104
|
parser = -> { ReportScheduleList }
|
|
105
|
-
|
|
105
|
+
get(path, params:, rate_limit:, parser:)
|
|
106
106
|
end
|
|
107
107
|
|
|
108
108
|
# Creates a report schedule. If a report schedule with the same report type and marketplace IDs already exists, it
|
|
@@ -115,7 +115,7 @@ module Peddler
|
|
|
115
115
|
def create_report_schedule(body, rate_limit: 0.0222)
|
|
116
116
|
path = "/reports/2021-06-30/schedules"
|
|
117
117
|
parser = -> { CreateReportScheduleResponse }
|
|
118
|
-
|
|
118
|
+
post(path, body:, rate_limit:, parser:)
|
|
119
119
|
end
|
|
120
120
|
|
|
121
121
|
# Cancels the report schedule that you specify.
|
|
@@ -127,7 +127,7 @@ module Peddler
|
|
|
127
127
|
# @return [Peddler::Response] The API response
|
|
128
128
|
def cancel_report_schedule(report_schedule_id, rate_limit: 0.0222)
|
|
129
129
|
path = "/reports/2021-06-30/schedules/#{percent_encode(report_schedule_id)}"
|
|
130
|
-
|
|
130
|
+
delete(path, rate_limit:)
|
|
131
131
|
end
|
|
132
132
|
|
|
133
133
|
# Returns report schedule details for the report schedule that you specify.
|
|
@@ -140,7 +140,7 @@ module Peddler
|
|
|
140
140
|
def get_report_schedule(report_schedule_id, rate_limit: 0.0222)
|
|
141
141
|
path = "/reports/2021-06-30/schedules/#{percent_encode(report_schedule_id)}"
|
|
142
142
|
parser = -> { ReportSchedule }
|
|
143
|
-
|
|
143
|
+
get(path, rate_limit:, parser:)
|
|
144
144
|
end
|
|
145
145
|
|
|
146
146
|
# Returns the information required for retrieving a report document's contents.
|
|
@@ -152,7 +152,7 @@ module Peddler
|
|
|
152
152
|
def get_report_document(report_document_id, rate_limit: 0.0167)
|
|
153
153
|
path = "/reports/2021-06-30/documents/#{percent_encode(report_document_id)}"
|
|
154
154
|
parser = -> { ReportDocument }
|
|
155
|
-
|
|
155
|
+
get(path, rate_limit:, parser:)
|
|
156
156
|
end
|
|
157
157
|
end
|
|
158
158
|
end
|
|
@@ -7,8 +7,8 @@ require "structure"
|
|
|
7
7
|
module Peddler
|
|
8
8
|
module APIs
|
|
9
9
|
class SellerWallet20240301
|
|
10
|
-
# Details of an Amazon
|
|
11
|
-
#
|
|
10
|
+
# Details of an Amazon Seller Wallet bank account. This account is used to hold the money that a Seller Wallet
|
|
11
|
+
# customer earns by selling items.
|
|
12
12
|
BankAccount = Structure.new do
|
|
13
13
|
# @return [String] The two digit country code, in ISO 3166 format.
|
|
14
14
|
attribute(:account_country_code, String, from: "accountCountryCode")
|
|
@@ -16,36 +16,41 @@ module Peddler
|
|
|
16
16
|
# @return [String] BankAccount currency code in ISO 4217 format
|
|
17
17
|
attribute(:account_currency, String, from: "accountCurrency")
|
|
18
18
|
|
|
19
|
-
# @return [String] Format in which the Bank BankAccount is provided
|
|
20
|
-
attribute(:bank_account_number_format, String, from: "bankAccountNumberFormat")
|
|
21
|
-
|
|
22
19
|
# @return [String] Last 3 digit of the bank account number, for all Amazon Seller Wallet account the value will
|
|
23
20
|
# be three consecutive 0's
|
|
24
21
|
attribute(:bank_account_number_tail, String, from: "bankAccountNumberTail")
|
|
25
22
|
|
|
26
|
-
# @return [String] Type of the
|
|
27
|
-
#
|
|
23
|
+
# @return [String] Type of ownership of the bank account. This value is `SELF` for Amazon Seller Wallet
|
|
24
|
+
# accounts.
|
|
28
25
|
attribute(:bank_account_ownership_type, String, from: "bankAccountOwnershipType")
|
|
29
26
|
|
|
30
|
-
# @return [String]
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
# @return [String] Routing number for automated clearing house transfers, for all Amazon Seller Wallet account
|
|
34
|
-
# the value will be denoted by nine cosecutive 0's,
|
|
35
|
-
attribute(:routing_number, String, from: "routingNumber")
|
|
36
|
-
|
|
37
|
-
# @return [String] BankAccount holder's name (expected to be Amazon customer)
|
|
27
|
+
# @return [String] The bank account holder's name (expected to be an Amazon customer). There is a 50 character
|
|
28
|
+
# limit.
|
|
38
29
|
attribute?(:account_holder_name, String, from: "accountHolderName")
|
|
39
30
|
|
|
40
|
-
# @return [String] The unique identifier provided by Amazon
|
|
31
|
+
# @return [String] The unique bank account identifier provided by Amazon. To initiate a `SELF` transaction with
|
|
32
|
+
# Seller Wallet, you must choose `BANK_ACCOUNT` as the payment method type in the
|
|
33
|
+
# [getPaymentMethod](https://developer-docs.amazon.com/sp-api/reference/getpaymentmethods) request. Your
|
|
34
|
+
# Amazon Seller Wallet bank account identifier should match the `paymentMethodId` in the response. This field
|
|
35
|
+
# is required.
|
|
41
36
|
attribute?(:account_id, String, from: "accountId")
|
|
42
37
|
|
|
43
38
|
# @return [String] Bank account holder compliance status
|
|
44
39
|
attribute?(:bank_account_holder_status, String, from: "bankAccountHolderStatus")
|
|
45
40
|
|
|
46
|
-
# @return [String] The
|
|
47
|
-
#
|
|
41
|
+
# @return [String] The format in which the bank account number is provided for `THIRD_PARTY` transaction
|
|
42
|
+
# requests.
|
|
43
|
+
attribute?(:bank_account_number_format, String, from: "bankAccountNumberFormat")
|
|
44
|
+
|
|
45
|
+
# @return [String] The name of the bank. This value is Amazon Seller Wallet for Amazon Seller Wallet accounts.
|
|
48
46
|
attribute?(:bank_name, String, from: "bankName")
|
|
47
|
+
|
|
48
|
+
# @return [String] The bank number format or routing number type for `THIRD_PARTY` transaction requests.
|
|
49
|
+
attribute?(:bank_number_format, String, from: "bankNumberFormat")
|
|
50
|
+
|
|
51
|
+
# @return [String] Routing number for automated clearing house transfers for `THIRD_PARTY` transaction requests.
|
|
52
|
+
# This value is nine consecutive zeros for Amazon Seller Wallet accounts.
|
|
53
|
+
attribute?(:routing_number, String, from: "routingNumber")
|
|
49
54
|
end
|
|
50
55
|
end
|
|
51
56
|
end
|