Prepares the payload used in the dispute flow and sends it to the integration provider,
retrying if necessary.
Signature
public static HttpRequest getEthocaAPIRequest(List<DisputeItem> disputeItems, String disputeType, String namedCredential)
Parameters
disputeItems
Type: List<DisputeItem>
Disputed transaction data in the following JSON format:
[
{
"transaction_date": "2023-01-01",
"transaction_identifier": "1",
"transaction_amount": 213.1,
"transaction_description": "t1"
},
{
"transaction_date": "2023-01-01",
"transaction_identifier": "2",
"transaction_amount": 150.94,
"transaction_description": "t2"
}
]
The keys correspond to DisputeItem object fields.
disputeType
Type: String
A value of the Dispute object’s DisputeType picklist field:
- Processing Error
- Consumer Dispute
- Fraud
Return Value
Type: HttpRequest
Returns an HttpRequest that includes the disputed transaction data and sends it to the integration provider, retrying if necessary.