Class: Edi::MiraklSeller::Orchestrator

Inherits:
BaseOrchestrator show all
Defined in:
app/services/edi/mirakl_seller/orchestrator.rb

Constant Summary

Constants inherited from BaseOrchestrator

BaseOrchestrator::DEFAULT_PENDING_DISCONTINUE_LIFETIME, BaseOrchestrator::ORCHESTRATORS, BaseOrchestrator::RECOMMENDED_EXECUTE_FLOW_EVERY_X_HOUR

Instance Attribute Summary

Attributes inherited from BaseOrchestrator

#config, #logger, #options

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseOrchestrator

all_orchestrators_class, build, cached_build, cached_orchestrators, catalog_id_to_pending_discontinue_lifetime, catalog_ids_edi_enabled, #customer, #customer_catalog, customer_id_to_partner_key_map, #customer_ids, customer_ids_edi_enabled, customer_ids_with_invoice_message_enabled, #customers, execute_discontinue_flow, execute_flow, execute_inventory_flow, execute_listing_message_feed_flow, execute_order_flow, execute_price_flow, execute_product_data_flow, #ignore_back_orders, #initialize, orchestrator_for_customer_id, orchestrators, #pending_discontinue_lifetime, #product_data_enabled?, #should_execute_flow?, #should_execute_order_flow?, #should_execute_product_data_flow?, #test_mode?

Constructor Details

This class inherits a constructor from Edi::BaseOrchestrator

Class Method Details

.execute_mirakl_result_processorObject



310
311
312
313
314
315
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 310

def self.execute_mirakl_result_processor
  orchestrators.each do |o|
    ProductImportMessageProcessor.new(o).process
    PriceImportMessageProcessor.new(o).process
  end
end

.partnersObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 5

def self.partners
  mirakl_leroymerlin_api_host = Heatwave::Configuration.fetch(:mirakl_leroymerlin_api, :api_host)
  mirakl_leroymerlin_api_key = Heatwave::Configuration.fetch(:mirakl_leroymerlin_api, :api_key)
  mirakl_castorama_api_host = Heatwave::Configuration.fetch(:mirakl_castorama_api, :api_host)
  mirakl_castorama_api_key = Heatwave::Configuration.fetch(:mirakl_castorama_api, :api_key)
  mirakl_bricodepot_es_api_host = Heatwave::Configuration.fetch(:mirakl_bricodepot_es_api, :api_host)
  mirakl_bricodepot_es_api_key = Heatwave::Configuration.fetch(:mirakl_bricodepot_es_api, :api_key)
  mirakl_bricodepot_pt_api_host = Heatwave::Configuration.fetch(:mirakl_bricodepot_pt_api, :api_host)
  mirakl_bricodepot_pt_api_key = Heatwave::Configuration.fetch(:mirakl_bricodepot_pt_api, :api_key)
  mirakl_bricomarche_api_host = Heatwave::Configuration.fetch(:mirakl_bricomarche_api, :api_host)
  mirakl_bricomarche_api_key = Heatwave::Configuration.fetch(:mirakl_bricomarche_api, :api_key)
  mirakl_leclerc_api_host = Heatwave::Configuration.fetch(:mirakl_leclerc_api, :api_host)
  mirakl_leclerc_api_key = Heatwave::Configuration.fetch(:mirakl_leclerc_api, :api_key)
  mirakl_maxeda_api_host = Heatwave::Configuration.fetch(:mirakl_maxeda_api, :api_host)
  mirakl_maxeda_api_key = Heatwave::Configuration.fetch(:mirakl_maxeda_api, :api_key)

  {
    leroymerlin_adeo: {
      active: true,
      partner: :leroymerlin_adeo,
      customer_id: { 'Groupe ADEO / Leroy Merlin France': 21_631_999,
                    'Groupe ADEO / Leroy Merlin Spain': 22_444_117,
                    'Groupe ADEO / Leroy Merlin Portugal': 22_444_128,
                    'Groupe ADEO / Leroy Merlin Italy': 22_473_614 },
      catalog_ids: { '001': 155, '002': 228, '003': 229, '005': 262 }, # 001: france, 002: spain, 003: portugal, 004: italy
      main_catalog_id: 155,
      orchestrator_keys: %w[leroymerlin_fr leroymerlin_es leroymerlin_pt leroymerlin_it],
      image_locales: %i[fr es pt it],
      value_pre_filter: { 'Yes' => 'LOV_000001', 'No' => 'LOV_000002' },
      offer_id: 'ean',
      transporter: :mirakl,
      transporter_profile: :mirakl_leroymerlin_api,
      error_product_identifier: 'shop_sku',
      product_id_type: 'EAN',
      product_data_remote_path: "#{mirakl_leroymerlin_api_host}/api/products/imports",
      product_import_message_remote_path: "#{mirakl_leroymerlin_api_host}/api/products/imports",
      price_import_message_remote_path: "#{mirakl_leroymerlin_api_host}/api/offers/imports",
      price_advice_remote_path: "#{mirakl_leroymerlin_api_host}/api/offers/imports",
      order_message_remote_path: "#{mirakl_leroymerlin_api_host}/api/orders?order_state_codes=WAITING_ACCEPTANCE,SHIPPING",
      fa_message_remote_path: "#{mirakl_leroymerlin_api_host}/api/orders/{order_id}/accept",
      tracking_advice_remote_path: "#{mirakl_leroymerlin_api_host}/api/orders/{order_id}/tracking",
      invoice_message_remote_path: "#{mirakl_leroymerlin_api_host}/api/orders/{order_id}/documents",
      validate_shipping_remote_path: "#{mirakl_leroymerlin_api_host}/api/orders/{order_id}/ship",
      failure_timeout_in_minutes: 10,
      max_process_attempts: 20,
      orders_require_acceptance: true,
      vat_breakdown_available: true,
      price_message_enabled: true,
      confirm_message_enabled: true,
      invoice_message_enabled: true,
      inventory_message_enabled: false,
      confirm_outbound_processing: true,
      fa_message_enabled: true,
      execute_price_flow_every_x_hour: 24,
      support_contact: 'sellersuccess@leroymerlin.fr'
    },
    castorama: {
      active: true,
      partner: :castorama,
      customer_id: { 'CASTORAMA FRANCE': 22_779_162 },
      catalog_ids: { '001': 263 },
      main_catalog_id: 263,
      orchestrator_keys: %w[castorama_fr],
      image_locales: %i[fr],
      value_pre_filter: { 'Yes' => 1, 'No' => 2 },
      offer_id: 'ean',
      transporter: :mirakl,
      transporter_profile: :mirakl_castorama_api,
      error_product_identifier: 'shop_sku',
      product_id_type: 'EAN',
      product_data_remote_path: "#{mirakl_castorama_api_host}/api/products/imports",
      product_import_message_remote_path: "#{mirakl_castorama_api_host}/api/products/imports",
      price_import_message_remote_path: "#{mirakl_castorama_api_host}/api/offers/imports",
      price_advice_remote_path: "#{mirakl_castorama_api_host}/api/offers/imports",
      order_message_remote_path: "#{mirakl_castorama_api_host}/api/orders?order_state_codes=SHIPPING",
      fa_message_remote_path: "#{mirakl_castorama_api_host}/api/orders/{order_id}/accept",
      tracking_advice_remote_path: "#{mirakl_castorama_api_host}/api/orders/{order_id}/tracking",
      invoice_message_remote_path: "#{mirakl_castorama_api_host}/api/orders/{order_id}/documents",
      validate_shipping_remote_path: "#{mirakl_castorama_api_host}/api/orders/{order_id}/ship",
      failure_timeout_in_minutes: 10,
      max_process_attempts: 20,
      orders_require_acceptance: false,
      vat_breakdown_available: false,
      price_message_enabled: true,
      confirm_message_enabled: true,
      invoice_message_enabled: true,
      inventory_message_enabled: true,
      confirm_outbound_processing: true,
      fa_message_enabled: true,
      execute_price_flow_every_x_hour: 24,
      support_contact: 'victor.bello@kingfisher.com'
    },
    bricodepot_es: {
      active: true,
      partner: :bricodepot_es,
      customer_id: { 'BRICODEPOT SPAIN': 22_818_476 },
      catalog_ids: { '001': 265 },
      main_catalog_id: 265,
      orchestrator_keys: %w[bricodepot_es],
      image_locales: %i[es],
      value_pre_filter: { 'Yes' => 1, 'No' => 0 },
      offer_id: 'ean',
      transporter: :mirakl,
      namespace: :bricodepot,
      transporter_profile: :mirakl_bricodepot_es_api,
      error_product_identifier: 'shop_sku',
      product_id_type: 'EAN',
      product_data_remote_path: "#{mirakl_bricodepot_es_api_host}/api/products/imports",
      product_import_message_remote_path: "#{mirakl_bricodepot_es_api_host}/api/products/imports",
      price_import_message_remote_path: "#{mirakl_bricodepot_es_api_host}/api/offers/imports",
      price_advice_remote_path: "#{mirakl_bricodepot_es_api_host}/api/offers/imports",
      order_message_remote_path: "#{mirakl_bricodepot_es_api_host}/api/orders?order_state_codes=WAITING_ACCEPTANCE,SHIPPING",
      fa_message_remote_path: "#{mirakl_bricodepot_es_api_host}/api/orders/{order_id}/accept",
      tracking_advice_remote_path: "#{mirakl_bricodepot_es_api_host}/api/orders/{order_id}/tracking",
      invoice_message_remote_path: "#{mirakl_bricodepot_es_api_host}/api/orders/{order_id}/documents",
      validate_shipping_remote_path: "#{mirakl_bricodepot_es_api_host}/api/orders/{order_id}/ship",
      failure_timeout_in_minutes: 10,
      max_process_attempts: 20,
      orders_require_acceptance: true,
      vat_breakdown_available: false,
      price_message_enabled: true,
      confirm_message_enabled: true,
      invoice_message_enabled: true,
      inventory_message_enabled: true,
      confirm_outbound_processing: true,
      fa_message_enabled: true,
      execute_price_flow_every_x_hour: 24,
      support_contact: 'Crisbell.AlcalaMontoya@bricodepot.com'
    },
    bricodepot_pt: {
      active: true,
      partner: :bricodepot_pt,
      customer_id: { 'BRICODEPOT PORTUGAL': 22_818_474 },
      catalog_ids: { '001': 264 },
      main_catalog_id: 264,
      orchestrator_keys: %w[bricodepot_pt],
      image_locales: %i[pt],
      value_pre_filter: { 'Yes' => 1, 'No' => 0 },
      offer_id: 'ean',
      transporter: :mirakl,
      namespace: :bricodepot,
      transporter_profile: :mirakl_bricodepot_pt_api,
      error_product_identifier: 'shop_sku',
      product_id_type: 'EAN',
      product_data_remote_path: "#{mirakl_bricodepot_pt_api_host}/api/products/imports",
      product_import_message_remote_path: "#{mirakl_bricodepot_pt_api_host}/api/products/imports",
      price_import_message_remote_path: "#{mirakl_bricodepot_pt_api_host}/api/offers/imports",
      price_advice_remote_path: "#{mirakl_bricodepot_pt_api_host}/api/offers/imports",
      order_message_remote_path: "#{mirakl_bricodepot_pt_api_host}/api/orders?order_state_codes=WAITING_ACCEPTANCE,SHIPPING",
      fa_message_remote_path: "#{mirakl_bricodepot_pt_api_host}/api/orders/{order_id}/accept",
      tracking_advice_remote_path: "#{mirakl_bricodepot_pt_api_host}/api/orders/{order_id}/tracking",
      invoice_message_remote_path: "#{mirakl_bricodepot_pt_api_host}/api/orders/{order_id}/documents",
      validate_shipping_remote_path: "#{mirakl_bricodepot_pt_api_host}/api/orders/{order_id}/ship",
      failure_timeout_in_minutes: 10,
      max_process_attempts: 20,
      orders_require_acceptance: true,
      vat_breakdown_available: false,
      price_message_enabled: true,
      confirm_message_enabled: true,
      invoice_message_enabled: true,
      inventory_message_enabled: true,
      confirm_outbound_processing: true,
      fa_message_enabled: true,
      execute_price_flow_every_x_hour: 24,
      support_contact: 'Crisbell.AlcalaMontoya@bricodepot.com'
    },
    bricomarche: {
      active: false,
      partner: :bricomarche,
      customer_id: { BRICOMARCHE: 22_841_508 },
      catalog_ids: { '001': 266 },
      main_catalog_id: 266,
      orchestrator_keys: %w[bricomarche_fr],
      image_locales: %i[fr],
      value_pre_filter: { 'Yes' => 'True', 'No' => 'False' },
      offer_id: 'ean',
      transporter: :mirakl,
      transporter_profile: :mirakl_bricomarche_api,
      error_product_identifier: 'shop_sku',
      product_id_type: 'EAN',
      product_data_remote_path: "#{mirakl_bricomarche_api_host}/api/products/imports",
      product_import_message_remote_path: "#{mirakl_bricomarche_api_host}/api/products/imports",
      price_import_message_remote_path: "#{mirakl_bricomarche_api_host}/api/offers/imports",
      price_advice_remote_path: "#{mirakl_bricomarche_api_host}/api/offers/imports",
      order_message_remote_path: "#{mirakl_bricomarche_api_host}/api/orders?order_state_codes=WAITING_ACCEPTANCE,SHIPPING",
      fa_message_remote_path: "#{mirakl_bricomarche_api_host}/api/orders/{order_id}/accept",
      tracking_advice_remote_path: "#{mirakl_bricomarche_api_host}/api/orders/{order_id}/tracking",
      invoice_message_remote_path: "#{mirakl_bricomarche_api_host}/api/orders/{order_id}/documents",
      validate_shipping_remote_path: "#{mirakl_bricomarche_api_host}/api/orders/{order_id}/ship",
      failure_timeout_in_minutes: 10,
      max_process_attempts: 20,
      orders_require_acceptance: true,
      vat_breakdown_available: false,
      price_message_enabled: true,
      confirm_message_enabled: true,
      invoice_message_enabled: true,
      inventory_message_enabled: true,
      confirm_outbound_processing: true,
      fa_message_enabled: true,
      execute_price_flow_every_x_hour: 24,
      support_contact: 'lauren.mariette@mousquetaires.com'
    },
    leclerc: {
      active: true,
      partner: :leclerc,
      customer_id: { LECLERC: 22_884_811 },
      catalog_ids: { '001': 269 },
      main_catalog_id: 269,
      orchestrator_keys: %w[leclerc_fr],
      image_locales: %i[fr],
      value_pre_filter: { 'Yes' => 'oui', 'No' => 'non' },
      offer_id: 'ean',
      transporter: :mirakl,
      transporter_profile: :mirakl_leclerc_api,
      error_product_identifier: 'shop_sku',
      product_id_type: 'SHOP_SKU',
      product_data_remote_path: "#{mirakl_leclerc_api_host}/api/products/imports",
      product_import_message_remote_path: "#{mirakl_leclerc_api_host}/api/products/imports",
      price_import_message_remote_path: "#{mirakl_leclerc_api_host}/api/offers/imports",
      price_advice_remote_path: "#{mirakl_leclerc_api_host}/api/offers/imports",
      order_message_remote_path: "#{mirakl_leclerc_api_host}/api/orders?order_state_codes=WAITING_ACCEPTANCE,SHIPPING",
      fa_message_remote_path: "#{mirakl_leclerc_api_host}/api/orders/{order_id}/accept",
      tracking_advice_remote_path: "#{mirakl_leclerc_api_host}/api/orders/{order_id}/tracking",
      invoice_message_remote_path: "#{mirakl_leclerc_api_host}/api/orders/{order_id}/documents",
      validate_shipping_remote_path: "#{mirakl_leclerc_api_host}/api/orders/{order_id}/ship",
      failure_timeout_in_minutes: 10,
      max_process_attempts: 20,
      orders_require_acceptance: true,
      vat_breakdown_available: false,
      price_message_enabled: true,
      confirm_message_enabled: true,
      invoice_message_enabled: true,
      inventory_message_enabled: true,
      confirm_outbound_processing: true,
      fa_message_enabled: true,
      execute_price_flow_every_x_hour: 24,
      support_contact: 'Tedwin.Liot@lcommerce.leclerc'
    },
    maxeda: {
      active: false,
      partner: :maxeda,
      customer_id: { 'MAXEDA GROUP': 22_884_826 },
      catalog_ids: { '001': 268 },
      main_catalog_id: 268,
      orchestrator_keys: %w[maxeda],
      image_locales: %i[fr nl],
      value_pre_filter: { 'Yes' => 'yesno_True', 'No' => 'yesno_False' },
      offer_id: 'sku',
      product_id_type: 'EAN',
      transporter: :mirakl,
      transporter_profile: :mirakl_maxeda_api,
      error_product_identifier: 'seller_product_id',
      product_data_remote_path: "#{mirakl_maxeda_api_host}/api/products/imports",
      product_import_message_remote_path: "#{mirakl_maxeda_api_host}/api/products/imports",
      price_import_message_remote_path: "#{mirakl_maxeda_api_host}/api/offers/imports",
      price_advice_remote_path: "#{mirakl_maxeda_api_host}/api/offers/imports",
      order_message_remote_path: "#{mirakl_maxeda_api_host}/api/orders?order_state_codes=SHIPPING",
      fa_message_remote_path: "#{mirakl_maxeda_api_host}/api/orders/{order_id}/accept",
      tracking_advice_remote_path: "#{mirakl_maxeda_api_host}/api/orders/{order_id}/tracking",
      invoice_message_remote_path: "#{mirakl_maxeda_api_host}/api/orders/{order_id}/documents",
      validate_shipping_remote_path: "#{mirakl_maxeda_api_host}/api/orders/{order_id}/ship",
      failure_timeout_in_minutes: 10,
      max_process_attempts: 20,
      orders_require_acceptance: false,
      vat_breakdown_available: false,
      price_message_enabled: true,
      confirm_message_enabled: true,
      invoice_message_enabled: true,
      inventory_message_enabled: true,
      confirm_outbound_processing: true,
      fa_message_enabled: true,
      execute_price_flow_every_x_hour: 24,
      support_contact: 'Sten.Lobles@diymaxeda.com'
    }
  }
end

Instance Method Details

#confirm_message_enabled?Boolean

Returns:

  • (Boolean)


381
382
383
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 381

def confirm_message_enabled?
  confirm_message_enabled
end

#confirm_message_processorObject



365
366
367
368
369
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 365

def confirm_message_processor
  return Edi::NullProcessor.new(self, :fa_message_sender, options) unless confirm_message_enabled?

  ConfirmMessageProcessor.new(self, options)
end

#confirm_message_senderObject



371
372
373
374
375
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 371

def confirm_message_sender
  return Edi::NullProcessor.new(self, :fa_message_sender, options) unless confirm_message_enabled?

  ConfirmMessageSender.new(self, options)
end

#confirm_outbound_processing?Boolean

Returns:

  • (Boolean)


282
283
284
285
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 282

def confirm_outbound_processing?
  # Mirakl needs confirmation when sending data
  confirm_outbound_processing
end

#execute_inventory_flowObject



438
439
440
441
442
443
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 438

def execute_inventory_flow
  # return unless active

  # inventory_message_processor.process
  # inventory_message_sender.process
end

#execute_order_flowObject



426
427
428
429
430
431
432
433
434
435
436
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 426

def execute_order_flow
  return unless active

  order_message_retriever.process
  sleep(1)
  order_message_processor.process
  sleep(1)
  fa_message_sender.process
  sleep(1)
  confirm_message_sender.process
