Class: C2eCore::Drops::PaymentTypeDrop

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

Instance Method Summary collapse

Constructor Details

#initialize(payment_type) ⇒ PaymentTypeDrop

Returns a new instance of PaymentTypeDrop.



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

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

Instance Method Details

#enumString

Returns - The enum value of the PaymentType, e.g. CASH, CREDIT, or WALLET_CREDIT. For a complete list, check API.

Returns:

  • (String)
    • The enum value of the PaymentType, e.g. CASH, CREDIT, or

    WALLET_CREDIT. For a complete list, check API.



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

def enum
  @payment_type.enum_value
end

#labelString

Returns - The localised name of the PaymentType, e.g. "Cash", "Credit Card", or "Wallet Credit". For a complete list, check API.

Returns:

  • (String)
    • The localised name of the PaymentType, e.g. "Cash", "Credit Card", or

    "Wallet Credit". For a complete list, check API.



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

def label
  @payment_type.to_s
end