@squadco/js
Version:
Simplify the integration process with Squad's comprehensive payment solutions using the Squad JavaScript SDK.
33 lines (32 loc) • 1.8 kB
TypeScript
import type { BaseResponseProps } from "./interfaces/base-response";
import SquadWalletBalance from "./wallet-balance";
import type { DisputeResponseProps } from "./interfaces/dispute.interface";
export default abstract class SquadDisputeResolver extends SquadWalletBalance {
/**
* @desc This is the sub class for the Squad Dispute Resolver Module
* @arg {string} publicKey - Squad public key
* @arg {string} privateKey - Squad private key
* @arg {string} environment - The environment to use for the client. If not specified, defaults to "development".
*/
private baseDisputeUrl;
constructor(publicKey: string, privateKey: string, environment: "production" | "development");
/**
* @desc This method is used to get all disputes on your transactions raised by your customers.
*/
getAllDisputes(): Promise<DisputeResponseProps>;
/**
* @desc This method is used to get a unique URL to upload an evidence(file) which is a proof or reason to reject a dispute. This is only necessary when we want to reject a dispute.
*
* @arg {string} ticketId - The unique ID that identifies the dispute you want to reject or accept
* @arg {string} fileName - The name of the file
*/
getDisputeFileUploadUrl(ticketId: string, fileName: string): Promise<BaseResponseProps>;
/**
* This method is called to resolve a dispute.
*
* @param {string} ticketId - The unique ID that identifies the dispute you want to reject or accept
* @param {string} action - The action taken for the dispute. Either "accepted" or "rejected"
* @param {string} fileName - The name of the file uploaded.
*/
resolveDisputes(ticketId: string, action: "accepted" | "rejected", fileName: string): Promise<BaseResponseProps>;
}