@paciolan/cybersource-sdk
Version:
CyberSource REST API Typescript SDK
266 lines (265 loc) • 16.2 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 { IdIntentsBody } from '../models';
import { PaymentreferencesIdBody } from '../models';
import { PaymentsIdBody } from '../models';
import { PtsV2IncrementalAuthorizationPatch201Response } from '../models';
import { PtsV2PaymentsOrderPost201Response } from '../models';
import { PtsV2PaymentsPost201Response } from '../models';
import { PtsV2PaymentsPost201Response1 } from '../models';
import { PtsV2PaymentsPost201Response2 } from '../models';
import { RefreshpaymentstatusIdBody } from '../models';
import { V2PaymentreferencesBody } from '../models';
import { V2PaymentsBody } from '../models';
/**
* PaymentsApi - axios parameter creator
* @export
*/
export declare const PaymentsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Create a Payment Order Request
* @summary Create a Payment Order Request
* @param {IdIntentsBody} body
* @param {string} id Request identifier number for the order request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createOrderRequest: (body: IdIntentsBody, id: string, options?: AxiosRequestConfig & Configuration) => Promise<RequestArgs>;
/**
* A payment authorizes the amount for the transaction. There are a number of supported payment features, such as E-commerce and Card Present - Credit Card/Debit Card, Echeck, e-Wallets, Level II/III Data, etc.. A payment response includes the status of the request. It also includes processor-specific information when the request is successful and errors if unsuccessful. See the [Payments Developer Guides Page](https://developer.cybersource.com/docs/cybs/en-us/payments/developer/ctv/rest/payments/payments-intro.html). Authorization can be requested with Capture, Decision Manager, Payer Authentication(3ds), and Token Creation.
* @summary Process a Payment
* @param {V2PaymentsBody} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPayment: (body: V2PaymentsBody, options?: AxiosRequestConfig & Configuration) => Promise<RequestArgs>;
/**
* Create Alternative Payments Sessions Request
* @summary Create Alternative Payments Sessions Request
* @param {V2PaymentreferencesBody} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createSessionRequest: (body: V2PaymentreferencesBody, options?: AxiosRequestConfig & Configuration) => Promise<RequestArgs>;
/**
* Use this service to authorize additional charges in a lodging or autorental transaction. Include the ID returned from the original authorization in the PATCH request to add additional charges to that authorization.
* @summary Increment an Authorization
* @param {PaymentsIdBody} body
* @param {string} id The ID returned from the original authorization request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
incrementAuth: (body: PaymentsIdBody, id: string, options?: AxiosRequestConfig & Configuration) => Promise<RequestArgs>;
/**
* Checks and updates the payment status
* @summary Check a Payment Status
* @param {RefreshpaymentstatusIdBody} body
* @param {string} id The payment id whose status needs to be checked and updated.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
refreshPaymentStatus: (body: RefreshpaymentstatusIdBody, id: string, options?: AxiosRequestConfig & Configuration) => Promise<RequestArgs>;
/**
* Update Alternative Payments Sessions Request
* @summary Update Alternative Payments Sessions Request
* @param {PaymentreferencesIdBody} body
* @param {string} id The payment ID. This ID is returned from a previous payment request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateSessionReq: (body: PaymentreferencesIdBody, id: string, options?: AxiosRequestConfig & Configuration) => Promise<RequestArgs>;
};
/**
* PaymentsApi - functional programming interface
* @export
*/
export declare const PaymentsApiFp: (configuration?: Configuration) => {
/**
* Create a Payment Order Request
* @summary Create a Payment Order Request
* @param {IdIntentsBody} body
* @param {string} id Request identifier number for the order request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createOrderRequest(body: IdIntentsBody, id: string, options?: AxiosRequestConfig & Configuration): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PtsV2PaymentsOrderPost201Response>>>;
/**
* A payment authorizes the amount for the transaction. There are a number of supported payment features, such as E-commerce and Card Present - Credit Card/Debit Card, Echeck, e-Wallets, Level II/III Data, etc.. A payment response includes the status of the request. It also includes processor-specific information when the request is successful and errors if unsuccessful. See the [Payments Developer Guides Page](https://developer.cybersource.com/docs/cybs/en-us/payments/developer/ctv/rest/payments/payments-intro.html). Authorization can be requested with Capture, Decision Manager, Payer Authentication(3ds), and Token Creation.
* @summary Process a Payment
* @param {V2PaymentsBody} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPayment(body: V2PaymentsBody, options?: AxiosRequestConfig & Configuration): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PtsV2PaymentsPost201Response>>>;
/**
* Create Alternative Payments Sessions Request
* @summary Create Alternative Payments Sessions Request
* @param {V2PaymentreferencesBody} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createSessionRequest(body: V2PaymentreferencesBody, options?: AxiosRequestConfig & Configuration): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PtsV2PaymentsPost201Response2>>>;
/**
* Use this service to authorize additional charges in a lodging or autorental transaction. Include the ID returned from the original authorization in the PATCH request to add additional charges to that authorization.
* @summary Increment an Authorization
* @param {PaymentsIdBody} body
* @param {string} id The ID returned from the original authorization request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
incrementAuth(body: PaymentsIdBody, id: string, options?: AxiosRequestConfig & Configuration): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PtsV2IncrementalAuthorizationPatch201Response>>>;
/**
* Checks and updates the payment status
* @summary Check a Payment Status
* @param {RefreshpaymentstatusIdBody} body
* @param {string} id The payment id whose status needs to be checked and updated.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
refreshPaymentStatus(body: RefreshpaymentstatusIdBody, id: string, options?: AxiosRequestConfig & Configuration): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PtsV2PaymentsPost201Response1>>>;
/**
* Update Alternative Payments Sessions Request
* @summary Update Alternative Payments Sessions Request
* @param {PaymentreferencesIdBody} body
* @param {string} id The payment ID. This ID is returned from a previous payment request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateSessionReq(body: PaymentreferencesIdBody, id: string, options?: AxiosRequestConfig & Configuration): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PtsV2PaymentsPost201Response2>>>;
};
/**
* PaymentsApi - factory interface
* @export
*/
export declare const PaymentsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Create a Payment Order Request
* @summary Create a Payment Order Request
* @param {IdIntentsBody} body
* @param {string} id Request identifier number for the order request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createOrderRequest(body: IdIntentsBody, id: string, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2PaymentsOrderPost201Response>>;
/**
* A payment authorizes the amount for the transaction. There are a number of supported payment features, such as E-commerce and Card Present - Credit Card/Debit Card, Echeck, e-Wallets, Level II/III Data, etc.. A payment response includes the status of the request. It also includes processor-specific information when the request is successful and errors if unsuccessful. See the [Payments Developer Guides Page](https://developer.cybersource.com/docs/cybs/en-us/payments/developer/ctv/rest/payments/payments-intro.html). Authorization can be requested with Capture, Decision Manager, Payer Authentication(3ds), and Token Creation.
* @summary Process a Payment
* @param {V2PaymentsBody} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPayment(body: V2PaymentsBody, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2PaymentsPost201Response>>;
/**
* Create Alternative Payments Sessions Request
* @summary Create Alternative Payments Sessions Request
* @param {V2PaymentreferencesBody} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createSessionRequest(body: V2PaymentreferencesBody, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2PaymentsPost201Response2>>;
/**
* Use this service to authorize additional charges in a lodging or autorental transaction. Include the ID returned from the original authorization in the PATCH request to add additional charges to that authorization.
* @summary Increment an Authorization
* @param {PaymentsIdBody} body
* @param {string} id The ID returned from the original authorization request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
incrementAuth(body: PaymentsIdBody, id: string, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2IncrementalAuthorizationPatch201Response>>;
/**
* Checks and updates the payment status
* @summary Check a Payment Status
* @param {RefreshpaymentstatusIdBody} body
* @param {string} id The payment id whose status needs to be checked and updated.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
refreshPaymentStatus(body: RefreshpaymentstatusIdBody, id: string, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2PaymentsPost201Response1>>;
/**
* Update Alternative Payments Sessions Request
* @summary Update Alternative Payments Sessions Request
* @param {PaymentreferencesIdBody} body
* @param {string} id The payment ID. This ID is returned from a previous payment request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateSessionReq(body: PaymentreferencesIdBody, id: string, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2PaymentsPost201Response2>>;
};
/**
* PaymentsApi - object-oriented interface
* @export
* @class PaymentsApi
* @extends {BaseAPI}
*/
export declare class PaymentsApi extends BaseAPI {
/**
* Create a Payment Order Request
* @summary Create a Payment Order Request
* @param {IdIntentsBody} body
* @param {string} id Request identifier number for the order request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PaymentsApi
*/
createOrderRequest(body: IdIntentsBody, id: string, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2PaymentsOrderPost201Response>>;
/**
* A payment authorizes the amount for the transaction. There are a number of supported payment features, such as E-commerce and Card Present - Credit Card/Debit Card, Echeck, e-Wallets, Level II/III Data, etc.. A payment response includes the status of the request. It also includes processor-specific information when the request is successful and errors if unsuccessful. See the [Payments Developer Guides Page](https://developer.cybersource.com/docs/cybs/en-us/payments/developer/ctv/rest/payments/payments-intro.html). Authorization can be requested with Capture, Decision Manager, Payer Authentication(3ds), and Token Creation.
* @summary Process a Payment
* @param {V2PaymentsBody} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PaymentsApi
*/
createPayment(body: V2PaymentsBody, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2PaymentsPost201Response>>;
/**
* Create Alternative Payments Sessions Request
* @summary Create Alternative Payments Sessions Request
* @param {V2PaymentreferencesBody} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PaymentsApi
*/
createSessionRequest(body: V2PaymentreferencesBody, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2PaymentsPost201Response2>>;
/**
* Use this service to authorize additional charges in a lodging or autorental transaction. Include the ID returned from the original authorization in the PATCH request to add additional charges to that authorization.
* @summary Increment an Authorization
* @param {PaymentsIdBody} body
* @param {string} id The ID returned from the original authorization request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PaymentsApi
*/
incrementAuth(body: PaymentsIdBody, id: string, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2IncrementalAuthorizationPatch201Response>>;
/**
* Checks and updates the payment status
* @summary Check a Payment Status
* @param {RefreshpaymentstatusIdBody} body
* @param {string} id The payment id whose status needs to be checked and updated.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PaymentsApi
*/
refreshPaymentStatus(body: RefreshpaymentstatusIdBody, id: string, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2PaymentsPost201Response1>>;
/**
* Update Alternative Payments Sessions Request
* @summary Update Alternative Payments Sessions Request
* @param {PaymentreferencesIdBody} body
* @param {string} id The payment ID. This ID is returned from a previous payment request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PaymentsApi
*/
updateSessionReq(body: PaymentreferencesIdBody, id: string, options?: AxiosRequestConfig & Configuration): Promise<AxiosResponse<PtsV2PaymentsPost201Response2>>;
}