Class: Bitfinex::Models::FundingInfo
- Defined in:
- lib/models/funding_info.rb
Instance Attribute Summary collapse
-
#duration_lend ⇒ Object
Returns the value of attribute duration_lend.
-
#duration_loan ⇒ Object
Returns the value of attribute duration_loan.
-
#symbol ⇒ Object
Returns the value of attribute symbol.
-
#yield_lend ⇒ Object
Returns the value of attribute yield_lend.
-
#yield_loan ⇒ Object
Returns the value of attribute yield_loan.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ FundingInfo
constructor
A new instance of FundingInfo.
- #serialize ⇒ Object
Methods inherited from Model
Constructor Details
#initialize(data) ⇒ FundingInfo
Returns a new instance of FundingInfo.
9 10 11 |
# File 'lib/models/funding_info.rb', line 9 def initialize (data) super(data, {}, []) end |
Instance Attribute Details
#duration_lend ⇒ Object
Returns the value of attribute duration_lend.
7 8 9 |
# File 'lib/models/funding_info.rb', line 7 def duration_lend @duration_lend end |
#duration_loan ⇒ Object
Returns the value of attribute duration_loan.
7 8 9 |
# File 'lib/models/funding_info.rb', line 7 def duration_loan @duration_loan end |
#symbol ⇒ Object
Returns the value of attribute symbol.
6 7 8 |
# File 'lib/models/funding_info.rb', line 6 def symbol @symbol end |
#yield_lend ⇒ Object
Returns the value of attribute yield_lend.
6 7 8 |
# File 'lib/models/funding_info.rb', line 6 def yield_lend @yield_lend end |
#yield_loan ⇒ Object
Returns the value of attribute yield_loan.
6 7 8 |
# File 'lib/models/funding_info.rb', line 6 def yield_loan @yield_loan end |
Class Method Details
.unserialize(arr) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/models/funding_info.rb', line 26 def self.unserialize (arr) symbol = arr[1] data = arr[2] { :symbol => symbol, :yield_loan => data[0], :yield_lend => data[1], :duration_loan => data[2], :duration_lend => data[3] } end |
Instance Method Details
#serialize ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/models/funding_info.rb', line 13 def serialize () [ 'sym', self.symbol, [ self.yield_loan, self.yield_lend, self.duration_loan, self.duration_lend ] ] end |