Class: Wallets::CallbackContext
- Inherits:
-
Struct
- Object
- Struct
- Wallets::CallbackContext
- Defined in:
- lib/wallets/callback_context.rb
Overview
Immutable event payload passed to lifecycle callbacks. Keeping callback data in one object makes it easier to extend callback APIs without breaking existing handlers.
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#category ⇒ Object
Returns the value of attribute category.
-
#event ⇒ Object
Returns the value of attribute event.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#new_balance ⇒ Object
Returns the value of attribute new_balance.
-
#previous_balance ⇒ Object
Returns the value of attribute previous_balance.
-
#threshold ⇒ Object
Returns the value of attribute threshold.
-
#transaction ⇒ Object
Returns the value of attribute transaction.
-
#transfer ⇒ Object
Returns the value of attribute transfer.
-
#wallet ⇒ Object
Returns the value of attribute wallet.
Instance Method Summary collapse
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount
7 8 9 |
# File 'lib/wallets/callback_context.rb', line 7 def amount @amount end |
#category ⇒ Object
Returns the value of attribute category
7 8 9 |
# File 'lib/wallets/callback_context.rb', line 7 def category @category end |
#event ⇒ Object
Returns the value of attribute event
7 8 9 |
# File 'lib/wallets/callback_context.rb', line 7 def event @event end |
#metadata ⇒ Object
Returns the value of attribute metadata
7 8 9 |
# File 'lib/wallets/callback_context.rb', line 7 def @metadata end |
#new_balance ⇒ Object
Returns the value of attribute new_balance
7 8 9 |
# File 'lib/wallets/callback_context.rb', line 7 def new_balance @new_balance end |
#previous_balance ⇒ Object
Returns the value of attribute previous_balance
7 8 9 |
# File 'lib/wallets/callback_context.rb', line 7 def previous_balance @previous_balance end |
#threshold ⇒ Object
Returns the value of attribute threshold
7 8 9 |
# File 'lib/wallets/callback_context.rb', line 7 def threshold @threshold end |
#transaction ⇒ Object
Returns the value of attribute transaction
7 8 9 |
# File 'lib/wallets/callback_context.rb', line 7 def transaction @transaction end |
#transfer ⇒ Object
Returns the value of attribute transfer
7 8 9 |
# File 'lib/wallets/callback_context.rb', line 7 def transfer @transfer end |
#wallet ⇒ Object
Returns the value of attribute wallet
7 8 9 |
# File 'lib/wallets/callback_context.rb', line 7 def wallet @wallet end |
Instance Method Details
#owner ⇒ Object
20 21 22 |
# File 'lib/wallets/callback_context.rb', line 20 def owner wallet&.owner end |
#to_h ⇒ Object
24 25 26 |
# File 'lib/wallets/callback_context.rb', line 24 def to_h super.compact end |