Class: BudaApi::Models::Quotation

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

Overview

Quotation model

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#raw, #to_h, #to_json

Constructor Details

#initialize(data) ⇒ Quotation

Returns a new instance of Quotation.



248
249
250
251
252
253
254
255
256
# File 'lib/buda_api/models.rb', line 248

def initialize(data)
  super(data)
  @type = data["type"]
  @reverse_amount = parse_amount(data["reverse_amount"])
  @amount = parse_amount(data["amount"])
  @base_balance_change = parse_amount(data["base_balance_change"])
  @quote_balance_change = parse_amount(data["quote_balance_change"])
  @fee = parse_amount(data["fee"])
end

Instance Attribute Details

#amount ⇒ Object (readonly)

Returns the value of attribute amount.



258
259
260
# File 'lib/buda_api/models.rb', line 258

def amount
  @amount
end

#base_balance_change ⇒ Object (readonly)

Returns the value of attribute base_balance_change.



258
259
260
# File 'lib/buda_api/models.rb', line 258

def base_balance_change
  @base_balance_change
end

#fee ⇒ Object (readonly)

Returns the value of attribute fee.



258
259
260
# File 'lib/buda_api/models.rb', line 258

def fee
  @fee
end

#quote_balance_change ⇒ Object (readonly)

Returns the value of attribute quote_balance_change.



258
259
260
# File 'lib/buda_api/models.rb', line 258

def quote_balance_change
  @quote_balance_change
end

#reverse_amount ⇒ Object (readonly)

Returns the value of attribute reverse_amount.



258
259
260
# File 'lib/buda_api/models.rb', line 258

def reverse_amount
  @reverse_amount
end

#type ⇒ Object (readonly)

Returns the value of attribute type.



258
259
260
# File 'lib/buda_api/models.rb', line 258

def type
  @type
end