Class: C2eCore::Drops::CreditsWalletDrop
- Defined in:
- /build/app/mailers/c2e_core/drops/credits_wallet_drop.rb
Instance Method Summary collapse
-
#balance ⇒ Float
-
Wallet credit balance.
-
-
#group ⇒ CreditsGroupDrop
-
Returns credit group to which wallet belongs as drop object.
-
-
#initialize(wallet) ⇒ CreditsWalletDrop
constructor
A new instance of CreditsWalletDrop.
-
#nfc_id ⇒ String
-
The wallet’s NFC ID, e.g.
-
Constructor Details
#initialize(wallet) ⇒ CreditsWalletDrop
Returns a new instance of CreditsWalletDrop.
6 7 8 9 |
# File '/build/app/mailers/c2e_core/drops/credits_wallet_drop.rb', line 6 def initialize(wallet) super() @wallet = wallet end |
Instance Method Details
#balance ⇒ Float
Returns - Wallet credit balance. E.g.: 123.45
.
17 18 19 |
# File '/build/app/mailers/c2e_core/drops/credits_wallet_drop.rb', line 17 def balance @wallet.balance end |
#group ⇒ CreditsGroupDrop
Returns - Returns credit group to which wallet belongs as drop object.
22 23 24 25 26 |
# File '/build/app/mailers/c2e_core/drops/credits_wallet_drop.rb', line 22 def group stored_value __method__ do CreditsGroupDrop.new(@wallet.group) end end |
#nfc_id ⇒ String
Returns - The wallet’s NFC ID, e.g. "049C64D2452B80"
.
12 13 14 |
# File '/build/app/mailers/c2e_core/drops/credits_wallet_drop.rb', line 12 def nfc_id @wallet.nfc_id end |