Class: TranslationCms::Api::Customers::PaymentTransaction

Inherits:
JsonApiClient::Resource
  • Object
show all
Extended by:
EnumField::EnumeratedAttribute
Defined in:
lib/translation_cms/api/customers/payment_transaction.rb

Instance Method Summary collapse

Instance Method Details

#description(params = {}) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/translation_cms/api/customers/payment_transaction.rb', line 11

def description(params = {})
  I18n.t payment_method.code, params.reverse_merge(
    scope: [
      :account, :transaction_type,
      purchaser.blank? || business.blank? ? :method_description : :method_description_extended
    ],
    purchaser: purchaser, business: business,
    amount: amount, discount_cost: discount_cost
  )
end