Class: C2eCore::Drops::FinancialReportPaymentTypeDrop

Inherits:
BaseDrop
  • Object
show all
Includes:
Helpers::FinancialReportConversions
Defined in:
/build/app/mailers/c2e_core/drops/financial_report_payment_type_drop.rb

Instance Method Summary collapse

Constructor Details

#initialize(financial_report, payment_type, value, orders_count) ⇒ FinancialReportPaymentTypeDrop

Returns a new instance of FinancialReportPaymentTypeDrop.

Instance Method Details

#formatted_value ⇒ String

Returns - Total amount for this payment type converted to financial report's currency and formatted. E.g.: "123,45 Kč".

Returns:

  • (String) —
    • Total amount for this payment type converted to financial report's currency and formatted. E.g.: "123,45 Kč".

#orders_count ⇒ Integer

Returns - Number of orders that have been paid by the current payment type. E.g.: 42.

Returns:

  • (Integer) —
    • Number of orders that have been paid by the current payment type. E.g.: 42

#payment_type ⇒ PaymentTypeDrop?

Returns - Payment type as drop object, if it is present.

Returns:

  • (PaymentTypeDrop, nil) —
    • Payment type as drop object, if it is present.

#value ⇒ Float

Returns - Total amount for this payment type converted to financial report's currency. E.g.: 78.

Returns:

  • (Float) —
    • Total amount for this payment type converted to financial report's currency. E.g.: 78