@circle-fin/circle-sdk
Version:
Node.js SDK for Circle API
158 lines (157 loc) • 14.2 kB
TypeScript
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from "axios";
import { Configuration } from "../configuration";
import { RequestArgs, BaseAPI } from "../base";
import { CreateMockChargebackResponse } from "../models";
import { GetChargebackResponse } from "../models";
import { ListChargebacksResponse } from "../models";
import { MockChargebackCreationRequest } from "../models";
/**
* ChargebacksApi - axios parameter creator
* @export
*/
export declare const ChargebacksApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* In the sandbox environment, initiate a mock chargeback of a specified payment. The entire payment will be charged back for its full value. The payment must be in the `paid` state (otherwise the endpoint will return a `404`), and each payment can only be charged back once (otherwise the endpoint will return a `409`). This endpoint is only available in the sandbox environment.
* @summary Create a mock chargeback
* @param {MockChargebackCreationRequest} [mockChargebackCreationRequest]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createMockChargeback: (mockChargebackCreationRequest?: MockChargebackCreationRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Get a chargeback
* @param {string} id Universally unique identifier (UUID v4) of a resource.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getChargeback: (id: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Retrieve list of chargebacks. Results will be sorted by create date descending: more recent chargebacks will be at the beginning of the list.
* @summary List all chargebacks
* @param {string} [paymentId] The payment ID associated with the chargeback.
* @param {string} [from] Queries items created since the specified date-time (inclusive).
* @param {string} [to] Queries items created before the specified date-time (inclusive).
* @param {string} [pageBefore] A collection ID value used for pagination. It marks the exclusive end of a page. When provided, the collection resource will return the next `n` items before the id, with `n` being specified by `pageSize`. The items will be returned in the natural order of the collection. The resource will return the first page if neither `pageAfter` nor `pageBefore` are specified. SHOULD NOT be used in conjuction with pageAfter.
* @param {string} [pageAfter] A collection ID value used for pagination. It marks the exclusive begin of a page. When provided, the collection resource will return the next `n` items after the id, with `n` being specified by `pageSize`. The items will be returned in the natural order of the collection. The resource will return the first page if neither `pageAfter` nor `pageBefore` are specified. SHOULD NOT be used in conjuction with pageBefore.
* @param {number} [pageSize] Limits the number of items to be returned. Some collections have a strict upper bound that will disregard this value. In case the specified value is higher than the allowed limit, the collection limit will be used. If avoided, the collection will determine the page size itself.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listChargebacks: (paymentId?: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* ChargebacksApi - functional programming interface
* @export
*/
export declare const ChargebacksApiFp: (configuration?: Configuration) => {
/**
* In the sandbox environment, initiate a mock chargeback of a specified payment. The entire payment will be charged back for its full value. The payment must be in the `paid` state (otherwise the endpoint will return a `404`), and each payment can only be charged back once (otherwise the endpoint will return a `409`). This endpoint is only available in the sandbox environment.
* @summary Create a mock chargeback
* @param {MockChargebackCreationRequest} [mockChargebackCreationRequest]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createMockChargeback(mockChargebackCreationRequest?: MockChargebackCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateMockChargebackResponse>>;
/**
*
* @summary Get a chargeback
* @param {string} id Universally unique identifier (UUID v4) of a resource.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getChargeback(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetChargebackResponse>>;
/**
* Retrieve list of chargebacks. Results will be sorted by create date descending: more recent chargebacks will be at the beginning of the list.
* @summary List all chargebacks
* @param {string} [paymentId] The payment ID associated with the chargeback.
* @param {string} [from] Queries items created since the specified date-time (inclusive).
* @param {string} [to] Queries items created before the specified date-time (inclusive).
* @param {string} [pageBefore] A collection ID value used for pagination. It marks the exclusive end of a page. When provided, the collection resource will return the next `n` items before the id, with `n` being specified by `pageSize`. The items will be returned in the natural order of the collection. The resource will return the first page if neither `pageAfter` nor `pageBefore` are specified. SHOULD NOT be used in conjuction with pageAfter.
* @param {string} [pageAfter] A collection ID value used for pagination. It marks the exclusive begin of a page. When provided, the collection resource will return the next `n` items after the id, with `n` being specified by `pageSize`. The items will be returned in the natural order of the collection. The resource will return the first page if neither `pageAfter` nor `pageBefore` are specified. SHOULD NOT be used in conjuction with pageBefore.
* @param {number} [pageSize] Limits the number of items to be returned. Some collections have a strict upper bound that will disregard this value. In case the specified value is higher than the allowed limit, the collection limit will be used. If avoided, the collection will determine the page size itself.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listChargebacks(paymentId?: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListChargebacksResponse>>;
};
/**
* ChargebacksApi - factory interface
* @export
*/
export declare const ChargebacksApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* In the sandbox environment, initiate a mock chargeback of a specified payment. The entire payment will be charged back for its full value. The payment must be in the `paid` state (otherwise the endpoint will return a `404`), and each payment can only be charged back once (otherwise the endpoint will return a `409`). This endpoint is only available in the sandbox environment.
* @summary Create a mock chargeback
* @param {MockChargebackCreationRequest} [mockChargebackCreationRequest]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createMockChargeback(mockChargebackCreationRequest?: MockChargebackCreationRequest, options?: any): AxiosPromise<CreateMockChargebackResponse>;
/**
*
* @summary Get a chargeback
* @param {string} id Universally unique identifier (UUID v4) of a resource.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getChargeback(id: string, options?: any): AxiosPromise<GetChargebackResponse>;
/**
* Retrieve list of chargebacks. Results will be sorted by create date descending: more recent chargebacks will be at the beginning of the list.
* @summary List all chargebacks
* @param {string} [paymentId] The payment ID associated with the chargeback.
* @param {string} [from] Queries items created since the specified date-time (inclusive).
* @param {string} [to] Queries items created before the specified date-time (inclusive).
* @param {string} [pageBefore] A collection ID value used for pagination. It marks the exclusive end of a page. When provided, the collection resource will return the next `n` items before the id, with `n` being specified by `pageSize`. The items will be returned in the natural order of the collection. The resource will return the first page if neither `pageAfter` nor `pageBefore` are specified. SHOULD NOT be used in conjuction with pageAfter.
* @param {string} [pageAfter] A collection ID value used for pagination. It marks the exclusive begin of a page. When provided, the collection resource will return the next `n` items after the id, with `n` being specified by `pageSize`. The items will be returned in the natural order of the collection. The resource will return the first page if neither `pageAfter` nor `pageBefore` are specified. SHOULD NOT be used in conjuction with pageBefore.
* @param {number} [pageSize] Limits the number of items to be returned. Some collections have a strict upper bound that will disregard this value. In case the specified value is higher than the allowed limit, the collection limit will be used. If avoided, the collection will determine the page size itself.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listChargebacks(paymentId?: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise<ListChargebacksResponse>;
};
/**
* ChargebacksApi - object-oriented interface
* @export
* @class ChargebacksApi
* @extends {BaseAPI}
*/
export declare class ChargebacksApi extends BaseAPI {
/**
* In the sandbox environment, initiate a mock chargeback of a specified payment. The entire payment will be charged back for its full value. The payment must be in the `paid` state (otherwise the endpoint will return a `404`), and each payment can only be charged back once (otherwise the endpoint will return a `409`). This endpoint is only available in the sandbox environment.
* @summary Create a mock chargeback
* @param {MockChargebackCreationRequest} [mockChargebackCreationRequest]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ChargebacksApi
*/
createMockChargeback(mockChargebackCreationRequest?: MockChargebackCreationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateMockChargebackResponse, any>>;
/**
*
* @summary Get a chargeback
* @param {string} id Universally unique identifier (UUID v4) of a resource.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ChargebacksApi
*/
getChargeback(id: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetChargebackResponse, any>>;
/**
* Retrieve list of chargebacks. Results will be sorted by create date descending: more recent chargebacks will be at the beginning of the list.
* @summary List all chargebacks
* @param {string} [paymentId] The payment ID associated with the chargeback.
* @param {string} [from] Queries items created since the specified date-time (inclusive).
* @param {string} [to] Queries items created before the specified date-time (inclusive).
* @param {string} [pageBefore] A collection ID value used for pagination. It marks the exclusive end of a page. When provided, the collection resource will return the next `n` items before the id, with `n` being specified by `pageSize`. The items will be returned in the natural order of the collection. The resource will return the first page if neither `pageAfter` nor `pageBefore` are specified. SHOULD NOT be used in conjuction with pageAfter.
* @param {string} [pageAfter] A collection ID value used for pagination. It marks the exclusive begin of a page. When provided, the collection resource will return the next `n` items after the id, with `n` being specified by `pageSize`. The items will be returned in the natural order of the collection. The resource will return the first page if neither `pageAfter` nor `pageBefore` are specified. SHOULD NOT be used in conjuction with pageBefore.
* @param {number} [pageSize] Limits the number of items to be returned. Some collections have a strict upper bound that will disregard this value. In case the specified value is higher than the allowed limit, the collection limit will be used. If avoided, the collection will determine the page size itself.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ChargebacksApi
*/
listChargebacks(paymentId?: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListChargebacksResponse, any>>;
}