Class OrderChangesApi

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

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

    • OrderChangesApi

      public OrderChangesApi()
    • OrderChangesApi

      @Autowired public OrderChangesApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • confirmOrderChange

      public reactor.core.publisher.Mono<ConfirmOrderChange200Response> confirmOrderChange(String accept, String duffelVersion, String id, ConfirmOrderChangeRequest confirmOrderChangeRequest, String acceptEncoding) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Confirm an order change Once you've created a pending order change, you'll know the `change_total_amount` due for the change. To actually change the order, you'll need to confirm the change. The booking with the airline will be updated with the new slice you previously chose, and the `change_total_amount` will be charged to your specific payment type. If the amount of `change_total_amount` is negative, then this will be returned to the `refund_to` method (e.g. your Duffel balance). You'll then need to refund your customer (e.g. back to their credit/debit card).

      200 - An order change object

      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 order change
      confirmOrderChangeRequest - The confirmOrderChangeRequest parameter
      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:
      ConfirmOrderChange200Response
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException - if an error occurs while attempting to invoke the API
    • confirmOrderChangeWithHttpInfo

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<ConfirmOrderChange200Response>> confirmOrderChangeWithHttpInfo(String accept, String duffelVersion, String id, ConfirmOrderChangeRequest confirmOrderChangeRequest, String acceptEncoding) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException
    • createOrderChange

      public reactor.core.publisher.Mono<ConfirmOrderChange200Response> createOrderChange(String accept, String duffelVersion, String acceptEncoding, String contentType, CreateOrderChangeRequest createOrderChangeRequest) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Create a pending order change To begin the process of changing an order you need to create an order change. The OrderChange will contain the `selected_order_change_offer` reference of the change you wish to make to your order. To proceed, you must confirm the change using the [Confirm an order change](/docs/api/order-changes/confirm-order-change) endpoint.

      201 - An order change

      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).
      createOrderChangeRequest - The createOrderChangeRequest parameter
      Returns:
      ConfirmOrderChange200Response
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException - if an error occurs while attempting to invoke the API
    • createOrderChangeWithHttpInfo

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<ConfirmOrderChange200Response>> createOrderChangeWithHttpInfo(String accept, String duffelVersion, String acceptEncoding, String contentType, CreateOrderChangeRequest createOrderChangeRequest) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException
    • getOrderChangeById

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

      200 - A single order change

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

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