Class: ItBitSDK::Wallet

Inherits:
Object
  • Object
show all
Defined in:
lib/it_bit_sdk/domain/wallet.rb

Defined Under Namespace

Classes: Balance

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#balancesObject

Returns the value of attribute balances.



3
4
5
# File 'lib/it_bit_sdk/domain/wallet.rb', line 3

def balances
  @balances
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/it_bit_sdk/domain/wallet.rb', line 3

def id
  @id
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/it_bit_sdk/domain/wallet.rb', line 3

def name
  @name
end

#user_idObject

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