diff --git a/lib/peddler.rb b/lib/peddler.rb index b2b01e5f..e211e34e 100644 --- a/lib/peddler.rb +++ b/lib/peddler.rb @@ -53,19 +53,3 @@ require "peddler/api/vendor_transaction_status_v1" require "peddler/marketplace" require "peddler/token" - -module Peddler - class << self - # Define convenience methods for instantiating the API classes - Peddler::API.constants.each do |const_name| - method_name = const_name.to_s - .gsub("FBA", "Fba") - .gsub(/([a-z\d])([A-Z])/, '\1_\2') - .gsub(/(\d{4})(\d{2})(\d{2})/, '_\1_\2_\3') - .downcase - define_method(method_name) do |*args| - Peddler::API.const_get(const_name).new(*args) - end - end - end -end diff --git a/lib/peddler/api/amazon_warehousing_and_distribution_2024_05_09.rb b/lib/peddler/api/amazon_warehousing_and_distribution_2024_05_09.rb index 85658576..0f21d5d4 100644 --- a/lib/peddler/api/amazon_warehousing_and_distribution_2024_05_09.rb +++ b/lib/peddler/api/amazon_warehousing_and_distribution_2024_05_09.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def amazon_warehousing_and_distribution_2024_05_09(...) + API::AmazonWarehousingAndDistribution20240509.new(...) + end + end + class API # The Selling Partner API for Amazon Warehousing and Distribution # diff --git a/lib/peddler/api/aplus_content_2020_11_01.rb b/lib/peddler/api/aplus_content_2020_11_01.rb index 98af2f76..4ca44ff6 100644 --- a/lib/peddler/api/aplus_content_2020_11_01.rb +++ b/lib/peddler/api/aplus_content_2020_11_01.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def aplus_content_2020_11_01(...) + API::AplusContent20201101.new(...) + end + end + class API # Selling Partner API for A+ Content Management # diff --git a/lib/peddler/api/application_management_2023_11_30.rb b/lib/peddler/api/application_management_2023_11_30.rb index a4e3124b..bfab389d 100644 --- a/lib/peddler/api/application_management_2023_11_30.rb +++ b/lib/peddler/api/application_management_2023_11_30.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def application_management_2023_11_30(...) + API::ApplicationManagement20231130.new(...) + end + end + class API # Selling Partner API for Application Management # diff --git a/lib/peddler/api/catalog_items_2020_12_01.rb b/lib/peddler/api/catalog_items_2020_12_01.rb index 1b7cb509..c0ed5220 100644 --- a/lib/peddler/api/catalog_items_2020_12_01.rb +++ b/lib/peddler/api/catalog_items_2020_12_01.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def catalog_items_2020_12_01(...) + API::CatalogItems20201201.new(...) + end + end + class API # Selling Partner API for Catalog Items # diff --git a/lib/peddler/api/catalog_items_2022_04_01.rb b/lib/peddler/api/catalog_items_2022_04_01.rb index 8b9a3dba..3eb3b9b5 100644 --- a/lib/peddler/api/catalog_items_2022_04_01.rb +++ b/lib/peddler/api/catalog_items_2022_04_01.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def catalog_items_2022_04_01(...) + API::CatalogItems20220401.new(...) + end + end + class API # Selling Partner API for Catalog Items # @@ -37,11 +43,9 @@ class CatalogItems20220401 < API # the primary locale of the marketplace. **Note:** Cannot be used with `identifiers`. # @param [Float] rate_limit Requests per second # @return [Hash] The API response - def search_catalog_items( - marketplace_ids, identifiers: nil, identifiers_type: nil, included_data: ["summaries"], locale: nil, - seller_id: nil, keywords: nil, brand_names: nil, classification_ids: nil, page_size: 10, page_token: nil, - keywords_locale: nil, rate_limit: 2.0 - ) + def search_catalog_items(marketplace_ids, identifiers: nil, identifiers_type: nil, included_data: ["summaries"], + locale: nil, seller_id: nil, keywords: nil, brand_names: nil, classification_ids: nil, page_size: 10, + page_token: nil, keywords_locale: nil, rate_limit: 2.0) path = "/catalog/2022-04-01/items" params = { diff --git a/lib/peddler/api/catalog_items_v0.rb b/lib/peddler/api/catalog_items_v0.rb index 4141d8e7..9cb8b29a 100644 --- a/lib/peddler/api/catalog_items_v0.rb +++ b/lib/peddler/api/catalog_items_v0.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def catalog_items_v0(...) + API::CatalogItemsV0.new(...) + end + end + class API # Selling Partner API for Catalog Items # diff --git a/lib/peddler/api/data_kiosk_2023_11_15.rb b/lib/peddler/api/data_kiosk_2023_11_15.rb index ac1a909a..d339b338 100644 --- a/lib/peddler/api/data_kiosk_2023_11_15.rb +++ b/lib/peddler/api/data_kiosk_2023_11_15.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def data_kiosk_2023_11_15(...) + API::DataKiosk20231115.new(...) + end + end + class API # Selling Partner API for Data Kiosk # diff --git a/lib/peddler/api/easy_ship_2022_03_23.rb b/lib/peddler/api/easy_ship_2022_03_23.rb index 7c900f6a..726957d4 100644 --- a/lib/peddler/api/easy_ship_2022_03_23.rb +++ b/lib/peddler/api/easy_ship_2022_03_23.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def easy_ship_2022_03_23(...) + API::EasyShip20220323.new(...) + end + end + class API # Selling Partner API for Easy Ship # diff --git a/lib/peddler/api/fba_inbound_eligibility_v1.rb b/lib/peddler/api/fba_inbound_eligibility_v1.rb index e29c8025..068caca4 100644 --- a/lib/peddler/api/fba_inbound_eligibility_v1.rb +++ b/lib/peddler/api/fba_inbound_eligibility_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def fba_inbound_eligibility_v1(...) + API::FBAInboundEligibilityV1.new(...) + end + end + class API # Selling Partner API for FBA Inbound Eligibilty # diff --git a/lib/peddler/api/fba_inventory_v1.rb b/lib/peddler/api/fba_inventory_v1.rb index af150806..f50c3820 100644 --- a/lib/peddler/api/fba_inventory_v1.rb +++ b/lib/peddler/api/fba_inventory_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def fba_inventory_v1(...) + API::FBAInventoryV1.new(...) + end + end + class API # Selling Partner API for FBA Inventory # diff --git a/lib/peddler/api/feeds_2021_06_30.rb b/lib/peddler/api/feeds_2021_06_30.rb index 05c88e6b..aea07f9c 100644 --- a/lib/peddler/api/feeds_2021_06_30.rb +++ b/lib/peddler/api/feeds_2021_06_30.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def feeds_2021_06_30(...) + API::Feeds20210630.new(...) + end + end + class API # Selling Partner API for Feeds # diff --git a/lib/peddler/api/finances_v0.rb b/lib/peddler/api/finances_v0.rb index ce5b4bc0..387b0561 100644 --- a/lib/peddler/api/finances_v0.rb +++ b/lib/peddler/api/finances_v0.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def finances_v0(...) + API::FinancesV0.new(...) + end + end + class API # Selling Partner API for Finances # diff --git a/lib/peddler/api/fulfillment_inbound_2024_03_20.rb b/lib/peddler/api/fulfillment_inbound_2024_03_20.rb index c420b736..8131ed25 100644 --- a/lib/peddler/api/fulfillment_inbound_2024_03_20.rb +++ b/lib/peddler/api/fulfillment_inbound_2024_03_20.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def fulfillment_inbound_2024_03_20(...) + API::FulfillmentInbound20240320.new(...) + end + end + class API # The Selling Partner API for FBA inbound operations. # @@ -658,8 +664,8 @@ def update_shipment_tracking_details(inbound_plan_id, shipment_id, body, rate_li # `shipmentId` must be specified. # @param [Float] rate_limit Requests per second # @return [Hash] The API response - def list_transportation_options(inbound_plan_id, page_size: 10, pagination_token: nil, - placement_option_id: nil, shipment_id: nil, rate_limit: 2.0) + def list_transportation_options(inbound_plan_id, page_size: 10, pagination_token: nil, placement_option_id: nil, + shipment_id: nil, rate_limit: 2.0) path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/transportationOptions" params = { diff --git a/lib/peddler/api/fulfillment_inbound_v0.rb b/lib/peddler/api/fulfillment_inbound_v0.rb index 52b55b87..93e562a7 100644 --- a/lib/peddler/api/fulfillment_inbound_v0.rb +++ b/lib/peddler/api/fulfillment_inbound_v0.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def fulfillment_inbound_v0(...) + API::FulfillmentInboundV0.new(...) + end + end + class API # Selling Partner API for Fulfillment Inbound # diff --git a/lib/peddler/api/fulfillment_outbound_2020_07_01.rb b/lib/peddler/api/fulfillment_outbound_2020_07_01.rb index da842381..6b7a50d5 100644 --- a/lib/peddler/api/fulfillment_outbound_2020_07_01.rb +++ b/lib/peddler/api/fulfillment_outbound_2020_07_01.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def fulfillment_outbound_2020_07_01(...) + API::FulfillmentOutbound20200701.new(...) + end + end + class API # Selling Partner APIs for Fulfillment Outbound # diff --git a/lib/peddler/api/listings_items_2020_09_01.rb b/lib/peddler/api/listings_items_2020_09_01.rb index 5a544fc3..34548d64 100644 --- a/lib/peddler/api/listings_items_2020_09_01.rb +++ b/lib/peddler/api/listings_items_2020_09_01.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def listings_items_2020_09_01(...) + API::ListingsItems20200901.new(...) + end + end + class API # Selling Partner API for Listings Items # diff --git a/lib/peddler/api/listings_items_2021_08_01.rb b/lib/peddler/api/listings_items_2021_08_01.rb index 5cac4ed7..b071bbfa 100644 --- a/lib/peddler/api/listings_items_2021_08_01.rb +++ b/lib/peddler/api/listings_items_2021_08_01.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def listings_items_2021_08_01(...) + API::ListingsItems20210801.new(...) + end + end + class API # Selling Partner API for Listings Items # diff --git a/lib/peddler/api/listings_restrictions_2021_08_01.rb b/lib/peddler/api/listings_restrictions_2021_08_01.rb index 2d6dac76..a566873b 100644 --- a/lib/peddler/api/listings_restrictions_2021_08_01.rb +++ b/lib/peddler/api/listings_restrictions_2021_08_01.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def listings_restrictions_2021_08_01(...) + API::ListingsRestrictions20210801.new(...) + end + end + class API # Selling Partner API for Listings Restrictions # diff --git a/lib/peddler/api/merchant_fulfillment_v0.rb b/lib/peddler/api/merchant_fulfillment_v0.rb index b3f0896f..101ad582 100644 --- a/lib/peddler/api/merchant_fulfillment_v0.rb +++ b/lib/peddler/api/merchant_fulfillment_v0.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def merchant_fulfillment_v0(...) + API::MerchantFulfillmentV0.new(...) + end + end + class API # Selling Partner API for Merchant Fulfillment # diff --git a/lib/peddler/api/messaging_v1.rb b/lib/peddler/api/messaging_v1.rb index dcf19537..2304cf5d 100644 --- a/lib/peddler/api/messaging_v1.rb +++ b/lib/peddler/api/messaging_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def messaging_v1(...) + API::MessagingV1.new(...) + end + end + class API # Selling Partner API for Messaging # diff --git a/lib/peddler/api/notifications_v1.rb b/lib/peddler/api/notifications_v1.rb index fe458a90..81c3d249 100644 --- a/lib/peddler/api/notifications_v1.rb +++ b/lib/peddler/api/notifications_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def notifications_v1(...) + API::NotificationsV1.new(...) + end + end + class API # Selling Partner API for Notifications # diff --git a/lib/peddler/api/orders_v0.rb b/lib/peddler/api/orders_v0.rb index f140ff77..9320be12 100644 --- a/lib/peddler/api/orders_v0.rb +++ b/lib/peddler/api/orders_v0.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def orders_v0(...) + API::OrdersV0.new(...) + end + end + class API # Selling Partner API for Orders # @@ -105,14 +111,13 @@ class OrdersV0 < API # format. # @param [Float] rate_limit Requests per second # @return [Hash] The API response - def get_orders( - marketplace_ids, created_after: nil, created_before: nil, last_updated_after: nil, last_updated_before: nil, - order_statuses: nil, fulfillment_channels: nil, payment_methods: nil, buyer_email: nil, seller_order_id: nil, - max_results_per_page: nil, easy_ship_shipment_statuses: nil, electronic_invoice_statuses: nil, next_token: nil, - amazon_order_ids: nil, actual_fulfillment_supply_source_id: nil, is_ispu: nil, store_chain_store_id: nil, + def get_orders(marketplace_ids, created_after: nil, created_before: nil, last_updated_after: nil, + last_updated_before: nil, order_statuses: nil, fulfillment_channels: nil, payment_methods: nil, + buyer_email: nil, seller_order_id: nil, max_results_per_page: nil, easy_ship_shipment_statuses: nil, + electronic_invoice_statuses: nil, next_token: nil, amazon_order_ids: nil, + actual_fulfillment_supply_source_id: nil, is_ispu: nil, store_chain_store_id: nil, earliest_delivery_date_before: nil, earliest_delivery_date_after: nil, latest_delivery_date_before: nil, - latest_delivery_date_after: nil, rate_limit: 0.0167 - ) + latest_delivery_date_after: nil, rate_limit: 0.0167) path = "/orders/v0/orders" params = { diff --git a/lib/peddler/api/product_fees_v0.rb b/lib/peddler/api/product_fees_v0.rb index c716237d..247daa1a 100644 --- a/lib/peddler/api/product_fees_v0.rb +++ b/lib/peddler/api/product_fees_v0.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def product_fees_v0(...) + API::ProductFeesV0.new(...) + end + end + class API # Selling Partner API for Product Fees # diff --git a/lib/peddler/api/product_pricing_2022_05_01.rb b/lib/peddler/api/product_pricing_2022_05_01.rb index 29645ea6..85f18c27 100644 --- a/lib/peddler/api/product_pricing_2022_05_01.rb +++ b/lib/peddler/api/product_pricing_2022_05_01.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def product_pricing_2022_05_01(...) + API::ProductPricing20220501.new(...) + end + end + class API # Selling Partner API for Pricing # diff --git a/lib/peddler/api/product_pricing_v0.rb b/lib/peddler/api/product_pricing_v0.rb index 216c4eb4..0fa3abd7 100644 --- a/lib/peddler/api/product_pricing_v0.rb +++ b/lib/peddler/api/product_pricing_v0.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def product_pricing_v0(...) + API::ProductPricingV0.new(...) + end + end + class API # Selling Partner API for Pricing # diff --git a/lib/peddler/api/product_type_definitions_2020_09_01.rb b/lib/peddler/api/product_type_definitions_2020_09_01.rb index e4972021..0d194615 100644 --- a/lib/peddler/api/product_type_definitions_2020_09_01.rb +++ b/lib/peddler/api/product_type_definitions_2020_09_01.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def product_type_definitions_2020_09_01(...) + API::ProductTypeDefinitions20200901.new(...) + end + end + class API # Selling Partner API for Product Type Definitions # diff --git a/lib/peddler/api/replenishment_2022_11_07.rb b/lib/peddler/api/replenishment_2022_11_07.rb index 11805cc9..1a8872d7 100644 --- a/lib/peddler/api/replenishment_2022_11_07.rb +++ b/lib/peddler/api/replenishment_2022_11_07.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def replenishment_2022_11_07(...) + API::Replenishment20221107.new(...) + end + end + class API # Selling Partner API for Replenishment # diff --git a/lib/peddler/api/reports_2021_06_30.rb b/lib/peddler/api/reports_2021_06_30.rb index 14aaf4de..66539c42 100644 --- a/lib/peddler/api/reports_2021_06_30.rb +++ b/lib/peddler/api/reports_2021_06_30.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def reports_2021_06_30(...) + API::Reports20210630.new(...) + end + end + class API # Selling Partner API for Reports # diff --git a/lib/peddler/api/sales_v1.rb b/lib/peddler/api/sales_v1.rb index a0894e48..5fd47deb 100644 --- a/lib/peddler/api/sales_v1.rb +++ b/lib/peddler/api/sales_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def sales_v1(...) + API::SalesV1.new(...) + end + end + class API # Selling Partner API for Sales # diff --git a/lib/peddler/api/sellers_v1.rb b/lib/peddler/api/sellers_v1.rb index 71d190a7..6651edd4 100644 --- a/lib/peddler/api/sellers_v1.rb +++ b/lib/peddler/api/sellers_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def sellers_v1(...) + API::SellersV1.new(...) + end + end + class API # Selling Partner API for Sellers # diff --git a/lib/peddler/api/services_v1.rb b/lib/peddler/api/services_v1.rb index b04b8016..811b6722 100644 --- a/lib/peddler/api/services_v1.rb +++ b/lib/peddler/api/services_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def services_v1(...) + API::ServicesV1.new(...) + end + end + class API # Selling Partner API for Services # @@ -85,12 +91,10 @@ def complete_service_job_by_service_job_id(service_job_id, rate_limit: 5.0) # is 50. # @param [Float] rate_limit Requests per second # @return [Hash] The API response - def get_service_jobs( - marketplace_ids, service_order_ids: nil, service_job_status: nil, page_token: nil, page_size: 20, - sort_field: nil, sort_order: nil, created_after: nil, created_before: nil, last_updated_after: nil, - last_updated_before: nil, schedule_start_date: nil, schedule_end_date: nil, asins: nil, required_skills: nil, - store_ids: nil, rate_limit: 10.0 - ) + def get_service_jobs(marketplace_ids, service_order_ids: nil, service_job_status: nil, page_token: nil, + page_size: 20, sort_field: nil, sort_order: nil, created_after: nil, created_before: nil, + last_updated_after: nil, last_updated_before: nil, schedule_start_date: nil, schedule_end_date: nil, asins: nil, + required_skills: nil, store_ids: nil, rate_limit: 10.0) path = "/service/v1/serviceJobs" params = { diff --git a/lib/peddler/api/shipment_invoicing_v0.rb b/lib/peddler/api/shipment_invoicing_v0.rb index e1527bff..fdcaf535 100644 --- a/lib/peddler/api/shipment_invoicing_v0.rb +++ b/lib/peddler/api/shipment_invoicing_v0.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def shipment_invoicing_v0(...) + API::ShipmentInvoicingV0.new(...) + end + end + class API # Selling Partner API for Shipment Invoicing # diff --git a/lib/peddler/api/shipping_v1.rb b/lib/peddler/api/shipping_v1.rb index 8c540f40..c8351a3d 100644 --- a/lib/peddler/api/shipping_v1.rb +++ b/lib/peddler/api/shipping_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def shipping_v1(...) + API::ShippingV1.new(...) + end + end + class API # Selling Partner API for Shipping # diff --git a/lib/peddler/api/shipping_v2.rb b/lib/peddler/api/shipping_v2.rb index 9e57e4cb..5609978a 100644 --- a/lib/peddler/api/shipping_v2.rb +++ b/lib/peddler/api/shipping_v2.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def shipping_v2(...) + API::ShippingV2.new(...) + end + end + class API # Amazon Shipping API # diff --git a/lib/peddler/api/solicitations_v1.rb b/lib/peddler/api/solicitations_v1.rb index 2c944817..fbd5164c 100644 --- a/lib/peddler/api/solicitations_v1.rb +++ b/lib/peddler/api/solicitations_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def solicitations_v1(...) + API::SolicitationsV1.new(...) + end + end + class API # Selling Partner API for Solicitations # diff --git a/lib/peddler/api/supply_sources_2020_07_01.rb b/lib/peddler/api/supply_sources_2020_07_01.rb index 4e397d4a..fe6a9ccf 100644 --- a/lib/peddler/api/supply_sources_2020_07_01.rb +++ b/lib/peddler/api/supply_sources_2020_07_01.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def supply_sources_2020_07_01(...) + API::SupplySources20200701.new(...) + end + end + class API # Selling Partner API for Supply Sources # diff --git a/lib/peddler/api/tokens_2021_03_01.rb b/lib/peddler/api/tokens_2021_03_01.rb index ce61a506..85188bce 100644 --- a/lib/peddler/api/tokens_2021_03_01.rb +++ b/lib/peddler/api/tokens_2021_03_01.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def tokens_2021_03_01(...) + API::Tokens20210301.new(...) + end + end + class API # Selling Partner API for Tokens # diff --git a/lib/peddler/api/uploads_2020_11_01.rb b/lib/peddler/api/uploads_2020_11_01.rb index 4ff12ac7..d3c29e0a 100644 --- a/lib/peddler/api/uploads_2020_11_01.rb +++ b/lib/peddler/api/uploads_2020_11_01.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def uploads_2020_11_01(...) + API::Uploads20201101.new(...) + end + end + class API # Selling Partner API for Uploads # diff --git a/lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb b/lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb index 42e08405..65bcad66 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def vendor_direct_fulfillment_inventory_v1(...) + API::VendorDirectFulfillmentInventoryV1.new(...) + end + end + class API # Selling Partner API for Direct Fulfillment Inventory Updates # diff --git a/lib/peddler/api/vendor_direct_fulfillment_orders_2021_12_28.rb b/lib/peddler/api/vendor_direct_fulfillment_orders_2021_12_28.rb index f4c61bb5..966c5177 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_orders_2021_12_28.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_orders_2021_12_28.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def vendor_direct_fulfillment_orders_2021_12_28(...) + API::VendorDirectFulfillmentOrders20211228.new(...) + end + end + class API # Selling Partner API for Direct Fulfillment Orders # @@ -32,8 +38,8 @@ class VendorDirectFulfillmentOrders20211228 < API # order numbers are returned. # @param [Float] rate_limit Requests per second # @return [Hash] The API response - def get_orders(created_after, created_before, ship_from_party_id: nil, status: nil, limit: nil, - sort_order: nil, next_token: nil, include_details: "true", rate_limit: 10.0) + def get_orders(created_after, created_before, ship_from_party_id: nil, status: nil, limit: nil, sort_order: nil, + next_token: nil, include_details: "true", rate_limit: 10.0) path = "/vendor/directFulfillment/orders/2021-12-28/purchaseOrders" params = { diff --git a/lib/peddler/api/vendor_direct_fulfillment_orders_v1.rb b/lib/peddler/api/vendor_direct_fulfillment_orders_v1.rb index 126108f1..f640aafe 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_orders_v1.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_orders_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def vendor_direct_fulfillment_orders_v1(...) + API::VendorDirectFulfillmentOrdersV1.new(...) + end + end + class API # Selling Partner API for Direct Fulfillment Orders # @@ -32,8 +38,8 @@ class VendorDirectFulfillmentOrdersV1 < API # order numbers are returned. # @param [Float] rate_limit Requests per second # @return [Hash] The API response - def get_orders(created_after, created_before, ship_from_party_id: nil, status: nil, limit: nil, - sort_order: nil, next_token: nil, include_details: "true", rate_limit: 10.0) + def get_orders(created_after, created_before, ship_from_party_id: nil, status: nil, limit: nil, sort_order: nil, + next_token: nil, include_details: "true", rate_limit: 10.0) path = "/vendor/directFulfillment/orders/v1/purchaseOrders" params = { diff --git a/lib/peddler/api/vendor_direct_fulfillment_payments_v1.rb b/lib/peddler/api/vendor_direct_fulfillment_payments_v1.rb index 7af2eb4c..d6a0bb92 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_payments_v1.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_payments_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def vendor_direct_fulfillment_payments_v1(...) + API::VendorDirectFulfillmentPaymentsV1.new(...) + end + end + class API # Selling Partner API for Direct Fulfillment Payments # diff --git a/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb b/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb index 1be190d2..77b34177 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def vendor_direct_fulfillment_sandbox_test_data_2021_10_28(...) + API::VendorDirectFulfillmentSandboxTestData20211028.new(...) + end + end + class API # Selling Partner API for Vendor Direct Fulfillment Sandbox Test Data # diff --git a/lib/peddler/api/vendor_direct_fulfillment_shipping_2021_12_28.rb b/lib/peddler/api/vendor_direct_fulfillment_shipping_2021_12_28.rb index fe4cfb39..a5f03b7a 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_shipping_2021_12_28.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_shipping_2021_12_28.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def vendor_direct_fulfillment_shipping_2021_12_28(...) + API::VendorDirectFulfillmentShipping20211228.new(...) + end + end + class API # Selling Partner API for Direct Fulfillment Shipping # diff --git a/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb b/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb index a4324ba6..642bf901 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def vendor_direct_fulfillment_shipping_v1(...) + API::VendorDirectFulfillmentShippingV1.new(...) + end + end + class API # Selling Partner API for Direct Fulfillment Shipping # diff --git a/lib/peddler/api/vendor_direct_fulfillment_transactions_2021_12_28.rb b/lib/peddler/api/vendor_direct_fulfillment_transactions_2021_12_28.rb index cef506f2..5c7fc851 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_transactions_2021_12_28.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_transactions_2021_12_28.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def vendor_direct_fulfillment_transactions_2021_12_28(...) + API::VendorDirectFulfillmentTransactions20211228.new(...) + end + end + class API # Selling Partner API for Direct Fulfillment Transaction Status # diff --git a/lib/peddler/api/vendor_direct_fulfillment_transactions_v1.rb b/lib/peddler/api/vendor_direct_fulfillment_transactions_v1.rb index 53d4914d..6be43a65 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_transactions_v1.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_transactions_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def vendor_direct_fulfillment_transactions_v1(...) + API::VendorDirectFulfillmentTransactionsV1.new(...) + end + end + class API # Selling Partner API for Direct Fulfillment Transaction Status # diff --git a/lib/peddler/api/vendor_invoices_v1.rb b/lib/peddler/api/vendor_invoices_v1.rb index c06c8a52..0652cebf 100644 --- a/lib/peddler/api/vendor_invoices_v1.rb +++ b/lib/peddler/api/vendor_invoices_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def vendor_invoices_v1(...) + API::VendorInvoicesV1.new(...) + end + end + class API # Selling Partner API for Retail Procurement Payments # diff --git a/lib/peddler/api/vendor_orders_v1.rb b/lib/peddler/api/vendor_orders_v1.rb index ea6d36cf..b31e93e4 100644 --- a/lib/peddler/api/vendor_orders_v1.rb +++ b/lib/peddler/api/vendor_orders_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def vendor_orders_v1(...) + API::VendorOrdersV1.new(...) + end + end + class API # Selling Partner API for Retail Procurement Orders # @@ -42,11 +48,9 @@ class VendorOrdersV1 < API # application are returned. # @param [Float] rate_limit Requests per second # @return [Hash] The API response - def get_purchase_orders( - limit: nil, created_after: nil, created_before: nil, sort_order: nil, next_token: nil, include_details: nil, - changed_after: nil, changed_before: nil, po_item_state: nil, is_po_changed: nil, purchase_order_state: nil, - ordering_vendor_code: nil, rate_limit: 10.0 - ) + def get_purchase_orders(limit: nil, created_after: nil, created_before: nil, sort_order: nil, next_token: nil, + include_details: nil, changed_after: nil, changed_before: nil, po_item_state: nil, is_po_changed: nil, + purchase_order_state: nil, ordering_vendor_code: nil, rate_limit: 10.0) path = "/vendor/orders/v1/purchaseOrders" params = { @@ -128,11 +132,10 @@ def submit_acknowledgement(body, rate_limit: 10.0) # group purchase orders. # @param [Float] rate_limit Requests per second # @return [Hash] The API response - def get_purchase_orders_status( - limit: nil, sort_order: nil, next_token: nil, created_after: nil, created_before: nil, updated_after: nil, - updated_before: nil, purchase_order_number: nil, purchase_order_status: nil, item_confirmation_status: nil, - item_receive_status: nil, ordering_vendor_code: nil, ship_to_party_id: nil, rate_limit: 10.0 - ) + def get_purchase_orders_status(limit: nil, sort_order: nil, next_token: nil, created_after: nil, + created_before: nil, updated_after: nil, updated_before: nil, purchase_order_number: nil, + purchase_order_status: nil, item_confirmation_status: nil, item_receive_status: nil, ordering_vendor_code: nil, + ship_to_party_id: nil, rate_limit: 10.0) path = "/vendor/orders/v1/purchaseOrdersStatus" params = { diff --git a/lib/peddler/api/vendor_shipments_v1.rb b/lib/peddler/api/vendor_shipments_v1.rb index fddd5ce4..6ad419ad 100644 --- a/lib/peddler/api/vendor_shipments_v1.rb +++ b/lib/peddler/api/vendor_shipments_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def vendor_shipments_v1(...) + API::VendorShipmentsV1.new(...) + end + end + class API # Selling Partner API for Retail Procurement Shipments # @@ -82,15 +88,13 @@ def submit_shipments(body, rate_limit: 10.0) # same as 'sellingParty.partyId' in the Shipment. # @param [Float] rate_limit Requests per second # @return [Hash] The API response - def get_shipment_details( - limit: nil, sort_order: nil, next_token: nil, created_after: nil, created_before: nil, + def get_shipment_details(limit: nil, sort_order: nil, next_token: nil, created_after: nil, created_before: nil, shipment_confirmed_before: nil, shipment_confirmed_after: nil, package_label_created_before: nil, package_label_created_after: nil, shipped_before: nil, shipped_after: nil, estimated_delivery_before: nil, estimated_delivery_after: nil, shipment_delivery_before: nil, shipment_delivery_after: nil, requested_pick_up_before: nil, requested_pick_up_after: nil, scheduled_pick_up_before: nil, scheduled_pick_up_after: nil, current_shipment_status: nil, vendor_shipment_identifier: nil, - buyer_reference_number: nil, buyer_warehouse_code: nil, seller_warehouse_code: nil, rate_limit: 10.0 - ) + buyer_reference_number: nil, buyer_warehouse_code: nil, seller_warehouse_code: nil, rate_limit: 10.0) cannot_sandbox! path = "/vendor/shipping/v1/shipments" diff --git a/lib/peddler/api/vendor_transaction_status_v1.rb b/lib/peddler/api/vendor_transaction_status_v1.rb index 35ff09f8..ba5af615 100644 --- a/lib/peddler/api/vendor_transaction_status_v1.rb +++ b/lib/peddler/api/vendor_transaction_status_v1.rb @@ -3,6 +3,12 @@ require "peddler/api" module Peddler + class << self + def vendor_transaction_status_v1(...) + API::VendorTransactionStatusV1.new(...) + end + end + class API # Selling Partner API for Retail Procurement Transaction Status #