Class OfferRequestsApi

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-01-16T15:26:22.356688490+07:00[Asia/Bangkok]") public class OfferRequestsApi extends Object
  • Constructor Details

    • OfferRequestsApi

      public OfferRequestsApi()
    • OfferRequestsApi

      @Autowired public OfferRequestsApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • createOfferRequest

      public reactor.core.publisher.Mono<GetOfferRequestById200Response> createOfferRequest(String accept, String duffelVersion, String acceptEncoding, String contentType, Boolean returnOffers, Integer supplierTimeout, CreateOfferRequestRequest createOfferRequestRequest) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Create an offer request To search for flights, you'll need to create an __offer request__. An 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__. Each offer represents a set of flights you can buy from an airline at a particular price that meet your search criteria. Inside the offers, you'll see your slices, but now 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 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).
      returnOffers - When set to `true`, the offer request resource returned will include _all_ the `offer`s returned by the airlines. If set to `false`, the offer request resource won't include any `offer`s. To retrieve the associated offers later, use the [List Offers](/docs/api/offers/get-offers) endpoint, specifying the `offer_request_id`. You should use this option if you want to take advantage of the pagination, sorting and filtering that the [List Offers](/docs/api/offers/get-offers) endpoint provides.
      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
    • createOfferRequestWithHttpInfo

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetOfferRequestById200Response>> createOfferRequestWithHttpInfo(String accept, String duffelVersion, String acceptEncoding, String contentType, Boolean returnOffers, Integer supplierTimeout, CreateOfferRequestRequest createOfferRequestRequest) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Create an offer request To search for flights, you'll need to create an __offer request__. An 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__. Each offer represents a set of flights you can buy from an airline at a particular price that meet your search criteria. Inside the offers, you'll see your slices, but now 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 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).
      returnOffers - When set to `true`, the offer request resource returned will include _all_ the `offer`s returned by the airlines. If set to `false`, the offer request resource won't include any `offer`s. To retrieve the associated offers later, use the [List Offers](/docs/api/offers/get-offers) endpoint, specifying the `offer_request_id`. You should use this option if you want to take advantage of the pagination, sorting and filtering that the [List Offers](/docs/api/offers/get-offers) endpoint provides.
      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:
      ResponseEntity<GetOfferRequestById200Response>
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException - if an error occurs while attempting to invoke the API
    • createOfferRequestWithResponseSpec

      public org.springframework.web.reactive.function.client.WebClient.ResponseSpec createOfferRequestWithResponseSpec(String accept, String duffelVersion, String acceptEncoding, String contentType, Boolean returnOffers, Integer supplierTimeout, CreateOfferRequestRequest createOfferRequestRequest) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Create an offer request To search for flights, you'll need to create an __offer request__. An 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__. Each offer represents a set of flights you can buy from an airline at a particular price that meet your search criteria. Inside the offers, you'll see your slices, but now 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 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).
      returnOffers - When set to `true`, the offer request resource returned will include _all_ the `offer`s returned by the airlines. If set to `false`, the offer request resource won't include any `offer`s. To retrieve the associated offers later, use the [List Offers](/docs/api/offers/get-offers) endpoint, specifying the `offer_request_id`. You should use this option if you want to take advantage of the pagination, sorting and filtering that the [List Offers](/docs/api/offers/get-offers) endpoint provides.
      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:
      ResponseSpec
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException - if an error occurs while attempting to invoke the API
    • getOfferRequestById

      public reactor.core.publisher.Mono<GetOfferRequestById200Response> getOfferRequestById(String accept, String duffelVersion, String id, String acceptEncoding) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Get a single offer request Retrieves an offer request by its ID

      200 - A single 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 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.
      Returns:
      GetOfferRequestById200Response
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException - if an error occurs while attempting to invoke the API
    • getOfferRequestByIdWithHttpInfo

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetOfferRequestById200Response>> getOfferRequestByIdWithHttpInfo(String accept, String duffelVersion, String id, String acceptEncoding) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Get a single offer request Retrieves an offer request by its ID

      200 - A single 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 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.
      Returns:
      ResponseEntity<GetOfferRequestById200Response>
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException - if an error occurs while attempting to invoke the API
    • getOfferRequestByIdWithResponseSpec

      public org.springframework.web.reactive.function.client.WebClient.ResponseSpec getOfferRequestByIdWithResponseSpec(String accept, String duffelVersion, String id, String acceptEncoding) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Get a single offer request Retrieves an offer request by its ID

      200 - A single 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 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.
      Returns:
      ResponseSpec
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException - if an error occurs while attempting to invoke the API
    • getOfferRequests

      public reactor.core.publisher.Mono<GetOfferRequests200Response> getOfferRequests(String accept, String duffelVersion, String acceptEncoding, String after, String before, Integer limit) throws org.springframework.web.reactive.function.client.WebClientResponseException
      List offer requests Retrieves a paginated list of your offer requests. The results may be returned in any order.

      200 - A paginated list of offer requests

      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.
      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.
      Returns:
      GetOfferRequests200Response
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException - if an error occurs while attempting to invoke the API
    • getOfferRequestsWithHttpInfo

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetOfferRequests200Response>> getOfferRequestsWithHttpInfo(String accept, String duffelVersion, String acceptEncoding, String after, String before, Integer limit) throws org.springframework.web.reactive.function.client.WebClientResponseException
      List offer requests Retrieves a paginated list of your offer requests. The results may be returned in any order.

      200 - A paginated list of offer requests

      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.
      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.
      Returns:
      ResponseEntity<GetOfferRequests200Response>
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException - if an error occurs while attempting to invoke the API
    • getOfferRequestsWithResponseSpec

      public org.springframework.web.reactive.function.client.WebClient.ResponseSpec getOfferRequestsWithResponseSpec(String accept, String duffelVersion, String acceptEncoding, String after, String before, Integer limit) throws org.springframework.web.reactive.function.client.WebClientResponseException
      List offer requests Retrieves a paginated list of your offer requests. The results may be returned in any order.

      200 - A paginated list of offer requests

      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.
      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.
      Returns:
      ResponseSpec
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException - if an error occurs while attempting to invoke the API