end

#execute_price_flowObject



419
420
421
422
423
424
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 419

def execute_price_flow
  return unless active

  price_message_processor.process
  price_message_sender.process
end

#execute_product_data_flowObject



412
413
414
415
416
417
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 412

def execute_product_data_flow
  return unless active

  product_data_processor.process
  product_data_sender.process
end

#fa_message_enabled?Boolean

Returns:

  • (Boolean)


349
350
351
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 349

def fa_message_enabled?
  fa_message_enabled
end

#fa_message_processorObject



353
354
355
356
357
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 353

def fa_message_processor
  return Edi::NullProcessor.new(self, :fa_message_processor, options) unless fa_message_enabled?

  FaMessageProcessor.new(self, options)
end

#fa_message_senderObject



359
360
361
362
363
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 359

def fa_message_sender
  return Edi::NullProcessor.new(self, :fa_message_sender, options) unless fa_message_enabled?

  FaMessageSender.new(self, options)
end

#inventory_message_enabled?Boolean

Returns:

  • (Boolean)


287
288
289
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 287

def inventory_message_enabled?
  inventory_message_enabled
end

#inventory_message_processorObject



377
378
379
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 377

def inventory_message_processor
  Edi::NullProcessor.new(self, :inventory_message_processor, options)
end

#invoice_message_enabled?Boolean

