Class: GeminiApi::Transaction

Inherits:
Struct
  • Object
show all
Defined in:
lib/gemini_api/transaction.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#addressObject

Returns the value of attribute address

Returns:

  • (Object)

    the current value of address



4
5
6
# File 'lib/gemini_api/transaction.rb', line 4

def address
  @address
end

#amountObject

Returns the value of attribute amount

Returns:

  • (Object)

    the current value of amount



4
5
6
# File 'lib/gemini_api/transaction.rb', line 4

def amount
  @amount
end

#raw_dataObject

Returns the value of attribute raw_data

Returns:

  • (Object)

    the current value of raw_data



4
5
6
# File 'lib/gemini_api/transaction.rb', line 4

def raw_data
  @raw_data
end

#withdrawal_idObject

Returns the value of attribute withdrawal_id

Returns:

  • (Object)

    the current value of withdrawal_id



4
5
6
# File 'lib/gemini_api/transaction.rb', line 4

def withdrawal_id
  @withdrawal_id
end

Class Method Details

.build(raw_data) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/gemini_api/transaction.rb', line 5

def self.build(raw_data)
  new(
    address: raw_data['address'],
    amount: raw_data['amount'].to_f,
    withdrawal_id: raw_data['withdrawalId'],
    raw_data: raw_data
  )
end