Package com.duffel.sdk.api
Class OffersApi
java.lang.Object
com.duffel.sdk.api.OffersApi
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-01-16T15:26:22.356688490+07:00[Asia/Bangkok]")
public class OffersApi
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<GetOfferById200Response> getOfferById(String accept, String duffelVersion, String id, String acceptEncoding, Boolean returnAvailableServices) Get a single offer You should use this API to get the complete, up-to-date information about an offer.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetOfferById200Response>> getOfferByIdWithHttpInfo(String accept, String duffelVersion, String id, String acceptEncoding, Boolean returnAvailableServices) Get a single offer You should use this API to get the complete, up-to-date information about an offer.org.springframework.web.reactive.function.client.WebClient.ResponseSpecgetOfferByIdWithResponseSpec(String accept, String duffelVersion, String id, String acceptEncoding, Boolean returnAvailableServices) Get a single offer You should use this API to get the complete, up-to-date information about an offer.reactor.core.publisher.Mono<GetOffers200Response> getOffers(String accept, String duffelVersion, String offerRequestId, String acceptEncoding, String after, String before, Integer limit, String sort, Integer maxConnections) List offers Retrieves a list of offers for a given offer request specified by its ID.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetOffers200Response>> getOffersWithHttpInfo(String accept, String duffelVersion, String offerRequestId, String acceptEncoding, String after, String before, Integer limit, String sort, Integer maxConnections) List offers Retrieves a list of offers for a given offer request specified by its ID.org.springframework.web.reactive.function.client.WebClient.ResponseSpecgetOffersWithResponseSpec(String accept, String duffelVersion, String offerRequestId, String acceptEncoding, String after, String before, Integer limit, String sort, Integer maxConnections) List offers Retrieves a list of offers for a given offer request specified by its ID.voidsetApiClient(ApiClient apiClient) reactor.core.publisher.Mono<UpdateOfferPassengerById200Response> updateOfferPassengerById(String accept, String duffelVersion, String offerId, String offerPassengerId, String acceptEncoding, UpdateOfferPassengerByIdRequest updateOfferPassengerByIdRequest) Update a single offer passenger Some offer passenger fields are updateable.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<UpdateOfferPassengerById200Response>> updateOfferPassengerByIdWithHttpInfo(String accept, String duffelVersion, String offerId, String offerPassengerId, String acceptEncoding, UpdateOfferPassengerByIdRequest updateOfferPassengerByIdRequest) Update a single offer passenger Some offer passenger fields are updateable.org.springframework.web.reactive.function.client.WebClient.ResponseSpecupdateOfferPassengerByIdWithResponseSpec(String accept, String duffelVersion, String offerId, String offerPassengerId, String acceptEncoding, UpdateOfferPassengerByIdRequest updateOfferPassengerByIdRequest) Update a single offer passenger Some offer passenger fields are updateable.
-
Constructor Details
-
OffersApi
public OffersApi() -
OffersApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getOfferById
public reactor.core.publisher.Mono<GetOfferById200Response> getOfferById(String accept, String duffelVersion, String id, String acceptEncoding, Boolean returnAvailableServices) throws org.springframework.web.reactive.function.client.WebClientResponseException Get a single offer You should use this API to get the complete, up-to-date information about an offer. This endpoint **does not** guarantee that the offer will be available at the time of booking. Due to limitations in airlines' systems, you may see changes to the offer (e.g a changed `total_amount`). Additionally, you may receive information that may have not been included in the original offer such as baggage allowances. Optionally, you can request information about additional `available_services` that you can book with this offer by specifying the `return_available_services` query parameter.200 - A single offer
- Parameters:
accept- All responses from the API are in JSON format with UTF-8 encoding. An `Accept` header is required with every request.duffelVersion- You'll need to send a `Duffel-Version` header with each request so we know which version of the API you want to use. Currently, the only available API version is `beta`.id- Duffel's unique identifier for the offeracceptEncoding- We recommend enabling compression for responses returned by the API, since they can be very large. To enable compression, send an `Accept-Encoding` header. You'll need to configure your HTTP client to decompress responses. Most clients will have this functionality built-in.returnAvailableServices- When set to `true`, the offer resource returned will include all the `available_services` returned by the airline. If set to false, the offer resource won't include any `available_services`.- Returns:
- GetOfferById200Response
- Throws:
org.springframework.web.reactive.function.client.WebClientResponseException- if an error occurs while attempting to invoke the API
-
getOfferByIdWithHttpInfo
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetOfferById200Response>> getOfferByIdWithHttpInfo(String accept, String duffelVersion, String id, String acceptEncoding, Boolean returnAvailableServices) throws org.springframework.web.reactive.function.client.WebClientResponseException Get a single offer You should use this API to get the complete, up-to-date information about an offer. This endpoint **does not** guarantee that the offer will be available at the time of booking. Due to limitations in airlines' systems, you may see changes to the offer (e.g a changed `total_amount`). Additionally, you may receive information that may have not been included in the original offer such as baggage allowances. Optionally, you can request information about additional `available_services` that you can book with this offer by specifying the `return_available_services` query parameter.200 - A single offer
- Parameters:
accept- All responses from the API are in JSON format with UTF-8 encoding. An `Accept` header is required with every request.duffelVersion- You'll need to send a `Duffel-Version` header with each request so we know which version of the API you want to use. Currently, the only available API version is `beta`.id- Duffel's unique identifier for the offeracceptEncoding- We recommend enabling compression for responses returned by the API, since they can be very large. To enable compression, send an `Accept-Encoding` header. You'll need to configure your HTTP client to decompress responses. Most clients will have this functionality built-in.returnAvailableServices- When set to `true`, the offer resource returned will include all the `available_services` returned by the airline. If set to false, the offer resource won't include any `available_services`.- Returns:
- ResponseEntity<GetOfferById200Response>
- Throws:
org.springframework.web.reactive.function.client.WebClientResponseException- if an error occurs while attempting to invoke the API
-
getOfferByIdWithResponseSpec
public org.springframework.web.reactive.function.client.WebClient.ResponseSpec getOfferByIdWithResponseSpec(String accept, String duffelVersion, String id, String acceptEncoding, Boolean returnAvailableServices) throws org.springframework.web.reactive.function.client.WebClientResponseException Get a single offer You should use this API to get the complete, up-to-date information about an offer. This endpoint **does not** guarantee that the offer will be available at the time of booking. Due to limitations in airlines' systems, you may see changes to the offer (e.g a changed `total_amount`). Additionally, you may receive information that may have not been included in the original offer such as baggage allowances. Optionally, you can request information about additional `available_services` that you can book with this offer by specifying the `return_available_services` query parameter.200 - A single offer
- Parameters:
accept- All responses from the API are in JSON format with UTF-8 encoding. An `Accept` header is required with every request.duffelVersion- You'll need to send a `Duffel-Version` header with each request so we know which version of the API you want to use. Currently, the only available API version is `beta`.id- Duffel's unique identifier for the offeracceptEncoding- We recommend enabling compression for responses returned by the API, since they can be very large. To enable compression, send an `Accept-Encoding` header. You'll need to configure your HTTP client to decompress responses. Most clients will have this functionality built-in.returnAvailableServices- When set to `true`, the offer resource returned will include all the `available_services` returned by the airline. If set to false, the offer resource won't include any `available_services`.- Returns:
- ResponseSpec
- Throws:
org.springframework.web.reactive.function.client.WebClientResponseException- if an error occurs while attempting to invoke the API
-
getOffers
public reactor.core.publisher.Mono<GetOffers200Response> getOffers(String accept, String duffelVersion, String offerRequestId, String acceptEncoding, String after, String before, Integer limit, String sort, Integer maxConnections) throws org.springframework.web.reactive.function.client.WebClientResponseException List offers Retrieves a list of offers for a given offer request specified by its ID. Unless you specify a `sort` parameter, the results may be returned in any order. This endpoint does not return the complete, up-to-date information on each offer. The [Get a single offer](/docs/api/offers/get-offer-by-id) endpoint should be called for a given offer in order to get complete and up-to-date information.200 - A paginated list of offers
- Parameters:
accept- All responses from the API are in JSON format with UTF-8 encoding. An `Accept` header is required with every request.duffelVersion- You'll need to send a `Duffel-Version` header with each request so we know which version of the API you want to use. Currently, the only available API version is `beta`.offerRequestId- Duffel's unique identifier for the offer request, returned when it was createdacceptEncoding- We recommend enabling compression for responses returned by the API, since they can be very large. To enable compression, send an `Accept-Encoding` header. You'll need to configure your HTTP client to decompress responses. Most clients will have this functionality built-in.after- A cursor pointing to the previous page of records. For more information on how to paginate through records, see the [Pagination](/docs/api/overview/pagination) section.before- A cursor pointing to the next page of records. For more information on how to paginate through records, see the [Pagination](/docs/api/overview/pagination) section.limit- The maximum number of records to return per page. Defaults to `50`. May be set to any integer between `1` and `200`. For more information on how to paginate through records, see the [Pagination](/docs/api/overview/pagination) section.sort- By default, the offers will be returned sorted by ID in ascending order. This parameter allows you to sort the list of offers by `total_amount` or `total_duration`. By default the sorting order will be ascending, if you wish to sort in descending order a `-` will need to be prepended to the sorting attribute (i.e: `-total_amount`).maxConnections- Allows to filter the offers list by the maximum number of connections in a given offer. e.g. a return flight with three flights outbound and a direct inbound flight would be filtered out if `max_connections=1` was passed.- Returns:
- GetOffers200Response
- Throws:
org.springframework.web.reactive.function.client.WebClientResponseException- if an error occurs while attempting to invoke the API
-
getOffersWithHttpInfo
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetOffers200Response>> getOffersWithHttpInfo(String accept, String duffelVersion, String offerRequestId, String acceptEncoding, String after, String before, Integer limit, String sort, Integer maxConnections) throws org.springframework.web.reactive.function.client.WebClientResponseException List offers Retrieves a list of offers for a given offer request specified by its ID. Unless you specify a `sort` parameter, the results may be returned in any order. This endpoint does not return the complete, up-to-date information on each offer. The [Get a single offer](/docs/api/offers/get-offer-by-id) endpoint should be called for a given offer in order to get complete and up-to-date information.200 - A paginated list of offers
- Parameters:
accept- All responses from the API are in JSON format with UTF-8 encoding. An `Accept` header is required with every request.duffelVersion- You'll need to send a `Duffel-Version` header with each request so we know which version of the API you want to use. Currently, the only available API version is `beta`.offerRequestId- Duffel's unique identifier for the offer request, returned when it was createdacceptEncoding- We recommend enabling compression for responses returned by the API, since they can be very large. To enable compression, send an `Accept-Encoding` header. You'll need to configure your HTTP client to decompress responses. Most clients will have this functionality built-in.after- A cursor pointing to the previous page of records. For more information on how to paginate through records, see the [Pagination](/docs/api/overview/pagination) section.before- A cursor pointing to the next page of records. For more information on how to paginate through records, see the [Pagination](/docs/api/overview/pagination) section.limit- The maximum number of records to return per page. Defaults to `50`. May be set to any integer between `1` and `200`. For more information on how to paginate through records, see the [Pagination](/docs/api/overview/pagination) section.sort- By default, the offers will be returned sorted by ID in ascending order. This parameter allows you to sort the list of offers by `total_amount` or `total_duration`. By default the sorting order will be ascending, if you wish to sort in descending order a `-` will need to be prepended to the sorting attribute (i.e: `-total_amount`).maxConnections- Allows to filter the offers list by the maximum number of connections in a given offer. e.g. a return flight with three flights outbound and a direct inbound flight would be filtered out if `max_connections=1` was passed.- Returns:
- ResponseEntity<GetOffers200Response>
- Throws:
org.springframework.web.reactive.function.client.WebClientResponseException- if an error occurs while attempting to invoke the API
-
getOffersWithResponseSpec
public org.springframework.web.reactive.function.client.WebClient.ResponseSpec getOffersWithResponseSpec(String accept, String duffelVersion, String offerRequestId, String acceptEncoding, String after, String before, Integer limit, String sort, Integer maxConnections) throws org.springframework.web.reactive.function.client.WebClientResponseException List offers Retrieves a list of offers for a given offer request specified by its ID. Unless you specify a `sort` parameter, the results may be returned in any order. This endpoint does not return the complete, up-to-date information on each offer. The [Get a single offer](/docs/api/offers/get-offer-by-id) endpoint should be called for a given offer in order to get complete and up-to-date information.200 - A paginated list of offers
- Parameters:
accept- All responses from the API are in JSON format with UTF-8 encoding. An `Accept` header is required with every request.duffelVersion- You'll need to send a `Duffel-Version` header with each request so we know which version of the API you want to use. Currently, the only available API version is `beta`.offerRequestId- Duffel's unique identifier for the offer request, returned when it was createdacceptEncoding- We recommend enabling compression for responses returned by the API, since they can be very large. To enable compression, send an `Accept-Encoding` header. You'll need to configure your HTTP client to decompress responses. Most clients will have this functionality built-in.after- A cursor pointing to the previous page of records. For more information on how to paginate through records, see the [Pagination](/docs/api/overview/pagination) section.before- A cursor pointing to the next page of records. For more information on how to paginate through records, see the [Pagination](/docs/api/overview/pagination) section.limit- The maximum number of records to return per page. Defaults to `50`. May be set to any integer between `1` and `200`. For more information on how to paginate through records, see the [Pagination](/docs/api/overview/pagination) section.sort- By default, the offers will be returned sorted by ID in ascending order. This parameter allows you to sort the list of offers by `total_amount` or `total_duration`. By default the sorting order will be ascending, if you wish to sort in descending order a `-` will need to be prepended to the sorting attribute (i.e: `-total_amount`).maxConnections- Allows to filter the offers list by the maximum number of connections in a given offer. e.g. a return flight with three flights outbound and a direct inbound flight would be filtered out if `max_connections=1` was passed.- Returns:
- ResponseSpec
- Throws:
org.springframework.web.reactive.function.client.WebClientResponseException- if an error occurs while attempting to invoke the API
-
updateOfferPassengerById
public reactor.core.publisher.Mono<UpdateOfferPassengerById200Response> updateOfferPassengerById(String accept, String duffelVersion, String offerId, String offerPassengerId, String acceptEncoding, UpdateOfferPassengerByIdRequest updateOfferPassengerByIdRequest) throws org.springframework.web.reactive.function.client.WebClientResponseException Update a single offer passenger Some offer passenger fields are updateable. Each field that can be updated is detailed in the request object.200 - A single offer passenger
- Parameters:
accept- All responses from the API are in JSON format with UTF-8 encoding. An `Accept` header is required with every request.duffelVersion- You'll need to send a `Duffel-Version` header with each request so we know which version of the API you want to use. Currently, the only available API version is `beta`.offerId- Duffel's unique identifier for the __Offer__offerPassengerId- Duffel's unique identifier for the __Offer Passenger__acceptEncoding- We recommend enabling compression for responses returned by the API, since they can be very large. To enable compression, send an `Accept-Encoding` header. You'll need to configure your HTTP client to decompress responses. Most clients will have this functionality built-in.updateOfferPassengerByIdRequest- The updateOfferPassengerByIdRequest parameter- Returns:
- UpdateOfferPassengerById200Response
- Throws:
org.springframework.web.reactive.function.client.WebClientResponseException- if an error occurs while attempting to invoke the API
-
updateOfferPassengerByIdWithHttpInfo
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<UpdateOfferPassengerById200Response>> updateOfferPassengerByIdWithHttpInfo(String accept, String duffelVersion, String offerId, String offerPassengerId, String acceptEncoding, UpdateOfferPassengerByIdRequest updateOfferPassengerByIdRequest) throws org.springframework.web.reactive.function.client.WebClientResponseException Update a single offer passenger Some offer passenger fields are updateable. Each field that can be updated is detailed in the request object.200 - A single offer passenger
- Parameters:
accept- All responses from the API are in JSON format with UTF-8 encoding. An `Accept` header is required with every request.duffelVersion- You'll need to send a `Duffel-Version` header with each request so we know which version of the API you want to use. Currently, the only available API version is `beta`.offerId- Duffel's unique identifier for the __Offer__offerPassengerId- Duffel's unique identifier for the __Offer Passenger__acceptEncoding- We recommend enabling compression for responses returned by the API, since they can be very large. To enable compression, send an `Accept-Encoding` header. You'll need to configure your HTTP client to decompress responses. Most clients will have this functionality built-in.updateOfferPassengerByIdRequest- The updateOfferPassengerByIdRequest parameter- Returns:
- ResponseEntity<UpdateOfferPassengerById200Response>
- Throws:
org.springframework.web.reactive.function.client.WebClientResponseException- if an error occurs while attempting to invoke the API
-
updateOfferPassengerByIdWithResponseSpec
public org.springframework.web.reactive.function.client.WebClient.ResponseSpec updateOfferPassengerByIdWithResponseSpec(String accept, String duffelVersion, String offerId, String offerPassengerId, String acceptEncoding, UpdateOfferPassengerByIdRequest updateOfferPassengerByIdRequest) throws org.springframework.web.reactive.function.client.WebClientResponseException Update a single offer passenger Some offer passenger fields are updateable. Each field that can be updated is detailed in the request object.200 - A single offer passenger
- Parameters:
accept- All responses from the API are in JSON format with UTF-8 encoding. An `Accept` header is required with every request.duffelVersion- You'll need to send a `Duffel-Version` header with each request so we know which version of the API you want to use. Currently, the only available API version is `beta`.offerId- Duffel's unique identifier for the __Offer__offerPassengerId- Duffel's unique identifier for the __Offer Passenger__acceptEncoding- We recommend enabling compression for responses returned by the API, since they can be very large. To enable compression, send an `Accept-Encoding` header. You'll need to configure your HTTP client to decompress responses. Most clients will have this functionality built-in.updateOfferPassengerByIdRequest- The updateOfferPassengerByIdRequest parameter- Returns:
- ResponseSpec
- Throws:
org.springframework.web.reactive.function.client.WebClientResponseException- if an error occurs while attempting to invoke the API
-