public final class DefaultRefundsApi extends BaseApi implements RefundsApi
BaseApi.RequestExecutor, BaseApi.RequestSupplier, BaseApi.ResponseHandler<T>authManagers, config, httpCallback, internalUserAgent| Constructor and Description |
|---|
DefaultRefundsApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers)
Initializes the controller.
|
DefaultRefundsApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers,
HttpCallback httpCallback)
Initializes the controller with HTTPCallback.
|
| Modifier and Type | Method and Description |
|---|---|
GetPaymentRefundResponse |
getPaymentRefund(String refundId)
Retrieves a specific refund using the `refund_id`.
|
CompletableFuture<GetPaymentRefundResponse> |
getPaymentRefundAsync(String refundId)
Retrieves a specific refund using the `refund_id`.
|
ListPaymentRefundsResponse |
listPaymentRefunds(String beginTime,
String endTime,
String sortOrder,
String cursor,
String locationId,
String status,
String sourceType,
Integer limit)
Retrieves a list of refunds for the account making the request.
|
CompletableFuture<ListPaymentRefundsResponse> |
listPaymentRefundsAsync(String beginTime,
String endTime,
String sortOrder,
String cursor,
String locationId,
String status,
String sourceType,
Integer limit)
Retrieves a list of refunds for the account making the request.
|
RefundPaymentResponse |
refundPayment(RefundPaymentRequest body)
Refunds a payment.
|
CompletableFuture<RefundPaymentResponse> |
refundPaymentAsync(RefundPaymentRequest body)
Refunds a payment.
|
getClientInstance, getHttpCallback, makeHttpCallAsync, validateResponsepublic DefaultRefundsApi(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers)
config - Configurations added in client.httpClient - Send HTTP requests and read the responses.authManagers - Apply authorization to requests.public DefaultRefundsApi(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers, HttpCallback httpCallback)
config - Configurations added in client.httpClient - Send HTTP requests and read the responses.authManagers - Apply authorization to requests.httpCallback - Callback to be called before and after the HTTP call.public ListPaymentRefundsResponse listPaymentRefunds(String beginTime, String endTime, String sortOrder, String cursor, String locationId, String status, String sourceType, Integer limit) throws ApiException, IOException
listPaymentRefunds in interface RefundsApibeginTime - Optional parameter: The timestamp for the beginning of the requested
reporting period, in RFC 3339 format. Default: The current time minus one year.endTime - Optional parameter: The timestamp for the end of the requested reporting
period, in RFC 3339 format. Default: The current time.sortOrder - Optional parameter: The order in which results are listed: - `ASC` -
Oldest to newest. - `DESC` - Newest to oldest (default).cursor - Optional parameter: A pagination cursor returned by a previous call to this
endpoint. Provide this cursor to retrieve the next set of results for the original
query. For more information, see
[Pagination](https://developer.squareup.com/docs/basics/api101/pagination).locationId - Optional parameter: Limit results to the location supplied. By default,
results are returned for all locations associated with the seller.status - Optional parameter: If provided, only refunds with the given status are
returned. For a list of refund status values, see [PaymentRefund]($m/PaymentRefund).
Default: If omitted, refunds are returned regardless of their status.sourceType - Optional parameter: If provided, only returns refunds whose payments have
the indicated source type. Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`,
`CASH`, and `EXTERNAL`. For information about these payment source types, see [Take
Payments](https://developer.squareup.com/docs/payments-api/take-payments). Default:
If omitted, refunds are returned regardless of the source type.limit - Optional parameter: The maximum number of results to be returned in a single
page. It is possible to receive fewer results than the specified limit on a given
page. If the supplied value is greater than 100, no more than 100 results are
returned. Default: 100ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<ListPaymentRefundsResponse> listPaymentRefundsAsync(String beginTime, String endTime, String sortOrder, String cursor, String locationId, String status, String sourceType, Integer limit)
listPaymentRefundsAsync in interface RefundsApibeginTime - Optional parameter: The timestamp for the beginning of the requested
reporting period, in RFC 3339 format. Default: The current time minus one year.endTime - Optional parameter: The timestamp for the end of the requested reporting
period, in RFC 3339 format. Default: The current time.sortOrder - Optional parameter: The order in which results are listed: - `ASC` -
Oldest to newest. - `DESC` - Newest to oldest (default).cursor - Optional parameter: A pagination cursor returned by a previous call to this
endpoint. Provide this cursor to retrieve the next set of results for the original
query. For more information, see
[Pagination](https://developer.squareup.com/docs/basics/api101/pagination).locationId - Optional parameter: Limit results to the location supplied. By default,
results are returned for all locations associated with the seller.status - Optional parameter: If provided, only refunds with the given status are
returned. For a list of refund status values, see [PaymentRefund]($m/PaymentRefund).
Default: If omitted, refunds are returned regardless of their status.sourceType - Optional parameter: If provided, only returns refunds whose payments have
the indicated source type. Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`,
`CASH`, and `EXTERNAL`. For information about these payment source types, see [Take
Payments](https://developer.squareup.com/docs/payments-api/take-payments). Default:
If omitted, refunds are returned regardless of the source type.limit - Optional parameter: The maximum number of results to be returned in a single
page. It is possible to receive fewer results than the specified limit on a given
page. If the supplied value is greater than 100, no more than 100 results are
returned. Default: 100public RefundPaymentResponse refundPayment(RefundPaymentRequest body) throws ApiException, IOException
refundPayment in interface RefundsApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<RefundPaymentResponse> refundPaymentAsync(RefundPaymentRequest body)
refundPaymentAsync in interface RefundsApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public GetPaymentRefundResponse getPaymentRefund(String refundId) throws ApiException, IOException
getPaymentRefund in interface RefundsApirefundId - Required parameter: The unique ID for the desired `PaymentRefund`.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<GetPaymentRefundResponse> getPaymentRefundAsync(String refundId)
getPaymentRefundAsync in interface RefundsApirefundId - Required parameter: The unique ID for the desired `PaymentRefund`.Copyright © 2022. All rights reserved.