Class: BudaApi::Models::Market

Inherits:
BaseModel show all
Defined in:
lib/buda_api/models.rb

Overview

Market model

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#raw, #to_h, #to_json

Constructor Details

#initialize(data) ⇒ Market

Returns a new instance of Market.



71
72
73
74
75
76
77
78
# File 'lib/buda_api/models.rb', line 71

def initialize(data)
  super(data)
  @id = data["id"]
  @name = data["name"] 
  @base_currency = data["base_currency"]
  @quote_currency = data["quote_currency"]
  @minimum_order_amount = parse_amount(data["minimum_order_amount"])
end

Instance Attribute Details

#base_currency ⇒ Object (readonly)

Returns the value of attribute base_currency.



80
81
82
# File 'lib/buda_api/models.rb', line 80

def base_currency
  @base_currency
end

#id ⇒ Object (readonly)

Returns the value of attribute id.



80
81
82
# File 'lib/buda_api/models.rb', line 80

def id
  @id
end

#minimum_order_amount ⇒ Object (readonly)

Returns the value of attribute minimum_order_amount.



80
81
82
# File 'lib/buda_api/models.rb', line 80

def minimum_order_amount
  @minimum_order_amount
end

#name ⇒ Object (readonly)

Returns the value of attribute name.



80
81
82
# File 'lib/buda_api/models.rb', line 80

def name
  @name
end

#quote_currency ⇒ Object (readonly)

Returns the value of attribute quote_currency.



80
81
82
# File 'lib/buda_api/models.rb', line 80

def quote_currency
  @quote_currency
end