Class: ErpIntegration::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/erp_integration/configuration.rb

Overview

Use the ‘Configuration` class to configure the ERP Integration gem. Use an initializer in your project configure the ERP Integration gem.

Examples:

```ruby
  # config/initializers/erp_integration.rb
  ErpIntegration.configure do |config|
    config.fulfil_api_key = "..."
  end
```

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**options) ⇒ Configuration

Returns a new instance of Configuration.



164
165
166
167
168
# File 'lib/erp_integration/configuration.rb', line 164

def initialize(**options)
  options.each_pair do |key, value|
    public_send("#{key}=", value) if respond_to?("#{key}=")
  end
end

Instance Attribute Details

#bill_of_material_adapterObject



178
179
180
# File 'lib/erp_integration/configuration.rb', line 178

def bill_of_material_adapter
  @bill_of_material_adapter || :fulfil
end

#bill_of_material_input_adapterObject



182
183
184
# File 'lib/erp_integration/configuration.rb', line 182

def bill_of_material_input_adapter
  @bill_of_material_input_adapter || :fulfil
end

#bill_of_material_output_adapterObject



186
187
188
# File 'lib/erp_integration/configuration.rb', line 186

def bill_of_material_output_adapter
  @bill_of_material_output_adapter || :fulfil
end

#channel_listing_adapterObject



198
199
200
# File 'lib/erp_integration/configuration.rb', line 198

def channel_listing_adapter
  @channel_listing_adapter || :fulfil
end

#country_adapterObject



194
195
196
# File 'lib/erp_integration/configuration.rb', line 194

def country_adapter
  @country_adapter || :fulfil
end

#customer_shipment_adapterObject



202
203
204
# File 'lib/erp_integration/configuration.rb', line 202

def customer_shipment_adapter
  @customer_shipment_adapter || :fulfil
end

#customer_shipment_return_adapterObject



206
207
208
# File 'lib/erp_integration/configuration.rb', line 206

def customer_shipment_return_adapter
  @customer_shipment_return_adapter || :fulfil
end

#fulfil_api_keyString

The ‘fulfil_api_key` is used by the `FulfilClient` to authorize the requests to the Fulfil API endpoints.

Returns:

  • (String)

    The API key for Fulfil.



18
19
20
# File 'lib/erp_integration/configuration.rb', line 18

def fulfil_api_key
  @fulfil_api_key
end

#fulfil_merchant_idString

The ‘fulfil_merchant_id` is used by the `FulfilClient` to connect to the right Fulfil API endpoints.

Returns:

  • (String)

    The merchant ID for Fulfil.



23
24
25
# File 'lib/erp_integration/configuration.rb', line 23

def fulfil_merchant_id
  @fulfil_merchant_id
end

#gift_card_adapterObject



282
283
284
# File 'lib/erp_integration/configuration.rb', line 282

def gift_card_adapter
  @gift_card_adapter || :fulfil
end

#internal_shipment_adapterObject



210
211
212
# File 'lib/erp_integration/configuration.rb', line 210

def internal_shipment_adapter
  @internal_shipment_adapter || :fulfil
end

#location_adapterObject



214
215
216
# File 'lib/erp_integration/configuration.rb', line 214

def location_adapter
  @location_adapter || :fulfil
end

#loggerLogger

Logger that will be used for HTTP operations on Client

Returns:

  • (Logger)

    The configured logger



162
163
164
# File 'lib/erp_integration/configuration.rb', line 162

def logger
  @logger
end

#product_adapterObject



218
219
220
# File 'lib/erp_integration/configuration.rb', line 218

def product_adapter
  @product_adapter || :fulfil
end

#product_category_adapterObject



222
223
224
# File 'lib/erp_integration/configuration.rb', line 222

def product_category_adapter
  @product_category_adapter || :fulfil
end

#product_option_adapterObject



290
291
292
# File 'lib/erp_integration/configuration.rb', line 290

def product_option_adapter
  @product_option_adapter || :fulfil
end

#product_template_adapterObject



226
227
228
# File 'lib/erp_integration/configuration.rb', line 226

def product_template_adapter
  @product_template_adapter || :fulfil
end

#production_order_adapterObject



230
231
232
# File 'lib/erp_integration/configuration.rb', line 230

def production_order_adapter
  @production_order_adapter || :fulfil
end

#purchase_order_adapterObject



234
235
236
# File 'lib/erp_integration/configuration.rb', line 234

def purchase_order_adapter
  @purchase_order_adapter || :fulfil
end

#purchase_order_line_adapterObject



238
239
240
# File 'lib/erp_integration/configuration.rb', line 238

def purchase_order_line_adapter
  @purchase_order_line_adapter || :fulfil
end

#purchase_request_adapterObject



242
243
244
# File 'lib/erp_integration/configuration.rb', line 242

def purchase_request_adapter
  @purchase_request_adapter || :fulfil
end

#sales_line_option_adapterObject



286
287
288
# File 'lib/erp_integration/configuration.rb', line 286

def sales_line_option_adapter
  @sales_line_option_adapter || :fulfil
end

#sales_order_adapterObject



250
251
252
# File 'lib/erp_integration/configuration.rb', line 250

def sales_order_adapter
  @sales_order_adapter || :fulfil
end

#sales_order_line_adapterObject



246
247
248
# File 'lib/erp_integration/configuration.rb', line 246

def sales_order_line_adapter
  @sales_order_line_adapter || :fulfil
end

#sales_return_reason_adapterObject



254
255
256
# File 'lib/erp_integration/configuration.rb', line 254

def sales_return_reason_adapter
  @sales_return_reason_adapter || :fulfil
end

#stock_bin_transfer_adapterObject



262
263
264
# File 'lib/erp_integration/configuration.rb', line 262

def stock_bin_transfer_adapter
  @stock_bin_transfer_adapter || :fulfil
end

#stock_move_adapterObject



266
267
268
# File 'lib/erp_integration/configuration.rb', line 266

def stock_move_adapter
  @stock_move_adapter || :fulfil
end

#supplier_shipment_adapterObject



258
259
260
# File 'lib/erp_integration/configuration.rb', line 258

def supplier_shipment_adapter
  @supplier_shipment_adapter || :fulfil
end

#task_adapterObject



270
271
272
# File 'lib/erp_integration/configuration.rb', line 270

def task_adapter
  @task_adapter || :fulfil
end

#tracking_number_adapterObject



274
275
276
# File 'lib/erp_integration/configuration.rb', line 274

def tracking_number_adapter
  @tracking_number_adapter || :fulfil
end

Instance Method Details

#box_type_adapterObject



190
191
192
# File 'lib/erp_integration/configuration.rb', line 190

def box_type_adapter
  @box_type_adapter || :fulfil
end

#carrier_adapterObject



170
171
172
# File 'lib/erp_integration/configuration.rb', line 170

def carrier_adapter
  @carrier_adapter || :fulfil
end

#carrier_service_adapterObject



174
175
176
# File 'lib/erp_integration/configuration.rb', line 174

def carrier_service_adapter
  @carrier_service_adapter || :fulfil
end

#webhook_adapterObject



278
279
280
# File 'lib/erp_integration/configuration.rb', line 278

def webhook_adapter
  @webhook_adapter || :fulfil
end