Class: DuffelAPI::Resources::Payment
- Inherits:
-
BaseResource
- Object
- BaseResource
- DuffelAPI::Resources::Payment
- Defined in:
- lib/duffel_api/resources/payment.rb
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.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(object, response = nil) ⇒ Payment
constructor
A new instance of Payment.
Methods inherited from BaseResource
Constructor Details
#initialize(object, response = nil) ⇒ Payment
Returns a new instance of Payment.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/duffel_api/resources/payment.rb', line 13 def initialize(object, response = nil) @object = object @amount = object["amount"] @created_at = object["created_at"] @currency = object["currency"] @id = object["id"] @type = object["type"] super(object, response) end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
7 8 9 |
# File 'lib/duffel_api/resources/payment.rb', line 7 def amount @amount end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
8 9 10 |
# File 'lib/duffel_api/resources/payment.rb', line 8 def created_at @created_at end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
9 10 11 |
# File 'lib/duffel_api/resources/payment.rb', line 9 def currency @currency end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/duffel_api/resources/payment.rb', line 10 def id @id end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
11 12 13 |
# File 'lib/duffel_api/resources/payment.rb', line 11 def type @type end |