getDisputes

suspend fun getDisputes(chargeId: String? = null, chargeIntentId: String? = null, perPage: Int = 10, page: Int = 1): Pair<DisputeResponses.ListDisputesResponse?, NetworkingError?>

Retrieves a paginated list of disputes, optionally filtered by charge or charge intent.

Return

A Pair containing the DisputeResponses.ListDisputesResponse on success, or a NetworkingError on failure.

Parameters

chargeId

Optional identifier of the charge to filter disputes by.

chargeIntentId

Optional identifier of the charge intent to filter disputes by.

perPage

Number of disputes to return per page. Defaults to 10.

page

The page number to retrieve. Defaults to 1.


fun getDisputes(chargeId: String? = null, chargeIntentId: String? = null, perPage: Int = 10, page: Int = 1, completionHandler: (DisputeResponses.ListDisputesResponse?, NetworkingError?) -> Unit)

Retrieves a paginated list of disputes and delivers the result via a callback, optionally filtered by charge or charge intent.

Parameters

chargeId

Optional identifier of the charge to filter disputes by.

chargeIntentId

Optional identifier of the charge intent to filter disputes by.

perPage

Number of disputes to return per page. Defaults to 10.

page

The page number to retrieve. Defaults to 1.

completionHandler

Callback invoked with the DisputeResponses.ListDisputesResponse on success, or a NetworkingError on failure.