Class: Remitmd::Deposit
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#payee ⇒ Object
(also: #provider, #beneficiary)
readonly
Returns the value of attribute payee.
-
#payer ⇒ Object
(also: #depositor)
readonly
Returns the value of attribute payer.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ Deposit
constructor
A new instance of Deposit.
Methods inherited from Model
Constructor Details
#initialize(attrs) ⇒ Deposit
Returns a new instance of Deposit.
330 331 332 333 334 335 336 337 338 339 |
# File 'lib/remitmd/models.rb', line 330 def initialize(attrs) h = attrs.transform_keys(&:to_s) @id = h["id"] @payer = h["payer"] || h["depositor"] @payee = h["payee"] || h["provider"] || h["beneficiary"] @amount = decimal(h["amount"]) @status = h["status"] @expires_at = parse_time(h["expires_at"]) @created_at = parse_time(h["created_at"]) end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
341 342 343 |
# File 'lib/remitmd/models.rb', line 341 def amount @amount end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
341 342 343 |
# File 'lib/remitmd/models.rb', line 341 def created_at @created_at end |
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
341 342 343 |
# File 'lib/remitmd/models.rb', line 341 def expires_at @expires_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
341 342 343 |
# File 'lib/remitmd/models.rb', line 341 def id @id end |
#payee ⇒ Object (readonly) Also known as: provider, beneficiary
Returns the value of attribute payee.
341 342 343 |
# File 'lib/remitmd/models.rb', line 341 def payee @payee end |
#payer ⇒ Object (readonly) Also known as: depositor
Returns the value of attribute payer.
341 342 343 |
# File 'lib/remitmd/models.rb', line 341 def payer @payer end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
341 342 343 |
# File 'lib/remitmd/models.rb', line 341 def status @status end |