Class: Remitmd::Escrow
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.
-
#fee ⇒ Object
readonly
Returns the value of attribute fee.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#memo ⇒ Object
readonly
Returns the value of attribute memo.
-
#milestones ⇒ Object
readonly
Returns the value of attribute milestones.
-
#payee ⇒ Object
readonly
Returns the value of attribute payee.
-
#payer ⇒ Object
readonly
Returns the value of attribute payer.
-
#splits ⇒ Object
readonly
Returns the value of attribute splits.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ Escrow
constructor
A new instance of Escrow.
Methods inherited from Model
Constructor Details
#initialize(attrs) ⇒ Escrow
Returns a new instance of Escrow.
187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/remitmd/models.rb', line 187 def initialize(attrs) h = attrs.transform_keys(&:to_s) @id = h["invoice_id"] || h["id"] @payer = h["payer"] @payee = h["payee"] @amount = decimal(h["amount"]) @fee = decimal(h["fee"] || "0") @status = h["status"] @memo = h["memo"] || "" @milestones = h["milestones"] || [] @splits = h["splits"] || [] @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.
202 203 204 |
# File 'lib/remitmd/models.rb', line 202 def amount @amount end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
202 203 204 |
# File 'lib/remitmd/models.rb', line 202 def created_at @created_at end |
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
202 203 204 |
# File 'lib/remitmd/models.rb', line 202 def expires_at @expires_at end |
#fee ⇒ Object (readonly)
Returns the value of attribute fee.
202 203 204 |
# File 'lib/remitmd/models.rb', line 202 def fee @fee end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
202 203 204 |
# File 'lib/remitmd/models.rb', line 202 def id @id end |
#memo ⇒ Object (readonly)
Returns the value of attribute memo.
202 203 204 |
# File 'lib/remitmd/models.rb', line 202 def memo @memo end |
#milestones ⇒ Object (readonly)
Returns the value of attribute milestones.
202 203 204 |
# File 'lib/remitmd/models.rb', line 202 def milestones @milestones end |
#payee ⇒ Object (readonly)
Returns the value of attribute payee.
202 203 204 |
# File 'lib/remitmd/models.rb', line 202 def payee @payee end |
#payer ⇒ Object (readonly)
Returns the value of attribute payer.
202 203 204 |
# File 'lib/remitmd/models.rb', line 202 def payer @payer end |
#splits ⇒ Object (readonly)
Returns the value of attribute splits.
202 203 204 |
# File 'lib/remitmd/models.rb', line 202 def splits @splits end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
202 203 204 |
# File 'lib/remitmd/models.rb', line 202 def status @status end |