From b9c144bb1f2b0b494d473eedc54765f585c499a6 Mon Sep 17 00:00:00 2001 From: Kristina Lim Date: Thu, 24 Jan 2019 01:54:32 +0800 Subject: [PATCH] Prepare to change AssociatedEnterpriseFee to module The superclasses will include this module, instead of inheriting the class. --- .../data_representations/coordinator_fee.rb | 2 +- .../data_representations/exchange_order_fee.rb | 2 +- .../data_representations/incoming_exchange_line_item_fee.rb | 2 +- .../data_representations/outgoing_exchange_line_item_fee.rb | 2 +- .../{associated_enterprise_fee.rb => using_enterprise_fee.rb} | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/{associated_enterprise_fee.rb => using_enterprise_fee.rb} (94%) diff --git a/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/coordinator_fee.rb b/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/coordinator_fee.rb index 1f0e68a65d..ce9c177cf2 100644 --- a/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/coordinator_fee.rb +++ b/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/coordinator_fee.rb @@ -2,7 +2,7 @@ module OrderManagement module Reports module EnterpriseFeeSummary module DataRepresentations - class CoordinatorFee < AssociatedEnterpriseFee + class CoordinatorFee < UsingEnterpriseFee def fee_calculated_on_transfer_through_name context.i18n_translate("fee_calculated_on_transfer_through_all") end diff --git a/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/exchange_order_fee.rb b/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/exchange_order_fee.rb index 721f17b085..2192d8db96 100644 --- a/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/exchange_order_fee.rb +++ b/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/exchange_order_fee.rb @@ -2,7 +2,7 @@ module OrderManagement module Reports module EnterpriseFeeSummary module DataRepresentations - class ExchangeOrderFee < AssociatedEnterpriseFee + class ExchangeOrderFee < UsingEnterpriseFee def fee_calculated_on_transfer_through_name context.i18n_translate("fee_calculated_on_transfer_through_entire_orders", distributor: context.data["adjustment_source_distributor_name"]) diff --git a/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/incoming_exchange_line_item_fee.rb b/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/incoming_exchange_line_item_fee.rb index 0cee868b37..0c6e3c086e 100644 --- a/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/incoming_exchange_line_item_fee.rb +++ b/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/incoming_exchange_line_item_fee.rb @@ -2,7 +2,7 @@ module OrderManagement module Reports module EnterpriseFeeSummary module DataRepresentations - class IncomingExchangeLineItemFee < AssociatedEnterpriseFee + class IncomingExchangeLineItemFee < UsingEnterpriseFee def fee_calculated_on_transfer_through_name context.data["incoming_exchange_enterprise_name"] end diff --git a/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/outgoing_exchange_line_item_fee.rb b/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/outgoing_exchange_line_item_fee.rb index c82edc7e14..ec7ac3878b 100644 --- a/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/outgoing_exchange_line_item_fee.rb +++ b/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/outgoing_exchange_line_item_fee.rb @@ -2,7 +2,7 @@ module OrderManagement module Reports module EnterpriseFeeSummary module DataRepresentations - class OutgoingExchangeLineItemFee < AssociatedEnterpriseFee + class OutgoingExchangeLineItemFee < UsingEnterpriseFee def fee_calculated_on_transfer_through_name context.data["outgoing_exchange_enterprise_name"] end diff --git a/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/associated_enterprise_fee.rb b/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/using_enterprise_fee.rb similarity index 94% rename from engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/associated_enterprise_fee.rb rename to engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/using_enterprise_fee.rb index 95cc581981..be21fed4b1 100644 --- a/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/associated_enterprise_fee.rb +++ b/engines/order_management/app/services/order_management/reports/enterprise_fee_summary/data_representations/using_enterprise_fee.rb @@ -2,7 +2,7 @@ module OrderManagement module Reports module EnterpriseFeeSummary module DataRepresentations - class AssociatedEnterpriseFee + class UsingEnterpriseFee attr_reader :context def initialize(context)