paytm-pg-node-sdk
Version:
Paytm SDK for Node.js
78 lines (77 loc) • 2.76 kB
TypeScript
/**
* Copyright (C) 2019 Paytm.
*/
/**
* This class is handle all the Refund calls from EntryPoint.java and create
* request objects and make call to the respective controller
*
* This class receive the Paytm response objects and translate the to their
* respective merchant response objects and returns call to EntryPoint
*/
export declare class Refund {
/**
* doRefund gets RefundDetail object as parameter and creates request object to
* call Processrequest process. It returns the AsyncRefundResponseBody which
* will be used by merchant in future. It handles the exception if occurred, and
* returns the respective object with error message.
*
* @param RefundDetail
* @return SDKResponse
* @throws Exception
*/
static initiateRefund(refundDetail: any): Promise<any>;
/**
* setSignature set the signature in head(SecureRequestHeader), signature will
* be generated by the body(Object)
* @param SecureRequestHeader
* @param RefundInitiateRequestBody
* @throws Exception
*/
private static setSignature;
/**
* @param RefundDetail
* @return RefundInitiateRequest
* @throws Exception
*/
private static createRefundInitiateRequest;
/**
* validateRefund checks if all mandatory parameters are present for Refund api
* call. If not, then is will throw the SDKException exception
*
* @param RefundDetail
* @return void
* @throws Exception
*/
private static validateRefundDetailObject;
/**
* This method gets RefundStatusDetail object as parameter and returns the
* SDKResponse(NativeRefundStatusResponse).
*
* It creates request object to call ProcessRequest.process. It returns the
* SDKResponse(NativeRefundStatusResponse) which contains refund status object.
* It handles the exception if occurred, and returns the respective object with
* error message.
*
* @param RefundStatusDetail object containing data regarding refund status
* @return SDKResponse containing response string from api hit and response object
*
* @throws Exception
*/
static getRefundStatus(refundStatusDetail: any): Promise<any>;
/**
* @param RefundStatusDetail refundStatusDetail
* @return NativeRefundStatusRequest
* @throws Exception
*/
private static createRefundStatusRequest;
/**
* validateRefundStatusDetailObject checks if all mandatory parameters are present for
* Payment Status api call. If not, then is will throw the
* SDKException exception
*
* @param RefundStatusDetail
* @return void
* @throws Exception
*/
private static validateRefundStatusDetailObject;
}