Class: C2eCore::Drops::OrderPriceDrop

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

Instance Method Summary collapse

Constructor Details

#initialize(order) ⇒ OrderPriceDrop

Returns a new instance of OrderPriceDrop.

Instance Method Details

#collect_from_customerFloat

Returns - The amount that should be collected from customer.

Returns:

  • (Float)
    • The amount that should be collected from customer

#discountsArray[OrderDiscountDrop]

Returns - Array of all order discounts.

Returns:

#external_discounts_sumFloat

Returns - Sum of all discounts from external integrators converted into order’s currency. E.g.: 78.

Returns:

  • (Float)
    • Sum of all discounts from external integrators converted into order’s currency. E.g.: 78

#extra_chargeFloat

Returns - Price for extra charge (only used by DameJidlo now) converted into order’s currency. E.g.: 28.

Returns:

  • (Float)
    • Price for extra charge (only used by DameJidlo now) converted into order’s currency. E.g.: 28

#extra_feesArray[OrderExternalFeeDrop]

Returns - Array of all extra fees.

Returns:

#min_order_chargeFloat

Returns - Price of the extra charge applied to reach the delivery threshold, converted into order’s currency. E.g.: 28.

Returns:

  • (Float)
    • Price of the extra charge applied to reach the delivery threshold,

    converted into order’s currency. E.g.: 28

#roundingFloat

Returns - Rounding of total_raw to cash rounding unit. E.g.: SK(EUR) -> 0.05, CZ(CZK) -> 1.00.

Returns:

  • (Float)
    • Rounding of total_raw to cash rounding unit. E.g.: SK(EUR) -> 0.05, CZ(CZK) -> 1.00

#tipFloat

Returns - Value of tip given by customer converted into order’s currency. E.g.: 34.8.

Returns:

  • (Float)
    • Value of tip given by customer converted into order’s currency. E.g.: 34.8

#tip_percentageInteger

Returns - Percentage value of tip given by customer. E.g.: 25.

Returns:

  • (Integer)
    • Percentage value of tip given by customer. E.g.: 25

#totalFloat

Returns - Total price of order converted into order’s currency. E.g.: 378.

Returns:

  • (Float)
    • Total price of order converted into order’s currency. E.g.: 378

#total_discountFloat

Returns - Sum of all discounts converted into order’s currency. E.g.: 78.

Returns:

  • (Float)
    • Sum of all discounts converted into order’s currency. E.g.: 78

#total_rawFloat

Returns - Total price of order converted into order’s currency. E.g.: 378.

Returns:

  • (Float)
    • Total price of order converted into order’s currency. E.g.: 378

#total_vouchersFloat

Returns - Sum of all vouchers converted into order’s currency. E.g.: 78.

Returns:

  • (Float)
    • Sum of all vouchers converted into order’s currency. E.g.: 78

#transportationFloat

Returns - Price for delivery converted into order’s currency. E.g.: 50.

Returns:

  • (Float)
    • Price for delivery converted into order’s currency. E.g.: 50

#vatsArray[OrderVatDrop]

Returns - Array of all order discounts.

Returns:

#vouchersArray[OrderDiscountDrop]

Returns - Array of all order vouchers.

Returns: