Class: Bittrex::Withdrawl

Inherits:
Object
  • Object
show all
Defined in:
lib/bittrex/withdrawl.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Withdrawl

Returns a new instance of Withdrawl.



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/bittrex/withdrawl.rb', line 7

def initialize(attrs = {})
  @id = attrs['PaymentUuid']
  @currency = attrs['Currency']
  @quantity = attrs['Amount']
  @address = attrs['Address']
  @authorized = attrs['Authorized']
  @pending = attrs['PendingPayment']
  @canceled = attrs['Canceled']
  @invalid_address = attrs['Canceled']
  @transaction_cost = attrs['TxCost']
  @transaction_id = attrs['TxId']
  @executed_at = Time.parse(attrs['Opened'])
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



3
4
5
# File 'lib/bittrex/withdrawl.rb', line 3

def address
  @address
end

#authorizedObject (readonly)

Returns the value of attribute authorized.



3
4
5
# File 'lib/bittrex/withdrawl.rb', line 3

def authorized
  @authorized
end

#canceledObject (readonly)

Returns the value of attribute canceled.



3
4
5
# File 'lib/bittrex/withdrawl.rb', line 3

def canceled
  @canceled
end

#currencyObject (readonly)

Returns the value of attribute currency.



3
4
5
# File 'lib/bittrex/withdrawl.rb', line 3

def currency
  @currency
end

#executed_atObject (readonly)

Returns the value of attribute executed_at.



3
4
5
# File 'lib/bittrex/withdrawl.rb', line 3

def executed_at
  @executed_at
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/bittrex/withdrawl.rb', line 3

def id
  @id
end

#invalid_addressObject (readonly)

Returns the value of attribute invalid_address.



3
4
5
# File 'lib/bittrex/withdrawl.rb', line 3

def invalid_address
  @invalid_address
end

#pendingObject (readonly)

Returns the value of attribute pending.



3
4
5
# File 'lib/bittrex/withdrawl.rb', line 3

def pending
  @pending
end

#quantityObject (readonly)

Returns the value of attribute quantity.



3
4
5
# File 'lib/bittrex/withdrawl.rb', line 3

def quantity
  @quantity
end

#transaction_costObject (readonly)

Returns the value of attribute transaction_cost.



3
4
5
# File 'lib/bittrex/withdrawl.rb', line 3

def transaction_cost
  @transaction_cost
end

#transaction_idObject (readonly)

Returns the value of attribute transaction_id.



3
4
5
# File 'lib/bittrex/withdrawl.rb', line 3

def transaction_id
  @transaction_id
end

Class Method Details

.allObject



21
22
23
# File 'lib/bittrex/withdrawl.rb', line 21

def self.all
  client.get('account/getwithdrawalhistory').map{|data| new(data) }
end