Class: BudaApi::Models::Deposit
- Defined in:
- lib/buda_api/models.rb
Overview
Deposit model
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#deposit_data ⇒ Object
readonly
Returns the value of attribute deposit_data.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
- #address ⇒ Object
-
#initialize(data) ⇒ Deposit
constructor
A new instance of Deposit.
Methods inherited from BaseModel
Constructor Details
#initialize(data) ⇒ Deposit
Returns a new instance of Deposit.
284 285 286 287 288 289 290 291 292 |
# File 'lib/buda_api/models.rb', line 284 def initialize(data) super(data) @id = data["id"] @created_at = parse_datetime(data["created_at"]) @amount = parse_amount(data["amount"]) @currency = data["currency"] @state = data["state"] @deposit_data = data["deposit_data"] end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
294 295 296 |
# File 'lib/buda_api/models.rb', line 294 def amount @amount end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
294 295 296 |
# File 'lib/buda_api/models.rb', line 294 def created_at @created_at end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
294 295 296 |
# File 'lib/buda_api/models.rb', line 294 def currency @currency end |
#deposit_data ⇒ Object (readonly)
Returns the value of attribute deposit_data.
294 295 296 |
# File 'lib/buda_api/models.rb', line 294 def deposit_data @deposit_data end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
294 295 296 |
# File 'lib/buda_api/models.rb', line 294 def id @id end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
294 295 296 |
# File 'lib/buda_api/models.rb', line 294 def state @state end |
Instance Method Details
#address ⇒ Object
296 297 298 |
# File 'lib/buda_api/models.rb', line 296 def address @deposit_data&.dig("address") end |