Class PartialOfferRequestsApi

java.lang.Object
com.duffel.sdk.api.PartialOfferRequestsApi

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2022-08-28T15:18:14.926970+07:00[Asia/Bangkok]") public class PartialOfferRequestsApi extends Object
  • Constructor Details

    • PartialOfferRequestsApi

      public PartialOfferRequestsApi()
    • PartialOfferRequestsApi

      @Autowired public PartialOfferRequestsApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • createPartialOfferRequest

      public reactor.core.publisher.Mono<GetOfferRequestById200Response> createPartialOfferRequest(String accept, String duffelVersion, String acceptEncoding, String contentType, Integer supplierTimeout, CreateOfferRequestRequest createOfferRequestRequest) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Create a partial offer request To search for and select flights separately for each slice of the journey, you'll need to create a __partial offer request__. A partial offer request describes the passengers and where and when they want to travel (in the form of a list of __slices__). It may also include additional filters (e.g. a particular cabin to travel in). We'll send your search to a range of airlines, and return your offer request back to you with a series of __offers__ for the first slice in your journey. Offers returned from a partial offer request will have the __partial__ flag set to `true`. Each partial offer represents a set of flights you can buy from an airline at a particular price that meet the criteria of a slice in your search. Inside the partial offer you'll see the slice it pertains to, and each slice will also include a list of one or more specific flights (called __segments__) that the airline is *offering* to get the passengers where they want to go. When presenting partial offers to your customers, you should always show the full name of the operating carrier of each segment (`slices[].segments[].operating_carrier.name`). This must be displayed prominently on the first screen where the offer is presented in order to comply with [US regulations](https://www.ecfr.gov/cgi-bin/text-idx?SID=8e736a5c813a737a5c2f6700a4c9006d&mc=true&node=pt14.4.257&rgn=div5).

      200 - An offer request

      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`.
      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.
      contentType - All request bodies sent to the API should be in JSON format. A `Content-Type` header is required whenever you're sending a request body (i.e. for POST and PUT requests).
      supplierTimeout - The maximum amount of time in milliseconds to wait for each airline to respond. This timeout only applies to the [response time](/docs/api/overview/response-times) of the call to the airline and doesn't include additional overhead added by Duffel. Value should be between 2 seconds and 60 seconds. Any values outside the range will be ignored and the default `supplier_timeout` will be used. If a value is set, the response will only include offers from airlines that returned within the given time. If a value is not set, the response will only include offers from airlines that returned within the default `supplier_timeout` value of 20 seconds. We recommend setting `supplier_timeout` lower than the timeout on the request sent to Duffel API as that will allow us to respond with the offers we received before your request times out with an empty response.
      createOfferRequestRequest - The createOfferRequestRequest parameter
      Returns:
      GetOfferRequestById200Response
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException - if an error occurs while attempting to invoke the API
    • createPartialOfferRequestWithHttpInfo

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetOfferRequestById200Response>> createPartialOfferRequestWithHttpInfo(String accept, String duffelVersion, String acceptEncoding, String contentType, Integer supplierTimeout, CreateOfferRequestRequest createOfferRequestRequest) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException
    • getPartialOfferRequestById

      public reactor.core.publisher.Mono<GetOfferRequestById200Response> getPartialOfferRequestById(String accept, String duffelVersion, String id, String acceptEncoding, String selectedPartialOffer) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Get a single partial offer request Retrieves a partial offers request by its ID, only including partial offers for the current slice of multi-step search flow.

      200 - A single partial offer request

      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 partial offer request
      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.
      selectedPartialOffer - Duffel's unqiue identifier for the partial offer selected for previous slices. This parameter should be repeated for each selected partial offer.
      Returns:
      GetOfferRequestById200Response
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException - if an error occurs while attempting to invoke the API
    • getPartialOfferRequestByIdWithHttpInfo

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetOfferRequestById200Response>> getPartialOfferRequestByIdWithHttpInfo(String accept, String duffelVersion, String id, String acceptEncoding, String selectedPartialOffer) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException
    • getPartialOfferRequestFaresById

      public reactor.core.publisher.Mono<GetOfferRequestById200Response> getPartialOfferRequestFaresById(String accept, String duffelVersion, String id, String selectedPartialOffer, String acceptEncoding) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Get full offer fares for selected partial offers Retrieves an offer request with offers for fares matching selected partial offers.

      200 - A single offer request with full offers for different fares matching selected itinerary in multi-step search flow.

      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 partial offer request
      selectedPartialOffer - Duffel's unqiue identifier for the partial offer selected. This parameter should be repeated for each slice in the journey.
      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.
      Returns:
      GetOfferRequestById200Response
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException - if an error occurs while attempting to invoke the API
    • getPartialOfferRequestFaresByIdWithHttpInfo

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetOfferRequestById200Response>> getPartialOfferRequestFaresByIdWithHttpInfo(String accept, String duffelVersion, String id, String selectedPartialOffer, String acceptEncoding) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException