Class: C2eCore::Drops::CreditsExpiringSoonDrop
- Defined in:
- /build/app/mailers/c2e_core/drops/credits_expiring_soon_drop.rb
Instance Method Summary collapse
-
#cash_payment_decimals ⇒ Integer
-
The number of decimal places the ‘remaining_amount` should be rounded to.
-
-
#expires_at ⇒ DateTime
-
Datetime object containing the expiration time, e.g.: “2020-11-16T23:59:59+01:00”.
-
-
#formatted_remaining_amount ⇒ String
-
Formatted value of ‘remaining_amount`.
-
-
#initialize(wallet_activity) ⇒ CreditsExpiringSoonDrop
constructor
A new instance of CreditsExpiringSoonDrop.
-
#remaining_amount ⇒ Float
-
Amount that will expire.
-
Constructor Details
#initialize(wallet_activity) ⇒ CreditsExpiringSoonDrop
Returns a new instance of CreditsExpiringSoonDrop.
6 7 8 9 |
# File '/build/app/mailers/c2e_core/drops/credits_expiring_soon_drop.rb', line 6 def initialize(wallet_activity) super() @wallet_activity = wallet_activity end |
Instance Method Details
#cash_payment_decimals ⇒ Integer
Returns - The number of decimal places the ‘remaining_amount` should be rounded to.
27 28 29 |
# File '/build/app/mailers/c2e_core/drops/credits_expiring_soon_drop.rb', line 27 def cash_payment_decimals @wallet_activity.cash_payment_decimals end |
#expires_at ⇒ DateTime
Returns - Datetime object containing the expiration time, e.g.: “2020-11-16T23:59:59+01:00”.
17 18 19 |
# File '/build/app/mailers/c2e_core/drops/credits_expiring_soon_drop.rb', line 17 def expires_at @wallet_activity.expires_at end |
#formatted_remaining_amount ⇒ String
Returns - Formatted value of ‘remaining_amount`.
22 23 24 |
# File '/build/app/mailers/c2e_core/drops/credits_expiring_soon_drop.rb', line 22 def formatted_remaining_amount @wallet_activity.formatted_remaining_amount end |
#remaining_amount ⇒ Float
Returns - Amount that will expire.
12 13 14 |
# File '/build/app/mailers/c2e_core/drops/credits_expiring_soon_drop.rb', line 12 def remaining_amount @wallet_activity.remaining_amount end |