public interface RefundsApi
| 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.
|
ListPaymentRefundsResponse listPaymentRefunds(String beginTime, String endTime, String sortOrder, String cursor, String locationId, String status, String sourceType, Integer limit) throws ApiException, IOException
beginTime - 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.CompletableFuture<ListPaymentRefundsResponse> listPaymentRefundsAsync(String beginTime, String endTime, String sortOrder, String cursor, String locationId, String status, String sourceType, Integer limit)
beginTime - 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: 100RefundPaymentResponse refundPayment(RefundPaymentRequest body) throws ApiException, IOException
body - 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.CompletableFuture<RefundPaymentResponse> refundPaymentAsync(RefundPaymentRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.GetPaymentRefundResponse getPaymentRefund(String refundId) throws ApiException, IOException
refundId - 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.CompletableFuture<GetPaymentRefundResponse> getPaymentRefundAsync(String refundId)
refundId - Required parameter: The unique ID for the desired `PaymentRefund`.Copyright © 2022. All rights reserved.