Class: DuffelAPI::Resources::Offer
- Inherits:
-
BaseResource
- Object
- BaseResource
- DuffelAPI::Resources::Offer
- Defined in:
- lib/duffel_api/resources/offer.rb
Instance Attribute Summary collapse
-
#allowed_passenger_identity_document_types ⇒ Object
readonly
Returns the value of attribute allowed_passenger_identity_document_types.
-
#available_services ⇒ Object
readonly
Returns the value of attribute available_services.
-
#base_amount ⇒ Object
readonly
Returns the value of attribute base_amount.
-
#base_currency ⇒ Object
readonly
Returns the value of attribute base_currency.
-
#conditions ⇒ Object
readonly
Returns the value of attribute conditions.
-
#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.
-
#live_mode ⇒ Object
readonly
Returns the value of attribute live_mode.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
-
#passenger_identity_documents_required ⇒ Object
readonly
Returns the value of attribute passenger_identity_documents_required.
-
#passengers ⇒ Object
readonly
Returns the value of attribute passengers.
-
#payment_requirements ⇒ Object
readonly
Returns the value of attribute payment_requirements.
-
#slices ⇒ Object
readonly
Returns the value of attribute slices.
-
#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.
-
#total_emissions_kg ⇒ Object
readonly
Returns the value of attribute total_emissions_kg.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(object, response = nil) ⇒ Offer
constructor
A new instance of Offer.
Methods inherited from BaseResource
Constructor Details
#initialize(object, response = nil) ⇒ Offer
Returns a new instance of Offer.
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 54 55 |
# File 'lib/duffel_api/resources/offer.rb', line 28 def initialize(object, response = nil) @object = object @allowed_passenger_identity_document_types = object["allowed_passenger_identity_document_types"] @available_services = object["available_services"] @base_amount = object["base_amount"] @base_currency = object["base_currency"] @conditions = object["conditions"] @created_at = object["created_at"] @expires_at = object["expires_at"] @id = object["id"] @live_mode = object["live_mode"] @owner = object["owner"] @passenger_identity_documents_required = object["passenger_identity_documents_required"] @passengers = object["passengers"] @payment_requirements = object["payment_requirements"] @slices = object["slices"] @tax_amount = object["tax_amount"] @tax_currency = object["tax_currency"] @total_amount = object["total_amount"] @total_currency = object["total_currency"] @total_emissions_kg = object["total_emissions_kg"] @updated_at = object["updated_at"] super(object, response) end |
Instance Attribute Details
#allowed_passenger_identity_document_types ⇒ Object (readonly)
Returns the value of attribute allowed_passenger_identity_document_types.
7 8 9 |
# File 'lib/duffel_api/resources/offer.rb', line 7 def allowed_passenger_identity_document_types @allowed_passenger_identity_document_types end |
#available_services ⇒ Object (readonly)
Returns the value of attribute available_services.
8 9 10 |
# File 'lib/duffel_api/resources/offer.rb', line 8 def available_services @available_services end |
#base_amount ⇒ Object (readonly)
Returns the value of attribute base_amount.
9 10 11 |
# File 'lib/duffel_api/resources/offer.rb', line 9 def base_amount @base_amount end |
#base_currency ⇒ Object (readonly)
Returns the value of attribute base_currency.
10 11 12 |
# File 'lib/duffel_api/resources/offer.rb', line 10 def base_currency @base_currency end |
#conditions ⇒ Object (readonly)
Returns the value of attribute conditions.
11 12 13 |
# File 'lib/duffel_api/resources/offer.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/offer.rb', line 12 def created_at @created_at end |
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
13 14 15 |
# File 'lib/duffel_api/resources/offer.rb', line 13 def expires_at @expires_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
14 15 16 |
# File 'lib/duffel_api/resources/offer.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/offer.rb', line 15 def live_mode @live_mode end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
16 17 18 |
# File 'lib/duffel_api/resources/offer.rb', line 16 def owner @owner end |
#passenger_identity_documents_required ⇒ Object (readonly)
Returns the value of attribute passenger_identity_documents_required.
17 18 19 |
# File 'lib/duffel_api/resources/offer.rb', line 17 def passenger_identity_documents_required @passenger_identity_documents_required end |
#passengers ⇒ Object (readonly)
Returns the value of attribute passengers.
18 19 20 |
# File 'lib/duffel_api/resources/offer.rb', line 18 def passengers @passengers end |
#payment_requirements ⇒ Object (readonly)
Returns the value of attribute payment_requirements.
19 20 21 |
# File 'lib/duffel_api/resources/offer.rb', line 19 def payment_requirements @payment_requirements end |
#slices ⇒ Object (readonly)
Returns the value of attribute slices.
20 21 22 |
# File 'lib/duffel_api/resources/offer.rb', line 20 def slices @slices end |
#tax_amount ⇒ Object (readonly)
Returns the value of attribute tax_amount.
21 22 23 |
# File 'lib/duffel_api/resources/offer.rb', line 21 def tax_amount @tax_amount end |
#tax_currency ⇒ Object (readonly)
Returns the value of attribute tax_currency.
22 23 24 |
# File 'lib/duffel_api/resources/offer.rb', line 22 def tax_currency @tax_currency end |
#total_amount ⇒ Object (readonly)
Returns the value of attribute total_amount.
23 24 25 |
# File 'lib/duffel_api/resources/offer.rb', line 23 def total_amount @total_amount end |
#total_currency ⇒ Object (readonly)
Returns the value of attribute total_currency.
24 25 26 |
# File 'lib/duffel_api/resources/offer.rb', line 24 def total_currency @total_currency end |
#total_emissions_kg ⇒ Object (readonly)
Returns the value of attribute total_emissions_kg.
25 26 27 |
# File 'lib/duffel_api/resources/offer.rb', line 25 def total_emissions_kg @total_emissions_kg end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
26 27 28 |
# File 'lib/duffel_api/resources/offer.rb', line 26 def updated_at @updated_at end |