Class: C2eCore::Drops::PaymentMethodDrop

Inherits:
BaseDrop
  • Object
show all
Defined in:
/build/app/mailers/c2e_core/drops/payment_method_drop.rb

Instance Method Summary collapse

Constructor Details

#initialize(payment_method) ⇒ PaymentMethodDrop

Returns a new instance of PaymentMethodDrop.



6
7
8
9
# File '/build/app/mailers/c2e_core/drops/payment_method_drop.rb', line 6

def initialize(payment_method)
  super()
  @payment_method = payment_method
end

Instance Method Details

#payment_gatePaymentGateDrop

Returns - The PaymentGate as drop object.

Returns:



12
13
14
15
16
# File '/build/app/mailers/c2e_core/drops/payment_method_drop.rb', line 12

def payment_gate
  stored_value __method__ do
    PaymentGateDrop.new(@payment_method.payment_gate)
  end
end

#payment_typePaymentTypeDrop

Returns - The PaymentType as drop object.

Returns:



19
20
21
22
23
# File '/build/app/mailers/c2e_core/drops/payment_method_drop.rb', line 19

def payment_type
  stored_value __method__ do
    PaymentTypeDrop.new(@payment_method.payment_type)
  end
end

#simplified_descriptionString

Returns - A simplified description of the payment method. E.g.: "Online payment", "Cash".

Returns:

  • (String)
    • A simplified description of the payment method.

    E.g.: "Online payment", "Cash".



27
28
29
# File '/build/app/mailers/c2e_core/drops/payment_method_drop.rb', line 27

def simplified_description
  @payment_method.simplified_description
end