Class: RuBittrex::Deposit

Inherits:
Object
  • Object
show all
Extended by:
ClientHelper
Includes:
Helpers
Defined in:
lib/ru_bittrex/deposit.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Helpers

#extract_timestamp

Constructor Details

#initialize(attrs = {}) ⇒ Deposit

Returns a new instance of Deposit.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/ru_bittrex/deposit.rb', line 10

def initialize(attrs = {})
  @id            = attrs["id"]
  @currency      = attrs["currencySymbol"]
  @quantity      = attrs["quantity"]
  @address       = attrs["cryptoAddress"]
  @address_tag   = attrs["cryptoAddressTag"]
  @tx_id         = attrs["txId"]
  @confirmations = attrs["confirmations"]
  @updated_at    = extract_timestamp(attrs["updatedAt"])
  @completed_at  = extract_timestamp(attrs["completedAt"])
  @status        = attrs["status"]
  @source        = attrs["source"]
  @raw           = attrs
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



6
7
8
# File 'lib/ru_bittrex/deposit.rb', line 6

def address
  @address
end

#address_tagObject (readonly)

Returns the value of attribute address_tag.



6
7
8
# File 'lib/ru_bittrex/deposit.rb', line 6

def address_tag
  @address_tag
end

#completed_atObject (readonly)

Returns the value of attribute completed_at.



6
7
8
# File 'lib/ru_bittrex/deposit.rb', line 6

def completed_at
  @completed_at
end

#confirmationsObject (readonly)

Returns the value of attribute confirmations.



6
7
8
# File 'lib/ru_bittrex/deposit.rb', line 6

def confirmations
  @confirmations
end

#currencyObject (readonly)

Returns the value of attribute currency.



6
7
8
# File 'lib/ru_bittrex/deposit.rb', line 6

def currency
  @currency
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/ru_bittrex/deposit.rb', line 6

def id
  @id
end

#quantityObject (readonly)

Returns the value of attribute quantity.



6
7
8
# File 'lib/ru_bittrex/deposit.rb', line 6

def quantity
  @quantity
end

#rawObject (readonly)

Returns the value of attribute raw.



6
7
8
# File 'lib/ru_bittrex/deposit.rb', line 6

def raw
  @raw
end

#sourceObject (readonly)

Returns the value of attribute source.



6
7
8
# File 'lib/ru_bittrex/deposit.rb', line 6

def source
  @source
end

#statusObject (readonly)

Returns the value of attribute status.



6
7
8
# File 'lib/ru_bittrex/deposit.rb', line 6

def status
  @status
end

#tx_idObject (readonly)

Returns the value of attribute tx_id.



6
7
8
# File 'lib/ru_bittrex/deposit.rb', line 6

def tx_id
  @tx_id
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



6
7
8
# File 'lib/ru_bittrex/deposit.rb', line 6

def updated_at
  @updated_at
end

Class Method Details

.closed(params = {}) ⇒ Object



25
26
27
# File 'lib/ru_bittrex/deposit.rb', line 25

def self.closed(params = {})
  collection _get('deposits/closed', params)
end

.get(id, params = {}) ⇒ Object



33
34
35
# File 'lib/ru_bittrex/deposit.rb', line 33

def self.get(id, params = {})
  new _get("deposits/#{id}", params)
end

.open(params = {}) ⇒ Object



29
30
31
# File 'lib/ru_bittrex/deposit.rb', line 29

def self.open(params = {})
  collection _get('deposits/open', params)
end