Package com.duffel.sdk.api
Class DuffelPaymentsApi
java.lang.Object
com.duffel.sdk.api.DuffelPaymentsApi
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2022-08-28T15:13:42.592945+07:00[Asia/Bangkok]")
public class DuffelPaymentsApi
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<ConfirmPaymentIntent200Response>confirmPaymentIntent(String accept, String duffelVersion, String id, String acceptEncoding) Confirm a Payment Intent Once you've successfully collected the customer's card details, using the `client_token` from when you first created the Payment Intent, you then need to confirm it using this endpoint.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<ConfirmPaymentIntent200Response>>confirmPaymentIntentWithHttpInfo(String accept, String duffelVersion, String id, String acceptEncoding) reactor.core.publisher.Mono<CreatePaymentIntent201Response>createPaymentIntent(String accept, String duffelVersion, CreatePaymentIntentRequest createPaymentIntentRequest, String acceptEncoding, String contentType) Create a Payment Intent To begin the process of collecting a card payment from your customer, you need to create a __Payment Intent__.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<CreatePaymentIntent201Response>>createPaymentIntentWithHttpInfo(String accept, String duffelVersion, CreatePaymentIntentRequest createPaymentIntentRequest, String acceptEncoding, String contentType) reactor.core.publisher.Mono<GetRefundById200Response>createRefund(String accept, String duffelVersion, CreateRefundRequest createRefundRequest, String acceptEncoding, String contentType) Create a Refund Create a __Refund__ to refund some money to a customer that they paid using a __Payment Intent__.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetRefundById200Response>>createRefundWithHttpInfo(String accept, String duffelVersion, CreateRefundRequest createRefundRequest, String acceptEncoding, String contentType) reactor.core.publisher.Mono<GetPaymentIntentById200Response>getPaymentIntentById(String accept, String duffelVersion, String id, String acceptEncoding) Get a single Payment Intent You should use this API to get the complete, up-to-date information about a __Payment Intent__.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetPaymentIntentById200Response>>getPaymentIntentByIdWithHttpInfo(String accept, String duffelVersion, String id, String acceptEncoding) reactor.core.publisher.Mono<GetRefundById200Response>getRefundById(String accept, String duffelVersion, String id, String acceptEncoding) Get a single Refund You should use this API to get the complete, up-to-date information about a __Refund__.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetRefundById200Response>>getRefundByIdWithHttpInfo(String accept, String duffelVersion, String id, String acceptEncoding) voidsetApiClient(ApiClient apiClient)
-
Constructor Details
-
DuffelPaymentsApi
public DuffelPaymentsApi() -
DuffelPaymentsApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
confirmPaymentIntent
public reactor.core.publisher.Mono<ConfirmPaymentIntent200Response> confirmPaymentIntent(String accept, String duffelVersion, String id, String acceptEncoding) throws org.springframework.web.reactive.function.client.WebClientResponseException Confirm a Payment Intent Once you've successfully collected the customer's card details, using the `client_token` from when you first created the Payment Intent, you then need to confirm it using this endpoint. Once confirmed, the amount charged to your customer's card will be added to your __Balance__ (minus any Duffel Payment fees). Attempting to confirm it more than once will have no effect.200 - An __Payment Intent__ 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 __Payment Intent__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:
- ConfirmPaymentIntent200Response
- Throws:
org.springframework.web.reactive.function.client.WebClientResponseException- if an error occurs while attempting to invoke the API
-
confirmPaymentIntentWithHttpInfo
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<ConfirmPaymentIntent200Response>> confirmPaymentIntentWithHttpInfo(String accept, String duffelVersion, String id, String acceptEncoding) throws org.springframework.web.reactive.function.client.WebClientResponseException - Throws:
org.springframework.web.reactive.function.client.WebClientResponseException
-
createPaymentIntent
public reactor.core.publisher.Mono<CreatePaymentIntent201Response> createPaymentIntent(String accept, String duffelVersion, CreatePaymentIntentRequest createPaymentIntentRequest, String acceptEncoding, String contentType) throws org.springframework.web.reactive.function.client.WebClientResponseException Create a Payment Intent To begin the process of collecting a card payment from your customer, you need to create a __Payment Intent__. The __Payment Intent__ will contain a `client_token` that you use to collect the card payment in the frontend of your application. Read our [guide](https://duffel.com/docs/guides/collecting-customer-card-payments) on how to do this. If the __Payment Intent__ is created in test mode you should use a [test card](/docs/api/overview/test-mode/test-card-numbers).201 - A __Payment Intent__
- 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`.createPaymentIntentRequest- The createPaymentIntentRequest 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.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:
- CreatePaymentIntent201Response
- Throws:
org.springframework.web.reactive.function.client.WebClientResponseException- if an error occurs while attempting to invoke the API
-
createPaymentIntentWithHttpInfo
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<CreatePaymentIntent201Response>> createPaymentIntentWithHttpInfo(String accept, String duffelVersion, CreatePaymentIntentRequest createPaymentIntentRequest, String acceptEncoding, String contentType) throws org.springframework.web.reactive.function.client.WebClientResponseException - Throws:
org.springframework.web.reactive.function.client.WebClientResponseException
-
createRefund
public reactor.core.publisher.Mono<GetRefundById200Response> createRefund(String accept, String duffelVersion, CreateRefundRequest createRefundRequest, String acceptEncoding, String contentType) throws org.springframework.web.reactive.function.client.WebClientResponseException Create a Refund Create a __Refund__ to refund some money to a customer that they paid using a __Payment Intent__. You must specify the amount and currency. The currency is currently limited to the currency in which the __Payment Intent__ was made.201 - A __Refund__
- 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`.createRefundRequest- The createRefundRequest 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.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:
- GetRefundById200Response
- Throws:
org.springframework.web.reactive.function.client.WebClientResponseException- if an error occurs while attempting to invoke the API
-
createRefundWithHttpInfo
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetRefundById200Response>> createRefundWithHttpInfo(String accept, String duffelVersion, CreateRefundRequest createRefundRequest, String acceptEncoding, String contentType) throws org.springframework.web.reactive.function.client.WebClientResponseException - Throws:
org.springframework.web.reactive.function.client.WebClientResponseException
-
getPaymentIntentById
public reactor.core.publisher.Mono<GetPaymentIntentById200Response> getPaymentIntentById(String accept, String duffelVersion, String id, String acceptEncoding) throws org.springframework.web.reactive.function.client.WebClientResponseException Get a single Payment Intent You should use this API to get the complete, up-to-date information about a __Payment Intent__.200 - A __Payment Intent__ 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 __Payment Intent__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:
- GetPaymentIntentById200Response
- Throws:
org.springframework.web.reactive.function.client.WebClientResponseException- if an error occurs while attempting to invoke the API
-
getPaymentIntentByIdWithHttpInfo
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetPaymentIntentById200Response>> getPaymentIntentByIdWithHttpInfo(String accept, String duffelVersion, String id, String acceptEncoding) throws org.springframework.web.reactive.function.client.WebClientResponseException - Throws:
org.springframework.web.reactive.function.client.WebClientResponseException
-
getRefundById
public reactor.core.publisher.Mono<GetRefundById200Response> getRefundById(String accept, String duffelVersion, String id, String acceptEncoding) throws org.springframework.web.reactive.function.client.WebClientResponseException Get a single Refund You should use this API to get the complete, up-to-date information about a __Refund__.200 - A __Refund__ 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 __Refund__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:
- GetRefundById200Response
- Throws:
org.springframework.web.reactive.function.client.WebClientResponseException- if an error occurs while attempting to invoke the API
-
getRefundByIdWithHttpInfo
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<GetRefundById200Response>> getRefundByIdWithHttpInfo(String accept, String duffelVersion, String id, String acceptEncoding) throws org.springframework.web.reactive.function.client.WebClientResponseException - Throws:
org.springframework.web.reactive.function.client.WebClientResponseException
-