get Refunds
suspend fun getRefunds(chargeId: String?, chargeIntentId: String?, perPage: Int?, page: Int?): Pair<RefundResponses.ListRefundsResponse?, NetworkingError?>
Retrieves a paginated list of refunds, optionally filtered by charge or charge intent.
Return
A pair containing a RefundResponses.ListRefundsResponse on success, or a NetworkingError on failure.
Parameters
charge Id
Optional ID of the charge to filter refunds by.
charge Intent Id
Optional ID of the charge intent to filter refunds by.
per Page
Optional number of results to return per page.
page
Optional page number to retrieve.
fun getRefunds(chargeId: String?, chargeIntentId: String?, perPage: Int?, page: Int?, completionHandler: (RefundResponses.ListRefundsResponse?, NetworkingError?) -> Unit)
Retrieves a paginated list of refunds and delivers the result via callback.
Parameters
charge Id
Optional ID of the charge to filter refunds by.
charge Intent Id
Optional ID of the charge intent to filter refunds by.
per Page
Optional number of results to return per page.
page
Optional page number to retrieve.
completion Handler
Invoked with a RefundResponses.ListRefundsResponse on success, or a NetworkingError on failure.