Class: BudaApi::Models::Withdrawal
- Defined in:
- lib/buda_api/models.rb
Overview
Withdrawal 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.
-
#fee ⇒ Object
readonly
Returns the value of attribute fee.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#withdrawal_data ⇒ Object
readonly
Returns the value of attribute withdrawal_data.
Instance Method Summary collapse
-
#initialize(data) ⇒ Withdrawal
constructor
A new instance of Withdrawal.
- #target_address ⇒ Object
Methods inherited from BaseModel
Constructor Details
#initialize(data) ⇒ Withdrawal
Returns a new instance of Withdrawal.
264 265 266 267 268 269 270 271 272 273 |
# File 'lib/buda_api/models.rb', line 264 def initialize(data) super(data) @id = data["id"] @created_at = parse_datetime(data["created_at"]) @amount = parse_amount(data["amount"]) @fee = parse_amount(data["fee"]) @currency = data["currency"] @state = data["state"] @withdrawal_data = data["withdrawal_data"] end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
275 276 277 |
# File 'lib/buda_api/models.rb', line 275 def amount @amount end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
275 276 277 |
# File 'lib/buda_api/models.rb', line 275 def created_at @created_at end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
275 276 277 |
# File 'lib/buda_api/models.rb', line 275 def currency @currency end |
#fee ⇒ Object (readonly)
Returns the value of attribute fee.
275 276 277 |
# File 'lib/buda_api/models.rb', line 275 def fee @fee end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
275 276 277 |
# File 'lib/buda_api/models.rb', line 275 def id @id end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
275 276 277 |
# File 'lib/buda_api/models.rb', line 275 def state @state end |
#withdrawal_data ⇒ Object (readonly)
Returns the value of attribute withdrawal_data.
275 276 277 |
# File 'lib/buda_api/models.rb', line 275 def withdrawal_data @withdrawal_data end |
Instance Method Details
#target_address ⇒ Object
277 278 279 |
# File 'lib/buda_api/models.rb', line 277 def target_address @withdrawal_data&.dig("target_address") end |