Class: C2eCore::Drops::OrderPaymentMethodDrop
- Includes:
- Helpers::OrderConversions
- Defined in:
- /build/app/mailers/c2e_core/drops/order_payment_method_drop.rb
Instance Method Summary collapse
-
#formatted_price ⇒ String
-
The amount paid converted to the order’s currency and formatted.
-
-
#initialize(order_payment_method) ⇒ OrderPaymentMethodDrop
constructor
A new instance of OrderPaymentMethodDrop.
-
#payment_method ⇒ PaymentMethodDrop
-
Payment method as a drop objects.
-
-
#price ⇒ Float
-
The amount paid converted to the order’s currency.
-
Methods included from Helpers::OrderConversions
#converted_price, #format_price
Constructor Details
#initialize(order_payment_method) ⇒ OrderPaymentMethodDrop
Returns a new instance of OrderPaymentMethodDrop.
8 9 10 11 12 |
# File '/build/app/mailers/c2e_core/drops/order_payment_method_drop.rb', line 8 def initialize(order_payment_method) super() @order_payment_method = order_payment_method @order = @order_payment_method.order end |
Instance Method Details
#formatted_price ⇒ String
Returns - The amount paid converted to the order’s currency and formatted. E.g.: "123,45 Kč"
.
29 30 31 32 33 |
# File '/build/app/mailers/c2e_core/drops/order_payment_method_drop.rb', line 29 def formatted_price stored_value __method__ do format_price(price) end end |
#payment_method ⇒ PaymentMethodDrop
Returns - Payment method as a drop objects.
15 16 17 18 19 |
# File '/build/app/mailers/c2e_core/drops/order_payment_method_drop.rb', line 15 def payment_method stored_value __method__ do PaymentMethodDrop.new(@order_payment_method.payment_method) end end |
#price ⇒ Float
Returns - The amount paid converted to the order’s currency. E.g.: 123.45
.
22 23 24 25 26 |
# File '/build/app/mailers/c2e_core/drops/order_payment_method_drop.rb', line 22 def price stored_value __method__ do converted_price(@order_payment_method.price) end end |