Skip to content

Commit

Permalink
Regenerate apis
Browse files Browse the repository at this point in the history
  • Loading branch information
hakanensari committed Oct 2, 2024
1 parent e8a8a88 commit 96d8040
Show file tree
Hide file tree
Showing 52 changed files with 334 additions and 54 deletions.
16 changes: 0 additions & 16 deletions lib/peddler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/aplus_content_2020_11_01.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/application_management_2023_11_30.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/catalog_items_2020_12_01.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
14 changes: 9 additions & 5 deletions lib/peddler/api/catalog_items_2022_04_01.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down Expand Up @@ -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 = {
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/catalog_items_v0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/data_kiosk_2023_11_15.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/easy_ship_2022_03_23.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/fba_inbound_eligibility_v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/fba_inventory_v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/feeds_2021_06_30.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/finances_v0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
10 changes: 8 additions & 2 deletions lib/peddler/api/fulfillment_inbound_2024_03_20.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down Expand Up @@ -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 = {
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/fulfillment_inbound_v0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/fulfillment_outbound_2020_07_01.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/listings_items_2020_09_01.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/listings_items_2021_08_01.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/listings_restrictions_2021_08_01.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/merchant_fulfillment_v0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/messaging_v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/notifications_v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
19 changes: 12 additions & 7 deletions lib/peddler/api/orders_v0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down Expand Up @@ -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 = {
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/product_fees_v0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/product_pricing_2022_05_01.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
6 changes: 6 additions & 0 deletions lib/peddler/api/product_pricing_v0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
Loading

0 comments on commit 96d8040

Please sign in to comment.