@paciolan/cybersource-sdk
Version:
CyberSource REST API Typescript SDK
232 lines (231 loc) • 13.9 kB
TypeScript
/**
* CyberSource Merged Spec
* All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
*
* OpenAPI spec version: 0.0.1
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
import { RequestArgs, BaseAPI } from '../base';
import { IdVoidsBody } from '../models';
import { IdVoidsBody1 } from '../models';
import { IdVoidsBody2 } from '../models';
import { IdVoidsBody3 } from '../models';
import { PtsV2CapturesVoidsPost201Response } from '../models';
import { PtsV2CreditsVoidsPost201Response } from '../models';
import { PtsV2PaymentsVoidsPost201Response } from '../models';
import { PtsV2RefundsVoidsPost201Response } from '../models';
import { PtsV2VoidsPost200Response } from '../models';
import { V2VoidsBody } from '../models';
/**
* VoidApi - axios parameter creator
* @export
*/
export declare const VoidApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* This is to void a previous payment, capture, refund, or credit that merchant does not receive a reply(Mostly due to timeout). To use this feature/API, make sure to pass unique value to field - clientReferenceInformation -> transactionId in your payment, capture, refund, or credit API call and use same transactionId in this API request payload to reverse the payment.
* @summary Timeout Void
* @param {V2VoidsBody} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
mitVoid: (body: V2VoidsBody, options?: AxiosRequestConfig & Configuration) => Promise<RequestArgs>;
/**
* Refund a capture API is only used, if you have requested Capture independenlty using [/pts/v2/payments/{id}/captures](https://developer.cybersource.com/api-reference-assets/index.html#payments_capture) API call. Include the capture ID in the POST request to cancel the capture.
* @summary Void a Capture
* @param {IdVoidsBody1} body
* @param {string} id The capture ID returned from a previous capture request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
voidCapture: (body: IdVoidsBody1, id: string, options?: AxiosRequestConfig & Configuration) => Promise<RequestArgs>;
/**
* Include the credit ID in the POST request to cancel the credit.
* @summary Void a Credit
* @param {IdVoidsBody3} body
* @param {string} id The credit ID returned from a previous credit request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
voidCredit: (body: IdVoidsBody3, id: string, options?: AxiosRequestConfig & Configuration) => Promise<RequestArgs>;
/**
* Void a Payment API is only used, if you have requested Authorization and Capture together in [/pts/v2/payments](https://developer.cybersource.com/api-reference-assets/index.html#payments_payments) API call. Include the payment ID in the POST request to cancel the payment.
* @summary Void a Payment
* @param {IdVoidsBody} body
* @param {string} id The payment ID returned from a previous payment request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
voidPayment: (body: IdVoidsBody, id: string, options?: AxiosRequestConfig & Configuration) => Promise<RequestArgs>;
/**
* Include the refund ID in the POST request to cancel the refund.
* @summary Void a Refund
* @param {IdVoidsBody2} body
* @param {string} id The refund ID returned from a previous refund request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
voidRefund: (body: IdVoidsBody2, id: string, options?: AxiosRequestConfig & Configuration) => Promise<RequestArgs>;
};
/**
* VoidApi - functional programming interface
* @export
*/
export declare const VoidApiFp: (configuration?: Configuration) => {
/**
* This is to void a previous payment, capture, refund, or credit that merchant does not receive a reply(Mostly due to timeout). To use this feature/API, make sure to pass unique value to field - clientReferenceInformation -> transactionId in your payment, capture, refund, or credit API call and use same transactionId in this API request payload to reverse the payment.
* @summary Timeout Void
* @param {V2VoidsBody} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
mitVoid(body: V2VoidsBody, options?: AxiosRequestConfig & Configuration): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PtsV2VoidsPost200Response>>>;
/**
* Refund a capture API is only used, if you have requested Capture independenlty using [/pts/v2/payments/{id}/captures](https://developer.cybersource.com/api-reference-assets/index.html#payments_capture) API call. Include the capture ID in the POST request to cancel the capture.
* @summary Void a Capture
* @param {IdVoidsBody1} body
* @param {string} id The capture ID returned from a previous capture request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
voidCapture(body: IdVoidsBody1, id: string, options?: AxiosRequestConfig & Configuration): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PtsV2CapturesVoidsPost201Response>>>;
/**
* Include the credit ID in the POST request to cancel the credit.
* @summary Void a Credit
* @param {IdVoidsBody3} body
* @param {string} id The credit ID returned from a previous credit request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
voidCredit(body: IdVoidsBody3, id: string, options?: AxiosRequestConfig & Configuration): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PtsV2CreditsVoidsPost201Response>>>;
/**
* Void a Payment API is only used, if you have requested Authorization and Capture together in [/pts/v2/payments](https://developer.cybersource.com/api-reference-assets/index.html#payments_payments) API call. Include the payment ID in the POST request to cancel the payment.
* @summary Void a Payment
* @param {IdVoidsBody} body
* @param {string} id The payment ID returned from a previous payment request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
voidPayment(body: IdVoidsBody, id: string, options?: AxiosRequestConfig & Configuration): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PtsV2PaymentsVoidsPost201Response>>>;
/**
* Include the refund ID in the POST request to cancel the refund.
* @summary Void a Refund
* @param {IdVoidsBody2} body
* @param {string} id The refund ID returned from a previous refund request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
voidRefund(body: IdVoidsBody2, id: string, options?: AxiosRequestConfig & Configuration): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PtsV2RefundsVoidsPost201Response>>>;
};
/**
* VoidApi - factory interface
* @export
*/
export declare const VoidApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* This is to void a previous payment, capture, refund, or credit that merchant does not receive a reply(Mostly due to timeout). To use this feature/API, make sure to pass unique value to field - clientReferenceInformation -> transactionId in your payment, capture, refund, or credit API call and use same transactionId in this API request payload to reverse the payment.
* @summary Timeout Void
* @param {V2VoidsBody} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
mitVoid(body: V2VoidsBody, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2VoidsPost200Response>>;
/**
* Refund a capture API is only used, if you have requested Capture independenlty using [/pts/v2/payments/{id}/captures](https://developer.cybersource.com/api-reference-assets/index.html#payments_capture) API call. Include the capture ID in the POST request to cancel the capture.
* @summary Void a Capture
* @param {IdVoidsBody1} body
* @param {string} id The capture ID returned from a previous capture request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
voidCapture(body: IdVoidsBody1, id: string, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2CapturesVoidsPost201Response>>;
/**
* Include the credit ID in the POST request to cancel the credit.
* @summary Void a Credit
* @param {IdVoidsBody3} body
* @param {string} id The credit ID returned from a previous credit request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
voidCredit(body: IdVoidsBody3, id: string, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2CreditsVoidsPost201Response>>;
/**
* Void a Payment API is only used, if you have requested Authorization and Capture together in [/pts/v2/payments](https://developer.cybersource.com/api-reference-assets/index.html#payments_payments) API call. Include the payment ID in the POST request to cancel the payment.
* @summary Void a Payment
* @param {IdVoidsBody} body
* @param {string} id The payment ID returned from a previous payment request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
voidPayment(body: IdVoidsBody, id: string, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2PaymentsVoidsPost201Response>>;
/**
* Include the refund ID in the POST request to cancel the refund.
* @summary Void a Refund
* @param {IdVoidsBody2} body
* @param {string} id The refund ID returned from a previous refund request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
voidRefund(body: IdVoidsBody2, id: string, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2RefundsVoidsPost201Response>>;
};
/**
* VoidApi - object-oriented interface
* @export
* @class VoidApi
* @extends {BaseAPI}
*/
export declare class VoidApi extends BaseAPI {
/**
* This is to void a previous payment, capture, refund, or credit that merchant does not receive a reply(Mostly due to timeout). To use this feature/API, make sure to pass unique value to field - clientReferenceInformation -> transactionId in your payment, capture, refund, or credit API call and use same transactionId in this API request payload to reverse the payment.
* @summary Timeout Void
* @param {V2VoidsBody} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof VoidApi
*/
mitVoid(body: V2VoidsBody, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2VoidsPost200Response>>;
/**
* Refund a capture API is only used, if you have requested Capture independenlty using [/pts/v2/payments/{id}/captures](https://developer.cybersource.com/api-reference-assets/index.html#payments_capture) API call. Include the capture ID in the POST request to cancel the capture.
* @summary Void a Capture
* @param {IdVoidsBody1} body
* @param {string} id The capture ID returned from a previous capture request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof VoidApi
*/
voidCapture(body: IdVoidsBody1, id: string, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2CapturesVoidsPost201Response>>;
/**
* Include the credit ID in the POST request to cancel the credit.
* @summary Void a Credit
* @param {IdVoidsBody3} body
* @param {string} id The credit ID returned from a previous credit request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof VoidApi
*/
voidCredit(body: IdVoidsBody3, id: string, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2CreditsVoidsPost201Response>>;
/**
* Void a Payment API is only used, if you have requested Authorization and Capture together in [/pts/v2/payments](https://developer.cybersource.com/api-reference-assets/index.html#payments_payments) API call. Include the payment ID in the POST request to cancel the payment.
* @summary Void a Payment
* @param {IdVoidsBody} body
* @param {string} id The payment ID returned from a previous payment request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof VoidApi
*/
voidPayment(body: IdVoidsBody, id: string, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2PaymentsVoidsPost201Response>>;
/**
* Include the refund ID in the POST request to cancel the refund.
* @summary Void a Refund
* @param {IdVoidsBody2} body
* @param {string} id The refund ID returned from a previous refund request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof VoidApi
*/
voidRefund(body: IdVoidsBody2, id: string, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2RefundsVoidsPost201Response>>;
}