Class: RuBittrex::Currency

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Currency

Returns a new instance of Currency.



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

def initialize(attrs = {})
  @symbol            = attrs["symbol"]
  @name              = attrs["name"]
  @coin_type         = attrs["coinType"]
  @status            = attrs["status"]
  @min_confirmations = attrs["minConfirmations"]
  @notice            = attrs["notice"]
  @tx_fee            = attrs["txFee"]
  @logo_url          = attrs["logoUrl"]
  @prohibited_in     = attrs["prohibitedIn"]
  @address           = attrs["baseAddress"]
  @terms_of_service  = attrs["associatedTermsOfService"]
  @raw               = attrs
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



5
6
7
# File 'lib/ru_bittrex/currency.rb', line 5

def address
  @address
end

#coin_typeObject (readonly)

Returns the value of attribute coin_type.



5
6
7
# File 'lib/ru_bittrex/currency.rb', line 5

def coin_type
  @coin_type
end

#logo_urlObject (readonly)

Returns the value of attribute logo_url.



5
6
7
# File 'lib/ru_bittrex/currency.rb', line 5

def logo_url
  @logo_url
end

#min_confirmationsObject (readonly)

Returns the value of attribute min_confirmations.



5
6
7
# File 'lib/ru_bittrex/currency.rb', line 5

def min_confirmations
  @min_confirmations
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/ru_bittrex/currency.rb', line 5

def name
  @name
end

#noticeObject (readonly)

Returns the value of attribute notice.



5
6
7
# File 'lib/ru_bittrex/currency.rb', line 5

def notice
  @notice
end

#prohibited_inObject (readonly)

Returns the value of attribute prohibited_in.



5
6
7
# File 'lib/ru_bittrex/currency.rb', line 5

def prohibited_in
  @prohibited_in
end

#rawObject (readonly)

Returns the value of attribute raw.



5
6
7
# File 'lib/ru_bittrex/currency.rb', line 5

def raw
  @raw
end

#statusObject (readonly)

Returns the value of attribute status.



5
6
7
# File 'lib/ru_bittrex/currency.rb', line 5

def status
  @status
end

#symbolObject (readonly)

Returns the value of attribute symbol.



5
6
7
# File 'lib/ru_bittrex/currency.rb', line 5

def symbol
  @symbol
end

#terms_of_serviceObject (readonly) Also known as: terms

Returns the value of attribute terms_of_service.



5
6
7
# File 'lib/ru_bittrex/currency.rb', line 5

def terms_of_service
  @terms_of_service
end

#tx_feeObject (readonly)

Returns the value of attribute tx_fee.



5
6
7
# File 'lib/ru_bittrex/currency.rb', line 5

def tx_fee
  @tx_fee
end

Class Method Details

.all(params = {}) ⇒ Object



24
25
26
# File 'lib/ru_bittrex/currency.rb', line 24

def self.all(params = {})
  collection _get('currencies', params)
end

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



28
29
30
# File 'lib/ru_bittrex/currency.rb', line 28

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