Package com.duffel.sdk.model
Class Offer
java.lang.Object
com.duffel.sdk.model.Offer
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-01-16T15:26:22.356688490+07:00[Asia/Bangkok]")
public class Offer
extends Object
Offer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumGets or Sets allowedPassengerIdentityDocumentTypes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllowedPassengerIdentityDocumentTypesItem(Offer.AllowedPassengerIdentityDocumentTypesEnum allowedPassengerIdentityDocumentTypesItem) addAvailableServicesItem(OfferService availableServicesItem) addPassengersItem(OfferPassenger passengersItem) addSlicesItem(OfferSlice slicesItem) allowedPassengerIdentityDocumentTypes(List<Offer.AllowedPassengerIdentityDocumentTypesEnum> allowedPassengerIdentityDocumentTypes) availableServices(List<OfferService> availableServices) baseAmount(String baseAmount) baseCurrency(String baseCurrency) conditions(OfferConditions1 conditions) createdAt(LocalDateTime createdAt) booleanexpiresAt(LocalDateTime expiresAt) The types of identity documents that may be provided for the passengers when creating an order based on this offer.@Valid List<OfferService> The services that can be booked along with the offer but are not included by default, for example an additional checked bag.The base price of the offer for all passengers, excluding taxes.The currency of the `base_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.@Valid OfferConditions1Get conditionsThe [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the offer was createdThe [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime expiry of the offer before which the traveller should use this offer to create an order.getId()Duffel's unique identifier for the offerWhether the offer request was created in live mode.@Valid OfferIndexOwnergetOwner()Get ownerPartial offers are a new concept we're introducing as a part of a new multi-step search flow that we're currently experimenting with.Whether identity documents must be provided for each of the passengers when creating an order based on this offer.@Valid List<OfferPassenger> The passengers included in the offerGet paymentRequirements@Valid List<OfferSlice> The [slices](/docs/api/overview/key-principles) that make up this offer.The amount of tax payable on the offer for all passengersorg.openapitools.jackson.nullable.JsonNullable<String> The currency of the `tax_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.org.openapitools.jackson.nullable.JsonNullable<String> The total price of the offer for all passengers, including taxes.The currency of the `total_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.An estimate of the total carbon dioxide (CO₂) emissions when all of the passengers fly this offer's itinerary, measured in kilogramsThe [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the offer was last updatedinthashCode()owner(OfferIndexOwner owner) passengerIdentityDocumentsRequired(Boolean passengerIdentityDocumentsRequired) passengers(List<OfferPassenger> passengers) paymentRequirements(OfferIndexPaymentRequirements paymentRequirements) voidsetAllowedPassengerIdentityDocumentTypes(List<Offer.AllowedPassengerIdentityDocumentTypesEnum> allowedPassengerIdentityDocumentTypes) voidsetAvailableServices(List<OfferService> availableServices) voidsetBaseAmount(String baseAmount) voidsetBaseCurrency(String baseCurrency) voidsetConditions(OfferConditions1 conditions) voidsetCreatedAt(LocalDateTime createdAt) voidsetExpiresAt(LocalDateTime expiresAt) voidvoidsetLiveMode(Boolean liveMode) voidsetOwner(OfferIndexOwner owner) voidsetPartial(Boolean partial) voidsetPassengerIdentityDocumentsRequired(Boolean passengerIdentityDocumentsRequired) voidsetPassengers(List<OfferPassenger> passengers) voidsetPaymentRequirements(OfferIndexPaymentRequirements paymentRequirements) voidsetSlices(List<OfferSlice> slices) voidsetTaxAmount(String taxAmount) voidsetTaxAmount_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<String> taxAmount) voidsetTaxCurrency(String taxCurrency) voidsetTaxCurrency_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<String> taxCurrency) voidsetTotalAmount(String totalAmount) voidsetTotalCurrency(String totalCurrency) voidsetTotalEmissionsKg(String totalEmissionsKg) voidsetUpdatedAt(LocalDateTime updatedAt) slices(List<OfferSlice> slices) taxCurrency(String taxCurrency) toString()totalAmount(String totalAmount) totalCurrency(String totalCurrency) totalEmissionsKg(String totalEmissionsKg) updatedAt(LocalDateTime updatedAt)
-
Field Details
-
JSON_PROPERTY_ALLOWED_PASSENGER_IDENTITY_DOCUMENT_TYPES
- See Also:
-
JSON_PROPERTY_AVAILABLE_SERVICES
- See Also:
-
JSON_PROPERTY_BASE_AMOUNT
- See Also:
-
JSON_PROPERTY_BASE_CURRENCY
- See Also:
-
JSON_PROPERTY_CONDITIONS
- See Also:
-
JSON_PROPERTY_CREATED_AT
- See Also:
-
JSON_PROPERTY_EXPIRES_AT
- See Also:
-
JSON_PROPERTY_ID
- See Also:
-
JSON_PROPERTY_LIVE_MODE
- See Also:
-
JSON_PROPERTY_OWNER
- See Also:
-
JSON_PROPERTY_PARTIAL
- See Also:
-
JSON_PROPERTY_PASSENGER_IDENTITY_DOCUMENTS_REQUIRED
- See Also:
-
JSON_PROPERTY_PASSENGERS
- See Also:
-
JSON_PROPERTY_PAYMENT_REQUIREMENTS
- See Also:
-
JSON_PROPERTY_SLICES
- See Also:
-
JSON_PROPERTY_TAX_AMOUNT
- See Also:
-
JSON_PROPERTY_TAX_CURRENCY
- See Also:
-
JSON_PROPERTY_TOTAL_AMOUNT
- See Also:
-
JSON_PROPERTY_TOTAL_CURRENCY
- See Also:
-
JSON_PROPERTY_TOTAL_EMISSIONS_KG
- See Also:
-
JSON_PROPERTY_UPDATED_AT
- See Also:
-
-
Constructor Details
-
Offer
public Offer()
-
-
Method Details
-
allowedPassengerIdentityDocumentTypes
public Offer allowedPassengerIdentityDocumentTypes(List<Offer.AllowedPassengerIdentityDocumentTypesEnum> allowedPassengerIdentityDocumentTypes) -
addAllowedPassengerIdentityDocumentTypesItem
public Offer addAllowedPassengerIdentityDocumentTypesItem(Offer.AllowedPassengerIdentityDocumentTypesEnum allowedPassengerIdentityDocumentTypesItem) -
getAllowedPassengerIdentityDocumentTypes
@Nullable public List<Offer.AllowedPassengerIdentityDocumentTypesEnum> getAllowedPassengerIdentityDocumentTypes()The types of identity documents that may be provided for the passengers when creating an order based on this offer. Currently, the only supported type is `passport`. If this is `[]`, then you must not provide identity documents.- Returns:
- allowedPassengerIdentityDocumentTypes
-
setAllowedPassengerIdentityDocumentTypes
public void setAllowedPassengerIdentityDocumentTypes(List<Offer.AllowedPassengerIdentityDocumentTypesEnum> allowedPassengerIdentityDocumentTypes) -
availableServices
-
addAvailableServicesItem
-
getAvailableServices
The services that can be booked along with the offer but are not included by default, for example an additional checked bag. This field is only returned in the [Get single offer](/docs/api/offers/get-offer-by-id) endpoint. When there are no services available, or we don't support services for the airline, this list will be empty. If you want to know which airlines we support services for, please get in touch with the Duffel support team at <help@duffel.com>.- Returns:
- availableServices
-
setAvailableServices
-
baseAmount
-
getBaseAmount
The base price of the offer for all passengers, excluding taxes. It does not include the base amount of any service(s) that might be booked with the offer.- Returns:
- baseAmount
-
setBaseAmount
-
baseCurrency
-
getBaseCurrency
The currency of the `base_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. It will match your organisation's billing currency unless you’re using Duffel as an accredited IATA agent, in which case it will be in the currency provided by the airline (which will usually be based on the country where your IATA agency is registered).- Returns:
- baseCurrency
-
setBaseCurrency
-
conditions
-
getConditions
Get conditions- Returns:
- conditions
-
setConditions
-
createdAt
-
getCreatedAt
The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the offer was created- Returns:
- createdAt
-
setCreatedAt
-
expiresAt
-
getExpiresAt
The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime expiry of the offer before which the traveller should use this offer to create an order. After this time the offer can no longer be used to create an order.- Returns:
- expiresAt
-
setExpiresAt
-
id
-
getId
Duffel's unique identifier for the offer- Returns:
- id
-
setId
-
liveMode
-
getLiveMode
Whether the offer request was created in live mode. This field will be set to `true` if the offer request was created in live mode, or `false` if it was created in test mode.- Returns:
- liveMode
-
setLiveMode
-
owner
-
getOwner
Get owner- Returns:
- owner
-
setOwner
-
partial
-
getPartial
Partial offers are a new concept we're introducing as a part of a new multi-step search flow that we're currently experimenting with. A partial offer can't be booked directly, but it can be combined with other partial offers to form a full offer. Partial offers are only ever returned through the multi-step search flow. So there's no need to add any handling to deal with partial offers if you're using the traditional `OfferRequest` search flow to create offers.- Returns:
- partial
-
setPartial
-
passengerIdentityDocumentsRequired
-
getPassengerIdentityDocumentsRequired
Whether identity documents must be provided for each of the passengers when creating an order based on this offer. If this is `true`, you must provide an identity document for every passenger.- Returns:
- passengerIdentityDocumentsRequired
-
setPassengerIdentityDocumentsRequired
-
passengers
-
addPassengersItem
-
getPassengers
The passengers included in the offer- Returns:
- passengers
-
setPassengers
-
paymentRequirements
-
getPaymentRequirements
Get paymentRequirements- Returns:
- paymentRequirements
-
setPaymentRequirements
-
slices
-
addSlicesItem
-
getSlices
The [slices](/docs/api/overview/key-principles) that make up this offer. Each slice will include one or more [segments](/docs/api/overview/key-principles), the specific flights that the airline is offering to take the passengers from the slice's `origin` to its `destination`. [Partial](#offers-schema-partial) offers contain a single slice as each partial offer is for a particular slice of the journey.- Returns:
- slices
-
setSlices
-
taxAmount
-
getTaxAmount
The amount of tax payable on the offer for all passengers- Returns:
- taxAmount
-
getTaxAmount_JsonNullable
-
setTaxAmount_JsonNullable
public void setTaxAmount_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<String> taxAmount) -
setTaxAmount
-
taxCurrency
-
getTaxCurrency
The currency of the `tax_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. It will match your organisation's billing currency unless you’re using Duffel as an accredited IATA agent, in which case it will be in the currency provided by the airline (which will usually be based on the country where your IATA agency is registered).- Returns:
- taxCurrency
-
getTaxCurrency_JsonNullable
-
setTaxCurrency_JsonNullable
public void setTaxCurrency_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<String> taxCurrency) -
setTaxCurrency
-
totalAmount
-
getTotalAmount
The total price of the offer for all passengers, including taxes. It does not include the total price of any service(s) that might be booked with the offer.- Returns:
- totalAmount
-
setTotalAmount
-
totalCurrency
-
getTotalCurrency
The currency of the `total_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. It will match your organisation's billing currency unless you’re using Duffel as an accredited IATA agent, in which case it will be in the currency provided by the airline (which will usually be based on the country where your IATA agency is registered).- Returns:
- totalCurrency
-
setTotalCurrency
-
totalEmissionsKg
-
getTotalEmissionsKg
An estimate of the total carbon dioxide (CO₂) emissions when all of the passengers fly this offer's itinerary, measured in kilograms- Returns:
- totalEmissionsKg
-
setTotalEmissionsKg
-
updatedAt
-
getUpdatedAt
The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the offer was last updated- Returns:
- updatedAt
-
setUpdatedAt
-
equals
-
hashCode
public int hashCode() -
toString
-