public final class DefaultRefundsApi extends BaseApi implements RefundsApi
AUTHENTICATION_KEY, GLOBAL_ERROR_CASES| Constructor and Description |
|---|
DefaultRefundsApi(io.apimatic.core.GlobalConfiguration globalConfig)
Initializes the controller.
|
| 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, getGlobalConfiguration, getHttpCallbackpublic DefaultRefundsApi(io.apimatic.core.GlobalConfiguration globalConfig)
globalConfig - Configurations added in client.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: Indicates the start of the time range to retrieve each
PaymentRefund` for, in RFC 3339 format. The range is determined using the
`created_at` field for each `PaymentRefund`. Default: The current time minus one
year.endTime - Optional parameter: Indicates the end of the time range to retrieve each
`PaymentRefund` for, in RFC 3339 format. The range is determined using the
`created_at` field for each `PaymentRefund`. Default: The current time.sortOrder - Optional parameter: The order in which results are listed by
`PaymentRefund.created_at`: - `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/build-basics/common-api-patterns/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](entity: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: Indicates the start of the time range to retrieve each
PaymentRefund` for, in RFC 3339 format. The range is determined using the
`created_at` field for each `PaymentRefund`. Default: The current time minus one
year.endTime - Optional parameter: Indicates the end of the time range to retrieve each
`PaymentRefund` for, in RFC 3339 format. The range is determined using the
`created_at` field for each `PaymentRefund`. Default: The current time.sortOrder - Optional parameter: The order in which results are listed by
`PaymentRefund.created_at`: - `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/build-basics/common-api-patterns/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](entity: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 © 2023. All rights reserved.