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.



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

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



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

def bill_of_material_adapter
  @bill_of_material_adapter || :fulfil
end

#bill_of_material_input_adapterObject



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

def bill_of_material_input_adapter
  @bill_of_material_input_adapter || :fulfil
end

#bill_of_material_output_adapterObject



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

def bill_of_material_output_adapter
  @bill_of_material_output_adapter || :fulfil
end

#channel_listing_adapterObject



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

def channel_listing_adapter
  @channel_listing_adapter || :fulfil
end

#country_adapterObject



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

def country_adapter
  @country_adapter || :fulfil
end

#customer_shipment_adapterObject



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

def customer_shipment_adapter
  @customer_shipment_adapter || :fulfil
end

#customer_shipment_return_adapterObject



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

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



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

def gift_card_adapter
  @gift_card_adapter || :fulfil
end

#internal_shipment_adapterObject



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

def internal_shipment_adapter
  @internal_shipment_adapter || :fulfil
end

#location_adapterObject



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

def location_adapter
  @location_adapter || :fulfil
end

#loggerLogger

Logger that will be used for HTTP operations on Client

Returns:

  • (Logger)

    The configured logger



167
168
169
# File 'lib/erp_integration/configuration.rb', line 167

def logger
  @logger
end

#party_address_adapterObject



295
296
297
# File 'lib/erp_integration/configuration.rb', line 295

def party_address_adapter
  @party_address_adapter || :fulfil
end

#product_adapterObject



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

def product_adapter
  @product_adapter || :fulfil
end

#product_category_adapterObject



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

def product_category_adapter
  @product_category_adapter || :fulfil
end

#product_option_adapterObject



299
300
301
# File 'lib/erp_integration/configuration.rb', line 299

def product_option_adapter
  @product_option_adapter || :fulfil
end

#product_template_adapterObject



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

def product_template_adapter
  @product_template_adapter || :fulfil
end

#production_order_adapterObject



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

def production_order_adapter
  @production_order_adapter || :fulfil
end

#purchase_order_adapterObject



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

def purchase_order_adapter
  @purchase_order_adapter || :fulfil
end

#purchase_order_line_adapterObject



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

def purchase_order_line_adapter
  @purchase_order_line_adapter || :fulfil
end

#purchase_request_adapterObject



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

def purchase_request_adapter
  @purchase_request_adapter || :fulfil
end

#sales_line_option_adapterObject



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

def sales_line_option_adapter
  @sales_line_option_adapter || :fulfil
end

#sales_order_adapterObject



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

def sales_order_adapter
  @sales_order_adapter || :fulfil
end

#sales_order_line_adapterObject



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

def sales_order_line_adapter
  @sales_order_line_adapter || :fulfil
end

#sales_return_reason_adapterObject



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

def sales_return_reason_adapter
  @sales_return_reason_adapter || :fulfil
end

#stock_bin_transfer_adapterObject



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

def stock_bin_transfer_adapter
  @stock_bin_transfer_adapter || :fulfil
end

#stock_move_adapterObject



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

def stock_move_adapter
  @stock_move_adapter || :fulfil
end

#supplier_shipment_adapterObject



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

def supplier_shipment_adapter
  @supplier_shipment_adapter || :fulfil
end

#task_adapterObject



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

def task_adapter
  @task_adapter || :fulfil
end

#tracking_number_adapterObject



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

def tracking_number_adapter
  @tracking_number_adapter || :fulfil
end

Instance Method Details

#box_type_adapterObject



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

def box_type_adapter
  @box_type_adapter || :fulfil
end

#carrier_adapterObject



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

def carrier_adapter
  @carrier_adapter || :fulfil
end

#carrier_service_adapterObject



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

def carrier_service_adapter
  @carrier_service_adapter || :fulfil
end

#webhook_adapterObject



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

def webhook_adapter
  @webhook_adapter || :fulfil
end