Class: DuffelAPI::Resources::Order
- Inherits:
-
BaseResource
- Object
- BaseResource
- DuffelAPI::Resources::Order
- Defined in:
- lib/duffel_api/resources/order.rb
Instance Attribute Summary collapse
-
#base_amount ⇒ Object
readonly
Returns the value of attribute base_amount.
-
#base_currency ⇒ Object
readonly
Returns the value of attribute base_currency.
-
#booking_reference ⇒ Object
readonly
Returns the value of attribute booking_reference.
-
#cancelled_at ⇒ Object
readonly
Returns the value of attribute cancelled_at.
-
#conditions ⇒ Object
readonly
Returns the value of attribute conditions.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#documents ⇒ Object
readonly
Returns the value of attribute documents.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#live_mode ⇒ Object
readonly
Returns the value of attribute live_mode.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
-
#passengers ⇒ Object
readonly
Returns the value of attribute passengers.
-
#payment_status ⇒ Object
readonly
Returns the value of attribute payment_status.
-
#services ⇒ Object
readonly
Returns the value of attribute services.
-
#slices ⇒ Object
readonly
Returns the value of attribute slices.
-
#synced_at ⇒ Object
readonly
Returns the value of attribute synced_at.
-
#tax_amount ⇒ Object
readonly
Returns the value of attribute tax_amount.
-
#tax_currency ⇒ Object
readonly
Returns the value of attribute tax_currency.
-
#total_amount ⇒ Object
readonly
Returns the value of attribute total_amount.
-
#total_currency ⇒ Object
readonly
Returns the value of attribute total_currency.
Instance Method Summary collapse
-
#initialize(object, response = nil) ⇒ Order
constructor
A new instance of Order.
Methods inherited from BaseResource
Constructor Details
#initialize(object, response = nil) ⇒ Order
Returns a new instance of Order.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/duffel_api/resources/order.rb', line 28 def initialize(object, response = nil) @object = object @base_amount = object["base_amount"] @base_currency = object["base_currency"] @booking_reference = object["booking_reference"] @cancelled_at = object["cancelled_at"] @conditions = object["conditions"] @created_at = object["created_at"] @documents = object["documents"] @id = object["id"] @live_mode = object["live_mode"] @metadata = object["metadata"] @owner = object["owner"] @passengers = object["passengers"] @payment_status = object["payment_status"] @services = object["services"] @slices = object["slices"] @synced_at = object["synced_at"] @tax_amount = object["tax_amount"] @tax_currency = object["tax_currency"] @total_amount = object["total_amount"] @total_currency = object["total_currency"] super(object, response) end |
Instance Attribute Details
#base_amount ⇒ Object (readonly)
Returns the value of attribute base_amount.
7 8 9 |
# File 'lib/duffel_api/resources/order.rb', line 7 def base_amount @base_amount end |
#base_currency ⇒ Object (readonly)
Returns the value of attribute base_currency.
8 9 10 |
# File 'lib/duffel_api/resources/order.rb', line 8 def base_currency @base_currency end |
#booking_reference ⇒ Object (readonly)
Returns the value of attribute booking_reference.
9 10 11 |
# File 'lib/duffel_api/resources/order.rb', line 9 def booking_reference @booking_reference end |
#cancelled_at ⇒ Object (readonly)
Returns the value of attribute cancelled_at.
10 11 12 |
# File 'lib/duffel_api/resources/order.rb', line 10 def cancelled_at @cancelled_at end |
#conditions ⇒ Object (readonly)
Returns the value of attribute conditions.
11 12 13 |
# File 'lib/duffel_api/resources/order.rb', line 11 def conditions @conditions end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
12 13 14 |
# File 'lib/duffel_api/resources/order.rb', line 12 def created_at @created_at end |
#documents ⇒ Object (readonly)
Returns the value of attribute documents.
13 14 15 |
# File 'lib/duffel_api/resources/order.rb', line 13 def documents @documents end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
14 15 16 |
# File 'lib/duffel_api/resources/order.rb', line 14 def id @id end |
#live_mode ⇒ Object (readonly)
Returns the value of attribute live_mode.
15 16 17 |
# File 'lib/duffel_api/resources/order.rb', line 15 def live_mode @live_mode end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
16 17 18 |
# File 'lib/duffel_api/resources/order.rb', line 16 def @metadata end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
17 18 19 |
# File 'lib/duffel_api/resources/order.rb', line 17 def owner @owner end |
#passengers ⇒ Object (readonly)
Returns the value of attribute passengers.
18 19 20 |
# File 'lib/duffel_api/resources/order.rb', line 18 def passengers @passengers end |
#payment_status ⇒ Object (readonly)
Returns the value of attribute payment_status.
19 20 21 |
# File 'lib/duffel_api/resources/order.rb', line 19 def payment_status @payment_status end |
#services ⇒ Object (readonly)
Returns the value of attribute services.
20 21 22 |
# File 'lib/duffel_api/resources/order.rb', line 20 def services @services end |
#slices ⇒ Object (readonly)
Returns the value of attribute slices.
21 22 23 |
# File 'lib/duffel_api/resources/order.rb', line 21 def slices @slices end |
#synced_at ⇒ Object (readonly)
Returns the value of attribute synced_at.
22 23 24 |
# File 'lib/duffel_api/resources/order.rb', line 22 def synced_at @synced_at end |
#tax_amount ⇒ Object (readonly)
Returns the value of attribute tax_amount.
23 24 25 |
# File 'lib/duffel_api/resources/order.rb', line 23 def tax_amount @tax_amount end |
#tax_currency ⇒ Object (readonly)
Returns the value of attribute tax_currency.
24 25 26 |
# File 'lib/duffel_api/resources/order.rb', line 24 def tax_currency @tax_currency end |
#total_amount ⇒ Object (readonly)
Returns the value of attribute total_amount.
25 26 27 |
# File 'lib/duffel_api/resources/order.rb', line 25 def total_amount @total_amount end |
#total_currency ⇒ Object (readonly)
Returns the value of attribute total_currency.
26 27 28 |
# File 'lib/duffel_api/resources/order.rb', line 26 def total_currency @total_currency end |