Module: Peddler
- Defined in:
- lib/peddler/api.rb,
lib/peddler/error.rb,
lib/peddler/token.rb,
lib/peddler/version.rb,
lib/peddler/endpoint.rb,
lib/peddler/response.rb,
lib/peddler/marketplace.rb,
lib/peddler/apis/sales_v1.rb,
lib/peddler/apis/orders_v0.rb,
lib/peddler/apis/sellers_v1.rb,
lib/peddler/apis/finances_v0.rb,
lib/peddler/apis/services_v1.rb,
lib/peddler/apis/shipping_v1.rb,
lib/peddler/apis/shipping_v2.rb,
lib/peddler/apis/messaging_v1.rb,
lib/peddler/json_feed_document.rb,
lib/peddler/apis/product_fees_v0.rb,
lib/peddler/apis/catalog_items_v0.rb,
lib/peddler/apis/fba_inventory_v1.rb,
lib/peddler/apis/feeds_2021_06_30.rb,
lib/peddler/apis/notifications_v1.rb,
lib/peddler/apis/solicitations_v1.rb,
lib/peddler/apis/vendor_orders_v1.rb,
lib/peddler/apis/tokens_2021_03_01.rb,
lib/peddler/apis/product_pricing_v0.rb,
lib/peddler/apis/reports_2021_06_30.rb,
lib/peddler/apis/uploads_2020_11_01.rb,
lib/peddler/apis/vendor_invoices_v1.rb,
lib/peddler/apis/finances_2024_06_19.rb,
lib/peddler/apis/invoices_2024_06_19.rb,
lib/peddler/apis/vendor_shipments_v1.rb,
lib/peddler/helpers/feeds_2021_06_30.rb,
lib/peddler/apis/easy_ship_2022_03_23.rb,
lib/peddler/apis/data_kiosk_2023_11_15.rb,
lib/peddler/apis/shipment_invoicing_v0.rb,
lib/peddler/apis/fulfillment_inbound_v0.rb,
lib/peddler/apis/merchant_fulfillment_v0.rb,
lib/peddler/apis/aplus_content_2020_11_01.rb,
lib/peddler/apis/catalog_items_2020_12_01.rb,
lib/peddler/apis/catalog_items_2022_04_01.rb,
lib/peddler/apis/replenishment_2022_11_07.rb,
lib/peddler/apis/listings_items_2020_09_01.rb,
lib/peddler/apis/listings_items_2021_08_01.rb,
lib/peddler/apis/supply_sources_2020_07_01.rb,
lib/peddler/apis/fba_inbound_eligibility_v1.rb,
lib/peddler/apis/product_pricing_2022_05_01.rb,
lib/peddler/apis/vendor_transaction_status_v1.rb,
lib/peddler/apis/fulfillment_inbound_2024_03_20.rb,
lib/peddler/apis/fulfillment_outbound_2020_07_01.rb,
lib/peddler/apis/listings_restrictions_2021_08_01.rb,
lib/peddler/apis/application_management_2023_11_30.rb,
lib/peddler/apis/application_integrations_2024_04_01.rb,
lib/peddler/apis/product_type_definitions_2020_09_01.rb,
lib/peddler/apis/vendor_direct_fulfillment_orders_v1.rb,
lib/peddler/apis/vendor_direct_fulfillment_payments_v1.rb,
lib/peddler/apis/vendor_direct_fulfillment_shipping_v1.rb,
lib/peddler/apis/vendor_direct_fulfillment_inventory_v1.rb,
lib/peddler/apis/vendor_direct_fulfillment_transactions_v1.rb,
lib/peddler/apis/vendor_direct_fulfillment_orders_2021_12_28.rb,
lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb,
lib/peddler/apis/vendor_direct_fulfillment_transactions_2021_12_28.rb,
lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb
Defined Under Namespace
Modules: APIs, Helpers Classes: API, Error, JSONFeedDocument, Marketplace, Response, Token
Constant Summary collapse
- VERSION =
"3.0.0"
- ENDPOINTS =
{ "us-east-1" => { selling_region: "North America", host: "sellingpartnerapi-na.amazon.com", }, "us-west-2" => { selling_region: "Far East", host: "sellingpartnerapi-fe.amazon.com", }, "eu-west-1" => { selling_region: "Europe", host: "sellingpartnerapi-eu.amazon.com", }, }
- Endpoint =
Data.define(:aws_region, :selling_region, :host) do class << self # @param [String] aws_region def find(aws_region) values = ENDPOINTS.fetch(aws_region) do raise ArgumentError, "#{aws_region} not found" end new(**values, aws_region: aws_region) end def find_by_selling_region(selling_region) aws_region, values = ENDPOINTS.find { |_, v| v[:selling_region] == selling_region } || raise(ArgumentError, "#{selling_region} not found") new(**values, aws_region: aws_region) end end # @return [URI] def production URI::HTTPS.build(host: host) end # @return [URI] def sandbox URI::HTTPS.build(host: "sandbox.#{host}") end end
- MARKETPLACE_IDS =
{ "CA" => { id: "A2EUQ1WTGCTBG2", country_name: "Canada", selling_region: "North America" }, "US" => { id: "ATVPDKIKX0DER", country_name: "United States", selling_region: "North America" }, "MX" => { id: "A1AM78C64UM0Y8", country_name: "Mexico", selling_region: "North America" }, "BR" => { id: "A2Q3Y263D00KWC", country_name: "Brazil", selling_region: "North America" }, "ES" => { id: "A1RKKUPIHCS9HS", country_name: "Spain", selling_region: "Europe" }, "UK" => { id: "A1F83G8C2ARO7P", country_name: "United Kingdom", selling_region: "Europe" }, "FR" => { id: "A13V1IB3VIYZZH", country_name: "France", selling_region: "Europe" }, "BE" => { id: "AMEN7PMS3EDWL", country_name: "Belgium", selling_region: "Europe" }, "NL" => { id: "A1805IZSGTT6HS", country_name: "Netherlands", selling_region: "Europe" }, "DE" => { id: "A1PA6795UKMFR9", country_name: "Germany", selling_region: "Europe" }, "IT" => { id: "APJ6JRA9NG5V4", country_name: "Italy", selling_region: "Europe" }, "SE" => { id: "A2NODRKZP88ZB9", country_name: "Sweden", selling_region: "Europe" }, "ZA" => { id: "AE08WJ6YKNBMC", country_name: "South Africa", selling_region: "Europe" }, "PL" => { id: "A1C3SOZRARQ6R3", country_name: "Poland", selling_region: "Europe" }, "EG" => { id: "ARBP9OOSHTCHU", country_name: "Egypt", selling_region: "Europe" }, "TR" => { id: "A33AVAJ2PDY3EV", country_name: "Turkey", selling_region: "Europe" }, "SA" => { id: "A17E79C6D8DWNP", country_name: "Saudi Arabia", selling_region: "Europe" }, "AE" => { id: "A2VIGQ35RCS4UG", country_name: "United Arab Emirates", selling_region: "Europe" }, "IN" => { id: "A21TJRUUN4KGV", country_name: "India", selling_region: "Europe" }, "SG" => { id: "A19VAU5U5O7RUS", country_name: "Singapore", selling_region: "Far East" }, "AU" => { id: "A39IBJ37TRP1C6", country_name: "Australia", selling_region: "Far East" }, "JP" => { id: "A1VC38T7YXB528", country_name: "Japan", selling_region: "Far East" }, }
Class Method Summary collapse
- .amazon_warehousing_and_distribution_2024_05_09 ⇒ Object
- .aplus_content_2020_11_01 ⇒ Object
- .application_integrations_2024_04_01 ⇒ Object
- .application_management_2023_11_30 ⇒ Object
- .catalog_items_2020_12_01 ⇒ Object
- .catalog_items_2022_04_01 ⇒ Object
- .catalog_items_v0 ⇒ Object
- .data_kiosk_2023_11_15 ⇒ Object
- .easy_ship_2022_03_23 ⇒ Object
- .fba_inbound_eligibility_v1 ⇒ Object
- .fba_inventory_v1 ⇒ Object
- .feeds_2021_06_30 ⇒ Object
- .finances_2024_06_19 ⇒ Object
- .finances_v0 ⇒ Object
- .fulfillment_inbound_2024_03_20 ⇒ Object
- .fulfillment_inbound_v0 ⇒ Object
- .fulfillment_outbound_2020_07_01 ⇒ Object
- .invoices_2024_06_19 ⇒ Object
- .listings_items_2020_09_01 ⇒ Object
- .listings_items_2021_08_01 ⇒ Object
- .listings_restrictions_2021_08_01 ⇒ Object
- .merchant_fulfillment_v0 ⇒ Object
- .messaging_v1 ⇒ Object
- .notifications_v1 ⇒ Object
- .orders_v0 ⇒ Object
- .product_fees_v0 ⇒ Object
- .product_pricing_2022_05_01 ⇒ Object
- .product_pricing_v0 ⇒ Object
- .product_type_definitions_2020_09_01 ⇒ Object
- .replenishment_2022_11_07 ⇒ Object
- .reports_2021_06_30 ⇒ Object
- .sales_v1 ⇒ Object
- .sellers_v1 ⇒ Object
- .services_v1 ⇒ Object
- .shipment_invoicing_v0 ⇒ Object
- .shipping_v1 ⇒ Object
- .shipping_v2 ⇒ Object
- .solicitations_v1 ⇒ Object
- .supply_sources_2020_07_01 ⇒ Object
- .tokens_2021_03_01 ⇒ Object
- .uploads_2020_11_01 ⇒ Object
- .vendor_direct_fulfillment_inventory_v1 ⇒ Object
- .vendor_direct_fulfillment_orders_2021_12_28 ⇒ Object
- .vendor_direct_fulfillment_orders_v1 ⇒ Object
- .vendor_direct_fulfillment_payments_v1 ⇒ Object
- .vendor_direct_fulfillment_sandbox_test_data_2021_10_28 ⇒ Object
- .vendor_direct_fulfillment_shipping_2021_12_28 ⇒ Object
- .vendor_direct_fulfillment_shipping_v1 ⇒ Object
- .vendor_direct_fulfillment_transactions_2021_12_28 ⇒ Object
- .vendor_direct_fulfillment_transactions_v1 ⇒ Object
- .vendor_invoices_v1 ⇒ Object
- .vendor_orders_v1 ⇒ Object
- .vendor_shipments_v1 ⇒ Object
- .vendor_transaction_status_v1 ⇒ Object
Class Method Details
.amazon_warehousing_and_distribution_2024_05_09 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 7 def amazon_warehousing_and_distribution_2024_05_09(...) APIs::AmazonWarehousingAndDistribution20240509.new(...) end |
.aplus_content_2020_11_01 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 7 def aplus_content_2020_11_01(...) APIs::AplusContent20201101.new(...) end |
.application_integrations_2024_04_01 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/application_integrations_2024_04_01.rb', line 7 def application_integrations_2024_04_01(...) APIs::ApplicationIntegrations20240401.new(...) end |
.application_management_2023_11_30 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/application_management_2023_11_30.rb', line 7 def application_management_2023_11_30(...) APIs::ApplicationManagement20231130.new(...) end |
.catalog_items_2020_12_01 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/catalog_items_2020_12_01.rb', line 7 def catalog_items_2020_12_01(...) APIs::CatalogItems20201201.new(...) end |
.catalog_items_2022_04_01 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/catalog_items_2022_04_01.rb', line 7 def catalog_items_2022_04_01(...) APIs::CatalogItems20220401.new(...) end |
.catalog_items_v0 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/catalog_items_v0.rb', line 7 def catalog_items_v0(...) APIs::CatalogItemsV0.new(...) end |
.data_kiosk_2023_11_15 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/data_kiosk_2023_11_15.rb', line 7 def data_kiosk_2023_11_15(...) APIs::DataKiosk20231115.new(...) end |
.easy_ship_2022_03_23 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/easy_ship_2022_03_23.rb', line 7 def easy_ship_2022_03_23(...) APIs::EasyShip20220323.new(...) end |
.fba_inbound_eligibility_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/fba_inbound_eligibility_v1.rb', line 7 def fba_inbound_eligibility_v1(...) APIs::FBAInboundEligibilityV1.new(...) end |
.fba_inventory_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/fba_inventory_v1.rb', line 7 def fba_inventory_v1(...) APIs::FBAInventoryV1.new(...) end |
.feeds_2021_06_30 ⇒ Object
8 9 10 |
# File 'lib/peddler/apis/feeds_2021_06_30.rb', line 8 def feeds_2021_06_30(...) APIs::Feeds20210630.new(...) end |
.finances_2024_06_19 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/finances_2024_06_19.rb', line 7 def finances_2024_06_19(...) APIs::Finances20240619.new(...) end |
.finances_v0 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/finances_v0.rb', line 7 def finances_v0(...) APIs::FinancesV0.new(...) end |
.fulfillment_inbound_2024_03_20 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/fulfillment_inbound_2024_03_20.rb', line 7 def fulfillment_inbound_2024_03_20(...) APIs::FulfillmentInbound20240320.new(...) end |
.fulfillment_inbound_v0 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/fulfillment_inbound_v0.rb', line 7 def fulfillment_inbound_v0(...) APIs::FulfillmentInboundV0.new(...) end |
.fulfillment_outbound_2020_07_01 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/fulfillment_outbound_2020_07_01.rb', line 7 def fulfillment_outbound_2020_07_01(...) APIs::FulfillmentOutbound20200701.new(...) end |
.invoices_2024_06_19 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/invoices_2024_06_19.rb', line 7 def invoices_2024_06_19(...) APIs::Invoices20240619.new(...) end |
.listings_items_2020_09_01 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/listings_items_2020_09_01.rb', line 7 def listings_items_2020_09_01(...) APIs::ListingsItems20200901.new(...) end |
.listings_items_2021_08_01 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/listings_items_2021_08_01.rb', line 7 def listings_items_2021_08_01(...) APIs::ListingsItems20210801.new(...) end |
.listings_restrictions_2021_08_01 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/listings_restrictions_2021_08_01.rb', line 7 def listings_restrictions_2021_08_01(...) APIs::ListingsRestrictions20210801.new(...) end |
.merchant_fulfillment_v0 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/merchant_fulfillment_v0.rb', line 7 def merchant_fulfillment_v0(...) APIs::MerchantFulfillmentV0.new(...) end |
.messaging_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/messaging_v1.rb', line 7 def messaging_v1(...) APIs::MessagingV1.new(...) end |
.notifications_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/notifications_v1.rb', line 7 def notifications_v1(...) APIs::NotificationsV1.new(...) end |
.orders_v0 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/orders_v0.rb', line 7 def orders_v0(...) APIs::OrdersV0.new(...) end |
.product_fees_v0 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/product_fees_v0.rb', line 7 def product_fees_v0(...) APIs::ProductFeesV0.new(...) end |
.product_pricing_2022_05_01 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/product_pricing_2022_05_01.rb', line 7 def product_pricing_2022_05_01(...) APIs::ProductPricing20220501.new(...) end |
.product_pricing_v0 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/product_pricing_v0.rb', line 7 def product_pricing_v0(...) APIs::ProductPricingV0.new(...) end |
.product_type_definitions_2020_09_01 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/product_type_definitions_2020_09_01.rb', line 7 def product_type_definitions_2020_09_01(...) APIs::ProductTypeDefinitions20200901.new(...) end |
.replenishment_2022_11_07 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/replenishment_2022_11_07.rb', line 7 def replenishment_2022_11_07(...) APIs::Replenishment20221107.new(...) end |
.reports_2021_06_30 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/reports_2021_06_30.rb', line 7 def reports_2021_06_30(...) APIs::Reports20210630.new(...) end |
.sales_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/sales_v1.rb', line 7 def sales_v1(...) APIs::SalesV1.new(...) end |
.sellers_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/sellers_v1.rb', line 7 def sellers_v1(...) APIs::SellersV1.new(...) end |
.services_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/services_v1.rb', line 7 def services_v1(...) APIs::ServicesV1.new(...) end |
.shipment_invoicing_v0 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/shipment_invoicing_v0.rb', line 7 def shipment_invoicing_v0(...) APIs::ShipmentInvoicingV0.new(...) end |
.shipping_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/shipping_v1.rb', line 7 def shipping_v1(...) APIs::ShippingV1.new(...) end |
.shipping_v2 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/shipping_v2.rb', line 7 def shipping_v2(...) APIs::ShippingV2.new(...) end |
.solicitations_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/solicitations_v1.rb', line 7 def solicitations_v1(...) APIs::SolicitationsV1.new(...) end |
.supply_sources_2020_07_01 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/supply_sources_2020_07_01.rb', line 7 def supply_sources_2020_07_01(...) APIs::SupplySources20200701.new(...) end |
.tokens_2021_03_01 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/tokens_2021_03_01.rb', line 7 def tokens_2021_03_01(...) APIs::Tokens20210301.new(...) end |
.uploads_2020_11_01 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/uploads_2020_11_01.rb', line 7 def uploads_2020_11_01(...) APIs::Uploads20201101.new(...) end |
.vendor_direct_fulfillment_inventory_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/vendor_direct_fulfillment_inventory_v1.rb', line 7 def vendor_direct_fulfillment_inventory_v1(...) APIs::VendorDirectFulfillmentInventoryV1.new(...) end |
.vendor_direct_fulfillment_orders_2021_12_28 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/vendor_direct_fulfillment_orders_2021_12_28.rb', line 7 def vendor_direct_fulfillment_orders_2021_12_28(...) APIs::VendorDirectFulfillmentOrders20211228.new(...) end |
.vendor_direct_fulfillment_orders_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/vendor_direct_fulfillment_orders_v1.rb', line 7 def vendor_direct_fulfillment_orders_v1(...) APIs::VendorDirectFulfillmentOrdersV1.new(...) end |
.vendor_direct_fulfillment_payments_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/vendor_direct_fulfillment_payments_v1.rb', line 7 def vendor_direct_fulfillment_payments_v1(...) APIs::VendorDirectFulfillmentPaymentsV1.new(...) end |
.vendor_direct_fulfillment_sandbox_test_data_2021_10_28 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb', line 7 def vendor_direct_fulfillment_sandbox_test_data_2021_10_28(...) APIs::VendorDirectFulfillmentSandboxTestData20211028.new(...) end |
.vendor_direct_fulfillment_shipping_2021_12_28 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb', line 7 def vendor_direct_fulfillment_shipping_2021_12_28(...) APIs::VendorDirectFulfillmentShipping20211228.new(...) end |
.vendor_direct_fulfillment_shipping_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/vendor_direct_fulfillment_shipping_v1.rb', line 7 def vendor_direct_fulfillment_shipping_v1(...) APIs::VendorDirectFulfillmentShippingV1.new(...) end |
.vendor_direct_fulfillment_transactions_2021_12_28 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/vendor_direct_fulfillment_transactions_2021_12_28.rb', line 7 def vendor_direct_fulfillment_transactions_2021_12_28(...) APIs::VendorDirectFulfillmentTransactions20211228.new(...) end |
.vendor_direct_fulfillment_transactions_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/vendor_direct_fulfillment_transactions_v1.rb', line 7 def vendor_direct_fulfillment_transactions_v1(...) APIs::VendorDirectFulfillmentTransactionsV1.new(...) end |
.vendor_invoices_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/vendor_invoices_v1.rb', line 7 def vendor_invoices_v1(...) APIs::VendorInvoicesV1.new(...) end |
.vendor_orders_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/vendor_orders_v1.rb', line 7 def vendor_orders_v1(...) APIs::VendorOrdersV1.new(...) end |
.vendor_shipments_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/vendor_shipments_v1.rb', line 7 def vendor_shipments_v1(...) APIs::VendorShipmentsV1.new(...) end |
.vendor_transaction_status_v1 ⇒ Object
7 8 9 |
# File 'lib/peddler/apis/vendor_transaction_status_v1.rb', line 7 def vendor_transaction_status_v1(...) APIs::VendorTransactionStatusV1.new(...) end |