UNPKG

@circle-fin/circle-sdk

Version:
239 lines (238 loc) 17.6 kB
/** * 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 { CreateCryptoRefundResponse } from "../models"; import { CreatePaymentIntentRequest } from "../models"; import { CreatePaymentIntentResponse } from "../models"; import { CryptoRefundCreationRequest } from "../models"; import { ExpirePaymentIntentResponse } from "../models"; import { GetPaymentIntentResponse } from "../models"; import { ListPaymentIntentsResponse } from "../models"; /** * CryptoPaymentIntentsApi - axios parameter creator * @export */ export declare const CryptoPaymentIntentsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Create a transient or continuous payment intent * @summary Create a payment intent * @param {CreatePaymentIntentRequest} [createPaymentIntentRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createPaymentIntent: (createPaymentIntentRequest?: CreatePaymentIntentRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * * @summary Expire a payment intent * @param {string} id Universally unique identifier (UUID v4) of a resource. * @param {object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ expirePaymentIntent: (id: string, body?: object, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * * @summary Get a payment intent * @param {string} id Universally unique identifier (UUID v4) of a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPaymentIntent: (id: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * * @summary List all payment intents * @param {'created' | 'pending' | 'complete' | 'expired' | 'failed'} [status] Filters by the most recent &#x60;timeline.status&#x60; within the payment intent. * @param {'underpaid' | 'paid' | 'overpaid'} [context] Filters by the most recent &#x60;timeline.context&#x60; within the payment intent. * @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 &#x60;n&#x60; items before the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; 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 &#x60;n&#x60; items after the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; 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} */ listPaymentIntents: (status?: "created" | "pending" | "complete" | "expired" | "failed", context?: "underpaid" | "paid" | "overpaid", from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * * @summary Refund a payment intent * @param {string} id Universally unique identifier (UUID v4) of a resource. * @param {CryptoRefundCreationRequest} [cryptoRefundCreationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ refundPaymentIntent: (id: string, cryptoRefundCreationRequest?: CryptoRefundCreationRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>; }; /** * CryptoPaymentIntentsApi - functional programming interface * @export */ export declare const CryptoPaymentIntentsApiFp: (configuration?: Configuration) => { /** * Create a transient or continuous payment intent * @summary Create a payment intent * @param {CreatePaymentIntentRequest} [createPaymentIntentRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createPaymentIntent(createPaymentIntentRequest?: CreatePaymentIntentRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePaymentIntentResponse>>; /** * * @summary Expire a payment intent * @param {string} id Universally unique identifier (UUID v4) of a resource. * @param {object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ expirePaymentIntent(id: string, body?: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExpirePaymentIntentResponse>>; /** * * @summary Get a payment intent * @param {string} id Universally unique identifier (UUID v4) of a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPaymentIntent(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPaymentIntentResponse>>; /** * * @summary List all payment intents * @param {'created' | 'pending' | 'complete' | 'expired' | 'failed'} [status] Filters by the most recent &#x60;timeline.status&#x60; within the payment intent. * @param {'underpaid' | 'paid' | 'overpaid'} [context] Filters by the most recent &#x60;timeline.context&#x60; within the payment intent. * @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 &#x60;n&#x60; items before the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; 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 &#x60;n&#x60; items after the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; 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} */ listPaymentIntents(status?: "created" | "pending" | "complete" | "expired" | "failed", context?: "underpaid" | "paid" | "overpaid", from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPaymentIntentsResponse>>; /** * * @summary Refund a payment intent * @param {string} id Universally unique identifier (UUID v4) of a resource. * @param {CryptoRefundCreationRequest} [cryptoRefundCreationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ refundPaymentIntent(id: string, cryptoRefundCreationRequest?: CryptoRefundCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCryptoRefundResponse>>; }; /** * CryptoPaymentIntentsApi - factory interface * @export */ export declare const CryptoPaymentIntentsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Create a transient or continuous payment intent * @summary Create a payment intent * @param {CreatePaymentIntentRequest} [createPaymentIntentRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createPaymentIntent(createPaymentIntentRequest?: CreatePaymentIntentRequest, options?: any): AxiosPromise<CreatePaymentIntentResponse>; /** * * @summary Expire a payment intent * @param {string} id Universally unique identifier (UUID v4) of a resource. * @param {object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ expirePaymentIntent(id: string, body?: object, options?: any): AxiosPromise<ExpirePaymentIntentResponse>; /** * * @summary Get a payment intent * @param {string} id Universally unique identifier (UUID v4) of a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPaymentIntent(id: string, options?: any): AxiosPromise<GetPaymentIntentResponse>; /** * * @summary List all payment intents * @param {'created' | 'pending' | 'complete' | 'expired' | 'failed'} [status] Filters by the most recent &#x60;timeline.status&#x60; within the payment intent. * @param {'underpaid' | 'paid' | 'overpaid'} [context] Filters by the most recent &#x60;timeline.context&#x60; within the payment intent. * @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 &#x60;n&#x60; items before the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; 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 &#x60;n&#x60; items after the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; 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} */ listPaymentIntents(status?: "created" | "pending" | "complete" | "expired" | "failed", context?: "underpaid" | "paid" | "overpaid", from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise<ListPaymentIntentsResponse>; /** * * @summary Refund a payment intent * @param {string} id Universally unique identifier (UUID v4) of a resource. * @param {CryptoRefundCreationRequest} [cryptoRefundCreationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ refundPaymentIntent(id: string, cryptoRefundCreationRequest?: CryptoRefundCreationRequest, options?: any): AxiosPromise<CreateCryptoRefundResponse>; }; /** * CryptoPaymentIntentsApi - object-oriented interface * @export * @class CryptoPaymentIntentsApi * @extends {BaseAPI} */ export declare class CryptoPaymentIntentsApi extends BaseAPI { /** * Create a transient or continuous payment intent * @summary Create a payment intent * @param {CreatePaymentIntentRequest} [createPaymentIntentRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CryptoPaymentIntentsApi */ createPaymentIntent(createPaymentIntentRequest?: CreatePaymentIntentRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePaymentIntentResponse, any>>; /** * * @summary Expire a payment intent * @param {string} id Universally unique identifier (UUID v4) of a resource. * @param {object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CryptoPaymentIntentsApi */ expirePaymentIntent(id: string, body?: object, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ExpirePaymentIntentResponse, any>>; /** * * @summary Get a payment intent * @param {string} id Universally unique identifier (UUID v4) of a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CryptoPaymentIntentsApi */ getPaymentIntent(id: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetPaymentIntentResponse, any>>; /** * * @summary List all payment intents * @param {'created' | 'pending' | 'complete' | 'expired' | 'failed'} [status] Filters by the most recent &#x60;timeline.status&#x60; within the payment intent. * @param {'underpaid' | 'paid' | 'overpaid'} [context] Filters by the most recent &#x60;timeline.context&#x60; within the payment intent. * @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 &#x60;n&#x60; items before the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; 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 &#x60;n&#x60; items after the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; 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 CryptoPaymentIntentsApi */ listPaymentIntents(status?: "created" | "pending" | "complete" | "expired" | "failed", context?: "underpaid" | "paid" | "overpaid", from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListPaymentIntentsResponse, any>>; /** * * @summary Refund a payment intent * @param {string} id Universally unique identifier (UUID v4) of a resource. * @param {CryptoRefundCreationRequest} [cryptoRefundCreationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CryptoPaymentIntentsApi */ refundPaymentIntent(id: string, cryptoRefundCreationRequest?: CryptoRefundCreationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateCryptoRefundResponse, any>>; }