Package com.duffel.sdk.api
Class OrderChangesApi
java.lang.Object
com.duffel.sdk.api.OrderChangesApi
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2022-08-28T15:18:14.926970+07:00[Asia/Bangkok]")
public class OrderChangesApi
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<ConfirmOrderChange200Response>confirmOrderChange(String accept, String duffelVersion, String id, ConfirmOrderChangeRequest confirmOrderChangeRequest, String acceptEncoding) Confirm an order change Once you've created a pending order change, you'll know the `change_total_amount` due for the change.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<ConfirmOrderChange200Response>>confirmOrderChangeWithHttpInfo(String accept, String duffelVersion, String id, ConfirmOrderChangeRequest confirmOrderChangeRequest, String acceptEncoding) reactor.core.publisher.Mono<ConfirmOrderChange200Response>createOrderChange(String accept, String duffelVersion, String acceptEncoding, String contentType, CreateOrderChangeRequest createOrderChangeRequest) Create a pending order change To begin the process of changing an order you need to create an order change.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<ConfirmOrderChange200Response>>createOrderChangeWithHttpInfo(String accept, String duffelVersion, String acceptEncoding, String contentType, CreateOrderChangeRequest createOrderChangeRequest) reactor.core.publisher.Mono<ConfirmOrderChange200Response>getOrderChangeById(String accept, String duffelVersion, String id, String acceptEncoding) Get a single order change Retrieves an order change by its IDreactor.core.publisher.Mono<org.springframework.http.ResponseEntity<ConfirmOrderChange200Response>>getOrderChangeByIdWithHttpInfo(String accept, String duffelVersion, String id, String acceptEncoding) voidsetApiClient(ApiClient apiClient)
-
Constructor Details
-
OrderChangesApi
public OrderChangesApi() -
OrderChangesApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
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 changeconfirmOrderChangeRequest- The confirmOrderChangeRequest parameteracceptEncoding- 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 ID200 - 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 changeacceptEncoding- 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
-