Returns:

  • (Boolean)


385
386
387
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 385

def invoice_message_enabled?
  invoice_message_enabled
end

#invoice_message_processorObject



393
394
395
396
397
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 393

def invoice_message_processor
  return Edi::NullProcessor.new(self, :invoice_message_processor, options) unless invoice_message_enabled?

  InvoiceMessageProcessor.new(self, options)
end

#mirakl_result_enabled?Boolean

Returns:

  • (Boolean)


299
300
301
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 299

def mirakl_result_enabled?
  try(:product_import_message_remote_path).present? || try(:price_import_message_remote_path).present?
end

#mirakl_result_processor(ecl) ⇒ Object



303
304
305
306
307
308
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 303

def mirakl_result_processor(ecl)
  return Edi::NullProcessor.new(self, :mirakl_result_processor, options) unless mirakl_result_enabled?

  ProductImportMessageProcessor.new(self, options).process(ecl) if ecl.category == 'product_data'
  PriceImportMessageProcessor.new(self, options).process(ecl) if ecl.category == 'price_advice'
end

#order_message_enabled?Boolean

Returns:

  • (Boolean)


333
334
335
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 333

def order_message_enabled?
  try(:order_message_remote_path).present?
end

#order_message_processorObject



343
344
345
346
347
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 343

