Class OrderCancellationsApi

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

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

    • OrderCancellationsApi

      public OrderCancellationsApi()
    • OrderCancellationsApi

      @Autowired public OrderCancellationsApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • confirmOrderCancellation

      public reactor.core.publisher.Mono<CreateOrderCancellation201Response> confirmOrderCancellation(String accept, String duffelVersion, String id, String acceptEncoding) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Confirm an order cancellation Once you've created a pending order cancellation, you'll know the `refund_amount` you're due to get back. To actually cancel the order, you'll need to confirm the cancellation. The booking with the airline will be cancelled, and the `refund_amount` will be returned to the original payment method (i.e. your Duffel balance). You'll then need to refund your customer (e.g. back to their credit/debit card).

      200 - An order cancellation 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 cancellation
      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:
      CreateOrderCancellation201Response
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException - if an error occurs while attempting to invoke the API
    • confirmOrderCancellationWithHttpInfo

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

      public reactor.core.publisher.Mono<CreateOrderCancellation201Response> createOrderCancellation(String accept, String duffelVersion, CreateOrderCancellationRequest createOrderCancellationRequest, String acceptEncoding, String contentType) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Create a pending order cancellation To begin the process of cancelling an order you need to create an order cancellation. The OrderCancellation will contain the `refund_amount` due from the Airline. To proceed, you must confirm the cancellation using the [Confirm an order cancellation](/docs/api/order-cancellations/confirm-order-cancellation) endpoint.

      201 - A pending order cancellation to be confirmed

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

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<CreateOrderCancellation201Response>> createOrderCancellationWithHttpInfo(String accept, String duffelVersion, CreateOrderCancellationRequest createOrderCancellationRequest, String acceptEncoding, String contentType) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException
    • getOrderCancellationById

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

      200 - An order cancellation 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 cancellation
      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:
      CreateOrderCancellation201Response
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException - if an error occurs while attempting to invoke the API
    • getOrderCancellationByIdWithHttpInfo

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

      public reactor.core.publisher.Mono<GetOrderCancellations200Response> getOrderCancellations(String accept, String duffelVersion, String acceptEncoding, String after, String before, Integer limit, String orderId) throws org.springframework.web.reactive.function.client.WebClientResponseException
      List order cancellations Retrieves a paginated list of order cancellations

      200 - A paginated list of order cancellations

      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.
      orderId - Filters the returned order cancellations by a specific order's unique identifier.
      Returns:
      GetOrderCancellations200Response
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException - if an error occurs while attempting to invoke the API
    • getOrderCancellationsWithHttpInfo

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetOrderCancellations200Response>> getOrderCancellationsWithHttpInfo(String accept, String duffelVersion, String acceptEncoding, String after, String before, Integer limit, String orderId) throws org.springframework.web.reactive.function.client.WebClientResponseException
      Throws:
      org.springframework.web.reactive.function.client.WebClientResponseException