Class: DuffelAPI::Resources::Order

Inherits:
BaseResource show all
Defined in:
lib/duffel_api/resources/order.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseResource

#api_response

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_amountObject (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_currencyObject (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_referenceObject (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_atObject (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

#conditionsObject (readonly)

Returns the value of attribute conditions.



11
12
13
# File 'lib/duffel_api/resources/order.rb', line 11

def conditions
  @conditions
end

#created_atObject (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

#documentsObject (readonly)

Returns the value of attribute documents.



13
14
15
# File 'lib/duffel_api/resources/order.rb', line 13

def documents
  @documents
end

#idObject (readonly)

Returns the value of attribute id.



14
15
16
# File 'lib/duffel_api/resources/order.rb', line 14

def id
  @id
end

#live_modeObject (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

#metadataObject (readonly)

Returns the value of attribute metadata.



16
17
18
# File 'lib/duffel_api/resources/order.rb', line 16

def 
  @metadata
end

#ownerObject (readonly)

Returns the value of attribute owner.



17
18
19
# File 'lib/duffel_api/resources/order.rb', line 17

def owner
  @owner
end

#passengersObject (readonly)

Returns the value of attribute passengers.



18
19
20
# File 'lib/duffel_api/resources/order.rb', line 18

def passengers
  @passengers
end

#payment_statusObject (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

#servicesObject (readonly)

Returns the value of attribute services.



20
21
22
# File 'lib/duffel_api/resources/order.rb', line 20

def services
  @services
end

#slicesObject (readonly)

Returns the value of attribute slices.



21
22
23
# File 'lib/duffel_api/resources/order.rb', line 21

def slices
  @slices
end

#synced_atObject (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_amountObject (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_currencyObject (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_amountObject (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_currencyObject (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