Class: Buda::WithdrawalData

Inherits:
Object
  • Object
show all
Defined in:
lib/buda/resources/withdrawal_data.rb

Overview

for handling the total balance

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**kwargs) ⇒ WithdrawalData

Returns a new instance of WithdrawalData.



12
13
14
15
16
17
18
19
20
21
# File 'lib/buda/resources/withdrawal_data.rb', line 12

def initialize(**kwargs)
  @type = kwargs[:type]
  @id = kwargs[:id]
  @statement_ref = kwargs[:statement_ref]
  @created_at = kwargs[:created_at]
  @updated_at = kwargs[:updated_at]
  @target_address = kwargs[:target_address]
  @tx_hash = kwargs[:tx_hash]
  @fiat_account = FiatAccount.new(**kwargs[:fiat_account]) if kwargs[:fiat_account]
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



8
9
10
# File 'lib/buda/resources/withdrawal_data.rb', line 8

def created_at
  @created_at
end

#fiat_accountObject (readonly)

Returns the value of attribute fiat_account.



8
9
10
# File 'lib/buda/resources/withdrawal_data.rb', line 8

def 
  @fiat_account
end

#idObject (readonly)

Returns the value of attribute id.



8
9
10
# File 'lib/buda/resources/withdrawal_data.rb', line 8

def id
  @id
end

#statement_refObject (readonly)

Returns the value of attribute statement_ref.



8
9
10
# File 'lib/buda/resources/withdrawal_data.rb', line 8

def statement_ref
  @statement_ref
end

#target_addressObject (readonly)

Returns the value of attribute target_address.



8
9
10
# File 'lib/buda/resources/withdrawal_data.rb', line 8

def target_address
  @target_address
end

#tx_hashObject (readonly)

Returns the value of attribute tx_hash.



8
9
10
# File 'lib/buda/resources/withdrawal_data.rb', line 8

def tx_hash
  @tx_hash
end

#typeObject (readonly)

Returns the value of attribute type.



8
9
10
# File 'lib/buda/resources/withdrawal_data.rb', line 8

def type
  @type
end

#update_atObject (readonly)

Returns the value of attribute update_at.



8
9
10
# File 'lib/buda/resources/withdrawal_data.rb', line 8

def update_at
  @update_at
end

Instance Method Details

#inspectObject



27
28
29
# File 'lib/buda/resources/withdrawal_data.rb', line 27

def inspect
  "<WithdrawalData #{@type} (#{@created_at})>"
end

#to_sObject



23
24
25
# File 'lib/buda/resources/withdrawal_data.rb', line 23

def to_s
  "#{@type} (#{@created_at})"
end