Class: ItBitSDK::Wallet
- Inherits:
-
Object
- Object
- ItBitSDK::Wallet
- Defined in:
- lib/it_bit_sdk/domain/wallet.rb
Defined Under Namespace
Classes: Balance
Instance Attribute Summary collapse
-
#balances ⇒ Object
Returns the value of attribute balances.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#initialize(params:) ⇒ Wallet
constructor
A new instance of Wallet.
Constructor Details
#initialize(params:) ⇒ Wallet
Returns a new instance of Wallet.
15 16 17 18 19 20 |
# File 'lib/it_bit_sdk/domain/wallet.rb', line 15 def initialize(params:) @id = params['id'] @user_id = params['userId'] @name = params['name'] @balances = params['balances'].collect { |balance| ::ItBitSDK::Wallet::Balance.new(params: balance) } end |
Instance Attribute Details
#balances ⇒ Object
Returns the value of attribute balances.
3 4 5 |
# File 'lib/it_bit_sdk/domain/wallet.rb', line 3 def balances @balances end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/it_bit_sdk/domain/wallet.rb', line 3 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/it_bit_sdk/domain/wallet.rb', line 3 def name @name end |
#user_id ⇒ Object
Returns the value of attribute user_id.
3 4 5 |
# File 'lib/it_bit_sdk/domain/wallet.rb', line 3 def user_id @user_id end |