Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::Client
- Inherits:
-
Object
- Object
- InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::Client
- Includes:
- CoreLibrary
- Defined in:
- lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb
Overview
inventory_management_and_item_management_and_order_management_and_price_management client class.
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Class Method Summary collapse
-
.from_env(**overrides) ⇒ Object
Creates a client directly from environment variables.
Instance Method Summary collapse
-
#acknowledge ⇒ AcknowledgeController
Access to acknowledge controller.
-
#associations ⇒ AssociationsController
Access to associations controller.
-
#cancel ⇒ CancelController
Access to cancel controller.
-
#count ⇒ CountController
Access to count controller.
-
#cppreference ⇒ CppreferenceController
Access to cppreference controller.
-
#feeds ⇒ FeedsController
Access to feeds controller.
-
#get_pricing_insights ⇒ GetPricingInsightsController
Access to get_pricing_insights controller.
-
#id ⇒ IdController
Access to id controller.
-
#incentives ⇒ IncentivesController
Access to incentives controller.
-
#initialize(connection: nil, adapter: :net_http_persistent, timeout: 60, max_retries: 0, retry_interval: 1, backoff_factor: 2, retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524], retry_methods: %i[get put],, http_callback: nil, proxy_settings: nil, environment: Environment::PRODUCTION, config: nil) ⇒ Client
constructor
A new instance of Client.
-
#inventories ⇒ InventoriesController
Access to inventories controller.
-
#inventory ⇒ InventoryController
Access to inventory controller.
-
#items ⇒ ItemsController
Access to items controller.
-
#orders ⇒ OrdersController
Access to orders controller.
-
#price ⇒ PriceController
Access to price controller.
-
#purchase_order_id ⇒ PurchaseOrderIdController
Access to purchase_order_id controller.
-
#refund ⇒ RefundController
Access to refund controller.
-
#released ⇒ ReleasedController
Access to released controller.
-
#repricer_feeds ⇒ RepricerFeedsController
Access to repricer_feeds controller.
-
#search ⇒ SearchController
Access to search controller.
-
#shipping ⇒ ShippingController
Access to shipping controller.
-
#sku ⇒ SkuController
Access to sku controller.
-
#spec ⇒ SpecController
Access to spec controller.
-
#strategies ⇒ StrategiesController
Access to strategies controller.
-
#strategy ⇒ StrategyController
Access to strategy controller.
-
#strategy_collection_id ⇒ StrategyCollectionIdController
Access to strategy_collection_id controller.
-
#taxonomy ⇒ TaxonomyController
Access to taxonomy controller.
- #user_agent_detail ⇒ Object
-
#wfpreference ⇒ WfpreferenceController
Access to wfpreference controller.
Constructor Details
#initialize(connection: nil, adapter: :net_http_persistent, timeout: 60, max_retries: 0, retry_interval: 1, backoff_factor: 2, retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524], retry_methods: %i[get put],, http_callback: nil, proxy_settings: nil, environment: Environment::PRODUCTION, config: nil) ⇒ Client
Returns a new instance of Client.
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 179 def initialize( connection: nil, adapter: :net_http_persistent, timeout: 60, max_retries: 0, retry_interval: 1, backoff_factor: 2, retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524], retry_methods: %i[get put], http_callback: nil, proxy_settings: nil, environment: Environment::PRODUCTION, config: nil ) @config = if config.nil? Configuration.new(connection: connection, adapter: adapter, timeout: timeout, max_retries: max_retries, retry_interval: retry_interval, backoff_factor: backoff_factor, retry_statuses: retry_statuses, retry_methods: retry_methods, http_callback: http_callback, proxy_settings: proxy_settings, environment: environment) else config end @global_configuration = GlobalConfiguration.new(client_configuration: @config) .base_uri_executor(@config.method(:get_base_uri)) .global_errors(BaseController::GLOBAL_ERRORS) .user_agent(BaseController.user_agent) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
11 12 13 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 11 def config @config end |
Class Method Details
.from_env(**overrides) ⇒ Object
Creates a client directly from environment variables.
207 208 209 210 211 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 207 def self.from_env(**overrides) default_config = Configuration.build_default_config_from_env new_config = default_config.clone_with(**overrides) new(config: new_config) end |
Instance Method Details
#acknowledge ⇒ AcknowledgeController
Access to acknowledge controller.
103 104 105 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 103 def acknowledge @acknowledge ||= AcknowledgeController.new @global_configuration end |
#associations ⇒ AssociationsController
Access to associations controller.
55 56 57 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 55 def associations @associations ||= AssociationsController.new @global_configuration end |
#cancel ⇒ CancelController
Access to cancel controller.
97 98 99 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 97 def cancel @cancel ||= CancelController.new @global_configuration end |
#count ⇒ CountController
Access to count controller.
73 74 75 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 73 def count @count ||= CountController.new @global_configuration end |
#cppreference ⇒ CppreferenceController
Access to cppreference controller.
175 176 177 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 175 def cppreference @cppreference ||= CppreferenceController.new @global_configuration end |
#feeds ⇒ FeedsController
Access to feeds controller.
37 38 39 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 37 def feeds @feeds ||= FeedsController.new @global_configuration end |
#get_pricing_insights ⇒ GetPricingInsightsController
Access to get_pricing_insights controller.
157 158 159 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 157 def get_pricing_insights @get_pricing_insights ||= GetPricingInsightsController.new @global_configuration end |
#id ⇒ IdController
Access to id controller.
61 62 63 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 61 def id @id ||= IdController.new @global_configuration end |
#incentives ⇒ IncentivesController
Access to incentives controller.
151 152 153 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 151 def incentives @incentives ||= IncentivesController.new @global_configuration end |
#inventories ⇒ InventoriesController
Access to inventories controller.
31 32 33 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 31 def inventories @inventories ||= InventoriesController.new @global_configuration end |
#inventory ⇒ InventoryController
Access to inventory controller.
19 20 21 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 19 def inventory @inventory ||= InventoryController.new @global_configuration end |
#items ⇒ ItemsController
Access to items controller.
79 80 81 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 79 def items @items ||= ItemsController.new @global_configuration end |
#orders ⇒ OrdersController
Access to orders controller.
121 122 123 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 121 def orders @orders ||= OrdersController.new @global_configuration end |
#price ⇒ PriceController
Access to price controller.
163 164 165 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 163 def price @price ||= PriceController.new @global_configuration end |
#purchase_order_id ⇒ PurchaseOrderIdController
Access to purchase_order_id controller.
109 110 111 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 109 def purchase_order_id @purchase_order_id ||= PurchaseOrderIdController.new @global_configuration end |
#refund ⇒ RefundController
Access to refund controller.
91 92 93 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 91 def refund @refund ||= RefundController.new @global_configuration end |
#released ⇒ ReleasedController
Access to released controller.
115 116 117 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 115 def released @released ||= ReleasedController.new @global_configuration end |
#repricer_feeds ⇒ RepricerFeedsController
Access to repricer_feeds controller.
169 170 171 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 169 def repricer_feeds @repricer_feeds ||= RepricerFeedsController.new @global_configuration end |
#search ⇒ SearchController
Access to search controller.
49 50 51 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 49 def search @search ||= SearchController.new @global_configuration end |
#shipping ⇒ ShippingController
Access to shipping controller.
85 86 87 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 85 def shipping @shipping ||= ShippingController.new @global_configuration end |
#sku ⇒ SkuController
Access to sku controller.
25 26 27 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 25 def sku @sku ||= SkuController.new @global_configuration end |
#spec ⇒ SpecController
Access to spec controller.
43 44 45 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 43 def spec @spec ||= SpecController.new @global_configuration end |
#strategies ⇒ StrategiesController
Access to strategies controller.
139 140 141 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 139 def strategies @strategies ||= StrategiesController.new @global_configuration end |
#strategy ⇒ StrategyController
Access to strategy controller.
133 134 135 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 133 def strategy @strategy ||= StrategyController.new @global_configuration end |
#strategy_collection_id ⇒ StrategyCollectionIdController
Access to strategy_collection_id controller.
127 128 129 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 127 def strategy_collection_id @strategy_collection_id ||= StrategyCollectionIdController.new @global_configuration end |
#taxonomy ⇒ TaxonomyController
Access to taxonomy controller.
67 68 69 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 67 def taxonomy @taxonomy ||= TaxonomyController.new @global_configuration end |
#user_agent_detail ⇒ Object
13 14 15 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 13 def user_agent_detail config.user_agent_detail end |
#wfpreference ⇒ WfpreferenceController
Access to wfpreference controller.
145 146 147 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/client.rb', line 145 def wfpreference @wfpreference ||= WfpreferenceController.new @global_configuration end |