def order_message_processor
  return Edi::NullProcessor.new(self, :order_message_processor, options) unless order_message_enabled?

  OrderMessageProcessor.new(self, options)
end

#order_message_retrieverObject



337
338
339
340
341
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 337

def order_message_retriever
  return Edi::NullProcessor.new(self, :order_message_processor, options) unless order_message_enabled?

  OrderMessageRetriever.new(self, options)
end

#price_message_enabled?Boolean

Returns:

  • (Boolean)


317
318
319
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 317

def price_message_enabled?
  price_message_enabled
end

#price_message_processorObject



327
328
329
330
331
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 327

def price_message_processor
  return Edi::NullProcessor.new(self, :price_message_processor, options) unless price_message_enabled?

  PriceMessageProcessor.new(self, options)
end

#price_message_senderObject



321
322
323
324
325
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 321

def price_message_sender
  return Edi::NullProcessor.new(self, :price_message_sender, options) unless price_message_enabled?

  PriceMessageSender.new(self, options)
end

#product_data_configuratorObject



399
400
401
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 399

def product_data_configurator
  ProductDataConfigurator.new(self, options)
end

#product_data_presenter(item) ⇒ Object



408
409
410
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 408

def product_data_presenter(item)
  product_data_presenter_class.new(item, image_locales: image_locales)
end

#product_data_presenter_classObject



403
404
405
406
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 403

def product_data_presenter_class
  namespace = (try(:namespace) || partner).to_s.camelize
  "Edi::MiraklSeller::#{namespace}::ProductDataPresenter".constantize
end

#product_data_processorObject



291
292
293
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 291

def product_data_processor
  ProductDataProcessor.new(self, options)
end

#product_data_senderObject



295
296
297
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 295

def product_data_sender
  ProductDataSender.new(self, options)
end

#return_notification_message_enabled?Boolean

Returns:

  • (Boolean)


389
390
391
# File 'app/services/edi/mirakl_seller/orchestrator.rb', line 389

def return_notification_message_enabled?
  try(:return_notification_message_remote_path).present?
end