From 617ecc2cd63b3c4f26cfe10afd9d268203e10c7d Mon Sep 17 00:00:00 2001 From: deepakgummi Date: Sat, 6 Aug 2022 22:01:30 -0500 Subject: [PATCH 1/7] Added Initial SDK Files --- .dockerignore | 2 + .eslintrc.json | 89 + .npmignore | 8 + .npmrc | 1 + .openapi-generator-ignore | 7 + .openapi-generator/FILES | 5 + .prettierrc | 7 + Dockerfile | 13 + LICENSE | 21 + VERSION | 1 - common.ts | 138 + configuration.ts | 120 + index.ts | 18 + package.json | 26 +- sdk-doc.json | 10843 ++++++++++++++++ src/index.ts | 3 - .../typescript-axios/configuration.mustache | 110 + tsconfig.json | 27 +- 18 files changed, 11426 insertions(+), 13 deletions(-) create mode 100644 .dockerignore create mode 100644 .eslintrc.json create mode 100644 .npmignore create mode 100644 .openapi-generator-ignore create mode 100644 .openapi-generator/FILES create mode 100644 .prettierrc create mode 100644 Dockerfile create mode 100755 LICENSE delete mode 100644 VERSION create mode 100644 common.ts create mode 100644 configuration.ts create mode 100644 index.ts create mode 100644 sdk-doc.json delete mode 100644 src/index.ts create mode 100644 templates/typescript-axios/configuration.mustache diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5171c54 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..3d66c9a --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,89 @@ +{ + "parserOptions": { + "ecmaVersion": 6 + }, + "rules": { + "no-empty": [ + 2, + { + "allowEmptyCatch": true + } + ], + "no-implicit-coercion": [ + 2, + { + "boolean": true, + "string": true, + "number": true + } + ], + "indent": [2, 2], + "brace-style": [ + 2, + "1tbs", + { + "allowSingleLine": true + } + ], + "no-mixed-spaces-and-tabs": 2, + "no-multi-str": 2, + "key-spacing": [ + 2, + { + "beforeColon": false, + "afterColon": true + } + ], + "space-unary-ops": [ + 2, + { + "words": false, + "nonwords": false + } + ], + "space-before-function-paren": [2, "never"], + "array-bracket-spacing": [ + 2, + "never", + { + "singleValue": false + } + ], + "space-in-parens": [2, "never"], + "no-trailing-spaces": 2, + "yoda": [2, "never"], + "max-len": [2, 79], + "comma-style": [2, "last"], + "curly": [2, "all"], + "dot-notation": 2, + "eol-last": 2, + "wrap-iife": 2, + "space-infix-ops": 2, + "keyword-spacing": [ + 2, + { + "overrides": { + "else": { + "before": true + }, + "catch": { + "before": true + }, + "finally": { + "before": true + } + } + } + ], + "spaced-comment": [2, "always"], + "space-before-blocks": [2, "always"], + "linebreak-style": [2, "unix"], + "quotes": [ + 2, + "single", + { + "avoidEscape": true + } + ] + } +} diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..de69c00 --- /dev/null +++ b/.npmignore @@ -0,0 +1,8 @@ +/test/ +/.gitignore +/.jscsrc +/.jshintrc +/Makefile +/PUBLISHING.md +/circle.yml +/tsconfig.json diff --git a/.npmrc b/.npmrc index 7715576..6ff93b8 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ +registry=https://registry.npmjs.com package-lock = false \ No newline at end of file diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..5d79d96 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,7 @@ +.gitignore +.npmignore +README.md +git_push.sh +package.json +package-lock.json +tsconfig.json \ No newline at end of file diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 0000000..53250c0 --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,5 @@ +api.ts +base.ts +common.ts +configuration.ts +index.ts diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..59a856f --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "bracketSpacing": true, + "semi": true, + "singleQuote": true, + "trailingComma": "all", + "arrowParens": "always" +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..82e8696 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM node:15 + +# Create app directory +WORKDIR /usr/src/app + +# Copy app to directory +COPY . /usr/src/app + +RUN npm install + +CMD ["make", "test"] + + diff --git a/LICENSE b/LICENSE new file mode 100755 index 0000000..4a2a817 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2021 Plaid Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/VERSION b/VERSION deleted file mode 100644 index 75ceaeb..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.1.0-alpha.0 \ No newline at end of file diff --git a/common.ts b/common.ts new file mode 100644 index 0000000..96d918b --- /dev/null +++ b/common.ts @@ -0,0 +1,138 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Core Functionality + * APIs for managing your account balance. These endpoints are available with all Circle APIs. + * + * The version of the OpenAPI document: ${version} + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance, AxiosResponse } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + if (Array.isArray(object[key])) { + searchParams.delete(key); + for (const item of object[key]) { + searchParams.append(key, item); + } + } else { + searchParams.set(key, object[key]); + } + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/configuration.ts b/configuration.ts new file mode 100644 index 0000000..f04d179 --- /dev/null +++ b/configuration.ts @@ -0,0 +1,120 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Core Functionality + * APIs for managing your account balance. These endpoints are available with all Circle APIs. + * + * The version of the OpenAPI document: ${version} + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +// Edited by Circle, lines 16¬-25 +interface CircleEnvironment { + [env: string]: string; +} + +export const CircleEnvironments: CircleEnvironment = { + production: 'https://account.circle.com', + sandbox: 'https://api-sandbox.circle.com', + development: 'https://localhost:8080', +}; + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + + if (!this.baseOptions) this.baseOptions = {}; + if (!this.baseOptions.headers) this.baseOptions.headers = {}; + this.baseOptions.headers = { + ['User-Agent']: `Circle Node v0.1.0-alpha.0`, + ['Circle-Version']: 'v1', + ...this.baseOptions.headers, + } + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..2247bea --- /dev/null +++ b/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Core Functionality + * APIs for managing your account balance. These endpoints are available with all Circle APIs. + * + * The version of the OpenAPI document: ${version} + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/package.json b/package.json index d99a20f..6a6f01b 100644 --- a/package.json +++ b/package.json @@ -12,14 +12,34 @@ "type": "git", "url": "git+https://github.com/circlefin/circle-nodejs-sdk.git" }, - "keywords": [], - "author": "", + "keywords": [ + "circle", + "circle.com" + ], "license": "MIT", "bugs": { "url": "https://github.com/circlefin/circle-nodejs-sdk/issues" }, + "engines": { + "node": ">=10.0.0" + }, + "dependencies": { + "axios": "0.21.4" + }, "homepage": "https://github.com/circlefin/circle-nodejs-sdk#readme", + "publishConfig": { + "registry": "https://registry.npmjs.com" + }, "devDependencies": { - "typescript": "^4.7.4" + "@types/chai": "^4.2.14", + "@types/mocha": "^8.2.0", + "@types/node": "^14.14.14", + "chai": "^4.2.0", + "expect.js": "0.3.x", + "istanbul": "^0.4.5", + "jshint": "^2.11.0", + "mocha": "8.x", + "ts-node": "^9.1.1", + "typescript": "4.1.3" } } diff --git a/sdk-doc.json b/sdk-doc.json new file mode 100644 index 0000000..aaddbcb --- /dev/null +++ b/sdk-doc.json @@ -0,0 +1,10843 @@ +{ + "openapi": "3.0.2", + "servers": [ + { + "url": "api-sandbox.circle.com" + } + ], + "info": { + "version": "${version}", + "title": "Core Functionality", + "description": "APIs for managing your account balance. These endpoints are available with all Circle APIs." + }, + "tags": [ + { + "name": "Balances" + }, + { + "name": "Payouts" + }, + { + "name": "Wires" + }, + { + "name": "Signet" + }, + { + "name": "SEN" + }, + { + "name": "Transfers" + }, + { + "name": "Addresses" + }, + { + "name": "Deposits" + }, + { + "name": "Wallets" + }, + { + "name": "Health", + "description": "Inspect the health of the API." + }, + { + "name": "Management", + "description": "General account and management information." + }, + { + "name": "Encryption", + "description": "Encrypt sensitive data." + }, + { + "name": "Subscriptions", + "description": "Manage subscriptions to notifications." + }, + { + "name": "Stablecoins", + "description": "Retrieve stablecoins and their respective names, symbols, circulating total and per-chain amounts." + }, + { + "name": "Channels", + "description": "View a list of channels." + }, + { + "name": "Payments" + }, + { + "name": "On-chain payments" + }, + { + "name": "Cards" + }, + { + "name": "ACH" + }, + { + "name": "SEPA" + }, + { + "name": "Settlements" + }, + { + "name": "Chargebacks" + }, + { + "name": "Reversals" + }, + { + "name": "On-chain payouts" + }, + { + "name": "Returns" + } + ], + "paths": { + "/v1/businessAccount/balances": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "List all balances", + "description": "Retrieves the balance of funds that are available for use.", + "operationId": "getBusinessAccountBalances", + "tags": [ + "Balances" + ], + "responses": { + "200": { + "description": "Successfully retrieved balances.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetBusinessAccountBalancesResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Balances" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "available": [ + { + "amount": "3.14", + "currency": "USD" + } + ], + "unsettled": [ + { + "amount": "3.14", + "currency": "USD" + } + ] + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/businessAccount/payouts": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/destination" + }, + { + "name": "type", + "description": "Destination bank account type. Filters the results to fetch all payouts made to a specified destination bank account type. This query parameter can be passed multiple times to fetch results matching multiple destination bank account types.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "wire" + ] + } + }, + { + "name": "status", + "description": "Queries items with the specified status. Matches any status if unspecified.", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayoutStatus" + } + } + }, + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "summary": "List all payouts", + "operationId": "getBusinessAccountPayouts", + "tags": [ + "Payouts" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of payouts.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetBusinessAccountPayoutsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayoutBusinessAccount" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "sourceWalletId": "53535335", + "destination": { + "type": "wire", + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "name": "COMMERZBANK AG ****3000" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "status": "pending", + "trackingRef": "CIR-6ESOQANEP3NAO", + "errorCode": "insufficient_funds", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "adjustments": { + "fxCredit": { + "amount": "3.14", + "currency": "USD" + }, + "fxDebit": { + "amount": "3.14", + "currency": "USD" + } + }, + "return": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "reason": "payout_returned", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + }, + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a payout", + "operationId": "createBusinessAccountPayout", + "tags": [ + "Payouts" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BusinessAccountPayoutCreationRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a payout.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreateBusinessAccountPayoutResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/PayoutBusinessAccount" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "sourceWalletId": "53535335", + "destination": { + "type": "wire", + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "name": "COMMERZBANK AG ****3000" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "status": "pending", + "trackingRef": "CIR-6ESOQANEP3NAO", + "errorCode": "insufficient_funds", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "adjustments": { + "fxCredit": { + "amount": "3.14", + "currency": "USD" + }, + "fxDebit": { + "amount": "3.14", + "currency": "USD" + } + }, + "return": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "reason": "payout_returned", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/businessAccount/payouts/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get a payout", + "operationId": "getBusinessAccountPayout", + "tags": [ + "Payouts" + ], + "responses": { + "200": { + "description": "Successfully retrieved a payout.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetBusinessAccountPayoutResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/PayoutBusinessAccount" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "sourceWalletId": "53535335", + "destination": { + "type": "wire", + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "name": "COMMERZBANK AG ****3000" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "status": "pending", + "trackingRef": "CIR-6ESOQANEP3NAO", + "errorCode": "insufficient_funds", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "adjustments": { + "fxCredit": { + "amount": "3.14", + "currency": "USD" + }, + "fxDebit": { + "amount": "3.14", + "currency": "USD" + } + }, + "return": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "reason": "payout_returned", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/businessAccount/banks/wires": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a Wire bank account", + "operationId": "createBusinessAccountWireBankAccount", + "tags": [ + "Wires" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WireCreationRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a bank account for wire transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreateBusinessAccountWireBankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Wire" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "description": "WELLS FARGO BANK, NA ****0010", + "trackingRef": "CIR13FB13A", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "bankAddress": { + "bankName": "SAN FRANCISCO", + "city": "SAN FRANCISCO", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "CA" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + }, + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "List all Wire bank accounts", + "operationId": "getBusinessAccountWireBankAccounts", + "tags": [ + "Wires" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of bank accounts.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Wire" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "description": "WELLS FARGO BANK, NA ****0010", + "trackingRef": "CIR13FB13A", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "bankAddress": { + "bankName": "SAN FRANCISCO", + "city": "SAN FRANCISCO", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "CA" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/businessAccount/banks/wires/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get a Wire bank account", + "operationId": "getBusinessAccountWireBankAccount", + "tags": [ + "Wires" + ], + "responses": { + "200": { + "description": "Successfully retrieved a bank account for wire transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetBusinessAccountWireBankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Wire" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "description": "WELLS FARGO BANK, NA ****0010", + "trackingRef": "CIR13FB13A", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "bankAddress": { + "bankName": "SAN FRANCISCO", + "city": "SAN FRANCISCO", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "CA" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/businessAccount/banks/wires/{id}/instructions": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get Wire instructions", + "description": "Get the wire transfer instructions into the Circle bank account given your bank account id.", + "operationId": "getBusinessAccountWireInstructionsBankAccount", + "tags": [ + "Wires" + ], + "responses": { + "200": { + "description": "Successfully retrieved wire transfer instructions for the bank account.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetBusinessAccountWireInstructionsBankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/WireInstruction" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "trackingRef": "CIR13FB13A", + "beneficiary": { + "name": "CIRCLE INTERNET FINANCIAL INC", + "address1": "99 HIGH STREET", + "address2": "BOSTON MA 02110" + }, + "beneficiaryBank": { + "name": "SILVERGATE BANK", + "swiftCode": "SIVGUS66XXX", + "routingNumber": "322286803", + "accountNumber": "****7427", + "currency": "USD", + "address": "4250 EXECUTIVE SQUARE SUITE 300", + "city": "LA JOLLA", + "postalCode": "02110", + "country": "US" + } + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/businessAccount/banks/signet": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a Signet bank account (Production Only)", + "operationId": "createBusinessAccountSignetBankAccount", + "tags": [ + "Signet" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignetFiatAccountCreationRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a bank account for Signet transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreateBusinessAccountSignetBankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/SignetFiatAccountResponse" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "trackingRef": "CIR13FB14A", + "walletAddress": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + }, + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "List all Signet bank accounts (Production Only).", + "operationId": "getBusinessAccountSignetBankAccounts", + "tags": [ + "Signet" + ], + "responses": { + "200": { + "description": "Successfully retrieved all bank accounts for Signet transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetBusinessAccountSignetBankAccountsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SignetFiatAccountResponse" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "trackingRef": "CIR13FB14A", + "walletAddress": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/businessAccount/banks/signet/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get a Signet bank account (Production Only)", + "operationId": "getBusinessAccountSignetBankAccount", + "tags": [ + "Signet" + ], + "responses": { + "200": { + "description": "Successfully retrieved a bank account for Signet transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetBusinessAccountSignetBankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/SignetFiatAccountResponse" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "trackingRef": "CIR13FB14A", + "walletAddress": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/businessAccount/banks/signet/{id}/instructions": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get Signet instructions (Production Only)", + "description": "Get the Signet transfer instructions into the Circle bank account given your bank account id (only available on Production now).", + "operationId": "getBusinessAccountSignetInstructionsBankAccount", + "tags": [ + "Signet" + ], + "responses": { + "200": { + "description": "Successfully retrieved Signet transfer instructions for the bank account.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetBusinessAccountSignetInstructionsBankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/SignetInstruction" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "trackingRef": "CIR13FB14A", + "walletAddress": "0x7e4f4fe03243ac7b291ebaee90b2bb27025a1234" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/businessAccount/banks/sen": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a Silvergate SEN bank account (BETA)", + "operationId": "createBusinessAccountSenBankAccount", + "tags": [ + "SEN" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SenFiatAccountCreationRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a bank account for Silvergate SEN transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreateBusinessAccountSenBankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/SenFiatAccountResponse" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "description": "SILVERGATE BANK ****1111", + "trackingRef": "CIR13FB14A", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z", + "currency": "USD" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + }, + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "List all Silvergate SEN bank accounts (BETA).", + "operationId": "getBusinessAccountSenBankAccounts", + "tags": [ + "SEN" + ], + "responses": { + "200": { + "description": "Successfully retrieved all bank accounts for Silvergate SEN transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SenFiatAccountResponse" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "description": "SILVERGATE BANK ****1111", + "trackingRef": "CIR13FB14A", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z", + "currency": "USD" + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/businessAccount/banks/sen/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get a Silvergate SEN bank account (BETA)", + "operationId": "getBusinessAccountSenBankAccount", + "tags": [ + "SEN" + ], + "responses": { + "200": { + "description": "Successfully retrieved a bank account for Silvergate SEN transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetBusinessAccountSenBankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/SenFiatAccountResponse" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "description": "SILVERGATE BANK ****1111", + "trackingRef": "CIR13FB14A", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z", + "currency": "USD" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/businessAccount/banks/sen/{id}/instructions": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get Silvergate SEN instructions (BETA)", + "description": "Get the Silvergate SEN transfer instructions into the Circle bank account given your bank account id (BETA).", + "operationId": "getBusinessAccountSenInstructionsBankAccount", + "tags": [ + "SEN" + ], + "responses": { + "200": { + "description": "Successfully retrieved Sen transfer instructions for the bank account.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetBusinessAccountSenInstructionsBankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/SenInstruction" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "trackingRef": "CIR13FB14A", + "accountNumber": "11111111", + "currency": "USD" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/businessAccount/transfers": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a transfer", + "description": "A transfer can be made from an existing business account to a blockchain location.", + "operationId": "createBusinessAccountTransfer", + "tags": [ + "Transfers" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BusinessAccountTransferCreationRequest" + } + } + } + }, + "responses": { + "201": { + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "description": "Successfully created a transfer.", + "content": { + "application/json": { + "schema": { + "title": "CreateBusinessAccountTransferResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Transfer" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "source": { + "type": "wallet", + "id": "12345", + "identities": [ + { + "type": "individual", + "name": "Satoshi Nakamoto", + "addresses": [ + { + "line1": "100 Money Street", + "line2": "Suite 1", + "city": "Boston", + "district": "MA", + "postalCode": "01234", + "country": "US" + } + ] + } + ] + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "chain": "ALGO" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "errorCode": "transfer_failed", + "createDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + } + } + }, + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "summary": "List all transfers", + "description": "Searches for transfers from your business account. If the date parameters are omitted, returns the most recent transfers. This endpoint returns up to 50 transfers in descending chronological order or pageSize, if provided.", + "operationId": "searchBusinessAccountTransfers", + "tags": [ + "Transfers" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "SearchBusinessAccountTransfersResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Transfer" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "source": { + "type": "wallet", + "id": "12345", + "identities": [ + { + "type": "individual", + "name": "Satoshi Nakamoto", + "addresses": [ + { + "line1": "100 Money Street", + "line2": "Suite 1", + "city": "Boston", + "district": "MA", + "postalCode": "01234", + "country": "US" + } + ] + } + ] + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "chain": "ALGO" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "errorCode": "transfer_failed", + "createDate": "2020-04-10T02:13:30.000Z" + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/businessAccount/transfers/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get a transfer", + "operationId": "getBusinessAccountTransfer", + "tags": [ + "Transfers" + ], + "responses": { + "200": { + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "description": "Successfully retrieved a transfer.", + "content": { + "application/json": { + "schema": { + "title": "GetBusinessAccountTransferResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Transfer" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "source": { + "type": "wallet", + "id": "12345", + "identities": [ + { + "type": "individual", + "name": "Satoshi Nakamoto", + "addresses": [ + { + "line1": "100 Money Street", + "line2": "Suite 1", + "city": "Boston", + "district": "MA", + "postalCode": "01234", + "country": "US" + } + ] + } + ] + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "chain": "ALGO" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "errorCode": "transfer_failed", + "createDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + } + } + } + }, + "/v1/businessAccount/wallets/addresses/deposit": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a deposit address", + "description": "Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you're requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit.\n", + "operationId": "generateBusinessAccountDepositAddress", + "tags": [ + "Addresses" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BusinessAccountGenerateAddressRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully generated a new deposit address.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GenerateBusinessAccountDepositAddressResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/AddressObject" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "currency": "USD", + "chain": "ALGO" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + }, + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "List all deposit addresses", + "operationId": "getBusinessAccountDepositAddresses", + "tags": [ + "Addresses" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of deposit addresses.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetBusinessAccountDepositAddressesResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressObject" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "currency": "USD", + "chain": "ALGO" + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/businessAccount/wallets/addresses/recipient": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a recipient address", + "description": "Stores an external blockchain address. Once added, the recipient address must be verified to ensure that you know and trust each new address.\n", + "operationId": "createBusinessAccountRecipientAddress", + "tags": [ + "Addresses" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BusinessAccountRecipientAddressCreationRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successfully added a recipient address.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreateBusinessAccountRecipientAddressResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/BusinessAccountRecipientAddressObject" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "chain": "ALGO", + "currency": "USD", + "description": "My USDC address at a cryptocurrency exchange" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + }, + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "summary": "List all recipient addresses", + "description": "Returns a list of recipient addresses that have each been verified and are eligible for transfers. Any recipient addresses pending verification are not included in the response.\n", + "operationId": "getBusinessAccountRecipientAddresses", + "tags": [ + "Addresses" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of recipient addresses.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetBusinessAccountRecipientAddressesResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BusinessAccountRecipientAddressObject" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "chain": "ALGO", + "currency": "USD", + "description": "My USDC address at a cryptocurrency exchange" + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/businessAccount/deposits": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Unique identifier for the deposit type. Filters results to fetch deposits made by this specific type.", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "wire" + ] + } + }, + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "summary": "List all deposits", + "description": "Searches for deposits sent to your business account. If the date parameters are omitted, returns the most recent deposits. This endpoint returns up to 50 deposits in descending chronological order or pageSize, if provided.", + "operationId": "searchBusinessAccountDeposits", + "tags": [ + "Deposits" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of deposits.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "SearchBusinessAccountDepositsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BusinessAccountDeposit" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "sourceWalletId": "9b57048d-2365-4ff5-956b-0199170d1035", + "destination": { + "type": "wallet", + "id": "12345" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fee": { + "amount": "3.14", + "currency": "USD" + }, + "status": "pending", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/mocks/payments/sen": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a mock Silvergate SEN payment", + "description": "In the sandbox environment, initiate a mock SEN transfer that mimics the behavior of funds sent through the Silvergate SEN account linked to master wallet.", + "operationId": "createSenPayment", + "tags": [ + "Deposits" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MockSenPaymentRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a mock SEN transfer.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreateSenPaymentResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/MockSenPaymentResponse" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "trackingRef": "CIR13FB13A", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "beneficiaryBank": { + "accountNumber": "11111111" + }, + "status": "pending" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/wallets": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a wallet", + "description": "Creates an end user wallet.", + "operationId": "createWallet", + "tags": [ + "Wallets" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WalletCreationRequest" + } + } + } + }, + "responses": { + "201": { + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "description": "Successfully created a wallet.", + "content": { + "application/json": { + "schema": { + "title": "CreateWalletResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Wallet" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "walletId": "434000", + "entityId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "type": "end_user_wallet", + "description": "Treasury Wallet", + "balances": [ + { + "amount": "3.14", + "currency": "USD" + } + ] + } + } + } + } + } + } + } + } + }, + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "summary": "List all wallets", + "description": "Retrieves a list of a user's wallets.", + "operationId": "getWallets", + "tags": [ + "Wallets" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of wallets.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetWalletsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Wallet" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "walletId": "434000", + "entityId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "type": "end_user_wallet", + "description": "Treasury Wallet", + "balances": [ + { + "amount": "3.14", + "currency": "USD" + } + ] + } + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + } + } + }, + "/v1/wallets/{walletId}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/WalletId" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get a wallet", + "operationId": "getWallet", + "tags": [ + "Wallets" + ], + "responses": { + "200": { + "description": "Successfully retrieved a wallet.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetWalletResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Wallet" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "walletId": "434000", + "entityId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "type": "end_user_wallet", + "description": "Treasury Wallet", + "balances": [ + { + "amount": "3.14", + "currency": "USD" + } + ] + } + } + } + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/wallets/{walletId}/addresses": { + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/WalletId" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a blockchain address", + "description": "Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you're requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit.\n", + "operationId": "generateAddress", + "tags": [ + "Wallets" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateAddressRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully generated a new address.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GenerateAddressResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/AddressObject" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "currency": "USD", + "chain": "ALGO" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + } + } + }, + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/WalletId" + }, + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "summary": "List all addresses", + "description": "Retrieves a list of addresses associated with a wallet.", + "operationId": "getAddresses", + "tags": [ + "Wallets" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of addresses.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetAddressesResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressObject" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "currency": "USD", + "chain": "ALGO" + } + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/transfers": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a transfer", + "description": "A transfer can be made from an existing funded wallet to a blockchain address or another wallet.", + "operationId": "createTransfer", + "tags": [ + "Transfers" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransferCreationRequest" + }, + "examples": { + "request": { + "value": { + "idempotencyKey": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "source": { + "type": "wallet", + "id": "12345" + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "chain": "ETH" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + } + } + }, + "travel rule": { + "value": { + "idempotencyKey": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "source": { + "type": "wallet", + "id": "12345", + "identities": [ + { + "type": "individual", + "name": "Satoshi Nakamoto", + "addresses": [ + { + "line1": "100 Money Street", + "line2": "Suite 1", + "city": "Boston", + "district": "MA", + "postalCode": "01234", + "country": "US" + } + ] + } + ] + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "chain": "ETH" + }, + "amount": { + "amount": "3000.00", + "currency": "USD" + } + } + } + } + } + } + }, + "responses": { + "201": { + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "description": "Successfully created a transfer.", + "content": { + "application/json": { + "schema": { + "title": "CreateTransferResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Transfer" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "source": { + "type": "wallet", + "id": "12345" + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "chain": "ETH" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + } + } + }, + "travel rule": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "source": { + "type": "wallet", + "id": "12345", + "identities": [ + { + "type": "individual", + "name": "Satoshi Nakamoto", + "addresses": [ + { + "line1": "100 Money Street", + "line2": "Suite 1", + "city": "Boston", + "district": "MA", + "postalCode": "01234", + "country": "US" + } + ] + } + ] + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "chain": "ETH" + }, + "amount": { + "amount": "3000.00", + "currency": "USD" + }, + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + } + } + }, + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "walletId", + "description": "Unique identifier for the source or destination wallet of transfers, if any. May not be used in conjunction with destinationWalletId or sourceWalletId. Useful for fetching all transfers related to a wallet.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "example": "12345" + } + }, + { + "name": "sourceWalletId", + "description": "Unique identifier for the source wallet of transfers, if any.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "example": "12345" + } + }, + { + "name": "destinationWalletId", + "description": "Unique identifier for the destination wallet of transfers, if any.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "example": "12345" + } + }, + { + "$ref": "#/components/parameters/ReturnIdentities" + }, + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "summary": "List all transfers", + "description": "Searches for transfers involving the provided wallets. If no wallet ids are provided, searches all wallets associated with your Circle API account. If the date parameters are omitted, returns the most recent transfers. This endpoint returns up to 50 transfers in descending chronological order or pageSize, if provided.", + "operationId": "searchTransfers", + "tags": [ + "Transfers" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "SearchTransfersResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Transfer" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "source": { + "type": "wallet", + "id": "12345" + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "chain": "ALGO" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + } + ] + } + }, + "travel rule": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "source": { + "type": "wallet", + "id": "12345", + "identities": [ + { + "type": "individual", + "name": "Satoshi Nakamoto", + "addresses": [ + { + "line1": "100 Money Street", + "line2": "Suite 1", + "city": "Boston", + "district": "MA", + "postalCode": "01234", + "country": "US" + } + ] + } + ] + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "addressTag": "123456789", + "chain": "ALGO" + }, + "amount": { + "amount": "3000.00", + "currency": "USD" + }, + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/transfers/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + }, + { + "$ref": "#/components/parameters/ReturnIdentities" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get a transfer", + "operationId": "getTransfer", + "tags": [ + "Transfers" + ], + "responses": { + "200": { + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "description": "Successfully retrieved a transfer.", + "content": { + "application/json": { + "schema": { + "title": "GetTransferResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/TransferDetailedTransfer" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "source": { + "type": "wallet", + "id": "12345" + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "chain": "ETH" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + } + } + }, + "travel rule": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "source": { + "type": "wallet", + "id": "12345", + "identities": [ + { + "type": "individual", + "name": "Satoshi Nakamoto", + "addresses": [ + { + "line1": "100 Money Street", + "line2": "Suite 1", + "city": "Boston", + "district": "MA", + "postalCode": "01234", + "country": "US" + } + ] + } + ] + }, + "destination": { + "type": "blockchain", + "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", + "chain": "ETH" + }, + "amount": { + "amount": "3000.00", + "currency": "USD" + }, + "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + } + } + } + }, + "/ping": { + "get": { + "summary": "Ping", + "description": "Checks that the service is running.", + "operationId": "rootPing", + "tags": [ + "Health" + ], + "responses": { + "200": { + "description": "Successful ping.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Ping" + }, + "examples": { + "response": { + "value": { + "message": "pong" + } + } + } + } + } + } + } + } + }, + "/v1/configuration": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get configuration info", + "description": "Retrieves general configuration information.", + "operationId": "getConfig", + "tags": [ + "Management" + ], + "responses": { + "200": { + "description": "Successfully retrieved configuration information.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetConfigResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/AccountConfiguration" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "payments": { + "masterWalletId": "212000" + } + } + } + } + } + } + } + } + } + } + }, + "/v1/encryption/public": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get public key", + "description": "Retrieves an RSA public key to be used in encrypting data sent to the API. Your public keys change infrequently, so we encourage you to cache this response value locally for a duration of 24 hours or more.", + "operationId": "getPublicKey", + "tags": [ + "Encryption" + ], + "responses": { + "200": { + "description": "Successfully retrieved the RSA public key.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetPublicKeyResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/PublicKey" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "keyId": "key1", + "publicKey": "LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEJDUEcgdjEuNTQKCm1RRU5CRjAxdmk0QkNBQ3JzMDNLS1Y0Qk9SRkYyT0Z4bUdvb0UyaTZMbnNneE5UL1dsV2s1ZTl2RDd2NENkSm0KcGJJbENmZ0U4WFlnYmhKUTE4YStaTzlPM0RFYUp2dGhJSEtjL0l1UEIvZmdEYUJUT285NkJzL2pVRFp6ZGxaVApQazNFUjliNFZPeGVwMFNPSHFMcmxTVFY4ZXB3M1R3SEdaL3NpSWdBYXEwRGdJdlZxUTY4TGVaMnorUFJWZm04CmhhSnJpb05SRU5Ja2ZNTWY5aFdySlowSW1zUk1aVmpDMVVrd2FSSHdrTTMwQUlia1dYcFJ5R205SXhQaXdGa08Kb1RnWlpwUFpsdVczckdkWER0NHZqL24za09hczV1dFdoNFovMlhjWHBiSUUyU0FPK0hycUdIclRnK1ZmZ05JNwpZcVZqYW5MOEN1bm83UkxmcDhKZlZDNXBLUm5ySVNCTnphN1ZBQkVCQUFHMEJrTnBjbU5zWllrQkhBUVFBUWtBCkJnVUNYVFcrTGdBS0NSQ3EzaHNwWjBMeGEwdnpCLzQvQTJpdk1CWW1aZXV2bEJZMm5ZZnNXek9Sb28vU3BIYkQKY2Y0UmtxZzZ0RERJSkUzNHhDVit0MzJydmJkM0ZOdVZseWs1MDVZRkpESnI4cVc2S0tkQVRXdU16eW5mMVVoUAo1M25hTlc0cXdrdSt3b0RWWjJpci9lUVI1WUc4L0RGcnd3bXdaa0dRd0Ftc3h5ZHd5anBnLzBrQ3lpZHkxdVBkCmVVWGgwdWt4dS9Dais4UFl5cHcwdit5V2tzbjdSZ2dVbkJFMWhiQ2pEV3FweHZjMEpDNVAxdmx6L2xRcWQrR3oKRC9Td1FJTVdRVElnV3BHRVVvQTRDc3drbU5PdHhsRVF1U0tueXNtTG02S0ExUmRhTzd6V2IrdWNLN21FZ2VoSwpXU2hHZExqRVNNZlVRUTczemNqMXg2amxLUFNhRlJyLzhXcHhrVXYzVHYvQzZMb0JpejRLCj1WSWg3Ci0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0K" + } + } + } + } + } + } + } + } + } + }, + "/v1/notifications/subscriptions": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "List all notification subscriptions", + "description": "Retrieve a list of existing notification subscriptions with details.", + "parameters": [], + "operationId": "listSubscriptions", + "tags": [ + "Subscriptions" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of notification subscriptions.", + "content": { + "application/json": { + "schema": { + "title": "GetListSubscriptionsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscriptionResponse" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "endpoint": "https://example.org/handler/for/notifications", + "subscriptionDetails": [ + { + "url": "arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17", + "status": "confirmed" + } + ] + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + }, + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a notification subscription", + "description": "Subscribe to receiving notifications at a given endpoint. The endpoint should be able to handle AWS SNS subscription requests. For more details see https://docs.aws.amazon.com/mobile/sdkforxamarin/developerguide/sns-send-http.html. Note, the sandbox environment allows a maximum of 3 active subscriptions; otherwise, this is limited to 1 active subscription and subsequent create requests will be rejected with a Limit Exceeded error.\n", + "operationId": "subscribe", + "tags": [ + "Subscriptions" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successfully created a notification subscription.", + "content": { + "application/json": { + "schema": { + "title": "SubscribeResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/SubscriptionResponse" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "endpoint": "https://example.org/handler/for/notifications", + "subscriptionDetails": [ + { + "url": "arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17", + "status": "confirmed" + } + ] + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "429": { + "$ref": "#/components/responses/LimitExceeded" + } + } + } + }, + "/v1/notifications/subscriptions/{id}": { + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Remove a notification subscription", + "description": "To remove a subscription, all its subscription requests' statuses must be either 'confirmed', 'deleted' or a combination of those. A subscription with at least one 'pending' subscription request cannot be removed.", + "operationId": "unsubscribe", + "tags": [ + "Subscriptions" + ], + "responses": { + "200": { + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "description": "Successfully removed a subscription.", + "content": { + "application/json": { + "schema": { + "title": "DeleteUnsubscribeResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/UnsubscribeResponse" + } + } + }, + "examples": { + "response": { + "value": { + "data": {} + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/channels": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "List all channels", + "description": "Retrieve a list of channels with details (e.g. `cardDescriptor`, `achDescriptor`, etc.).", + "parameters": [], + "operationId": "listChannels", + "tags": [ + "Channels" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of channels.", + "content": { + "application/json": { + "schema": { + "title": "ListChannelsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelResponse" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "default": true, + "cardDescriptor": "CIRCLE LLC.", + "achDescriptor": "CIRCLE LLC." + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/stablecoins": { + "get": { + "summary": "List all stablecoins", + "description": "Retrieves total circulating supply for supported stablecoins across all chains. This endpoint is rate limited to one call per minute (based on IP).", + "operationId": "getStablecoins", + "tags": [ + "Stablecoins" + ], + "responses": { + "200": { + "description": "Successfully retrieved all stablecoin supplies across all chains.", + "content": { + "application/json": { + "schema": { + "title": "GetStablecoinsResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Stablecoins" + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "name": "USD Coin", + "symbol": "USDC", + "totalAmount": "132.584192", + "chains": [ + { + "amount": "132.584192", + "chain": "ALGO" + } + ] + } + ] + } + } + } + } + } + }, + "429": { + "$ref": "#/components/responses/LimitExceeded" + } + } + } + }, + "/v1/payments": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/Source" + }, + { + "$ref": "#/components/parameters/SettlementId" + }, + { + "$ref": "#/components/parameters/PaymentSourceType" + }, + { + "$ref": "#/components/parameters/PaymentStatus" + }, + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "summary": "List all payments", + "operationId": "getPayments", + "tags": [ + "Payments" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of payments.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetPaymentsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BasicPayment" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "captured": false, + "captureAmount": { + "amount": "3.14", + "currency": "USD" + }, + "captureDate": "2020-04-10T02:13:30.000Z", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "description": "Payment", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + }, + "refunds": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + } + ], + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + }, + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a payment", + "operationId": "createPayment", + "tags": [ + "Payments" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentCreationRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a payment.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreatePaymentResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/DetailedPayment" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "captured": false, + "captureAmount": { + "amount": "3.14", + "currency": "USD" + }, + "captureDate": "2020-04-10T02:13:30.000Z", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "verification": { + "avs": "D", + "cvv": "not_requested", + "threeDSecure": "pass", + "eci": "00" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "originalPayment": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "refunds": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "refund", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "originalPayment": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "description": "Payment", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + ], + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "trackingRef": "24910599141085313498894", + "errorCode": "payment_failed", + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" + }, + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/payments/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get a payment", + "operationId": "getPayment", + "tags": [ + "Payments" + ], + "responses": { + "200": { + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "description": "Successfully retrieved a payment.", + "content": { + "application/json": { + "schema": { + "title": "GetPaymentResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/DetailedPaymentPolymorphic" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "verification": { + "avs": "D", + "cvv": "not_requested", + "threeDSecure": "pass", + "eci": "00" + }, + "originalPayment": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "captured": false, + "captureAmount": { + "amount": "3.14", + "currency": "USD" + }, + "captureDate": "2020-04-10T02:13:30.000Z", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "description": "Payment", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + }, + "refunds": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + } + ], + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "originalPayment": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "refunds": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "refund", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "originalPayment": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "description": "Payment", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + ], + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "trackingRef": "24910599141085313498894", + "externalRef": "YYYYMMDDXXXXXXXX012345", + "errorCode": "payment_failed", + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/payments/{id}/capture": { + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CaptureCreationRequest" + } + } + } + }, + "summary": "Capture a payment (BETA)", + "description": "Warning: Please contact Circle support if you are planning on using this feature.\n\nThe given amount will be captured for the authorized payment if possible. If no amount is specified, the full amount\nwill be captured. You can only capture once per authorization.\n\nA successful response does *not* mean the payment has been captured. It only means the capture request was successfully submitted.\n", + "operationId": "capturePayment", + "tags": [ + "Payments" + ], + "responses": { + "202": { + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "description": "Payment capture successfully initiated." + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/payments/{id}/cancel": { + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CancelCreationRequest" + } + } + } + }, + "summary": "Cancel a payment", + "description": "The payment will be voided if possible meaning the payment source will not be charged & the payment will never settle.\nOtherwise, the payment will be refunded meaning the payment source will be charged & the payment will be refunded from deductions of future settlements.\nNot all payments are eligible to be cancelled.\n\nA successful response does *not* mean the payment has been cancelled; it only means the cancellation request is successfully submitted.\n", + "operationId": "cancelPayment", + "tags": [ + "Payments" + ], + "responses": { + "200": { + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "description": "Payment cancellation successfully initiated.", + "content": { + "application/json": { + "schema": { + "title": "CancelPaymentResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/DetailedCancel" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "originalPayment": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "captured": false, + "captureAmount": { + "amount": "3.14", + "currency": "USD" + }, + "captureDate": "2020-04-10T02:13:30.000Z", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "description": "Payment", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + }, + "refunds": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + } + ], + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "trackingRef": "24910599141085313498894", + "errorCode": "payment_failed", + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" + }, + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "refund": false, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/payments/{id}/refund": { + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefundCreationRequest" + } + } + } + }, + "summary": "Refund a payment", + "description": "The payment source will be refunded if possible. Not all payments are eligible to be cancelled.\n\nA successful response does *not* mean the payment has been refunded; it only means the refund request is successfully submitted.\n", + "operationId": "refundPayment", + "tags": [ + "Payments" + ], + "responses": { + "200": { + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "description": "Payment refund successfully initiated.", + "content": { + "application/json": { + "schema": { + "title": "RefundPaymentResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/DetailedRefund" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "refund", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "originalPayment": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "captured": false, + "captureAmount": { + "amount": "3.14", + "currency": "USD" + }, + "captureDate": "2020-04-10T02:13:30.000Z", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "description": "Payment", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z" + }, + "refunds": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + } + ], + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "cancel": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "cancel", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantWalletId": "212000", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "source": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "card" + }, + "description": "Payment", + "status": "pending", + "originalPayment": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "type": "payment", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Payment", + "status": "pending", + "requiredAction": { + "type": "three_d_secure_required", + "redirectUrl": "https://example.org" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "trackingRef": "24910599141085313498894", + "errorCode": "payment_failed", + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" + }, + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/mocks/payments/wire": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a mock Wire payment", + "description": "In the sandbox environment, initiate a mock wire payment that mimics the behavior of funds sent through the bank (wire) account linked to master wallet.", + "operationId": "createWirePayment", + "tags": [ + "Payments" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MockWirePaymentRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a mock wire payment.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreateWirePaymentResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/MockWirePaymentResponse" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "trackingRef": "CIR13FB13A", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "beneficiaryBank": { + "accountNumber": "11111111" + }, + "status": "pending" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/mocks/payments/sepa": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a mock SEPA payment", + "description": "In the sandbox environment, initiate a mock SEPA payment that mimics the behavior of funds sent through the bank (SEPA) account linked to master wallet.", + "operationId": "createSepaPayment", + "tags": [ + "Payments" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MockSepaPaymentRequest" + }, + "example": { + "trackingRef": "CIR13FB13A", + "amount": { + "amount": 3.14, + "currency": "EUR" + } + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a mock SEPA payment.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreateSepaPaymentResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/MockSepaPaymentResponse" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "trackingRef": "CIR13FB13A", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "status": "pending" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/cards": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a card", + "operationId": "createCard", + "tags": [ + "Cards" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CardCreationRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a card.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreateCardResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Card" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "expMonth": 1, + "expYear": 2020, + "network": "VISA", + "last4": "0123", + "bin": "401230", + "issuerCountry": "US", + "fundingType": "credit", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "errorCode": "verification_failed", + "verification": { + "avs": "D", + "cvv": "not_requested" + }, + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + }, + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "List all cards", + "operationId": "getCards", + "tags": [ + "Cards" + ], + "parameters": [ + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of cards.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetCardsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SimpleCard" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "billingDetails": { + "country": "US", + "district": "MA" + }, + "expMonth": 1, + "expYear": 2020, + "network": "VISA", + "bin": "401230", + "issuerCountry": "US", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "verification": { + "avs": "D", + "cvv": "not_requested" + }, + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/cards/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get a card", + "operationId": "getCard", + "tags": [ + "Cards" + ], + "responses": { + "200": { + "description": "Successfully retrieved a card.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetCardResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Card" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "expMonth": 1, + "expYear": 2020, + "network": "VISA", + "last4": "0123", + "bin": "401230", + "issuerCountry": "US", + "fundingType": "credit", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "errorCode": "verification_failed", + "verification": { + "avs": "D", + "cvv": "not_requested" + }, + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + }, + "put": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Update a card", + "operationId": "UpdateCard", + "tags": [ + "Cards" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CardUpdate" + } + } + } + }, + "responses": { + "200": { + "description": "Succesfully modified a card.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "UpdateCardResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Card" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "expMonth": 1, + "expYear": 2020, + "network": "VISA", + "last4": "0123", + "bin": "401230", + "issuerCountry": "US", + "fundingType": "credit", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "errorCode": "verification_failed", + "verification": { + "avs": "D", + "cvv": "not_requested" + }, + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + } + } + } + }, + "/v1/banks/wires": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a Wire bank account", + "operationId": "createWireBankAccount", + "tags": [ + "Wires" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WireCreationRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a bank account for wire transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreateWireBankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Wire" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "description": "WELLS FARGO BANK, NA ****0010", + "trackingRef": "CIR13FB13A", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "bankAddress": { + "bankName": "SAN FRANCISCO", + "city": "SAN FRANCISCO", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "CA" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/banks/wires/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get a Wire bank account", + "operationId": "getWireBankAccount", + "tags": [ + "Wires" + ], + "responses": { + "200": { + "description": "Successfully retrieved a bank account for wire transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetWireBankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Wire" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "description": "WELLS FARGO BANK, NA ****0010", + "trackingRef": "CIR13FB13A", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "bankAddress": { + "bankName": "SAN FRANCISCO", + "city": "SAN FRANCISCO", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "CA" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/banks/wires/{id}/instructions": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get Wire instructions", + "description": "Get the wire transfer instructions into the Circle bank account given your bank account id", + "operationId": "getWireInstructionsBankAccount", + "tags": [ + "Wires" + ], + "responses": { + "200": { + "description": "Successfully retrieved wire transfer instructions for the bank account.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetWireInstructionsBankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/WireInstruction" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "trackingRef": "CIR13FB13A", + "beneficiary": { + "name": "CIRCLE INTERNET FINANCIAL INC", + "address1": "99 HIGH STREET", + "address2": "BOSTON MA 02110" + }, + "beneficiaryBank": { + "name": "SILVERGATE BANK", + "swiftCode": "SIVGUS66XXX", + "routingNumber": "322286803", + "accountNumber": "****7427", + "currency": "USD", + "address": "4250 EXECUTIVE SQUARE SUITE 300", + "city": "LA JOLLA", + "postalCode": "02110", + "country": "US" + } + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/banks/ach": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a ACH bank account", + "operationId": "createACHBankAccount", + "tags": [ + "ACH" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ACHCreationRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a bank account for ACH transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreateACHBankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/ACH" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "accountNumber": "****6789", + "routingNumber": "613334455", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "bankAddress": { + "bankName": "SAN FRANCISCO", + "city": "SAN FRANCISCO", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "CA" + }, + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "errorCode": "bank_account_authorization_expired", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z", + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" + } + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/banks/ach/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get a ACH bank account", + "operationId": "getACHBankAccount", + "tags": [ + "ACH" + ], + "responses": { + "200": { + "description": "Successfully retrieved a bank account for ACH transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetACHBankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/ACH" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "accountNumber": "****6789", + "routingNumber": "613334455", + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "bankAddress": { + "bankName": "SAN FRANCISCO", + "city": "SAN FRANCISCO", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "CA" + }, + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "errorCode": "bank_account_authorization_expired", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z", + "metadata": { + "email": "satoshi@circle.com", + "phoneNumber": "+14155555555" + } + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/mocks/ach/accounts": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a mock ACH bank account", + "description": "In the sandbox environment, create a mock ACH account and retrieve a processor token that can be used to link an ACH account.", + "operationId": "createAchAccount", + "tags": [ + "ACH" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MockAchAccountCreationRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a mock ach payment.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreateAchAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/MockAchAccountResponse" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "processorToken": "processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621", + "balance": { + "amount": "3.14", + "currency": "USD" + }, + "account": { + "accountNumber": "123456789", + "routingNumber": "011000028", + "description": "My ACH account" + } + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/banks/sepa": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a SEPA bank account (BETA)", + "operationId": "createSEPABankAccount", + "tags": [ + "SEPA" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SEPACreationRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a bank account for SEPA transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreateSEPABankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/SEPA" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "description": "Bank of Ireland ****0010", + "trackingRef": "CIR13FB13A", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/banks/sepa/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get a SEPA bank account (BETA)", + "operationId": "getSEPABankAccount", + "tags": [ + "SEPA" + ], + "responses": { + "200": { + "description": "Successfully retrieved a bank account for SEPA transfers.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetSEPABankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/SEPA" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "status": "pending", + "description": "Bank of Ireland ****0010", + "trackingRef": "CIR13FB13A", + "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "billingDetails": { + "name": "Satoshi Nakamoto", + "city": "Boston", + "country": "US", + "line1": "100 Money Street", + "line2": "Suite 1", + "district": "MA", + "postalCode": "01234" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/banks/sepa/{id}/instructions": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get SEPA instructions (BETA)", + "description": "Get the SEPA transfer instructions into the Circle bank account given your bank account id (BETA).", + "operationId": "getSEPAInstructionsBankAccount", + "tags": [ + "SEPA" + ], + "responses": { + "200": { + "description": "Successfully retrieved SEPA transfer instructions for the bank account.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetSEPAInstructionsBankAccountResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/SEPAInstruction" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "trackingRef": "CIR13FB13A", + "beneficiary": { + "name": "CIRCLE INTERNET FINANCIAL INC", + "address1": "99 HIGH STREET", + "address2": "BOSTON MA 02110" + }, + "beneficiaryBank": { + "name": "LHV Bank", + "bic": "LHVBEE22XXX", + "iban": "****6789", + "address": "Tartu mnt 2, 10145 Tallinn", + "city": "Tallinn", + "postalCode": "10017", + "country": "EE" + } + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/settlements": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "summary": "List all settlements", + "operationId": "getSettlements", + "tags": [ + "Settlements" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of settlements.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetSettlementsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Settlement" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "merchantWalletId": "212000", + "walletId": "12345", + "totalDebits": { + "amount": "3.14", + "currency": "USD" + }, + "totalCredits": { + "amount": "3.14", + "currency": "USD" + }, + "paymentFees": { + "amount": "3.14", + "currency": "USD" + }, + "chargebackFees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/settlements/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get a settlement", + "operationId": "getSettlement", + "tags": [ + "Settlements" + ], + "responses": { + "200": { + "description": "Successfully retrieved a settlement.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetSettlementResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Settlement" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "merchantWalletId": "212000", + "walletId": "12345", + "totalDebits": { + "amount": "3.14", + "currency": "USD" + }, + "totalCredits": { + "amount": "3.14", + "currency": "USD" + }, + "paymentFees": { + "amount": "3.14", + "currency": "USD" + }, + "chargebackFees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/chargebacks": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/PaymentId" + }, + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "summary": "List all chargebacks", + "description": "Retrieve list of chargebacks. Results will be sorted by create date descending: more recent chargebacks will be at the beginning of the list.\n", + "operationId": "getChargebacks", + "tags": [ + "Chargebacks" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of chargebacks.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetChargebacksResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BasicChargeback" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "paymentId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "reasonCode": "10.4", + "category": "Canceled Recurring Payment", + "history": [ + { + "type": "1st Chargeback", + "chargebackAmount": { + "amount": "3.14", + "currency": "USD" + }, + "fee": { + "amount": "3.14", + "currency": "USD" + }, + "description": "The cardholder claims an unauthorized transaction occurred.", + "settlementId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "createDate": "2020-04-10T02:13:30.000Z" + } + ] + } + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/chargebacks/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get a chargeback", + "operationId": "getChargeback", + "tags": [ + "Chargebacks" + ], + "responses": { + "200": { + "description": "Successfully retrieved a chargeback.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetChargebackResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/BasicChargeback" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "paymentId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "reasonCode": "10.4", + "category": "Canceled Recurring Payment", + "history": [ + { + "type": "1st Chargeback", + "chargebackAmount": { + "amount": "3.14", + "currency": "USD" + }, + "fee": { + "amount": "3.14", + "currency": "USD" + }, + "description": "The cardholder claims an unauthorized transaction occurred.", + "settlementId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "createDate": "2020-04-10T02:13:30.000Z" + } + ] + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/mocks/cards/chargebacks": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a mock chargeback", + "description": "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.", + "operationId": "createMockChargeback", + "tags": [ + "Chargebacks" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MockChargebackCreationRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a mock chargeback.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreateMockChargebackResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/MockChargeback" + } + } + }, + "examples": { + "response": { + "value": { + "data": {} + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + } + } + } + }, + "/v1/reversals": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/PaymentStatus" + }, + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "summary": "List all ACH payment reversals.", + "description": "Retrieve a list of ACH payment reversals. Results will be sorted by create date descending; more recent reversals will be at the beginning of the list", + "operationId": "getReversals", + "tags": [ + "Reversals" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of ACH payment reversals.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetReversalsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reversal" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "key1", + "paymentId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "description": "Merchant Payment Reversal", + "status": "pending", + "reason": "duplicate", + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/balances": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "List all balances", + "description": "Retrieves the balance of merchant funds that have settled and also of funds that have been sent for processing but have not yet settled.", + "operationId": "getBalances", + "tags": [ + "Balances" + ], + "responses": { + "200": { + "description": "Successfully retrieved balances.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetBalancesResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Balances" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "available": [ + { + "amount": "3.14", + "currency": "USD" + } + ], + "unsettled": [ + { + "amount": "3.14", + "currency": "USD" + } + ] + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/payouts": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "source", + "description": "Universally unique identifier (UUID v4) for the source wallet. Filters the results to fetch all payouts made from a source wallet. If not provided, payouts from all wallets will be returned.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "example": "54c1cbab-c419-450f-ad23-906fa03af7f0" + } + }, + { + "name": "type", + "description": "Destination bank account type. Filters the results to fetch all payouts made to a specified destination bank account type. This query parameter can be passed multiple times to fetch results matching multiple destination bank account types.", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayoutDestinationType" + } + } + }, + { + "name": "status", + "description": "Queries items with the specified status. Matches any status if unspecified.", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayoutStatus" + } + } + }, + { + "$ref": "#/components/parameters/destination" + }, + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "summary": "List all payouts", + "operationId": "getPayouts", + "tags": [ + "Payouts" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of payouts.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetPayoutsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Payout" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "sourceWalletId": "53535335", + "destination": { + "type": "wire", + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "name": "COMMERZBANK AG ****3000" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "status": "pending", + "trackingRef": "CIR-6ESOQANEP3NAO", + "errorCode": "insufficient_funds", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "adjustments": { + "fxCredit": { + "amount": "3.14", + "currency": "USD" + }, + "fxDebit": { + "amount": "3.14", + "currency": "USD" + } + }, + "return": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "reason": "payout_returned", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + }, + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Create a payout", + "operationId": "createPayout", + "tags": [ + "Payouts" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayoutCreationRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created a payout.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "CreatePayoutResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/Payout" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "sourceWalletId": "53535335", + "destination": { + "type": "wire", + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "name": "COMMERZBANK AG ****3000" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "status": "pending", + "trackingRef": "CIR-6ESOQANEP3NAO", + "errorCode": "insufficient_funds", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "adjustments": { + "fxCredit": { + "amount": "3.14", + "currency": "USD" + }, + "fxDebit": { + "amount": "3.14", + "currency": "USD" + } + }, + "return": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "reason": "payout_returned", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + }, + "/v1/payouts/{id}": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/IdPath" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get a payout", + "operationId": "getPayout", + "tags": [ + "Payouts" + ], + "responses": { + "200": { + "description": "Successfully retrieved a payout.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetPayoutResponse", + "properties": { + "data": { + "$ref": "#/components/schemas/DetailedPayout" + } + } + }, + "examples": { + "response": { + "value": { + "data": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "sourceWalletId": "53535335", + "destination": { + "type": "wire", + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "name": "COMMERZBANK AG ****3000" + }, + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "status": "pending", + "trackingRef": "CIR-6ESOQANEP3NAO", + "externalRef": "YYYYMMDDXXXXXXXX012345", + "errorCode": "insufficient_funds", + "riskEvaluation": { + "decision": "approved", + "reason": "3000" + }, + "adjustments": { + "fxCredit": { + "amount": "3.14", + "currency": "USD" + }, + "fxDebit": { + "amount": "3.14", + "currency": "USD" + } + }, + "return": { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "reason": "payout_returned", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + }, + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/v1/returns": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/From" + }, + { + "$ref": "#/components/parameters/To" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "summary": "List all payout returns", + "description": "Retrieve a list of Wire and ACH payout returns. Results will be sorted by create date descending; more recent returns will be at the beginning of the list.", + "operationId": "getReturns", + "tags": [ + "Returns" + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of payout returns.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "title": "GetReturnsResponse", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnwithdrawalObject" + } + } + } + }, + "examples": { + "response": { + "value": { + "data": [ + { + "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", + "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", + "amount": { + "amount": "3.14", + "currency": "USD" + }, + "fees": { + "amount": "3.14", + "currency": "USD" + }, + "reason": "payout_returned", + "status": "pending", + "createDate": "2020-04-10T02:13:30.000Z", + "updateDate": "2020-04-10T02:13:30.000Z" + } + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/NotAuthorized" + } + } + } + } + }, + "components": { + "securitySchemes": { + "bearerAuth": { + "type": "http", + "scheme": "bearer" + } + }, + "headers": { + "XRequestId": { + "description": "Universally unique identifier (UUID v4) for the request. Helpful for identifying a request when communicating with Circle support.", + "schema": { + "type": "string", + "format": "uuid", + "example": "2adba88e-9d63-44bc-b975-9b6ae3440dde" + } + } + }, + "schemas": { + "Money": { + "type": "object", + "required": [ + "amount", + "currency" + ], + "properties": { + "amount": { + "type": "string", + "description": "Magnitude of the amount, in units of the currency, with a `.`.", + "example": "3.14" + }, + "currency": { + "type": "string", + "description": "Currency code for the amount.", + "enum": [ + "USD", + "EUR", + "BTC", + "ETH" + ] + } + } + }, + "Balances": { + "type": "object", + "description": "Available and unsettled balances of the merchant.", + "required": [ + "available", + "unsettled" + ], + "properties": { + "available": { + "type": "array", + "description": "List of currency balances (one for each currency) that are currently available to spend.", + "items": { + "$ref": "#/components/schemas/Money" + } + }, + "unsettled": { + "type": "array", + "description": "List of currency balances (one for each currency) that have been captured but are currently in the process of settling and will become available to spend at some point in the future.", + "items": { + "$ref": "#/components/schemas/Money" + } + } + } + }, + "PayoutStatus": { + "type": "string", + "description": "Status of the payout. Status `pending` indicates that the payout is in process; `complete` indicates it finished successfully; `failed` indicates it failed.", + "enum": [ + "pending", + "complete", + "failed" + ] + }, + "Id": { + "type": "string", + "description": "Unique system generated identifier for the entity.", + "format": "uuid", + "example": "b8627ae8-732b-4d25-b947-1df8f4007a29" + }, + "PayoutDestinationType": { + "type": "string", + "description": "The destination bank account type.", + "enum": [ + "wire", + "ach", + "sepa" + ] + }, + "BankDestination": { + "type": "object", + "description": "The destination bank account.", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/PayoutDestinationType" + }, + "id": { + "$ref": "#/components/schemas/Id" + }, + "name": { + "type": "string", + "description": "Bank name plus last four digits of the bank account number or IBAN.", + "readOnly": true, + "example": "COMMERZBANK AG ****3000" + } + } + }, + "FiatMoney": { + "type": "object", + "required": [ + "amount", + "currency" + ], + "properties": { + "amount": { + "description": "Magnitude of the amount, in units of the currency, with a `.`.", + "type": "string", + "example": "3.14" + }, + "currency": { + "description": "Currency code.", + "type": "string", + "enum": [ + "USD", + "EUR" + ] + } + } + }, + "FiatMoneyUsd": { + "type": "object", + "required": [ + "amount", + "currency" + ], + "properties": { + "amount": { + "description": "Magnitude of the amount, in units of the currency, with a `.`.", + "type": "string", + "example": "3.14" + }, + "currency": { + "description": "Currency code.", + "type": "string", + "enum": [ + "USD" + ] + } + } + }, + "PayoutErrorCode": { + "type": "string", + "nullable": true, + "description": "Indicates the failure reason of a payout. Only present for payouts in failed state. Possible values are [`insufficient_funds`, `transaction_denied`, `transaction_failed`, `transaction_returned`, `bank_transaction_error`, `fiat_account_limit_exceeded`, `invalid_bank_account_number`, `invalid_ach_rtn`, `invalid_wire_rtn`, `vendor_inactive`]'", + "enum": [ + "insufficient_funds", + "transaction_denied", + "transaction_failed", + "transaction_returned", + "bank_transaction_error", + "fiat_account_limit_exceeded", + "invalid_bank_account_number", + "invalid_ach_rtn", + "invalid_wire_rtn", + "vendor_inactive" + ] + }, + "RiskEvaluation": { + "type": "object", + "description": "Results of risk evaluation. Only present if the payment is denied by Circle's risk service.", + "nullable": true, + "properties": { + "decision": { + "description": "Enumerated decision of the account.", + "type": "string", + "enum": [ + "approved", + "denied", + "review" + ] + }, + "reason": { + "description": "Risk reason for the definitive decision outcome.", + "type": "string", + "nullable": true, + "example": "3000" + } + } + }, + "IdPayout": { + "type": "string", + "description": "Universally unique identifier (UUID v4) of the payout that is associated with the return.", + "format": "uuid", + "example": "abdb500d-4a59-457c-801f-2d418c8703ac" + }, + "UTCTimestamp": { + "type": "string", + "description": "ISO-8601 UTC date/time format.", + "example": "2020-04-10T02:13:30.000Z" + }, + "UnwithdrawalObject": { + "type": "object", + "description": "Return information if the payout is returned by bank. Only present if `errorCode` of payout is `transaction_returned`.", + "nullable": true, + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "payoutId": { + "$ref": "#/components/schemas/IdPayout" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "reason": { + "type": "string", + "description": "Reason for the return.", + "example": "payout_returned" + }, + "status": { + "type": "string", + "description": "Status of the return. A `pending` status indicates that the return is in process; `complete` indicates it finished successfully; `failed` indicates it failed.", + "enum": [ + "pending", + "complete", + "failed" + ] + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "PayoutBusinessAccount": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "sourceWalletId": { + "type": "string", + "description": "The identifier of the source wallet used to fund a payout.", + "example": "53535335" + }, + "destination": { + "$ref": "#/components/schemas/BankDestination" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoney" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "status": { + "$ref": "#/components/schemas/PayoutStatus" + }, + "trackingRef": { + "description": "A payout tracking reference. Will be present once known.", + "nullable": true, + "example": "CIR-6ESOQANEP3NAO" + }, + "errorCode": { + "$ref": "#/components/schemas/PayoutErrorCode" + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" + }, + "adjustments": { + "description": "Final adjustment which increases (credits) or decreases (debits) the total returned amount to the source wallet.", + "nullable": true, + "type": "object", + "properties": { + "fxCredit": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "fxDebit": { + "$ref": "#/components/schemas/FiatMoneyUsd" + } + } + }, + "return": { + "$ref": "#/components/schemas/UnwithdrawalObject" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "IdempotencyKey": { + "type": "string", + "description": "Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests.", + "format": "uuid", + "example": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7" + }, + "BusinessAccountDestinationRequest": { + "type": "object", + "description": "The destination bank account.", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "wire", + "sen" + ] + }, + "id": { + "$ref": "#/components/schemas/Id" + } + } + }, + "BusinessAccountPayoutCreationRequest": { + "type": "object", + "required": [ + "idempotencyKey", + "destination", + "amount" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "destination": { + "$ref": "#/components/schemas/BusinessAccountDestinationRequest" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoney" + } + } + }, + "ExternalFiatAccountStatus": { + "description": "Status of the account. A `pending` status indicates that the linking is in-progress; `complete` indicates the account was linked successfully; `failed` indicates it failed.", + "type": "string", + "enum": [ + "pending", + "complete", + "failed" + ] + }, + "Fingerprint": { + "type": "string", + "description": "A UUID that uniquely identifies the account number. If the same account is used more than once, each card object will have a different id, but the fingerprint will stay the same.", + "example": "eb170539-9e1c-4e92-bf4f-1d09534fdca2" + }, + "BillingDetails": { + "type": "object", + "required": [ + "name", + "city", + "country", + "line1", + "postalCode" + ], + "properties": { + "name": { + "type": "string", + "description": "Full name of the card or bank account holder.", + "maxLength": 1024, + "example": "Satoshi Nakamoto" + }, + "city": { + "type": "string", + "description": "City portion of the address.", + "maxLength": 1024, + "example": "Boston" + }, + "country": { + "type": "string", + "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "maxLength": 2, + "example": "US" + }, + "line1": { + "type": "string", + "description": "Line one of the street address.", + "maxLength": 1024, + "example": "100 Money Street" + }, + "line2": { + "type": "string", + "description": "Line two of the street address.", + "maxLength": 1024, + "example": "Suite 1" + }, + "district": { + "description": "State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision.", + "type": "string", + "maxLength": 16, + "example": "MA" + }, + "postalCode": { + "type": "string", + "description": "Postal / ZIP code of the address.", + "maxLength": 16, + "example": "01234" + } + } + }, + "BankAddress": { + "type": "object", + "description": "The address details for the bank, as provided during bank account creation.", + "required": [ + "country" + ], + "properties": { + "bankName": { + "type": "string", + "description": "Name of the bank. This property is required for bank accounts outside of the US that do not support IBAN'", + "maxLength": 35, + "example": "SAN FRANCISCO" + }, + "city": { + "type": "string", + "description": "City portion of the address. This property is required for bank accounts outside of the US.", + "maxLength": 35, + "example": "SAN FRANCISCO" + }, + "country": { + "type": "string", + "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "maxLength": 2, + "example": "US" + }, + "line1": { + "type": "string", + "description": "Line one of the street address.", + "maxLength": 35, + "example": "100 Money Street" + }, + "line2": { + "type": "string", + "description": "Line two of the street address.", + "maxLength": 35, + "example": "Suite 1" + }, + "district": { + "type": "string", + "description": "State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision.", + "maxLength": 16, + "example": "CA" + } + } + }, + "Wire": { + "type": "object", + "required": [ + "id", + "status", + "description", + "trackingRef", + "fingerprint", + "billingDetails", + "createDate", + "updateDate" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "status": { + "$ref": "#/components/schemas/ExternalFiatAccountStatus" + }, + "description": { + "type": "string", + "description": "Bank name plus last four digits of the bank account number or IBAN.", + "example": "WELLS FARGO BANK, NA ****0010" + }, + "trackingRef": { + "type": "string", + "description": "Wire tracking ref that needs to be set in the wire reference to beneficiary field.", + "example": "CIR13FB13A" + }, + "fingerprint": { + "$ref": "#/components/schemas/Fingerprint" + }, + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" + }, + "bankAddress": { + "$ref": "#/components/schemas/BankAddress" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "WireCreationRequestUS": { + "type": "object", + "title": "US Bank Account", + "description": "Relevant fields for U.S. bank accounts.", + "required": [ + "idempotencyKey", + "accountNumber", + "routingNumber", + "billingDetails", + "bankAddress" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "accountNumber": { + "description": "Account number that identifies the bank account.", + "type": "string", + "example": "12340010", + "minLength": 6, + "maxLength": 35 + }, + "routingNumber": { + "description": "ABA routing number for the bank account. Note this has to be specific for bank wire transfers.", + "type": "string", + "example": "121000248" + }, + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" + }, + "bankAddress": { + "$ref": "#/components/schemas/BankAddress" + } + } + }, + "BankAddressIbanSupported": { + "type": "object", + "description": "The address of the bank. City and country fields are required.", + "required": [ + "city", + "country" + ], + "properties": { + "bankName": { + "type": "string", + "description": "Name of the bank. This property is required for bank accounts outside of the US that do not support IBAN'", + "maxLength": 35, + "example": "SAN FRANCISCO" + }, + "city": { + "type": "string", + "description": "City portion of the address. This property is required for bank accounts outside of the US.", + "maxLength": 1024, + "example": "SAN FRANCISCO" + }, + "country": { + "type": "string", + "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "maxLength": 2, + "example": "US" + }, + "line1": { + "type": "string", + "description": "Line one of the street address.", + "maxLength": 35, + "example": "100 Money Street" + }, + "line2": { + "type": "string", + "description": "Line two of the street address.", + "maxLength": 35, + "example": "Suite 1" + }, + "district": { + "type": "string", + "description": "State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision.", + "maxLength": 16, + "example": "CA" + } + } + }, + "WireCreationRequestIban": { + "type": "object", + "title": "Non US Bank Account - IBAN Supported", + "description": "Relevant fields for non-U.S. bank accounts that support IBAN.", + "required": [ + "idempotencyKey", + "iban", + "billingDetails", + "bankAddress" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "iban": { + "description": "International Bank Account Number (IBAN) for the bank account.", + "type": "string", + "example": "DE31100400480532013000" + }, + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" + }, + "bankAddress": { + "$ref": "#/components/schemas/BankAddressIbanSupported" + } + } + }, + "BankAddressNonIban": { + "type": "object", + "description": "The address of the bank. BankName, City and Country fields are required.", + "required": [ + "bankName", + "city", + "country" + ], + "properties": { + "bankName": { + "type": "string", + "description": "Name of the bank. This property is required for bank accounts outside of the US that do not support IBAN'", + "maxLength": 35, + "example": "SAN FRANCISCO" + }, + "city": { + "type": "string", + "description": "City portion of the address. This property is required for bank accounts outside of the US.", + "maxLength": 1024, + "example": "SAN FRANCISCO" + }, + "country": { + "type": "string", + "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "maxLength": 2, + "example": "US" + }, + "line1": { + "type": "string", + "description": "Line one of the street address.", + "maxLength": 35, + "example": "100 Money Street" + }, + "line2": { + "type": "string", + "description": "Line two of the street address.", + "maxLength": 35, + "example": "Suite 1" + }, + "district": { + "type": "string", + "description": "State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision.", + "maxLength": 16, + "example": "CA" + } + } + }, + "WireCreationRequestAccountNumber": { + "type": "object", + "title": "Non US Bank Account - IBAN Not Supported", + "description": "Relevant fields for non-U.S. banks that do NOT support IBAN.", + "required": [ + "idempotencyKey", + "accountNumber", + "routingNumber", + "billingDetails", + "bankAddress" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "accountNumber": { + "description": "Account number that identifies the bank account.", + "type": "string", + "example": "0321800123", + "minLength": 6, + "maxLength": 35 + }, + "routingNumber": { + "description": "The bank's SWIFT / BIC code.", + "type": "string", + "example": "SBININBB354" + }, + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" + }, + "bankAddress": { + "$ref": "#/components/schemas/BankAddressNonIban" + } + } + }, + "WireCreationRequest": { + "type": "object", + "description": "Request object used to create a bank account (wires). Different fields are required depending on the bank country, see the guide documentation for the list of supported bank countries along with which ones support IBAN.", + "oneOf": [ + { + "$ref": "#/components/schemas/WireCreationRequestUS" + }, + { + "$ref": "#/components/schemas/WireCreationRequestIban" + }, + { + "$ref": "#/components/schemas/WireCreationRequestAccountNumber" + } + ] + }, + "WireInstructionBeneficiary": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the beneficiary.", + "example": "CIRCLE INTERNET FINANCIAL INC" + }, + "address1": { + "type": "string", + "description": "Address line 1 of the beneficiary's address.", + "example": "99 HIGH STREET" + }, + "address2": { + "type": "string", + "description": "Address line 2 of the beneficiary's address.", + "example": "BOSTON MA 02110" + } + } + }, + "WireInstructionBeneficiaryBank": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the beneficiary's bank.", + "example": "SILVERGATE BANK" + }, + "swiftCode": { + "type": "string", + "description": "SWIFT code of the beneficiary's bank account.", + "example": "SIVGUS66XXX" + }, + "routingNumber": { + "type": "string", + "description": "ABA Routing number of the beneficiary's bank account.", + "example": "322286803" + }, + "accountNumber": { + "type": "string", + "description": "Account number of the beneficiary's bank account.", + "example": "****7427" + }, + "currency": { + "type": "string", + "description": "Currency of the beneficiary's bank account.", + "example": "USD" + }, + "address": { + "type": "string", + "description": "Address of the beneficiary's bank.", + "example": "4250 EXECUTIVE SQUARE SUITE 300" + }, + "city": { + "type": "string", + "description": "City of the beneficiary's bank.", + "example": "LA JOLLA" + }, + "postalCode": { + "type": "string", + "description": "Postal code of the beneficiary's bank.", + "example": "02110" + }, + "country": { + "type": "string", + "description": "Country code of the beneficiary's bank. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "example": "US" + } + } + }, + "WireInstruction": { + "type": "object", + "properties": { + "trackingRef": { + "type": "string", + "description": "Circle tracking reference that needs to be set in the wire reference field.", + "example": "CIR13FB13A" + }, + "beneficiary": { + "$ref": "#/components/schemas/WireInstructionBeneficiary" + }, + "beneficiaryBank": { + "$ref": "#/components/schemas/WireInstructionBeneficiaryBank" + } + } + }, + "SignetFiatAccountResponse": { + "type": "object", + "required": [ + "id", + "status", + "trackingRef", + "walletAddress", + "createDate", + "updateDate" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "status": { + "$ref": "#/components/schemas/ExternalFiatAccountStatus" + }, + "trackingRef": { + "type": "string", + "description": "Tracking ref that needs to be set in the public description field when you send the funds to Circle Signet wallet.", + "example": "CIR13FB14A" + }, + "walletAddress": { + "type": "string", + "description": "Your signet wallet address.", + "example": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "SignetFiatAccountCreationRequest": { + "type": "object", + "required": [ + "idempotencyKey", + "walletAddress" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "walletAddress": { + "type": "string", + "description": "Signet wallet address.", + "example": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd" + } + } + }, + "SignetInstruction": { + "type": "object", + "properties": { + "trackingRef": { + "type": "string", + "description": "Circle tracking reference that needs to be set in the signet public description field.", + "example": "CIR13FB14A" + }, + "walletAddress": { + "type": "string", + "description": "Circle wallet address that needs to be set in the signet recipient wallet field.", + "example": "0x7e4f4fe03243ac7b291ebaee90b2bb27025a1234" + } + } + }, + "SenFiatAccountResponse": { + "type": "object", + "required": [ + "id", + "status", + "description", + "trackingRef", + "createDate", + "updateDate" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "status": { + "$ref": "#/components/schemas/ExternalFiatAccountStatus" + }, + "description": { + "type": "string", + "description": "Bank name plus last four digits of the bank account number.", + "example": "SILVERGATE BANK ****1111" + }, + "trackingRef": { + "type": "string", + "description": "Circle tracking reference that needs to be set in the memo field..", + "example": "CIR13FB14A" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "currency": { + "type": "string", + "description": "Currency of the fiat account.", + "example": "USD" + } + } + }, + "SenFiatAccountCreationRequest": { + "type": "object", + "required": [ + "idempotencyKey", + "accountNumber" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "accountNumber": { + "type": "string", + "description": "Silvergate SEN account number.", + "example": "12345678" + }, + "currency": { + "type": "string", + "description": "Currency of the Silvergate SEN account.", + "example": "USD" + } + } + }, + "SenInstruction": { + "type": "object", + "properties": { + "trackingRef": { + "type": "string", + "description": "Circle tracking reference that needs to be set in the memo field.", + "example": "CIR13FB14A" + }, + "accountNumber": { + "type": "string", + "description": "Circle corporate Silvergate SEN account number that needs to be set as destination.", + "example": "11111111" + }, + "currency": { + "type": "string", + "description": "Currency of Circle corporate Silvergate SEN account.", + "example": "USD" + } + } + }, + "IdentityAddress": { + "type": "object", + "required": [ + "line1", + "city", + "district", + "postalCode", + "country" + ], + "properties": { + "line1": { + "type": "string", + "description": "Line one of the street address.", + "maxLength": 1024, + "example": "100 Money Street" + }, + "line2": { + "type": "string", + "description": "Line two of the street address.", + "maxLength": 1024, + "example": "Suite 1" + }, + "city": { + "type": "string", + "description": "City portion of the address.", + "maxLength": 1024, + "example": "Boston" + }, + "district": { + "description": "State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision.", + "type": "string", + "maxLength": 16, + "example": "MA" + }, + "postalCode": { + "type": "string", + "description": "Postal / ZIP code of the address.", + "maxLength": 16, + "example": "01234" + }, + "country": { + "type": "string", + "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "maxLength": 2, + "example": "US" + } + } + }, + "Identity": { + "type": "object", + "description": "The identity of the originator. Identities are required when:\n * `destination.type: \"blockchain\"`\n * `destination.chain: \"ETH\"`\n * `amount.amount` >= $3,000 in value\n", + "required": [ + "type", + "name", + "addresses" + ], + "properties": { + "type": { + "type": "string", + "description": "The type of identity for the originator.\n* `individual` - A uniquely distinguishable individual.\n* `business` - Any entity other than a natural person that can establish a permanent customer relationship with an affected entity or otherwise own property. This can include companies, foundations, anstalt, partnerships, associations and other relevantly similar entities.\n", + "enum": [ + "individual", + "business" + ] + }, + "name": { + "type": "string", + "description": "Full name of the identity.", + "example": "Satoshi Nakamoto", + "maxLength": 1024 + }, + "addresses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IdentityAddress" + } + } + } + }, + "TransferSourceWalletLocation": { + "description": "A source wallet location.", + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "wallet" + ] + }, + "id": { + "type": "string", + "description": "The id of the wallet.", + "example": "12345" + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Identity" + } + } + } + }, + "Chain": { + "type": "string", + "description": "A blockchain that a given currency is available on.", + "enum": [ + "ALGO", + "AVAX", + "BTC", + "ETH", + "FLOW", + "HBAR", + "MATIC", + "SOL", + "TRX", + "XLM" + ] + }, + "TransferSourceBlockchainLocation": { + "description": "A source blockchain address.", + "type": "object", + "required": [ + "type", + "chain" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "blockchain" + ] + }, + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Identity" + } + } + } + }, + "TransferSourceLocation": { + "description": "A source of funds.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferSourceWalletLocation" + }, + { + "$ref": "#/components/schemas/TransferSourceBlockchainLocation" + } + ], + "discriminator": { + "propertyName": "type" + } + }, + "Address": { + "type": "string", + "description": "An alphanumeric string representing a blockchain address. Will be in different formats for different chains. It is important to preserve the exact formatting and capitalization of the address.", + "example": "0x8381470ED67C3802402dbbFa0058E8871F017A6F" + }, + "AddressTag": { + "type": "string", + "description": "The secondary identifier for a blockchain address. An example of this is the memo field on the Stellar network, which can be text, id, or hash format.", + "nullable": true, + "example": "123456789" + }, + "TransferDestinationBlockchainLocation": { + "description": "A destination blockchain address.", + "type": "object", + "required": [ + "type", + "chain", + "address" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "blockchain" + ] + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "addressTag": { + "$ref": "#/components/schemas/AddressTag" + }, + "chain": { + "$ref": "#/components/schemas/Chain" + } + } + }, + "TransferDestinationWalletLocation": { + "description": "A destination wallet location.", + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "wallet" + ] + }, + "id": { + "type": "string", + "description": "The id of the wallet.", + "example": "12345" + }, + "address": { + "type": "string", + "description": "An alphanumeric string which indicates the wallet address used to receive the transfer. Will only be set when the transfer source is a blockchain address.", + "example": "0x8381470ED67C3802402dbbFa0058E8871F017A6F" + }, + "addressTag": { + "$ref": "#/components/schemas/AddressTag" + } + } + }, + "TransferDestinationLocation": { + "description": "A destination of funds.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationBlockchainLocation" + }, + { + "$ref": "#/components/schemas/TransferDestinationWalletLocation" + } + ], + "discriminator": { + "propertyName": "type" + } + }, + "TransferErrorCode": { + "type": "string", + "description": "Indicates the failure reason of a transfer. Only present for transfers in a `failed` state. Possible values are `insufficient_funds`, `blockchain_error` and `transfer_denied` and `transfer_failed`", + "nullable": true, + "enum": [ + "transfer_failed", + "transfer_denied", + "blockchain_error", + "insufficient_funds" + ] + }, + "Transfer": { + "type": "object", + "description": "A transfer of funds.", + "required": [ + "id", + "source", + "destination", + "amount", + "status" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "source": { + "$ref": "#/components/schemas/TransferSourceLocation" + }, + "destination": { + "$ref": "#/components/schemas/TransferDestinationLocation" + }, + "amount": { + "$ref": "#/components/schemas/Money" + }, + "transactionHash": { + "description": "A hash that uniquely identifies the onchain transaction. This is only available where either source or destination are of type blockchain.", + "type": "string", + "example": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63" + }, + "status": { + "description": "Status of the transfer. Status `pending` indicates that the transfer is in the process of running; `complete` indicates it finished successfully; `failed` indicates it failed.", + "type": "string", + "enum": [ + "pending", + "complete", + "failed" + ] + }, + "errorCode": { + "$ref": "#/components/schemas/TransferErrorCode" + }, + "createDate": { + "description": "The create date of the transfer.", + "type": "string", + "format": "date-time" + } + } + }, + "TransferRequestVerifiedBlockchainLocation": { + "type": "object", + "required": [ + "type", + "addressId" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "verified_blockchain" + ] + }, + "addressId": { + "type": "string", + "description": "The ID of the verified blockchain recipient address.", + "example": "f1f36b85-cafe-484e-a46b-02340bfdb927", + "format": "uuid" + } + } + }, + "BusinessAccountTransferCreationRequest": { + "type": "object", + "required": [ + "idempotencyKey", + "destination", + "amount" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "destination": { + "$ref": "#/components/schemas/TransferRequestVerifiedBlockchainLocation" + }, + "amount": { + "$ref": "#/components/schemas/Money" + } + } + }, + "Currency": { + "type": "string", + "description": "A currency associated with a balance or address.", + "nullable": true, + "enum": [ + "USD", + "EUR", + "BTC", + "ETH" + ] + }, + "AddressObject": { + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/Address" + }, + "addressTag": { + "$ref": "#/components/schemas/AddressTag" + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "chain": { + "$ref": "#/components/schemas/Chain" + } + } + }, + "BusinessAccountGenerateAddressRequest": { + "type": "object", + "required": [ + "idempotencyKey", + "currency", + "chain" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "chain": { + "$ref": "#/components/schemas/Chain" + } + } + }, + "BusinessAccountDescription": { + "type": "string", + "description": "An identifier or sentence that describes the recipient.", + "example": "My USDC address at a cryptocurrency exchange" + }, + "BusinessAccountRecipientAddressObject": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "addressTag": { + "$ref": "#/components/schemas/AddressTag" + }, + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "description": { + "$ref": "#/components/schemas/BusinessAccountDescription" + } + } + }, + "BusinessAccountRecipientAddressCreationRequest": { + "type": "object", + "description": "Adds a recipient address. The currency parameter will default to USD for all chains except for BTC where it defaults to BTC.", + "required": [ + "idempotencyKey", + "address", + "chain", + "description" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "addressTag": { + "$ref": "#/components/schemas/AddressTag" + }, + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "description": { + "$ref": "#/components/schemas/BusinessAccountDescription" + } + } + }, + "WalletLocation": { + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "wallet" + ] + }, + "id": { + "type": "string", + "description": "The id of the wallet.", + "example": "12345" + } + } + }, + "BusinessAccountDeposit": { + "type": "object", + "description": "A deposit", + "required": [ + "id", + "destination", + "amount", + "status", + "createDate" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "sourceWalletId": { + "type": "string", + "description": "The identifier for the bank account where the funds were deposited from.", + "format": "uuid", + "example": "9b57048d-2365-4ff5-956b-0199170d1035" + }, + "destination": { + "$ref": "#/components/schemas/WalletLocation" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoney" + }, + "fee": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "status": { + "type": "string", + "description": "Status of the deposit. Status `pending` indicates that the deposit is in the process of running; `complete` indicates it finished successfully; `failed` indicates it failed.", + "enum": [ + "pending", + "complete", + "failed" + ] + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "MockSenPaymentBeneficiaryBankInstruction": { + "type": "object", + "required": [ + "accountNumber" + ], + "properties": { + "accountNumber": { + "type": "string", + "description": "Circle corporate Silvergate SEN account number that needs to be set as destination.", + "example": "11111111" + } + } + }, + "MockSenPaymentRequest": { + "type": "object", + "required": [ + "trackingRef", + "amount", + "beneficiaryBank" + ], + "properties": { + "trackingRef": { + "type": "string", + "description": "Circle tracking reference that needs to be set in the memo filed. This field is retrievable through the response during SEN account creation or via the bank instruction endpoint.", + "example": "CIR13FB13A" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoney" + }, + "beneficiaryBank": { + "$ref": "#/components/schemas/MockSenPaymentBeneficiaryBankInstruction" + } + } + }, + "MockSenPaymentResponse": { + "type": "object", + "properties": { + "trackingRef": { + "type": "string", + "description": "Wire tracking reference that needs to be set in the wire reference to beneficiary field. This field is retrievable through the response during wire creation or via the bank instruction endpoint.", + "example": "CIR13FB13A" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "beneficiaryBank": { + "$ref": "#/components/schemas/MockSenPaymentBeneficiaryBankInstruction" + }, + "status": { + "type": "string", + "description": "Enumerated status of the wire payment. Status `pending` indicates that the wire payment is in process; `processed` indicates it finished successfully; `failed` indicates it failed.", + "enum": [ + "pending", + "processed", + "failed" + ] + } + } + }, + "Wallet": { + "type": "object", + "properties": { + "walletId": { + "type": "string", + "description": "Wallet identifier. Numeric value but should be treated as a string as format may change in the future'", + "example": "434000" + }, + "entityId": { + "type": "string", + "description": "Universally unique identifier (UUID v4) of the entity that owns the wallet.", + "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" + }, + "type": { + "type": "string", + "description": "Wallet type.", + "enum": [ + "end_user_wallet" + ] + }, + "description": { + "type": "string", + "description": "A human-friendly, non-unique identifier for a wallet.", + "example": "Treasury Wallet", + "maxLength": 255 + }, + "balances": { + "description": "A list of balances for currencies owned by the wallet.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Money" + } + } + } + }, + "WalletCreationRequest": { + "type": "object", + "required": [ + "idempotencyKey" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "description": { + "type": "string", + "description": "A human-friendly, non-unique identifier for a wallet.", + "example": "Treasury Wallet", + "maxLength": 255 + } + } + }, + "GenerateAddressRequest": { + "type": "object", + "required": [ + "idempotencyKey", + "currency", + "chain" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "chain": { + "$ref": "#/components/schemas/Chain" + } + } + }, + "TransferRequestSourceWalletLocation": { + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "wallet" + ] + }, + "id": { + "type": "string", + "description": "The id of the wallet.", + "example": "12345" + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Identity" + } + } + } + }, + "TransferRequestBlockchainLocation": { + "type": "object", + "required": [ + "type", + "address", + "chain" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "blockchain" + ] + }, + "address": { + "type": "string", + "description": "The blockchain address.", + "example": "0x8381470ED67C3802402dbbFa0058E8871F017A6F" + }, + "addressTag": { + "$ref": "#/components/schemas/AddressTag" + }, + "chain": { + "$ref": "#/components/schemas/Chain" + } + } + }, + "TransferCreationRequest": { + "type": "object", + "required": [ + "idempotencyKey", + "source", + "destination", + "amount" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "source": { + "$ref": "#/components/schemas/TransferRequestSourceWalletLocation" + }, + "destination": { + "oneOf": [ + { + "$ref": "#/components/schemas/TransferRequestBlockchainLocation" + }, + { + "$ref": "#/components/schemas/WalletLocation" + } + ] + }, + "amount": { + "$ref": "#/components/schemas/Money" + } + } + }, + "TransferDetailedTransfer": { + "type": "object", + "description": "A transfer of funds.", + "required": [ + "id", + "source", + "destination", + "amount", + "status" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "source": { + "$ref": "#/components/schemas/TransferSourceLocation" + }, + "destination": { + "$ref": "#/components/schemas/TransferDestinationLocation" + }, + "amount": { + "$ref": "#/components/schemas/Money" + }, + "transactionHash": { + "type": "string", + "description": "A hash that uniquely identifies the onchain transaction. This is only available where either source or destination are of type blockchain.", + "example": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63" + }, + "status": { + "type": "string", + "description": "Status of the transfer. Status `pending` indicates that the transfer is in the process of running; `complete` indicates it finished successfully; `failed` indicates it failed.", + "enum": [ + "failed", + "pending", + "complete" + ] + }, + "errorCode": { + "$ref": "#/components/schemas/TransferErrorCode" + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "Ping": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "example": "pong" + } + } + }, + "MerchantWalletId": { + "type": "string", + "description": "Unique system generated identifier for the wallet of the merchant.", + "maxLength": 36, + "example": "212000" + }, + "AccountConfiguration": { + "type": "object", + "properties": { + "payments": { + "type": "object", + "properties": { + "masterWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" + } + } + } + } + }, + "IdKey": { + "type": "string", + "description": "Universally unique identifier (UUID v4) of the public key used in encryption. NOTE the sandbox environment uses the default value of `key1`. For this reason the example supplied is `key1` rather than a UUID.", + "format": "uuid", + "example": "key1" + }, + "PublicKey": { + "type": "object", + "required": [ + "keyId", + "publicKey" + ], + "properties": { + "keyId": { + "$ref": "#/components/schemas/IdKey" + }, + "publicKey": { + "type": "string", + "description": "A PGP ascii-armor encoded public key.", + "example": "LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEJDUEcgdjEuNTQKCm1RRU5CRjAxdmk0QkNBQ3JzMDNLS1Y0Qk9SRkYyT0Z4bUdvb0UyaTZMbnNneE5UL1dsV2s1ZTl2RDd2NENkSm0KcGJJbENmZ0U4WFlnYmhKUTE4YStaTzlPM0RFYUp2dGhJSEtjL0l1UEIvZmdEYUJUT285NkJzL2pVRFp6ZGxaVApQazNFUjliNFZPeGVwMFNPSHFMcmxTVFY4ZXB3M1R3SEdaL3NpSWdBYXEwRGdJdlZxUTY4TGVaMnorUFJWZm04CmhhSnJpb05SRU5Ja2ZNTWY5aFdySlowSW1zUk1aVmpDMVVrd2FSSHdrTTMwQUlia1dYcFJ5R205SXhQaXdGa08Kb1RnWlpwUFpsdVczckdkWER0NHZqL24za09hczV1dFdoNFovMlhjWHBiSUUyU0FPK0hycUdIclRnK1ZmZ05JNwpZcVZqYW5MOEN1bm83UkxmcDhKZlZDNXBLUm5ySVNCTnphN1ZBQkVCQUFHMEJrTnBjbU5zWllrQkhBUVFBUWtBCkJnVUNYVFcrTGdBS0NSQ3EzaHNwWjBMeGEwdnpCLzQvQTJpdk1CWW1aZXV2bEJZMm5ZZnNXek9Sb28vU3BIYkQKY2Y0UmtxZzZ0RERJSkUzNHhDVit0MzJydmJkM0ZOdVZseWs1MDVZRkpESnI4cVc2S0tkQVRXdU16eW5mMVVoUAo1M25hTlc0cXdrdSt3b0RWWjJpci9lUVI1WUc4L0RGcnd3bXdaa0dRd0Ftc3h5ZHd5anBnLzBrQ3lpZHkxdVBkCmVVWGgwdWt4dS9Dais4UFl5cHcwdit5V2tzbjdSZ2dVbkJFMWhiQ2pEV3FweHZjMEpDNVAxdmx6L2xRcWQrR3oKRC9Td1FJTVdRVElnV3BHRVVvQTRDc3drbU5PdHhsRVF1U0tueXNtTG02S0ExUmRhTzd6V2IrdWNLN21FZ2VoSwpXU2hHZExqRVNNZlVRUTczemNqMXg2amxLUFNhRlJyLzhXcHhrVXYzVHYvQzZMb0JpejRLCj1WSWg3Ci0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0K" + } + } + }, + "SubscriptionDetail": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Identifier for created subscription.", + "example": "arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17" + }, + "status": { + "type": "string", + "description": "Status of the subscription request.", + "enum": [ + "confirmed", + "pending", + "deleted" + ] + } + } + }, + "SubscriptionResponse": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "endpoint": { + "type": "string", + "description": "URL of the endpoint.", + "example": "https://example.org/handler/for/notifications" + }, + "subscriptionDetails": { + "type": "array", + "description": "List of subscriptions details for created subscriptions.", + "items": { + "$ref": "#/components/schemas/SubscriptionDetail" + } + } + } + }, + "SubscriptionRequest": { + "type": "object", + "required": [ + "endpoint" + ], + "properties": { + "endpoint": { + "type": "string", + "description": "URL of the subscriber endpoint. Must be publicly accessible and utilize HTTPS.", + "example": "https://example.org/handler/for/notifications" + } + } + }, + "UnsubscribeResponse": { + "type": "object", + "description": "Unsubscribe response object. No fields as of now.", + "example": {} + }, + "ChannelResponse": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "default": { + "type": "boolean", + "description": "Flag to indicate whether the channel is configured as default. At most one of the channels will have this flag set to true and the default channel is used when a payment request does not have the `channel` property set.", + "example": true + }, + "cardDescriptor": { + "type": "string", + "description": "Descriptor that appears on cardholders' bank statements for card payments submitted through this channel.", + "example": "CIRCLE LLC." + }, + "achDescriptor": { + "type": "string", + "description": "Descriptor that appears on end-users' bank statements for ACH payments submitted through this channel.", + "example": "CIRCLE LLC." + } + } + }, + "TokenAmount": { + "type": "object", + "required": [ + "amount", + "chain" + ], + "properties": { + "amount": { + "type": "string", + "description": "Magnitude of the amount, in units of the currency, with a `.`.", + "example": "132.584192" + }, + "chain": { + "$ref": "#/components/schemas/Chain" + } + } + }, + "Stablecoin": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the stablecoin.", + "example": "USD Coin" + }, + "symbol": { + "type": "string", + "description": "Symbol of the stablecoin.", + "example": "USDC" + }, + "totalAmount": { + "type": "string", + "description": "Total circulating amount of the stablecoin.", + "example": "132.584192" + }, + "chains": { + "type": "array", + "description": "A list of the broken down totalAmount by chain of the stablecoin.", + "items": { + "$ref": "#/components/schemas/TokenAmount" + } + } + } + }, + "Stablecoins": { + "type": "array", + "description": "A list of stablecoin objects containing its name, symbol, total amount, and per-chain amount.", + "items": { + "$ref": "#/components/schemas/Stablecoin" + } + }, + "IdMerchant": { + "type": "string", + "description": "Unique system generated identifier for the merchant.", + "format": "uuid", + "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" + }, + "SourceResponse": { + "type": "object", + "description": "The payment source.", + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "type": { + "type": "string", + "description": "Type of the source.", + "enum": [ + "card", + "ach", + "wire", + "sepa" + ] + } + } + }, + "PaymentStatus": { + "type": "string", + "description": "Enumerated status of the payment. `pending` means the payment is waiting to be processed. `confirmed` means the payment has been approved by the bank and the merchant can treat it as successful, but settlement funds are not yet available to the merchant. `paid` means settlement funds have been received and are available to the merchant. `failed` means something went wrong (most commonly that the payment was denied). `action_required` means that additional steps are required to process this payment; refer to `requiredAction` for more details. Terminal states are `paid` and `failed`.", + "enum": [ + "pending", + "confirmed", + "paid", + "failed", + "action_required" + ] + }, + "RequiredAction": { + "type": "object", + "description": "When the payment status is `action_required`, this object summarizes the required additional steps.", + "required": [ + "type", + "redirectUrl" + ], + "properties": { + "type": { + "type": "string", + "description": "The type of action that is required to proceed with the payment. Currently only one type is supported.", + "enum": [ + "three_d_secure_required" + ] + }, + "redirectUrl": { + "type": "string", + "description": "The URL to bring the user to in order to complete the payment.", + "example": "https://example.org" + } + } + }, + "CancelRefundReversalStatus": { + "type": "string", + "enum": [ + "pending", + "confirmed", + "paid", + "failed" + ], + "description": "Enumerated status of the payment. `pending` means the payment is waiting to be processed. `confirmed` means the payment has been approved by the bank and the merchant can treat it as successful, but settlement funds are not yet available to the merchant. `paid` means settlement funds have been received and are available to the merchant. `failed` means something went wrong (most commonly that the payment was denied). Terminal states are `paid` and `failed`." + }, + "PaymentInfoCancel": { + "type": "object", + "description": "Status information of the related cancel. This property is only present on canceled payment or refund items.", + "nullable": true, + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "type": { + "type": "string", + "description": "Type of the payment object.", + "enum": [ + "cancel" + ] + }, + "description": { + "description": "Enumerated description of the payment item.", + "type": "string", + "nullable": true, + "enum": [ + "Payment" + ] + }, + "status": { + "$ref": "#/components/schemas/CancelRefundReversalStatus" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "PaymentInfoPaymentAndRefund": { + "type": "object", + "description": "Status information of the related payment. This property is only present on refund or cancel items.", + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "type": { + "type": "string", + "description": "Type of the payment object.", + "enum": [ + "payment", + "refund" + ] + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "description": { + "type": "string", + "description": "Enumerated description of the payment item.", + "nullable": true, + "enum": [ + "Payment" + ] + }, + "status": { + "$ref": "#/components/schemas/PaymentStatus" + }, + "requiredAction": { + "$ref": "#/components/schemas/RequiredAction" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "Channel": { + "type": "string", + "format": "uuid", + "description": "The channel identifier that can be set for the payment. When not provided, the default channel is used.", + "example": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7" + }, + "BasicPayment": { + "type": "object", + "description": "Status information of the related payment. This property is only present on refund or cancel items.", + "required": [ + "id", + "type", + "merchantId", + "amount", + "source", + "status" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "type": { + "description": "Type of the payment object.", + "type": "string", + "enum": [ + "payment" + ] + }, + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "source": { + "$ref": "#/components/schemas/SourceResponse" + }, + "description": { + "description": "Enumerated description of the payment.", + "type": "string", + "enum": [ + "Payment" + ] + }, + "status": { + "$ref": "#/components/schemas/PaymentStatus" + }, + "captured": { + "description": "Determines if a payment has successfully been captured. This property is only present for payments that did not use auto capture.", + "type": "boolean" + }, + "captureAmount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "captureDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "requiredAction": { + "$ref": "#/components/schemas/RequiredAction" + }, + "cancel": { + "$ref": "#/components/schemas/PaymentInfoCancel" + }, + "refunds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentInfoPaymentAndRefund" + } + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "channel": { + "$ref": "#/components/schemas/Channel" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "Email": { + "type": "string", + "description": "Email of the user.", + "maxLength": 1024, + "example": "satoshi@circle.com" + }, + "PhoneNumber": { + "type": "string", + "description": "Phone number of the user in E.164 format. We recommend using a library such as [libphonenumber](https://github.com/google/libphonenumber) to parse and validate phone numbers.", + "maxLength": 16, + "pattern": "/\\+?[1-9]\\d{1,14}/", + "example": "+14155555555" + }, + "SessionId": { + "description": "Hash of the session identifier; typically of the end user. This helps us make risk decisions and prevent fraud. IMPORTANT: Please hash the session identifier to prevent sending us actual session identifiers.\n", + "type": "string", + "maxLength": 50, + "example": "DE6FA86F60BB47B379307F851E238617" + }, + "IpAddress": { + "type": "string", + "description": "Single IPv4 or IPv6 address of user'", + "example": "244.28.239.130" + }, + "MetadataPayment": { + "type": "object", + "required": [ + "email", + "sessionId", + "ipAddress" + ], + "properties": { + "email": { + "$ref": "#/components/schemas/Email" + }, + "phoneNumber": { + "$ref": "#/components/schemas/PhoneNumber" + }, + "sessionId": { + "$ref": "#/components/schemas/SessionId" + }, + "ipAddress": { + "$ref": "#/components/schemas/IpAddress" + } + } + }, + "Source": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "type": { + "type": "string", + "description": "Type of the source.", + "enum": [ + "card", + "ach" + ] + } + } + }, + "PaymentCreationRequest": { + "type": "object", + "required": [ + "idempotencyKey", + "amount", + "verification", + "source", + "metadata" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "keyId": { + "$ref": "#/components/schemas/IdKey" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataPayment" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "autoCapture": { + "type": "boolean", + "description": "Triggers the automatic capture of the full payment amount. If set to false the payment will only be authorized but not captured.", + "default": true, + "example": true + }, + "verification": { + "type": "string", + "description": "Indicates the verification method for this payment.", + "enum": [ + "none", + "cvv", + "three_d_secure" + ] + }, + "verificationSuccessUrl": { + "type": "string", + "description": "The URL to redirect users to after successful 3DS authentication.", + "format": "url", + "example": "https://www.example.com/3ds/verificationsuccessful" + }, + "verificationFailureUrl": { + "type": "string", + "description": "The URL to redirect users to after failed 3DS authentication.", + "format": "url", + "example": "https://www.example.com/3ds/verificationfailure" + }, + "source": { + "$ref": "#/components/schemas/Source" + }, + "description": { + "type": "string", + "description": "Description of the payment with length restriction of 240 characters.", + "example": "Payment" + }, + "encryptedData": { + "type": "string", + "format": "byte", + "description": "PGP encrypted base64 encoded string. Contains CVV.\n* **CVV (Card Verification Number)**: Three or four digit security code. Only required if `verification` is `cvv`.\n", + "example": "UHVibGljS2V5QmFzZTY0RW5jb2RlZA==" + }, + "channel": { + "$ref": "#/components/schemas/Channel" + } + } + }, + "AvsResults": { + "type": "string", + "description": "Status of the AVS check. Raw AVS response, expressed as an upper-case letter. `not_requested` indicates check was not made. `pending` is pending/processing.", + "example": "D" + }, + "CvvResults": { + "description": "Enumerated status of the check. `not_requested` indicates check was not made. `pass` indicates value is correct. `fail` indicates value is incorrect. `unavailable` indicates card issuer did not do the provided check. `pending` indicates check is pending/processing.", + "type": "string", + "enum": [ + "not_requested", + "pass", + "fail", + "unavailable", + "pending" + ] + }, + "3dsResults": { + "type": "string", + "description": "Enumerated status of the check. `pass` indicates successful 3DS authentication. `fail` indicates failed 3DS authentication.", + "enum": [ + "pass", + "fail" + ] + }, + "Eci": { + "type": "string", + "description": "ECI (electronic commerce indicator) value returned by Directory Servers (namely Visa, MasterCard, JCB, and American Express) indicating the outcome of authentication attempted on transactions enforced by 3DS.", + "enum": [ + "00", + "01", + "02", + "05", + "06", + "07" + ] + }, + "PaymentVerificationResponse": { + "type": "object", + "description": "Indicates the status of the payment verification. This property will be present once the payment is confirmed.", + "required": [ + "avs", + "cvv" + ], + "properties": { + "avs": { + "$ref": "#/components/schemas/AvsResults" + }, + "cvv": { + "$ref": "#/components/schemas/CvvResults" + }, + "threeDSecure": { + "$ref": "#/components/schemas/3dsResults" + }, + "eci": { + "$ref": "#/components/schemas/Eci" + } + } + }, + "BasicCancel": { + "type": "object", + "description": "Status information of the related cancel. This property is only present on canceled payment or refund items.", + "nullable": true, + "required": [ + "id", + "type", + "merchantId", + "amount", + "source", + "status" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "type": { + "type": "string", + "description": "Type of the payment object.", + "enum": [ + "cancel" + ] + }, + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "source": { + "$ref": "#/components/schemas/SourceResponse" + }, + "description": { + "description": "Enumerated description of the payment.", + "type": "string", + "enum": [ + "Payment" + ] + }, + "status": { + "$ref": "#/components/schemas/CancelRefundReversalStatus" + }, + "originalPayment": { + "$ref": "#/components/schemas/PaymentInfoPaymentAndRefund" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "channel": { + "$ref": "#/components/schemas/Channel" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "BasicRefund": { + "type": "object", + "required": [ + "id", + "type", + "merchantId", + "amount", + "source", + "status" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "type": { + "description": "Type of the payment object.", + "type": "string", + "enum": [ + "refund" + ] + }, + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "source": { + "$ref": "#/components/schemas/SourceResponse" + }, + "description": { + "description": "Enumerated description of the payment.", + "type": "string", + "enum": [ + "Payment" + ] + }, + "status": { + "$ref": "#/components/schemas/CancelRefundReversalStatus" + }, + "originalPayment": { + "$ref": "#/components/schemas/PaymentInfoPaymentAndRefund" + }, + "cancel": { + "$ref": "#/components/schemas/PaymentInfoCancel" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "channel": { + "$ref": "#/components/schemas/Channel" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "PaymentErrorCode": { + "type": "string", + "description": "Indicates the failure reason of a payment. Only present for payments in failed state. Possible values are [`payment_failed`, `payment_fraud_detected`, `payment_denied`, `payment_not_supported_by_issuer`, `payment_not_funded`, `payment_unprocessable`, `payment_stopped_by_issuer`, `payment_canceled`, `payment_returned`, `payment_failed_balance_check`, `card_failed`, `card_invalid`, `card_address_mismatch`, `card_zip_mismatch`, `card_cvv_invalid`, `card_expired`, `card_limit_violated`, `card_not_honored`, `card_cvv_required`, `credit_card_not_allowed`, `card_account_ineligible`, `card_network_unsupported`, `channel_invalid`, `unauthorized_transaction`, `bank_account_ineligible`, `bank_transaction_error`, `invalid_account_number`, `invalid_wire_rtn`, `invalid_ach_rtn`, `vendor_inactive`]'", + "nullable": true, + "enum": [ + "payment_failed", + "payment_fraud_detected", + "payment_denied", + "payment_not_supported_by_issuer", + "payment_not_funded", + "payment_unprocessable", + "payment_stopped_by_issuer", + "payment_canceled", + "payment_returned", + "payment_failed_balance_check", + "card_failed", + "card_invalid", + "card_address_mismatch", + "card_zip_mismatch", + "card_cvv_invalid", + "card_expired", + "card_limit_violated", + "card_not_honored", + "card_cvv_required", + "card_restricted,", + "card_account_ineligible", + "card_network_unsupported", + "channel_invalid", + "unauthorized_transaction", + "bank_account_ineligible", + "bank_transaction_error", + "invalid_account_number", + "invalid_wire_rtn", + "invalid_ach_rtn", + "ref_id_invalid", + "account_name_mismatch", + "account_number_mismatch", + "account_ineligible", + "wallet_address_mismatch", + "customer_name_mismatch", + "institution_name_mismatch", + "vendor_inactive" + ] + }, + "MetadataPhoneEmail": { + "type": "object", + "required": [ + "email" + ], + "properties": { + "email": { + "$ref": "#/components/schemas/Email" + }, + "phoneNumber": { + "$ref": "#/components/schemas/PhoneNumber" + } + } + }, + "DetailedPayment": { + "type": "object", + "required": [ + "id", + "type", + "merchantId", + "amount", + "source", + "status" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "type": { + "description": "Type of the payment object.", + "type": "string", + "enum": [ + "payment" + ] + }, + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "source": { + "$ref": "#/components/schemas/SourceResponse" + }, + "description": { + "type": "string", + "description": "Enumerated description of the payment.", + "enum": [ + "Payment" + ] + }, + "status": { + "$ref": "#/components/schemas/PaymentStatus" + }, + "captured": { + "type": "boolean", + "description": "Determines if a payment has successfully been captured. This property is only present for payments that did not use auto capture." + }, + "captureAmount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "captureDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "requiredAction": { + "$ref": "#/components/schemas/RequiredAction" + }, + "verification": { + "$ref": "#/components/schemas/PaymentVerificationResponse" + }, + "cancel": { + "$ref": "#/components/schemas/BasicCancel" + }, + "refunds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BasicRefund" + } + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "trackingRef": { + "description": "Payment tracking reference. Will be present once known.", + "type": "string", + "nullable": true, + "example": "24910599141085313498894" + }, + "errorCode": { + "$ref": "#/components/schemas/PaymentErrorCode", + "nullable": true + }, + "metadata": { + "$ref": "#/components/schemas/MetadataPhoneEmail" + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" + }, + "channel": { + "$ref": "#/components/schemas/Channel" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "ExternalRef": { + "type": "string", + "description": "External network identifier which will be present once provided from the applicable network. \n\nExamples:\n* **Input/Output Message Accountability Data (IMAD/OMAD)**: unique number given to each FedWire payment when using the Federal Reserve Bank Service which can be used to investigate and track wire transfers.\n", + "example": "YYYYMMDDXXXXXXXX012345" + }, + "DetailedPaymentPolymorphic": { + "type": "object", + "required": [ + "id", + "type", + "merchantId", + "amount", + "source", + "status" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "type": { + "description": "Type of the payment object.", + "type": "string", + "enum": [ + "payment", + "refund", + "cancel" + ] + }, + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "source": { + "$ref": "#/components/schemas/SourceResponse" + }, + "description": { + "description": "Enumerated description of the payment.", + "type": "string", + "enum": [ + "Payment" + ] + }, + "status": { + "$ref": "#/components/schemas/PaymentStatus" + }, + "requiredAction": { + "$ref": "#/components/schemas/RequiredAction" + }, + "verification": { + "$ref": "#/components/schemas/PaymentVerificationResponse" + }, + "originalPayment": { + "$ref": "#/components/schemas/BasicPayment" + }, + "cancel": { + "$ref": "#/components/schemas/BasicCancel" + }, + "refunds": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/BasicRefund" + } + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "trackingRef": { + "description": "Payment tracking reference. Will be present once known.", + "type": "string", + "nullable": true, + "example": "24910599141085313498894" + }, + "externalRef": { + "$ref": "#/components/schemas/ExternalRef" + }, + "errorCode": { + "$ref": "#/components/schemas/PaymentErrorCode" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataPhoneEmail" + }, + "channel": { + "$ref": "#/components/schemas/Channel" + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "CaptureCreationRequest": { + "type": "object", + "required": [ + "idempotencyKey" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + } + } + }, + "ReversalReason": { + "type": "string", + "description": "Enumerated reason for a returned payment. Providing this reason in the request is recommended (to improve risk evaluation) but not required.", + "enum": [ + "duplicate", + "fraudulent", + "requested_by_customer", + "bank_transaction_error", + "invalid_account_number", + "insufficient_funds", + "payment_stopped_by_issuer", + "payment_returned", + "bank_account_ineligible", + "invalid_ach_rtn", + "unauthorized_transaction", + "payment_failed" + ] + }, + "CancelCreationRequest": { + "type": "object", + "required": [ + "idempotencyKey" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "reason": { + "$ref": "#/components/schemas/ReversalReason" + } + } + }, + "DetailedCancel": { + "type": "object", + "required": [ + "id", + "type", + "merchantId", + "amount", + "source", + "status" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "type": { + "description": "Type of the payment object.", + "type": "string", + "enum": [ + "cancel" + ] + }, + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "source": { + "$ref": "#/components/schemas/SourceResponse" + }, + "description": { + "description": "Enumerated description of the payment.", + "type": "string", + "enum": [ + "Payment" + ] + }, + "status": { + "$ref": "#/components/schemas/CancelRefundReversalStatus" + }, + "originalPayment": { + "$ref": "#/components/schemas/BasicPayment" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "trackingRef": { + "description": "Payment tracking reference. Will be present once known.", + "type": "string", + "nullable": true, + "example": "24910599141085313498894" + }, + "errorCode": { + "$ref": "#/components/schemas/PaymentErrorCode" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataPhoneEmail" + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" + }, + "refund": { + "description": "If the cancel was made after a cutoff time period, it will be processed as a refund. This flag indicates that the cancel was processed as a refund'", + "type": "boolean", + "default": false + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "RefundCreationRequest": { + "type": "object", + "required": [ + "idempotencyKey", + "amount" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "reason": { + "$ref": "#/components/schemas/ReversalReason" + } + } + }, + "DetailedRefund": { + "type": "object", + "required": [ + "id", + "type", + "merchantId", + "amount", + "source", + "status" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "type": { + "description": "Type of the payment object.", + "type": "string", + "enum": [ + "refund" + ] + }, + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "source": { + "$ref": "#/components/schemas/SourceResponse" + }, + "description": { + "description": "Enumerated description of the payment.", + "type": "string", + "enum": [ + "Payment" + ] + }, + "status": { + "$ref": "#/components/schemas/CancelRefundReversalStatus" + }, + "originalPayment": { + "$ref": "#/components/schemas/BasicPayment" + }, + "cancel": { + "$ref": "#/components/schemas/BasicCancel" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "trackingRef": { + "description": "Payment tracking reference. Will be present once known.", + "type": "string", + "nullable": true, + "example": "24910599141085313498894" + }, + "errorCode": { + "$ref": "#/components/schemas/PaymentErrorCode" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataPhoneEmail" + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "MockWirePaymentBeneficiaryBankInstruction": { + "type": "object", + "required": [ + "accountNumber" + ], + "properties": { + "accountNumber": { + "type": "string", + "description": "Virtual account number or Circle corporate Silvergate Wire account number that needs to be set as destination.", + "example": "11111111" + } + } + }, + "MockWirePaymentRequest": { + "type": "object", + "required": [ + "trackingRef", + "amount", + "beneficiaryBank" + ], + "properties": { + "trackingRef": { + "type": "string", + "description": "Wire tracking reference that needs to be set in the wire reference to beneficiary field. This field is retrievable through the response during wire creation or via the bank instruction endpoint.", + "example": "CIR13FB13A" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "beneficiaryBank": { + "$ref": "#/components/schemas/MockWirePaymentBeneficiaryBankInstruction" + } + } + }, + "MockWirePaymentResponse": { + "type": "object", + "properties": { + "trackingRef": { + "type": "string", + "description": "Wire tracking reference that needs to be set in the wire reference to beneficiary field. This field is retrievable through the response during wire creation or via the bank instruction endpoint.", + "example": "CIR13FB13A" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "beneficiaryBank": { + "$ref": "#/components/schemas/MockWirePaymentBeneficiaryBankInstruction" + }, + "status": { + "type": "string", + "description": "Enumerated status of the wire payment. Status `pending` indicates that the wire payment is in process; `processed` indicates it finished successfully; `failed` indicates it failed.", + "enum": [ + "pending", + "processed", + "failed" + ] + } + } + }, + "MockSepaPaymentRequest": { + "type": "object", + "required": [ + "trackingRef", + "amount" + ], + "properties": { + "trackingRef": { + "type": "string", + "description": "SEPA tracking reference that needs to be set in the payment details or description.", + "example": "CIR13FB13A" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + } + } + }, + "MockSepaPaymentResponse": { + "type": "object", + "properties": { + "trackingRef": { + "type": "string", + "description": "SEPA tracking reference that needs to be set in the payment details or description.", + "example": "CIR13FB13A" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "status": { + "type": "string", + "description": "Enumerated status of the SEPA payment. Status `pending` indicates that the SEPA payment is in process; `processed` indicates it finished successfully; `failed` indicates it failed.", + "enum": [ + "pending", + "processed", + "failed" + ] + } + } + }, + "SimpleBillingDetails": { + "type": "object", + "description": "Billing details of the card holder.", + "required": [ + "country", + "district" + ], + "properties": { + "country": { + "type": "string", + "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "maxLength": 2, + "example": "US" + }, + "district": { + "type": "string", + "description": "State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision.", + "maxLength": 16, + "example": "MA" + } + } + }, + "CardVerificationResponse": { + "type": "object", + "description": "Indicates the status of the card for verification purposes.", + "required": [ + "avs", + "cvv" + ], + "properties": { + "avs": { + "$ref": "#/components/schemas/AvsResults" + }, + "cvv": { + "$ref": "#/components/schemas/CvvResults" + } + } + }, + "SimpleCard": { + "type": "object", + "required": [ + "id", + "status", + "fingerprint", + "billingDetails", + "expMonth", + "expYear", + "network", + "verification", + "createDate", + "updateDate" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "status": { + "$ref": "#/components/schemas/ExternalFiatAccountStatus" + }, + "billingDetails": { + "$ref": "#/components/schemas/SimpleBillingDetails" + }, + "expMonth": { + "type": "integer", + "description": "Two digit number representing the card's expiration month.", + "example": 1 + }, + "expYear": { + "type": "integer", + "description": "Four digit number representing the card's expiration year.", + "example": 2020 + }, + "network": { + "type": "string", + "description": "The network of the card.", + "enum": [ + "VISA", + "MASTERCARD", + "AMEX", + "UNKNOWN" + ] + }, + "bin": { + "type": "string", + "description": "The bank identification number (BIN), the first 6 digits of the card.", + "example": "401230" + }, + "issuerCountry": { + "type": "string", + "description": "The country code of the issuer bank. Follows the ISO 3166-1 alpha-2 standard.", + "example": "US" + }, + "fingerprint": { + "$ref": "#/components/schemas/Fingerprint" + }, + "verification": { + "$ref": "#/components/schemas/CardVerificationResponse" + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "CardExpMonth": { + "type": "integer", + "description": "Two digit number representing the card's expiration month.", + "minimum": 1, + "maximum": 12, + "example": 1 + }, + "CardExpYear": { + "type": "integer", + "description": "Four digit number representing the card's expiration year.", + "minimum": 1, + "maximum": 9999, + "example": 2020 + }, + "MetadataCardAndAch": { + "type": "object", + "required": [ + "email", + "sessionId", + "ipAddress" + ], + "properties": { + "email": { + "$ref": "#/components/schemas/Email" + }, + "phoneNumber": { + "$ref": "#/components/schemas/PhoneNumber" + }, + "sessionId": { + "$ref": "#/components/schemas/SessionId" + }, + "ipAddress": { + "$ref": "#/components/schemas/IpAddress" + } + } + }, + "CardCreationRequest": { + "type": "object", + "required": [ + "idempotencyKey", + "expMonth", + "expYear", + "encryptedData", + "billingDetails", + "metadata" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "keyId": { + "$ref": "#/components/schemas/IdKey" + }, + "encryptedData": { + "type": "string", + "format": "byte", + "description": "PGP encrypted base64 encoded string. Contains Number and CVV.\n* **Number**: Card number. No spaces or other separators. REQUIRED\n* **CVV (Card Verification Number)**: Three or four digit security code. REQUIRED'\n", + "example": "LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tCgp3Y0JNQTBYV1NGbEZScFZoQVFmL2J2bVVkNG5LZ3dkbExKVTlEdEFEK0p5c0VOTUxuOUlRUWVGWnZJUWEKMGgzQklpRFNRU0RMZmI0NEs2SXZMeTZRbm54bmFLcWx0MjNUSmtPd2hGWFIrdnNSMU5IbnVHN0lUNWJECmZzeVdleXlNK1JLNUVHV0thZ3NmQ2tWamh2NGloY29xUnlTTGtJbWVmRzVaR0tMRkJTTTBsTFNPWFRURQpiMy91eU1zMVJNb3ZiclNvbXkxa3BybzUveWxabWVtV2ZsU1pWQlhNcTc1dGc1YjVSRVIraXM5ckc0cS8KMXl0M0FOYXA3UDhKekFhZVlyTnVNZGhGZFhvK0NFMC9CQnN3L0NIZXdhTDk4SmRVUEV0NjA5WFRHTG9kCjZtamY0YUtMQ01xd0RFMkNVb3dPdE8vMzVIMitnVDZKS3FoMmtjQUQyaXFlb3luNWcralRHaFNyd3NKWgpIdEphQWVZZXpGQUVOaFo3Q01IOGNsdnhZVWNORnJuNXlMRXVGTkwwZkczZy95S3loclhxQ0o3UFo5b3UKMFVxQjkzQURKWDlJZjRBeVQ2bU9MZm9wUytpT2lLall4bG1NLzhlVWc3OGp1OVJ5T1BXelhyTzdLWTNHClFSWm8KPXc1dEYKLS0tLS1FTkQgUEdQIE1FU1NBR0UtLS0tLQo" + }, + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" + }, + "expMonth": { + "$ref": "#/components/schemas/CardExpMonth" + }, + "expYear": { + "$ref": "#/components/schemas/CardExpYear" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataCardAndAch" + } + } + }, + "VerificationErrorCode": { + "type": "string", + "description": "Indicates the failure reason of the card verification. Only present on cards with failed verification. Possible values are [verification_failed, verification_fraud_detected, verification_denied, verification_not_supported_by_issuer, verification_stopped_by_issuer, card_failed, card_invalid, card_address_mismatch, card_zip_mismatch, card_cvv_invalid, card_expired, card_limit_violated, card_not_honored, card_cvv_required, credit_card_not_allowed, card_account_ineligible, card_network_unsupported]'", + "nullable": true, + "enum": [ + "verification_failed", + "verification_fraud_detected", + "verification_denied", + "verification_not_supported_by_issuer", + "verification_stopped_by_issuer", + "card_failed", + "card_invalid", + "card_address_mismatch", + "card_zip_mismatch", + "card_cvv_invalid", + "card_expired", + "card_limit_violated", + "card_not_honored", + "card_cvv_required", + "credit_card_not_allowed", + "card_account_ineligible", + "card_network_unsupported" + ] + }, + "Card": { + "type": "object", + "required": [ + "id", + "status", + "billingDetails", + "expMonth", + "expYear", + "network", + "last4", + "fingerprint", + "verification", + "metadata", + "createDate", + "updateDate" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "status": { + "$ref": "#/components/schemas/ExternalFiatAccountStatus" + }, + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" + }, + "expMonth": { + "$ref": "#/components/schemas/CardExpMonth" + }, + "expYear": { + "$ref": "#/components/schemas/CardExpYear" + }, + "network": { + "type": "string", + "description": "The network of the card.", + "enum": [ + "VISA", + "MASTERCARD", + "AMEX", + "UNKNOWN" + ] + }, + "last4": { + "type": "string", + "description": "The last 4 digits of the card.", + "example": "0123" + }, + "bin": { + "type": "string", + "description": "The bank identification number (BIN), the first 6 digits of the card.", + "example": "401230" + }, + "issuerCountry": { + "type": "string", + "description": "The country code of the issuer bank. Follows the ISO 3166-1 alpha-2 standard.", + "example": "US" + }, + "fundingType": { + "description": "The funding type of the card. Possible values are `credit`, `debit`, `prepaid`, and `unknown`.", + "type": "string", + "enum": [ + "credit", + "debit", + "prepaid", + "unknown" + ] + }, + "fingerprint": { + "$ref": "#/components/schemas/Fingerprint" + }, + "errorCode": { + "$ref": "#/components/schemas/VerificationErrorCode" + }, + "verification": { + "$ref": "#/components/schemas/CardVerificationResponse" + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataPhoneEmail" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "CardUpdate": { + "type": "object", + "required": [ + "keyId", + "encryptedData", + "expMonth", + "expYear" + ], + "properties": { + "keyId": { + "$ref": "#/components/schemas/IdKey" + }, + "encryptedData": { + "type": "string", + "format": "byte", + "description": "PGP encrypted base64 encoded string. Contains CVV.\n* **CVV (Card Verification Number)**: Three or four digit security code. REQUIRED'\n", + "example": "UHVibGljS2V5QmFzZTY0RW5jb2RlZA==" + }, + "expMonth": { + "$ref": "#/components/schemas/CardExpMonth" + }, + "expYear": { + "$ref": "#/components/schemas/CardExpYear" + } + } + }, + "ACHBillingDetails": { + "type": "object", + "description": "Billing details of the account holder.", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Full name of the card or bank account holder.", + "maxLength": 1024, + "example": "Satoshi Nakamoto" + }, + "city": { + "type": "string", + "description": "City portion of the address.", + "maxLength": 1024, + "example": "Boston" + }, + "country": { + "type": "string", + "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "maxLength": 2, + "example": "US" + }, + "line1": { + "type": "string", + "description": "Line one of the street address.", + "maxLength": 1024, + "example": "100 Money Street" + }, + "line2": { + "type": "string", + "description": "Line two of the street address.", + "maxLength": 1024, + "example": "Suite 1" + }, + "district": { + "type": "string", + "description": "State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision.", + "maxLength": 16, + "example": "MA" + }, + "postalCode": { + "type": "string", + "description": "Postal / ZIP code of the address.", + "maxLength": 16, + "example": "01234" + } + } + }, + "ACHCreationRequest": { + "type": "object", + "required": [ + "idempotencyKey", + "plaidProcessorToken", + "billingDetails", + "metadata" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "plaidProcessorToken": { + "type": "string", + "description": "The token for the ACH account provided by the processor (Plaid).", + "example": "processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621" + }, + "billingDetails": { + "$ref": "#/components/schemas/ACHBillingDetails" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataCardAndAch" + } + } + }, + "AccountNumberMasked": { + "type": "string", + "description": "The redacted account number of the ACH account.", + "example": "****6789" + }, + "RoutingNumber": { + "type": "string", + "description": "The routing number of the ACH account.", + "example": "613334455" + }, + "AchVerificationErrorCodes": { + "type": "string", + "description": "Indicates the failure reason of the ACH account. Only present on failed accounts. Possible values are [bank_account_authorization_expired, bank_account_error, bank_account_ineligible, bank_account_not_found, bank_account_unauthorized, unsupported_routing_number, verification_failed].", + "nullable": true, + "enum": [ + "bank_account_authorization_expired", + "bank_account_error", + "bank_account_ineligible", + "bank_account_not_found", + "bank_account_unauthorized", + "unsupported_routing_number", + "verification_failed" + ] + }, + "ACH": { + "type": "object", + "required": [ + "id", + "accountNumber", + "routingNumber", + "description", + "billingDetails", + "bankAddress", + "fingerprint", + "metadata", + "createDate", + "updateDate" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "status": { + "$ref": "#/components/schemas/ExternalFiatAccountStatus" + }, + "accountNumber": { + "$ref": "#/components/schemas/AccountNumberMasked" + }, + "routingNumber": { + "$ref": "#/components/schemas/RoutingNumber" + }, + "billingDetails": { + "$ref": "#/components/schemas/ACHBillingDetails" + }, + "bankAddress": { + "$ref": "#/components/schemas/BankAddress" + }, + "fingerprint": { + "$ref": "#/components/schemas/Fingerprint" + }, + "errorCode": { + "$ref": "#/components/schemas/AchVerificationErrorCodes" + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataPhoneEmail" + } + } + }, + "MockAchAccount": { + "type": "object", + "required": [ + "accountNumber", + "routingNumber", + "description" + ], + "properties": { + "accountNumber": { + "type": "string", + "description": "The account number of the ACH account.", + "example": "123456789" + }, + "routingNumber": { + "type": "string", + "description": "The routing number of the ACH account.\n\nFor sandbox testing, valid routing numbers include `011000028`, `011201762`, `011500120`, `021214862`, `121000248`, `121140399`, `211073473`, `221172610`, and `011000138`.\n", + "example": "011000028" + }, + "description": { + "type": "string", + "description": "A description for the ACH account.", + "example": "My ACH account" + } + } + }, + "MockAchAccountCreationRequest": { + "type": "object", + "required": [ + "account", + "balance" + ], + "properties": { + "account": { + "$ref": "#/components/schemas/MockAchAccount" + }, + "balance": { + "$ref": "#/components/schemas/FiatMoneyUsd" + } + } + }, + "MockAchAccountResponse": { + "type": "object", + "properties": { + "processorToken": { + "type": "string", + "description": "The processor token needs to be provided when linking an ACH account against this mock.", + "example": "processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621" + }, + "balance": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "account": { + "$ref": "#/components/schemas/MockAchAccount" + } + } + }, + "SEPACreationRequest": { + "type": "object", + "required": [ + "idempotencyKey", + "accountName", + "iban", + "billingDetails" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "iban": { + "type": "string", + "description": "International Bank Account Number (IBAN) for the bank account.", + "example": "DE31100400480532013000" + }, + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" + } + } + }, + "SEPA": { + "type": "object", + "required": [ + "id", + "status", + "description", + "trackingRef", + "fingerprint", + "billingDetails", + "createDate", + "updateDate" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "status": { + "$ref": "#/components/schemas/ExternalFiatAccountStatus" + }, + "description": { + "type": "string", + "description": "Bank name plus last four digits of the IBAN.", + "example": "Bank of Ireland ****0010" + }, + "trackingRef": { + "type": "string", + "description": "Tracking reference that needs to be set in the payment details or description.", + "example": "CIR13FB13A" + }, + "fingerprint": { + "$ref": "#/components/schemas/Fingerprint" + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" + }, + "billingDetails": { + "$ref": "#/components/schemas/BillingDetails" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "SEPAInstructionBeneficiary": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the beneficiary.", + "example": "CIRCLE INTERNET FINANCIAL INC" + }, + "address1": { + "type": "string", + "description": "Address line 1 of the beneficiary's address.", + "example": "99 HIGH STREET" + }, + "address2": { + "type": "string", + "description": "Address line 2 of the beneficiary's address.", + "example": "BOSTON MA 02110" + } + } + }, + "SEPAInstructionBeneficiaryBank": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the beneficiary's bank.", + "example": "LHV Bank" + }, + "bic": { + "type": "string", + "description": "BIC code of the beneficiary's bank account.", + "example": "LHVBEE22XXX" + }, + "iban": { + "description": "IBAN of the beneficiary's bank account.", + "type": "string", + "example": "****6789" + }, + "address": { + "description": "Address of the beneficiary's bank.", + "type": "string", + "example": "Tartu mnt 2, 10145 Tallinn" + }, + "city": { + "description": "City of the beneficiary's bank.", + "type": "string", + "example": "Tallinn" + }, + "postalCode": { + "description": "Postal code of the beneficiary's bank.", + "type": "string", + "example": "10017" + }, + "country": { + "description": "Country code of the beneficiary's bank. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", + "type": "string", + "example": "EE" + } + } + }, + "SEPAInstruction": { + "type": "object", + "properties": { + "trackingRef": { + "type": "string", + "description": "Circle tracking reference that needs to be set in the SEPA transfer reference field.", + "example": "CIR13FB13A" + }, + "beneficiary": { + "$ref": "#/components/schemas/SEPAInstructionBeneficiary" + }, + "beneficiaryBank": { + "$ref": "#/components/schemas/SEPAInstructionBeneficiaryBank" + } + } + }, + "Settlement": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" + }, + "walletId": { + "description": "If this settlement was used for a marketplace payment, the wallet involved in the settlement. Not included for standard merchant settlements.", + "type": "string", + "example": "12345" + }, + "totalDebits": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "totalCredits": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "paymentFees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "chargebackFees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "IdPayment": { + "type": "string", + "description": "Unique system generated identifier for the payment that is associated to the chargeback item.", + "format": "uuid", + "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" + }, + "ChargebackCategories": { + "type": "string", + "description": "Enumerated category of the chargeback status codes based on the chargeback status code.", + "enum": [ + "Canceled Recurring Payment", + "Customer Dispute", + "Fraudulent", + "General", + "Processing Error", + "Not Defined" + ] + }, + "IdSettlement": { + "type": "string", + "description": "Unique system generated identifier for the settlement related to the chargeback history.", + "format": "uuid", + "nullable": true, + "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" + }, + "BasicChargebackHistory": { + "type": "object", + "required": [ + "type", + "chargebackAmount", + "description" + ], + "properties": { + "type": { + "type": "string", + "description": "Enumerated type of the chargeback history event. `1st Chargeback` represents the first stage of the dispute procedure initiated by the cardholder’s issuing bank.\n `2nd Chargeback` represents the second stage of the dispute procedure initiated by the cardholder’s issuing bank (This stage is MasterCard only).\n `Chargeback Reversal` represents when 1st Chargeback or 2nd Chargeback is withdrawn by the issuer.\n `Representment` represents the stage when merchants decided to dispute 1st Chargeback or 2nd Chargeback.\n `Chargeback Settlement` can imply one of the two: 1) If merchant or marketplace is taking the lost of the chargeback, money will be debit from the wallet during this stage.\n 2) If merchant of marketplace successfully dispute the chargeback, money will be credit back to the wallet during this stage.\n", + "enum": [ + "1st Chargeback", + "2nd Chargeback", + "Chargeback Reversal", + "Representment", + "Chargeback Settlement" + ] + }, + "chargebackAmount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "fee": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "description": { + "type": "string", + "description": "The reason the chargeback was created.", + "example": "The cardholder claims an unauthorized transaction occurred." + }, + "settlementId": { + "$ref": "#/components/schemas/IdSettlement" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "BasicChargeback": { + "type": "object", + "required": [ + "id", + "paymentId", + "merchantId", + "history", + "reasonCode" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "paymentId": { + "$ref": "#/components/schemas/IdPayment" + }, + "merchantId": { + "$ref": "#/components/schemas/IdMerchant" + }, + "reasonCode": { + "description": "Reason code given by the card network for the chargeback item.", + "type": "string", + "example": "10.4" + }, + "category": { + "$ref": "#/components/schemas/ChargebackCategories" + }, + "history": { + "type": "array", + "description": "The chargeback item's history list will be sorted by create date descending: more recent chargeback statuses will be at the beginning of the list.\n", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/BasicChargebackHistory" + } + } + } + }, + "MockChargebackCreationRequest": { + "type": "object", + "required": [ + "paymentId" + ], + "properties": { + "paymentId": { + "type": "string", + "format": "uuid", + "description": "The id of the payment to be charged back. Each payment can only be charged back once.", + "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" + } + } + }, + "MockChargeback": { + "type": "object", + "properties": {} + }, + "Reversal": { + "type": "object", + "required": [ + "id", + "paymentId", + "amount", + "description", + "status", + "reason", + "fees", + "createDate", + "updateDate" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/IdKey" + }, + "paymentId": { + "$ref": "#/components/schemas/IdPayment" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "description": { + "type": "string", + "description": "Enumerated description of the payment.", + "example": "Merchant Payment Reversal" + }, + "status": { + "$ref": "#/components/schemas/CancelRefundReversalStatus" + }, + "reason": { + "$ref": "#/components/schemas/ReversalReason" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "Payout": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "sourceWalletId": { + "type": "string", + "description": "The identifier of the source wallet used to fund a payout.", + "example": "53535335" + }, + "destination": { + "$ref": "#/components/schemas/BankDestination" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "status": { + "$ref": "#/components/schemas/PayoutStatus" + }, + "trackingRef": { + "description": "A payout tracking reference. Will be present once known.", + "nullable": true, + "example": "CIR-6ESOQANEP3NAO" + }, + "errorCode": { + "$ref": "#/components/schemas/PayoutErrorCode" + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" + }, + "adjustments": { + "description": "Final adjustment which increases (credits) or decreases (debits) the total returned amount to the source wallet.", + "nullable": true, + "type": "object", + "properties": { + "fxCredit": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "fxDebit": { + "$ref": "#/components/schemas/FiatMoneyUsd" + } + } + }, + "return": { + "$ref": "#/components/schemas/UnwithdrawalObject" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + }, + "MetadataPayout": { + "type": "object", + "description": "Additional properties related to the payout beneficiary.", + "required": [ + "beneficiaryEmail" + ], + "properties": { + "beneficiaryEmail": { + "$ref": "#/components/schemas/Email" + } + } + }, + "PayoutCreationRequest": { + "type": "object", + "required": [ + "idempotencyKey", + "destination", + "amount", + "metadata" + ], + "properties": { + "idempotencyKey": { + "$ref": "#/components/schemas/IdempotencyKey" + }, + "source": { + "$ref": "#/components/schemas/WalletLocation" + }, + "destination": { + "$ref": "#/components/schemas/BankDestination" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "metadata": { + "$ref": "#/components/schemas/MetadataPayout" + } + } + }, + "DetailedPayout": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id" + }, + "sourceWalletId": { + "description": "The identifier of the source wallet used to fund a payout.", + "type": "string", + "example": "53535335" + }, + "destination": { + "$ref": "#/components/schemas/BankDestination" + }, + "amount": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "fees": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "status": { + "description": "Status of the payout. Status `pending` indicates that the payout is in process; `complete` indicates it finished successfully; `failed` indicates it failed.", + "type": "string", + "enum": [ + "pending", + "complete", + "failed" + ] + }, + "trackingRef": { + "description": "A payout tracking reference. Will be present once known.", + "nullable": true, + "example": "CIR-6ESOQANEP3NAO" + }, + "externalRef": { + "$ref": "#/components/schemas/ExternalRef" + }, + "errorCode": { + "$ref": "#/components/schemas/PayoutErrorCode" + }, + "riskEvaluation": { + "$ref": "#/components/schemas/RiskEvaluation" + }, + "adjustments": { + "description": "Final adjustment which increases (credits) or decreases (debits) the total returned amount to the source wallet.", + "nullable": true, + "type": "object", + "properties": { + "fxCredit": { + "$ref": "#/components/schemas/FiatMoneyUsd" + }, + "fxDebit": { + "$ref": "#/components/schemas/FiatMoneyUsd" + } + } + }, + "return": { + "$ref": "#/components/schemas/UnwithdrawalObject" + }, + "createDate": { + "$ref": "#/components/schemas/UTCTimestamp" + }, + "updateDate": { + "$ref": "#/components/schemas/UTCTimestamp" + } + } + } + }, + "responses": { + "NotAuthorized": { + "description": "The request has not been applied because it lacks valid authentication credentials.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "NotAuthorized", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "Something went wrong." + } + }, + "example": { + "code": 401, + "message": "Malformed authorization." + } + }, + "examples": { + "response": { + "value": { + "code": 401, + "message": "Malformed authorization." + } + } + } + } + } + }, + "BadRequest": { + "description": "The request cannot be processed due to a client error.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "BadRequest", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "Something went wrong." + } + }, + "example": { + "code": 400, + "message": "Bad request." + } + }, + "examples": { + "response": { + "value": { + "code": 400, + "message": "Bad request." + } + } + } + } + } + }, + "NotFound": { + "description": "The specified resource was not found.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "NotFound", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "Something went wrong." + } + }, + "example": { + "code": 404, + "message": "Not found." + } + }, + "examples": { + "response": { + "value": { + "code": 404, + "message": "Not found." + } + } + } + } + } + }, + "Conflict": { + "description": "The request has not been applied because it comes in conflict with another request (such as re-using an idempotencyKey for a different request).", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Conflict", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "Something went wrong." + } + }, + "example": { + "code": 409, + "message": "Conflicts with another request." + } + }, + "examples": { + "response": { + "value": { + "code": 409, + "message": "Conflicts with another request." + } + } + } + } + } + }, + "LimitExceeded": { + "description": "Limit exceeded. See error message for more details.", + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "LimitExceeded", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "Something went wrong." + } + }, + "example": { + "code": 429, + "message": "Too many requests." + } + }, + "examples": { + "response": { + "value": { + "code": 429, + "message": "Too many requests." + } + } + } + } + } + } + }, + "parameters": { + "destination": { + "name": "destination", + "description": "Universally unique identifier (UUID v4) for the destination bank account. Filters the results to fetch all payouts made to a destination bank account.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "example": "e3d0a838-d732-49d0-bf44-73a668e38973" + } + }, + "From": { + "name": "from", + "description": "Queries items created since the specified date-time (inclusive).", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "example": "2020-04-10T02:13:30.000Z" + } + }, + "To": { + "name": "to", + "description": "Queries items created before the specified date-time (inclusive).", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "example": "2020-04-10T02:13:30.000Z" + } + }, + "PageBefore": { + "name": "pageBefore", + "description": "A collection ID value used for pagination.\n\nIt marks the exclusive end of a page. When provided, the collection resource will return the next `n` items before\nthe id, with `n` being specified by `pageSize`.\n\nThe items will be returned in the natural order of the collection.\n\nThe resource will return the first page if neither `pageAfter` nor `pageBefore` are specified.\n\nSHOULD NOT be used in conjuction with pageAfter.\n", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + "PageAfter": { + "name": "pageAfter", + "description": "A collection ID value used for pagination.\n\nIt marks the exclusive begin of a page. When provided, the collection resource will return the next `n` items after\nthe id, with `n` being specified by `pageSize`.\n\nThe items will be returned in the natural order of the collection.\n\nThe resource will return the first page if neither `pageAfter` nor `pageBefore` are specified.\n\nSHOULD NOT be used in conjuction with pageBefore.\n", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + "PageSize": { + "name": "pageSize", + "description": "Limits the number of items to be returned.\n\nSome collections have a strict upper bound that will disregard this value. In case the specified value is higher\nthan the allowed limit, the collection limit will be used.\n\nIf avoided, the collection will determine the page size itself.\n", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "example": 5 + } + }, + "IdPath": { + "name": "id", + "description": "Universally unique identifier (UUID v4) of a resource.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "b3d9d2d5-4c12-4946-a09d-953e82fae2b0" + } + }, + "WalletId": { + "name": "walletId", + "description": "Identifier for the wallet.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "0123456789" + } + }, + "ReturnIdentities": { + "name": "returnIdentities", + "description": "Specify if you would like to see identities in the response. Restricts maximum returned items to 5. By default returnIdentities is false, resulting in the response not returning `data.source.identities`.", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "example": "true", + "default": false + } + }, + "Source": { + "name": "source", + "description": "Universally unique identifier (UUID v4) for the source. Filters results to fetch only payments made from the provdided source.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "example": "b3d9d2d5-4c12-4946-a09d-953e82fae2b0" + } + }, + "SettlementId": { + "name": "settlementId", + "description": "Queries items with the specified settlement id. Matches any settlement id if unspecified.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "example": "b48c8962-8e9f-40c3-9f1d-d9adde2ffe61" + } + }, + "PaymentSourceType": { + "name": "type", + "description": "Source account type. Filters the results to fetch all payments made from a specified account type. Matches any source type if unspecified.", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "card", + "wire", + "ach", + "sepa" + ] + } + } + }, + "PaymentStatus": { + "name": "status", + "description": "Queries items with the specified status. Matches any status if unspecified.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "pending", + "confirmed", + "paid", + "failed", + "action_required" + ] + } + }, + "PaymentId": { + "name": "paymentId", + "description": "The payment ID associated with the chargeback.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "example": "202ad9ce-974c-49ca-8d34-3afb7d7247ae" + } + } + } + } +} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index 37c56f4..0000000 --- a/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function ping(): void { - console.log("pong"); -} \ No newline at end of file diff --git a/templates/typescript-axios/configuration.mustache b/templates/typescript-axios/configuration.mustache new file mode 100644 index 0000000..b4506c1 --- /dev/null +++ b/templates/typescript-axios/configuration.mustache @@ -0,0 +1,110 @@ +/* tslint:disable */ +/* eslint-disable */ +{{>licenseInfo}} + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +// Edited by Circle, lines 16¬-25 +interface CircleEnvironment { + [env: string]: string; +} + +export const CircleEnvironments: CircleEnvironment = { + production: 'https://account.circle.com', + sandbox: 'https://api-sandbox.circle.com', + development: 'https://localhost:8080', +}; + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + + {{! Edited by Circle, lines 87-93 }} + if (!this.baseOptions) this.baseOptions = {}; + if (!this.baseOptions.headers) this.baseOptions.headers = {}; + this.baseOptions.headers = { + ['User-Agent']: `Circle Node v{{npmVersion}}`, + ['Circle-Version']: '{{{circleApiVersion}}}', + ...this.baseOptions.headers, + } + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/tsconfig.json b/tsconfig.json index bc97a61..3a4e5df 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,8 @@ { + "compileOnSave": true, "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - - "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - "module": "commonjs", /* Specify what module code is generated. */ + "target": "es6", + "module": "commonjs", "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ "outDir": "dist", /* Specify an output folder for all emitted files. */ @@ -11,6 +10,22 @@ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ "strict": true, /* Enable all strict type-checking options. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ - } + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + + "inlineSourceMap": true, + "inlineSources": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + + "preserveConstEnums": true, + "lib": ["es6", "dom"], + "alwaysStrict": true, + "strictNullChecks": true, + "resolveJsonModule": true, + "typeRoots": ["node_modules/@types", "dist/index.d.ts"], + + }, + "exclude": ["test/*.ts","dist"] } From 5f4dbae47082fd2c2890b2e29b308d20e24ad318 Mon Sep 17 00:00:00 2001 From: deepakgummi Date: Sat, 6 Aug 2022 22:05:10 -0500 Subject: [PATCH 2/7] Added missing files --- api.ts | 12880 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ base.ts | 71 + 2 files changed, 12951 insertions(+) create mode 100644 api.ts create mode 100644 base.ts diff --git a/api.ts b/api.ts new file mode 100644 index 0000000..f7b9a27 --- /dev/null +++ b/api.ts @@ -0,0 +1,12880 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Core Functionality + * APIs for managing your account balance. These endpoints are available with all Circle APIs. + * + * The version of the OpenAPI document: ${version} + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * + * @export + * @interface ACH + */ +export interface ACH { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof ACH + */ + 'id': string; + /** + * + * @type {ExternalFiatAccountStatus} + * @memberof ACH + */ + 'status'?: ExternalFiatAccountStatus; + /** + * The redacted account number of the ACH account. + * @type {string} + * @memberof ACH + */ + 'accountNumber': string; + /** + * The routing number of the ACH account. + * @type {string} + * @memberof ACH + */ + 'routingNumber': string; + /** + * + * @type {ACHBillingDetails} + * @memberof ACH + */ + 'billingDetails': ACHBillingDetails; + /** + * + * @type {BankAddress} + * @memberof ACH + */ + 'bankAddress': BankAddress; + /** + * A UUID that uniquely identifies the account number. If the same account is used more than once, each card object will have a different id, but the fingerprint will stay the same. + * @type {string} + * @memberof ACH + */ + 'fingerprint': string; + /** + * + * @type {AchVerificationErrorCodes} + * @memberof ACH + */ + 'errorCode'?: AchVerificationErrorCodes | null; + /** + * + * @type {RiskEvaluation} + * @memberof ACH + */ + 'riskEvaluation'?: RiskEvaluation | null; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof ACH + */ + 'createDate': string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof ACH + */ + 'updateDate': string; + /** + * + * @type {MetadataPhoneEmail} + * @memberof ACH + */ + 'metadata': MetadataPhoneEmail; +} +/** + * Billing details of the account holder. + * @export + * @interface ACHBillingDetails + */ +export interface ACHBillingDetails { + /** + * Full name of the card or bank account holder. + * @type {string} + * @memberof ACHBillingDetails + */ + 'name': string; + /** + * City portion of the address. + * @type {string} + * @memberof ACHBillingDetails + */ + 'city'?: string; + /** + * Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2. + * @type {string} + * @memberof ACHBillingDetails + */ + 'country'?: string; + /** + * Line one of the street address. + * @type {string} + * @memberof ACHBillingDetails + */ + 'line1'?: string; + /** + * Line two of the street address. + * @type {string} + * @memberof ACHBillingDetails + */ + 'line2'?: string; + /** + * State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision. + * @type {string} + * @memberof ACHBillingDetails + */ + 'district'?: string; + /** + * Postal / ZIP code of the address. + * @type {string} + * @memberof ACHBillingDetails + */ + 'postalCode'?: string; +} +/** + * + * @export + * @interface ACHCreationRequest + */ +export interface ACHCreationRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof ACHCreationRequest + */ + 'idempotencyKey': string; + /** + * The token for the ACH account provided by the processor (Plaid). + * @type {string} + * @memberof ACHCreationRequest + */ + 'plaidProcessorToken': string; + /** + * + * @type {ACHBillingDetails} + * @memberof ACHCreationRequest + */ + 'billingDetails': ACHBillingDetails; + /** + * + * @type {MetadataCardAndAch} + * @memberof ACHCreationRequest + */ + 'metadata': MetadataCardAndAch; +} +/** + * + * @export + * @interface AccountConfiguration + */ +export interface AccountConfiguration { + /** + * + * @type {AccountConfigurationPayments} + * @memberof AccountConfiguration + */ + 'payments'?: AccountConfigurationPayments; +} +/** + * + * @export + * @interface AccountConfigurationPayments + */ +export interface AccountConfigurationPayments { + /** + * Unique system generated identifier for the wallet of the merchant. + * @type {string} + * @memberof AccountConfigurationPayments + */ + 'masterWalletId'?: string; +} +/** + * Indicates the failure reason of the ACH account. Only present on failed accounts. Possible values are [bank_account_authorization_expired, bank_account_error, bank_account_ineligible, bank_account_not_found, bank_account_unauthorized, unsupported_routing_number, verification_failed]. + * @export + * @enum {string} + */ + +export const AchVerificationErrorCodes = { + BankAccountAuthorizationExpired: 'bank_account_authorization_expired', + BankAccountError: 'bank_account_error', + BankAccountIneligible: 'bank_account_ineligible', + BankAccountNotFound: 'bank_account_not_found', + BankAccountUnauthorized: 'bank_account_unauthorized', + UnsupportedRoutingNumber: 'unsupported_routing_number', + VerificationFailed: 'verification_failed' +} as const; + +export type AchVerificationErrorCodes = typeof AchVerificationErrorCodes[keyof typeof AchVerificationErrorCodes]; + + +/** + * + * @export + * @interface AddressObject + */ +export interface AddressObject { + /** + * An alphanumeric string representing a blockchain address. Will be in different formats for different chains. It is important to preserve the exact formatting and capitalization of the address. + * @type {string} + * @memberof AddressObject + */ + 'address'?: string; + /** + * The secondary identifier for a blockchain address. An example of this is the memo field on the Stellar network, which can be text, id, or hash format. + * @type {string} + * @memberof AddressObject + */ + 'addressTag'?: string | null; + /** + * + * @type {Currency} + * @memberof AddressObject + */ + 'currency'?: Currency | null; + /** + * + * @type {Chain} + * @memberof AddressObject + */ + 'chain'?: Chain; +} +/** + * + * @export + * @interface BadRequest + */ +export interface BadRequest { + /** + * + * @type {number} + * @memberof BadRequest + */ + 'code': number; + /** + * + * @type {string} + * @memberof BadRequest + */ + 'message': string; +} +/** + * Available and unsettled balances of the merchant. + * @export + * @interface Balances + */ +export interface Balances { + /** + * List of currency balances (one for each currency) that are currently available to spend. + * @type {Array} + * @memberof Balances + */ + 'available': Array; + /** + * List of currency balances (one for each currency) that have been captured but are currently in the process of settling and will become available to spend at some point in the future. + * @type {Array} + * @memberof Balances + */ + 'unsettled': Array; +} +/** + * The address details for the bank, as provided during bank account creation. + * @export + * @interface BankAddress + */ +export interface BankAddress { + /** + * Name of the bank. This property is required for bank accounts outside of the US that do not support IBAN\' + * @type {string} + * @memberof BankAddress + */ + 'bankName'?: string; + /** + * City portion of the address. This property is required for bank accounts outside of the US. + * @type {string} + * @memberof BankAddress + */ + 'city'?: string; + /** + * Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2. + * @type {string} + * @memberof BankAddress + */ + 'country': string; + /** + * Line one of the street address. + * @type {string} + * @memberof BankAddress + */ + 'line1'?: string; + /** + * Line two of the street address. + * @type {string} + * @memberof BankAddress + */ + 'line2'?: string; + /** + * State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision. + * @type {string} + * @memberof BankAddress + */ + 'district'?: string; +} +/** + * The address of the bank. City and country fields are required. + * @export + * @interface BankAddressIbanSupported + */ +export interface BankAddressIbanSupported { + /** + * Name of the bank. This property is required for bank accounts outside of the US that do not support IBAN\' + * @type {string} + * @memberof BankAddressIbanSupported + */ + 'bankName'?: string; + /** + * City portion of the address. This property is required for bank accounts outside of the US. + * @type {string} + * @memberof BankAddressIbanSupported + */ + 'city': string; + /** + * Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2. + * @type {string} + * @memberof BankAddressIbanSupported + */ + 'country': string; + /** + * Line one of the street address. + * @type {string} + * @memberof BankAddressIbanSupported + */ + 'line1'?: string; + /** + * Line two of the street address. + * @type {string} + * @memberof BankAddressIbanSupported + */ + 'line2'?: string; + /** + * State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision. + * @type {string} + * @memberof BankAddressIbanSupported + */ + 'district'?: string; +} +/** + * The address of the bank. BankName, City and Country fields are required. + * @export + * @interface BankAddressNonIban + */ +export interface BankAddressNonIban { + /** + * Name of the bank. This property is required for bank accounts outside of the US that do not support IBAN\' + * @type {string} + * @memberof BankAddressNonIban + */ + 'bankName': string; + /** + * City portion of the address. This property is required for bank accounts outside of the US. + * @type {string} + * @memberof BankAddressNonIban + */ + 'city': string; + /** + * Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2. + * @type {string} + * @memberof BankAddressNonIban + */ + 'country': string; + /** + * Line one of the street address. + * @type {string} + * @memberof BankAddressNonIban + */ + 'line1'?: string; + /** + * Line two of the street address. + * @type {string} + * @memberof BankAddressNonIban + */ + 'line2'?: string; + /** + * State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision. + * @type {string} + * @memberof BankAddressNonIban + */ + 'district'?: string; +} +/** + * The destination bank account. + * @export + * @interface BankDestination + */ +export interface BankDestination { + /** + * + * @type {PayoutDestinationType} + * @memberof BankDestination + */ + 'type': PayoutDestinationType; + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof BankDestination + */ + 'id': string; + /** + * Bank name plus last four digits of the bank account number or IBAN. + * @type {string} + * @memberof BankDestination + */ + 'name'?: string; +} +/** + * Status information of the related cancel. This property is only present on canceled payment or refund items. + * @export + * @interface BasicCancel + */ +export interface BasicCancel { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof BasicCancel + */ + 'id': string; + /** + * Type of the payment object. + * @type {string} + * @memberof BasicCancel + */ + 'type': BasicCancelTypeEnum; + /** + * Unique system generated identifier for the merchant. + * @type {string} + * @memberof BasicCancel + */ + 'merchantId': string; + /** + * Unique system generated identifier for the wallet of the merchant. + * @type {string} + * @memberof BasicCancel + */ + 'merchantWalletId'?: string; + /** + * + * @type {FiatMoneyUsd} + * @memberof BasicCancel + */ + 'amount': FiatMoneyUsd; + /** + * + * @type {SourceResponse} + * @memberof BasicCancel + */ + 'source': SourceResponse; + /** + * Enumerated description of the payment. + * @type {string} + * @memberof BasicCancel + */ + 'description'?: BasicCancelDescriptionEnum; + /** + * + * @type {CancelRefundReversalStatus} + * @memberof BasicCancel + */ + 'status': CancelRefundReversalStatus; + /** + * + * @type {PaymentInfoPaymentAndRefund} + * @memberof BasicCancel + */ + 'originalPayment'?: PaymentInfoPaymentAndRefund; + /** + * + * @type {FiatMoneyUsd} + * @memberof BasicCancel + */ + 'fees'?: FiatMoneyUsd; + /** + * The channel identifier that can be set for the payment. When not provided, the default channel is used. + * @type {string} + * @memberof BasicCancel + */ + 'channel'?: string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof BasicCancel + */ + 'createDate'?: string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof BasicCancel + */ + 'updateDate'?: string; +} + +export const BasicCancelTypeEnum = { + Cancel: 'cancel' +} as const; + +export type BasicCancelTypeEnum = typeof BasicCancelTypeEnum[keyof typeof BasicCancelTypeEnum]; +export const BasicCancelDescriptionEnum = { + Payment: 'Payment' +} as const; + +export type BasicCancelDescriptionEnum = typeof BasicCancelDescriptionEnum[keyof typeof BasicCancelDescriptionEnum]; + +/** + * + * @export + * @interface BasicChargeback + */ +export interface BasicChargeback { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof BasicChargeback + */ + 'id': string; + /** + * Unique system generated identifier for the payment that is associated to the chargeback item. + * @type {string} + * @memberof BasicChargeback + */ + 'paymentId': string; + /** + * Unique system generated identifier for the merchant. + * @type {string} + * @memberof BasicChargeback + */ + 'merchantId': string; + /** + * Reason code given by the card network for the chargeback item. + * @type {string} + * @memberof BasicChargeback + */ + 'reasonCode': string; + /** + * + * @type {ChargebackCategories} + * @memberof BasicChargeback + */ + 'category'?: ChargebackCategories; + /** + * The chargeback item\'s history list will be sorted by create date descending: more recent chargeback statuses will be at the beginning of the list. + * @type {Array} + * @memberof BasicChargeback + */ + 'history': Array; +} +/** + * + * @export + * @interface BasicChargebackHistory + */ +export interface BasicChargebackHistory { + /** + * Enumerated type of the chargeback history event. `1st Chargeback` represents the first stage of the dispute procedure initiated by the cardholder’s issuing bank. `2nd Chargeback` represents the second stage of the dispute procedure initiated by the cardholder’s issuing bank (This stage is MasterCard only). `Chargeback Reversal` represents when 1st Chargeback or 2nd Chargeback is withdrawn by the issuer. `Representment` represents the stage when merchants decided to dispute 1st Chargeback or 2nd Chargeback. `Chargeback Settlement` can imply one of the two: 1) If merchant or marketplace is taking the lost of the chargeback, money will be debit from the wallet during this stage. 2) If merchant of marketplace successfully dispute the chargeback, money will be credit back to the wallet during this stage. + * @type {string} + * @memberof BasicChargebackHistory + */ + 'type': BasicChargebackHistoryTypeEnum; + /** + * + * @type {FiatMoneyUsd} + * @memberof BasicChargebackHistory + */ + 'chargebackAmount': FiatMoneyUsd; + /** + * + * @type {FiatMoneyUsd} + * @memberof BasicChargebackHistory + */ + 'fee'?: FiatMoneyUsd; + /** + * The reason the chargeback was created. + * @type {string} + * @memberof BasicChargebackHistory + */ + 'description': string; + /** + * Unique system generated identifier for the settlement related to the chargeback history. + * @type {string} + * @memberof BasicChargebackHistory + */ + 'settlementId'?: string | null; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof BasicChargebackHistory + */ + 'createDate'?: string; +} + +export const BasicChargebackHistoryTypeEnum = { + _1stChargeback: '1st Chargeback', + _2ndChargeback: '2nd Chargeback', + ChargebackReversal: 'Chargeback Reversal', + Representment: 'Representment', + ChargebackSettlement: 'Chargeback Settlement' +} as const; + +export type BasicChargebackHistoryTypeEnum = typeof BasicChargebackHistoryTypeEnum[keyof typeof BasicChargebackHistoryTypeEnum]; + +/** + * Status information of the related payment. This property is only present on refund or cancel items. + * @export + * @interface BasicPayment + */ +export interface BasicPayment { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof BasicPayment + */ + 'id': string; + /** + * Type of the payment object. + * @type {string} + * @memberof BasicPayment + */ + 'type': BasicPaymentTypeEnum; + /** + * Unique system generated identifier for the merchant. + * @type {string} + * @memberof BasicPayment + */ + 'merchantId': string; + /** + * Unique system generated identifier for the wallet of the merchant. + * @type {string} + * @memberof BasicPayment + */ + 'merchantWalletId'?: string; + /** + * + * @type {FiatMoneyUsd} + * @memberof BasicPayment + */ + 'amount': FiatMoneyUsd; + /** + * + * @type {SourceResponse} + * @memberof BasicPayment + */ + 'source': SourceResponse; + /** + * Enumerated description of the payment. + * @type {string} + * @memberof BasicPayment + */ + 'description'?: BasicPaymentDescriptionEnum; + /** + * + * @type {PaymentStatus} + * @memberof BasicPayment + */ + 'status': PaymentStatus; + /** + * Determines if a payment has successfully been captured. This property is only present for payments that did not use auto capture. + * @type {boolean} + * @memberof BasicPayment + */ + 'captured'?: boolean; + /** + * + * @type {FiatMoneyUsd} + * @memberof BasicPayment + */ + 'captureAmount'?: FiatMoneyUsd; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof BasicPayment + */ + 'captureDate'?: string; + /** + * + * @type {RequiredAction} + * @memberof BasicPayment + */ + 'requiredAction'?: RequiredAction; + /** + * + * @type {PaymentInfoCancel} + * @memberof BasicPayment + */ + 'cancel'?: PaymentInfoCancel | null; + /** + * + * @type {Array} + * @memberof BasicPayment + */ + 'refunds'?: Array; + /** + * + * @type {FiatMoneyUsd} + * @memberof BasicPayment + */ + 'fees'?: FiatMoneyUsd; + /** + * The channel identifier that can be set for the payment. When not provided, the default channel is used. + * @type {string} + * @memberof BasicPayment + */ + 'channel'?: string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof BasicPayment + */ + 'createDate'?: string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof BasicPayment + */ + 'updateDate'?: string; +} + +export const BasicPaymentTypeEnum = { + Payment: 'payment' +} as const; + +export type BasicPaymentTypeEnum = typeof BasicPaymentTypeEnum[keyof typeof BasicPaymentTypeEnum]; +export const BasicPaymentDescriptionEnum = { + Payment: 'Payment' +} as const; + +export type BasicPaymentDescriptionEnum = typeof BasicPaymentDescriptionEnum[keyof typeof BasicPaymentDescriptionEnum]; + +/** + * + * @export + * @interface BasicRefund + */ +export interface BasicRefund { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof BasicRefund + */ + 'id': string; + /** + * Type of the payment object. + * @type {string} + * @memberof BasicRefund + */ + 'type': BasicRefundTypeEnum; + /** + * Unique system generated identifier for the merchant. + * @type {string} + * @memberof BasicRefund + */ + 'merchantId': string; + /** + * Unique system generated identifier for the wallet of the merchant. + * @type {string} + * @memberof BasicRefund + */ + 'merchantWalletId'?: string; + /** + * + * @type {FiatMoneyUsd} + * @memberof BasicRefund + */ + 'amount': FiatMoneyUsd; + /** + * + * @type {SourceResponse} + * @memberof BasicRefund + */ + 'source': SourceResponse; + /** + * Enumerated description of the payment. + * @type {string} + * @memberof BasicRefund + */ + 'description'?: BasicRefundDescriptionEnum; + /** + * + * @type {CancelRefundReversalStatus} + * @memberof BasicRefund + */ + 'status': CancelRefundReversalStatus; + /** + * + * @type {PaymentInfoPaymentAndRefund} + * @memberof BasicRefund + */ + 'originalPayment'?: PaymentInfoPaymentAndRefund; + /** + * + * @type {PaymentInfoCancel} + * @memberof BasicRefund + */ + 'cancel'?: PaymentInfoCancel | null; + /** + * + * @type {FiatMoneyUsd} + * @memberof BasicRefund + */ + 'fees'?: FiatMoneyUsd; + /** + * The channel identifier that can be set for the payment. When not provided, the default channel is used. + * @type {string} + * @memberof BasicRefund + */ + 'channel'?: string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof BasicRefund + */ + 'createDate'?: string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof BasicRefund + */ + 'updateDate'?: string; +} + +export const BasicRefundTypeEnum = { + Refund: 'refund' +} as const; + +export type BasicRefundTypeEnum = typeof BasicRefundTypeEnum[keyof typeof BasicRefundTypeEnum]; +export const BasicRefundDescriptionEnum = { + Payment: 'Payment' +} as const; + +export type BasicRefundDescriptionEnum = typeof BasicRefundDescriptionEnum[keyof typeof BasicRefundDescriptionEnum]; + +/** + * + * @export + * @interface BillingDetails + */ +export interface BillingDetails { + /** + * Full name of the card or bank account holder. + * @type {string} + * @memberof BillingDetails + */ + 'name': string; + /** + * City portion of the address. + * @type {string} + * @memberof BillingDetails + */ + 'city': string; + /** + * Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2. + * @type {string} + * @memberof BillingDetails + */ + 'country': string; + /** + * Line one of the street address. + * @type {string} + * @memberof BillingDetails + */ + 'line1': string; + /** + * Line two of the street address. + * @type {string} + * @memberof BillingDetails + */ + 'line2'?: string; + /** + * State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision. + * @type {string} + * @memberof BillingDetails + */ + 'district'?: string; + /** + * Postal / ZIP code of the address. + * @type {string} + * @memberof BillingDetails + */ + 'postalCode': string; +} +/** + * A deposit + * @export + * @interface BusinessAccountDeposit + */ +export interface BusinessAccountDeposit { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof BusinessAccountDeposit + */ + 'id': string; + /** + * The identifier for the bank account where the funds were deposited from. + * @type {string} + * @memberof BusinessAccountDeposit + */ + 'sourceWalletId'?: string; + /** + * + * @type {WalletLocation} + * @memberof BusinessAccountDeposit + */ + 'destination': WalletLocation; + /** + * + * @type {FiatMoney} + * @memberof BusinessAccountDeposit + */ + 'amount': FiatMoney; + /** + * + * @type {FiatMoneyUsd} + * @memberof BusinessAccountDeposit + */ + 'fee'?: FiatMoneyUsd; + /** + * Status of the deposit. Status `pending` indicates that the deposit is in the process of running; `complete` indicates it finished successfully; `failed` indicates it failed. + * @type {string} + * @memberof BusinessAccountDeposit + */ + 'status': BusinessAccountDepositStatusEnum; + /** + * + * @type {RiskEvaluation} + * @memberof BusinessAccountDeposit + */ + 'riskEvaluation'?: RiskEvaluation | null; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof BusinessAccountDeposit + */ + 'createDate': string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof BusinessAccountDeposit + */ + 'updateDate'?: string; +} + +export const BusinessAccountDepositStatusEnum = { + Pending: 'pending', + Complete: 'complete', + Failed: 'failed' +} as const; + +export type BusinessAccountDepositStatusEnum = typeof BusinessAccountDepositStatusEnum[keyof typeof BusinessAccountDepositStatusEnum]; + +/** + * The destination bank account. + * @export + * @interface BusinessAccountDestinationRequest + */ +export interface BusinessAccountDestinationRequest { + /** + * + * @type {string} + * @memberof BusinessAccountDestinationRequest + */ + 'type': BusinessAccountDestinationRequestTypeEnum; + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof BusinessAccountDestinationRequest + */ + 'id': string; +} + +export const BusinessAccountDestinationRequestTypeEnum = { + Wire: 'wire', + Sen: 'sen' +} as const; + +export type BusinessAccountDestinationRequestTypeEnum = typeof BusinessAccountDestinationRequestTypeEnum[keyof typeof BusinessAccountDestinationRequestTypeEnum]; + +/** + * + * @export + * @interface BusinessAccountGenerateAddressRequest + */ +export interface BusinessAccountGenerateAddressRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof BusinessAccountGenerateAddressRequest + */ + 'idempotencyKey': string; + /** + * + * @type {Currency} + * @memberof BusinessAccountGenerateAddressRequest + */ + 'currency': Currency | null; + /** + * + * @type {Chain} + * @memberof BusinessAccountGenerateAddressRequest + */ + 'chain': Chain; +} +/** + * + * @export + * @interface BusinessAccountPayoutCreationRequest + */ +export interface BusinessAccountPayoutCreationRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof BusinessAccountPayoutCreationRequest + */ + 'idempotencyKey': string; + /** + * + * @type {BusinessAccountDestinationRequest} + * @memberof BusinessAccountPayoutCreationRequest + */ + 'destination': BusinessAccountDestinationRequest; + /** + * + * @type {FiatMoney} + * @memberof BusinessAccountPayoutCreationRequest + */ + 'amount': FiatMoney; +} +/** + * Adds a recipient address. The currency parameter will default to USD for all chains except for BTC where it defaults to BTC. + * @export + * @interface BusinessAccountRecipientAddressCreationRequest + */ +export interface BusinessAccountRecipientAddressCreationRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof BusinessAccountRecipientAddressCreationRequest + */ + 'idempotencyKey': string; + /** + * An alphanumeric string representing a blockchain address. Will be in different formats for different chains. It is important to preserve the exact formatting and capitalization of the address. + * @type {string} + * @memberof BusinessAccountRecipientAddressCreationRequest + */ + 'address': string; + /** + * The secondary identifier for a blockchain address. An example of this is the memo field on the Stellar network, which can be text, id, or hash format. + * @type {string} + * @memberof BusinessAccountRecipientAddressCreationRequest + */ + 'addressTag'?: string | null; + /** + * + * @type {Chain} + * @memberof BusinessAccountRecipientAddressCreationRequest + */ + 'chain': Chain; + /** + * + * @type {Currency} + * @memberof BusinessAccountRecipientAddressCreationRequest + */ + 'currency'?: Currency | null; + /** + * An identifier or sentence that describes the recipient. + * @type {string} + * @memberof BusinessAccountRecipientAddressCreationRequest + */ + 'description': string; +} +/** + * + * @export + * @interface BusinessAccountRecipientAddressObject + */ +export interface BusinessAccountRecipientAddressObject { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof BusinessAccountRecipientAddressObject + */ + 'id'?: string; + /** + * An alphanumeric string representing a blockchain address. Will be in different formats for different chains. It is important to preserve the exact formatting and capitalization of the address. + * @type {string} + * @memberof BusinessAccountRecipientAddressObject + */ + 'address'?: string; + /** + * The secondary identifier for a blockchain address. An example of this is the memo field on the Stellar network, which can be text, id, or hash format. + * @type {string} + * @memberof BusinessAccountRecipientAddressObject + */ + 'addressTag'?: string | null; + /** + * + * @type {Chain} + * @memberof BusinessAccountRecipientAddressObject + */ + 'chain'?: Chain; + /** + * + * @type {Currency} + * @memberof BusinessAccountRecipientAddressObject + */ + 'currency'?: Currency | null; + /** + * An identifier or sentence that describes the recipient. + * @type {string} + * @memberof BusinessAccountRecipientAddressObject + */ + 'description'?: string; +} +/** + * + * @export + * @interface BusinessAccountTransferCreationRequest + */ +export interface BusinessAccountTransferCreationRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof BusinessAccountTransferCreationRequest + */ + 'idempotencyKey': string; + /** + * + * @type {TransferRequestVerifiedBlockchainLocation} + * @memberof BusinessAccountTransferCreationRequest + */ + 'destination': TransferRequestVerifiedBlockchainLocation; + /** + * + * @type {Money} + * @memberof BusinessAccountTransferCreationRequest + */ + 'amount': Money; +} +/** + * + * @export + * @interface CancelCreationRequest + */ +export interface CancelCreationRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof CancelCreationRequest + */ + 'idempotencyKey': string; + /** + * + * @type {ReversalReason} + * @memberof CancelCreationRequest + */ + 'reason'?: ReversalReason; +} +/** + * + * @export + * @interface CancelPaymentResponse + */ +export interface CancelPaymentResponse { + /** + * + * @type {DetailedCancel} + * @memberof CancelPaymentResponse + */ + 'data'?: DetailedCancel; +} +/** + * Enumerated status of the payment. `pending` means the payment is waiting to be processed. `confirmed` means the payment has been approved by the bank and the merchant can treat it as successful, but settlement funds are not yet available to the merchant. `paid` means settlement funds have been received and are available to the merchant. `failed` means something went wrong (most commonly that the payment was denied). Terminal states are `paid` and `failed`. + * @export + * @enum {string} + */ + +export const CancelRefundReversalStatus = { + Pending: 'pending', + Confirmed: 'confirmed', + Paid: 'paid', + Failed: 'failed' +} as const; + +export type CancelRefundReversalStatus = typeof CancelRefundReversalStatus[keyof typeof CancelRefundReversalStatus]; + + +/** + * + * @export + * @interface CaptureCreationRequest + */ +export interface CaptureCreationRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof CaptureCreationRequest + */ + 'idempotencyKey': string; + /** + * + * @type {FiatMoneyUsd} + * @memberof CaptureCreationRequest + */ + 'amount'?: FiatMoneyUsd; +} +/** + * + * @export + * @interface Card + */ +export interface Card { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof Card + */ + 'id': string; + /** + * + * @type {ExternalFiatAccountStatus} + * @memberof Card + */ + 'status': ExternalFiatAccountStatus; + /** + * + * @type {BillingDetails} + * @memberof Card + */ + 'billingDetails': BillingDetails; + /** + * Two digit number representing the card\'s expiration month. + * @type {number} + * @memberof Card + */ + 'expMonth': number; + /** + * Four digit number representing the card\'s expiration year. + * @type {number} + * @memberof Card + */ + 'expYear': number; + /** + * The network of the card. + * @type {string} + * @memberof Card + */ + 'network': CardNetworkEnum; + /** + * The last 4 digits of the card. + * @type {string} + * @memberof Card + */ + 'last4': string; + /** + * The bank identification number (BIN), the first 6 digits of the card. + * @type {string} + * @memberof Card + */ + 'bin'?: string; + /** + * The country code of the issuer bank. Follows the ISO 3166-1 alpha-2 standard. + * @type {string} + * @memberof Card + */ + 'issuerCountry'?: string; + /** + * The funding type of the card. Possible values are `credit`, `debit`, `prepaid`, and `unknown`. + * @type {string} + * @memberof Card + */ + 'fundingType'?: CardFundingTypeEnum; + /** + * A UUID that uniquely identifies the account number. If the same account is used more than once, each card object will have a different id, but the fingerprint will stay the same. + * @type {string} + * @memberof Card + */ + 'fingerprint': string; + /** + * + * @type {VerificationErrorCode} + * @memberof Card + */ + 'errorCode'?: VerificationErrorCode | null; + /** + * + * @type {CardVerificationResponse} + * @memberof Card + */ + 'verification': CardVerificationResponse; + /** + * + * @type {RiskEvaluation} + * @memberof Card + */ + 'riskEvaluation'?: RiskEvaluation | null; + /** + * + * @type {MetadataPhoneEmail} + * @memberof Card + */ + 'metadata': MetadataPhoneEmail; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof Card + */ + 'createDate': string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof Card + */ + 'updateDate': string; +} + +export const CardNetworkEnum = { + Visa: 'VISA', + Mastercard: 'MASTERCARD', + Amex: 'AMEX', + Unknown: 'UNKNOWN' +} as const; + +export type CardNetworkEnum = typeof CardNetworkEnum[keyof typeof CardNetworkEnum]; +export const CardFundingTypeEnum = { + Credit: 'credit', + Debit: 'debit', + Prepaid: 'prepaid', + Unknown: 'unknown' +} as const; + +export type CardFundingTypeEnum = typeof CardFundingTypeEnum[keyof typeof CardFundingTypeEnum]; + +/** + * + * @export + * @interface CardCreationRequest + */ +export interface CardCreationRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof CardCreationRequest + */ + 'idempotencyKey': string; + /** + * Universally unique identifier (UUID v4) of the public key used in encryption. NOTE the sandbox environment uses the default value of `key1`. For this reason the example supplied is `key1` rather than a UUID. + * @type {string} + * @memberof CardCreationRequest + */ + 'keyId'?: string; + /** + * PGP encrypted base64 encoded string. Contains Number and CVV. * **Number**: Card number. No spaces or other separators. REQUIRED * **CVV (Card Verification Number)**: Three or four digit security code. REQUIRED\' + * @type {string} + * @memberof CardCreationRequest + */ + 'encryptedData': string; + /** + * + * @type {BillingDetails} + * @memberof CardCreationRequest + */ + 'billingDetails': BillingDetails; + /** + * Two digit number representing the card\'s expiration month. + * @type {number} + * @memberof CardCreationRequest + */ + 'expMonth': number; + /** + * Four digit number representing the card\'s expiration year. + * @type {number} + * @memberof CardCreationRequest + */ + 'expYear': number; + /** + * + * @type {MetadataCardAndAch} + * @memberof CardCreationRequest + */ + 'metadata': MetadataCardAndAch; +} +/** + * + * @export + * @interface CardUpdate + */ +export interface CardUpdate { + /** + * Universally unique identifier (UUID v4) of the public key used in encryption. NOTE the sandbox environment uses the default value of `key1`. For this reason the example supplied is `key1` rather than a UUID. + * @type {string} + * @memberof CardUpdate + */ + 'keyId': string; + /** + * PGP encrypted base64 encoded string. Contains CVV. * **CVV (Card Verification Number)**: Three or four digit security code. REQUIRED\' + * @type {string} + * @memberof CardUpdate + */ + 'encryptedData': string; + /** + * Two digit number representing the card\'s expiration month. + * @type {number} + * @memberof CardUpdate + */ + 'expMonth': number; + /** + * Four digit number representing the card\'s expiration year. + * @type {number} + * @memberof CardUpdate + */ + 'expYear': number; +} +/** + * Indicates the status of the card for verification purposes. + * @export + * @interface CardVerificationResponse + */ +export interface CardVerificationResponse { + /** + * Status of the AVS check. Raw AVS response, expressed as an upper-case letter. `not_requested` indicates check was not made. `pending` is pending/processing. + * @type {string} + * @memberof CardVerificationResponse + */ + 'avs': string; + /** + * + * @type {CvvResults} + * @memberof CardVerificationResponse + */ + 'cvv': CvvResults; +} +/** + * A blockchain that a given currency is available on. + * @export + * @enum {string} + */ + +export const Chain = { + Algo: 'ALGO', + Avax: 'AVAX', + Btc: 'BTC', + Eth: 'ETH', + Flow: 'FLOW', + Hbar: 'HBAR', + Matic: 'MATIC', + Sol: 'SOL', + Trx: 'TRX', + Xlm: 'XLM' +} as const; + +export type Chain = typeof Chain[keyof typeof Chain]; + + +/** + * + * @export + * @interface ChannelResponse + */ +export interface ChannelResponse { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof ChannelResponse + */ + 'id'?: string; + /** + * Flag to indicate whether the channel is configured as default. At most one of the channels will have this flag set to true and the default channel is used when a payment request does not have the `channel` property set. + * @type {boolean} + * @memberof ChannelResponse + */ + 'default'?: boolean; + /** + * Descriptor that appears on cardholders\' bank statements for card payments submitted through this channel. + * @type {string} + * @memberof ChannelResponse + */ + 'cardDescriptor'?: string; + /** + * Descriptor that appears on end-users\' bank statements for ACH payments submitted through this channel. + * @type {string} + * @memberof ChannelResponse + */ + 'achDescriptor'?: string; +} +/** + * Enumerated category of the chargeback status codes based on the chargeback status code. + * @export + * @enum {string} + */ + +export const ChargebackCategories = { + CanceledRecurringPayment: 'Canceled Recurring Payment', + CustomerDispute: 'Customer Dispute', + Fraudulent: 'Fraudulent', + General: 'General', + ProcessingError: 'Processing Error', + NotDefined: 'Not Defined' +} as const; + +export type ChargebackCategories = typeof ChargebackCategories[keyof typeof ChargebackCategories]; + + +/** + * + * @export + * @interface Conflict + */ +export interface Conflict { + /** + * + * @type {number} + * @memberof Conflict + */ + 'code': number; + /** + * + * @type {string} + * @memberof Conflict + */ + 'message': string; +} +/** + * + * @export + * @interface CreateACHBankAccountResponse + */ +export interface CreateACHBankAccountResponse { + /** + * + * @type {ACH} + * @memberof CreateACHBankAccountResponse + */ + 'data'?: ACH; +} +/** + * + * @export + * @interface CreateAchAccountResponse + */ +export interface CreateAchAccountResponse { + /** + * + * @type {MockAchAccountResponse} + * @memberof CreateAchAccountResponse + */ + 'data'?: MockAchAccountResponse; +} +/** + * + * @export + * @interface CreateBusinessAccountPayoutResponse + */ +export interface CreateBusinessAccountPayoutResponse { + /** + * + * @type {PayoutBusinessAccount} + * @memberof CreateBusinessAccountPayoutResponse + */ + 'data'?: PayoutBusinessAccount; +} +/** + * + * @export + * @interface CreateBusinessAccountRecipientAddressResponse + */ +export interface CreateBusinessAccountRecipientAddressResponse { + /** + * + * @type {BusinessAccountRecipientAddressObject} + * @memberof CreateBusinessAccountRecipientAddressResponse + */ + 'data'?: BusinessAccountRecipientAddressObject; +} +/** + * + * @export + * @interface CreateBusinessAccountSenBankAccountResponse + */ +export interface CreateBusinessAccountSenBankAccountResponse { + /** + * + * @type {SenFiatAccountResponse} + * @memberof CreateBusinessAccountSenBankAccountResponse + */ + 'data'?: SenFiatAccountResponse; +} +/** + * + * @export + * @interface CreateBusinessAccountSignetBankAccountResponse + */ +export interface CreateBusinessAccountSignetBankAccountResponse { + /** + * + * @type {SignetFiatAccountResponse} + * @memberof CreateBusinessAccountSignetBankAccountResponse + */ + 'data'?: SignetFiatAccountResponse; +} +/** + * + * @export + * @interface CreateBusinessAccountTransferResponse + */ +export interface CreateBusinessAccountTransferResponse { + /** + * + * @type {Transfer} + * @memberof CreateBusinessAccountTransferResponse + */ + 'data'?: Transfer; +} +/** + * + * @export + * @interface CreateBusinessAccountWireBankAccountResponse + */ +export interface CreateBusinessAccountWireBankAccountResponse { + /** + * + * @type {Wire} + * @memberof CreateBusinessAccountWireBankAccountResponse + */ + 'data'?: Wire; +} +/** + * + * @export + * @interface CreateCardResponse + */ +export interface CreateCardResponse { + /** + * + * @type {Card} + * @memberof CreateCardResponse + */ + 'data'?: Card; +} +/** + * + * @export + * @interface CreateMockChargebackResponse + */ +export interface CreateMockChargebackResponse { + /** + * + * @type {object} + * @memberof CreateMockChargebackResponse + */ + 'data'?: object; +} +/** + * + * @export + * @interface CreatePaymentResponse + */ +export interface CreatePaymentResponse { + /** + * + * @type {DetailedPayment} + * @memberof CreatePaymentResponse + */ + 'data'?: DetailedPayment; +} +/** + * + * @export + * @interface CreatePayoutResponse + */ +export interface CreatePayoutResponse { + /** + * + * @type {Payout} + * @memberof CreatePayoutResponse + */ + 'data'?: Payout; +} +/** + * + * @export + * @interface CreateSEPABankAccountResponse + */ +export interface CreateSEPABankAccountResponse { + /** + * + * @type {SEPA} + * @memberof CreateSEPABankAccountResponse + */ + 'data'?: SEPA; +} +/** + * + * @export + * @interface CreateSenPaymentResponse + */ +export interface CreateSenPaymentResponse { + /** + * + * @type {MockSenPaymentResponse} + * @memberof CreateSenPaymentResponse + */ + 'data'?: MockSenPaymentResponse; +} +/** + * + * @export + * @interface CreateSepaPaymentResponse + */ +export interface CreateSepaPaymentResponse { + /** + * + * @type {MockSepaPaymentResponse} + * @memberof CreateSepaPaymentResponse + */ + 'data'?: MockSepaPaymentResponse; +} +/** + * + * @export + * @interface CreateTransferResponse + */ +export interface CreateTransferResponse { + /** + * + * @type {Transfer} + * @memberof CreateTransferResponse + */ + 'data'?: Transfer; +} +/** + * + * @export + * @interface CreateWalletResponse + */ +export interface CreateWalletResponse { + /** + * + * @type {Wallet} + * @memberof CreateWalletResponse + */ + 'data'?: Wallet; +} +/** + * + * @export + * @interface CreateWireBankAccountResponse + */ +export interface CreateWireBankAccountResponse { + /** + * + * @type {Wire} + * @memberof CreateWireBankAccountResponse + */ + 'data'?: Wire; +} +/** + * + * @export + * @interface CreateWirePaymentResponse + */ +export interface CreateWirePaymentResponse { + /** + * + * @type {MockWirePaymentResponse} + * @memberof CreateWirePaymentResponse + */ + 'data'?: MockWirePaymentResponse; +} +/** + * A currency associated with a balance or address. + * @export + * @enum {string} + */ + +export const Currency = { + Usd: 'USD', + Eur: 'EUR', + Btc: 'BTC', + Eth: 'ETH' +} as const; + +export type Currency = typeof Currency[keyof typeof Currency]; + + +/** + * Enumerated status of the check. `not_requested` indicates check was not made. `pass` indicates value is correct. `fail` indicates value is incorrect. `unavailable` indicates card issuer did not do the provided check. `pending` indicates check is pending/processing. + * @export + * @enum {string} + */ + +export const CvvResults = { + NotRequested: 'not_requested', + Pass: 'pass', + Fail: 'fail', + Unavailable: 'unavailable', + Pending: 'pending' +} as const; + +export type CvvResults = typeof CvvResults[keyof typeof CvvResults]; + + +/** + * + * @export + * @interface DeleteUnsubscribeResponse + */ +export interface DeleteUnsubscribeResponse { + /** + * Unsubscribe response object. No fields as of now. + * @type {object} + * @memberof DeleteUnsubscribeResponse + */ + 'data'?: object; +} +/** + * + * @export + * @interface DetailedCancel + */ +export interface DetailedCancel { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof DetailedCancel + */ + 'id': string; + /** + * Type of the payment object. + * @type {string} + * @memberof DetailedCancel + */ + 'type': DetailedCancelTypeEnum; + /** + * Unique system generated identifier for the merchant. + * @type {string} + * @memberof DetailedCancel + */ + 'merchantId': string; + /** + * Unique system generated identifier for the wallet of the merchant. + * @type {string} + * @memberof DetailedCancel + */ + 'merchantWalletId'?: string; + /** + * + * @type {FiatMoneyUsd} + * @memberof DetailedCancel + */ + 'amount': FiatMoneyUsd; + /** + * + * @type {SourceResponse} + * @memberof DetailedCancel + */ + 'source': SourceResponse; + /** + * Enumerated description of the payment. + * @type {string} + * @memberof DetailedCancel + */ + 'description'?: DetailedCancelDescriptionEnum; + /** + * + * @type {CancelRefundReversalStatus} + * @memberof DetailedCancel + */ + 'status': CancelRefundReversalStatus; + /** + * + * @type {BasicPayment} + * @memberof DetailedCancel + */ + 'originalPayment'?: BasicPayment; + /** + * + * @type {FiatMoneyUsd} + * @memberof DetailedCancel + */ + 'fees'?: FiatMoneyUsd; + /** + * Payment tracking reference. Will be present once known. + * @type {string} + * @memberof DetailedCancel + */ + 'trackingRef'?: string | null; + /** + * + * @type {PaymentErrorCode} + * @memberof DetailedCancel + */ + 'errorCode'?: PaymentErrorCode | null; + /** + * + * @type {MetadataPhoneEmail} + * @memberof DetailedCancel + */ + 'metadata'?: MetadataPhoneEmail; + /** + * + * @type {RiskEvaluation} + * @memberof DetailedCancel + */ + 'riskEvaluation'?: RiskEvaluation | null; + /** + * If the cancel was made after a cutoff time period, it will be processed as a refund. This flag indicates that the cancel was processed as a refund\' + * @type {boolean} + * @memberof DetailedCancel + */ + 'refund'?: boolean; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof DetailedCancel + */ + 'createDate'?: string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof DetailedCancel + */ + 'updateDate'?: string; +} + +export const DetailedCancelTypeEnum = { + Cancel: 'cancel' +} as const; + +export type DetailedCancelTypeEnum = typeof DetailedCancelTypeEnum[keyof typeof DetailedCancelTypeEnum]; +export const DetailedCancelDescriptionEnum = { + Payment: 'Payment' +} as const; + +export type DetailedCancelDescriptionEnum = typeof DetailedCancelDescriptionEnum[keyof typeof DetailedCancelDescriptionEnum]; + +/** + * + * @export + * @interface DetailedPayment + */ +export interface DetailedPayment { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof DetailedPayment + */ + 'id': string; + /** + * Type of the payment object. + * @type {string} + * @memberof DetailedPayment + */ + 'type': DetailedPaymentTypeEnum; + /** + * Unique system generated identifier for the merchant. + * @type {string} + * @memberof DetailedPayment + */ + 'merchantId': string; + /** + * Unique system generated identifier for the wallet of the merchant. + * @type {string} + * @memberof DetailedPayment + */ + 'merchantWalletId'?: string; + /** + * + * @type {FiatMoneyUsd} + * @memberof DetailedPayment + */ + 'amount': FiatMoneyUsd; + /** + * + * @type {SourceResponse} + * @memberof DetailedPayment + */ + 'source': SourceResponse; + /** + * Enumerated description of the payment. + * @type {string} + * @memberof DetailedPayment + */ + 'description'?: DetailedPaymentDescriptionEnum; + /** + * + * @type {PaymentStatus} + * @memberof DetailedPayment + */ + 'status': PaymentStatus; + /** + * Determines if a payment has successfully been captured. This property is only present for payments that did not use auto capture. + * @type {boolean} + * @memberof DetailedPayment + */ + 'captured'?: boolean; + /** + * + * @type {FiatMoneyUsd} + * @memberof DetailedPayment + */ + 'captureAmount'?: FiatMoneyUsd; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof DetailedPayment + */ + 'captureDate'?: string; + /** + * + * @type {RequiredAction} + * @memberof DetailedPayment + */ + 'requiredAction'?: RequiredAction; + /** + * + * @type {PaymentVerificationResponse} + * @memberof DetailedPayment + */ + 'verification'?: PaymentVerificationResponse; + /** + * + * @type {BasicCancel} + * @memberof DetailedPayment + */ + 'cancel'?: BasicCancel | null; + /** + * + * @type {Array} + * @memberof DetailedPayment + */ + 'refunds'?: Array; + /** + * + * @type {FiatMoneyUsd} + * @memberof DetailedPayment + */ + 'fees'?: FiatMoneyUsd; + /** + * Payment tracking reference. Will be present once known. + * @type {string} + * @memberof DetailedPayment + */ + 'trackingRef'?: string | null; + /** + * + * @type {PaymentErrorCode} + * @memberof DetailedPayment + */ + 'errorCode'?: PaymentErrorCode | null; + /** + * + * @type {MetadataPhoneEmail} + * @memberof DetailedPayment + */ + 'metadata'?: MetadataPhoneEmail; + /** + * + * @type {RiskEvaluation} + * @memberof DetailedPayment + */ + 'riskEvaluation'?: RiskEvaluation | null; + /** + * The channel identifier that can be set for the payment. When not provided, the default channel is used. + * @type {string} + * @memberof DetailedPayment + */ + 'channel'?: string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof DetailedPayment + */ + 'createDate'?: string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof DetailedPayment + */ + 'updateDate'?: string; +} + +export const DetailedPaymentTypeEnum = { + Payment: 'payment' +} as const; + +export type DetailedPaymentTypeEnum = typeof DetailedPaymentTypeEnum[keyof typeof DetailedPaymentTypeEnum]; +export const DetailedPaymentDescriptionEnum = { + Payment: 'Payment' +} as const; + +export type DetailedPaymentDescriptionEnum = typeof DetailedPaymentDescriptionEnum[keyof typeof DetailedPaymentDescriptionEnum]; + +/** + * + * @export + * @interface DetailedPaymentPolymorphic + */ +export interface DetailedPaymentPolymorphic { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof DetailedPaymentPolymorphic + */ + 'id': string; + /** + * Type of the payment object. + * @type {string} + * @memberof DetailedPaymentPolymorphic + */ + 'type': DetailedPaymentPolymorphicTypeEnum; + /** + * Unique system generated identifier for the merchant. + * @type {string} + * @memberof DetailedPaymentPolymorphic + */ + 'merchantId': string; + /** + * Unique system generated identifier for the wallet of the merchant. + * @type {string} + * @memberof DetailedPaymentPolymorphic + */ + 'merchantWalletId'?: string; + /** + * + * @type {FiatMoneyUsd} + * @memberof DetailedPaymentPolymorphic + */ + 'amount': FiatMoneyUsd; + /** + * + * @type {SourceResponse} + * @memberof DetailedPaymentPolymorphic + */ + 'source': SourceResponse; + /** + * Enumerated description of the payment. + * @type {string} + * @memberof DetailedPaymentPolymorphic + */ + 'description'?: DetailedPaymentPolymorphicDescriptionEnum; + /** + * + * @type {PaymentStatus} + * @memberof DetailedPaymentPolymorphic + */ + 'status': PaymentStatus; + /** + * + * @type {RequiredAction} + * @memberof DetailedPaymentPolymorphic + */ + 'requiredAction'?: RequiredAction; + /** + * + * @type {PaymentVerificationResponse} + * @memberof DetailedPaymentPolymorphic + */ + 'verification'?: PaymentVerificationResponse; + /** + * + * @type {BasicPayment} + * @memberof DetailedPaymentPolymorphic + */ + 'originalPayment'?: BasicPayment; + /** + * + * @type {BasicCancel} + * @memberof DetailedPaymentPolymorphic + */ + 'cancel'?: BasicCancel | null; + /** + * + * @type {Array} + * @memberof DetailedPaymentPolymorphic + */ + 'refunds'?: Array | null; + /** + * + * @type {FiatMoneyUsd} + * @memberof DetailedPaymentPolymorphic + */ + 'fees'?: FiatMoneyUsd; + /** + * Payment tracking reference. Will be present once known. + * @type {string} + * @memberof DetailedPaymentPolymorphic + */ + 'trackingRef'?: string | null; + /** + * External network identifier which will be present once provided from the applicable network. Examples: * **Input/Output Message Accountability Data (IMAD/OMAD)**: unique number given to each FedWire payment when using the Federal Reserve Bank Service which can be used to investigate and track wire transfers. + * @type {string} + * @memberof DetailedPaymentPolymorphic + */ + 'externalRef'?: string; + /** + * + * @type {PaymentErrorCode} + * @memberof DetailedPaymentPolymorphic + */ + 'errorCode'?: PaymentErrorCode | null; + /** + * + * @type {MetadataPhoneEmail} + * @memberof DetailedPaymentPolymorphic + */ + 'metadata'?: MetadataPhoneEmail; + /** + * The channel identifier that can be set for the payment. When not provided, the default channel is used. + * @type {string} + * @memberof DetailedPaymentPolymorphic + */ + 'channel'?: string; + /** + * + * @type {RiskEvaluation} + * @memberof DetailedPaymentPolymorphic + */ + 'riskEvaluation'?: RiskEvaluation | null; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof DetailedPaymentPolymorphic + */ + 'createDate'?: string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof DetailedPaymentPolymorphic + */ + 'updateDate'?: string; +} + +export const DetailedPaymentPolymorphicTypeEnum = { + Payment: 'payment', + Refund: 'refund', + Cancel: 'cancel' +} as const; + +export type DetailedPaymentPolymorphicTypeEnum = typeof DetailedPaymentPolymorphicTypeEnum[keyof typeof DetailedPaymentPolymorphicTypeEnum]; +export const DetailedPaymentPolymorphicDescriptionEnum = { + Payment: 'Payment' +} as const; + +export type DetailedPaymentPolymorphicDescriptionEnum = typeof DetailedPaymentPolymorphicDescriptionEnum[keyof typeof DetailedPaymentPolymorphicDescriptionEnum]; + +/** + * + * @export + * @interface DetailedPayout + */ +export interface DetailedPayout { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof DetailedPayout + */ + 'id'?: string; + /** + * The identifier of the source wallet used to fund a payout. + * @type {string} + * @memberof DetailedPayout + */ + 'sourceWalletId'?: string; + /** + * + * @type {BankDestination} + * @memberof DetailedPayout + */ + 'destination'?: BankDestination; + /** + * + * @type {FiatMoneyUsd} + * @memberof DetailedPayout + */ + 'amount'?: FiatMoneyUsd; + /** + * + * @type {FiatMoneyUsd} + * @memberof DetailedPayout + */ + 'fees'?: FiatMoneyUsd; + /** + * Status of the payout. Status `pending` indicates that the payout is in process; `complete` indicates it finished successfully; `failed` indicates it failed. + * @type {string} + * @memberof DetailedPayout + */ + 'status'?: DetailedPayoutStatusEnum; + /** + * A payout tracking reference. Will be present once known. + * @type {any} + * @memberof DetailedPayout + */ + 'trackingRef'?: any | null; + /** + * External network identifier which will be present once provided from the applicable network. Examples: * **Input/Output Message Accountability Data (IMAD/OMAD)**: unique number given to each FedWire payment when using the Federal Reserve Bank Service which can be used to investigate and track wire transfers. + * @type {string} + * @memberof DetailedPayout + */ + 'externalRef'?: string; + /** + * + * @type {PayoutErrorCode} + * @memberof DetailedPayout + */ + 'errorCode'?: PayoutErrorCode | null; + /** + * + * @type {RiskEvaluation} + * @memberof DetailedPayout + */ + 'riskEvaluation'?: RiskEvaluation | null; + /** + * + * @type {PayoutBusinessAccountAdjustments} + * @memberof DetailedPayout + */ + 'adjustments'?: PayoutBusinessAccountAdjustments | null; + /** + * + * @type {UnwithdrawalObject} + * @memberof DetailedPayout + */ + 'return'?: UnwithdrawalObject | null; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof DetailedPayout + */ + 'createDate'?: string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof DetailedPayout + */ + 'updateDate'?: string; +} + +export const DetailedPayoutStatusEnum = { + Pending: 'pending', + Complete: 'complete', + Failed: 'failed' +} as const; + +export type DetailedPayoutStatusEnum = typeof DetailedPayoutStatusEnum[keyof typeof DetailedPayoutStatusEnum]; + +/** + * + * @export + * @interface DetailedRefund + */ +export interface DetailedRefund { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof DetailedRefund + */ + 'id': string; + /** + * Type of the payment object. + * @type {string} + * @memberof DetailedRefund + */ + 'type': DetailedRefundTypeEnum; + /** + * Unique system generated identifier for the merchant. + * @type {string} + * @memberof DetailedRefund + */ + 'merchantId': string; + /** + * Unique system generated identifier for the wallet of the merchant. + * @type {string} + * @memberof DetailedRefund + */ + 'merchantWalletId'?: string; + /** + * + * @type {FiatMoneyUsd} + * @memberof DetailedRefund + */ + 'amount': FiatMoneyUsd; + /** + * + * @type {SourceResponse} + * @memberof DetailedRefund + */ + 'source': SourceResponse; + /** + * Enumerated description of the payment. + * @type {string} + * @memberof DetailedRefund + */ + 'description'?: DetailedRefundDescriptionEnum; + /** + * + * @type {CancelRefundReversalStatus} + * @memberof DetailedRefund + */ + 'status': CancelRefundReversalStatus; + /** + * + * @type {BasicPayment} + * @memberof DetailedRefund + */ + 'originalPayment'?: BasicPayment; + /** + * + * @type {BasicCancel} + * @memberof DetailedRefund + */ + 'cancel'?: BasicCancel | null; + /** + * + * @type {FiatMoneyUsd} + * @memberof DetailedRefund + */ + 'fees'?: FiatMoneyUsd; + /** + * Payment tracking reference. Will be present once known. + * @type {string} + * @memberof DetailedRefund + */ + 'trackingRef'?: string | null; + /** + * + * @type {PaymentErrorCode} + * @memberof DetailedRefund + */ + 'errorCode'?: PaymentErrorCode | null; + /** + * + * @type {MetadataPhoneEmail} + * @memberof DetailedRefund + */ + 'metadata'?: MetadataPhoneEmail; + /** + * + * @type {RiskEvaluation} + * @memberof DetailedRefund + */ + 'riskEvaluation'?: RiskEvaluation | null; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof DetailedRefund + */ + 'createDate'?: string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof DetailedRefund + */ + 'updateDate'?: string; +} + +export const DetailedRefundTypeEnum = { + Refund: 'refund' +} as const; + +export type DetailedRefundTypeEnum = typeof DetailedRefundTypeEnum[keyof typeof DetailedRefundTypeEnum]; +export const DetailedRefundDescriptionEnum = { + Payment: 'Payment' +} as const; + +export type DetailedRefundDescriptionEnum = typeof DetailedRefundDescriptionEnum[keyof typeof DetailedRefundDescriptionEnum]; + +/** + * ECI (electronic commerce indicator) value returned by Directory Servers (namely Visa, MasterCard, JCB, and American Express) indicating the outcome of authentication attempted on transactions enforced by 3DS. + * @export + * @enum {string} + */ + +export const Eci = { + _00: '00', + _01: '01', + _02: '02', + _05: '05', + _06: '06', + _07: '07' +} as const; + +export type Eci = typeof Eci[keyof typeof Eci]; + + +/** + * Status of the account. A `pending` status indicates that the linking is in-progress; `complete` indicates the account was linked successfully; `failed` indicates it failed. + * @export + * @enum {string} + */ + +export const ExternalFiatAccountStatus = { + Pending: 'pending', + Complete: 'complete', + Failed: 'failed' +} as const; + +export type ExternalFiatAccountStatus = typeof ExternalFiatAccountStatus[keyof typeof ExternalFiatAccountStatus]; + + +/** + * + * @export + * @interface FiatMoney + */ +export interface FiatMoney { + /** + * Magnitude of the amount, in units of the currency, with a `.`. + * @type {string} + * @memberof FiatMoney + */ + 'amount': string; + /** + * Currency code. + * @type {string} + * @memberof FiatMoney + */ + 'currency': FiatMoneyCurrencyEnum; +} + +export const FiatMoneyCurrencyEnum = { + Usd: 'USD', + Eur: 'EUR' +} as const; + +export type FiatMoneyCurrencyEnum = typeof FiatMoneyCurrencyEnum[keyof typeof FiatMoneyCurrencyEnum]; + +/** + * + * @export + * @interface FiatMoneyUsd + */ +export interface FiatMoneyUsd { + /** + * Magnitude of the amount, in units of the currency, with a `.`. + * @type {string} + * @memberof FiatMoneyUsd + */ + 'amount': string; + /** + * Currency code. + * @type {string} + * @memberof FiatMoneyUsd + */ + 'currency': FiatMoneyUsdCurrencyEnum; +} + +export const FiatMoneyUsdCurrencyEnum = { + Usd: 'USD' +} as const; + +export type FiatMoneyUsdCurrencyEnum = typeof FiatMoneyUsdCurrencyEnum[keyof typeof FiatMoneyUsdCurrencyEnum]; + +/** + * + * @export + * @interface GenerateAddressRequest + */ +export interface GenerateAddressRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof GenerateAddressRequest + */ + 'idempotencyKey': string; + /** + * + * @type {Currency} + * @memberof GenerateAddressRequest + */ + 'currency': Currency | null; + /** + * + * @type {Chain} + * @memberof GenerateAddressRequest + */ + 'chain': Chain; +} +/** + * + * @export + * @interface GenerateAddressResponse + */ +export interface GenerateAddressResponse { + /** + * + * @type {AddressObject} + * @memberof GenerateAddressResponse + */ + 'data'?: AddressObject; +} +/** + * + * @export + * @interface GenerateBusinessAccountDepositAddressResponse + */ +export interface GenerateBusinessAccountDepositAddressResponse { + /** + * + * @type {AddressObject} + * @memberof GenerateBusinessAccountDepositAddressResponse + */ + 'data'?: AddressObject; +} +/** + * + * @export + * @interface GetACHBankAccountResponse + */ +export interface GetACHBankAccountResponse { + /** + * + * @type {ACH} + * @memberof GetACHBankAccountResponse + */ + 'data'?: ACH; +} +/** + * + * @export + * @interface GetAddressesResponse + */ +export interface GetAddressesResponse { + /** + * + * @type {Array} + * @memberof GetAddressesResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetBalancesResponse + */ +export interface GetBalancesResponse { + /** + * + * @type {Balances} + * @memberof GetBalancesResponse + */ + 'data'?: Balances; +} +/** + * + * @export + * @interface GetBusinessAccountBalancesResponse + */ +export interface GetBusinessAccountBalancesResponse { + /** + * + * @type {Balances} + * @memberof GetBusinessAccountBalancesResponse + */ + 'data'?: Balances; +} +/** + * + * @export + * @interface GetBusinessAccountDepositAddressesResponse + */ +export interface GetBusinessAccountDepositAddressesResponse { + /** + * + * @type {Array} + * @memberof GetBusinessAccountDepositAddressesResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetBusinessAccountPayoutResponse + */ +export interface GetBusinessAccountPayoutResponse { + /** + * + * @type {PayoutBusinessAccount} + * @memberof GetBusinessAccountPayoutResponse + */ + 'data'?: PayoutBusinessAccount; +} +/** + * + * @export + * @interface GetBusinessAccountPayoutsResponse + */ +export interface GetBusinessAccountPayoutsResponse { + /** + * + * @type {Array} + * @memberof GetBusinessAccountPayoutsResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetBusinessAccountRecipientAddressesResponse + */ +export interface GetBusinessAccountRecipientAddressesResponse { + /** + * + * @type {Array} + * @memberof GetBusinessAccountRecipientAddressesResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetBusinessAccountSenBankAccountResponse + */ +export interface GetBusinessAccountSenBankAccountResponse { + /** + * + * @type {SenFiatAccountResponse} + * @memberof GetBusinessAccountSenBankAccountResponse + */ + 'data'?: SenFiatAccountResponse; +} +/** + * + * @export + * @interface GetBusinessAccountSenBankAccounts200Response + */ +export interface GetBusinessAccountSenBankAccounts200Response { + /** + * + * @type {Array} + * @memberof GetBusinessAccountSenBankAccounts200Response + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetBusinessAccountSenInstructionsBankAccountResponse + */ +export interface GetBusinessAccountSenInstructionsBankAccountResponse { + /** + * + * @type {SenInstruction} + * @memberof GetBusinessAccountSenInstructionsBankAccountResponse + */ + 'data'?: SenInstruction; +} +/** + * + * @export + * @interface GetBusinessAccountSignetBankAccountResponse + */ +export interface GetBusinessAccountSignetBankAccountResponse { + /** + * + * @type {SignetFiatAccountResponse} + * @memberof GetBusinessAccountSignetBankAccountResponse + */ + 'data'?: SignetFiatAccountResponse; +} +/** + * + * @export + * @interface GetBusinessAccountSignetBankAccountsResponse + */ +export interface GetBusinessAccountSignetBankAccountsResponse { + /** + * + * @type {Array} + * @memberof GetBusinessAccountSignetBankAccountsResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetBusinessAccountSignetInstructionsBankAccountResponse + */ +export interface GetBusinessAccountSignetInstructionsBankAccountResponse { + /** + * + * @type {SignetInstruction} + * @memberof GetBusinessAccountSignetInstructionsBankAccountResponse + */ + 'data'?: SignetInstruction; +} +/** + * + * @export + * @interface GetBusinessAccountTransferResponse + */ +export interface GetBusinessAccountTransferResponse { + /** + * + * @type {Transfer} + * @memberof GetBusinessAccountTransferResponse + */ + 'data'?: Transfer; +} +/** + * + * @export + * @interface GetBusinessAccountWireBankAccountResponse + */ +export interface GetBusinessAccountWireBankAccountResponse { + /** + * + * @type {Wire} + * @memberof GetBusinessAccountWireBankAccountResponse + */ + 'data'?: Wire; +} +/** + * + * @export + * @interface GetBusinessAccountWireBankAccounts200Response + */ +export interface GetBusinessAccountWireBankAccounts200Response { + /** + * + * @type {Array} + * @memberof GetBusinessAccountWireBankAccounts200Response + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetBusinessAccountWireInstructionsBankAccountResponse + */ +export interface GetBusinessAccountWireInstructionsBankAccountResponse { + /** + * + * @type {WireInstruction} + * @memberof GetBusinessAccountWireInstructionsBankAccountResponse + */ + 'data'?: WireInstruction; +} +/** + * + * @export + * @interface GetCardResponse + */ +export interface GetCardResponse { + /** + * + * @type {Card} + * @memberof GetCardResponse + */ + 'data'?: Card; +} +/** + * + * @export + * @interface GetCardsResponse + */ +export interface GetCardsResponse { + /** + * + * @type {Array} + * @memberof GetCardsResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetChargebackResponse + */ +export interface GetChargebackResponse { + /** + * + * @type {BasicChargeback} + * @memberof GetChargebackResponse + */ + 'data'?: BasicChargeback; +} +/** + * + * @export + * @interface GetChargebacksResponse + */ +export interface GetChargebacksResponse { + /** + * + * @type {Array} + * @memberof GetChargebacksResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetConfigResponse + */ +export interface GetConfigResponse { + /** + * + * @type {AccountConfiguration} + * @memberof GetConfigResponse + */ + 'data'?: AccountConfiguration; +} +/** + * + * @export + * @interface GetListSubscriptionsResponse + */ +export interface GetListSubscriptionsResponse { + /** + * + * @type {Array} + * @memberof GetListSubscriptionsResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetPaymentResponse + */ +export interface GetPaymentResponse { + /** + * + * @type {DetailedPaymentPolymorphic} + * @memberof GetPaymentResponse + */ + 'data'?: DetailedPaymentPolymorphic; +} +/** + * + * @export + * @interface GetPaymentsResponse + */ +export interface GetPaymentsResponse { + /** + * + * @type {Array} + * @memberof GetPaymentsResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetPayoutResponse + */ +export interface GetPayoutResponse { + /** + * + * @type {DetailedPayout} + * @memberof GetPayoutResponse + */ + 'data'?: DetailedPayout; +} +/** + * + * @export + * @interface GetPayoutsResponse + */ +export interface GetPayoutsResponse { + /** + * + * @type {Array} + * @memberof GetPayoutsResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetPublicKeyResponse + */ +export interface GetPublicKeyResponse { + /** + * + * @type {PublicKey} + * @memberof GetPublicKeyResponse + */ + 'data'?: PublicKey; +} +/** + * + * @export + * @interface GetReturnsResponse + */ +export interface GetReturnsResponse { + /** + * + * @type {Array} + * @memberof GetReturnsResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetReversalsResponse + */ +export interface GetReversalsResponse { + /** + * + * @type {Array} + * @memberof GetReversalsResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetSEPABankAccountResponse + */ +export interface GetSEPABankAccountResponse { + /** + * + * @type {SEPA} + * @memberof GetSEPABankAccountResponse + */ + 'data'?: SEPA; +} +/** + * + * @export + * @interface GetSEPAInstructionsBankAccountResponse + */ +export interface GetSEPAInstructionsBankAccountResponse { + /** + * + * @type {SEPAInstruction} + * @memberof GetSEPAInstructionsBankAccountResponse + */ + 'data'?: SEPAInstruction; +} +/** + * + * @export + * @interface GetSettlementResponse + */ +export interface GetSettlementResponse { + /** + * + * @type {Settlement} + * @memberof GetSettlementResponse + */ + 'data'?: Settlement; +} +/** + * + * @export + * @interface GetSettlementsResponse + */ +export interface GetSettlementsResponse { + /** + * + * @type {Array} + * @memberof GetSettlementsResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetStablecoinsResponse + */ +export interface GetStablecoinsResponse { + /** + * A list of stablecoin objects containing its name, symbol, total amount, and per-chain amount. + * @type {Array} + * @memberof GetStablecoinsResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetTransferResponse + */ +export interface GetTransferResponse { + /** + * + * @type {TransferDetailedTransfer} + * @memberof GetTransferResponse + */ + 'data'?: TransferDetailedTransfer; +} +/** + * + * @export + * @interface GetWalletResponse + */ +export interface GetWalletResponse { + /** + * + * @type {Wallet} + * @memberof GetWalletResponse + */ + 'data'?: Wallet; +} +/** + * + * @export + * @interface GetWalletsResponse + */ +export interface GetWalletsResponse { + /** + * + * @type {Array} + * @memberof GetWalletsResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface GetWireBankAccountResponse + */ +export interface GetWireBankAccountResponse { + /** + * + * @type {Wire} + * @memberof GetWireBankAccountResponse + */ + 'data'?: Wire; +} +/** + * + * @export + * @interface GetWireInstructionsBankAccountResponse + */ +export interface GetWireInstructionsBankAccountResponse { + /** + * + * @type {WireInstruction} + * @memberof GetWireInstructionsBankAccountResponse + */ + 'data'?: WireInstruction; +} +/** + * The identity of the originator. Identities are required when: * `destination.type: \"blockchain\"` * `destination.chain: \"ETH\"` * `amount.amount` >= $3,000 in value + * @export + * @interface Identity + */ +export interface Identity { + /** + * The type of identity for the originator. * `individual` - A uniquely distinguishable individual. * `business` - Any entity other than a natural person that can establish a permanent customer relationship with an affected entity or otherwise own property. This can include companies, foundations, anstalt, partnerships, associations and other relevantly similar entities. + * @type {string} + * @memberof Identity + */ + 'type': IdentityTypeEnum; + /** + * Full name of the identity. + * @type {string} + * @memberof Identity + */ + 'name': string; + /** + * + * @type {Array} + * @memberof Identity + */ + 'addresses': Array; +} + +export const IdentityTypeEnum = { + Individual: 'individual', + Business: 'business' +} as const; + +export type IdentityTypeEnum = typeof IdentityTypeEnum[keyof typeof IdentityTypeEnum]; + +/** + * + * @export + * @interface IdentityAddress + */ +export interface IdentityAddress { + /** + * Line one of the street address. + * @type {string} + * @memberof IdentityAddress + */ + 'line1': string; + /** + * Line two of the street address. + * @type {string} + * @memberof IdentityAddress + */ + 'line2'?: string; + /** + * City portion of the address. + * @type {string} + * @memberof IdentityAddress + */ + 'city': string; + /** + * State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision. + * @type {string} + * @memberof IdentityAddress + */ + 'district': string; + /** + * Postal / ZIP code of the address. + * @type {string} + * @memberof IdentityAddress + */ + 'postalCode': string; + /** + * Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2. + * @type {string} + * @memberof IdentityAddress + */ + 'country': string; +} +/** + * + * @export + * @interface LimitExceeded + */ +export interface LimitExceeded { + /** + * + * @type {number} + * @memberof LimitExceeded + */ + 'code': number; + /** + * + * @type {string} + * @memberof LimitExceeded + */ + 'message': string; +} +/** + * + * @export + * @interface ListChannelsResponse + */ +export interface ListChannelsResponse { + /** + * + * @type {Array} + * @memberof ListChannelsResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface MetadataCardAndAch + */ +export interface MetadataCardAndAch { + /** + * Email of the user. + * @type {string} + * @memberof MetadataCardAndAch + */ + 'email': string; + /** + * Phone number of the user in E.164 format. We recommend using a library such as [libphonenumber](https://github.com/google/libphonenumber) to parse and validate phone numbers. + * @type {string} + * @memberof MetadataCardAndAch + */ + 'phoneNumber'?: string; + /** + * Hash of the session identifier; typically of the end user. This helps us make risk decisions and prevent fraud. IMPORTANT: Please hash the session identifier to prevent sending us actual session identifiers. + * @type {string} + * @memberof MetadataCardAndAch + */ + 'sessionId': string; + /** + * Single IPv4 or IPv6 address of user\' + * @type {string} + * @memberof MetadataCardAndAch + */ + 'ipAddress': string; +} +/** + * + * @export + * @interface MetadataPayment + */ +export interface MetadataPayment { + /** + * Email of the user. + * @type {string} + * @memberof MetadataPayment + */ + 'email': string; + /** + * Phone number of the user in E.164 format. We recommend using a library such as [libphonenumber](https://github.com/google/libphonenumber) to parse and validate phone numbers. + * @type {string} + * @memberof MetadataPayment + */ + 'phoneNumber'?: string; + /** + * Hash of the session identifier; typically of the end user. This helps us make risk decisions and prevent fraud. IMPORTANT: Please hash the session identifier to prevent sending us actual session identifiers. + * @type {string} + * @memberof MetadataPayment + */ + 'sessionId': string; + /** + * Single IPv4 or IPv6 address of user\' + * @type {string} + * @memberof MetadataPayment + */ + 'ipAddress': string; +} +/** + * Additional properties related to the payout beneficiary. + * @export + * @interface MetadataPayout + */ +export interface MetadataPayout { + /** + * Email of the user. + * @type {string} + * @memberof MetadataPayout + */ + 'beneficiaryEmail': string; +} +/** + * + * @export + * @interface MetadataPhoneEmail + */ +export interface MetadataPhoneEmail { + /** + * Email of the user. + * @type {string} + * @memberof MetadataPhoneEmail + */ + 'email': string; + /** + * Phone number of the user in E.164 format. We recommend using a library such as [libphonenumber](https://github.com/google/libphonenumber) to parse and validate phone numbers. + * @type {string} + * @memberof MetadataPhoneEmail + */ + 'phoneNumber'?: string; +} +/** + * + * @export + * @interface MockAchAccount + */ +export interface MockAchAccount { + /** + * The account number of the ACH account. + * @type {string} + * @memberof MockAchAccount + */ + 'accountNumber': string; + /** + * The routing number of the ACH account. For sandbox testing, valid routing numbers include `011000028`, `011201762`, `011500120`, `021214862`, `121000248`, `121140399`, `211073473`, `221172610`, and `011000138`. + * @type {string} + * @memberof MockAchAccount + */ + 'routingNumber': string; + /** + * A description for the ACH account. + * @type {string} + * @memberof MockAchAccount + */ + 'description': string; +} +/** + * + * @export + * @interface MockAchAccountCreationRequest + */ +export interface MockAchAccountCreationRequest { + /** + * + * @type {MockAchAccount} + * @memberof MockAchAccountCreationRequest + */ + 'account': MockAchAccount; + /** + * + * @type {FiatMoneyUsd} + * @memberof MockAchAccountCreationRequest + */ + 'balance': FiatMoneyUsd; +} +/** + * + * @export + * @interface MockAchAccountResponse + */ +export interface MockAchAccountResponse { + /** + * The processor token needs to be provided when linking an ACH account against this mock. + * @type {string} + * @memberof MockAchAccountResponse + */ + 'processorToken'?: string; + /** + * + * @type {FiatMoneyUsd} + * @memberof MockAchAccountResponse + */ + 'balance'?: FiatMoneyUsd; + /** + * + * @type {MockAchAccount} + * @memberof MockAchAccountResponse + */ + 'account'?: MockAchAccount; +} +/** + * + * @export + * @interface MockChargebackCreationRequest + */ +export interface MockChargebackCreationRequest { + /** + * The id of the payment to be charged back. Each payment can only be charged back once. + * @type {string} + * @memberof MockChargebackCreationRequest + */ + 'paymentId': string; +} +/** + * + * @export + * @interface MockSenPaymentBeneficiaryBankInstruction + */ +export interface MockSenPaymentBeneficiaryBankInstruction { + /** + * Circle corporate Silvergate SEN account number that needs to be set as destination. + * @type {string} + * @memberof MockSenPaymentBeneficiaryBankInstruction + */ + 'accountNumber': string; +} +/** + * + * @export + * @interface MockSenPaymentRequest + */ +export interface MockSenPaymentRequest { + /** + * Circle tracking reference that needs to be set in the memo filed. This field is retrievable through the response during SEN account creation or via the bank instruction endpoint. + * @type {string} + * @memberof MockSenPaymentRequest + */ + 'trackingRef': string; + /** + * + * @type {FiatMoney} + * @memberof MockSenPaymentRequest + */ + 'amount': FiatMoney; + /** + * + * @type {MockSenPaymentBeneficiaryBankInstruction} + * @memberof MockSenPaymentRequest + */ + 'beneficiaryBank': MockSenPaymentBeneficiaryBankInstruction; +} +/** + * + * @export + * @interface MockSenPaymentResponse + */ +export interface MockSenPaymentResponse { + /** + * Wire tracking reference that needs to be set in the wire reference to beneficiary field. This field is retrievable through the response during wire creation or via the bank instruction endpoint. + * @type {string} + * @memberof MockSenPaymentResponse + */ + 'trackingRef'?: string; + /** + * + * @type {FiatMoneyUsd} + * @memberof MockSenPaymentResponse + */ + 'amount'?: FiatMoneyUsd; + /** + * + * @type {MockSenPaymentBeneficiaryBankInstruction} + * @memberof MockSenPaymentResponse + */ + 'beneficiaryBank'?: MockSenPaymentBeneficiaryBankInstruction; + /** + * Enumerated status of the wire payment. Status `pending` indicates that the wire payment is in process; `processed` indicates it finished successfully; `failed` indicates it failed. + * @type {string} + * @memberof MockSenPaymentResponse + */ + 'status'?: MockSenPaymentResponseStatusEnum; +} + +export const MockSenPaymentResponseStatusEnum = { + Pending: 'pending', + Processed: 'processed', + Failed: 'failed' +} as const; + +export type MockSenPaymentResponseStatusEnum = typeof MockSenPaymentResponseStatusEnum[keyof typeof MockSenPaymentResponseStatusEnum]; + +/** + * + * @export + * @interface MockSepaPaymentRequest + */ +export interface MockSepaPaymentRequest { + /** + * SEPA tracking reference that needs to be set in the payment details or description. + * @type {string} + * @memberof MockSepaPaymentRequest + */ + 'trackingRef': string; + /** + * + * @type {FiatMoneyUsd} + * @memberof MockSepaPaymentRequest + */ + 'amount': FiatMoneyUsd; +} +/** + * + * @export + * @interface MockSepaPaymentResponse + */ +export interface MockSepaPaymentResponse { + /** + * SEPA tracking reference that needs to be set in the payment details or description. + * @type {string} + * @memberof MockSepaPaymentResponse + */ + 'trackingRef'?: string; + /** + * + * @type {FiatMoneyUsd} + * @memberof MockSepaPaymentResponse + */ + 'amount'?: FiatMoneyUsd; + /** + * Enumerated status of the SEPA payment. Status `pending` indicates that the SEPA payment is in process; `processed` indicates it finished successfully; `failed` indicates it failed. + * @type {string} + * @memberof MockSepaPaymentResponse + */ + 'status'?: MockSepaPaymentResponseStatusEnum; +} + +export const MockSepaPaymentResponseStatusEnum = { + Pending: 'pending', + Processed: 'processed', + Failed: 'failed' +} as const; + +export type MockSepaPaymentResponseStatusEnum = typeof MockSepaPaymentResponseStatusEnum[keyof typeof MockSepaPaymentResponseStatusEnum]; + +/** + * + * @export + * @interface MockWirePaymentBeneficiaryBankInstruction + */ +export interface MockWirePaymentBeneficiaryBankInstruction { + /** + * Virtual account number or Circle corporate Silvergate Wire account number that needs to be set as destination. + * @type {string} + * @memberof MockWirePaymentBeneficiaryBankInstruction + */ + 'accountNumber': string; +} +/** + * + * @export + * @interface MockWirePaymentRequest + */ +export interface MockWirePaymentRequest { + /** + * Wire tracking reference that needs to be set in the wire reference to beneficiary field. This field is retrievable through the response during wire creation or via the bank instruction endpoint. + * @type {string} + * @memberof MockWirePaymentRequest + */ + 'trackingRef': string; + /** + * + * @type {FiatMoneyUsd} + * @memberof MockWirePaymentRequest + */ + 'amount': FiatMoneyUsd; + /** + * + * @type {MockWirePaymentBeneficiaryBankInstruction} + * @memberof MockWirePaymentRequest + */ + 'beneficiaryBank': MockWirePaymentBeneficiaryBankInstruction; +} +/** + * + * @export + * @interface MockWirePaymentResponse + */ +export interface MockWirePaymentResponse { + /** + * Wire tracking reference that needs to be set in the wire reference to beneficiary field. This field is retrievable through the response during wire creation or via the bank instruction endpoint. + * @type {string} + * @memberof MockWirePaymentResponse + */ + 'trackingRef'?: string; + /** + * + * @type {FiatMoneyUsd} + * @memberof MockWirePaymentResponse + */ + 'amount'?: FiatMoneyUsd; + /** + * + * @type {MockWirePaymentBeneficiaryBankInstruction} + * @memberof MockWirePaymentResponse + */ + 'beneficiaryBank'?: MockWirePaymentBeneficiaryBankInstruction; + /** + * Enumerated status of the wire payment. Status `pending` indicates that the wire payment is in process; `processed` indicates it finished successfully; `failed` indicates it failed. + * @type {string} + * @memberof MockWirePaymentResponse + */ + 'status'?: MockWirePaymentResponseStatusEnum; +} + +export const MockWirePaymentResponseStatusEnum = { + Pending: 'pending', + Processed: 'processed', + Failed: 'failed' +} as const; + +export type MockWirePaymentResponseStatusEnum = typeof MockWirePaymentResponseStatusEnum[keyof typeof MockWirePaymentResponseStatusEnum]; + +/** + * Enumerated status of the check. `pass` indicates successful 3DS authentication. `fail` indicates failed 3DS authentication. + * @export + * @enum {string} + */ + +export const Model3dsResults = { + Pass: 'pass', + Fail: 'fail' +} as const; + +export type Model3dsResults = typeof Model3dsResults[keyof typeof Model3dsResults]; + + +/** + * + * @export + * @interface Money + */ +export interface Money { + /** + * Magnitude of the amount, in units of the currency, with a `.`. + * @type {string} + * @memberof Money + */ + 'amount': string; + /** + * Currency code for the amount. + * @type {string} + * @memberof Money + */ + 'currency': MoneyCurrencyEnum; +} + +export const MoneyCurrencyEnum = { + Usd: 'USD', + Eur: 'EUR', + Btc: 'BTC', + Eth: 'ETH' +} as const; + +export type MoneyCurrencyEnum = typeof MoneyCurrencyEnum[keyof typeof MoneyCurrencyEnum]; + +/** + * + * @export + * @interface NotAuthorized + */ +export interface NotAuthorized { + /** + * + * @type {number} + * @memberof NotAuthorized + */ + 'code': number; + /** + * + * @type {string} + * @memberof NotAuthorized + */ + 'message': string; +} +/** + * + * @export + * @interface NotFound + */ +export interface NotFound { + /** + * + * @type {number} + * @memberof NotFound + */ + 'code': number; + /** + * + * @type {string} + * @memberof NotFound + */ + 'message': string; +} +/** + * + * @export + * @interface PaymentCreationRequest + */ +export interface PaymentCreationRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof PaymentCreationRequest + */ + 'idempotencyKey': string; + /** + * Universally unique identifier (UUID v4) of the public key used in encryption. NOTE the sandbox environment uses the default value of `key1`. For this reason the example supplied is `key1` rather than a UUID. + * @type {string} + * @memberof PaymentCreationRequest + */ + 'keyId'?: string; + /** + * + * @type {MetadataPayment} + * @memberof PaymentCreationRequest + */ + 'metadata': MetadataPayment; + /** + * + * @type {FiatMoneyUsd} + * @memberof PaymentCreationRequest + */ + 'amount': FiatMoneyUsd; + /** + * Triggers the automatic capture of the full payment amount. If set to false the payment will only be authorized but not captured. + * @type {boolean} + * @memberof PaymentCreationRequest + */ + 'autoCapture'?: boolean; + /** + * Indicates the verification method for this payment. + * @type {string} + * @memberof PaymentCreationRequest + */ + 'verification': PaymentCreationRequestVerificationEnum; + /** + * The URL to redirect users to after successful 3DS authentication. + * @type {string} + * @memberof PaymentCreationRequest + */ + 'verificationSuccessUrl'?: string; + /** + * The URL to redirect users to after failed 3DS authentication. + * @type {string} + * @memberof PaymentCreationRequest + */ + 'verificationFailureUrl'?: string; + /** + * + * @type {Source} + * @memberof PaymentCreationRequest + */ + 'source': Source; + /** + * Description of the payment with length restriction of 240 characters. + * @type {string} + * @memberof PaymentCreationRequest + */ + 'description'?: string; + /** + * PGP encrypted base64 encoded string. Contains CVV. * **CVV (Card Verification Number)**: Three or four digit security code. Only required if `verification` is `cvv`. + * @type {string} + * @memberof PaymentCreationRequest + */ + 'encryptedData'?: string; + /** + * The channel identifier that can be set for the payment. When not provided, the default channel is used. + * @type {string} + * @memberof PaymentCreationRequest + */ + 'channel'?: string; +} + +export const PaymentCreationRequestVerificationEnum = { + None: 'none', + Cvv: 'cvv', + ThreeDSecure: 'three_d_secure' +} as const; + +export type PaymentCreationRequestVerificationEnum = typeof PaymentCreationRequestVerificationEnum[keyof typeof PaymentCreationRequestVerificationEnum]; + +/** + * Indicates the failure reason of a payment. Only present for payments in failed state. Possible values are [`payment_failed`, `payment_fraud_detected`, `payment_denied`, `payment_not_supported_by_issuer`, `payment_not_funded`, `payment_unprocessable`, `payment_stopped_by_issuer`, `payment_canceled`, `payment_returned`, `payment_failed_balance_check`, `card_failed`, `card_invalid`, `card_address_mismatch`, `card_zip_mismatch`, `card_cvv_invalid`, `card_expired`, `card_limit_violated`, `card_not_honored`, `card_cvv_required`, `credit_card_not_allowed`, `card_account_ineligible`, `card_network_unsupported`, `channel_invalid`, `unauthorized_transaction`, `bank_account_ineligible`, `bank_transaction_error`, `invalid_account_number`, `invalid_wire_rtn`, `invalid_ach_rtn`, `vendor_inactive`]\' + * @export + * @enum {string} + */ + +export const PaymentErrorCode = { + PaymentFailed: 'payment_failed', + PaymentFraudDetected: 'payment_fraud_detected', + PaymentDenied: 'payment_denied', + PaymentNotSupportedByIssuer: 'payment_not_supported_by_issuer', + PaymentNotFunded: 'payment_not_funded', + PaymentUnprocessable: 'payment_unprocessable', + PaymentStoppedByIssuer: 'payment_stopped_by_issuer', + PaymentCanceled: 'payment_canceled', + PaymentReturned: 'payment_returned', + PaymentFailedBalanceCheck: 'payment_failed_balance_check', + CardFailed: 'card_failed', + CardInvalid: 'card_invalid', + CardAddressMismatch: 'card_address_mismatch', + CardZipMismatch: 'card_zip_mismatch', + CardCvvInvalid: 'card_cvv_invalid', + CardExpired: 'card_expired', + CardLimitViolated: 'card_limit_violated', + CardNotHonored: 'card_not_honored', + CardCvvRequired: 'card_cvv_required', + CardRestricted: 'card_restricted,', + CardAccountIneligible: 'card_account_ineligible', + CardNetworkUnsupported: 'card_network_unsupported', + ChannelInvalid: 'channel_invalid', + UnauthorizedTransaction: 'unauthorized_transaction', + BankAccountIneligible: 'bank_account_ineligible', + BankTransactionError: 'bank_transaction_error', + InvalidAccountNumber: 'invalid_account_number', + InvalidWireRtn: 'invalid_wire_rtn', + InvalidAchRtn: 'invalid_ach_rtn', + RefIdInvalid: 'ref_id_invalid', + AccountNameMismatch: 'account_name_mismatch', + AccountNumberMismatch: 'account_number_mismatch', + AccountIneligible: 'account_ineligible', + WalletAddressMismatch: 'wallet_address_mismatch', + CustomerNameMismatch: 'customer_name_mismatch', + InstitutionNameMismatch: 'institution_name_mismatch', + VendorInactive: 'vendor_inactive' +} as const; + +export type PaymentErrorCode = typeof PaymentErrorCode[keyof typeof PaymentErrorCode]; + + +/** + * Status information of the related cancel. This property is only present on canceled payment or refund items. + * @export + * @interface PaymentInfoCancel + */ +export interface PaymentInfoCancel { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof PaymentInfoCancel + */ + 'id'?: string; + /** + * Type of the payment object. + * @type {string} + * @memberof PaymentInfoCancel + */ + 'type'?: PaymentInfoCancelTypeEnum; + /** + * Enumerated description of the payment item. + * @type {string} + * @memberof PaymentInfoCancel + */ + 'description'?: PaymentInfoCancelDescriptionEnum; + /** + * + * @type {CancelRefundReversalStatus} + * @memberof PaymentInfoCancel + */ + 'status'?: CancelRefundReversalStatus; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof PaymentInfoCancel + */ + 'createDate'?: string; +} + +export const PaymentInfoCancelTypeEnum = { + Cancel: 'cancel' +} as const; + +export type PaymentInfoCancelTypeEnum = typeof PaymentInfoCancelTypeEnum[keyof typeof PaymentInfoCancelTypeEnum]; +export const PaymentInfoCancelDescriptionEnum = { + Payment: 'Payment' +} as const; + +export type PaymentInfoCancelDescriptionEnum = typeof PaymentInfoCancelDescriptionEnum[keyof typeof PaymentInfoCancelDescriptionEnum]; + +/** + * Status information of the related payment. This property is only present on refund or cancel items. + * @export + * @interface PaymentInfoPaymentAndRefund + */ +export interface PaymentInfoPaymentAndRefund { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof PaymentInfoPaymentAndRefund + */ + 'id'?: string; + /** + * Type of the payment object. + * @type {string} + * @memberof PaymentInfoPaymentAndRefund + */ + 'type'?: PaymentInfoPaymentAndRefundTypeEnum; + /** + * + * @type {FiatMoneyUsd} + * @memberof PaymentInfoPaymentAndRefund + */ + 'amount'?: FiatMoneyUsd; + /** + * Enumerated description of the payment item. + * @type {string} + * @memberof PaymentInfoPaymentAndRefund + */ + 'description'?: PaymentInfoPaymentAndRefundDescriptionEnum; + /** + * + * @type {PaymentStatus} + * @memberof PaymentInfoPaymentAndRefund + */ + 'status'?: PaymentStatus; + /** + * + * @type {RequiredAction} + * @memberof PaymentInfoPaymentAndRefund + */ + 'requiredAction'?: RequiredAction; + /** + * + * @type {FiatMoneyUsd} + * @memberof PaymentInfoPaymentAndRefund + */ + 'fees'?: FiatMoneyUsd; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof PaymentInfoPaymentAndRefund + */ + 'createDate'?: string; +} + +export const PaymentInfoPaymentAndRefundTypeEnum = { + Payment: 'payment', + Refund: 'refund' +} as const; + +export type PaymentInfoPaymentAndRefundTypeEnum = typeof PaymentInfoPaymentAndRefundTypeEnum[keyof typeof PaymentInfoPaymentAndRefundTypeEnum]; +export const PaymentInfoPaymentAndRefundDescriptionEnum = { + Payment: 'Payment' +} as const; + +export type PaymentInfoPaymentAndRefundDescriptionEnum = typeof PaymentInfoPaymentAndRefundDescriptionEnum[keyof typeof PaymentInfoPaymentAndRefundDescriptionEnum]; + +/** + * Enumerated status of the payment. `pending` means the payment is waiting to be processed. `confirmed` means the payment has been approved by the bank and the merchant can treat it as successful, but settlement funds are not yet available to the merchant. `paid` means settlement funds have been received and are available to the merchant. `failed` means something went wrong (most commonly that the payment was denied). `action_required` means that additional steps are required to process this payment; refer to `requiredAction` for more details. Terminal states are `paid` and `failed`. + * @export + * @enum {string} + */ + +export const PaymentStatus = { + Pending: 'pending', + Confirmed: 'confirmed', + Paid: 'paid', + Failed: 'failed', + ActionRequired: 'action_required' +} as const; + +export type PaymentStatus = typeof PaymentStatus[keyof typeof PaymentStatus]; + + +/** + * Indicates the status of the payment verification. This property will be present once the payment is confirmed. + * @export + * @interface PaymentVerificationResponse + */ +export interface PaymentVerificationResponse { + /** + * Status of the AVS check. Raw AVS response, expressed as an upper-case letter. `not_requested` indicates check was not made. `pending` is pending/processing. + * @type {string} + * @memberof PaymentVerificationResponse + */ + 'avs': string; + /** + * + * @type {CvvResults} + * @memberof PaymentVerificationResponse + */ + 'cvv': CvvResults; + /** + * + * @type {Model3dsResults} + * @memberof PaymentVerificationResponse + */ + 'threeDSecure'?: Model3dsResults; + /** + * + * @type {Eci} + * @memberof PaymentVerificationResponse + */ + 'eci'?: Eci; +} +/** + * + * @export + * @interface Payout + */ +export interface Payout { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof Payout + */ + 'id'?: string; + /** + * The identifier of the source wallet used to fund a payout. + * @type {string} + * @memberof Payout + */ + 'sourceWalletId'?: string; + /** + * + * @type {BankDestination} + * @memberof Payout + */ + 'destination'?: BankDestination; + /** + * + * @type {FiatMoneyUsd} + * @memberof Payout + */ + 'amount'?: FiatMoneyUsd; + /** + * + * @type {FiatMoneyUsd} + * @memberof Payout + */ + 'fees'?: FiatMoneyUsd; + /** + * + * @type {PayoutStatus} + * @memberof Payout + */ + 'status'?: PayoutStatus; + /** + * A payout tracking reference. Will be present once known. + * @type {any} + * @memberof Payout + */ + 'trackingRef'?: any | null; + /** + * + * @type {PayoutErrorCode} + * @memberof Payout + */ + 'errorCode'?: PayoutErrorCode | null; + /** + * + * @type {RiskEvaluation} + * @memberof Payout + */ + 'riskEvaluation'?: RiskEvaluation | null; + /** + * + * @type {PayoutBusinessAccountAdjustments} + * @memberof Payout + */ + 'adjustments'?: PayoutBusinessAccountAdjustments | null; + /** + * + * @type {UnwithdrawalObject} + * @memberof Payout + */ + 'return'?: UnwithdrawalObject | null; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof Payout + */ + 'createDate'?: string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof Payout + */ + 'updateDate'?: string; +} +/** + * + * @export + * @interface PayoutBusinessAccount + */ +export interface PayoutBusinessAccount { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof PayoutBusinessAccount + */ + 'id'?: string; + /** + * The identifier of the source wallet used to fund a payout. + * @type {string} + * @memberof PayoutBusinessAccount + */ + 'sourceWalletId'?: string; + /** + * + * @type {BankDestination} + * @memberof PayoutBusinessAccount + */ + 'destination'?: BankDestination; + /** + * + * @type {FiatMoney} + * @memberof PayoutBusinessAccount + */ + 'amount'?: FiatMoney; + /** + * + * @type {FiatMoneyUsd} + * @memberof PayoutBusinessAccount + */ + 'fees'?: FiatMoneyUsd; + /** + * + * @type {PayoutStatus} + * @memberof PayoutBusinessAccount + */ + 'status'?: PayoutStatus; + /** + * A payout tracking reference. Will be present once known. + * @type {any} + * @memberof PayoutBusinessAccount + */ + 'trackingRef'?: any | null; + /** + * + * @type {PayoutErrorCode} + * @memberof PayoutBusinessAccount + */ + 'errorCode'?: PayoutErrorCode | null; + /** + * + * @type {RiskEvaluation} + * @memberof PayoutBusinessAccount + */ + 'riskEvaluation'?: RiskEvaluation | null; + /** + * + * @type {PayoutBusinessAccountAdjustments} + * @memberof PayoutBusinessAccount + */ + 'adjustments'?: PayoutBusinessAccountAdjustments | null; + /** + * + * @type {UnwithdrawalObject} + * @memberof PayoutBusinessAccount + */ + 'return'?: UnwithdrawalObject | null; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof PayoutBusinessAccount + */ + 'createDate'?: string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof PayoutBusinessAccount + */ + 'updateDate'?: string; +} +/** + * Final adjustment which increases (credits) or decreases (debits) the total returned amount to the source wallet. + * @export + * @interface PayoutBusinessAccountAdjustments + */ +export interface PayoutBusinessAccountAdjustments { + /** + * + * @type {FiatMoneyUsd} + * @memberof PayoutBusinessAccountAdjustments + */ + 'fxCredit'?: FiatMoneyUsd; + /** + * + * @type {FiatMoneyUsd} + * @memberof PayoutBusinessAccountAdjustments + */ + 'fxDebit'?: FiatMoneyUsd; +} +/** + * + * @export + * @interface PayoutCreationRequest + */ +export interface PayoutCreationRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof PayoutCreationRequest + */ + 'idempotencyKey': string; + /** + * + * @type {WalletLocation} + * @memberof PayoutCreationRequest + */ + 'source'?: WalletLocation; + /** + * + * @type {BankDestination} + * @memberof PayoutCreationRequest + */ + 'destination': BankDestination; + /** + * + * @type {FiatMoneyUsd} + * @memberof PayoutCreationRequest + */ + 'amount': FiatMoneyUsd; + /** + * + * @type {MetadataPayout} + * @memberof PayoutCreationRequest + */ + 'metadata': MetadataPayout; +} +/** + * The destination bank account type. + * @export + * @enum {string} + */ + +export const PayoutDestinationType = { + Wire: 'wire', + Ach: 'ach', + Sepa: 'sepa' +} as const; + +export type PayoutDestinationType = typeof PayoutDestinationType[keyof typeof PayoutDestinationType]; + + +/** + * Indicates the failure reason of a payout. Only present for payouts in failed state. Possible values are [`insufficient_funds`, `transaction_denied`, `transaction_failed`, `transaction_returned`, `bank_transaction_error`, `fiat_account_limit_exceeded`, `invalid_bank_account_number`, `invalid_ach_rtn`, `invalid_wire_rtn`, `vendor_inactive`]\' + * @export + * @enum {string} + */ + +export const PayoutErrorCode = { + InsufficientFunds: 'insufficient_funds', + TransactionDenied: 'transaction_denied', + TransactionFailed: 'transaction_failed', + TransactionReturned: 'transaction_returned', + BankTransactionError: 'bank_transaction_error', + FiatAccountLimitExceeded: 'fiat_account_limit_exceeded', + InvalidBankAccountNumber: 'invalid_bank_account_number', + InvalidAchRtn: 'invalid_ach_rtn', + InvalidWireRtn: 'invalid_wire_rtn', + VendorInactive: 'vendor_inactive' +} as const; + +export type PayoutErrorCode = typeof PayoutErrorCode[keyof typeof PayoutErrorCode]; + + +/** + * Status of the payout. Status `pending` indicates that the payout is in process; `complete` indicates it finished successfully; `failed` indicates it failed. + * @export + * @enum {string} + */ + +export const PayoutStatus = { + Pending: 'pending', + Complete: 'complete', + Failed: 'failed' +} as const; + +export type PayoutStatus = typeof PayoutStatus[keyof typeof PayoutStatus]; + + +/** + * + * @export + * @interface Ping + */ +export interface Ping { + /** + * + * @type {string} + * @memberof Ping + */ + 'message': string; +} +/** + * + * @export + * @interface PublicKey + */ +export interface PublicKey { + /** + * Universally unique identifier (UUID v4) of the public key used in encryption. NOTE the sandbox environment uses the default value of `key1`. For this reason the example supplied is `key1` rather than a UUID. + * @type {string} + * @memberof PublicKey + */ + 'keyId': string; + /** + * A PGP ascii-armor encoded public key. + * @type {string} + * @memberof PublicKey + */ + 'publicKey': string; +} +/** + * + * @export + * @interface RefundCreationRequest + */ +export interface RefundCreationRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof RefundCreationRequest + */ + 'idempotencyKey': string; + /** + * + * @type {FiatMoneyUsd} + * @memberof RefundCreationRequest + */ + 'amount': FiatMoneyUsd; + /** + * + * @type {ReversalReason} + * @memberof RefundCreationRequest + */ + 'reason'?: ReversalReason; +} +/** + * + * @export + * @interface RefundPaymentResponse + */ +export interface RefundPaymentResponse { + /** + * + * @type {DetailedRefund} + * @memberof RefundPaymentResponse + */ + 'data'?: DetailedRefund; +} +/** + * When the payment status is `action_required`, this object summarizes the required additional steps. + * @export + * @interface RequiredAction + */ +export interface RequiredAction { + /** + * The type of action that is required to proceed with the payment. Currently only one type is supported. + * @type {string} + * @memberof RequiredAction + */ + 'type': RequiredActionTypeEnum; + /** + * The URL to bring the user to in order to complete the payment. + * @type {string} + * @memberof RequiredAction + */ + 'redirectUrl': string; +} + +export const RequiredActionTypeEnum = { + ThreeDSecureRequired: 'three_d_secure_required' +} as const; + +export type RequiredActionTypeEnum = typeof RequiredActionTypeEnum[keyof typeof RequiredActionTypeEnum]; + +/** + * + * @export + * @interface Reversal + */ +export interface Reversal { + /** + * Universally unique identifier (UUID v4) of the public key used in encryption. NOTE the sandbox environment uses the default value of `key1`. For this reason the example supplied is `key1` rather than a UUID. + * @type {string} + * @memberof Reversal + */ + 'id': string; + /** + * Unique system generated identifier for the payment that is associated to the chargeback item. + * @type {string} + * @memberof Reversal + */ + 'paymentId': string; + /** + * + * @type {FiatMoneyUsd} + * @memberof Reversal + */ + 'amount': FiatMoneyUsd; + /** + * Enumerated description of the payment. + * @type {string} + * @memberof Reversal + */ + 'description': string; + /** + * + * @type {CancelRefundReversalStatus} + * @memberof Reversal + */ + 'status': CancelRefundReversalStatus; + /** + * + * @type {ReversalReason} + * @memberof Reversal + */ + 'reason': ReversalReason; + /** + * + * @type {FiatMoneyUsd} + * @memberof Reversal + */ + 'fees': FiatMoneyUsd; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof Reversal + */ + 'createDate': string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof Reversal + */ + 'updateDate': string; +} +/** + * Enumerated reason for a returned payment. Providing this reason in the request is recommended (to improve risk evaluation) but not required. + * @export + * @enum {string} + */ + +export const ReversalReason = { + Duplicate: 'duplicate', + Fraudulent: 'fraudulent', + RequestedByCustomer: 'requested_by_customer', + BankTransactionError: 'bank_transaction_error', + InvalidAccountNumber: 'invalid_account_number', + InsufficientFunds: 'insufficient_funds', + PaymentStoppedByIssuer: 'payment_stopped_by_issuer', + PaymentReturned: 'payment_returned', + BankAccountIneligible: 'bank_account_ineligible', + InvalidAchRtn: 'invalid_ach_rtn', + UnauthorizedTransaction: 'unauthorized_transaction', + PaymentFailed: 'payment_failed' +} as const; + +export type ReversalReason = typeof ReversalReason[keyof typeof ReversalReason]; + + +/** + * Results of risk evaluation. Only present if the payment is denied by Circle\'s risk service. + * @export + * @interface RiskEvaluation + */ +export interface RiskEvaluation { + /** + * Enumerated decision of the account. + * @type {string} + * @memberof RiskEvaluation + */ + 'decision'?: RiskEvaluationDecisionEnum; + /** + * Risk reason for the definitive decision outcome. + * @type {string} + * @memberof RiskEvaluation + */ + 'reason'?: string | null; +} + +export const RiskEvaluationDecisionEnum = { + Approved: 'approved', + Denied: 'denied', + Review: 'review' +} as const; + +export type RiskEvaluationDecisionEnum = typeof RiskEvaluationDecisionEnum[keyof typeof RiskEvaluationDecisionEnum]; + +/** + * + * @export + * @interface SEPA + */ +export interface SEPA { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof SEPA + */ + 'id': string; + /** + * + * @type {ExternalFiatAccountStatus} + * @memberof SEPA + */ + 'status': ExternalFiatAccountStatus; + /** + * Bank name plus last four digits of the IBAN. + * @type {string} + * @memberof SEPA + */ + 'description': string; + /** + * Tracking reference that needs to be set in the payment details or description. + * @type {string} + * @memberof SEPA + */ + 'trackingRef': string; + /** + * A UUID that uniquely identifies the account number. If the same account is used more than once, each card object will have a different id, but the fingerprint will stay the same. + * @type {string} + * @memberof SEPA + */ + 'fingerprint': string; + /** + * + * @type {RiskEvaluation} + * @memberof SEPA + */ + 'riskEvaluation'?: RiskEvaluation | null; + /** + * + * @type {BillingDetails} + * @memberof SEPA + */ + 'billingDetails': BillingDetails; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof SEPA + */ + 'createDate': string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof SEPA + */ + 'updateDate': string; +} +/** + * + * @export + * @interface SEPACreationRequest + */ +export interface SEPACreationRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof SEPACreationRequest + */ + 'idempotencyKey': string; + /** + * International Bank Account Number (IBAN) for the bank account. + * @type {string} + * @memberof SEPACreationRequest + */ + 'iban': string; + /** + * + * @type {BillingDetails} + * @memberof SEPACreationRequest + */ + 'billingDetails': BillingDetails; +} +/** + * + * @export + * @interface SEPAInstruction + */ +export interface SEPAInstruction { + /** + * Circle tracking reference that needs to be set in the SEPA transfer reference field. + * @type {string} + * @memberof SEPAInstruction + */ + 'trackingRef'?: string; + /** + * + * @type {SEPAInstructionBeneficiary} + * @memberof SEPAInstruction + */ + 'beneficiary'?: SEPAInstructionBeneficiary; + /** + * + * @type {SEPAInstructionBeneficiaryBank} + * @memberof SEPAInstruction + */ + 'beneficiaryBank'?: SEPAInstructionBeneficiaryBank; +} +/** + * + * @export + * @interface SEPAInstructionBeneficiary + */ +export interface SEPAInstructionBeneficiary { + /** + * Name of the beneficiary. + * @type {string} + * @memberof SEPAInstructionBeneficiary + */ + 'name'?: string; + /** + * Address line 1 of the beneficiary\'s address. + * @type {string} + * @memberof SEPAInstructionBeneficiary + */ + 'address1'?: string; + /** + * Address line 2 of the beneficiary\'s address. + * @type {string} + * @memberof SEPAInstructionBeneficiary + */ + 'address2'?: string; +} +/** + * + * @export + * @interface SEPAInstructionBeneficiaryBank + */ +export interface SEPAInstructionBeneficiaryBank { + /** + * Name of the beneficiary\'s bank. + * @type {string} + * @memberof SEPAInstructionBeneficiaryBank + */ + 'name'?: string; + /** + * BIC code of the beneficiary\'s bank account. + * @type {string} + * @memberof SEPAInstructionBeneficiaryBank + */ + 'bic'?: string; + /** + * IBAN of the beneficiary\'s bank account. + * @type {string} + * @memberof SEPAInstructionBeneficiaryBank + */ + 'iban'?: string; + /** + * Address of the beneficiary\'s bank. + * @type {string} + * @memberof SEPAInstructionBeneficiaryBank + */ + 'address'?: string; + /** + * City of the beneficiary\'s bank. + * @type {string} + * @memberof SEPAInstructionBeneficiaryBank + */ + 'city'?: string; + /** + * Postal code of the beneficiary\'s bank. + * @type {string} + * @memberof SEPAInstructionBeneficiaryBank + */ + 'postalCode'?: string; + /** + * Country code of the beneficiary\'s bank. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2. + * @type {string} + * @memberof SEPAInstructionBeneficiaryBank + */ + 'country'?: string; +} +/** + * + * @export + * @interface SearchBusinessAccountDepositsResponse + */ +export interface SearchBusinessAccountDepositsResponse { + /** + * + * @type {Array} + * @memberof SearchBusinessAccountDepositsResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface SearchBusinessAccountTransfersResponse + */ +export interface SearchBusinessAccountTransfersResponse { + /** + * + * @type {Array} + * @memberof SearchBusinessAccountTransfersResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface SearchTransfersResponse + */ +export interface SearchTransfersResponse { + /** + * + * @type {Array} + * @memberof SearchTransfersResponse + */ + 'data'?: Array; +} +/** + * + * @export + * @interface SenFiatAccountCreationRequest + */ +export interface SenFiatAccountCreationRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof SenFiatAccountCreationRequest + */ + 'idempotencyKey': string; + /** + * Silvergate SEN account number. + * @type {string} + * @memberof SenFiatAccountCreationRequest + */ + 'accountNumber': string; + /** + * Currency of the Silvergate SEN account. + * @type {string} + * @memberof SenFiatAccountCreationRequest + */ + 'currency'?: string; +} +/** + * + * @export + * @interface SenFiatAccountResponse + */ +export interface SenFiatAccountResponse { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof SenFiatAccountResponse + */ + 'id': string; + /** + * + * @type {ExternalFiatAccountStatus} + * @memberof SenFiatAccountResponse + */ + 'status': ExternalFiatAccountStatus; + /** + * Bank name plus last four digits of the bank account number. + * @type {string} + * @memberof SenFiatAccountResponse + */ + 'description': string; + /** + * Circle tracking reference that needs to be set in the memo field.. + * @type {string} + * @memberof SenFiatAccountResponse + */ + 'trackingRef': string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof SenFiatAccountResponse + */ + 'createDate': string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof SenFiatAccountResponse + */ + 'updateDate': string; + /** + * Currency of the fiat account. + * @type {string} + * @memberof SenFiatAccountResponse + */ + 'currency'?: string; +} +/** + * + * @export + * @interface SenInstruction + */ +export interface SenInstruction { + /** + * Circle tracking reference that needs to be set in the memo field. + * @type {string} + * @memberof SenInstruction + */ + 'trackingRef'?: string; + /** + * Circle corporate Silvergate SEN account number that needs to be set as destination. + * @type {string} + * @memberof SenInstruction + */ + 'accountNumber'?: string; + /** + * Currency of Circle corporate Silvergate SEN account. + * @type {string} + * @memberof SenInstruction + */ + 'currency'?: string; +} +/** + * + * @export + * @interface Settlement + */ +export interface Settlement { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof Settlement + */ + 'id'?: string; + /** + * Unique system generated identifier for the wallet of the merchant. + * @type {string} + * @memberof Settlement + */ + 'merchantWalletId'?: string; + /** + * If this settlement was used for a marketplace payment, the wallet involved in the settlement. Not included for standard merchant settlements. + * @type {string} + * @memberof Settlement + */ + 'walletId'?: string; + /** + * + * @type {FiatMoneyUsd} + * @memberof Settlement + */ + 'totalDebits'?: FiatMoneyUsd; + /** + * + * @type {FiatMoneyUsd} + * @memberof Settlement + */ + 'totalCredits'?: FiatMoneyUsd; + /** + * + * @type {FiatMoneyUsd} + * @memberof Settlement + */ + 'paymentFees'?: FiatMoneyUsd; + /** + * + * @type {FiatMoneyUsd} + * @memberof Settlement + */ + 'chargebackFees'?: FiatMoneyUsd; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof Settlement + */ + 'createDate'?: string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof Settlement + */ + 'updateDate'?: string; +} +/** + * + * @export + * @interface SignetFiatAccountCreationRequest + */ +export interface SignetFiatAccountCreationRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof SignetFiatAccountCreationRequest + */ + 'idempotencyKey': string; + /** + * Signet wallet address. + * @type {string} + * @memberof SignetFiatAccountCreationRequest + */ + 'walletAddress': string; +} +/** + * + * @export + * @interface SignetFiatAccountResponse + */ +export interface SignetFiatAccountResponse { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof SignetFiatAccountResponse + */ + 'id': string; + /** + * + * @type {ExternalFiatAccountStatus} + * @memberof SignetFiatAccountResponse + */ + 'status': ExternalFiatAccountStatus; + /** + * Tracking ref that needs to be set in the public description field when you send the funds to Circle Signet wallet. + * @type {string} + * @memberof SignetFiatAccountResponse + */ + 'trackingRef': string; + /** + * Your signet wallet address. + * @type {string} + * @memberof SignetFiatAccountResponse + */ + 'walletAddress': string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof SignetFiatAccountResponse + */ + 'createDate': string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof SignetFiatAccountResponse + */ + 'updateDate': string; +} +/** + * + * @export + * @interface SignetInstruction + */ +export interface SignetInstruction { + /** + * Circle tracking reference that needs to be set in the signet public description field. + * @type {string} + * @memberof SignetInstruction + */ + 'trackingRef'?: string; + /** + * Circle wallet address that needs to be set in the signet recipient wallet field. + * @type {string} + * @memberof SignetInstruction + */ + 'walletAddress'?: string; +} +/** + * Billing details of the card holder. + * @export + * @interface SimpleBillingDetails + */ +export interface SimpleBillingDetails { + /** + * Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2. + * @type {string} + * @memberof SimpleBillingDetails + */ + 'country': string; + /** + * State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision. + * @type {string} + * @memberof SimpleBillingDetails + */ + 'district': string; +} +/** + * + * @export + * @interface SimpleCard + */ +export interface SimpleCard { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof SimpleCard + */ + 'id': string; + /** + * + * @type {ExternalFiatAccountStatus} + * @memberof SimpleCard + */ + 'status': ExternalFiatAccountStatus; + /** + * + * @type {SimpleBillingDetails} + * @memberof SimpleCard + */ + 'billingDetails': SimpleBillingDetails; + /** + * Two digit number representing the card\'s expiration month. + * @type {number} + * @memberof SimpleCard + */ + 'expMonth': number; + /** + * Four digit number representing the card\'s expiration year. + * @type {number} + * @memberof SimpleCard + */ + 'expYear': number; + /** + * The network of the card. + * @type {string} + * @memberof SimpleCard + */ + 'network': SimpleCardNetworkEnum; + /** + * The bank identification number (BIN), the first 6 digits of the card. + * @type {string} + * @memberof SimpleCard + */ + 'bin'?: string; + /** + * The country code of the issuer bank. Follows the ISO 3166-1 alpha-2 standard. + * @type {string} + * @memberof SimpleCard + */ + 'issuerCountry'?: string; + /** + * A UUID that uniquely identifies the account number. If the same account is used more than once, each card object will have a different id, but the fingerprint will stay the same. + * @type {string} + * @memberof SimpleCard + */ + 'fingerprint': string; + /** + * + * @type {CardVerificationResponse} + * @memberof SimpleCard + */ + 'verification': CardVerificationResponse; + /** + * + * @type {RiskEvaluation} + * @memberof SimpleCard + */ + 'riskEvaluation'?: RiskEvaluation | null; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof SimpleCard + */ + 'createDate': string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof SimpleCard + */ + 'updateDate': string; +} + +export const SimpleCardNetworkEnum = { + Visa: 'VISA', + Mastercard: 'MASTERCARD', + Amex: 'AMEX', + Unknown: 'UNKNOWN' +} as const; + +export type SimpleCardNetworkEnum = typeof SimpleCardNetworkEnum[keyof typeof SimpleCardNetworkEnum]; + +/** + * + * @export + * @interface Source + */ +export interface Source { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof Source + */ + 'id'?: string; + /** + * Type of the source. + * @type {string} + * @memberof Source + */ + 'type'?: SourceTypeEnum; +} + +export const SourceTypeEnum = { + Card: 'card', + Ach: 'ach' +} as const; + +export type SourceTypeEnum = typeof SourceTypeEnum[keyof typeof SourceTypeEnum]; + +/** + * The payment source. + * @export + * @interface SourceResponse + */ +export interface SourceResponse { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof SourceResponse + */ + 'id'?: string; + /** + * Type of the source. + * @type {string} + * @memberof SourceResponse + */ + 'type'?: SourceResponseTypeEnum; +} + +export const SourceResponseTypeEnum = { + Card: 'card', + Ach: 'ach', + Wire: 'wire', + Sepa: 'sepa' +} as const; + +export type SourceResponseTypeEnum = typeof SourceResponseTypeEnum[keyof typeof SourceResponseTypeEnum]; + +/** + * + * @export + * @interface Stablecoin + */ +export interface Stablecoin { + /** + * Name of the stablecoin. + * @type {string} + * @memberof Stablecoin + */ + 'name'?: string; + /** + * Symbol of the stablecoin. + * @type {string} + * @memberof Stablecoin + */ + 'symbol'?: string; + /** + * Total circulating amount of the stablecoin. + * @type {string} + * @memberof Stablecoin + */ + 'totalAmount'?: string; + /** + * A list of the broken down totalAmount by chain of the stablecoin. + * @type {Array} + * @memberof Stablecoin + */ + 'chains'?: Array; +} +/** + * + * @export + * @interface SubscribeResponse + */ +export interface SubscribeResponse { + /** + * + * @type {SubscriptionResponse} + * @memberof SubscribeResponse + */ + 'data'?: SubscriptionResponse; +} +/** + * + * @export + * @interface SubscriptionDetail + */ +export interface SubscriptionDetail { + /** + * Identifier for created subscription. + * @type {string} + * @memberof SubscriptionDetail + */ + 'url'?: string; + /** + * Status of the subscription request. + * @type {string} + * @memberof SubscriptionDetail + */ + 'status'?: SubscriptionDetailStatusEnum; +} + +export const SubscriptionDetailStatusEnum = { + Confirmed: 'confirmed', + Pending: 'pending', + Deleted: 'deleted' +} as const; + +export type SubscriptionDetailStatusEnum = typeof SubscriptionDetailStatusEnum[keyof typeof SubscriptionDetailStatusEnum]; + +/** + * + * @export + * @interface SubscriptionRequest + */ +export interface SubscriptionRequest { + /** + * URL of the subscriber endpoint. Must be publicly accessible and utilize HTTPS. + * @type {string} + * @memberof SubscriptionRequest + */ + 'endpoint': string; +} +/** + * + * @export + * @interface SubscriptionResponse + */ +export interface SubscriptionResponse { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof SubscriptionResponse + */ + 'id'?: string; + /** + * URL of the endpoint. + * @type {string} + * @memberof SubscriptionResponse + */ + 'endpoint'?: string; + /** + * List of subscriptions details for created subscriptions. + * @type {Array} + * @memberof SubscriptionResponse + */ + 'subscriptionDetails'?: Array; +} +/** + * + * @export + * @interface TokenAmount + */ +export interface TokenAmount { + /** + * Magnitude of the amount, in units of the currency, with a `.`. + * @type {string} + * @memberof TokenAmount + */ + 'amount': string; + /** + * + * @type {Chain} + * @memberof TokenAmount + */ + 'chain': Chain; +} +/** + * A transfer of funds. + * @export + * @interface Transfer + */ +export interface Transfer { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof Transfer + */ + 'id': string; + /** + * + * @type {TransferSourceLocation} + * @memberof Transfer + */ + 'source': TransferSourceLocation; + /** + * + * @type {TransferDestinationLocation} + * @memberof Transfer + */ + 'destination': TransferDestinationLocation; + /** + * + * @type {Money} + * @memberof Transfer + */ + 'amount': Money; + /** + * A hash that uniquely identifies the onchain transaction. This is only available where either source or destination are of type blockchain. + * @type {string} + * @memberof Transfer + */ + 'transactionHash'?: string; + /** + * Status of the transfer. Status `pending` indicates that the transfer is in the process of running; `complete` indicates it finished successfully; `failed` indicates it failed. + * @type {string} + * @memberof Transfer + */ + 'status': TransferStatusEnum; + /** + * + * @type {TransferErrorCode} + * @memberof Transfer + */ + 'errorCode'?: TransferErrorCode | null; + /** + * The create date of the transfer. + * @type {string} + * @memberof Transfer + */ + 'createDate'?: string; +} + +export const TransferStatusEnum = { + Pending: 'pending', + Complete: 'complete', + Failed: 'failed' +} as const; + +export type TransferStatusEnum = typeof TransferStatusEnum[keyof typeof TransferStatusEnum]; + +/** + * + * @export + * @interface TransferCreationRequest + */ +export interface TransferCreationRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof TransferCreationRequest + */ + 'idempotencyKey': string; + /** + * + * @type {TransferRequestSourceWalletLocation} + * @memberof TransferCreationRequest + */ + 'source': TransferRequestSourceWalletLocation; + /** + * + * @type {TransferCreationRequestDestination} + * @memberof TransferCreationRequest + */ + 'destination': TransferCreationRequestDestination; + /** + * + * @type {Money} + * @memberof TransferCreationRequest + */ + 'amount': Money; +} +/** + * @type TransferCreationRequestDestination + * @export + */ +export type TransferCreationRequestDestination = TransferRequestBlockchainLocation | WalletLocation; + +/** + * A destination blockchain address. + * @export + * @interface TransferDestinationBlockchainLocation + */ +export interface TransferDestinationBlockchainLocation { + /** + * + * @type {string} + * @memberof TransferDestinationBlockchainLocation + */ + 'type': TransferDestinationBlockchainLocationTypeEnum; + /** + * An alphanumeric string representing a blockchain address. Will be in different formats for different chains. It is important to preserve the exact formatting and capitalization of the address. + * @type {string} + * @memberof TransferDestinationBlockchainLocation + */ + 'address': string; + /** + * The secondary identifier for a blockchain address. An example of this is the memo field on the Stellar network, which can be text, id, or hash format. + * @type {string} + * @memberof TransferDestinationBlockchainLocation + */ + 'addressTag'?: string | null; + /** + * + * @type {Chain} + * @memberof TransferDestinationBlockchainLocation + */ + 'chain': Chain; +} + +export const TransferDestinationBlockchainLocationTypeEnum = { + Blockchain: 'blockchain' +} as const; + +export type TransferDestinationBlockchainLocationTypeEnum = typeof TransferDestinationBlockchainLocationTypeEnum[keyof typeof TransferDestinationBlockchainLocationTypeEnum]; + +/** + * @type TransferDestinationLocation + * A destination of funds. + * @export + */ +export type TransferDestinationLocation = TransferDestinationBlockchainLocation | TransferDestinationWalletLocation; + +/** + * A destination wallet location. + * @export + * @interface TransferDestinationWalletLocation + */ +export interface TransferDestinationWalletLocation { + /** + * + * @type {string} + * @memberof TransferDestinationWalletLocation + */ + 'type': TransferDestinationWalletLocationTypeEnum; + /** + * The id of the wallet. + * @type {string} + * @memberof TransferDestinationWalletLocation + */ + 'id': string; + /** + * An alphanumeric string which indicates the wallet address used to receive the transfer. Will only be set when the transfer source is a blockchain address. + * @type {string} + * @memberof TransferDestinationWalletLocation + */ + 'address'?: string; + /** + * The secondary identifier for a blockchain address. An example of this is the memo field on the Stellar network, which can be text, id, or hash format. + * @type {string} + * @memberof TransferDestinationWalletLocation + */ + 'addressTag'?: string | null; +} + +export const TransferDestinationWalletLocationTypeEnum = { + Wallet: 'wallet' +} as const; + +export type TransferDestinationWalletLocationTypeEnum = typeof TransferDestinationWalletLocationTypeEnum[keyof typeof TransferDestinationWalletLocationTypeEnum]; + +/** + * A transfer of funds. + * @export + * @interface TransferDetailedTransfer + */ +export interface TransferDetailedTransfer { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof TransferDetailedTransfer + */ + 'id': string; + /** + * + * @type {TransferSourceLocation} + * @memberof TransferDetailedTransfer + */ + 'source': TransferSourceLocation; + /** + * + * @type {TransferDestinationLocation} + * @memberof TransferDetailedTransfer + */ + 'destination': TransferDestinationLocation; + /** + * + * @type {Money} + * @memberof TransferDetailedTransfer + */ + 'amount': Money; + /** + * A hash that uniquely identifies the onchain transaction. This is only available where either source or destination are of type blockchain. + * @type {string} + * @memberof TransferDetailedTransfer + */ + 'transactionHash'?: string; + /** + * Status of the transfer. Status `pending` indicates that the transfer is in the process of running; `complete` indicates it finished successfully; `failed` indicates it failed. + * @type {string} + * @memberof TransferDetailedTransfer + */ + 'status': TransferDetailedTransferStatusEnum; + /** + * + * @type {TransferErrorCode} + * @memberof TransferDetailedTransfer + */ + 'errorCode'?: TransferErrorCode | null; + /** + * + * @type {RiskEvaluation} + * @memberof TransferDetailedTransfer + */ + 'riskEvaluation'?: RiskEvaluation | null; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof TransferDetailedTransfer + */ + 'createDate'?: string; +} + +export const TransferDetailedTransferStatusEnum = { + Failed: 'failed', + Pending: 'pending', + Complete: 'complete' +} as const; + +export type TransferDetailedTransferStatusEnum = typeof TransferDetailedTransferStatusEnum[keyof typeof TransferDetailedTransferStatusEnum]; + +/** + * Indicates the failure reason of a transfer. Only present for transfers in a `failed` state. Possible values are `insufficient_funds`, `blockchain_error` and `transfer_denied` and `transfer_failed` + * @export + * @enum {string} + */ + +export const TransferErrorCode = { + TransferFailed: 'transfer_failed', + TransferDenied: 'transfer_denied', + BlockchainError: 'blockchain_error', + InsufficientFunds: 'insufficient_funds' +} as const; + +export type TransferErrorCode = typeof TransferErrorCode[keyof typeof TransferErrorCode]; + + +/** + * + * @export + * @interface TransferRequestBlockchainLocation + */ +export interface TransferRequestBlockchainLocation { + /** + * + * @type {string} + * @memberof TransferRequestBlockchainLocation + */ + 'type': TransferRequestBlockchainLocationTypeEnum; + /** + * The blockchain address. + * @type {string} + * @memberof TransferRequestBlockchainLocation + */ + 'address': string; + /** + * The secondary identifier for a blockchain address. An example of this is the memo field on the Stellar network, which can be text, id, or hash format. + * @type {string} + * @memberof TransferRequestBlockchainLocation + */ + 'addressTag'?: string | null; + /** + * + * @type {Chain} + * @memberof TransferRequestBlockchainLocation + */ + 'chain': Chain; +} + +export const TransferRequestBlockchainLocationTypeEnum = { + Blockchain: 'blockchain' +} as const; + +export type TransferRequestBlockchainLocationTypeEnum = typeof TransferRequestBlockchainLocationTypeEnum[keyof typeof TransferRequestBlockchainLocationTypeEnum]; + +/** + * + * @export + * @interface TransferRequestSourceWalletLocation + */ +export interface TransferRequestSourceWalletLocation { + /** + * + * @type {string} + * @memberof TransferRequestSourceWalletLocation + */ + 'type': TransferRequestSourceWalletLocationTypeEnum; + /** + * The id of the wallet. + * @type {string} + * @memberof TransferRequestSourceWalletLocation + */ + 'id': string; + /** + * + * @type {Array} + * @memberof TransferRequestSourceWalletLocation + */ + 'identities'?: Array; +} + +export const TransferRequestSourceWalletLocationTypeEnum = { + Wallet: 'wallet' +} as const; + +export type TransferRequestSourceWalletLocationTypeEnum = typeof TransferRequestSourceWalletLocationTypeEnum[keyof typeof TransferRequestSourceWalletLocationTypeEnum]; + +/** + * + * @export + * @interface TransferRequestVerifiedBlockchainLocation + */ +export interface TransferRequestVerifiedBlockchainLocation { + /** + * + * @type {string} + * @memberof TransferRequestVerifiedBlockchainLocation + */ + 'type': TransferRequestVerifiedBlockchainLocationTypeEnum; + /** + * The ID of the verified blockchain recipient address. + * @type {string} + * @memberof TransferRequestVerifiedBlockchainLocation + */ + 'addressId': string; +} + +export const TransferRequestVerifiedBlockchainLocationTypeEnum = { + VerifiedBlockchain: 'verified_blockchain' +} as const; + +export type TransferRequestVerifiedBlockchainLocationTypeEnum = typeof TransferRequestVerifiedBlockchainLocationTypeEnum[keyof typeof TransferRequestVerifiedBlockchainLocationTypeEnum]; + +/** + * A source blockchain address. + * @export + * @interface TransferSourceBlockchainLocation + */ +export interface TransferSourceBlockchainLocation { + /** + * + * @type {string} + * @memberof TransferSourceBlockchainLocation + */ + 'type': TransferSourceBlockchainLocationTypeEnum; + /** + * + * @type {Chain} + * @memberof TransferSourceBlockchainLocation + */ + 'chain': Chain; + /** + * + * @type {Array} + * @memberof TransferSourceBlockchainLocation + */ + 'identities'?: Array; +} + +export const TransferSourceBlockchainLocationTypeEnum = { + Blockchain: 'blockchain' +} as const; + +export type TransferSourceBlockchainLocationTypeEnum = typeof TransferSourceBlockchainLocationTypeEnum[keyof typeof TransferSourceBlockchainLocationTypeEnum]; + +/** + * @type TransferSourceLocation + * A source of funds. + * @export + */ +export type TransferSourceLocation = TransferSourceBlockchainLocation | TransferSourceWalletLocation; + +/** + * A source wallet location. + * @export + * @interface TransferSourceWalletLocation + */ +export interface TransferSourceWalletLocation { + /** + * + * @type {string} + * @memberof TransferSourceWalletLocation + */ + 'type': TransferSourceWalletLocationTypeEnum; + /** + * The id of the wallet. + * @type {string} + * @memberof TransferSourceWalletLocation + */ + 'id': string; + /** + * + * @type {Array} + * @memberof TransferSourceWalletLocation + */ + 'identities'?: Array; +} + +export const TransferSourceWalletLocationTypeEnum = { + Wallet: 'wallet' +} as const; + +export type TransferSourceWalletLocationTypeEnum = typeof TransferSourceWalletLocationTypeEnum[keyof typeof TransferSourceWalletLocationTypeEnum]; + +/** + * Return information if the payout is returned by bank. Only present if `errorCode` of payout is `transaction_returned`. + * @export + * @interface UnwithdrawalObject + */ +export interface UnwithdrawalObject { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof UnwithdrawalObject + */ + 'id'?: string; + /** + * Universally unique identifier (UUID v4) of the payout that is associated with the return. + * @type {string} + * @memberof UnwithdrawalObject + */ + 'payoutId'?: string; + /** + * + * @type {FiatMoneyUsd} + * @memberof UnwithdrawalObject + */ + 'amount'?: FiatMoneyUsd; + /** + * + * @type {FiatMoneyUsd} + * @memberof UnwithdrawalObject + */ + 'fees'?: FiatMoneyUsd; + /** + * Reason for the return. + * @type {string} + * @memberof UnwithdrawalObject + */ + 'reason'?: string; + /** + * Status of the return. A `pending` status indicates that the return is in process; `complete` indicates it finished successfully; `failed` indicates it failed. + * @type {string} + * @memberof UnwithdrawalObject + */ + 'status'?: UnwithdrawalObjectStatusEnum; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof UnwithdrawalObject + */ + 'createDate'?: string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof UnwithdrawalObject + */ + 'updateDate'?: string; +} + +export const UnwithdrawalObjectStatusEnum = { + Pending: 'pending', + Complete: 'complete', + Failed: 'failed' +} as const; + +export type UnwithdrawalObjectStatusEnum = typeof UnwithdrawalObjectStatusEnum[keyof typeof UnwithdrawalObjectStatusEnum]; + +/** + * + * @export + * @interface UpdateCardResponse + */ +export interface UpdateCardResponse { + /** + * + * @type {Card} + * @memberof UpdateCardResponse + */ + 'data'?: Card; +} +/** + * Indicates the failure reason of the card verification. Only present on cards with failed verification. Possible values are [verification_failed, verification_fraud_detected, verification_denied, verification_not_supported_by_issuer, verification_stopped_by_issuer, card_failed, card_invalid, card_address_mismatch, card_zip_mismatch, card_cvv_invalid, card_expired, card_limit_violated, card_not_honored, card_cvv_required, credit_card_not_allowed, card_account_ineligible, card_network_unsupported]\' + * @export + * @enum {string} + */ + +export const VerificationErrorCode = { + VerificationFailed: 'verification_failed', + VerificationFraudDetected: 'verification_fraud_detected', + VerificationDenied: 'verification_denied', + VerificationNotSupportedByIssuer: 'verification_not_supported_by_issuer', + VerificationStoppedByIssuer: 'verification_stopped_by_issuer', + CardFailed: 'card_failed', + CardInvalid: 'card_invalid', + CardAddressMismatch: 'card_address_mismatch', + CardZipMismatch: 'card_zip_mismatch', + CardCvvInvalid: 'card_cvv_invalid', + CardExpired: 'card_expired', + CardLimitViolated: 'card_limit_violated', + CardNotHonored: 'card_not_honored', + CardCvvRequired: 'card_cvv_required', + CreditCardNotAllowed: 'credit_card_not_allowed', + CardAccountIneligible: 'card_account_ineligible', + CardNetworkUnsupported: 'card_network_unsupported' +} as const; + +export type VerificationErrorCode = typeof VerificationErrorCode[keyof typeof VerificationErrorCode]; + + +/** + * + * @export + * @interface Wallet + */ +export interface Wallet { + /** + * Wallet identifier. Numeric value but should be treated as a string as format may change in the future\' + * @type {string} + * @memberof Wallet + */ + 'walletId'?: string; + /** + * Universally unique identifier (UUID v4) of the entity that owns the wallet. + * @type {string} + * @memberof Wallet + */ + 'entityId'?: string; + /** + * Wallet type. + * @type {string} + * @memberof Wallet + */ + 'type'?: WalletTypeEnum; + /** + * A human-friendly, non-unique identifier for a wallet. + * @type {string} + * @memberof Wallet + */ + 'description'?: string; + /** + * A list of balances for currencies owned by the wallet. + * @type {Array} + * @memberof Wallet + */ + 'balances'?: Array; +} + +export const WalletTypeEnum = { + EndUserWallet: 'end_user_wallet' +} as const; + +export type WalletTypeEnum = typeof WalletTypeEnum[keyof typeof WalletTypeEnum]; + +/** + * + * @export + * @interface WalletCreationRequest + */ +export interface WalletCreationRequest { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof WalletCreationRequest + */ + 'idempotencyKey': string; + /** + * A human-friendly, non-unique identifier for a wallet. + * @type {string} + * @memberof WalletCreationRequest + */ + 'description'?: string; +} +/** + * + * @export + * @interface WalletLocation + */ +export interface WalletLocation { + /** + * + * @type {string} + * @memberof WalletLocation + */ + 'type': WalletLocationTypeEnum; + /** + * The id of the wallet. + * @type {string} + * @memberof WalletLocation + */ + 'id': string; +} + +export const WalletLocationTypeEnum = { + Wallet: 'wallet' +} as const; + +export type WalletLocationTypeEnum = typeof WalletLocationTypeEnum[keyof typeof WalletLocationTypeEnum]; + +/** + * + * @export + * @interface Wire + */ +export interface Wire { + /** + * Unique system generated identifier for the entity. + * @type {string} + * @memberof Wire + */ + 'id': string; + /** + * + * @type {ExternalFiatAccountStatus} + * @memberof Wire + */ + 'status': ExternalFiatAccountStatus; + /** + * Bank name plus last four digits of the bank account number or IBAN. + * @type {string} + * @memberof Wire + */ + 'description': string; + /** + * Wire tracking ref that needs to be set in the wire reference to beneficiary field. + * @type {string} + * @memberof Wire + */ + 'trackingRef': string; + /** + * A UUID that uniquely identifies the account number. If the same account is used more than once, each card object will have a different id, but the fingerprint will stay the same. + * @type {string} + * @memberof Wire + */ + 'fingerprint': string; + /** + * + * @type {BillingDetails} + * @memberof Wire + */ + 'billingDetails': BillingDetails; + /** + * + * @type {BankAddress} + * @memberof Wire + */ + 'bankAddress'?: BankAddress; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof Wire + */ + 'createDate': string; + /** + * ISO-8601 UTC date/time format. + * @type {string} + * @memberof Wire + */ + 'updateDate': string; +} +/** + * @type WireCreationRequest + * Request object used to create a bank account (wires). Different fields are required depending on the bank country, see the guide documentation for the list of supported bank countries along with which ones support IBAN. + * @export + */ +export type WireCreationRequest = WireCreationRequestAccountNumber | WireCreationRequestIban | WireCreationRequestUS; + +/** + * Relevant fields for non-U.S. banks that do NOT support IBAN. + * @export + * @interface WireCreationRequestAccountNumber + */ +export interface WireCreationRequestAccountNumber { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof WireCreationRequestAccountNumber + */ + 'idempotencyKey': string; + /** + * Account number that identifies the bank account. + * @type {string} + * @memberof WireCreationRequestAccountNumber + */ + 'accountNumber': string; + /** + * The bank\'s SWIFT / BIC code. + * @type {string} + * @memberof WireCreationRequestAccountNumber + */ + 'routingNumber': string; + /** + * + * @type {BillingDetails} + * @memberof WireCreationRequestAccountNumber + */ + 'billingDetails': BillingDetails; + /** + * + * @type {BankAddressNonIban} + * @memberof WireCreationRequestAccountNumber + */ + 'bankAddress': BankAddressNonIban; +} +/** + * Relevant fields for non-U.S. bank accounts that support IBAN. + * @export + * @interface WireCreationRequestIban + */ +export interface WireCreationRequestIban { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof WireCreationRequestIban + */ + 'idempotencyKey': string; + /** + * International Bank Account Number (IBAN) for the bank account. + * @type {string} + * @memberof WireCreationRequestIban + */ + 'iban': string; + /** + * + * @type {BillingDetails} + * @memberof WireCreationRequestIban + */ + 'billingDetails': BillingDetails; + /** + * + * @type {BankAddressIbanSupported} + * @memberof WireCreationRequestIban + */ + 'bankAddress': BankAddressIbanSupported; +} +/** + * Relevant fields for U.S. bank accounts. + * @export + * @interface WireCreationRequestUS + */ +export interface WireCreationRequestUS { + /** + * Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. + * @type {string} + * @memberof WireCreationRequestUS + */ + 'idempotencyKey': string; + /** + * Account number that identifies the bank account. + * @type {string} + * @memberof WireCreationRequestUS + */ + 'accountNumber': string; + /** + * ABA routing number for the bank account. Note this has to be specific for bank wire transfers. + * @type {string} + * @memberof WireCreationRequestUS + */ + 'routingNumber': string; + /** + * + * @type {BillingDetails} + * @memberof WireCreationRequestUS + */ + 'billingDetails': BillingDetails; + /** + * + * @type {BankAddress} + * @memberof WireCreationRequestUS + */ + 'bankAddress': BankAddress; +} +/** + * + * @export + * @interface WireInstruction + */ +export interface WireInstruction { + /** + * Circle tracking reference that needs to be set in the wire reference field. + * @type {string} + * @memberof WireInstruction + */ + 'trackingRef'?: string; + /** + * + * @type {WireInstructionBeneficiary} + * @memberof WireInstruction + */ + 'beneficiary'?: WireInstructionBeneficiary; + /** + * + * @type {WireInstructionBeneficiaryBank} + * @memberof WireInstruction + */ + 'beneficiaryBank'?: WireInstructionBeneficiaryBank; +} +/** + * + * @export + * @interface WireInstructionBeneficiary + */ +export interface WireInstructionBeneficiary { + /** + * Name of the beneficiary. + * @type {string} + * @memberof WireInstructionBeneficiary + */ + 'name'?: string; + /** + * Address line 1 of the beneficiary\'s address. + * @type {string} + * @memberof WireInstructionBeneficiary + */ + 'address1'?: string; + /** + * Address line 2 of the beneficiary\'s address. + * @type {string} + * @memberof WireInstructionBeneficiary + */ + 'address2'?: string; +} +/** + * + * @export + * @interface WireInstructionBeneficiaryBank + */ +export interface WireInstructionBeneficiaryBank { + /** + * Name of the beneficiary\'s bank. + * @type {string} + * @memberof WireInstructionBeneficiaryBank + */ + 'name'?: string; + /** + * SWIFT code of the beneficiary\'s bank account. + * @type {string} + * @memberof WireInstructionBeneficiaryBank + */ + 'swiftCode'?: string; + /** + * ABA Routing number of the beneficiary\'s bank account. + * @type {string} + * @memberof WireInstructionBeneficiaryBank + */ + 'routingNumber'?: string; + /** + * Account number of the beneficiary\'s bank account. + * @type {string} + * @memberof WireInstructionBeneficiaryBank + */ + 'accountNumber'?: string; + /** + * Currency of the beneficiary\'s bank account. + * @type {string} + * @memberof WireInstructionBeneficiaryBank + */ + 'currency'?: string; + /** + * Address of the beneficiary\'s bank. + * @type {string} + * @memberof WireInstructionBeneficiaryBank + */ + 'address'?: string; + /** + * City of the beneficiary\'s bank. + * @type {string} + * @memberof WireInstructionBeneficiaryBank + */ + 'city'?: string; + /** + * Postal code of the beneficiary\'s bank. + * @type {string} + * @memberof WireInstructionBeneficiaryBank + */ + 'postalCode'?: string; + /** + * Country code of the beneficiary\'s bank. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2. + * @type {string} + * @memberof WireInstructionBeneficiaryBank + */ + 'country'?: string; +} + +/** + * ACHApi - axios parameter creator + * @export + */ +export const ACHApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Create a ACH bank account + * @param {ACHCreationRequest} [aCHCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createACHBankAccount: async (aCHCreationRequest?: ACHCreationRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/banks/ach`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(aCHCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * In the sandbox environment, create a mock ACH account and retrieve a processor token that can be used to link an ACH account. + * @summary Create a mock ACH bank account + * @param {MockAchAccountCreationRequest} [mockAchAccountCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createAchAccount: async (mockAchAccountCreationRequest?: MockAchAccountCreationRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/mocks/ach/accounts`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(mockAchAccountCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a ACH bank account + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getACHBankAccount: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getACHBankAccount', 'id', id) + const localVarPath = `/v1/banks/ach/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ACHApi - functional programming interface + * @export + */ +export const ACHApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ACHApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Create a ACH bank account + * @param {ACHCreationRequest} [aCHCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createACHBankAccount(aCHCreationRequest?: ACHCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createACHBankAccount(aCHCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * In the sandbox environment, create a mock ACH account and retrieve a processor token that can be used to link an ACH account. + * @summary Create a mock ACH bank account + * @param {MockAchAccountCreationRequest} [mockAchAccountCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createAchAccount(mockAchAccountCreationRequest?: MockAchAccountCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createAchAccount(mockAchAccountCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Get a ACH bank account + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getACHBankAccount(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getACHBankAccount(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ACHApi - factory interface + * @export + */ +export const ACHApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ACHApiFp(configuration) + return { + /** + * + * @summary Create a ACH bank account + * @param {ACHCreationRequest} [aCHCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createACHBankAccount(aCHCreationRequest?: ACHCreationRequest, options?: any): AxiosPromise { + return localVarFp.createACHBankAccount(aCHCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * In the sandbox environment, create a mock ACH account and retrieve a processor token that can be used to link an ACH account. + * @summary Create a mock ACH bank account + * @param {MockAchAccountCreationRequest} [mockAchAccountCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createAchAccount(mockAchAccountCreationRequest?: MockAchAccountCreationRequest, options?: any): AxiosPromise { + return localVarFp.createAchAccount(mockAchAccountCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a ACH bank account + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getACHBankAccount(id: string, options?: any): AxiosPromise { + return localVarFp.getACHBankAccount(id, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ACHApi - object-oriented interface + * @export + * @class ACHApi + * @extends {BaseAPI} + */ +export class ACHApi extends BaseAPI { + /** + * + * @summary Create a ACH bank account + * @param {ACHCreationRequest} [aCHCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ACHApi + */ + public createACHBankAccount(aCHCreationRequest?: ACHCreationRequest, options?: AxiosRequestConfig) { + return ACHApiFp(this.configuration).createACHBankAccount(aCHCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * In the sandbox environment, create a mock ACH account and retrieve a processor token that can be used to link an ACH account. + * @summary Create a mock ACH bank account + * @param {MockAchAccountCreationRequest} [mockAchAccountCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ACHApi + */ + public createAchAccount(mockAchAccountCreationRequest?: MockAchAccountCreationRequest, options?: AxiosRequestConfig) { + return ACHApiFp(this.configuration).createAchAccount(mockAchAccountCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get a ACH bank account + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ACHApi + */ + public getACHBankAccount(id: string, options?: AxiosRequestConfig) { + return ACHApiFp(this.configuration).getACHBankAccount(id, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * AddressesApi - axios parameter creator + * @export + */ +export const AddressesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Stores an external blockchain address. Once added, the recipient address must be verified to ensure that you know and trust each new address. + * @summary Create a recipient address + * @param {BusinessAccountRecipientAddressCreationRequest} [businessAccountRecipientAddressCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBusinessAccountRecipientAddress: async (businessAccountRecipientAddressCreationRequest?: BusinessAccountRecipientAddressCreationRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/businessAccount/wallets/addresses/recipient`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(businessAccountRecipientAddressCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you\'re requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit. + * @summary Create a deposit address + * @param {BusinessAccountGenerateAddressRequest} [businessAccountGenerateAddressRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + generateBusinessAccountDepositAddress: async (businessAccountGenerateAddressRequest?: BusinessAccountGenerateAddressRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/businessAccount/wallets/addresses/deposit`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(businessAccountGenerateAddressRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List all deposit addresses + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountDepositAddresses: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/businessAccount/wallets/addresses/deposit`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of recipient addresses that have each been verified and are eligible for transfers. Any recipient addresses pending verification are not included in the response. + * @summary List all recipient addresses + * @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} + */ + getBusinessAccountRecipientAddresses: async (from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/businessAccount/wallets/addresses/recipient`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (from !== undefined) { + localVarQueryParameter['from'] = (from as any instanceof Date) ? + (from as any).toISOString() : + from; + } + + if (to !== undefined) { + localVarQueryParameter['to'] = (to as any instanceof Date) ? + (to as any).toISOString() : + to; + } + + if (pageBefore !== undefined) { + localVarQueryParameter['pageBefore'] = pageBefore; + } + + if (pageAfter !== undefined) { + localVarQueryParameter['pageAfter'] = pageAfter; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AddressesApi - functional programming interface + * @export + */ +export const AddressesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AddressesApiAxiosParamCreator(configuration) + return { + /** + * Stores an external blockchain address. Once added, the recipient address must be verified to ensure that you know and trust each new address. + * @summary Create a recipient address + * @param {BusinessAccountRecipientAddressCreationRequest} [businessAccountRecipientAddressCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createBusinessAccountRecipientAddress(businessAccountRecipientAddressCreationRequest?: BusinessAccountRecipientAddressCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createBusinessAccountRecipientAddress(businessAccountRecipientAddressCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you\'re requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit. + * @summary Create a deposit address + * @param {BusinessAccountGenerateAddressRequest} [businessAccountGenerateAddressRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async generateBusinessAccountDepositAddress(businessAccountGenerateAddressRequest?: BusinessAccountGenerateAddressRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.generateBusinessAccountDepositAddress(businessAccountGenerateAddressRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary List all deposit addresses + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBusinessAccountDepositAddresses(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBusinessAccountDepositAddresses(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of recipient addresses that have each been verified and are eligible for transfers. Any recipient addresses pending verification are not included in the response. + * @summary List all recipient addresses + * @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} + */ + async getBusinessAccountRecipientAddresses(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBusinessAccountRecipientAddresses(from, to, pageBefore, pageAfter, pageSize, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * AddressesApi - factory interface + * @export + */ +export const AddressesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AddressesApiFp(configuration) + return { + /** + * Stores an external blockchain address. Once added, the recipient address must be verified to ensure that you know and trust each new address. + * @summary Create a recipient address + * @param {BusinessAccountRecipientAddressCreationRequest} [businessAccountRecipientAddressCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBusinessAccountRecipientAddress(businessAccountRecipientAddressCreationRequest?: BusinessAccountRecipientAddressCreationRequest, options?: any): AxiosPromise { + return localVarFp.createBusinessAccountRecipientAddress(businessAccountRecipientAddressCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you\'re requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit. + * @summary Create a deposit address + * @param {BusinessAccountGenerateAddressRequest} [businessAccountGenerateAddressRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + generateBusinessAccountDepositAddress(businessAccountGenerateAddressRequest?: BusinessAccountGenerateAddressRequest, options?: any): AxiosPromise { + return localVarFp.generateBusinessAccountDepositAddress(businessAccountGenerateAddressRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List all deposit addresses + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountDepositAddresses(options?: any): AxiosPromise { + return localVarFp.getBusinessAccountDepositAddresses(options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of recipient addresses that have each been verified and are eligible for transfers. Any recipient addresses pending verification are not included in the response. + * @summary List all recipient addresses + * @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} + */ + getBusinessAccountRecipientAddresses(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise { + return localVarFp.getBusinessAccountRecipientAddresses(from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AddressesApi - object-oriented interface + * @export + * @class AddressesApi + * @extends {BaseAPI} + */ +export class AddressesApi extends BaseAPI { + /** + * Stores an external blockchain address. Once added, the recipient address must be verified to ensure that you know and trust each new address. + * @summary Create a recipient address + * @param {BusinessAccountRecipientAddressCreationRequest} [businessAccountRecipientAddressCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApi + */ + public createBusinessAccountRecipientAddress(businessAccountRecipientAddressCreationRequest?: BusinessAccountRecipientAddressCreationRequest, options?: AxiosRequestConfig) { + return AddressesApiFp(this.configuration).createBusinessAccountRecipientAddress(businessAccountRecipientAddressCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you\'re requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit. + * @summary Create a deposit address + * @param {BusinessAccountGenerateAddressRequest} [businessAccountGenerateAddressRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApi + */ + public generateBusinessAccountDepositAddress(businessAccountGenerateAddressRequest?: BusinessAccountGenerateAddressRequest, options?: AxiosRequestConfig) { + return AddressesApiFp(this.configuration).generateBusinessAccountDepositAddress(businessAccountGenerateAddressRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List all deposit addresses + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddressesApi + */ + public getBusinessAccountDepositAddresses(options?: AxiosRequestConfig) { + return AddressesApiFp(this.configuration).getBusinessAccountDepositAddresses(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of recipient addresses that have each been verified and are eligible for transfers. Any recipient addresses pending verification are not included in the response. + * @summary List all recipient addresses + * @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 AddressesApi + */ + public getBusinessAccountRecipientAddresses(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) { + return AddressesApiFp(this.configuration).getBusinessAccountRecipientAddresses(from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * BalancesApi - axios parameter creator + * @export + */ +export const BalancesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Retrieves the balance of merchant funds that have settled and also of funds that have been sent for processing but have not yet settled. + * @summary List all balances + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBalances: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/balances`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieves the balance of funds that are available for use. + * @summary List all balances + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountBalances: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/businessAccount/balances`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * BalancesApi - functional programming interface + * @export + */ +export const BalancesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = BalancesApiAxiosParamCreator(configuration) + return { + /** + * Retrieves the balance of merchant funds that have settled and also of funds that have been sent for processing but have not yet settled. + * @summary List all balances + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBalances(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBalances(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Retrieves the balance of funds that are available for use. + * @summary List all balances + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBusinessAccountBalances(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBusinessAccountBalances(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * BalancesApi - factory interface + * @export + */ +export const BalancesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = BalancesApiFp(configuration) + return { + /** + * Retrieves the balance of merchant funds that have settled and also of funds that have been sent for processing but have not yet settled. + * @summary List all balances + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBalances(options?: any): AxiosPromise { + return localVarFp.getBalances(options).then((request) => request(axios, basePath)); + }, + /** + * Retrieves the balance of funds that are available for use. + * @summary List all balances + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountBalances(options?: any): AxiosPromise { + return localVarFp.getBusinessAccountBalances(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * BalancesApi - object-oriented interface + * @export + * @class BalancesApi + * @extends {BaseAPI} + */ +export class BalancesApi extends BaseAPI { + /** + * Retrieves the balance of merchant funds that have settled and also of funds that have been sent for processing but have not yet settled. + * @summary List all balances + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BalancesApi + */ + public getBalances(options?: AxiosRequestConfig) { + return BalancesApiFp(this.configuration).getBalances(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieves the balance of funds that are available for use. + * @summary List all balances + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BalancesApi + */ + public getBusinessAccountBalances(options?: AxiosRequestConfig) { + return BalancesApiFp(this.configuration).getBusinessAccountBalances(options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * CardsApi - axios parameter creator + * @export + */ +export const CardsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Create a card + * @param {CardCreationRequest} [cardCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createCard: async (cardCreationRequest?: CardCreationRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/cards`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(cardCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a card + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCard: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getCard', 'id', id) + const localVarPath = `/v1/cards/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List all cards + * @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} + */ + getCards: async (pageBefore?: string, pageAfter?: string, pageSize?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/cards`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (pageBefore !== undefined) { + localVarQueryParameter['pageBefore'] = pageBefore; + } + + if (pageAfter !== undefined) { + localVarQueryParameter['pageAfter'] = pageAfter; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Update a card + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {CardUpdate} [cardUpdate] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateCard: async (id: string, cardUpdate?: CardUpdate, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateCard', 'id', id) + const localVarPath = `/v1/cards/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(cardUpdate, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * CardsApi - functional programming interface + * @export + */ +export const CardsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = CardsApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Create a card + * @param {CardCreationRequest} [cardCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createCard(cardCreationRequest?: CardCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createCard(cardCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Get a card + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCard(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCard(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary List all cards + * @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} + */ + async getCards(pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCards(pageBefore, pageAfter, pageSize, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Update a card + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {CardUpdate} [cardUpdate] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateCard(id: string, cardUpdate?: CardUpdate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateCard(id, cardUpdate, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * CardsApi - factory interface + * @export + */ +export const CardsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = CardsApiFp(configuration) + return { + /** + * + * @summary Create a card + * @param {CardCreationRequest} [cardCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createCard(cardCreationRequest?: CardCreationRequest, options?: any): AxiosPromise { + return localVarFp.createCard(cardCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a card + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCard(id: string, options?: any): AxiosPromise { + return localVarFp.getCard(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List all cards + * @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} + */ + getCards(pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise { + return localVarFp.getCards(pageBefore, pageAfter, pageSize, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Update a card + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {CardUpdate} [cardUpdate] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateCard(id: string, cardUpdate?: CardUpdate, options?: any): AxiosPromise { + return localVarFp.updateCard(id, cardUpdate, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * CardsApi - object-oriented interface + * @export + * @class CardsApi + * @extends {BaseAPI} + */ +export class CardsApi extends BaseAPI { + /** + * + * @summary Create a card + * @param {CardCreationRequest} [cardCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CardsApi + */ + public createCard(cardCreationRequest?: CardCreationRequest, options?: AxiosRequestConfig) { + return CardsApiFp(this.configuration).createCard(cardCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get a card + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CardsApi + */ + public getCard(id: string, options?: AxiosRequestConfig) { + return CardsApiFp(this.configuration).getCard(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List all cards + * @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 CardsApi + */ + public getCards(pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) { + return CardsApiFp(this.configuration).getCards(pageBefore, pageAfter, pageSize, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Update a card + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {CardUpdate} [cardUpdate] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CardsApi + */ + public updateCard(id: string, cardUpdate?: CardUpdate, options?: AxiosRequestConfig) { + return CardsApiFp(this.configuration).updateCard(id, cardUpdate, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * ChannelsApi - axios parameter creator + * @export + */ +export const ChannelsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Retrieve a list of channels with details (e.g. `cardDescriptor`, `achDescriptor`, etc.). + * @summary List all channels + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listChannels: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/channels`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ChannelsApi - functional programming interface + * @export + */ +export const ChannelsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ChannelsApiAxiosParamCreator(configuration) + return { + /** + * Retrieve a list of channels with details (e.g. `cardDescriptor`, `achDescriptor`, etc.). + * @summary List all channels + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listChannels(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listChannels(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ChannelsApi - factory interface + * @export + */ +export const ChannelsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ChannelsApiFp(configuration) + return { + /** + * Retrieve a list of channels with details (e.g. `cardDescriptor`, `achDescriptor`, etc.). + * @summary List all channels + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listChannels(options?: any): AxiosPromise { + return localVarFp.listChannels(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ChannelsApi - object-oriented interface + * @export + * @class ChannelsApi + * @extends {BaseAPI} + */ +export class ChannelsApi extends BaseAPI { + /** + * Retrieve a list of channels with details (e.g. `cardDescriptor`, `achDescriptor`, etc.). + * @summary List all channels + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelsApi + */ + public listChannels(options?: AxiosRequestConfig) { + return ChannelsApiFp(this.configuration).listChannels(options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * ChargebacksApi - axios parameter creator + * @export + */ +export const ChargebacksApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * 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: async (mockChargebackCreationRequest?: MockChargebackCreationRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/mocks/cards/chargebacks`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(mockChargebackCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a chargeback + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getChargeback: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getChargeback', 'id', id) + const localVarPath = `/v1/chargebacks/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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} + */ + getChargebacks: async (paymentId?: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/chargebacks`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (paymentId !== undefined) { + localVarQueryParameter['paymentId'] = paymentId; + } + + if (from !== undefined) { + localVarQueryParameter['from'] = (from as any instanceof Date) ? + (from as any).toISOString() : + from; + } + + if (to !== undefined) { + localVarQueryParameter['to'] = (to as any instanceof Date) ? + (to as any).toISOString() : + to; + } + + if (pageBefore !== undefined) { + localVarQueryParameter['pageBefore'] = pageBefore; + } + + if (pageAfter !== undefined) { + localVarQueryParameter['pageAfter'] = pageAfter; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ChargebacksApi - functional programming interface + * @export + */ +export const ChargebacksApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ChargebacksApiAxiosParamCreator(configuration) + return { + /** + * 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} + */ + async createMockChargeback(mockChargebackCreationRequest?: MockChargebackCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createMockChargeback(mockChargebackCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Get a chargeback + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getChargeback(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getChargeback(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * 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} + */ + async getChargebacks(paymentId?: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getChargebacks(paymentId, from, to, pageBefore, pageAfter, pageSize, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ChargebacksApi - factory interface + * @export + */ +export const ChargebacksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ChargebacksApiFp(configuration) + return { + /** + * 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 { + return localVarFp.createMockChargeback(mockChargebackCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @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 { + return localVarFp.getChargeback(id, options).then((request) => request(axios, basePath)); + }, + /** + * 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} + */ + getChargebacks(paymentId?: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise { + return localVarFp.getChargebacks(paymentId, from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ChargebacksApi - object-oriented interface + * @export + * @class ChargebacksApi + * @extends {BaseAPI} + */ +export 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 + */ + public createMockChargeback(mockChargebackCreationRequest?: MockChargebackCreationRequest, options?: AxiosRequestConfig) { + return ChargebacksApiFp(this.configuration).createMockChargeback(mockChargebackCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @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 + */ + public getChargeback(id: string, options?: AxiosRequestConfig) { + return ChargebacksApiFp(this.configuration).getChargeback(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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 + */ + public getChargebacks(paymentId?: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) { + return ChargebacksApiFp(this.configuration).getChargebacks(paymentId, from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * DepositsApi - axios parameter creator + * @export + */ +export const DepositsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * In the sandbox environment, initiate a mock SEN transfer that mimics the behavior of funds sent through the Silvergate SEN account linked to master wallet. + * @summary Create a mock Silvergate SEN payment + * @param {MockSenPaymentRequest} [mockSenPaymentRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSenPayment: async (mockSenPaymentRequest?: MockSenPaymentRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/mocks/payments/sen`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(mockSenPaymentRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Searches for deposits sent to your business account. If the date parameters are omitted, returns the most recent deposits. This endpoint returns up to 50 deposits in descending chronological order or pageSize, if provided. + * @summary List all deposits + * @param {'wire'} [type] Unique identifier for the deposit type. Filters results to fetch deposits made by this specific type. + * @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} + */ + searchBusinessAccountDeposits: async (type?: 'wire', from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/businessAccount/deposits`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (type !== undefined) { + localVarQueryParameter['type'] = type; + } + + if (from !== undefined) { + localVarQueryParameter['from'] = (from as any instanceof Date) ? + (from as any).toISOString() : + from; + } + + if (to !== undefined) { + localVarQueryParameter['to'] = (to as any instanceof Date) ? + (to as any).toISOString() : + to; + } + + if (pageBefore !== undefined) { + localVarQueryParameter['pageBefore'] = pageBefore; + } + + if (pageAfter !== undefined) { + localVarQueryParameter['pageAfter'] = pageAfter; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * DepositsApi - functional programming interface + * @export + */ +export const DepositsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = DepositsApiAxiosParamCreator(configuration) + return { + /** + * In the sandbox environment, initiate a mock SEN transfer that mimics the behavior of funds sent through the Silvergate SEN account linked to master wallet. + * @summary Create a mock Silvergate SEN payment + * @param {MockSenPaymentRequest} [mockSenPaymentRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createSenPayment(mockSenPaymentRequest?: MockSenPaymentRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSenPayment(mockSenPaymentRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Searches for deposits sent to your business account. If the date parameters are omitted, returns the most recent deposits. This endpoint returns up to 50 deposits in descending chronological order or pageSize, if provided. + * @summary List all deposits + * @param {'wire'} [type] Unique identifier for the deposit type. Filters results to fetch deposits made by this specific type. + * @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} + */ + async searchBusinessAccountDeposits(type?: 'wire', from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchBusinessAccountDeposits(type, from, to, pageBefore, pageAfter, pageSize, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * DepositsApi - factory interface + * @export + */ +export const DepositsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = DepositsApiFp(configuration) + return { + /** + * In the sandbox environment, initiate a mock SEN transfer that mimics the behavior of funds sent through the Silvergate SEN account linked to master wallet. + * @summary Create a mock Silvergate SEN payment + * @param {MockSenPaymentRequest} [mockSenPaymentRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSenPayment(mockSenPaymentRequest?: MockSenPaymentRequest, options?: any): AxiosPromise { + return localVarFp.createSenPayment(mockSenPaymentRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Searches for deposits sent to your business account. If the date parameters are omitted, returns the most recent deposits. This endpoint returns up to 50 deposits in descending chronological order or pageSize, if provided. + * @summary List all deposits + * @param {'wire'} [type] Unique identifier for the deposit type. Filters results to fetch deposits made by this specific type. + * @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} + */ + searchBusinessAccountDeposits(type?: 'wire', from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise { + return localVarFp.searchBusinessAccountDeposits(type, from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * DepositsApi - object-oriented interface + * @export + * @class DepositsApi + * @extends {BaseAPI} + */ +export class DepositsApi extends BaseAPI { + /** + * In the sandbox environment, initiate a mock SEN transfer that mimics the behavior of funds sent through the Silvergate SEN account linked to master wallet. + * @summary Create a mock Silvergate SEN payment + * @param {MockSenPaymentRequest} [mockSenPaymentRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DepositsApi + */ + public createSenPayment(mockSenPaymentRequest?: MockSenPaymentRequest, options?: AxiosRequestConfig) { + return DepositsApiFp(this.configuration).createSenPayment(mockSenPaymentRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Searches for deposits sent to your business account. If the date parameters are omitted, returns the most recent deposits. This endpoint returns up to 50 deposits in descending chronological order or pageSize, if provided. + * @summary List all deposits + * @param {'wire'} [type] Unique identifier for the deposit type. Filters results to fetch deposits made by this specific type. + * @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 DepositsApi + */ + public searchBusinessAccountDeposits(type?: 'wire', from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) { + return DepositsApiFp(this.configuration).searchBusinessAccountDeposits(type, from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * EncryptionApi - axios parameter creator + * @export + */ +export const EncryptionApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Retrieves an RSA public key to be used in encrypting data sent to the API. Your public keys change infrequently, so we encourage you to cache this response value locally for a duration of 24 hours or more. + * @summary Get public key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPublicKey: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/encryption/public`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * EncryptionApi - functional programming interface + * @export + */ +export const EncryptionApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = EncryptionApiAxiosParamCreator(configuration) + return { + /** + * Retrieves an RSA public key to be used in encrypting data sent to the API. Your public keys change infrequently, so we encourage you to cache this response value locally for a duration of 24 hours or more. + * @summary Get public key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getPublicKey(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPublicKey(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * EncryptionApi - factory interface + * @export + */ +export const EncryptionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = EncryptionApiFp(configuration) + return { + /** + * Retrieves an RSA public key to be used in encrypting data sent to the API. Your public keys change infrequently, so we encourage you to cache this response value locally for a duration of 24 hours or more. + * @summary Get public key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPublicKey(options?: any): AxiosPromise { + return localVarFp.getPublicKey(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * EncryptionApi - object-oriented interface + * @export + * @class EncryptionApi + * @extends {BaseAPI} + */ +export class EncryptionApi extends BaseAPI { + /** + * Retrieves an RSA public key to be used in encrypting data sent to the API. Your public keys change infrequently, so we encourage you to cache this response value locally for a duration of 24 hours or more. + * @summary Get public key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EncryptionApi + */ + public getPublicKey(options?: AxiosRequestConfig) { + return EncryptionApiFp(this.configuration).getPublicKey(options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * HealthApi - axios parameter creator + * @export + */ +export const HealthApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Checks that the service is running. + * @summary Ping + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + rootPing: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/ping`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * HealthApi - functional programming interface + * @export + */ +export const HealthApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = HealthApiAxiosParamCreator(configuration) + return { + /** + * Checks that the service is running. + * @summary Ping + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async rootPing(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.rootPing(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * HealthApi - factory interface + * @export + */ +export const HealthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = HealthApiFp(configuration) + return { + /** + * Checks that the service is running. + * @summary Ping + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + rootPing(options?: any): AxiosPromise { + return localVarFp.rootPing(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * HealthApi - object-oriented interface + * @export + * @class HealthApi + * @extends {BaseAPI} + */ +export class HealthApi extends BaseAPI { + /** + * Checks that the service is running. + * @summary Ping + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof HealthApi + */ + public rootPing(options?: AxiosRequestConfig) { + return HealthApiFp(this.configuration).rootPing(options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * ManagementApi - axios parameter creator + * @export + */ +export const ManagementApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Retrieves general configuration information. + * @summary Get configuration info + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConfig: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/configuration`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ManagementApi - functional programming interface + * @export + */ +export const ManagementApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ManagementApiAxiosParamCreator(configuration) + return { + /** + * Retrieves general configuration information. + * @summary Get configuration info + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getConfig(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getConfig(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ManagementApi - factory interface + * @export + */ +export const ManagementApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ManagementApiFp(configuration) + return { + /** + * Retrieves general configuration information. + * @summary Get configuration info + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConfig(options?: any): AxiosPromise { + return localVarFp.getConfig(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ManagementApi - object-oriented interface + * @export + * @class ManagementApi + * @extends {BaseAPI} + */ +export class ManagementApi extends BaseAPI { + /** + * Retrieves general configuration information. + * @summary Get configuration info + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ManagementApi + */ + public getConfig(options?: AxiosRequestConfig) { + return ManagementApiFp(this.configuration).getConfig(options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * PaymentsApi - axios parameter creator + * @export + */ +export const PaymentsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * The payment will be voided if possible meaning the payment source will not be charged & the payment will never settle. Otherwise, the payment will be refunded meaning the payment source will be charged & the payment will be refunded from deductions of future settlements. Not all payments are eligible to be cancelled. A successful response does *not* mean the payment has been cancelled; it only means the cancellation request is successfully submitted. + * @summary Cancel a payment + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {CancelCreationRequest} [cancelCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelPayment: async (id: string, cancelCreationRequest?: CancelCreationRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('cancelPayment', 'id', id) + const localVarPath = `/v1/payments/{id}/cancel` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(cancelCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Warning: Please contact Circle support if you are planning on using this feature. The given amount will be captured for the authorized payment if possible. If no amount is specified, the full amount will be captured. You can only capture once per authorization. A successful response does *not* mean the payment has been captured. It only means the capture request was successfully submitted. + * @summary Capture a payment (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {CaptureCreationRequest} [captureCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + capturePayment: async (id: string, captureCreationRequest?: CaptureCreationRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('capturePayment', 'id', id) + const localVarPath = `/v1/payments/{id}/capture` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(captureCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Create a payment + * @param {PaymentCreationRequest} [paymentCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createPayment: async (paymentCreationRequest?: PaymentCreationRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/payments`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(paymentCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * In the sandbox environment, initiate a mock SEPA payment that mimics the behavior of funds sent through the bank (SEPA) account linked to master wallet. + * @summary Create a mock SEPA payment + * @param {MockSepaPaymentRequest} [mockSepaPaymentRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSepaPayment: async (mockSepaPaymentRequest?: MockSepaPaymentRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/mocks/payments/sepa`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(mockSepaPaymentRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * In the sandbox environment, initiate a mock wire payment that mimics the behavior of funds sent through the bank (wire) account linked to master wallet. + * @summary Create a mock Wire payment + * @param {MockWirePaymentRequest} [mockWirePaymentRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createWirePayment: async (mockWirePaymentRequest?: MockWirePaymentRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/mocks/payments/wire`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(mockWirePaymentRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a payment + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPayment: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPayment', 'id', id) + const localVarPath = `/v1/payments/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List all payments + * @param {string} [source] Universally unique identifier (UUID v4) for the source. Filters results to fetch only payments made from the provdided source. + * @param {string} [settlementId] Queries items with the specified settlement id. Matches any settlement id if unspecified. + * @param {Array<'card' | 'wire' | 'ach' | 'sepa'>} [type] Source account type. Filters the results to fetch all payments made from a specified account type. Matches any source type if unspecified. + * @param {'pending' | 'confirmed' | 'paid' | 'failed' | 'action_required'} [status] Queries items with the specified status. Matches any status if unspecified. + * @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} + */ + getPayments: async (source?: string, settlementId?: string, type?: Array<'card' | 'wire' | 'ach' | 'sepa'>, status?: 'pending' | 'confirmed' | 'paid' | 'failed' | 'action_required', from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/payments`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (source !== undefined) { + localVarQueryParameter['source'] = source; + } + + if (settlementId !== undefined) { + localVarQueryParameter['settlementId'] = settlementId; + } + + if (type) { + localVarQueryParameter['type'] = type; + } + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (from !== undefined) { + localVarQueryParameter['from'] = (from as any instanceof Date) ? + (from as any).toISOString() : + from; + } + + if (to !== undefined) { + localVarQueryParameter['to'] = (to as any instanceof Date) ? + (to as any).toISOString() : + to; + } + + if (pageBefore !== undefined) { + localVarQueryParameter['pageBefore'] = pageBefore; + } + + if (pageAfter !== undefined) { + localVarQueryParameter['pageAfter'] = pageAfter; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * The payment source will be refunded if possible. Not all payments are eligible to be cancelled. A successful response does *not* mean the payment has been refunded; it only means the refund request is successfully submitted. + * @summary Refund a payment + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {RefundCreationRequest} [refundCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + refundPayment: async (id: string, refundCreationRequest?: RefundCreationRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('refundPayment', 'id', id) + const localVarPath = `/v1/payments/{id}/refund` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(refundCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * PaymentsApi - functional programming interface + * @export + */ +export const PaymentsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = PaymentsApiAxiosParamCreator(configuration) + return { + /** + * The payment will be voided if possible meaning the payment source will not be charged & the payment will never settle. Otherwise, the payment will be refunded meaning the payment source will be charged & the payment will be refunded from deductions of future settlements. Not all payments are eligible to be cancelled. A successful response does *not* mean the payment has been cancelled; it only means the cancellation request is successfully submitted. + * @summary Cancel a payment + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {CancelCreationRequest} [cancelCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancelPayment(id: string, cancelCreationRequest?: CancelCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelPayment(id, cancelCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Warning: Please contact Circle support if you are planning on using this feature. The given amount will be captured for the authorized payment if possible. If no amount is specified, the full amount will be captured. You can only capture once per authorization. A successful response does *not* mean the payment has been captured. It only means the capture request was successfully submitted. + * @summary Capture a payment (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {CaptureCreationRequest} [captureCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async capturePayment(id: string, captureCreationRequest?: CaptureCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.capturePayment(id, captureCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Create a payment + * @param {PaymentCreationRequest} [paymentCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createPayment(paymentCreationRequest?: PaymentCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createPayment(paymentCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * In the sandbox environment, initiate a mock SEPA payment that mimics the behavior of funds sent through the bank (SEPA) account linked to master wallet. + * @summary Create a mock SEPA payment + * @param {MockSepaPaymentRequest} [mockSepaPaymentRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createSepaPayment(mockSepaPaymentRequest?: MockSepaPaymentRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSepaPayment(mockSepaPaymentRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * In the sandbox environment, initiate a mock wire payment that mimics the behavior of funds sent through the bank (wire) account linked to master wallet. + * @summary Create a mock Wire payment + * @param {MockWirePaymentRequest} [mockWirePaymentRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createWirePayment(mockWirePaymentRequest?: MockWirePaymentRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createWirePayment(mockWirePaymentRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Get a payment + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getPayment(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPayment(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary List all payments + * @param {string} [source] Universally unique identifier (UUID v4) for the source. Filters results to fetch only payments made from the provdided source. + * @param {string} [settlementId] Queries items with the specified settlement id. Matches any settlement id if unspecified. + * @param {Array<'card' | 'wire' | 'ach' | 'sepa'>} [type] Source account type. Filters the results to fetch all payments made from a specified account type. Matches any source type if unspecified. + * @param {'pending' | 'confirmed' | 'paid' | 'failed' | 'action_required'} [status] Queries items with the specified status. Matches any status if unspecified. + * @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} + */ + async getPayments(source?: string, settlementId?: string, type?: Array<'card' | 'wire' | 'ach' | 'sepa'>, status?: 'pending' | 'confirmed' | 'paid' | 'failed' | 'action_required', from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPayments(source, settlementId, type, status, from, to, pageBefore, pageAfter, pageSize, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * The payment source will be refunded if possible. Not all payments are eligible to be cancelled. A successful response does *not* mean the payment has been refunded; it only means the refund request is successfully submitted. + * @summary Refund a payment + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {RefundCreationRequest} [refundCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async refundPayment(id: string, refundCreationRequest?: RefundCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.refundPayment(id, refundCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * PaymentsApi - factory interface + * @export + */ +export const PaymentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = PaymentsApiFp(configuration) + return { + /** + * The payment will be voided if possible meaning the payment source will not be charged & the payment will never settle. Otherwise, the payment will be refunded meaning the payment source will be charged & the payment will be refunded from deductions of future settlements. Not all payments are eligible to be cancelled. A successful response does *not* mean the payment has been cancelled; it only means the cancellation request is successfully submitted. + * @summary Cancel a payment + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {CancelCreationRequest} [cancelCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelPayment(id: string, cancelCreationRequest?: CancelCreationRequest, options?: any): AxiosPromise { + return localVarFp.cancelPayment(id, cancelCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Warning: Please contact Circle support if you are planning on using this feature. The given amount will be captured for the authorized payment if possible. If no amount is specified, the full amount will be captured. You can only capture once per authorization. A successful response does *not* mean the payment has been captured. It only means the capture request was successfully submitted. + * @summary Capture a payment (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {CaptureCreationRequest} [captureCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + capturePayment(id: string, captureCreationRequest?: CaptureCreationRequest, options?: any): AxiosPromise { + return localVarFp.capturePayment(id, captureCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Create a payment + * @param {PaymentCreationRequest} [paymentCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createPayment(paymentCreationRequest?: PaymentCreationRequest, options?: any): AxiosPromise { + return localVarFp.createPayment(paymentCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * In the sandbox environment, initiate a mock SEPA payment that mimics the behavior of funds sent through the bank (SEPA) account linked to master wallet. + * @summary Create a mock SEPA payment + * @param {MockSepaPaymentRequest} [mockSepaPaymentRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSepaPayment(mockSepaPaymentRequest?: MockSepaPaymentRequest, options?: any): AxiosPromise { + return localVarFp.createSepaPayment(mockSepaPaymentRequest, options).then((request) => request(axios, basePath)); + }, + /** + * In the sandbox environment, initiate a mock wire payment that mimics the behavior of funds sent through the bank (wire) account linked to master wallet. + * @summary Create a mock Wire payment + * @param {MockWirePaymentRequest} [mockWirePaymentRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createWirePayment(mockWirePaymentRequest?: MockWirePaymentRequest, options?: any): AxiosPromise { + return localVarFp.createWirePayment(mockWirePaymentRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a payment + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPayment(id: string, options?: any): AxiosPromise { + return localVarFp.getPayment(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List all payments + * @param {string} [source] Universally unique identifier (UUID v4) for the source. Filters results to fetch only payments made from the provdided source. + * @param {string} [settlementId] Queries items with the specified settlement id. Matches any settlement id if unspecified. + * @param {Array<'card' | 'wire' | 'ach' | 'sepa'>} [type] Source account type. Filters the results to fetch all payments made from a specified account type. Matches any source type if unspecified. + * @param {'pending' | 'confirmed' | 'paid' | 'failed' | 'action_required'} [status] Queries items with the specified status. Matches any status if unspecified. + * @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} + */ + getPayments(source?: string, settlementId?: string, type?: Array<'card' | 'wire' | 'ach' | 'sepa'>, status?: 'pending' | 'confirmed' | 'paid' | 'failed' | 'action_required', from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise { + return localVarFp.getPayments(source, settlementId, type, status, from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(axios, basePath)); + }, + /** + * The payment source will be refunded if possible. Not all payments are eligible to be cancelled. A successful response does *not* mean the payment has been refunded; it only means the refund request is successfully submitted. + * @summary Refund a payment + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {RefundCreationRequest} [refundCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + refundPayment(id: string, refundCreationRequest?: RefundCreationRequest, options?: any): AxiosPromise { + return localVarFp.refundPayment(id, refundCreationRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * PaymentsApi - object-oriented interface + * @export + * @class PaymentsApi + * @extends {BaseAPI} + */ +export class PaymentsApi extends BaseAPI { + /** + * The payment will be voided if possible meaning the payment source will not be charged & the payment will never settle. Otherwise, the payment will be refunded meaning the payment source will be charged & the payment will be refunded from deductions of future settlements. Not all payments are eligible to be cancelled. A successful response does *not* mean the payment has been cancelled; it only means the cancellation request is successfully submitted. + * @summary Cancel a payment + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {CancelCreationRequest} [cancelCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PaymentsApi + */ + public cancelPayment(id: string, cancelCreationRequest?: CancelCreationRequest, options?: AxiosRequestConfig) { + return PaymentsApiFp(this.configuration).cancelPayment(id, cancelCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Warning: Please contact Circle support if you are planning on using this feature. The given amount will be captured for the authorized payment if possible. If no amount is specified, the full amount will be captured. You can only capture once per authorization. A successful response does *not* mean the payment has been captured. It only means the capture request was successfully submitted. + * @summary Capture a payment (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {CaptureCreationRequest} [captureCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PaymentsApi + */ + public capturePayment(id: string, captureCreationRequest?: CaptureCreationRequest, options?: AxiosRequestConfig) { + return PaymentsApiFp(this.configuration).capturePayment(id, captureCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Create a payment + * @param {PaymentCreationRequest} [paymentCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PaymentsApi + */ + public createPayment(paymentCreationRequest?: PaymentCreationRequest, options?: AxiosRequestConfig) { + return PaymentsApiFp(this.configuration).createPayment(paymentCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * In the sandbox environment, initiate a mock SEPA payment that mimics the behavior of funds sent through the bank (SEPA) account linked to master wallet. + * @summary Create a mock SEPA payment + * @param {MockSepaPaymentRequest} [mockSepaPaymentRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PaymentsApi + */ + public createSepaPayment(mockSepaPaymentRequest?: MockSepaPaymentRequest, options?: AxiosRequestConfig) { + return PaymentsApiFp(this.configuration).createSepaPayment(mockSepaPaymentRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * In the sandbox environment, initiate a mock wire payment that mimics the behavior of funds sent through the bank (wire) account linked to master wallet. + * @summary Create a mock Wire payment + * @param {MockWirePaymentRequest} [mockWirePaymentRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PaymentsApi + */ + public createWirePayment(mockWirePaymentRequest?: MockWirePaymentRequest, options?: AxiosRequestConfig) { + return PaymentsApiFp(this.configuration).createWirePayment(mockWirePaymentRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get a payment + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PaymentsApi + */ + public getPayment(id: string, options?: AxiosRequestConfig) { + return PaymentsApiFp(this.configuration).getPayment(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List all payments + * @param {string} [source] Universally unique identifier (UUID v4) for the source. Filters results to fetch only payments made from the provdided source. + * @param {string} [settlementId] Queries items with the specified settlement id. Matches any settlement id if unspecified. + * @param {Array<'card' | 'wire' | 'ach' | 'sepa'>} [type] Source account type. Filters the results to fetch all payments made from a specified account type. Matches any source type if unspecified. + * @param {'pending' | 'confirmed' | 'paid' | 'failed' | 'action_required'} [status] Queries items with the specified status. Matches any status if unspecified. + * @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 PaymentsApi + */ + public getPayments(source?: string, settlementId?: string, type?: Array<'card' | 'wire' | 'ach' | 'sepa'>, status?: 'pending' | 'confirmed' | 'paid' | 'failed' | 'action_required', from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) { + return PaymentsApiFp(this.configuration).getPayments(source, settlementId, type, status, from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * The payment source will be refunded if possible. Not all payments are eligible to be cancelled. A successful response does *not* mean the payment has been refunded; it only means the refund request is successfully submitted. + * @summary Refund a payment + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {RefundCreationRequest} [refundCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PaymentsApi + */ + public refundPayment(id: string, refundCreationRequest?: RefundCreationRequest, options?: AxiosRequestConfig) { + return PaymentsApiFp(this.configuration).refundPayment(id, refundCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * PayoutsApi - axios parameter creator + * @export + */ +export const PayoutsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Create a payout + * @param {BusinessAccountPayoutCreationRequest} [businessAccountPayoutCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBusinessAccountPayout: async (businessAccountPayoutCreationRequest?: BusinessAccountPayoutCreationRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/businessAccount/payouts`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(businessAccountPayoutCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Create a payout + * @param {PayoutCreationRequest} [payoutCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createPayout: async (payoutCreationRequest?: PayoutCreationRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/payouts`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(payoutCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a payout + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountPayout: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getBusinessAccountPayout', 'id', id) + const localVarPath = `/v1/businessAccount/payouts/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List all payouts + * @param {string} [destination] Universally unique identifier (UUID v4) for the destination bank account. Filters the results to fetch all payouts made to a destination bank account. + * @param {'wire'} [type] Destination bank account type. Filters the results to fetch all payouts made to a specified destination bank account type. This query parameter can be passed multiple times to fetch results matching multiple destination bank account types. + * @param {Array} [status] Queries items with the specified status. Matches any status if unspecified. + * @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} + */ + getBusinessAccountPayouts: async (destination?: string, type?: 'wire', status?: Array, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/businessAccount/payouts`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (destination !== undefined) { + localVarQueryParameter['destination'] = destination; + } + + if (type !== undefined) { + localVarQueryParameter['type'] = type; + } + + if (status) { + localVarQueryParameter['status'] = status; + } + + if (from !== undefined) { + localVarQueryParameter['from'] = (from as any instanceof Date) ? + (from as any).toISOString() : + from; + } + + if (to !== undefined) { + localVarQueryParameter['to'] = (to as any instanceof Date) ? + (to as any).toISOString() : + to; + } + + if (pageBefore !== undefined) { + localVarQueryParameter['pageBefore'] = pageBefore; + } + + if (pageAfter !== undefined) { + localVarQueryParameter['pageAfter'] = pageAfter; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a payout + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPayout: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPayout', 'id', id) + const localVarPath = `/v1/payouts/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List all payouts + * @param {string} [source] Universally unique identifier (UUID v4) for the source wallet. Filters the results to fetch all payouts made from a source wallet. If not provided, payouts from all wallets will be returned. + * @param {Array} [type] Destination bank account type. Filters the results to fetch all payouts made to a specified destination bank account type. This query parameter can be passed multiple times to fetch results matching multiple destination bank account types. + * @param {Array} [status] Queries items with the specified status. Matches any status if unspecified. + * @param {string} [destination] Universally unique identifier (UUID v4) for the destination bank account. Filters the results to fetch all payouts made to a destination bank account. + * @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} + */ + getPayouts: async (source?: string, type?: Array, status?: Array, destination?: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/payouts`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (source !== undefined) { + localVarQueryParameter['source'] = source; + } + + if (type) { + localVarQueryParameter['type'] = type; + } + + if (status) { + localVarQueryParameter['status'] = status; + } + + if (destination !== undefined) { + localVarQueryParameter['destination'] = destination; + } + + if (from !== undefined) { + localVarQueryParameter['from'] = (from as any instanceof Date) ? + (from as any).toISOString() : + from; + } + + if (to !== undefined) { + localVarQueryParameter['to'] = (to as any instanceof Date) ? + (to as any).toISOString() : + to; + } + + if (pageBefore !== undefined) { + localVarQueryParameter['pageBefore'] = pageBefore; + } + + if (pageAfter !== undefined) { + localVarQueryParameter['pageAfter'] = pageAfter; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * PayoutsApi - functional programming interface + * @export + */ +export const PayoutsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = PayoutsApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Create a payout + * @param {BusinessAccountPayoutCreationRequest} [businessAccountPayoutCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createBusinessAccountPayout(businessAccountPayoutCreationRequest?: BusinessAccountPayoutCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createBusinessAccountPayout(businessAccountPayoutCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Create a payout + * @param {PayoutCreationRequest} [payoutCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createPayout(payoutCreationRequest?: PayoutCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createPayout(payoutCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Get a payout + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBusinessAccountPayout(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBusinessAccountPayout(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary List all payouts + * @param {string} [destination] Universally unique identifier (UUID v4) for the destination bank account. Filters the results to fetch all payouts made to a destination bank account. + * @param {'wire'} [type] Destination bank account type. Filters the results to fetch all payouts made to a specified destination bank account type. This query parameter can be passed multiple times to fetch results matching multiple destination bank account types. + * @param {Array} [status] Queries items with the specified status. Matches any status if unspecified. + * @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} + */ + async getBusinessAccountPayouts(destination?: string, type?: 'wire', status?: Array, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBusinessAccountPayouts(destination, type, status, from, to, pageBefore, pageAfter, pageSize, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Get a payout + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getPayout(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPayout(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary List all payouts + * @param {string} [source] Universally unique identifier (UUID v4) for the source wallet. Filters the results to fetch all payouts made from a source wallet. If not provided, payouts from all wallets will be returned. + * @param {Array} [type] Destination bank account type. Filters the results to fetch all payouts made to a specified destination bank account type. This query parameter can be passed multiple times to fetch results matching multiple destination bank account types. + * @param {Array} [status] Queries items with the specified status. Matches any status if unspecified. + * @param {string} [destination] Universally unique identifier (UUID v4) for the destination bank account. Filters the results to fetch all payouts made to a destination bank account. + * @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} + */ + async getPayouts(source?: string, type?: Array, status?: Array, destination?: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPayouts(source, type, status, destination, from, to, pageBefore, pageAfter, pageSize, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * PayoutsApi - factory interface + * @export + */ +export const PayoutsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = PayoutsApiFp(configuration) + return { + /** + * + * @summary Create a payout + * @param {BusinessAccountPayoutCreationRequest} [businessAccountPayoutCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBusinessAccountPayout(businessAccountPayoutCreationRequest?: BusinessAccountPayoutCreationRequest, options?: any): AxiosPromise { + return localVarFp.createBusinessAccountPayout(businessAccountPayoutCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Create a payout + * @param {PayoutCreationRequest} [payoutCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createPayout(payoutCreationRequest?: PayoutCreationRequest, options?: any): AxiosPromise { + return localVarFp.createPayout(payoutCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a payout + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountPayout(id: string, options?: any): AxiosPromise { + return localVarFp.getBusinessAccountPayout(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List all payouts + * @param {string} [destination] Universally unique identifier (UUID v4) for the destination bank account. Filters the results to fetch all payouts made to a destination bank account. + * @param {'wire'} [type] Destination bank account type. Filters the results to fetch all payouts made to a specified destination bank account type. This query parameter can be passed multiple times to fetch results matching multiple destination bank account types. + * @param {Array} [status] Queries items with the specified status. Matches any status if unspecified. + * @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} + */ + getBusinessAccountPayouts(destination?: string, type?: 'wire', status?: Array, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise { + return localVarFp.getBusinessAccountPayouts(destination, type, status, from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a payout + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPayout(id: string, options?: any): AxiosPromise { + return localVarFp.getPayout(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List all payouts + * @param {string} [source] Universally unique identifier (UUID v4) for the source wallet. Filters the results to fetch all payouts made from a source wallet. If not provided, payouts from all wallets will be returned. + * @param {Array} [type] Destination bank account type. Filters the results to fetch all payouts made to a specified destination bank account type. This query parameter can be passed multiple times to fetch results matching multiple destination bank account types. + * @param {Array} [status] Queries items with the specified status. Matches any status if unspecified. + * @param {string} [destination] Universally unique identifier (UUID v4) for the destination bank account. Filters the results to fetch all payouts made to a destination bank account. + * @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} + */ + getPayouts(source?: string, type?: Array, status?: Array, destination?: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise { + return localVarFp.getPayouts(source, type, status, destination, from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * PayoutsApi - object-oriented interface + * @export + * @class PayoutsApi + * @extends {BaseAPI} + */ +export class PayoutsApi extends BaseAPI { + /** + * + * @summary Create a payout + * @param {BusinessAccountPayoutCreationRequest} [businessAccountPayoutCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PayoutsApi + */ + public createBusinessAccountPayout(businessAccountPayoutCreationRequest?: BusinessAccountPayoutCreationRequest, options?: AxiosRequestConfig) { + return PayoutsApiFp(this.configuration).createBusinessAccountPayout(businessAccountPayoutCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Create a payout + * @param {PayoutCreationRequest} [payoutCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PayoutsApi + */ + public createPayout(payoutCreationRequest?: PayoutCreationRequest, options?: AxiosRequestConfig) { + return PayoutsApiFp(this.configuration).createPayout(payoutCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get a payout + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PayoutsApi + */ + public getBusinessAccountPayout(id: string, options?: AxiosRequestConfig) { + return PayoutsApiFp(this.configuration).getBusinessAccountPayout(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List all payouts + * @param {string} [destination] Universally unique identifier (UUID v4) for the destination bank account. Filters the results to fetch all payouts made to a destination bank account. + * @param {'wire'} [type] Destination bank account type. Filters the results to fetch all payouts made to a specified destination bank account type. This query parameter can be passed multiple times to fetch results matching multiple destination bank account types. + * @param {Array} [status] Queries items with the specified status. Matches any status if unspecified. + * @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 PayoutsApi + */ + public getBusinessAccountPayouts(destination?: string, type?: 'wire', status?: Array, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) { + return PayoutsApiFp(this.configuration).getBusinessAccountPayouts(destination, type, status, from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get a payout + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PayoutsApi + */ + public getPayout(id: string, options?: AxiosRequestConfig) { + return PayoutsApiFp(this.configuration).getPayout(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List all payouts + * @param {string} [source] Universally unique identifier (UUID v4) for the source wallet. Filters the results to fetch all payouts made from a source wallet. If not provided, payouts from all wallets will be returned. + * @param {Array} [type] Destination bank account type. Filters the results to fetch all payouts made to a specified destination bank account type. This query parameter can be passed multiple times to fetch results matching multiple destination bank account types. + * @param {Array} [status] Queries items with the specified status. Matches any status if unspecified. + * @param {string} [destination] Universally unique identifier (UUID v4) for the destination bank account. Filters the results to fetch all payouts made to a destination bank account. + * @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 PayoutsApi + */ + public getPayouts(source?: string, type?: Array, status?: Array, destination?: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) { + return PayoutsApiFp(this.configuration).getPayouts(source, type, status, destination, from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * ReturnsApi - axios parameter creator + * @export + */ +export const ReturnsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Retrieve a list of Wire and ACH payout returns. Results will be sorted by create date descending; more recent returns will be at the beginning of the list. + * @summary List all payout returns + * @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} + */ + getReturns: async (from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/returns`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (from !== undefined) { + localVarQueryParameter['from'] = (from as any instanceof Date) ? + (from as any).toISOString() : + from; + } + + if (to !== undefined) { + localVarQueryParameter['to'] = (to as any instanceof Date) ? + (to as any).toISOString() : + to; + } + + if (pageBefore !== undefined) { + localVarQueryParameter['pageBefore'] = pageBefore; + } + + if (pageAfter !== undefined) { + localVarQueryParameter['pageAfter'] = pageAfter; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ReturnsApi - functional programming interface + * @export + */ +export const ReturnsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ReturnsApiAxiosParamCreator(configuration) + return { + /** + * Retrieve a list of Wire and ACH payout returns. Results will be sorted by create date descending; more recent returns will be at the beginning of the list. + * @summary List all payout returns + * @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} + */ + async getReturns(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getReturns(from, to, pageBefore, pageAfter, pageSize, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ReturnsApi - factory interface + * @export + */ +export const ReturnsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ReturnsApiFp(configuration) + return { + /** + * Retrieve a list of Wire and ACH payout returns. Results will be sorted by create date descending; more recent returns will be at the beginning of the list. + * @summary List all payout returns + * @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} + */ + getReturns(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise { + return localVarFp.getReturns(from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ReturnsApi - object-oriented interface + * @export + * @class ReturnsApi + * @extends {BaseAPI} + */ +export class ReturnsApi extends BaseAPI { + /** + * Retrieve a list of Wire and ACH payout returns. Results will be sorted by create date descending; more recent returns will be at the beginning of the list. + * @summary List all payout returns + * @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 ReturnsApi + */ + public getReturns(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) { + return ReturnsApiFp(this.configuration).getReturns(from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * ReversalsApi - axios parameter creator + * @export + */ +export const ReversalsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Retrieve a list of ACH payment reversals. Results will be sorted by create date descending; more recent reversals will be at the beginning of the list + * @summary List all ACH payment reversals. + * @param {'pending' | 'confirmed' | 'paid' | 'failed' | 'action_required'} [status] Queries items with the specified status. Matches any status if unspecified. + * @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} + */ + getReversals: async (status?: 'pending' | 'confirmed' | 'paid' | 'failed' | 'action_required', from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/reversals`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (from !== undefined) { + localVarQueryParameter['from'] = (from as any instanceof Date) ? + (from as any).toISOString() : + from; + } + + if (to !== undefined) { + localVarQueryParameter['to'] = (to as any instanceof Date) ? + (to as any).toISOString() : + to; + } + + if (pageBefore !== undefined) { + localVarQueryParameter['pageBefore'] = pageBefore; + } + + if (pageAfter !== undefined) { + localVarQueryParameter['pageAfter'] = pageAfter; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ReversalsApi - functional programming interface + * @export + */ +export const ReversalsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ReversalsApiAxiosParamCreator(configuration) + return { + /** + * Retrieve a list of ACH payment reversals. Results will be sorted by create date descending; more recent reversals will be at the beginning of the list + * @summary List all ACH payment reversals. + * @param {'pending' | 'confirmed' | 'paid' | 'failed' | 'action_required'} [status] Queries items with the specified status. Matches any status if unspecified. + * @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} + */ + async getReversals(status?: 'pending' | 'confirmed' | 'paid' | 'failed' | 'action_required', from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getReversals(status, from, to, pageBefore, pageAfter, pageSize, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ReversalsApi - factory interface + * @export + */ +export const ReversalsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ReversalsApiFp(configuration) + return { + /** + * Retrieve a list of ACH payment reversals. Results will be sorted by create date descending; more recent reversals will be at the beginning of the list + * @summary List all ACH payment reversals. + * @param {'pending' | 'confirmed' | 'paid' | 'failed' | 'action_required'} [status] Queries items with the specified status. Matches any status if unspecified. + * @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} + */ + getReversals(status?: 'pending' | 'confirmed' | 'paid' | 'failed' | 'action_required', from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise { + return localVarFp.getReversals(status, from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ReversalsApi - object-oriented interface + * @export + * @class ReversalsApi + * @extends {BaseAPI} + */ +export class ReversalsApi extends BaseAPI { + /** + * Retrieve a list of ACH payment reversals. Results will be sorted by create date descending; more recent reversals will be at the beginning of the list + * @summary List all ACH payment reversals. + * @param {'pending' | 'confirmed' | 'paid' | 'failed' | 'action_required'} [status] Queries items with the specified status. Matches any status if unspecified. + * @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 ReversalsApi + */ + public getReversals(status?: 'pending' | 'confirmed' | 'paid' | 'failed' | 'action_required', from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) { + return ReversalsApiFp(this.configuration).getReversals(status, from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * SENApi - axios parameter creator + * @export + */ +export const SENApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Create a Silvergate SEN bank account (BETA) + * @param {SenFiatAccountCreationRequest} [senFiatAccountCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBusinessAccountSenBankAccount: async (senFiatAccountCreationRequest?: SenFiatAccountCreationRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/businessAccount/banks/sen`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(senFiatAccountCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a Silvergate SEN bank account (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountSenBankAccount: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getBusinessAccountSenBankAccount', 'id', id) + const localVarPath = `/v1/businessAccount/banks/sen/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List all Silvergate SEN bank accounts (BETA). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountSenBankAccounts: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/businessAccount/banks/sen`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get the Silvergate SEN transfer instructions into the Circle bank account given your bank account id (BETA). + * @summary Get Silvergate SEN instructions (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountSenInstructionsBankAccount: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getBusinessAccountSenInstructionsBankAccount', 'id', id) + const localVarPath = `/v1/businessAccount/banks/sen/{id}/instructions` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SENApi - functional programming interface + * @export + */ +export const SENApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SENApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Create a Silvergate SEN bank account (BETA) + * @param {SenFiatAccountCreationRequest} [senFiatAccountCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createBusinessAccountSenBankAccount(senFiatAccountCreationRequest?: SenFiatAccountCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createBusinessAccountSenBankAccount(senFiatAccountCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Get a Silvergate SEN bank account (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBusinessAccountSenBankAccount(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBusinessAccountSenBankAccount(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary List all Silvergate SEN bank accounts (BETA). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBusinessAccountSenBankAccounts(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBusinessAccountSenBankAccounts(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get the Silvergate SEN transfer instructions into the Circle bank account given your bank account id (BETA). + * @summary Get Silvergate SEN instructions (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBusinessAccountSenInstructionsBankAccount(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBusinessAccountSenInstructionsBankAccount(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * SENApi - factory interface + * @export + */ +export const SENApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SENApiFp(configuration) + return { + /** + * + * @summary Create a Silvergate SEN bank account (BETA) + * @param {SenFiatAccountCreationRequest} [senFiatAccountCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBusinessAccountSenBankAccount(senFiatAccountCreationRequest?: SenFiatAccountCreationRequest, options?: any): AxiosPromise { + return localVarFp.createBusinessAccountSenBankAccount(senFiatAccountCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a Silvergate SEN bank account (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountSenBankAccount(id: string, options?: any): AxiosPromise { + return localVarFp.getBusinessAccountSenBankAccount(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List all Silvergate SEN bank accounts (BETA). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountSenBankAccounts(options?: any): AxiosPromise { + return localVarFp.getBusinessAccountSenBankAccounts(options).then((request) => request(axios, basePath)); + }, + /** + * Get the Silvergate SEN transfer instructions into the Circle bank account given your bank account id (BETA). + * @summary Get Silvergate SEN instructions (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountSenInstructionsBankAccount(id: string, options?: any): AxiosPromise { + return localVarFp.getBusinessAccountSenInstructionsBankAccount(id, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SENApi - object-oriented interface + * @export + * @class SENApi + * @extends {BaseAPI} + */ +export class SENApi extends BaseAPI { + /** + * + * @summary Create a Silvergate SEN bank account (BETA) + * @param {SenFiatAccountCreationRequest} [senFiatAccountCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SENApi + */ + public createBusinessAccountSenBankAccount(senFiatAccountCreationRequest?: SenFiatAccountCreationRequest, options?: AxiosRequestConfig) { + return SENApiFp(this.configuration).createBusinessAccountSenBankAccount(senFiatAccountCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get a Silvergate SEN bank account (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SENApi + */ + public getBusinessAccountSenBankAccount(id: string, options?: AxiosRequestConfig) { + return SENApiFp(this.configuration).getBusinessAccountSenBankAccount(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List all Silvergate SEN bank accounts (BETA). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SENApi + */ + public getBusinessAccountSenBankAccounts(options?: AxiosRequestConfig) { + return SENApiFp(this.configuration).getBusinessAccountSenBankAccounts(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get the Silvergate SEN transfer instructions into the Circle bank account given your bank account id (BETA). + * @summary Get Silvergate SEN instructions (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SENApi + */ + public getBusinessAccountSenInstructionsBankAccount(id: string, options?: AxiosRequestConfig) { + return SENApiFp(this.configuration).getBusinessAccountSenInstructionsBankAccount(id, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * SEPAApi - axios parameter creator + * @export + */ +export const SEPAApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Create a SEPA bank account (BETA) + * @param {SEPACreationRequest} [sEPACreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSEPABankAccount: async (sEPACreationRequest?: SEPACreationRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/banks/sepa`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(sEPACreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a SEPA bank account (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSEPABankAccount: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getSEPABankAccount', 'id', id) + const localVarPath = `/v1/banks/sepa/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get the SEPA transfer instructions into the Circle bank account given your bank account id (BETA). + * @summary Get SEPA instructions (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSEPAInstructionsBankAccount: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getSEPAInstructionsBankAccount', 'id', id) + const localVarPath = `/v1/banks/sepa/{id}/instructions` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SEPAApi - functional programming interface + * @export + */ +export const SEPAApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SEPAApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Create a SEPA bank account (BETA) + * @param {SEPACreationRequest} [sEPACreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createSEPABankAccount(sEPACreationRequest?: SEPACreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSEPABankAccount(sEPACreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Get a SEPA bank account (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSEPABankAccount(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSEPABankAccount(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get the SEPA transfer instructions into the Circle bank account given your bank account id (BETA). + * @summary Get SEPA instructions (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSEPAInstructionsBankAccount(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSEPAInstructionsBankAccount(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * SEPAApi - factory interface + * @export + */ +export const SEPAApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SEPAApiFp(configuration) + return { + /** + * + * @summary Create a SEPA bank account (BETA) + * @param {SEPACreationRequest} [sEPACreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSEPABankAccount(sEPACreationRequest?: SEPACreationRequest, options?: any): AxiosPromise { + return localVarFp.createSEPABankAccount(sEPACreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a SEPA bank account (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSEPABankAccount(id: string, options?: any): AxiosPromise { + return localVarFp.getSEPABankAccount(id, options).then((request) => request(axios, basePath)); + }, + /** + * Get the SEPA transfer instructions into the Circle bank account given your bank account id (BETA). + * @summary Get SEPA instructions (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSEPAInstructionsBankAccount(id: string, options?: any): AxiosPromise { + return localVarFp.getSEPAInstructionsBankAccount(id, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SEPAApi - object-oriented interface + * @export + * @class SEPAApi + * @extends {BaseAPI} + */ +export class SEPAApi extends BaseAPI { + /** + * + * @summary Create a SEPA bank account (BETA) + * @param {SEPACreationRequest} [sEPACreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SEPAApi + */ + public createSEPABankAccount(sEPACreationRequest?: SEPACreationRequest, options?: AxiosRequestConfig) { + return SEPAApiFp(this.configuration).createSEPABankAccount(sEPACreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get a SEPA bank account (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SEPAApi + */ + public getSEPABankAccount(id: string, options?: AxiosRequestConfig) { + return SEPAApiFp(this.configuration).getSEPABankAccount(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get the SEPA transfer instructions into the Circle bank account given your bank account id (BETA). + * @summary Get SEPA instructions (BETA) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SEPAApi + */ + public getSEPAInstructionsBankAccount(id: string, options?: AxiosRequestConfig) { + return SEPAApiFp(this.configuration).getSEPAInstructionsBankAccount(id, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * SettlementsApi - axios parameter creator + * @export + */ +export const SettlementsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Get a settlement + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSettlement: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getSettlement', 'id', id) + const localVarPath = `/v1/settlements/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List all settlements + * @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} + */ + getSettlements: async (from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/settlements`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (from !== undefined) { + localVarQueryParameter['from'] = (from as any instanceof Date) ? + (from as any).toISOString() : + from; + } + + if (to !== undefined) { + localVarQueryParameter['to'] = (to as any instanceof Date) ? + (to as any).toISOString() : + to; + } + + if (pageBefore !== undefined) { + localVarQueryParameter['pageBefore'] = pageBefore; + } + + if (pageAfter !== undefined) { + localVarQueryParameter['pageAfter'] = pageAfter; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SettlementsApi - functional programming interface + * @export + */ +export const SettlementsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SettlementsApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Get a settlement + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSettlement(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSettlement(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary List all settlements + * @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} + */ + async getSettlements(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSettlements(from, to, pageBefore, pageAfter, pageSize, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * SettlementsApi - factory interface + * @export + */ +export const SettlementsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SettlementsApiFp(configuration) + return { + /** + * + * @summary Get a settlement + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSettlement(id: string, options?: any): AxiosPromise { + return localVarFp.getSettlement(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List all settlements + * @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} + */ + getSettlements(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise { + return localVarFp.getSettlements(from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SettlementsApi - object-oriented interface + * @export + * @class SettlementsApi + * @extends {BaseAPI} + */ +export class SettlementsApi extends BaseAPI { + /** + * + * @summary Get a settlement + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SettlementsApi + */ + public getSettlement(id: string, options?: AxiosRequestConfig) { + return SettlementsApiFp(this.configuration).getSettlement(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List all settlements + * @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 SettlementsApi + */ + public getSettlements(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) { + return SettlementsApiFp(this.configuration).getSettlements(from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * SignetApi - axios parameter creator + * @export + */ +export const SignetApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Create a Signet bank account (Production Only) + * @param {SignetFiatAccountCreationRequest} [signetFiatAccountCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBusinessAccountSignetBankAccount: async (signetFiatAccountCreationRequest?: SignetFiatAccountCreationRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/businessAccount/banks/signet`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(signetFiatAccountCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a Signet bank account (Production Only) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountSignetBankAccount: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getBusinessAccountSignetBankAccount', 'id', id) + const localVarPath = `/v1/businessAccount/banks/signet/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List all Signet bank accounts (Production Only). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountSignetBankAccounts: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/businessAccount/banks/signet`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get the Signet transfer instructions into the Circle bank account given your bank account id (only available on Production now). + * @summary Get Signet instructions (Production Only) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountSignetInstructionsBankAccount: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getBusinessAccountSignetInstructionsBankAccount', 'id', id) + const localVarPath = `/v1/businessAccount/banks/signet/{id}/instructions` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SignetApi - functional programming interface + * @export + */ +export const SignetApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SignetApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Create a Signet bank account (Production Only) + * @param {SignetFiatAccountCreationRequest} [signetFiatAccountCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createBusinessAccountSignetBankAccount(signetFiatAccountCreationRequest?: SignetFiatAccountCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createBusinessAccountSignetBankAccount(signetFiatAccountCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Get a Signet bank account (Production Only) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBusinessAccountSignetBankAccount(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBusinessAccountSignetBankAccount(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary List all Signet bank accounts (Production Only). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBusinessAccountSignetBankAccounts(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBusinessAccountSignetBankAccounts(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get the Signet transfer instructions into the Circle bank account given your bank account id (only available on Production now). + * @summary Get Signet instructions (Production Only) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBusinessAccountSignetInstructionsBankAccount(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBusinessAccountSignetInstructionsBankAccount(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * SignetApi - factory interface + * @export + */ +export const SignetApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SignetApiFp(configuration) + return { + /** + * + * @summary Create a Signet bank account (Production Only) + * @param {SignetFiatAccountCreationRequest} [signetFiatAccountCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBusinessAccountSignetBankAccount(signetFiatAccountCreationRequest?: SignetFiatAccountCreationRequest, options?: any): AxiosPromise { + return localVarFp.createBusinessAccountSignetBankAccount(signetFiatAccountCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a Signet bank account (Production Only) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountSignetBankAccount(id: string, options?: any): AxiosPromise { + return localVarFp.getBusinessAccountSignetBankAccount(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List all Signet bank accounts (Production Only). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountSignetBankAccounts(options?: any): AxiosPromise { + return localVarFp.getBusinessAccountSignetBankAccounts(options).then((request) => request(axios, basePath)); + }, + /** + * Get the Signet transfer instructions into the Circle bank account given your bank account id (only available on Production now). + * @summary Get Signet instructions (Production Only) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountSignetInstructionsBankAccount(id: string, options?: any): AxiosPromise { + return localVarFp.getBusinessAccountSignetInstructionsBankAccount(id, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SignetApi - object-oriented interface + * @export + * @class SignetApi + * @extends {BaseAPI} + */ +export class SignetApi extends BaseAPI { + /** + * + * @summary Create a Signet bank account (Production Only) + * @param {SignetFiatAccountCreationRequest} [signetFiatAccountCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SignetApi + */ + public createBusinessAccountSignetBankAccount(signetFiatAccountCreationRequest?: SignetFiatAccountCreationRequest, options?: AxiosRequestConfig) { + return SignetApiFp(this.configuration).createBusinessAccountSignetBankAccount(signetFiatAccountCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get a Signet bank account (Production Only) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SignetApi + */ + public getBusinessAccountSignetBankAccount(id: string, options?: AxiosRequestConfig) { + return SignetApiFp(this.configuration).getBusinessAccountSignetBankAccount(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List all Signet bank accounts (Production Only). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SignetApi + */ + public getBusinessAccountSignetBankAccounts(options?: AxiosRequestConfig) { + return SignetApiFp(this.configuration).getBusinessAccountSignetBankAccounts(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get the Signet transfer instructions into the Circle bank account given your bank account id (only available on Production now). + * @summary Get Signet instructions (Production Only) + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SignetApi + */ + public getBusinessAccountSignetInstructionsBankAccount(id: string, options?: AxiosRequestConfig) { + return SignetApiFp(this.configuration).getBusinessAccountSignetInstructionsBankAccount(id, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * StablecoinsApi - axios parameter creator + * @export + */ +export const StablecoinsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Retrieves total circulating supply for supported stablecoins across all chains. This endpoint is rate limited to one call per minute (based on IP). + * @summary List all stablecoins + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStablecoins: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/stablecoins`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * StablecoinsApi - functional programming interface + * @export + */ +export const StablecoinsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = StablecoinsApiAxiosParamCreator(configuration) + return { + /** + * Retrieves total circulating supply for supported stablecoins across all chains. This endpoint is rate limited to one call per minute (based on IP). + * @summary List all stablecoins + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStablecoins(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStablecoins(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * StablecoinsApi - factory interface + * @export + */ +export const StablecoinsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = StablecoinsApiFp(configuration) + return { + /** + * Retrieves total circulating supply for supported stablecoins across all chains. This endpoint is rate limited to one call per minute (based on IP). + * @summary List all stablecoins + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStablecoins(options?: any): AxiosPromise { + return localVarFp.getStablecoins(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * StablecoinsApi - object-oriented interface + * @export + * @class StablecoinsApi + * @extends {BaseAPI} + */ +export class StablecoinsApi extends BaseAPI { + /** + * Retrieves total circulating supply for supported stablecoins across all chains. This endpoint is rate limited to one call per minute (based on IP). + * @summary List all stablecoins + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StablecoinsApi + */ + public getStablecoins(options?: AxiosRequestConfig) { + return StablecoinsApiFp(this.configuration).getStablecoins(options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * SubscriptionsApi - axios parameter creator + * @export + */ +export const SubscriptionsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Retrieve a list of existing notification subscriptions with details. + * @summary List all notification subscriptions + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listSubscriptions: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/notifications/subscriptions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Subscribe to receiving notifications at a given endpoint. The endpoint should be able to handle AWS SNS subscription requests. For more details see https://docs.aws.amazon.com/mobile/sdkforxamarin/developerguide/sns-send-http.html. Note, the sandbox environment allows a maximum of 3 active subscriptions; otherwise, this is limited to 1 active subscription and subsequent create requests will be rejected with a Limit Exceeded error. + * @summary Create a notification subscription + * @param {SubscriptionRequest} [subscriptionRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + subscribe: async (subscriptionRequest?: SubscriptionRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/notifications/subscriptions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(subscriptionRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * To remove a subscription, all its subscription requests\' statuses must be either \'confirmed\', \'deleted\' or a combination of those. A subscription with at least one \'pending\' subscription request cannot be removed. + * @summary Remove a notification subscription + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + unsubscribe: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('unsubscribe', 'id', id) + const localVarPath = `/v1/notifications/subscriptions/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SubscriptionsApi - functional programming interface + * @export + */ +export const SubscriptionsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SubscriptionsApiAxiosParamCreator(configuration) + return { + /** + * Retrieve a list of existing notification subscriptions with details. + * @summary List all notification subscriptions + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listSubscriptions(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSubscriptions(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Subscribe to receiving notifications at a given endpoint. The endpoint should be able to handle AWS SNS subscription requests. For more details see https://docs.aws.amazon.com/mobile/sdkforxamarin/developerguide/sns-send-http.html. Note, the sandbox environment allows a maximum of 3 active subscriptions; otherwise, this is limited to 1 active subscription and subsequent create requests will be rejected with a Limit Exceeded error. + * @summary Create a notification subscription + * @param {SubscriptionRequest} [subscriptionRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async subscribe(subscriptionRequest?: SubscriptionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.subscribe(subscriptionRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * To remove a subscription, all its subscription requests\' statuses must be either \'confirmed\', \'deleted\' or a combination of those. A subscription with at least one \'pending\' subscription request cannot be removed. + * @summary Remove a notification subscription + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async unsubscribe(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.unsubscribe(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * SubscriptionsApi - factory interface + * @export + */ +export const SubscriptionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SubscriptionsApiFp(configuration) + return { + /** + * Retrieve a list of existing notification subscriptions with details. + * @summary List all notification subscriptions + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listSubscriptions(options?: any): AxiosPromise { + return localVarFp.listSubscriptions(options).then((request) => request(axios, basePath)); + }, + /** + * Subscribe to receiving notifications at a given endpoint. The endpoint should be able to handle AWS SNS subscription requests. For more details see https://docs.aws.amazon.com/mobile/sdkforxamarin/developerguide/sns-send-http.html. Note, the sandbox environment allows a maximum of 3 active subscriptions; otherwise, this is limited to 1 active subscription and subsequent create requests will be rejected with a Limit Exceeded error. + * @summary Create a notification subscription + * @param {SubscriptionRequest} [subscriptionRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + subscribe(subscriptionRequest?: SubscriptionRequest, options?: any): AxiosPromise { + return localVarFp.subscribe(subscriptionRequest, options).then((request) => request(axios, basePath)); + }, + /** + * To remove a subscription, all its subscription requests\' statuses must be either \'confirmed\', \'deleted\' or a combination of those. A subscription with at least one \'pending\' subscription request cannot be removed. + * @summary Remove a notification subscription + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + unsubscribe(id: string, options?: any): AxiosPromise { + return localVarFp.unsubscribe(id, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SubscriptionsApi - object-oriented interface + * @export + * @class SubscriptionsApi + * @extends {BaseAPI} + */ +export class SubscriptionsApi extends BaseAPI { + /** + * Retrieve a list of existing notification subscriptions with details. + * @summary List all notification subscriptions + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SubscriptionsApi + */ + public listSubscriptions(options?: AxiosRequestConfig) { + return SubscriptionsApiFp(this.configuration).listSubscriptions(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Subscribe to receiving notifications at a given endpoint. The endpoint should be able to handle AWS SNS subscription requests. For more details see https://docs.aws.amazon.com/mobile/sdkforxamarin/developerguide/sns-send-http.html. Note, the sandbox environment allows a maximum of 3 active subscriptions; otherwise, this is limited to 1 active subscription and subsequent create requests will be rejected with a Limit Exceeded error. + * @summary Create a notification subscription + * @param {SubscriptionRequest} [subscriptionRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SubscriptionsApi + */ + public subscribe(subscriptionRequest?: SubscriptionRequest, options?: AxiosRequestConfig) { + return SubscriptionsApiFp(this.configuration).subscribe(subscriptionRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * To remove a subscription, all its subscription requests\' statuses must be either \'confirmed\', \'deleted\' or a combination of those. A subscription with at least one \'pending\' subscription request cannot be removed. + * @summary Remove a notification subscription + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SubscriptionsApi + */ + public unsubscribe(id: string, options?: AxiosRequestConfig) { + return SubscriptionsApiFp(this.configuration).unsubscribe(id, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * TransfersApi - axios parameter creator + * @export + */ +export const TransfersApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * A transfer can be made from an existing business account to a blockchain location. + * @summary Create a transfer + * @param {BusinessAccountTransferCreationRequest} [businessAccountTransferCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBusinessAccountTransfer: async (businessAccountTransferCreationRequest?: BusinessAccountTransferCreationRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/businessAccount/transfers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(businessAccountTransferCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * A transfer can be made from an existing funded wallet to a blockchain address or another wallet. + * @summary Create a transfer + * @param {TransferCreationRequest} [transferCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createTransfer: async (transferCreationRequest?: TransferCreationRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/transfers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(transferCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a transfer + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountTransfer: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getBusinessAccountTransfer', 'id', id) + const localVarPath = `/v1/businessAccount/transfers/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a transfer + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {boolean} [returnIdentities] Specify if you would like to see identities in the response. Restricts maximum returned items to 5. By default returnIdentities is false, resulting in the response not returning `data.source.identities`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTransfer: async (id: string, returnIdentities?: boolean, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getTransfer', 'id', id) + const localVarPath = `/v1/transfers/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (returnIdentities !== undefined) { + localVarQueryParameter['returnIdentities'] = returnIdentities; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Searches for transfers from your business account. If the date parameters are omitted, returns the most recent transfers. This endpoint returns up to 50 transfers in descending chronological order or pageSize, if provided. + * @summary List all transfers + * @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} + */ + searchBusinessAccountTransfers: async (from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/businessAccount/transfers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (from !== undefined) { + localVarQueryParameter['from'] = (from as any instanceof Date) ? + (from as any).toISOString() : + from; + } + + if (to !== undefined) { + localVarQueryParameter['to'] = (to as any instanceof Date) ? + (to as any).toISOString() : + to; + } + + if (pageBefore !== undefined) { + localVarQueryParameter['pageBefore'] = pageBefore; + } + + if (pageAfter !== undefined) { + localVarQueryParameter['pageAfter'] = pageAfter; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Searches for transfers involving the provided wallets. If no wallet ids are provided, searches all wallets associated with your Circle API account. If the date parameters are omitted, returns the most recent transfers. This endpoint returns up to 50 transfers in descending chronological order or pageSize, if provided. + * @summary List all transfers + * @param {string} [walletId] Unique identifier for the source or destination wallet of transfers, if any. May not be used in conjunction with destinationWalletId or sourceWalletId. Useful for fetching all transfers related to a wallet. + * @param {string} [sourceWalletId] Unique identifier for the source wallet of transfers, if any. + * @param {string} [destinationWalletId] Unique identifier for the destination wallet of transfers, if any. + * @param {boolean} [returnIdentities] Specify if you would like to see identities in the response. Restricts maximum returned items to 5. By default returnIdentities is false, resulting in the response not returning `data.source.identities`. + * @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} + */ + searchTransfers: async (walletId?: string, sourceWalletId?: string, destinationWalletId?: string, returnIdentities?: boolean, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/transfers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (walletId !== undefined) { + localVarQueryParameter['walletId'] = walletId; + } + + if (sourceWalletId !== undefined) { + localVarQueryParameter['sourceWalletId'] = sourceWalletId; + } + + if (destinationWalletId !== undefined) { + localVarQueryParameter['destinationWalletId'] = destinationWalletId; + } + + if (returnIdentities !== undefined) { + localVarQueryParameter['returnIdentities'] = returnIdentities; + } + + if (from !== undefined) { + localVarQueryParameter['from'] = (from as any instanceof Date) ? + (from as any).toISOString() : + from; + } + + if (to !== undefined) { + localVarQueryParameter['to'] = (to as any instanceof Date) ? + (to as any).toISOString() : + to; + } + + if (pageBefore !== undefined) { + localVarQueryParameter['pageBefore'] = pageBefore; + } + + if (pageAfter !== undefined) { + localVarQueryParameter['pageAfter'] = pageAfter; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TransfersApi - functional programming interface + * @export + */ +export const TransfersApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TransfersApiAxiosParamCreator(configuration) + return { + /** + * A transfer can be made from an existing business account to a blockchain location. + * @summary Create a transfer + * @param {BusinessAccountTransferCreationRequest} [businessAccountTransferCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createBusinessAccountTransfer(businessAccountTransferCreationRequest?: BusinessAccountTransferCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createBusinessAccountTransfer(businessAccountTransferCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * A transfer can be made from an existing funded wallet to a blockchain address or another wallet. + * @summary Create a transfer + * @param {TransferCreationRequest} [transferCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createTransfer(transferCreationRequest?: TransferCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createTransfer(transferCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Get a transfer + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBusinessAccountTransfer(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBusinessAccountTransfer(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Get a transfer + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {boolean} [returnIdentities] Specify if you would like to see identities in the response. Restricts maximum returned items to 5. By default returnIdentities is false, resulting in the response not returning `data.source.identities`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTransfer(id: string, returnIdentities?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTransfer(id, returnIdentities, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Searches for transfers from your business account. If the date parameters are omitted, returns the most recent transfers. This endpoint returns up to 50 transfers in descending chronological order or pageSize, if provided. + * @summary List all transfers + * @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} + */ + async searchBusinessAccountTransfers(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchBusinessAccountTransfers(from, to, pageBefore, pageAfter, pageSize, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Searches for transfers involving the provided wallets. If no wallet ids are provided, searches all wallets associated with your Circle API account. If the date parameters are omitted, returns the most recent transfers. This endpoint returns up to 50 transfers in descending chronological order or pageSize, if provided. + * @summary List all transfers + * @param {string} [walletId] Unique identifier for the source or destination wallet of transfers, if any. May not be used in conjunction with destinationWalletId or sourceWalletId. Useful for fetching all transfers related to a wallet. + * @param {string} [sourceWalletId] Unique identifier for the source wallet of transfers, if any. + * @param {string} [destinationWalletId] Unique identifier for the destination wallet of transfers, if any. + * @param {boolean} [returnIdentities] Specify if you would like to see identities in the response. Restricts maximum returned items to 5. By default returnIdentities is false, resulting in the response not returning `data.source.identities`. + * @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} + */ + async searchTransfers(walletId?: string, sourceWalletId?: string, destinationWalletId?: string, returnIdentities?: boolean, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchTransfers(walletId, sourceWalletId, destinationWalletId, returnIdentities, from, to, pageBefore, pageAfter, pageSize, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * TransfersApi - factory interface + * @export + */ +export const TransfersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TransfersApiFp(configuration) + return { + /** + * A transfer can be made from an existing business account to a blockchain location. + * @summary Create a transfer + * @param {BusinessAccountTransferCreationRequest} [businessAccountTransferCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBusinessAccountTransfer(businessAccountTransferCreationRequest?: BusinessAccountTransferCreationRequest, options?: any): AxiosPromise { + return localVarFp.createBusinessAccountTransfer(businessAccountTransferCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * A transfer can be made from an existing funded wallet to a blockchain address or another wallet. + * @summary Create a transfer + * @param {TransferCreationRequest} [transferCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createTransfer(transferCreationRequest?: TransferCreationRequest, options?: any): AxiosPromise { + return localVarFp.createTransfer(transferCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a transfer + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountTransfer(id: string, options?: any): AxiosPromise { + return localVarFp.getBusinessAccountTransfer(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a transfer + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {boolean} [returnIdentities] Specify if you would like to see identities in the response. Restricts maximum returned items to 5. By default returnIdentities is false, resulting in the response not returning `data.source.identities`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTransfer(id: string, returnIdentities?: boolean, options?: any): AxiosPromise { + return localVarFp.getTransfer(id, returnIdentities, options).then((request) => request(axios, basePath)); + }, + /** + * Searches for transfers from your business account. If the date parameters are omitted, returns the most recent transfers. This endpoint returns up to 50 transfers in descending chronological order or pageSize, if provided. + * @summary List all transfers + * @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} + */ + searchBusinessAccountTransfers(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise { + return localVarFp.searchBusinessAccountTransfers(from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(axios, basePath)); + }, + /** + * Searches for transfers involving the provided wallets. If no wallet ids are provided, searches all wallets associated with your Circle API account. If the date parameters are omitted, returns the most recent transfers. This endpoint returns up to 50 transfers in descending chronological order or pageSize, if provided. + * @summary List all transfers + * @param {string} [walletId] Unique identifier for the source or destination wallet of transfers, if any. May not be used in conjunction with destinationWalletId or sourceWalletId. Useful for fetching all transfers related to a wallet. + * @param {string} [sourceWalletId] Unique identifier for the source wallet of transfers, if any. + * @param {string} [destinationWalletId] Unique identifier for the destination wallet of transfers, if any. + * @param {boolean} [returnIdentities] Specify if you would like to see identities in the response. Restricts maximum returned items to 5. By default returnIdentities is false, resulting in the response not returning `data.source.identities`. + * @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} + */ + searchTransfers(walletId?: string, sourceWalletId?: string, destinationWalletId?: string, returnIdentities?: boolean, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise { + return localVarFp.searchTransfers(walletId, sourceWalletId, destinationWalletId, returnIdentities, from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TransfersApi - object-oriented interface + * @export + * @class TransfersApi + * @extends {BaseAPI} + */ +export class TransfersApi extends BaseAPI { + /** + * A transfer can be made from an existing business account to a blockchain location. + * @summary Create a transfer + * @param {BusinessAccountTransferCreationRequest} [businessAccountTransferCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransfersApi + */ + public createBusinessAccountTransfer(businessAccountTransferCreationRequest?: BusinessAccountTransferCreationRequest, options?: AxiosRequestConfig) { + return TransfersApiFp(this.configuration).createBusinessAccountTransfer(businessAccountTransferCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * A transfer can be made from an existing funded wallet to a blockchain address or another wallet. + * @summary Create a transfer + * @param {TransferCreationRequest} [transferCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransfersApi + */ + public createTransfer(transferCreationRequest?: TransferCreationRequest, options?: AxiosRequestConfig) { + return TransfersApiFp(this.configuration).createTransfer(transferCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get a transfer + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransfersApi + */ + public getBusinessAccountTransfer(id: string, options?: AxiosRequestConfig) { + return TransfersApiFp(this.configuration).getBusinessAccountTransfer(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get a transfer + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {boolean} [returnIdentities] Specify if you would like to see identities in the response. Restricts maximum returned items to 5. By default returnIdentities is false, resulting in the response not returning `data.source.identities`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransfersApi + */ + public getTransfer(id: string, returnIdentities?: boolean, options?: AxiosRequestConfig) { + return TransfersApiFp(this.configuration).getTransfer(id, returnIdentities, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Searches for transfers from your business account. If the date parameters are omitted, returns the most recent transfers. This endpoint returns up to 50 transfers in descending chronological order or pageSize, if provided. + * @summary List all transfers + * @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 TransfersApi + */ + public searchBusinessAccountTransfers(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) { + return TransfersApiFp(this.configuration).searchBusinessAccountTransfers(from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Searches for transfers involving the provided wallets. If no wallet ids are provided, searches all wallets associated with your Circle API account. If the date parameters are omitted, returns the most recent transfers. This endpoint returns up to 50 transfers in descending chronological order or pageSize, if provided. + * @summary List all transfers + * @param {string} [walletId] Unique identifier for the source or destination wallet of transfers, if any. May not be used in conjunction with destinationWalletId or sourceWalletId. Useful for fetching all transfers related to a wallet. + * @param {string} [sourceWalletId] Unique identifier for the source wallet of transfers, if any. + * @param {string} [destinationWalletId] Unique identifier for the destination wallet of transfers, if any. + * @param {boolean} [returnIdentities] Specify if you would like to see identities in the response. Restricts maximum returned items to 5. By default returnIdentities is false, resulting in the response not returning `data.source.identities`. + * @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 TransfersApi + */ + public searchTransfers(walletId?: string, sourceWalletId?: string, destinationWalletId?: string, returnIdentities?: boolean, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) { + return TransfersApiFp(this.configuration).searchTransfers(walletId, sourceWalletId, destinationWalletId, returnIdentities, from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * WalletsApi - axios parameter creator + * @export + */ +export const WalletsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Creates an end user wallet. + * @summary Create a wallet + * @param {WalletCreationRequest} [walletCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createWallet: async (walletCreationRequest?: WalletCreationRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/wallets`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(walletCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you\'re requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit. + * @summary Create a blockchain address + * @param {string} walletId Identifier for the wallet. + * @param {GenerateAddressRequest} [generateAddressRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + generateAddress: async (walletId: string, generateAddressRequest?: GenerateAddressRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('generateAddress', 'walletId', walletId) + const localVarPath = `/v1/wallets/{walletId}/addresses` + .replace(`{${"walletId"}}`, encodeURIComponent(String(walletId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(generateAddressRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieves a list of addresses associated with a wallet. + * @summary List all addresses + * @param {string} walletId Identifier for the wallet. + * @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} + */ + getAddresses: async (walletId: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('getAddresses', 'walletId', walletId) + const localVarPath = `/v1/wallets/{walletId}/addresses` + .replace(`{${"walletId"}}`, encodeURIComponent(String(walletId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (from !== undefined) { + localVarQueryParameter['from'] = (from as any instanceof Date) ? + (from as any).toISOString() : + from; + } + + if (to !== undefined) { + localVarQueryParameter['to'] = (to as any instanceof Date) ? + (to as any).toISOString() : + to; + } + + if (pageBefore !== undefined) { + localVarQueryParameter['pageBefore'] = pageBefore; + } + + if (pageAfter !== undefined) { + localVarQueryParameter['pageAfter'] = pageAfter; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a wallet + * @param {string} walletId Identifier for the wallet. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getWallet: async (walletId: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'walletId' is not null or undefined + assertParamExists('getWallet', 'walletId', walletId) + const localVarPath = `/v1/wallets/{walletId}` + .replace(`{${"walletId"}}`, encodeURIComponent(String(walletId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieves a list of a user\'s wallets. + * @summary List all wallets + * @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} + */ + getWallets: async (from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/wallets`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (from !== undefined) { + localVarQueryParameter['from'] = (from as any instanceof Date) ? + (from as any).toISOString() : + from; + } + + if (to !== undefined) { + localVarQueryParameter['to'] = (to as any instanceof Date) ? + (to as any).toISOString() : + to; + } + + if (pageBefore !== undefined) { + localVarQueryParameter['pageBefore'] = pageBefore; + } + + if (pageAfter !== undefined) { + localVarQueryParameter['pageAfter'] = pageAfter; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * WalletsApi - functional programming interface + * @export + */ +export const WalletsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = WalletsApiAxiosParamCreator(configuration) + return { + /** + * Creates an end user wallet. + * @summary Create a wallet + * @param {WalletCreationRequest} [walletCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createWallet(walletCreationRequest?: WalletCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createWallet(walletCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you\'re requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit. + * @summary Create a blockchain address + * @param {string} walletId Identifier for the wallet. + * @param {GenerateAddressRequest} [generateAddressRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async generateAddress(walletId: string, generateAddressRequest?: GenerateAddressRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.generateAddress(walletId, generateAddressRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Retrieves a list of addresses associated with a wallet. + * @summary List all addresses + * @param {string} walletId Identifier for the wallet. + * @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} + */ + async getAddresses(walletId: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAddresses(walletId, from, to, pageBefore, pageAfter, pageSize, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Get a wallet + * @param {string} walletId Identifier for the wallet. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getWallet(walletId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getWallet(walletId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Retrieves a list of a user\'s wallets. + * @summary List all wallets + * @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} + */ + async getWallets(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getWallets(from, to, pageBefore, pageAfter, pageSize, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * WalletsApi - factory interface + * @export + */ +export const WalletsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = WalletsApiFp(configuration) + return { + /** + * Creates an end user wallet. + * @summary Create a wallet + * @param {WalletCreationRequest} [walletCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createWallet(walletCreationRequest?: WalletCreationRequest, options?: any): AxiosPromise { + return localVarFp.createWallet(walletCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you\'re requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit. + * @summary Create a blockchain address + * @param {string} walletId Identifier for the wallet. + * @param {GenerateAddressRequest} [generateAddressRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + generateAddress(walletId: string, generateAddressRequest?: GenerateAddressRequest, options?: any): AxiosPromise { + return localVarFp.generateAddress(walletId, generateAddressRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Retrieves a list of addresses associated with a wallet. + * @summary List all addresses + * @param {string} walletId Identifier for the wallet. + * @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} + */ + getAddresses(walletId: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise { + return localVarFp.getAddresses(walletId, from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a wallet + * @param {string} walletId Identifier for the wallet. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getWallet(walletId: string, options?: any): AxiosPromise { + return localVarFp.getWallet(walletId, options).then((request) => request(axios, basePath)); + }, + /** + * Retrieves a list of a user\'s wallets. + * @summary List all wallets + * @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} + */ + getWallets(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise { + return localVarFp.getWallets(from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * WalletsApi - object-oriented interface + * @export + * @class WalletsApi + * @extends {BaseAPI} + */ +export class WalletsApi extends BaseAPI { + /** + * Creates an end user wallet. + * @summary Create a wallet + * @param {WalletCreationRequest} [walletCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletsApi + */ + public createWallet(walletCreationRequest?: WalletCreationRequest, options?: AxiosRequestConfig) { + return WalletsApiFp(this.configuration).createWallet(walletCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you\'re requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit. + * @summary Create a blockchain address + * @param {string} walletId Identifier for the wallet. + * @param {GenerateAddressRequest} [generateAddressRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletsApi + */ + public generateAddress(walletId: string, generateAddressRequest?: GenerateAddressRequest, options?: AxiosRequestConfig) { + return WalletsApiFp(this.configuration).generateAddress(walletId, generateAddressRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieves a list of addresses associated with a wallet. + * @summary List all addresses + * @param {string} walletId Identifier for the wallet. + * @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 WalletsApi + */ + public getAddresses(walletId: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) { + return WalletsApiFp(this.configuration).getAddresses(walletId, from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get a wallet + * @param {string} walletId Identifier for the wallet. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletsApi + */ + public getWallet(walletId: string, options?: AxiosRequestConfig) { + return WalletsApiFp(this.configuration).getWallet(walletId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieves a list of a user\'s wallets. + * @summary List all wallets + * @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 WalletsApi + */ + public getWallets(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) { + return WalletsApiFp(this.configuration).getWallets(from, to, pageBefore, pageAfter, pageSize, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * WiresApi - axios parameter creator + * @export + */ +export const WiresApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Create a Wire bank account + * @param {WireCreationRequest} [wireCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBusinessAccountWireBankAccount: async (wireCreationRequest?: WireCreationRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/businessAccount/banks/wires`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(wireCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Create a Wire bank account + * @param {WireCreationRequest} [wireCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createWireBankAccount: async (wireCreationRequest?: WireCreationRequest, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/banks/wires`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(wireCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a Wire bank account + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountWireBankAccount: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getBusinessAccountWireBankAccount', 'id', id) + const localVarPath = `/v1/businessAccount/banks/wires/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List all Wire bank accounts + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountWireBankAccounts: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1/businessAccount/banks/wires`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get the wire transfer instructions into the Circle bank account given your bank account id. + * @summary Get Wire instructions + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountWireInstructionsBankAccount: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getBusinessAccountWireInstructionsBankAccount', 'id', id) + const localVarPath = `/v1/businessAccount/banks/wires/{id}/instructions` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a Wire bank account + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getWireBankAccount: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getWireBankAccount', 'id', id) + const localVarPath = `/v1/banks/wires/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get the wire transfer instructions into the Circle bank account given your bank account id + * @summary Get Wire instructions + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getWireInstructionsBankAccount: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getWireInstructionsBankAccount', 'id', id) + const localVarPath = `/v1/banks/wires/{id}/instructions` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * WiresApi - functional programming interface + * @export + */ +export const WiresApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = WiresApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Create a Wire bank account + * @param {WireCreationRequest} [wireCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createBusinessAccountWireBankAccount(wireCreationRequest?: WireCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createBusinessAccountWireBankAccount(wireCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Create a Wire bank account + * @param {WireCreationRequest} [wireCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createWireBankAccount(wireCreationRequest?: WireCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createWireBankAccount(wireCreationRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Get a Wire bank account + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBusinessAccountWireBankAccount(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBusinessAccountWireBankAccount(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary List all Wire bank accounts + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBusinessAccountWireBankAccounts(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBusinessAccountWireBankAccounts(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get the wire transfer instructions into the Circle bank account given your bank account id. + * @summary Get Wire instructions + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBusinessAccountWireInstructionsBankAccount(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBusinessAccountWireInstructionsBankAccount(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Get a Wire bank account + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getWireBankAccount(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getWireBankAccount(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get the wire transfer instructions into the Circle bank account given your bank account id + * @summary Get Wire instructions + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getWireInstructionsBankAccount(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getWireInstructionsBankAccount(id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * WiresApi - factory interface + * @export + */ +export const WiresApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = WiresApiFp(configuration) + return { + /** + * + * @summary Create a Wire bank account + * @param {WireCreationRequest} [wireCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBusinessAccountWireBankAccount(wireCreationRequest?: WireCreationRequest, options?: any): AxiosPromise { + return localVarFp.createBusinessAccountWireBankAccount(wireCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Create a Wire bank account + * @param {WireCreationRequest} [wireCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createWireBankAccount(wireCreationRequest?: WireCreationRequest, options?: any): AxiosPromise { + return localVarFp.createWireBankAccount(wireCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a Wire bank account + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountWireBankAccount(id: string, options?: any): AxiosPromise { + return localVarFp.getBusinessAccountWireBankAccount(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List all Wire bank accounts + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountWireBankAccounts(options?: any): AxiosPromise { + return localVarFp.getBusinessAccountWireBankAccounts(options).then((request) => request(axios, basePath)); + }, + /** + * Get the wire transfer instructions into the Circle bank account given your bank account id. + * @summary Get Wire instructions + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBusinessAccountWireInstructionsBankAccount(id: string, options?: any): AxiosPromise { + return localVarFp.getBusinessAccountWireInstructionsBankAccount(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a Wire bank account + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getWireBankAccount(id: string, options?: any): AxiosPromise { + return localVarFp.getWireBankAccount(id, options).then((request) => request(axios, basePath)); + }, + /** + * Get the wire transfer instructions into the Circle bank account given your bank account id + * @summary Get Wire instructions + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getWireInstructionsBankAccount(id: string, options?: any): AxiosPromise { + return localVarFp.getWireInstructionsBankAccount(id, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * WiresApi - object-oriented interface + * @export + * @class WiresApi + * @extends {BaseAPI} + */ +export class WiresApi extends BaseAPI { + /** + * + * @summary Create a Wire bank account + * @param {WireCreationRequest} [wireCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WiresApi + */ + public createBusinessAccountWireBankAccount(wireCreationRequest?: WireCreationRequest, options?: AxiosRequestConfig) { + return WiresApiFp(this.configuration).createBusinessAccountWireBankAccount(wireCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Create a Wire bank account + * @param {WireCreationRequest} [wireCreationRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WiresApi + */ + public createWireBankAccount(wireCreationRequest?: WireCreationRequest, options?: AxiosRequestConfig) { + return WiresApiFp(this.configuration).createWireBankAccount(wireCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get a Wire bank account + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WiresApi + */ + public getBusinessAccountWireBankAccount(id: string, options?: AxiosRequestConfig) { + return WiresApiFp(this.configuration).getBusinessAccountWireBankAccount(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List all Wire bank accounts + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WiresApi + */ + public getBusinessAccountWireBankAccounts(options?: AxiosRequestConfig) { + return WiresApiFp(this.configuration).getBusinessAccountWireBankAccounts(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get the wire transfer instructions into the Circle bank account given your bank account id. + * @summary Get Wire instructions + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WiresApi + */ + public getBusinessAccountWireInstructionsBankAccount(id: string, options?: AxiosRequestConfig) { + return WiresApiFp(this.configuration).getBusinessAccountWireInstructionsBankAccount(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get a Wire bank account + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WiresApi + */ + public getWireBankAccount(id: string, options?: AxiosRequestConfig) { + return WiresApiFp(this.configuration).getWireBankAccount(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get the wire transfer instructions into the Circle bank account given your bank account id + * @summary Get Wire instructions + * @param {string} id Universally unique identifier (UUID v4) of a resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WiresApi + */ + public getWireInstructionsBankAccount(id: string, options?: AxiosRequestConfig) { + return WiresApiFp(this.configuration).getWireInstructionsBankAccount(id, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/base.ts b/base.ts new file mode 100644 index 0000000..35798e1 --- /dev/null +++ b/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Core Functionality + * APIs for managing your account balance. These endpoints are available with all Circle APIs. + * + * The version of the OpenAPI document: ${version} + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; + +export const BASE_PATH = "http://api-sandbox.circle.com".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: AxiosRequestConfig; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} From 604cb8bae1abbacc11e0a0d937941f438a894789 Mon Sep 17 00:00:00 2001 From: deepakgummi Date: Sat, 6 Aug 2022 22:20:27 -0500 Subject: [PATCH 3/7] Updated README.md --- README.md | 44 ++- yarn.lock | 1088 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 1126 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9979b04..1a52e20 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,42 @@ -# circle-nodejs-sdk -Node.js SDK for Circle API +# Circle APIs Node.js Library + + +The Circle Node library provides convenient access to the Circle API for +applications written in server-side JavaScript. + +## Documentation + +See the [`circle-nodejs-sdk` API docs](https://developers.circle.com/reference/ping?lang=node) for Node.js. + +## Requirements + +Node 10 or higher. + +## Installation + +Install the package with: + +```sh +npm install circleapi --save +# or +yarn add circleapi +``` + +## Development + +Run codegen: + +```sh +openapi-generator-cli generate -g typescript-axios \ +-i sdk-doc.json \ +-o . \ +-p npmName=circle,supportsES6=true,modelPropertyNaming=original \ +-t ./templates/typescript-axios --additional-properties=npmVersion=0.1.0-alpha.0,circleApiVersion=v1 +``` + +Run all tests: + +```bash +$ yarn install +$ yarn test +``` \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index da07e40..548d007 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,7 +2,1087 @@ # yarn lockfile v1 -typescript@^4.7.4: - version "4.7.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" - integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== +"@types/chai@^4.2.14": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.1.tgz#e2c6e73e0bdeb2521d00756d099218e9f5d90a04" + integrity sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ== + +"@types/mocha@^8.2.0": + version "8.2.3" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.3.tgz#bbeb55fbc73f28ea6de601fbfa4613f58d785323" + integrity sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw== + +"@types/node@^14.14.14": + version "14.18.23" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.23.tgz#70f5f20b0b1b38f696848c1d3647bb95694e615e" + integrity sha512-MhbCWN18R4GhO8ewQWAFK4TGQdBpXWByukz7cWyJmXhvRuCIaM/oWytGPqVmDzgEnnaIc9ss6HbU5mUi+vyZPA== + +"@ungap/promise-all-settled@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" + integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +abbrev@1.0.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + integrity sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q== + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + integrity sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg== + +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-regex@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" + integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@~3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + +async@1.x: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + integrity sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w== + +axios@0.21.4: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== + dependencies: + follow-redirects "^1.14.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +chai@^4.2.0: + version "4.3.6" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.6.tgz#ffe4ba2d9fa9d6680cc0b370adae709ec9011e9c" + integrity sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^3.0.1" + get-func-name "^2.0.0" + loupe "^2.3.1" + pathval "^1.1.1" + type-detect "^4.0.5" + +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== + +chokidar@3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" + integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.5.0" + optionalDependencies: + fsevents "~2.3.1" + +cli@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cli/-/cli-1.0.1.tgz#22817534f24bfa4950c34d532d48ecbc621b8c14" + integrity sha512-41U72MB56TfUMGndAKK8vJ78eooOD4Z5NOL4xEfjc0c23s+6EYKXlXsmACBVclLP1yOfWCgEganVzddVrSNoTg== + dependencies: + exit "0.1.2" + glob "^7.1.1" + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +console-browserify@1.1.x: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + integrity sha512-duS7VP5pvfsNLDvL1O4VOEbw37AI3A4ZUQYemvDlnpGrNu9tprR7BYWpDYwC0Xia0Zxz5ZupdiIrUp0GH1aXfg== + dependencies: + date-now "^0.1.4" + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + integrity sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw== + +debug@4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +deep-eql@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" + integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== + dependencies: + type-detect "^4.0.0" + +deep-is@~0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +dom-serializer@0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" + integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== + dependencies: + domelementtype "^2.0.1" + entities "^2.0.0" + +domelementtype@1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== + +domelementtype@^2.0.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + +domhandler@2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738" + integrity sha512-q9bUwjfp7Eif8jWxxxPSykdRZAb6GkguBGSgvvCrhI9wB71W2K/Kvv4E61CF/mcCfnVJDeDWx/Vb/uAqbDj6UQ== + dependencies: + domelementtype "1" + +domutils@1.5: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + integrity sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw== + dependencies: + dom-serializer "0" + domelementtype "1" + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +entities@1.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26" + integrity sha512-LbLqfXgJMmy81t+7c14mnulFHJ170cM6E+0vMXR9k/ZiZwgX8i5pNgjTCX3SO4VeUsFLV+8InixoretwU+MjBQ== + +entities@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escodegen@1.8.x: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + integrity sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A== + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +esprima@2.7.x, esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + integrity sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A== + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + integrity sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +exit@0.1.2, exit@0.1.x: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== + +expect.js@0.3.x: + version "0.3.1" + resolved "https://registry.yarnpkg.com/expect.js/-/expect.js-0.3.1.tgz#b0a59a0d2eff5437544ebf0ceaa6015841d09b5b" + integrity sha512-okDF/FAPEul1ZFLae4hrgpIqAeapoo5TRdcg/lD0iN9S3GWrBFIJwNezGH1DMtIz+RxU4RrFmMq7WUUvDg3J6A== + +fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +follow-redirects@^1.14.0: + version "1.15.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" + integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== + +glob-parent@~5.1.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^5.0.15: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + integrity sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA== + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.1: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +handlebars@^4.0.1: + version "4.7.7" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== + dependencies: + minimist "^1.2.5" + neo-async "^2.6.0" + source-map "^0.6.1" + wordwrap "^1.0.0" + optionalDependencies: + uglify-js "^3.1.4" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + integrity sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +htmlparser2@3.8.x: + version "3.8.3" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068" + integrity sha512-hBxEg3CYXe+rPIua8ETe7tmG3XDn9B0edOE/e9wH2nLczxzgdu0m0aNHY+5wFZiviLWLdANPJTssa92dMcXQ5Q== + dependencies: + domelementtype "1" + domhandler "2.3" + domutils "1.5" + entities "1.0" + readable-stream "1.1" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@~2.0.1: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +istanbul@^0.4.5: + version "0.4.5" + resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" + integrity sha512-nMtdn4hvK0HjUlzr1DrKSUY8ychprt8dzHOgY2KXsIhHu5PuQQEOTM27gV9Xblyon7aUH/TSFIjRHEODF/FRPg== + dependencies: + abbrev "1.0.x" + async "1.x" + escodegen "1.8.x" + esprima "2.7.x" + glob "^5.0.15" + handlebars "^4.0.1" + js-yaml "3.x" + mkdirp "0.5.x" + nopt "3.x" + once "1.x" + resolve "1.1.x" + supports-color "^3.1.0" + which "^1.1.1" + wordwrap "^1.0.0" + +js-yaml@3.x: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" + integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== + dependencies: + argparse "^2.0.1" + +jshint@^2.11.0: + version "2.13.5" + resolved "https://registry.yarnpkg.com/jshint/-/jshint-2.13.5.tgz#34654b44387ef112b39c205e2e70b99385376579" + integrity sha512-dB2n1w3OaQ35PLcBGIWXlszjbPZwsgZoxsg6G8PtNf2cFMC1l0fObkYLUuXqTTdi6tKw4sAjfUseTdmDMHQRcg== + dependencies: + cli "~1.0.0" + console-browserify "1.1.x" + exit "0.1.x" + htmlparser2 "3.8.x" + lodash "~4.17.21" + minimatch "~3.0.2" + strip-json-comments "1.0.x" + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash@~4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" + integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== + dependencies: + chalk "^4.0.0" + +loupe@^2.3.1: + version "2.3.4" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.4.tgz#7e0b9bffc76f148f9be769cb1321d3dcf3cb25f3" + integrity sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ== + dependencies: + get-func-name "^2.0.0" + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimatch@~3.0.2: + version "3.0.8" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.8.tgz#5e6a59bd11e2ab0de1cfb843eb2d82e546c321c1" + integrity sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.5, minimist@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== + +mkdirp@0.5.x: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mocha@8.x: + version "8.4.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.4.0.tgz#677be88bf15980a3cae03a73e10a0fc3997f0cff" + integrity sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ== + dependencies: + "@ungap/promise-all-settled" "1.1.2" + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.1" + debug "4.3.1" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.1.6" + growl "1.10.5" + he "1.2.0" + js-yaml "4.0.0" + log-symbols "4.0.0" + minimatch "3.0.4" + ms "2.1.3" + nanoid "3.1.20" + serialize-javascript "5.0.1" + strip-json-comments "3.1.1" + supports-color "8.1.1" + which "2.0.2" + wide-align "1.1.3" + workerpool "6.1.0" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +nanoid@3.1.20: + version "3.1.20" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788" + integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== + +neo-async@^2.6.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +nopt@3.x: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + integrity sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg== + dependencies: + abbrev "1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +once@1.x, once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +readable-stream@1.1: + version "1.1.13" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e" + integrity sha512-E98tWzqShvKDGpR2MbjsDkDQWLW2TfWUC15H4tNQhIJ5Lsta84l8nUGL9/ybltGwe+wZzWPpc1Kmd2wQP4bdCA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readdirp@~3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" + integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== + dependencies: + picomatch "^2.2.1" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +resolve@1.1.x: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg== + +safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +serialize-javascript@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" + integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== + dependencies: + randombytes "^2.1.0" + +source-map-support@^0.5.17: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + integrity sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA== + dependencies: + amdefine ">=0.0.4" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +"string-width@^1.0.2 || 2": + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-json-comments@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" + integrity sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg== + +strip-json-comments@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-color@^3.1.0: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + integrity sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A== + dependencies: + has-flag "^1.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +ts-node@^9.1.1: + version "9.1.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d" + integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg== + dependencies: + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + source-map-support "^0.5.17" + yn "3.1.1" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== + dependencies: + prelude-ls "~1.1.2" + +type-detect@^4.0.0, type-detect@^4.0.5: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +typescript@4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" + integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== + +uglify-js@^3.1.4: + version "3.16.3" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.16.3.tgz#94c7a63337ee31227a18d03b8a3041c210fd1f1d" + integrity sha512-uVbFqx9vvLhQg0iBaau9Z75AxWJ8tqM9AV890dIZCLApF4rTcyHwmAvLeEdYRs+BzYWu8Iw81F79ah0EfTXbaw== + +which@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +which@^1.1.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wide-align@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wordwrap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== + +workerpool@6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b" + integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg== + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From 704fac2104be3759e33f02d5a332d783710ef6ff Mon Sep 17 00:00:00 2001 From: deepakgummi Date: Mon, 8 Aug 2022 13:27:43 -0500 Subject: [PATCH 4/7] Clean up --- .dockerignore | 2 - .eslintrc.json | 89 ------------------- .gitignore | 3 + .npmignore | 8 -- .npmrc | 2 - .prettierrc | 7 -- Dockerfile | 13 --- LICENSE | 22 ++--- README.md | 8 +- .../codegen/.openapi-generator-ignore | 0 .../codegen/.openapi-generator}/FILES | 0 src/codegen/.openapi-generator/VERSION | 1 + api.ts => src/codegen/api.ts | 0 base.ts => src/codegen/base.ts | 0 common.ts => src/codegen/common.ts | 0 .../codegen/configuration.ts | 0 index.ts => src/codegen/index.ts | 0 17 files changed, 13 insertions(+), 142 deletions(-) delete mode 100644 .dockerignore delete mode 100644 .eslintrc.json delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 .prettierrc delete mode 100644 Dockerfile rename .openapi-generator-ignore => src/codegen/.openapi-generator-ignore (100%) rename {.openapi-generator => src/codegen/.openapi-generator}/FILES (100%) create mode 100644 src/codegen/.openapi-generator/VERSION rename api.ts => src/codegen/api.ts (100%) rename base.ts => src/codegen/base.ts (100%) rename common.ts => src/codegen/common.ts (100%) rename configuration.ts => src/codegen/configuration.ts (100%) rename index.ts => src/codegen/index.ts (100%) diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 5171c54..0000000 --- a/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -npm-debug.log \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 3d66c9a..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "parserOptions": { - "ecmaVersion": 6 - }, - "rules": { - "no-empty": [ - 2, - { - "allowEmptyCatch": true - } - ], - "no-implicit-coercion": [ - 2, - { - "boolean": true, - "string": true, - "number": true - } - ], - "indent": [2, 2], - "brace-style": [ - 2, - "1tbs", - { - "allowSingleLine": true - } - ], - "no-mixed-spaces-and-tabs": 2, - "no-multi-str": 2, - "key-spacing": [ - 2, - { - "beforeColon": false, - "afterColon": true - } - ], - "space-unary-ops": [ - 2, - { - "words": false, - "nonwords": false - } - ], - "space-before-function-paren": [2, "never"], - "array-bracket-spacing": [ - 2, - "never", - { - "singleValue": false - } - ], - "space-in-parens": [2, "never"], - "no-trailing-spaces": 2, - "yoda": [2, "never"], - "max-len": [2, 79], - "comma-style": [2, "last"], - "curly": [2, "all"], - "dot-notation": 2, - "eol-last": 2, - "wrap-iife": 2, - "space-infix-ops": 2, - "keyword-spacing": [ - 2, - { - "overrides": { - "else": { - "before": true - }, - "catch": { - "before": true - }, - "finally": { - "before": true - } - } - } - ], - "spaced-comment": [2, "always"], - "space-before-blocks": [2, "always"], - "linebreak-style": [2, "unix"], - "quotes": [ - 2, - "single", - { - "avoidEscape": true - } - ] - } -} diff --git a/.gitignore b/.gitignore index 6704566..48af755 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,6 @@ dist # TernJS port file .tern-port + +#openapi +openapitools.json diff --git a/.npmignore b/.npmignore deleted file mode 100644 index de69c00..0000000 --- a/.npmignore +++ /dev/null @@ -1,8 +0,0 @@ -/test/ -/.gitignore -/.jscsrc -/.jshintrc -/Makefile -/PUBLISHING.md -/circle.yml -/tsconfig.json diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 6ff93b8..0000000 --- a/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -registry=https://registry.npmjs.com -package-lock = false \ No newline at end of file diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 59a856f..0000000 --- a/.prettierrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "bracketSpacing": true, - "semi": true, - "singleQuote": true, - "trailingComma": "all", - "arrowParens": "always" -} diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 82e8696..0000000 --- a/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM node:15 - -# Create app directory -WORKDIR /usr/src/app - -# Copy app to directory -COPY . /usr/src/app - -RUN npm install - -CMD ["make", "test"] - - diff --git a/LICENSE b/LICENSE index 4a2a817..77d5ea7 100755 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,9 @@ -The MIT License +MIT License -Copyright (c) 2021 Plaid Inc. +Copyright (c) 2022 Circle Internet Financial, LLC. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 1a52e20..dcc0278 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Node 10 or higher. ## Installation -Install the package with: +Install the package with: (still not published) ```sh npm install circleapi --save @@ -24,14 +24,14 @@ yarn add circleapi ## Development -Run codegen: +To run the codegen: ```sh openapi-generator-cli generate -g typescript-axios \ -i sdk-doc.json \ --o . \ +-o ./src/codegen/ \ -p npmName=circle,supportsES6=true,modelPropertyNaming=original \ --t ./templates/typescript-axios --additional-properties=npmVersion=0.1.0-alpha.0,circleApiVersion=v1 +-t ./templates/typescript-axios --additional-properties=npmVersion=0.1.0-alpha.0,circleApiVersion=v1 ``` Run all tests: diff --git a/.openapi-generator-ignore b/src/codegen/.openapi-generator-ignore similarity index 100% rename from .openapi-generator-ignore rename to src/codegen/.openapi-generator-ignore diff --git a/.openapi-generator/FILES b/src/codegen/.openapi-generator/FILES similarity index 100% rename from .openapi-generator/FILES rename to src/codegen/.openapi-generator/FILES diff --git a/src/codegen/.openapi-generator/VERSION b/src/codegen/.openapi-generator/VERSION new file mode 100644 index 0000000..6d54bbd --- /dev/null +++ b/src/codegen/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.0.1 \ No newline at end of file diff --git a/api.ts b/src/codegen/api.ts similarity index 100% rename from api.ts rename to src/codegen/api.ts diff --git a/base.ts b/src/codegen/base.ts similarity index 100% rename from base.ts rename to src/codegen/base.ts diff --git a/common.ts b/src/codegen/common.ts similarity index 100% rename from common.ts rename to src/codegen/common.ts diff --git a/configuration.ts b/src/codegen/configuration.ts similarity index 100% rename from configuration.ts rename to src/codegen/configuration.ts diff --git a/index.ts b/src/codegen/index.ts similarity index 100% rename from index.ts rename to src/codegen/index.ts From b769f16039456382d1b215815543c6c3b6dec854 Mon Sep 17 00:00:00 2001 From: deepakgummi Date: Mon, 8 Aug 2022 14:36:09 -0500 Subject: [PATCH 5/7] Added npmrc to avoid creating package-lock.json --- .npmrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..c1ca392 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock = false From d61279a83290e572dcd48850fc1d74e210bd0d81 Mon Sep 17 00:00:00 2001 From: deepakgummi Date: Tue, 9 Aug 2022 12:24:47 -0500 Subject: [PATCH 6/7] Resolved review comments --- README.md | 4 +- sdk-doc.json | 10843 ------------------------------------------------- 2 files changed, 2 insertions(+), 10845 deletions(-) delete mode 100644 sdk-doc.json diff --git a/README.md b/README.md index dcc0278..4d76c8b 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,9 @@ Node 10 or higher. Install the package with: (still not published) ```sh -npm install circleapi --save +npm install circle-sdk --save # or -yarn add circleapi +yarn add circle-sdk ``` ## Development diff --git a/sdk-doc.json b/sdk-doc.json deleted file mode 100644 index aaddbcb..0000000 --- a/sdk-doc.json +++ /dev/null @@ -1,10843 +0,0 @@ -{ - "openapi": "3.0.2", - "servers": [ - { - "url": "api-sandbox.circle.com" - } - ], - "info": { - "version": "${version}", - "title": "Core Functionality", - "description": "APIs for managing your account balance. These endpoints are available with all Circle APIs." - }, - "tags": [ - { - "name": "Balances" - }, - { - "name": "Payouts" - }, - { - "name": "Wires" - }, - { - "name": "Signet" - }, - { - "name": "SEN" - }, - { - "name": "Transfers" - }, - { - "name": "Addresses" - }, - { - "name": "Deposits" - }, - { - "name": "Wallets" - }, - { - "name": "Health", - "description": "Inspect the health of the API." - }, - { - "name": "Management", - "description": "General account and management information." - }, - { - "name": "Encryption", - "description": "Encrypt sensitive data." - }, - { - "name": "Subscriptions", - "description": "Manage subscriptions to notifications." - }, - { - "name": "Stablecoins", - "description": "Retrieve stablecoins and their respective names, symbols, circulating total and per-chain amounts." - }, - { - "name": "Channels", - "description": "View a list of channels." - }, - { - "name": "Payments" - }, - { - "name": "On-chain payments" - }, - { - "name": "Cards" - }, - { - "name": "ACH" - }, - { - "name": "SEPA" - }, - { - "name": "Settlements" - }, - { - "name": "Chargebacks" - }, - { - "name": "Reversals" - }, - { - "name": "On-chain payouts" - }, - { - "name": "Returns" - } - ], - "paths": { - "/v1/businessAccount/balances": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "List all balances", - "description": "Retrieves the balance of funds that are available for use.", - "operationId": "getBusinessAccountBalances", - "tags": [ - "Balances" - ], - "responses": { - "200": { - "description": "Successfully retrieved balances.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetBusinessAccountBalancesResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Balances" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "available": [ - { - "amount": "3.14", - "currency": "USD" - } - ], - "unsettled": [ - { - "amount": "3.14", - "currency": "USD" - } - ] - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/businessAccount/payouts": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/destination" - }, - { - "name": "type", - "description": "Destination bank account type. Filters the results to fetch all payouts made to a specified destination bank account type. This query parameter can be passed multiple times to fetch results matching multiple destination bank account types.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "wire" - ] - } - }, - { - "name": "status", - "description": "Queries items with the specified status. Matches any status if unspecified.", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayoutStatus" - } - } - }, - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } - ], - "summary": "List all payouts", - "operationId": "getBusinessAccountPayouts", - "tags": [ - "Payouts" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of payouts.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetBusinessAccountPayoutsResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayoutBusinessAccount" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "sourceWalletId": "53535335", - "destination": { - "type": "wire", - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "name": "COMMERZBANK AG ****3000" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "status": "pending", - "trackingRef": "CIR-6ESOQANEP3NAO", - "errorCode": "insufficient_funds", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "adjustments": { - "fxCredit": { - "amount": "3.14", - "currency": "USD" - }, - "fxDebit": { - "amount": "3.14", - "currency": "USD" - } - }, - "return": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "reason": "payout_returned", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - ] - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - }, - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a payout", - "operationId": "createBusinessAccountPayout", - "tags": [ - "Payouts" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BusinessAccountPayoutCreationRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully created a payout.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreateBusinessAccountPayoutResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/PayoutBusinessAccount" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "sourceWalletId": "53535335", - "destination": { - "type": "wire", - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "name": "COMMERZBANK AG ****3000" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "status": "pending", - "trackingRef": "CIR-6ESOQANEP3NAO", - "errorCode": "insufficient_funds", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "adjustments": { - "fxCredit": { - "amount": "3.14", - "currency": "USD" - }, - "fxDebit": { - "amount": "3.14", - "currency": "USD" - } - }, - "return": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "reason": "payout_returned", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/businessAccount/payouts/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a payout", - "operationId": "getBusinessAccountPayout", - "tags": [ - "Payouts" - ], - "responses": { - "200": { - "description": "Successfully retrieved a payout.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetBusinessAccountPayoutResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/PayoutBusinessAccount" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "sourceWalletId": "53535335", - "destination": { - "type": "wire", - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "name": "COMMERZBANK AG ****3000" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "status": "pending", - "trackingRef": "CIR-6ESOQANEP3NAO", - "errorCode": "insufficient_funds", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "adjustments": { - "fxCredit": { - "amount": "3.14", - "currency": "USD" - }, - "fxDebit": { - "amount": "3.14", - "currency": "USD" - } - }, - "return": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "reason": "payout_returned", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/businessAccount/banks/wires": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a Wire bank account", - "operationId": "createBusinessAccountWireBankAccount", - "tags": [ - "Wires" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WireCreationRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully created a bank account for wire transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreateBusinessAccountWireBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Wire" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "description": "WELLS FARGO BANK, NA ****0010", - "trackingRef": "CIR13FB13A", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, - "bankAddress": { - "bankName": "SAN FRANCISCO", - "city": "SAN FRANCISCO", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "CA" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - }, - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "List all Wire bank accounts", - "operationId": "getBusinessAccountWireBankAccounts", - "tags": [ - "Wires" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of bank accounts.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Wire" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "description": "WELLS FARGO BANK, NA ****0010", - "trackingRef": "CIR13FB13A", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, - "bankAddress": { - "bankName": "SAN FRANCISCO", - "city": "SAN FRANCISCO", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "CA" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - ] - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/businessAccount/banks/wires/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a Wire bank account", - "operationId": "getBusinessAccountWireBankAccount", - "tags": [ - "Wires" - ], - "responses": { - "200": { - "description": "Successfully retrieved a bank account for wire transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetBusinessAccountWireBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Wire" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "description": "WELLS FARGO BANK, NA ****0010", - "trackingRef": "CIR13FB13A", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, - "bankAddress": { - "bankName": "SAN FRANCISCO", - "city": "SAN FRANCISCO", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "CA" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/businessAccount/banks/wires/{id}/instructions": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get Wire instructions", - "description": "Get the wire transfer instructions into the Circle bank account given your bank account id.", - "operationId": "getBusinessAccountWireInstructionsBankAccount", - "tags": [ - "Wires" - ], - "responses": { - "200": { - "description": "Successfully retrieved wire transfer instructions for the bank account.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetBusinessAccountWireInstructionsBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/WireInstruction" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "trackingRef": "CIR13FB13A", - "beneficiary": { - "name": "CIRCLE INTERNET FINANCIAL INC", - "address1": "99 HIGH STREET", - "address2": "BOSTON MA 02110" - }, - "beneficiaryBank": { - "name": "SILVERGATE BANK", - "swiftCode": "SIVGUS66XXX", - "routingNumber": "322286803", - "accountNumber": "****7427", - "currency": "USD", - "address": "4250 EXECUTIVE SQUARE SUITE 300", - "city": "LA JOLLA", - "postalCode": "02110", - "country": "US" - } - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/businessAccount/banks/signet": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a Signet bank account (Production Only)", - "operationId": "createBusinessAccountSignetBankAccount", - "tags": [ - "Signet" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignetFiatAccountCreationRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully created a bank account for Signet transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreateBusinessAccountSignetBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/SignetFiatAccountResponse" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "trackingRef": "CIR13FB14A", - "walletAddress": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - }, - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "List all Signet bank accounts (Production Only).", - "operationId": "getBusinessAccountSignetBankAccounts", - "tags": [ - "Signet" - ], - "responses": { - "200": { - "description": "Successfully retrieved all bank accounts for Signet transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetBusinessAccountSignetBankAccountsResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SignetFiatAccountResponse" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "trackingRef": "CIR13FB14A", - "walletAddress": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - ] - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/businessAccount/banks/signet/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a Signet bank account (Production Only)", - "operationId": "getBusinessAccountSignetBankAccount", - "tags": [ - "Signet" - ], - "responses": { - "200": { - "description": "Successfully retrieved a bank account for Signet transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetBusinessAccountSignetBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/SignetFiatAccountResponse" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "trackingRef": "CIR13FB14A", - "walletAddress": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/businessAccount/banks/signet/{id}/instructions": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get Signet instructions (Production Only)", - "description": "Get the Signet transfer instructions into the Circle bank account given your bank account id (only available on Production now).", - "operationId": "getBusinessAccountSignetInstructionsBankAccount", - "tags": [ - "Signet" - ], - "responses": { - "200": { - "description": "Successfully retrieved Signet transfer instructions for the bank account.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetBusinessAccountSignetInstructionsBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/SignetInstruction" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "trackingRef": "CIR13FB14A", - "walletAddress": "0x7e4f4fe03243ac7b291ebaee90b2bb27025a1234" - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/businessAccount/banks/sen": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a Silvergate SEN bank account (BETA)", - "operationId": "createBusinessAccountSenBankAccount", - "tags": [ - "SEN" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SenFiatAccountCreationRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully created a bank account for Silvergate SEN transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreateBusinessAccountSenBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/SenFiatAccountResponse" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "description": "SILVERGATE BANK ****1111", - "trackingRef": "CIR13FB14A", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z", - "currency": "USD" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - }, - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "List all Silvergate SEN bank accounts (BETA).", - "operationId": "getBusinessAccountSenBankAccounts", - "tags": [ - "SEN" - ], - "responses": { - "200": { - "description": "Successfully retrieved all bank accounts for Silvergate SEN transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SenFiatAccountResponse" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "description": "SILVERGATE BANK ****1111", - "trackingRef": "CIR13FB14A", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z", - "currency": "USD" - } - ] - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/businessAccount/banks/sen/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a Silvergate SEN bank account (BETA)", - "operationId": "getBusinessAccountSenBankAccount", - "tags": [ - "SEN" - ], - "responses": { - "200": { - "description": "Successfully retrieved a bank account for Silvergate SEN transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetBusinessAccountSenBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/SenFiatAccountResponse" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "description": "SILVERGATE BANK ****1111", - "trackingRef": "CIR13FB14A", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z", - "currency": "USD" - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/businessAccount/banks/sen/{id}/instructions": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get Silvergate SEN instructions (BETA)", - "description": "Get the Silvergate SEN transfer instructions into the Circle bank account given your bank account id (BETA).", - "operationId": "getBusinessAccountSenInstructionsBankAccount", - "tags": [ - "SEN" - ], - "responses": { - "200": { - "description": "Successfully retrieved Sen transfer instructions for the bank account.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetBusinessAccountSenInstructionsBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/SenInstruction" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "trackingRef": "CIR13FB14A", - "accountNumber": "11111111", - "currency": "USD" - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/businessAccount/transfers": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a transfer", - "description": "A transfer can be made from an existing business account to a blockchain location.", - "operationId": "createBusinessAccountTransfer", - "tags": [ - "Transfers" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BusinessAccountTransferCreationRequest" - } - } - } - }, - "responses": { - "201": { - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "description": "Successfully created a transfer.", - "content": { - "application/json": { - "schema": { - "title": "CreateBusinessAccountTransferResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Transfer" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345", - "identities": [ - { - "type": "individual", - "name": "Satoshi Nakamoto", - "addresses": [ - { - "line1": "100 Money Street", - "line2": "Suite 1", - "city": "Boston", - "district": "MA", - "postalCode": "01234", - "country": "US" - } - ] - } - ] - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "chain": "ALGO" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "errorCode": "transfer_failed", - "createDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - } - } - }, - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } - ], - "summary": "List all transfers", - "description": "Searches for transfers from your business account. If the date parameters are omitted, returns the most recent transfers. This endpoint returns up to 50 transfers in descending chronological order or pageSize, if provided.", - "operationId": "searchBusinessAccountTransfers", - "tags": [ - "Transfers" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "SearchBusinessAccountTransfersResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345", - "identities": [ - { - "type": "individual", - "name": "Satoshi Nakamoto", - "addresses": [ - { - "line1": "100 Money Street", - "line2": "Suite 1", - "city": "Boston", - "district": "MA", - "postalCode": "01234", - "country": "US" - } - ] - } - ] - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "chain": "ALGO" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "errorCode": "transfer_failed", - "createDate": "2020-04-10T02:13:30.000Z" - } - ] - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/businessAccount/transfers/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a transfer", - "operationId": "getBusinessAccountTransfer", - "tags": [ - "Transfers" - ], - "responses": { - "200": { - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "description": "Successfully retrieved a transfer.", - "content": { - "application/json": { - "schema": { - "title": "GetBusinessAccountTransferResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Transfer" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345", - "identities": [ - { - "type": "individual", - "name": "Satoshi Nakamoto", - "addresses": [ - { - "line1": "100 Money Street", - "line2": "Suite 1", - "city": "Boston", - "district": "MA", - "postalCode": "01234", - "country": "US" - } - ] - } - ] - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "chain": "ALGO" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "errorCode": "transfer_failed", - "createDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - } - } - } - }, - "/v1/businessAccount/wallets/addresses/deposit": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a deposit address", - "description": "Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you're requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit.\n", - "operationId": "generateBusinessAccountDepositAddress", - "tags": [ - "Addresses" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BusinessAccountGenerateAddressRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully generated a new deposit address.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GenerateBusinessAccountDepositAddressResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/AddressObject" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "currency": "USD", - "chain": "ALGO" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - }, - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "List all deposit addresses", - "operationId": "getBusinessAccountDepositAddresses", - "tags": [ - "Addresses" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of deposit addresses.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetBusinessAccountDepositAddressesResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AddressObject" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "currency": "USD", - "chain": "ALGO" - } - ] - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/businessAccount/wallets/addresses/recipient": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a recipient address", - "description": "Stores an external blockchain address. Once added, the recipient address must be verified to ensure that you know and trust each new address.\n", - "operationId": "createBusinessAccountRecipientAddress", - "tags": [ - "Addresses" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BusinessAccountRecipientAddressCreationRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successfully added a recipient address.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreateBusinessAccountRecipientAddressResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/BusinessAccountRecipientAddressObject" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "chain": "ALGO", - "currency": "USD", - "description": "My USDC address at a cryptocurrency exchange" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - }, - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } - ], - "summary": "List all recipient addresses", - "description": "Returns a list of recipient addresses that have each been verified and are eligible for transfers. Any recipient addresses pending verification are not included in the response.\n", - "operationId": "getBusinessAccountRecipientAddresses", - "tags": [ - "Addresses" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of recipient addresses.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetBusinessAccountRecipientAddressesResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BusinessAccountRecipientAddressObject" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "chain": "ALGO", - "currency": "USD", - "description": "My USDC address at a cryptocurrency exchange" - } - ] - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/businessAccount/deposits": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Unique identifier for the deposit type. Filters results to fetch deposits made by this specific type.", - "in": "query", - "schema": { - "type": "string", - "enum": [ - "wire" - ] - } - }, - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } - ], - "summary": "List all deposits", - "description": "Searches for deposits sent to your business account. If the date parameters are omitted, returns the most recent deposits. This endpoint returns up to 50 deposits in descending chronological order or pageSize, if provided.", - "operationId": "searchBusinessAccountDeposits", - "tags": [ - "Deposits" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of deposits.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "SearchBusinessAccountDepositsResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BusinessAccountDeposit" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "sourceWalletId": "9b57048d-2365-4ff5-956b-0199170d1035", - "destination": { - "type": "wallet", - "id": "12345" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fee": { - "amount": "3.14", - "currency": "USD" - }, - "status": "pending", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - ] - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/mocks/payments/sen": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a mock Silvergate SEN payment", - "description": "In the sandbox environment, initiate a mock SEN transfer that mimics the behavior of funds sent through the Silvergate SEN account linked to master wallet.", - "operationId": "createSenPayment", - "tags": [ - "Deposits" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MockSenPaymentRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully created a mock SEN transfer.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreateSenPaymentResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/MockSenPaymentResponse" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "trackingRef": "CIR13FB13A", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "beneficiaryBank": { - "accountNumber": "11111111" - }, - "status": "pending" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/wallets": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a wallet", - "description": "Creates an end user wallet.", - "operationId": "createWallet", - "tags": [ - "Wallets" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WalletCreationRequest" - } - } - } - }, - "responses": { - "201": { - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "description": "Successfully created a wallet.", - "content": { - "application/json": { - "schema": { - "title": "CreateWalletResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Wallet" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "walletId": "434000", - "entityId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "type": "end_user_wallet", - "description": "Treasury Wallet", - "balances": [ - { - "amount": "3.14", - "currency": "USD" - } - ] - } - } - } - } - } - } - } - } - }, - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } - ], - "summary": "List all wallets", - "description": "Retrieves a list of a user's wallets.", - "operationId": "getWallets", - "tags": [ - "Wallets" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of wallets.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetWalletsResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Wallet" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "walletId": "434000", - "entityId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "type": "end_user_wallet", - "description": "Treasury Wallet", - "balances": [ - { - "amount": "3.14", - "currency": "USD" - } - ] - } - ] - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - } - } - } - }, - "/v1/wallets/{walletId}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/WalletId" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a wallet", - "operationId": "getWallet", - "tags": [ - "Wallets" - ], - "responses": { - "200": { - "description": "Successfully retrieved a wallet.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetWalletResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Wallet" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "walletId": "434000", - "entityId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "type": "end_user_wallet", - "description": "Treasury Wallet", - "balances": [ - { - "amount": "3.14", - "currency": "USD" - } - ] - } - } - } - } - } - } - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/wallets/{walletId}/addresses": { - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/WalletId" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a blockchain address", - "description": "Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you're requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit.\n", - "operationId": "generateAddress", - "tags": [ - "Wallets" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GenerateAddressRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully generated a new address.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GenerateAddressResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/AddressObject" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "currency": "USD", - "chain": "ALGO" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "$ref": "#/components/responses/Conflict" - } - } - }, - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/WalletId" - }, - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } - ], - "summary": "List all addresses", - "description": "Retrieves a list of addresses associated with a wallet.", - "operationId": "getAddresses", - "tags": [ - "Wallets" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of addresses.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetAddressesResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AddressObject" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "currency": "USD", - "chain": "ALGO" - } - ] - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/transfers": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a transfer", - "description": "A transfer can be made from an existing funded wallet to a blockchain address or another wallet.", - "operationId": "createTransfer", - "tags": [ - "Transfers" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransferCreationRequest" - }, - "examples": { - "request": { - "value": { - "idempotencyKey": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "source": { - "type": "wallet", - "id": "12345" - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "chain": "ETH" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - } - } - }, - "travel rule": { - "value": { - "idempotencyKey": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "source": { - "type": "wallet", - "id": "12345", - "identities": [ - { - "type": "individual", - "name": "Satoshi Nakamoto", - "addresses": [ - { - "line1": "100 Money Street", - "line2": "Suite 1", - "city": "Boston", - "district": "MA", - "postalCode": "01234", - "country": "US" - } - ] - } - ] - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "chain": "ETH" - }, - "amount": { - "amount": "3000.00", - "currency": "USD" - } - } - } - } - } - } - }, - "responses": { - "201": { - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "description": "Successfully created a transfer.", - "content": { - "application/json": { - "schema": { - "title": "CreateTransferResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Transfer" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345" - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "chain": "ETH" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - } - } - }, - "travel rule": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345", - "identities": [ - { - "type": "individual", - "name": "Satoshi Nakamoto", - "addresses": [ - { - "line1": "100 Money Street", - "line2": "Suite 1", - "city": "Boston", - "district": "MA", - "postalCode": "01234", - "country": "US" - } - ] - } - ] - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "chain": "ETH" - }, - "amount": { - "amount": "3000.00", - "currency": "USD" - }, - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - } - } - }, - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "parameters": [ - { - "name": "walletId", - "description": "Unique identifier for the source or destination wallet of transfers, if any. May not be used in conjunction with destinationWalletId or sourceWalletId. Useful for fetching all transfers related to a wallet.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "example": "12345" - } - }, - { - "name": "sourceWalletId", - "description": "Unique identifier for the source wallet of transfers, if any.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "example": "12345" - } - }, - { - "name": "destinationWalletId", - "description": "Unique identifier for the destination wallet of transfers, if any.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "example": "12345" - } - }, - { - "$ref": "#/components/parameters/ReturnIdentities" - }, - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } - ], - "summary": "List all transfers", - "description": "Searches for transfers involving the provided wallets. If no wallet ids are provided, searches all wallets associated with your Circle API account. If the date parameters are omitted, returns the most recent transfers. This endpoint returns up to 50 transfers in descending chronological order or pageSize, if provided.", - "operationId": "searchTransfers", - "tags": [ - "Transfers" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "SearchTransfersResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345" - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "chain": "ALGO" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - } - ] - } - }, - "travel rule": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345", - "identities": [ - { - "type": "individual", - "name": "Satoshi Nakamoto", - "addresses": [ - { - "line1": "100 Money Street", - "line2": "Suite 1", - "city": "Boston", - "district": "MA", - "postalCode": "01234", - "country": "US" - } - ] - } - ] - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "addressTag": "123456789", - "chain": "ALGO" - }, - "amount": { - "amount": "3000.00", - "currency": "USD" - }, - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - } - ] - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/transfers/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - }, - { - "$ref": "#/components/parameters/ReturnIdentities" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a transfer", - "operationId": "getTransfer", - "tags": [ - "Transfers" - ], - "responses": { - "200": { - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "description": "Successfully retrieved a transfer.", - "content": { - "application/json": { - "schema": { - "title": "GetTransferResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/TransferDetailedTransfer" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345" - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "chain": "ETH" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - } - } - }, - "travel rule": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "source": { - "type": "wallet", - "id": "12345", - "identities": [ - { - "type": "individual", - "name": "Satoshi Nakamoto", - "addresses": [ - { - "line1": "100 Money Street", - "line2": "Suite 1", - "city": "Boston", - "district": "MA", - "postalCode": "01234", - "country": "US" - } - ] - } - ] - }, - "destination": { - "type": "blockchain", - "address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F", - "chain": "ETH" - }, - "amount": { - "amount": "3000.00", - "currency": "USD" - }, - "transactionHash": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - } - } - } - }, - "/ping": { - "get": { - "summary": "Ping", - "description": "Checks that the service is running.", - "operationId": "rootPing", - "tags": [ - "Health" - ], - "responses": { - "200": { - "description": "Successful ping.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Ping" - }, - "examples": { - "response": { - "value": { - "message": "pong" - } - } - } - } - } - } - } - } - }, - "/v1/configuration": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get configuration info", - "description": "Retrieves general configuration information.", - "operationId": "getConfig", - "tags": [ - "Management" - ], - "responses": { - "200": { - "description": "Successfully retrieved configuration information.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetConfigResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/AccountConfiguration" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "payments": { - "masterWalletId": "212000" - } - } - } - } - } - } - } - } - } - } - }, - "/v1/encryption/public": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get public key", - "description": "Retrieves an RSA public key to be used in encrypting data sent to the API. Your public keys change infrequently, so we encourage you to cache this response value locally for a duration of 24 hours or more.", - "operationId": "getPublicKey", - "tags": [ - "Encryption" - ], - "responses": { - "200": { - "description": "Successfully retrieved the RSA public key.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetPublicKeyResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/PublicKey" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "keyId": "key1", - "publicKey": "LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEJDUEcgdjEuNTQKCm1RRU5CRjAxdmk0QkNBQ3JzMDNLS1Y0Qk9SRkYyT0Z4bUdvb0UyaTZMbnNneE5UL1dsV2s1ZTl2RDd2NENkSm0KcGJJbENmZ0U4WFlnYmhKUTE4YStaTzlPM0RFYUp2dGhJSEtjL0l1UEIvZmdEYUJUT285NkJzL2pVRFp6ZGxaVApQazNFUjliNFZPeGVwMFNPSHFMcmxTVFY4ZXB3M1R3SEdaL3NpSWdBYXEwRGdJdlZxUTY4TGVaMnorUFJWZm04CmhhSnJpb05SRU5Ja2ZNTWY5aFdySlowSW1zUk1aVmpDMVVrd2FSSHdrTTMwQUlia1dYcFJ5R205SXhQaXdGa08Kb1RnWlpwUFpsdVczckdkWER0NHZqL24za09hczV1dFdoNFovMlhjWHBiSUUyU0FPK0hycUdIclRnK1ZmZ05JNwpZcVZqYW5MOEN1bm83UkxmcDhKZlZDNXBLUm5ySVNCTnphN1ZBQkVCQUFHMEJrTnBjbU5zWllrQkhBUVFBUWtBCkJnVUNYVFcrTGdBS0NSQ3EzaHNwWjBMeGEwdnpCLzQvQTJpdk1CWW1aZXV2bEJZMm5ZZnNXek9Sb28vU3BIYkQKY2Y0UmtxZzZ0RERJSkUzNHhDVit0MzJydmJkM0ZOdVZseWs1MDVZRkpESnI4cVc2S0tkQVRXdU16eW5mMVVoUAo1M25hTlc0cXdrdSt3b0RWWjJpci9lUVI1WUc4L0RGcnd3bXdaa0dRd0Ftc3h5ZHd5anBnLzBrQ3lpZHkxdVBkCmVVWGgwdWt4dS9Dais4UFl5cHcwdit5V2tzbjdSZ2dVbkJFMWhiQ2pEV3FweHZjMEpDNVAxdmx6L2xRcWQrR3oKRC9Td1FJTVdRVElnV3BHRVVvQTRDc3drbU5PdHhsRVF1U0tueXNtTG02S0ExUmRhTzd6V2IrdWNLN21FZ2VoSwpXU2hHZExqRVNNZlVRUTczemNqMXg2amxLUFNhRlJyLzhXcHhrVXYzVHYvQzZMb0JpejRLCj1WSWg3Ci0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0K" - } - } - } - } - } - } - } - } - } - }, - "/v1/notifications/subscriptions": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "List all notification subscriptions", - "description": "Retrieve a list of existing notification subscriptions with details.", - "parameters": [], - "operationId": "listSubscriptions", - "tags": [ - "Subscriptions" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of notification subscriptions.", - "content": { - "application/json": { - "schema": { - "title": "GetListSubscriptionsResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubscriptionResponse" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "endpoint": "https://example.org/handler/for/notifications", - "subscriptionDetails": [ - { - "url": "arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17", - "status": "confirmed" - } - ] - } - ] - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - }, - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a notification subscription", - "description": "Subscribe to receiving notifications at a given endpoint. The endpoint should be able to handle AWS SNS subscription requests. For more details see https://docs.aws.amazon.com/mobile/sdkforxamarin/developerguide/sns-send-http.html. Note, the sandbox environment allows a maximum of 3 active subscriptions; otherwise, this is limited to 1 active subscription and subsequent create requests will be rejected with a Limit Exceeded error.\n", - "operationId": "subscribe", - "tags": [ - "Subscriptions" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubscriptionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successfully created a notification subscription.", - "content": { - "application/json": { - "schema": { - "title": "SubscribeResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/SubscriptionResponse" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "endpoint": "https://example.org/handler/for/notifications", - "subscriptionDetails": [ - { - "url": "arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17", - "status": "confirmed" - } - ] - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "429": { - "$ref": "#/components/responses/LimitExceeded" - } - } - } - }, - "/v1/notifications/subscriptions/{id}": { - "delete": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Remove a notification subscription", - "description": "To remove a subscription, all its subscription requests' statuses must be either 'confirmed', 'deleted' or a combination of those. A subscription with at least one 'pending' subscription request cannot be removed.", - "operationId": "unsubscribe", - "tags": [ - "Subscriptions" - ], - "responses": { - "200": { - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "description": "Successfully removed a subscription.", - "content": { - "application/json": { - "schema": { - "title": "DeleteUnsubscribeResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/UnsubscribeResponse" - } - } - }, - "examples": { - "response": { - "value": { - "data": {} - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/channels": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "List all channels", - "description": "Retrieve a list of channels with details (e.g. `cardDescriptor`, `achDescriptor`, etc.).", - "parameters": [], - "operationId": "listChannels", - "tags": [ - "Channels" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of channels.", - "content": { - "application/json": { - "schema": { - "title": "ListChannelsResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChannelResponse" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "default": true, - "cardDescriptor": "CIRCLE LLC.", - "achDescriptor": "CIRCLE LLC." - } - ] - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/stablecoins": { - "get": { - "summary": "List all stablecoins", - "description": "Retrieves total circulating supply for supported stablecoins across all chains. This endpoint is rate limited to one call per minute (based on IP).", - "operationId": "getStablecoins", - "tags": [ - "Stablecoins" - ], - "responses": { - "200": { - "description": "Successfully retrieved all stablecoin supplies across all chains.", - "content": { - "application/json": { - "schema": { - "title": "GetStablecoinsResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Stablecoins" - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "name": "USD Coin", - "symbol": "USDC", - "totalAmount": "132.584192", - "chains": [ - { - "amount": "132.584192", - "chain": "ALGO" - } - ] - } - ] - } - } - } - } - } - }, - "429": { - "$ref": "#/components/responses/LimitExceeded" - } - } - } - }, - "/v1/payments": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/Source" - }, - { - "$ref": "#/components/parameters/SettlementId" - }, - { - "$ref": "#/components/parameters/PaymentSourceType" - }, - { - "$ref": "#/components/parameters/PaymentStatus" - }, - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } - ], - "summary": "List all payments", - "operationId": "getPayments", - "tags": [ - "Payments" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of payments.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetPaymentsResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BasicPayment" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "captured": false, - "captureAmount": { - "amount": "3.14", - "currency": "USD" - }, - "captureDate": "2020-04-10T02:13:30.000Z", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "cancel": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "description": "Payment", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - }, - "refunds": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z" - } - ], - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - ] - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - }, - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a payment", - "operationId": "createPayment", - "tags": [ - "Payments" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentCreationRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully created a payment.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreatePaymentResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/DetailedPayment" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "captured": false, - "captureAmount": { - "amount": "3.14", - "currency": "USD" - }, - "captureDate": "2020-04-10T02:13:30.000Z", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "verification": { - "avs": "D", - "cvv": "not_requested", - "threeDSecure": "pass", - "eci": "00" - }, - "cancel": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "originalPayment": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "refunds": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "refund", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "originalPayment": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z" - }, - "cancel": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "description": "Payment", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - ], - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "trackingRef": "24910599141085313498894", - "errorCode": "payment_failed", - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" - }, - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/payments/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a payment", - "operationId": "getPayment", - "tags": [ - "Payments" - ], - "responses": { - "200": { - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "description": "Successfully retrieved a payment.", - "content": { - "application/json": { - "schema": { - "title": "GetPaymentResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/DetailedPaymentPolymorphic" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "verification": { - "avs": "D", - "cvv": "not_requested", - "threeDSecure": "pass", - "eci": "00" - }, - "originalPayment": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "captured": false, - "captureAmount": { - "amount": "3.14", - "currency": "USD" - }, - "captureDate": "2020-04-10T02:13:30.000Z", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "cancel": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "description": "Payment", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - }, - "refunds": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z" - } - ], - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "cancel": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "originalPayment": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "refunds": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "refund", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "originalPayment": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z" - }, - "cancel": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "description": "Payment", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - ], - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "trackingRef": "24910599141085313498894", - "externalRef": "YYYYMMDDXXXXXXXX012345", - "errorCode": "payment_failed", - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/payments/{id}/capture": { - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CaptureCreationRequest" - } - } - } - }, - "summary": "Capture a payment (BETA)", - "description": "Warning: Please contact Circle support if you are planning on using this feature.\n\nThe given amount will be captured for the authorized payment if possible. If no amount is specified, the full amount\nwill be captured. You can only capture once per authorization.\n\nA successful response does *not* mean the payment has been captured. It only means the capture request was successfully submitted.\n", - "operationId": "capturePayment", - "tags": [ - "Payments" - ], - "responses": { - "202": { - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "description": "Payment capture successfully initiated." - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/payments/{id}/cancel": { - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CancelCreationRequest" - } - } - } - }, - "summary": "Cancel a payment", - "description": "The payment will be voided if possible meaning the payment source will not be charged & the payment will never settle.\nOtherwise, the payment will be refunded meaning the payment source will be charged & the payment will be refunded from deductions of future settlements.\nNot all payments are eligible to be cancelled.\n\nA successful response does *not* mean the payment has been cancelled; it only means the cancellation request is successfully submitted.\n", - "operationId": "cancelPayment", - "tags": [ - "Payments" - ], - "responses": { - "200": { - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "description": "Payment cancellation successfully initiated.", - "content": { - "application/json": { - "schema": { - "title": "CancelPaymentResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/DetailedCancel" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "originalPayment": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "captured": false, - "captureAmount": { - "amount": "3.14", - "currency": "USD" - }, - "captureDate": "2020-04-10T02:13:30.000Z", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "cancel": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "description": "Payment", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - }, - "refunds": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z" - } - ], - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "trackingRef": "24910599141085313498894", - "errorCode": "payment_failed", - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" - }, - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "refund": false, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/payments/{id}/refund": { - "post": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RefundCreationRequest" - } - } - } - }, - "summary": "Refund a payment", - "description": "The payment source will be refunded if possible. Not all payments are eligible to be cancelled.\n\nA successful response does *not* mean the payment has been refunded; it only means the refund request is successfully submitted.\n", - "operationId": "refundPayment", - "tags": [ - "Payments" - ], - "responses": { - "200": { - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "description": "Payment refund successfully initiated.", - "content": { - "application/json": { - "schema": { - "title": "RefundPaymentResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/DetailedRefund" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "refund", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "originalPayment": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "captured": false, - "captureAmount": { - "amount": "3.14", - "currency": "USD" - }, - "captureDate": "2020-04-10T02:13:30.000Z", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "cancel": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "description": "Payment", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z" - }, - "refunds": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z" - } - ], - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "cancel": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "cancel", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantWalletId": "212000", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "source": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "card" - }, - "description": "Payment", - "status": "pending", - "originalPayment": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "type": "payment", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Payment", - "status": "pending", - "requiredAction": { - "type": "three_d_secure_required", - "redirectUrl": "https://example.org" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "trackingRef": "24910599141085313498894", - "errorCode": "payment_failed", - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" - }, - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/mocks/payments/wire": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a mock Wire payment", - "description": "In the sandbox environment, initiate a mock wire payment that mimics the behavior of funds sent through the bank (wire) account linked to master wallet.", - "operationId": "createWirePayment", - "tags": [ - "Payments" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MockWirePaymentRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully created a mock wire payment.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreateWirePaymentResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/MockWirePaymentResponse" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "trackingRef": "CIR13FB13A", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "beneficiaryBank": { - "accountNumber": "11111111" - }, - "status": "pending" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/mocks/payments/sepa": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a mock SEPA payment", - "description": "In the sandbox environment, initiate a mock SEPA payment that mimics the behavior of funds sent through the bank (SEPA) account linked to master wallet.", - "operationId": "createSepaPayment", - "tags": [ - "Payments" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MockSepaPaymentRequest" - }, - "example": { - "trackingRef": "CIR13FB13A", - "amount": { - "amount": 3.14, - "currency": "EUR" - } - } - } - } - }, - "responses": { - "201": { - "description": "Successfully created a mock SEPA payment.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreateSepaPaymentResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/MockSepaPaymentResponse" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "trackingRef": "CIR13FB13A", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "status": "pending" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/cards": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a card", - "operationId": "createCard", - "tags": [ - "Cards" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CardCreationRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully created a card.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreateCardResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Card" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, - "expMonth": 1, - "expYear": 2020, - "network": "VISA", - "last4": "0123", - "bin": "401230", - "issuerCountry": "US", - "fundingType": "credit", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "errorCode": "verification_failed", - "verification": { - "avs": "D", - "cvv": "not_requested" - }, - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - }, - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "List all cards", - "operationId": "getCards", - "tags": [ - "Cards" - ], - "parameters": [ - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of cards.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetCardsResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SimpleCard" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "billingDetails": { - "country": "US", - "district": "MA" - }, - "expMonth": 1, - "expYear": 2020, - "network": "VISA", - "bin": "401230", - "issuerCountry": "US", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "verification": { - "avs": "D", - "cvv": "not_requested" - }, - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - ] - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/cards/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a card", - "operationId": "getCard", - "tags": [ - "Cards" - ], - "responses": { - "200": { - "description": "Successfully retrieved a card.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetCardResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Card" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, - "expMonth": 1, - "expYear": 2020, - "network": "VISA", - "last4": "0123", - "bin": "401230", - "issuerCountry": "US", - "fundingType": "credit", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "errorCode": "verification_failed", - "verification": { - "avs": "D", - "cvv": "not_requested" - }, - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - }, - "put": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Update a card", - "operationId": "UpdateCard", - "tags": [ - "Cards" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CardUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Succesfully modified a card.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "UpdateCardResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Card" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, - "expMonth": 1, - "expYear": 2020, - "network": "VISA", - "last4": "0123", - "bin": "401230", - "issuerCountry": "US", - "fundingType": "credit", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "errorCode": "verification_failed", - "verification": { - "avs": "D", - "cvv": "not_requested" - }, - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - } - } - } - }, - "/v1/banks/wires": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a Wire bank account", - "operationId": "createWireBankAccount", - "tags": [ - "Wires" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WireCreationRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully created a bank account for wire transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreateWireBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Wire" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "description": "WELLS FARGO BANK, NA ****0010", - "trackingRef": "CIR13FB13A", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, - "bankAddress": { - "bankName": "SAN FRANCISCO", - "city": "SAN FRANCISCO", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "CA" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/banks/wires/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a Wire bank account", - "operationId": "getWireBankAccount", - "tags": [ - "Wires" - ], - "responses": { - "200": { - "description": "Successfully retrieved a bank account for wire transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetWireBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Wire" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "description": "WELLS FARGO BANK, NA ****0010", - "trackingRef": "CIR13FB13A", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, - "bankAddress": { - "bankName": "SAN FRANCISCO", - "city": "SAN FRANCISCO", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "CA" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/banks/wires/{id}/instructions": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get Wire instructions", - "description": "Get the wire transfer instructions into the Circle bank account given your bank account id", - "operationId": "getWireInstructionsBankAccount", - "tags": [ - "Wires" - ], - "responses": { - "200": { - "description": "Successfully retrieved wire transfer instructions for the bank account.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetWireInstructionsBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/WireInstruction" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "trackingRef": "CIR13FB13A", - "beneficiary": { - "name": "CIRCLE INTERNET FINANCIAL INC", - "address1": "99 HIGH STREET", - "address2": "BOSTON MA 02110" - }, - "beneficiaryBank": { - "name": "SILVERGATE BANK", - "swiftCode": "SIVGUS66XXX", - "routingNumber": "322286803", - "accountNumber": "****7427", - "currency": "USD", - "address": "4250 EXECUTIVE SQUARE SUITE 300", - "city": "LA JOLLA", - "postalCode": "02110", - "country": "US" - } - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/banks/ach": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a ACH bank account", - "operationId": "createACHBankAccount", - "tags": [ - "ACH" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ACHCreationRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully created a bank account for ACH transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreateACHBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/ACH" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "accountNumber": "****6789", - "routingNumber": "613334455", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, - "bankAddress": { - "bankName": "SAN FRANCISCO", - "city": "SAN FRANCISCO", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "CA" - }, - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "errorCode": "bank_account_authorization_expired", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z", - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" - } - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/banks/ach/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a ACH bank account", - "operationId": "getACHBankAccount", - "tags": [ - "ACH" - ], - "responses": { - "200": { - "description": "Successfully retrieved a bank account for ACH transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetACHBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/ACH" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "accountNumber": "****6789", - "routingNumber": "613334455", - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, - "bankAddress": { - "bankName": "SAN FRANCISCO", - "city": "SAN FRANCISCO", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "CA" - }, - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "errorCode": "bank_account_authorization_expired", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z", - "metadata": { - "email": "satoshi@circle.com", - "phoneNumber": "+14155555555" - } - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/mocks/ach/accounts": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a mock ACH bank account", - "description": "In the sandbox environment, create a mock ACH account and retrieve a processor token that can be used to link an ACH account.", - "operationId": "createAchAccount", - "tags": [ - "ACH" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MockAchAccountCreationRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully created a mock ach payment.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreateAchAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/MockAchAccountResponse" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "processorToken": "processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621", - "balance": { - "amount": "3.14", - "currency": "USD" - }, - "account": { - "accountNumber": "123456789", - "routingNumber": "011000028", - "description": "My ACH account" - } - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/banks/sepa": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a SEPA bank account (BETA)", - "operationId": "createSEPABankAccount", - "tags": [ - "SEPA" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SEPACreationRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully created a bank account for SEPA transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreateSEPABankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/SEPA" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "description": "Bank of Ireland ****0010", - "trackingRef": "CIR13FB13A", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/banks/sepa/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a SEPA bank account (BETA)", - "operationId": "getSEPABankAccount", - "tags": [ - "SEPA" - ], - "responses": { - "200": { - "description": "Successfully retrieved a bank account for SEPA transfers.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetSEPABankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/SEPA" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "status": "pending", - "description": "Bank of Ireland ****0010", - "trackingRef": "CIR13FB13A", - "fingerprint": "eb170539-9e1c-4e92-bf4f-1d09534fdca2", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "billingDetails": { - "name": "Satoshi Nakamoto", - "city": "Boston", - "country": "US", - "line1": "100 Money Street", - "line2": "Suite 1", - "district": "MA", - "postalCode": "01234" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/banks/sepa/{id}/instructions": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get SEPA instructions (BETA)", - "description": "Get the SEPA transfer instructions into the Circle bank account given your bank account id (BETA).", - "operationId": "getSEPAInstructionsBankAccount", - "tags": [ - "SEPA" - ], - "responses": { - "200": { - "description": "Successfully retrieved SEPA transfer instructions for the bank account.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetSEPAInstructionsBankAccountResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/SEPAInstruction" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "trackingRef": "CIR13FB13A", - "beneficiary": { - "name": "CIRCLE INTERNET FINANCIAL INC", - "address1": "99 HIGH STREET", - "address2": "BOSTON MA 02110" - }, - "beneficiaryBank": { - "name": "LHV Bank", - "bic": "LHVBEE22XXX", - "iban": "****6789", - "address": "Tartu mnt 2, 10145 Tallinn", - "city": "Tallinn", - "postalCode": "10017", - "country": "EE" - } - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/settlements": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } - ], - "summary": "List all settlements", - "operationId": "getSettlements", - "tags": [ - "Settlements" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of settlements.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetSettlementsResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Settlement" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "merchantWalletId": "212000", - "walletId": "12345", - "totalDebits": { - "amount": "3.14", - "currency": "USD" - }, - "totalCredits": { - "amount": "3.14", - "currency": "USD" - }, - "paymentFees": { - "amount": "3.14", - "currency": "USD" - }, - "chargebackFees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - ] - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/settlements/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a settlement", - "operationId": "getSettlement", - "tags": [ - "Settlements" - ], - "responses": { - "200": { - "description": "Successfully retrieved a settlement.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetSettlementResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Settlement" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "merchantWalletId": "212000", - "walletId": "12345", - "totalDebits": { - "amount": "3.14", - "currency": "USD" - }, - "totalCredits": { - "amount": "3.14", - "currency": "USD" - }, - "paymentFees": { - "amount": "3.14", - "currency": "USD" - }, - "chargebackFees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/chargebacks": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/PaymentId" - }, - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } - ], - "summary": "List all chargebacks", - "description": "Retrieve list of chargebacks. Results will be sorted by create date descending: more recent chargebacks will be at the beginning of the list.\n", - "operationId": "getChargebacks", - "tags": [ - "Chargebacks" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of chargebacks.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetChargebacksResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BasicChargeback" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "paymentId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "reasonCode": "10.4", - "category": "Canceled Recurring Payment", - "history": [ - { - "type": "1st Chargeback", - "chargebackAmount": { - "amount": "3.14", - "currency": "USD" - }, - "fee": { - "amount": "3.14", - "currency": "USD" - }, - "description": "The cardholder claims an unauthorized transaction occurred.", - "settlementId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "createDate": "2020-04-10T02:13:30.000Z" - } - ] - } - ] - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/chargebacks/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a chargeback", - "operationId": "getChargeback", - "tags": [ - "Chargebacks" - ], - "responses": { - "200": { - "description": "Successfully retrieved a chargeback.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetChargebackResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/BasicChargeback" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "paymentId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "reasonCode": "10.4", - "category": "Canceled Recurring Payment", - "history": [ - { - "type": "1st Chargeback", - "chargebackAmount": { - "amount": "3.14", - "currency": "USD" - }, - "fee": { - "amount": "3.14", - "currency": "USD" - }, - "description": "The cardholder claims an unauthorized transaction occurred.", - "settlementId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "createDate": "2020-04-10T02:13:30.000Z" - } - ] - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/mocks/cards/chargebacks": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a mock chargeback", - "description": "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.", - "operationId": "createMockChargeback", - "tags": [ - "Chargebacks" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MockChargebackCreationRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully created a mock chargeback.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreateMockChargebackResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/MockChargeback" - } - } - }, - "examples": { - "response": { - "value": { - "data": {} - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "$ref": "#/components/responses/Conflict" - } - } - } - }, - "/v1/reversals": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/PaymentStatus" - }, - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } - ], - "summary": "List all ACH payment reversals.", - "description": "Retrieve a list of ACH payment reversals. Results will be sorted by create date descending; more recent reversals will be at the beginning of the list", - "operationId": "getReversals", - "tags": [ - "Reversals" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of ACH payment reversals.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetReversalsResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Reversal" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "key1", - "paymentId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "description": "Merchant Payment Reversal", - "status": "pending", - "reason": "duplicate", - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - ] - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/balances": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "List all balances", - "description": "Retrieves the balance of merchant funds that have settled and also of funds that have been sent for processing but have not yet settled.", - "operationId": "getBalances", - "tags": [ - "Balances" - ], - "responses": { - "200": { - "description": "Successfully retrieved balances.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetBalancesResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Balances" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "available": [ - { - "amount": "3.14", - "currency": "USD" - } - ], - "unsettled": [ - { - "amount": "3.14", - "currency": "USD" - } - ] - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/payouts": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "parameters": [ - { - "name": "source", - "description": "Universally unique identifier (UUID v4) for the source wallet. Filters the results to fetch all payouts made from a source wallet. If not provided, payouts from all wallets will be returned.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "example": "54c1cbab-c419-450f-ad23-906fa03af7f0" - } - }, - { - "name": "type", - "description": "Destination bank account type. Filters the results to fetch all payouts made to a specified destination bank account type. This query parameter can be passed multiple times to fetch results matching multiple destination bank account types.", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayoutDestinationType" - } - } - }, - { - "name": "status", - "description": "Queries items with the specified status. Matches any status if unspecified.", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayoutStatus" - } - } - }, - { - "$ref": "#/components/parameters/destination" - }, - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } - ], - "summary": "List all payouts", - "operationId": "getPayouts", - "tags": [ - "Payouts" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of payouts.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetPayoutsResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Payout" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "sourceWalletId": "53535335", - "destination": { - "type": "wire", - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "name": "COMMERZBANK AG ****3000" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "status": "pending", - "trackingRef": "CIR-6ESOQANEP3NAO", - "errorCode": "insufficient_funds", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "adjustments": { - "fxCredit": { - "amount": "3.14", - "currency": "USD" - }, - "fxDebit": { - "amount": "3.14", - "currency": "USD" - } - }, - "return": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "reason": "payout_returned", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - ] - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - }, - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Create a payout", - "operationId": "createPayout", - "tags": [ - "Payouts" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayoutCreationRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Successfully created a payout.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "CreatePayoutResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/Payout" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "sourceWalletId": "53535335", - "destination": { - "type": "wire", - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "name": "COMMERZBANK AG ****3000" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "status": "pending", - "trackingRef": "CIR-6ESOQANEP3NAO", - "errorCode": "insufficient_funds", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "adjustments": { - "fxCredit": { - "amount": "3.14", - "currency": "USD" - }, - "fxDebit": { - "amount": "3.14", - "currency": "USD" - } - }, - "return": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "reason": "payout_returned", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - }, - "/v1/payouts/{id}": { - "get": { - "parameters": [ - { - "$ref": "#/components/parameters/IdPath" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a payout", - "operationId": "getPayout", - "tags": [ - "Payouts" - ], - "responses": { - "200": { - "description": "Successfully retrieved a payout.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetPayoutResponse", - "properties": { - "data": { - "$ref": "#/components/schemas/DetailedPayout" - } - } - }, - "examples": { - "response": { - "value": { - "data": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "sourceWalletId": "53535335", - "destination": { - "type": "wire", - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "name": "COMMERZBANK AG ****3000" - }, - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "status": "pending", - "trackingRef": "CIR-6ESOQANEP3NAO", - "externalRef": "YYYYMMDDXXXXXXXX012345", - "errorCode": "insufficient_funds", - "riskEvaluation": { - "decision": "approved", - "reason": "3000" - }, - "adjustments": { - "fxCredit": { - "amount": "3.14", - "currency": "USD" - }, - "fxDebit": { - "amount": "3.14", - "currency": "USD" - } - }, - "return": { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "reason": "payout_returned", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - }, - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - } - } - }, - "/v1/returns": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/From" - }, - { - "$ref": "#/components/parameters/To" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "$ref": "#/components/parameters/PageSize" - } - ], - "summary": "List all payout returns", - "description": "Retrieve a list of Wire and ACH payout returns. Results will be sorted by create date descending; more recent returns will be at the beginning of the list.", - "operationId": "getReturns", - "tags": [ - "Returns" - ], - "responses": { - "200": { - "description": "Successfully retrieved a list of payout returns.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "title": "GetReturnsResponse", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UnwithdrawalObject" - } - } - } - }, - "examples": { - "response": { - "value": { - "data": [ - { - "id": "b8627ae8-732b-4d25-b947-1df8f4007a29", - "payoutId": "abdb500d-4a59-457c-801f-2d418c8703ac", - "amount": { - "amount": "3.14", - "currency": "USD" - }, - "fees": { - "amount": "3.14", - "currency": "USD" - }, - "reason": "payout_returned", - "status": "pending", - "createDate": "2020-04-10T02:13:30.000Z", - "updateDate": "2020-04-10T02:13:30.000Z" - } - ] - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/NotAuthorized" - } - } - } - } - }, - "components": { - "securitySchemes": { - "bearerAuth": { - "type": "http", - "scheme": "bearer" - } - }, - "headers": { - "XRequestId": { - "description": "Universally unique identifier (UUID v4) for the request. Helpful for identifying a request when communicating with Circle support.", - "schema": { - "type": "string", - "format": "uuid", - "example": "2adba88e-9d63-44bc-b975-9b6ae3440dde" - } - } - }, - "schemas": { - "Money": { - "type": "object", - "required": [ - "amount", - "currency" - ], - "properties": { - "amount": { - "type": "string", - "description": "Magnitude of the amount, in units of the currency, with a `.`.", - "example": "3.14" - }, - "currency": { - "type": "string", - "description": "Currency code for the amount.", - "enum": [ - "USD", - "EUR", - "BTC", - "ETH" - ] - } - } - }, - "Balances": { - "type": "object", - "description": "Available and unsettled balances of the merchant.", - "required": [ - "available", - "unsettled" - ], - "properties": { - "available": { - "type": "array", - "description": "List of currency balances (one for each currency) that are currently available to spend.", - "items": { - "$ref": "#/components/schemas/Money" - } - }, - "unsettled": { - "type": "array", - "description": "List of currency balances (one for each currency) that have been captured but are currently in the process of settling and will become available to spend at some point in the future.", - "items": { - "$ref": "#/components/schemas/Money" - } - } - } - }, - "PayoutStatus": { - "type": "string", - "description": "Status of the payout. Status `pending` indicates that the payout is in process; `complete` indicates it finished successfully; `failed` indicates it failed.", - "enum": [ - "pending", - "complete", - "failed" - ] - }, - "Id": { - "type": "string", - "description": "Unique system generated identifier for the entity.", - "format": "uuid", - "example": "b8627ae8-732b-4d25-b947-1df8f4007a29" - }, - "PayoutDestinationType": { - "type": "string", - "description": "The destination bank account type.", - "enum": [ - "wire", - "ach", - "sepa" - ] - }, - "BankDestination": { - "type": "object", - "description": "The destination bank account.", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/PayoutDestinationType" - }, - "id": { - "$ref": "#/components/schemas/Id" - }, - "name": { - "type": "string", - "description": "Bank name plus last four digits of the bank account number or IBAN.", - "readOnly": true, - "example": "COMMERZBANK AG ****3000" - } - } - }, - "FiatMoney": { - "type": "object", - "required": [ - "amount", - "currency" - ], - "properties": { - "amount": { - "description": "Magnitude of the amount, in units of the currency, with a `.`.", - "type": "string", - "example": "3.14" - }, - "currency": { - "description": "Currency code.", - "type": "string", - "enum": [ - "USD", - "EUR" - ] - } - } - }, - "FiatMoneyUsd": { - "type": "object", - "required": [ - "amount", - "currency" - ], - "properties": { - "amount": { - "description": "Magnitude of the amount, in units of the currency, with a `.`.", - "type": "string", - "example": "3.14" - }, - "currency": { - "description": "Currency code.", - "type": "string", - "enum": [ - "USD" - ] - } - } - }, - "PayoutErrorCode": { - "type": "string", - "nullable": true, - "description": "Indicates the failure reason of a payout. Only present for payouts in failed state. Possible values are [`insufficient_funds`, `transaction_denied`, `transaction_failed`, `transaction_returned`, `bank_transaction_error`, `fiat_account_limit_exceeded`, `invalid_bank_account_number`, `invalid_ach_rtn`, `invalid_wire_rtn`, `vendor_inactive`]'", - "enum": [ - "insufficient_funds", - "transaction_denied", - "transaction_failed", - "transaction_returned", - "bank_transaction_error", - "fiat_account_limit_exceeded", - "invalid_bank_account_number", - "invalid_ach_rtn", - "invalid_wire_rtn", - "vendor_inactive" - ] - }, - "RiskEvaluation": { - "type": "object", - "description": "Results of risk evaluation. Only present if the payment is denied by Circle's risk service.", - "nullable": true, - "properties": { - "decision": { - "description": "Enumerated decision of the account.", - "type": "string", - "enum": [ - "approved", - "denied", - "review" - ] - }, - "reason": { - "description": "Risk reason for the definitive decision outcome.", - "type": "string", - "nullable": true, - "example": "3000" - } - } - }, - "IdPayout": { - "type": "string", - "description": "Universally unique identifier (UUID v4) of the payout that is associated with the return.", - "format": "uuid", - "example": "abdb500d-4a59-457c-801f-2d418c8703ac" - }, - "UTCTimestamp": { - "type": "string", - "description": "ISO-8601 UTC date/time format.", - "example": "2020-04-10T02:13:30.000Z" - }, - "UnwithdrawalObject": { - "type": "object", - "description": "Return information if the payout is returned by bank. Only present if `errorCode` of payout is `transaction_returned`.", - "nullable": true, - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "payoutId": { - "$ref": "#/components/schemas/IdPayout" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "reason": { - "type": "string", - "description": "Reason for the return.", - "example": "payout_returned" - }, - "status": { - "type": "string", - "description": "Status of the return. A `pending` status indicates that the return is in process; `complete` indicates it finished successfully; `failed` indicates it failed.", - "enum": [ - "pending", - "complete", - "failed" - ] - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "PayoutBusinessAccount": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "sourceWalletId": { - "type": "string", - "description": "The identifier of the source wallet used to fund a payout.", - "example": "53535335" - }, - "destination": { - "$ref": "#/components/schemas/BankDestination" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoney" - }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "status": { - "$ref": "#/components/schemas/PayoutStatus" - }, - "trackingRef": { - "description": "A payout tracking reference. Will be present once known.", - "nullable": true, - "example": "CIR-6ESOQANEP3NAO" - }, - "errorCode": { - "$ref": "#/components/schemas/PayoutErrorCode" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, - "adjustments": { - "description": "Final adjustment which increases (credits) or decreases (debits) the total returned amount to the source wallet.", - "nullable": true, - "type": "object", - "properties": { - "fxCredit": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "fxDebit": { - "$ref": "#/components/schemas/FiatMoneyUsd" - } - } - }, - "return": { - "$ref": "#/components/schemas/UnwithdrawalObject" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "IdempotencyKey": { - "type": "string", - "description": "Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests.", - "format": "uuid", - "example": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7" - }, - "BusinessAccountDestinationRequest": { - "type": "object", - "description": "The destination bank account.", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "wire", - "sen" - ] - }, - "id": { - "$ref": "#/components/schemas/Id" - } - } - }, - "BusinessAccountPayoutCreationRequest": { - "type": "object", - "required": [ - "idempotencyKey", - "destination", - "amount" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "destination": { - "$ref": "#/components/schemas/BusinessAccountDestinationRequest" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoney" - } - } - }, - "ExternalFiatAccountStatus": { - "description": "Status of the account. A `pending` status indicates that the linking is in-progress; `complete` indicates the account was linked successfully; `failed` indicates it failed.", - "type": "string", - "enum": [ - "pending", - "complete", - "failed" - ] - }, - "Fingerprint": { - "type": "string", - "description": "A UUID that uniquely identifies the account number. If the same account is used more than once, each card object will have a different id, but the fingerprint will stay the same.", - "example": "eb170539-9e1c-4e92-bf4f-1d09534fdca2" - }, - "BillingDetails": { - "type": "object", - "required": [ - "name", - "city", - "country", - "line1", - "postalCode" - ], - "properties": { - "name": { - "type": "string", - "description": "Full name of the card or bank account holder.", - "maxLength": 1024, - "example": "Satoshi Nakamoto" - }, - "city": { - "type": "string", - "description": "City portion of the address.", - "maxLength": 1024, - "example": "Boston" - }, - "country": { - "type": "string", - "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "maxLength": 2, - "example": "US" - }, - "line1": { - "type": "string", - "description": "Line one of the street address.", - "maxLength": 1024, - "example": "100 Money Street" - }, - "line2": { - "type": "string", - "description": "Line two of the street address.", - "maxLength": 1024, - "example": "Suite 1" - }, - "district": { - "description": "State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision.", - "type": "string", - "maxLength": 16, - "example": "MA" - }, - "postalCode": { - "type": "string", - "description": "Postal / ZIP code of the address.", - "maxLength": 16, - "example": "01234" - } - } - }, - "BankAddress": { - "type": "object", - "description": "The address details for the bank, as provided during bank account creation.", - "required": [ - "country" - ], - "properties": { - "bankName": { - "type": "string", - "description": "Name of the bank. This property is required for bank accounts outside of the US that do not support IBAN'", - "maxLength": 35, - "example": "SAN FRANCISCO" - }, - "city": { - "type": "string", - "description": "City portion of the address. This property is required for bank accounts outside of the US.", - "maxLength": 35, - "example": "SAN FRANCISCO" - }, - "country": { - "type": "string", - "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "maxLength": 2, - "example": "US" - }, - "line1": { - "type": "string", - "description": "Line one of the street address.", - "maxLength": 35, - "example": "100 Money Street" - }, - "line2": { - "type": "string", - "description": "Line two of the street address.", - "maxLength": 35, - "example": "Suite 1" - }, - "district": { - "type": "string", - "description": "State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision.", - "maxLength": 16, - "example": "CA" - } - } - }, - "Wire": { - "type": "object", - "required": [ - "id", - "status", - "description", - "trackingRef", - "fingerprint", - "billingDetails", - "createDate", - "updateDate" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "status": { - "$ref": "#/components/schemas/ExternalFiatAccountStatus" - }, - "description": { - "type": "string", - "description": "Bank name plus last four digits of the bank account number or IBAN.", - "example": "WELLS FARGO BANK, NA ****0010" - }, - "trackingRef": { - "type": "string", - "description": "Wire tracking ref that needs to be set in the wire reference to beneficiary field.", - "example": "CIR13FB13A" - }, - "fingerprint": { - "$ref": "#/components/schemas/Fingerprint" - }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" - }, - "bankAddress": { - "$ref": "#/components/schemas/BankAddress" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "WireCreationRequestUS": { - "type": "object", - "title": "US Bank Account", - "description": "Relevant fields for U.S. bank accounts.", - "required": [ - "idempotencyKey", - "accountNumber", - "routingNumber", - "billingDetails", - "bankAddress" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "accountNumber": { - "description": "Account number that identifies the bank account.", - "type": "string", - "example": "12340010", - "minLength": 6, - "maxLength": 35 - }, - "routingNumber": { - "description": "ABA routing number for the bank account. Note this has to be specific for bank wire transfers.", - "type": "string", - "example": "121000248" - }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" - }, - "bankAddress": { - "$ref": "#/components/schemas/BankAddress" - } - } - }, - "BankAddressIbanSupported": { - "type": "object", - "description": "The address of the bank. City and country fields are required.", - "required": [ - "city", - "country" - ], - "properties": { - "bankName": { - "type": "string", - "description": "Name of the bank. This property is required for bank accounts outside of the US that do not support IBAN'", - "maxLength": 35, - "example": "SAN FRANCISCO" - }, - "city": { - "type": "string", - "description": "City portion of the address. This property is required for bank accounts outside of the US.", - "maxLength": 1024, - "example": "SAN FRANCISCO" - }, - "country": { - "type": "string", - "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "maxLength": 2, - "example": "US" - }, - "line1": { - "type": "string", - "description": "Line one of the street address.", - "maxLength": 35, - "example": "100 Money Street" - }, - "line2": { - "type": "string", - "description": "Line two of the street address.", - "maxLength": 35, - "example": "Suite 1" - }, - "district": { - "type": "string", - "description": "State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision.", - "maxLength": 16, - "example": "CA" - } - } - }, - "WireCreationRequestIban": { - "type": "object", - "title": "Non US Bank Account - IBAN Supported", - "description": "Relevant fields for non-U.S. bank accounts that support IBAN.", - "required": [ - "idempotencyKey", - "iban", - "billingDetails", - "bankAddress" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "iban": { - "description": "International Bank Account Number (IBAN) for the bank account.", - "type": "string", - "example": "DE31100400480532013000" - }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" - }, - "bankAddress": { - "$ref": "#/components/schemas/BankAddressIbanSupported" - } - } - }, - "BankAddressNonIban": { - "type": "object", - "description": "The address of the bank. BankName, City and Country fields are required.", - "required": [ - "bankName", - "city", - "country" - ], - "properties": { - "bankName": { - "type": "string", - "description": "Name of the bank. This property is required for bank accounts outside of the US that do not support IBAN'", - "maxLength": 35, - "example": "SAN FRANCISCO" - }, - "city": { - "type": "string", - "description": "City portion of the address. This property is required for bank accounts outside of the US.", - "maxLength": 1024, - "example": "SAN FRANCISCO" - }, - "country": { - "type": "string", - "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "maxLength": 2, - "example": "US" - }, - "line1": { - "type": "string", - "description": "Line one of the street address.", - "maxLength": 35, - "example": "100 Money Street" - }, - "line2": { - "type": "string", - "description": "Line two of the street address.", - "maxLength": 35, - "example": "Suite 1" - }, - "district": { - "type": "string", - "description": "State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision.", - "maxLength": 16, - "example": "CA" - } - } - }, - "WireCreationRequestAccountNumber": { - "type": "object", - "title": "Non US Bank Account - IBAN Not Supported", - "description": "Relevant fields for non-U.S. banks that do NOT support IBAN.", - "required": [ - "idempotencyKey", - "accountNumber", - "routingNumber", - "billingDetails", - "bankAddress" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "accountNumber": { - "description": "Account number that identifies the bank account.", - "type": "string", - "example": "0321800123", - "minLength": 6, - "maxLength": 35 - }, - "routingNumber": { - "description": "The bank's SWIFT / BIC code.", - "type": "string", - "example": "SBININBB354" - }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" - }, - "bankAddress": { - "$ref": "#/components/schemas/BankAddressNonIban" - } - } - }, - "WireCreationRequest": { - "type": "object", - "description": "Request object used to create a bank account (wires). Different fields are required depending on the bank country, see the guide documentation for the list of supported bank countries along with which ones support IBAN.", - "oneOf": [ - { - "$ref": "#/components/schemas/WireCreationRequestUS" - }, - { - "$ref": "#/components/schemas/WireCreationRequestIban" - }, - { - "$ref": "#/components/schemas/WireCreationRequestAccountNumber" - } - ] - }, - "WireInstructionBeneficiary": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the beneficiary.", - "example": "CIRCLE INTERNET FINANCIAL INC" - }, - "address1": { - "type": "string", - "description": "Address line 1 of the beneficiary's address.", - "example": "99 HIGH STREET" - }, - "address2": { - "type": "string", - "description": "Address line 2 of the beneficiary's address.", - "example": "BOSTON MA 02110" - } - } - }, - "WireInstructionBeneficiaryBank": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the beneficiary's bank.", - "example": "SILVERGATE BANK" - }, - "swiftCode": { - "type": "string", - "description": "SWIFT code of the beneficiary's bank account.", - "example": "SIVGUS66XXX" - }, - "routingNumber": { - "type": "string", - "description": "ABA Routing number of the beneficiary's bank account.", - "example": "322286803" - }, - "accountNumber": { - "type": "string", - "description": "Account number of the beneficiary's bank account.", - "example": "****7427" - }, - "currency": { - "type": "string", - "description": "Currency of the beneficiary's bank account.", - "example": "USD" - }, - "address": { - "type": "string", - "description": "Address of the beneficiary's bank.", - "example": "4250 EXECUTIVE SQUARE SUITE 300" - }, - "city": { - "type": "string", - "description": "City of the beneficiary's bank.", - "example": "LA JOLLA" - }, - "postalCode": { - "type": "string", - "description": "Postal code of the beneficiary's bank.", - "example": "02110" - }, - "country": { - "type": "string", - "description": "Country code of the beneficiary's bank. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "example": "US" - } - } - }, - "WireInstruction": { - "type": "object", - "properties": { - "trackingRef": { - "type": "string", - "description": "Circle tracking reference that needs to be set in the wire reference field.", - "example": "CIR13FB13A" - }, - "beneficiary": { - "$ref": "#/components/schemas/WireInstructionBeneficiary" - }, - "beneficiaryBank": { - "$ref": "#/components/schemas/WireInstructionBeneficiaryBank" - } - } - }, - "SignetFiatAccountResponse": { - "type": "object", - "required": [ - "id", - "status", - "trackingRef", - "walletAddress", - "createDate", - "updateDate" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "status": { - "$ref": "#/components/schemas/ExternalFiatAccountStatus" - }, - "trackingRef": { - "type": "string", - "description": "Tracking ref that needs to be set in the public description field when you send the funds to Circle Signet wallet.", - "example": "CIR13FB14A" - }, - "walletAddress": { - "type": "string", - "description": "Your signet wallet address.", - "example": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "SignetFiatAccountCreationRequest": { - "type": "object", - "required": [ - "idempotencyKey", - "walletAddress" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "walletAddress": { - "type": "string", - "description": "Signet wallet address.", - "example": "0xcac04f0069e4ac9314ac4e608e99278a3bebabcd" - } - } - }, - "SignetInstruction": { - "type": "object", - "properties": { - "trackingRef": { - "type": "string", - "description": "Circle tracking reference that needs to be set in the signet public description field.", - "example": "CIR13FB14A" - }, - "walletAddress": { - "type": "string", - "description": "Circle wallet address that needs to be set in the signet recipient wallet field.", - "example": "0x7e4f4fe03243ac7b291ebaee90b2bb27025a1234" - } - } - }, - "SenFiatAccountResponse": { - "type": "object", - "required": [ - "id", - "status", - "description", - "trackingRef", - "createDate", - "updateDate" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "status": { - "$ref": "#/components/schemas/ExternalFiatAccountStatus" - }, - "description": { - "type": "string", - "description": "Bank name plus last four digits of the bank account number.", - "example": "SILVERGATE BANK ****1111" - }, - "trackingRef": { - "type": "string", - "description": "Circle tracking reference that needs to be set in the memo field..", - "example": "CIR13FB14A" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "currency": { - "type": "string", - "description": "Currency of the fiat account.", - "example": "USD" - } - } - }, - "SenFiatAccountCreationRequest": { - "type": "object", - "required": [ - "idempotencyKey", - "accountNumber" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "accountNumber": { - "type": "string", - "description": "Silvergate SEN account number.", - "example": "12345678" - }, - "currency": { - "type": "string", - "description": "Currency of the Silvergate SEN account.", - "example": "USD" - } - } - }, - "SenInstruction": { - "type": "object", - "properties": { - "trackingRef": { - "type": "string", - "description": "Circle tracking reference that needs to be set in the memo field.", - "example": "CIR13FB14A" - }, - "accountNumber": { - "type": "string", - "description": "Circle corporate Silvergate SEN account number that needs to be set as destination.", - "example": "11111111" - }, - "currency": { - "type": "string", - "description": "Currency of Circle corporate Silvergate SEN account.", - "example": "USD" - } - } - }, - "IdentityAddress": { - "type": "object", - "required": [ - "line1", - "city", - "district", - "postalCode", - "country" - ], - "properties": { - "line1": { - "type": "string", - "description": "Line one of the street address.", - "maxLength": 1024, - "example": "100 Money Street" - }, - "line2": { - "type": "string", - "description": "Line two of the street address.", - "maxLength": 1024, - "example": "Suite 1" - }, - "city": { - "type": "string", - "description": "City portion of the address.", - "maxLength": 1024, - "example": "Boston" - }, - "district": { - "description": "State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision.", - "type": "string", - "maxLength": 16, - "example": "MA" - }, - "postalCode": { - "type": "string", - "description": "Postal / ZIP code of the address.", - "maxLength": 16, - "example": "01234" - }, - "country": { - "type": "string", - "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "maxLength": 2, - "example": "US" - } - } - }, - "Identity": { - "type": "object", - "description": "The identity of the originator. Identities are required when:\n * `destination.type: \"blockchain\"`\n * `destination.chain: \"ETH\"`\n * `amount.amount` >= $3,000 in value\n", - "required": [ - "type", - "name", - "addresses" - ], - "properties": { - "type": { - "type": "string", - "description": "The type of identity for the originator.\n* `individual` - A uniquely distinguishable individual.\n* `business` - Any entity other than a natural person that can establish a permanent customer relationship with an affected entity or otherwise own property. This can include companies, foundations, anstalt, partnerships, associations and other relevantly similar entities.\n", - "enum": [ - "individual", - "business" - ] - }, - "name": { - "type": "string", - "description": "Full name of the identity.", - "example": "Satoshi Nakamoto", - "maxLength": 1024 - }, - "addresses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IdentityAddress" - } - } - } - }, - "TransferSourceWalletLocation": { - "description": "A source wallet location.", - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "wallet" - ] - }, - "id": { - "type": "string", - "description": "The id of the wallet.", - "example": "12345" - }, - "identities": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Identity" - } - } - } - }, - "Chain": { - "type": "string", - "description": "A blockchain that a given currency is available on.", - "enum": [ - "ALGO", - "AVAX", - "BTC", - "ETH", - "FLOW", - "HBAR", - "MATIC", - "SOL", - "TRX", - "XLM" - ] - }, - "TransferSourceBlockchainLocation": { - "description": "A source blockchain address.", - "type": "object", - "required": [ - "type", - "chain" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "blockchain" - ] - }, - "chain": { - "$ref": "#/components/schemas/Chain" - }, - "identities": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Identity" - } - } - } - }, - "TransferSourceLocation": { - "description": "A source of funds.", - "oneOf": [ - { - "$ref": "#/components/schemas/TransferSourceWalletLocation" - }, - { - "$ref": "#/components/schemas/TransferSourceBlockchainLocation" - } - ], - "discriminator": { - "propertyName": "type" - } - }, - "Address": { - "type": "string", - "description": "An alphanumeric string representing a blockchain address. Will be in different formats for different chains. It is important to preserve the exact formatting and capitalization of the address.", - "example": "0x8381470ED67C3802402dbbFa0058E8871F017A6F" - }, - "AddressTag": { - "type": "string", - "description": "The secondary identifier for a blockchain address. An example of this is the memo field on the Stellar network, which can be text, id, or hash format.", - "nullable": true, - "example": "123456789" - }, - "TransferDestinationBlockchainLocation": { - "description": "A destination blockchain address.", - "type": "object", - "required": [ - "type", - "chain", - "address" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "blockchain" - ] - }, - "address": { - "$ref": "#/components/schemas/Address" - }, - "addressTag": { - "$ref": "#/components/schemas/AddressTag" - }, - "chain": { - "$ref": "#/components/schemas/Chain" - } - } - }, - "TransferDestinationWalletLocation": { - "description": "A destination wallet location.", - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "wallet" - ] - }, - "id": { - "type": "string", - "description": "The id of the wallet.", - "example": "12345" - }, - "address": { - "type": "string", - "description": "An alphanumeric string which indicates the wallet address used to receive the transfer. Will only be set when the transfer source is a blockchain address.", - "example": "0x8381470ED67C3802402dbbFa0058E8871F017A6F" - }, - "addressTag": { - "$ref": "#/components/schemas/AddressTag" - } - } - }, - "TransferDestinationLocation": { - "description": "A destination of funds.", - "oneOf": [ - { - "$ref": "#/components/schemas/TransferDestinationBlockchainLocation" - }, - { - "$ref": "#/components/schemas/TransferDestinationWalletLocation" - } - ], - "discriminator": { - "propertyName": "type" - } - }, - "TransferErrorCode": { - "type": "string", - "description": "Indicates the failure reason of a transfer. Only present for transfers in a `failed` state. Possible values are `insufficient_funds`, `blockchain_error` and `transfer_denied` and `transfer_failed`", - "nullable": true, - "enum": [ - "transfer_failed", - "transfer_denied", - "blockchain_error", - "insufficient_funds" - ] - }, - "Transfer": { - "type": "object", - "description": "A transfer of funds.", - "required": [ - "id", - "source", - "destination", - "amount", - "status" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "source": { - "$ref": "#/components/schemas/TransferSourceLocation" - }, - "destination": { - "$ref": "#/components/schemas/TransferDestinationLocation" - }, - "amount": { - "$ref": "#/components/schemas/Money" - }, - "transactionHash": { - "description": "A hash that uniquely identifies the onchain transaction. This is only available where either source or destination are of type blockchain.", - "type": "string", - "example": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63" - }, - "status": { - "description": "Status of the transfer. Status `pending` indicates that the transfer is in the process of running; `complete` indicates it finished successfully; `failed` indicates it failed.", - "type": "string", - "enum": [ - "pending", - "complete", - "failed" - ] - }, - "errorCode": { - "$ref": "#/components/schemas/TransferErrorCode" - }, - "createDate": { - "description": "The create date of the transfer.", - "type": "string", - "format": "date-time" - } - } - }, - "TransferRequestVerifiedBlockchainLocation": { - "type": "object", - "required": [ - "type", - "addressId" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "verified_blockchain" - ] - }, - "addressId": { - "type": "string", - "description": "The ID of the verified blockchain recipient address.", - "example": "f1f36b85-cafe-484e-a46b-02340bfdb927", - "format": "uuid" - } - } - }, - "BusinessAccountTransferCreationRequest": { - "type": "object", - "required": [ - "idempotencyKey", - "destination", - "amount" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "destination": { - "$ref": "#/components/schemas/TransferRequestVerifiedBlockchainLocation" - }, - "amount": { - "$ref": "#/components/schemas/Money" - } - } - }, - "Currency": { - "type": "string", - "description": "A currency associated with a balance or address.", - "nullable": true, - "enum": [ - "USD", - "EUR", - "BTC", - "ETH" - ] - }, - "AddressObject": { - "type": "object", - "properties": { - "address": { - "$ref": "#/components/schemas/Address" - }, - "addressTag": { - "$ref": "#/components/schemas/AddressTag" - }, - "currency": { - "$ref": "#/components/schemas/Currency" - }, - "chain": { - "$ref": "#/components/schemas/Chain" - } - } - }, - "BusinessAccountGenerateAddressRequest": { - "type": "object", - "required": [ - "idempotencyKey", - "currency", - "chain" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "currency": { - "$ref": "#/components/schemas/Currency" - }, - "chain": { - "$ref": "#/components/schemas/Chain" - } - } - }, - "BusinessAccountDescription": { - "type": "string", - "description": "An identifier or sentence that describes the recipient.", - "example": "My USDC address at a cryptocurrency exchange" - }, - "BusinessAccountRecipientAddressObject": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "address": { - "$ref": "#/components/schemas/Address" - }, - "addressTag": { - "$ref": "#/components/schemas/AddressTag" - }, - "chain": { - "$ref": "#/components/schemas/Chain" - }, - "currency": { - "$ref": "#/components/schemas/Currency" - }, - "description": { - "$ref": "#/components/schemas/BusinessAccountDescription" - } - } - }, - "BusinessAccountRecipientAddressCreationRequest": { - "type": "object", - "description": "Adds a recipient address. The currency parameter will default to USD for all chains except for BTC where it defaults to BTC.", - "required": [ - "idempotencyKey", - "address", - "chain", - "description" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "address": { - "$ref": "#/components/schemas/Address" - }, - "addressTag": { - "$ref": "#/components/schemas/AddressTag" - }, - "chain": { - "$ref": "#/components/schemas/Chain" - }, - "currency": { - "$ref": "#/components/schemas/Currency" - }, - "description": { - "$ref": "#/components/schemas/BusinessAccountDescription" - } - } - }, - "WalletLocation": { - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "wallet" - ] - }, - "id": { - "type": "string", - "description": "The id of the wallet.", - "example": "12345" - } - } - }, - "BusinessAccountDeposit": { - "type": "object", - "description": "A deposit", - "required": [ - "id", - "destination", - "amount", - "status", - "createDate" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "sourceWalletId": { - "type": "string", - "description": "The identifier for the bank account where the funds were deposited from.", - "format": "uuid", - "example": "9b57048d-2365-4ff5-956b-0199170d1035" - }, - "destination": { - "$ref": "#/components/schemas/WalletLocation" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoney" - }, - "fee": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "status": { - "type": "string", - "description": "Status of the deposit. Status `pending` indicates that the deposit is in the process of running; `complete` indicates it finished successfully; `failed` indicates it failed.", - "enum": [ - "pending", - "complete", - "failed" - ] - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "MockSenPaymentBeneficiaryBankInstruction": { - "type": "object", - "required": [ - "accountNumber" - ], - "properties": { - "accountNumber": { - "type": "string", - "description": "Circle corporate Silvergate SEN account number that needs to be set as destination.", - "example": "11111111" - } - } - }, - "MockSenPaymentRequest": { - "type": "object", - "required": [ - "trackingRef", - "amount", - "beneficiaryBank" - ], - "properties": { - "trackingRef": { - "type": "string", - "description": "Circle tracking reference that needs to be set in the memo filed. This field is retrievable through the response during SEN account creation or via the bank instruction endpoint.", - "example": "CIR13FB13A" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoney" - }, - "beneficiaryBank": { - "$ref": "#/components/schemas/MockSenPaymentBeneficiaryBankInstruction" - } - } - }, - "MockSenPaymentResponse": { - "type": "object", - "properties": { - "trackingRef": { - "type": "string", - "description": "Wire tracking reference that needs to be set in the wire reference to beneficiary field. This field is retrievable through the response during wire creation or via the bank instruction endpoint.", - "example": "CIR13FB13A" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "beneficiaryBank": { - "$ref": "#/components/schemas/MockSenPaymentBeneficiaryBankInstruction" - }, - "status": { - "type": "string", - "description": "Enumerated status of the wire payment. Status `pending` indicates that the wire payment is in process; `processed` indicates it finished successfully; `failed` indicates it failed.", - "enum": [ - "pending", - "processed", - "failed" - ] - } - } - }, - "Wallet": { - "type": "object", - "properties": { - "walletId": { - "type": "string", - "description": "Wallet identifier. Numeric value but should be treated as a string as format may change in the future'", - "example": "434000" - }, - "entityId": { - "type": "string", - "description": "Universally unique identifier (UUID v4) of the entity that owns the wallet.", - "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" - }, - "type": { - "type": "string", - "description": "Wallet type.", - "enum": [ - "end_user_wallet" - ] - }, - "description": { - "type": "string", - "description": "A human-friendly, non-unique identifier for a wallet.", - "example": "Treasury Wallet", - "maxLength": 255 - }, - "balances": { - "description": "A list of balances for currencies owned by the wallet.", - "type": "array", - "items": { - "$ref": "#/components/schemas/Money" - } - } - } - }, - "WalletCreationRequest": { - "type": "object", - "required": [ - "idempotencyKey" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "description": { - "type": "string", - "description": "A human-friendly, non-unique identifier for a wallet.", - "example": "Treasury Wallet", - "maxLength": 255 - } - } - }, - "GenerateAddressRequest": { - "type": "object", - "required": [ - "idempotencyKey", - "currency", - "chain" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "currency": { - "$ref": "#/components/schemas/Currency" - }, - "chain": { - "$ref": "#/components/schemas/Chain" - } - } - }, - "TransferRequestSourceWalletLocation": { - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "wallet" - ] - }, - "id": { - "type": "string", - "description": "The id of the wallet.", - "example": "12345" - }, - "identities": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Identity" - } - } - } - }, - "TransferRequestBlockchainLocation": { - "type": "object", - "required": [ - "type", - "address", - "chain" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "blockchain" - ] - }, - "address": { - "type": "string", - "description": "The blockchain address.", - "example": "0x8381470ED67C3802402dbbFa0058E8871F017A6F" - }, - "addressTag": { - "$ref": "#/components/schemas/AddressTag" - }, - "chain": { - "$ref": "#/components/schemas/Chain" - } - } - }, - "TransferCreationRequest": { - "type": "object", - "required": [ - "idempotencyKey", - "source", - "destination", - "amount" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "source": { - "$ref": "#/components/schemas/TransferRequestSourceWalletLocation" - }, - "destination": { - "oneOf": [ - { - "$ref": "#/components/schemas/TransferRequestBlockchainLocation" - }, - { - "$ref": "#/components/schemas/WalletLocation" - } - ] - }, - "amount": { - "$ref": "#/components/schemas/Money" - } - } - }, - "TransferDetailedTransfer": { - "type": "object", - "description": "A transfer of funds.", - "required": [ - "id", - "source", - "destination", - "amount", - "status" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "source": { - "$ref": "#/components/schemas/TransferSourceLocation" - }, - "destination": { - "$ref": "#/components/schemas/TransferDestinationLocation" - }, - "amount": { - "$ref": "#/components/schemas/Money" - }, - "transactionHash": { - "type": "string", - "description": "A hash that uniquely identifies the onchain transaction. This is only available where either source or destination are of type blockchain.", - "example": "0x4cebf8f90c9243a23c77e4ae20df691469e4b933b295a73376292843968f7a63" - }, - "status": { - "type": "string", - "description": "Status of the transfer. Status `pending` indicates that the transfer is in the process of running; `complete` indicates it finished successfully; `failed` indicates it failed.", - "enum": [ - "failed", - "pending", - "complete" - ] - }, - "errorCode": { - "$ref": "#/components/schemas/TransferErrorCode" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "Ping": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string", - "example": "pong" - } - } - }, - "MerchantWalletId": { - "type": "string", - "description": "Unique system generated identifier for the wallet of the merchant.", - "maxLength": 36, - "example": "212000" - }, - "AccountConfiguration": { - "type": "object", - "properties": { - "payments": { - "type": "object", - "properties": { - "masterWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - } - } - } - } - }, - "IdKey": { - "type": "string", - "description": "Universally unique identifier (UUID v4) of the public key used in encryption. NOTE the sandbox environment uses the default value of `key1`. For this reason the example supplied is `key1` rather than a UUID.", - "format": "uuid", - "example": "key1" - }, - "PublicKey": { - "type": "object", - "required": [ - "keyId", - "publicKey" - ], - "properties": { - "keyId": { - "$ref": "#/components/schemas/IdKey" - }, - "publicKey": { - "type": "string", - "description": "A PGP ascii-armor encoded public key.", - "example": "LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEJDUEcgdjEuNTQKCm1RRU5CRjAxdmk0QkNBQ3JzMDNLS1Y0Qk9SRkYyT0Z4bUdvb0UyaTZMbnNneE5UL1dsV2s1ZTl2RDd2NENkSm0KcGJJbENmZ0U4WFlnYmhKUTE4YStaTzlPM0RFYUp2dGhJSEtjL0l1UEIvZmdEYUJUT285NkJzL2pVRFp6ZGxaVApQazNFUjliNFZPeGVwMFNPSHFMcmxTVFY4ZXB3M1R3SEdaL3NpSWdBYXEwRGdJdlZxUTY4TGVaMnorUFJWZm04CmhhSnJpb05SRU5Ja2ZNTWY5aFdySlowSW1zUk1aVmpDMVVrd2FSSHdrTTMwQUlia1dYcFJ5R205SXhQaXdGa08Kb1RnWlpwUFpsdVczckdkWER0NHZqL24za09hczV1dFdoNFovMlhjWHBiSUUyU0FPK0hycUdIclRnK1ZmZ05JNwpZcVZqYW5MOEN1bm83UkxmcDhKZlZDNXBLUm5ySVNCTnphN1ZBQkVCQUFHMEJrTnBjbU5zWllrQkhBUVFBUWtBCkJnVUNYVFcrTGdBS0NSQ3EzaHNwWjBMeGEwdnpCLzQvQTJpdk1CWW1aZXV2bEJZMm5ZZnNXek9Sb28vU3BIYkQKY2Y0UmtxZzZ0RERJSkUzNHhDVit0MzJydmJkM0ZOdVZseWs1MDVZRkpESnI4cVc2S0tkQVRXdU16eW5mMVVoUAo1M25hTlc0cXdrdSt3b0RWWjJpci9lUVI1WUc4L0RGcnd3bXdaa0dRd0Ftc3h5ZHd5anBnLzBrQ3lpZHkxdVBkCmVVWGgwdWt4dS9Dais4UFl5cHcwdit5V2tzbjdSZ2dVbkJFMWhiQ2pEV3FweHZjMEpDNVAxdmx6L2xRcWQrR3oKRC9Td1FJTVdRVElnV3BHRVVvQTRDc3drbU5PdHhsRVF1U0tueXNtTG02S0ExUmRhTzd6V2IrdWNLN21FZ2VoSwpXU2hHZExqRVNNZlVRUTczemNqMXg2amxLUFNhRlJyLzhXcHhrVXYzVHYvQzZMb0JpejRLCj1WSWg3Ci0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0K" - } - } - }, - "SubscriptionDetail": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Identifier for created subscription.", - "example": "arn:aws:sns:us-east-1:<...>:fcb4a2c9-9c4f-4706-b312-6b22650f5d17" - }, - "status": { - "type": "string", - "description": "Status of the subscription request.", - "enum": [ - "confirmed", - "pending", - "deleted" - ] - } - } - }, - "SubscriptionResponse": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "endpoint": { - "type": "string", - "description": "URL of the endpoint.", - "example": "https://example.org/handler/for/notifications" - }, - "subscriptionDetails": { - "type": "array", - "description": "List of subscriptions details for created subscriptions.", - "items": { - "$ref": "#/components/schemas/SubscriptionDetail" - } - } - } - }, - "SubscriptionRequest": { - "type": "object", - "required": [ - "endpoint" - ], - "properties": { - "endpoint": { - "type": "string", - "description": "URL of the subscriber endpoint. Must be publicly accessible and utilize HTTPS.", - "example": "https://example.org/handler/for/notifications" - } - } - }, - "UnsubscribeResponse": { - "type": "object", - "description": "Unsubscribe response object. No fields as of now.", - "example": {} - }, - "ChannelResponse": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "default": { - "type": "boolean", - "description": "Flag to indicate whether the channel is configured as default. At most one of the channels will have this flag set to true and the default channel is used when a payment request does not have the `channel` property set.", - "example": true - }, - "cardDescriptor": { - "type": "string", - "description": "Descriptor that appears on cardholders' bank statements for card payments submitted through this channel.", - "example": "CIRCLE LLC." - }, - "achDescriptor": { - "type": "string", - "description": "Descriptor that appears on end-users' bank statements for ACH payments submitted through this channel.", - "example": "CIRCLE LLC." - } - } - }, - "TokenAmount": { - "type": "object", - "required": [ - "amount", - "chain" - ], - "properties": { - "amount": { - "type": "string", - "description": "Magnitude of the amount, in units of the currency, with a `.`.", - "example": "132.584192" - }, - "chain": { - "$ref": "#/components/schemas/Chain" - } - } - }, - "Stablecoin": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the stablecoin.", - "example": "USD Coin" - }, - "symbol": { - "type": "string", - "description": "Symbol of the stablecoin.", - "example": "USDC" - }, - "totalAmount": { - "type": "string", - "description": "Total circulating amount of the stablecoin.", - "example": "132.584192" - }, - "chains": { - "type": "array", - "description": "A list of the broken down totalAmount by chain of the stablecoin.", - "items": { - "$ref": "#/components/schemas/TokenAmount" - } - } - } - }, - "Stablecoins": { - "type": "array", - "description": "A list of stablecoin objects containing its name, symbol, total amount, and per-chain amount.", - "items": { - "$ref": "#/components/schemas/Stablecoin" - } - }, - "IdMerchant": { - "type": "string", - "description": "Unique system generated identifier for the merchant.", - "format": "uuid", - "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" - }, - "SourceResponse": { - "type": "object", - "description": "The payment source.", - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "type": { - "type": "string", - "description": "Type of the source.", - "enum": [ - "card", - "ach", - "wire", - "sepa" - ] - } - } - }, - "PaymentStatus": { - "type": "string", - "description": "Enumerated status of the payment. `pending` means the payment is waiting to be processed. `confirmed` means the payment has been approved by the bank and the merchant can treat it as successful, but settlement funds are not yet available to the merchant. `paid` means settlement funds have been received and are available to the merchant. `failed` means something went wrong (most commonly that the payment was denied). `action_required` means that additional steps are required to process this payment; refer to `requiredAction` for more details. Terminal states are `paid` and `failed`.", - "enum": [ - "pending", - "confirmed", - "paid", - "failed", - "action_required" - ] - }, - "RequiredAction": { - "type": "object", - "description": "When the payment status is `action_required`, this object summarizes the required additional steps.", - "required": [ - "type", - "redirectUrl" - ], - "properties": { - "type": { - "type": "string", - "description": "The type of action that is required to proceed with the payment. Currently only one type is supported.", - "enum": [ - "three_d_secure_required" - ] - }, - "redirectUrl": { - "type": "string", - "description": "The URL to bring the user to in order to complete the payment.", - "example": "https://example.org" - } - } - }, - "CancelRefundReversalStatus": { - "type": "string", - "enum": [ - "pending", - "confirmed", - "paid", - "failed" - ], - "description": "Enumerated status of the payment. `pending` means the payment is waiting to be processed. `confirmed` means the payment has been approved by the bank and the merchant can treat it as successful, but settlement funds are not yet available to the merchant. `paid` means settlement funds have been received and are available to the merchant. `failed` means something went wrong (most commonly that the payment was denied). Terminal states are `paid` and `failed`." - }, - "PaymentInfoCancel": { - "type": "object", - "description": "Status information of the related cancel. This property is only present on canceled payment or refund items.", - "nullable": true, - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "type": { - "type": "string", - "description": "Type of the payment object.", - "enum": [ - "cancel" - ] - }, - "description": { - "description": "Enumerated description of the payment item.", - "type": "string", - "nullable": true, - "enum": [ - "Payment" - ] - }, - "status": { - "$ref": "#/components/schemas/CancelRefundReversalStatus" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "PaymentInfoPaymentAndRefund": { - "type": "object", - "description": "Status information of the related payment. This property is only present on refund or cancel items.", - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "type": { - "type": "string", - "description": "Type of the payment object.", - "enum": [ - "payment", - "refund" - ] - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "description": { - "type": "string", - "description": "Enumerated description of the payment item.", - "nullable": true, - "enum": [ - "Payment" - ] - }, - "status": { - "$ref": "#/components/schemas/PaymentStatus" - }, - "requiredAction": { - "$ref": "#/components/schemas/RequiredAction" - }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "Channel": { - "type": "string", - "format": "uuid", - "description": "The channel identifier that can be set for the payment. When not provided, the default channel is used.", - "example": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7" - }, - "BasicPayment": { - "type": "object", - "description": "Status information of the related payment. This property is only present on refund or cancel items.", - "required": [ - "id", - "type", - "merchantId", - "amount", - "source", - "status" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "type": { - "description": "Type of the payment object.", - "type": "string", - "enum": [ - "payment" - ] - }, - "merchantId": { - "$ref": "#/components/schemas/IdMerchant" - }, - "merchantWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "source": { - "$ref": "#/components/schemas/SourceResponse" - }, - "description": { - "description": "Enumerated description of the payment.", - "type": "string", - "enum": [ - "Payment" - ] - }, - "status": { - "$ref": "#/components/schemas/PaymentStatus" - }, - "captured": { - "description": "Determines if a payment has successfully been captured. This property is only present for payments that did not use auto capture.", - "type": "boolean" - }, - "captureAmount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "captureDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "requiredAction": { - "$ref": "#/components/schemas/RequiredAction" - }, - "cancel": { - "$ref": "#/components/schemas/PaymentInfoCancel" - }, - "refunds": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentInfoPaymentAndRefund" - } - }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "channel": { - "$ref": "#/components/schemas/Channel" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "Email": { - "type": "string", - "description": "Email of the user.", - "maxLength": 1024, - "example": "satoshi@circle.com" - }, - "PhoneNumber": { - "type": "string", - "description": "Phone number of the user in E.164 format. We recommend using a library such as [libphonenumber](https://github.com/google/libphonenumber) to parse and validate phone numbers.", - "maxLength": 16, - "pattern": "/\\+?[1-9]\\d{1,14}/", - "example": "+14155555555" - }, - "SessionId": { - "description": "Hash of the session identifier; typically of the end user. This helps us make risk decisions and prevent fraud. IMPORTANT: Please hash the session identifier to prevent sending us actual session identifiers.\n", - "type": "string", - "maxLength": 50, - "example": "DE6FA86F60BB47B379307F851E238617" - }, - "IpAddress": { - "type": "string", - "description": "Single IPv4 or IPv6 address of user'", - "example": "244.28.239.130" - }, - "MetadataPayment": { - "type": "object", - "required": [ - "email", - "sessionId", - "ipAddress" - ], - "properties": { - "email": { - "$ref": "#/components/schemas/Email" - }, - "phoneNumber": { - "$ref": "#/components/schemas/PhoneNumber" - }, - "sessionId": { - "$ref": "#/components/schemas/SessionId" - }, - "ipAddress": { - "$ref": "#/components/schemas/IpAddress" - } - } - }, - "Source": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "type": { - "type": "string", - "description": "Type of the source.", - "enum": [ - "card", - "ach" - ] - } - } - }, - "PaymentCreationRequest": { - "type": "object", - "required": [ - "idempotencyKey", - "amount", - "verification", - "source", - "metadata" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "keyId": { - "$ref": "#/components/schemas/IdKey" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataPayment" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "autoCapture": { - "type": "boolean", - "description": "Triggers the automatic capture of the full payment amount. If set to false the payment will only be authorized but not captured.", - "default": true, - "example": true - }, - "verification": { - "type": "string", - "description": "Indicates the verification method for this payment.", - "enum": [ - "none", - "cvv", - "three_d_secure" - ] - }, - "verificationSuccessUrl": { - "type": "string", - "description": "The URL to redirect users to after successful 3DS authentication.", - "format": "url", - "example": "https://www.example.com/3ds/verificationsuccessful" - }, - "verificationFailureUrl": { - "type": "string", - "description": "The URL to redirect users to after failed 3DS authentication.", - "format": "url", - "example": "https://www.example.com/3ds/verificationfailure" - }, - "source": { - "$ref": "#/components/schemas/Source" - }, - "description": { - "type": "string", - "description": "Description of the payment with length restriction of 240 characters.", - "example": "Payment" - }, - "encryptedData": { - "type": "string", - "format": "byte", - "description": "PGP encrypted base64 encoded string. Contains CVV.\n* **CVV (Card Verification Number)**: Three or four digit security code. Only required if `verification` is `cvv`.\n", - "example": "UHVibGljS2V5QmFzZTY0RW5jb2RlZA==" - }, - "channel": { - "$ref": "#/components/schemas/Channel" - } - } - }, - "AvsResults": { - "type": "string", - "description": "Status of the AVS check. Raw AVS response, expressed as an upper-case letter. `not_requested` indicates check was not made. `pending` is pending/processing.", - "example": "D" - }, - "CvvResults": { - "description": "Enumerated status of the check. `not_requested` indicates check was not made. `pass` indicates value is correct. `fail` indicates value is incorrect. `unavailable` indicates card issuer did not do the provided check. `pending` indicates check is pending/processing.", - "type": "string", - "enum": [ - "not_requested", - "pass", - "fail", - "unavailable", - "pending" - ] - }, - "3dsResults": { - "type": "string", - "description": "Enumerated status of the check. `pass` indicates successful 3DS authentication. `fail` indicates failed 3DS authentication.", - "enum": [ - "pass", - "fail" - ] - }, - "Eci": { - "type": "string", - "description": "ECI (electronic commerce indicator) value returned by Directory Servers (namely Visa, MasterCard, JCB, and American Express) indicating the outcome of authentication attempted on transactions enforced by 3DS.", - "enum": [ - "00", - "01", - "02", - "05", - "06", - "07" - ] - }, - "PaymentVerificationResponse": { - "type": "object", - "description": "Indicates the status of the payment verification. This property will be present once the payment is confirmed.", - "required": [ - "avs", - "cvv" - ], - "properties": { - "avs": { - "$ref": "#/components/schemas/AvsResults" - }, - "cvv": { - "$ref": "#/components/schemas/CvvResults" - }, - "threeDSecure": { - "$ref": "#/components/schemas/3dsResults" - }, - "eci": { - "$ref": "#/components/schemas/Eci" - } - } - }, - "BasicCancel": { - "type": "object", - "description": "Status information of the related cancel. This property is only present on canceled payment or refund items.", - "nullable": true, - "required": [ - "id", - "type", - "merchantId", - "amount", - "source", - "status" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "type": { - "type": "string", - "description": "Type of the payment object.", - "enum": [ - "cancel" - ] - }, - "merchantId": { - "$ref": "#/components/schemas/IdMerchant" - }, - "merchantWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "source": { - "$ref": "#/components/schemas/SourceResponse" - }, - "description": { - "description": "Enumerated description of the payment.", - "type": "string", - "enum": [ - "Payment" - ] - }, - "status": { - "$ref": "#/components/schemas/CancelRefundReversalStatus" - }, - "originalPayment": { - "$ref": "#/components/schemas/PaymentInfoPaymentAndRefund" - }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "channel": { - "$ref": "#/components/schemas/Channel" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "BasicRefund": { - "type": "object", - "required": [ - "id", - "type", - "merchantId", - "amount", - "source", - "status" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "type": { - "description": "Type of the payment object.", - "type": "string", - "enum": [ - "refund" - ] - }, - "merchantId": { - "$ref": "#/components/schemas/IdMerchant" - }, - "merchantWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "source": { - "$ref": "#/components/schemas/SourceResponse" - }, - "description": { - "description": "Enumerated description of the payment.", - "type": "string", - "enum": [ - "Payment" - ] - }, - "status": { - "$ref": "#/components/schemas/CancelRefundReversalStatus" - }, - "originalPayment": { - "$ref": "#/components/schemas/PaymentInfoPaymentAndRefund" - }, - "cancel": { - "$ref": "#/components/schemas/PaymentInfoCancel" - }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "channel": { - "$ref": "#/components/schemas/Channel" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "PaymentErrorCode": { - "type": "string", - "description": "Indicates the failure reason of a payment. Only present for payments in failed state. Possible values are [`payment_failed`, `payment_fraud_detected`, `payment_denied`, `payment_not_supported_by_issuer`, `payment_not_funded`, `payment_unprocessable`, `payment_stopped_by_issuer`, `payment_canceled`, `payment_returned`, `payment_failed_balance_check`, `card_failed`, `card_invalid`, `card_address_mismatch`, `card_zip_mismatch`, `card_cvv_invalid`, `card_expired`, `card_limit_violated`, `card_not_honored`, `card_cvv_required`, `credit_card_not_allowed`, `card_account_ineligible`, `card_network_unsupported`, `channel_invalid`, `unauthorized_transaction`, `bank_account_ineligible`, `bank_transaction_error`, `invalid_account_number`, `invalid_wire_rtn`, `invalid_ach_rtn`, `vendor_inactive`]'", - "nullable": true, - "enum": [ - "payment_failed", - "payment_fraud_detected", - "payment_denied", - "payment_not_supported_by_issuer", - "payment_not_funded", - "payment_unprocessable", - "payment_stopped_by_issuer", - "payment_canceled", - "payment_returned", - "payment_failed_balance_check", - "card_failed", - "card_invalid", - "card_address_mismatch", - "card_zip_mismatch", - "card_cvv_invalid", - "card_expired", - "card_limit_violated", - "card_not_honored", - "card_cvv_required", - "card_restricted,", - "card_account_ineligible", - "card_network_unsupported", - "channel_invalid", - "unauthorized_transaction", - "bank_account_ineligible", - "bank_transaction_error", - "invalid_account_number", - "invalid_wire_rtn", - "invalid_ach_rtn", - "ref_id_invalid", - "account_name_mismatch", - "account_number_mismatch", - "account_ineligible", - "wallet_address_mismatch", - "customer_name_mismatch", - "institution_name_mismatch", - "vendor_inactive" - ] - }, - "MetadataPhoneEmail": { - "type": "object", - "required": [ - "email" - ], - "properties": { - "email": { - "$ref": "#/components/schemas/Email" - }, - "phoneNumber": { - "$ref": "#/components/schemas/PhoneNumber" - } - } - }, - "DetailedPayment": { - "type": "object", - "required": [ - "id", - "type", - "merchantId", - "amount", - "source", - "status" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "type": { - "description": "Type of the payment object.", - "type": "string", - "enum": [ - "payment" - ] - }, - "merchantId": { - "$ref": "#/components/schemas/IdMerchant" - }, - "merchantWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "source": { - "$ref": "#/components/schemas/SourceResponse" - }, - "description": { - "type": "string", - "description": "Enumerated description of the payment.", - "enum": [ - "Payment" - ] - }, - "status": { - "$ref": "#/components/schemas/PaymentStatus" - }, - "captured": { - "type": "boolean", - "description": "Determines if a payment has successfully been captured. This property is only present for payments that did not use auto capture." - }, - "captureAmount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "captureDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "requiredAction": { - "$ref": "#/components/schemas/RequiredAction" - }, - "verification": { - "$ref": "#/components/schemas/PaymentVerificationResponse" - }, - "cancel": { - "$ref": "#/components/schemas/BasicCancel" - }, - "refunds": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BasicRefund" - } - }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "trackingRef": { - "description": "Payment tracking reference. Will be present once known.", - "type": "string", - "nullable": true, - "example": "24910599141085313498894" - }, - "errorCode": { - "$ref": "#/components/schemas/PaymentErrorCode", - "nullable": true - }, - "metadata": { - "$ref": "#/components/schemas/MetadataPhoneEmail" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, - "channel": { - "$ref": "#/components/schemas/Channel" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "ExternalRef": { - "type": "string", - "description": "External network identifier which will be present once provided from the applicable network. \n\nExamples:\n* **Input/Output Message Accountability Data (IMAD/OMAD)**: unique number given to each FedWire payment when using the Federal Reserve Bank Service which can be used to investigate and track wire transfers.\n", - "example": "YYYYMMDDXXXXXXXX012345" - }, - "DetailedPaymentPolymorphic": { - "type": "object", - "required": [ - "id", - "type", - "merchantId", - "amount", - "source", - "status" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "type": { - "description": "Type of the payment object.", - "type": "string", - "enum": [ - "payment", - "refund", - "cancel" - ] - }, - "merchantId": { - "$ref": "#/components/schemas/IdMerchant" - }, - "merchantWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "source": { - "$ref": "#/components/schemas/SourceResponse" - }, - "description": { - "description": "Enumerated description of the payment.", - "type": "string", - "enum": [ - "Payment" - ] - }, - "status": { - "$ref": "#/components/schemas/PaymentStatus" - }, - "requiredAction": { - "$ref": "#/components/schemas/RequiredAction" - }, - "verification": { - "$ref": "#/components/schemas/PaymentVerificationResponse" - }, - "originalPayment": { - "$ref": "#/components/schemas/BasicPayment" - }, - "cancel": { - "$ref": "#/components/schemas/BasicCancel" - }, - "refunds": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/BasicRefund" - } - }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "trackingRef": { - "description": "Payment tracking reference. Will be present once known.", - "type": "string", - "nullable": true, - "example": "24910599141085313498894" - }, - "externalRef": { - "$ref": "#/components/schemas/ExternalRef" - }, - "errorCode": { - "$ref": "#/components/schemas/PaymentErrorCode" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataPhoneEmail" - }, - "channel": { - "$ref": "#/components/schemas/Channel" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "CaptureCreationRequest": { - "type": "object", - "required": [ - "idempotencyKey" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - } - } - }, - "ReversalReason": { - "type": "string", - "description": "Enumerated reason for a returned payment. Providing this reason in the request is recommended (to improve risk evaluation) but not required.", - "enum": [ - "duplicate", - "fraudulent", - "requested_by_customer", - "bank_transaction_error", - "invalid_account_number", - "insufficient_funds", - "payment_stopped_by_issuer", - "payment_returned", - "bank_account_ineligible", - "invalid_ach_rtn", - "unauthorized_transaction", - "payment_failed" - ] - }, - "CancelCreationRequest": { - "type": "object", - "required": [ - "idempotencyKey" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "reason": { - "$ref": "#/components/schemas/ReversalReason" - } - } - }, - "DetailedCancel": { - "type": "object", - "required": [ - "id", - "type", - "merchantId", - "amount", - "source", - "status" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "type": { - "description": "Type of the payment object.", - "type": "string", - "enum": [ - "cancel" - ] - }, - "merchantId": { - "$ref": "#/components/schemas/IdMerchant" - }, - "merchantWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "source": { - "$ref": "#/components/schemas/SourceResponse" - }, - "description": { - "description": "Enumerated description of the payment.", - "type": "string", - "enum": [ - "Payment" - ] - }, - "status": { - "$ref": "#/components/schemas/CancelRefundReversalStatus" - }, - "originalPayment": { - "$ref": "#/components/schemas/BasicPayment" - }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "trackingRef": { - "description": "Payment tracking reference. Will be present once known.", - "type": "string", - "nullable": true, - "example": "24910599141085313498894" - }, - "errorCode": { - "$ref": "#/components/schemas/PaymentErrorCode" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataPhoneEmail" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, - "refund": { - "description": "If the cancel was made after a cutoff time period, it will be processed as a refund. This flag indicates that the cancel was processed as a refund'", - "type": "boolean", - "default": false - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "RefundCreationRequest": { - "type": "object", - "required": [ - "idempotencyKey", - "amount" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "reason": { - "$ref": "#/components/schemas/ReversalReason" - } - } - }, - "DetailedRefund": { - "type": "object", - "required": [ - "id", - "type", - "merchantId", - "amount", - "source", - "status" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "type": { - "description": "Type of the payment object.", - "type": "string", - "enum": [ - "refund" - ] - }, - "merchantId": { - "$ref": "#/components/schemas/IdMerchant" - }, - "merchantWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "source": { - "$ref": "#/components/schemas/SourceResponse" - }, - "description": { - "description": "Enumerated description of the payment.", - "type": "string", - "enum": [ - "Payment" - ] - }, - "status": { - "$ref": "#/components/schemas/CancelRefundReversalStatus" - }, - "originalPayment": { - "$ref": "#/components/schemas/BasicPayment" - }, - "cancel": { - "$ref": "#/components/schemas/BasicCancel" - }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "trackingRef": { - "description": "Payment tracking reference. Will be present once known.", - "type": "string", - "nullable": true, - "example": "24910599141085313498894" - }, - "errorCode": { - "$ref": "#/components/schemas/PaymentErrorCode" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataPhoneEmail" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "MockWirePaymentBeneficiaryBankInstruction": { - "type": "object", - "required": [ - "accountNumber" - ], - "properties": { - "accountNumber": { - "type": "string", - "description": "Virtual account number or Circle corporate Silvergate Wire account number that needs to be set as destination.", - "example": "11111111" - } - } - }, - "MockWirePaymentRequest": { - "type": "object", - "required": [ - "trackingRef", - "amount", - "beneficiaryBank" - ], - "properties": { - "trackingRef": { - "type": "string", - "description": "Wire tracking reference that needs to be set in the wire reference to beneficiary field. This field is retrievable through the response during wire creation or via the bank instruction endpoint.", - "example": "CIR13FB13A" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "beneficiaryBank": { - "$ref": "#/components/schemas/MockWirePaymentBeneficiaryBankInstruction" - } - } - }, - "MockWirePaymentResponse": { - "type": "object", - "properties": { - "trackingRef": { - "type": "string", - "description": "Wire tracking reference that needs to be set in the wire reference to beneficiary field. This field is retrievable through the response during wire creation or via the bank instruction endpoint.", - "example": "CIR13FB13A" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "beneficiaryBank": { - "$ref": "#/components/schemas/MockWirePaymentBeneficiaryBankInstruction" - }, - "status": { - "type": "string", - "description": "Enumerated status of the wire payment. Status `pending` indicates that the wire payment is in process; `processed` indicates it finished successfully; `failed` indicates it failed.", - "enum": [ - "pending", - "processed", - "failed" - ] - } - } - }, - "MockSepaPaymentRequest": { - "type": "object", - "required": [ - "trackingRef", - "amount" - ], - "properties": { - "trackingRef": { - "type": "string", - "description": "SEPA tracking reference that needs to be set in the payment details or description.", - "example": "CIR13FB13A" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - } - } - }, - "MockSepaPaymentResponse": { - "type": "object", - "properties": { - "trackingRef": { - "type": "string", - "description": "SEPA tracking reference that needs to be set in the payment details or description.", - "example": "CIR13FB13A" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "status": { - "type": "string", - "description": "Enumerated status of the SEPA payment. Status `pending` indicates that the SEPA payment is in process; `processed` indicates it finished successfully; `failed` indicates it failed.", - "enum": [ - "pending", - "processed", - "failed" - ] - } - } - }, - "SimpleBillingDetails": { - "type": "object", - "description": "Billing details of the card holder.", - "required": [ - "country", - "district" - ], - "properties": { - "country": { - "type": "string", - "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "maxLength": 2, - "example": "US" - }, - "district": { - "type": "string", - "description": "State / County / Province / Region portion of the address. US and Canada use the two-letter code for the subdivision.", - "maxLength": 16, - "example": "MA" - } - } - }, - "CardVerificationResponse": { - "type": "object", - "description": "Indicates the status of the card for verification purposes.", - "required": [ - "avs", - "cvv" - ], - "properties": { - "avs": { - "$ref": "#/components/schemas/AvsResults" - }, - "cvv": { - "$ref": "#/components/schemas/CvvResults" - } - } - }, - "SimpleCard": { - "type": "object", - "required": [ - "id", - "status", - "fingerprint", - "billingDetails", - "expMonth", - "expYear", - "network", - "verification", - "createDate", - "updateDate" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "status": { - "$ref": "#/components/schemas/ExternalFiatAccountStatus" - }, - "billingDetails": { - "$ref": "#/components/schemas/SimpleBillingDetails" - }, - "expMonth": { - "type": "integer", - "description": "Two digit number representing the card's expiration month.", - "example": 1 - }, - "expYear": { - "type": "integer", - "description": "Four digit number representing the card's expiration year.", - "example": 2020 - }, - "network": { - "type": "string", - "description": "The network of the card.", - "enum": [ - "VISA", - "MASTERCARD", - "AMEX", - "UNKNOWN" - ] - }, - "bin": { - "type": "string", - "description": "The bank identification number (BIN), the first 6 digits of the card.", - "example": "401230" - }, - "issuerCountry": { - "type": "string", - "description": "The country code of the issuer bank. Follows the ISO 3166-1 alpha-2 standard.", - "example": "US" - }, - "fingerprint": { - "$ref": "#/components/schemas/Fingerprint" - }, - "verification": { - "$ref": "#/components/schemas/CardVerificationResponse" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "CardExpMonth": { - "type": "integer", - "description": "Two digit number representing the card's expiration month.", - "minimum": 1, - "maximum": 12, - "example": 1 - }, - "CardExpYear": { - "type": "integer", - "description": "Four digit number representing the card's expiration year.", - "minimum": 1, - "maximum": 9999, - "example": 2020 - }, - "MetadataCardAndAch": { - "type": "object", - "required": [ - "email", - "sessionId", - "ipAddress" - ], - "properties": { - "email": { - "$ref": "#/components/schemas/Email" - }, - "phoneNumber": { - "$ref": "#/components/schemas/PhoneNumber" - }, - "sessionId": { - "$ref": "#/components/schemas/SessionId" - }, - "ipAddress": { - "$ref": "#/components/schemas/IpAddress" - } - } - }, - "CardCreationRequest": { - "type": "object", - "required": [ - "idempotencyKey", - "expMonth", - "expYear", - "encryptedData", - "billingDetails", - "metadata" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "keyId": { - "$ref": "#/components/schemas/IdKey" - }, - "encryptedData": { - "type": "string", - "format": "byte", - "description": "PGP encrypted base64 encoded string. Contains Number and CVV.\n* **Number**: Card number. No spaces or other separators. REQUIRED\n* **CVV (Card Verification Number)**: Three or four digit security code. REQUIRED'\n", - "example": "LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tCgp3Y0JNQTBYV1NGbEZScFZoQVFmL2J2bVVkNG5LZ3dkbExKVTlEdEFEK0p5c0VOTUxuOUlRUWVGWnZJUWEKMGgzQklpRFNRU0RMZmI0NEs2SXZMeTZRbm54bmFLcWx0MjNUSmtPd2hGWFIrdnNSMU5IbnVHN0lUNWJECmZzeVdleXlNK1JLNUVHV0thZ3NmQ2tWamh2NGloY29xUnlTTGtJbWVmRzVaR0tMRkJTTTBsTFNPWFRURQpiMy91eU1zMVJNb3ZiclNvbXkxa3BybzUveWxabWVtV2ZsU1pWQlhNcTc1dGc1YjVSRVIraXM5ckc0cS8KMXl0M0FOYXA3UDhKekFhZVlyTnVNZGhGZFhvK0NFMC9CQnN3L0NIZXdhTDk4SmRVUEV0NjA5WFRHTG9kCjZtamY0YUtMQ01xd0RFMkNVb3dPdE8vMzVIMitnVDZKS3FoMmtjQUQyaXFlb3luNWcralRHaFNyd3NKWgpIdEphQWVZZXpGQUVOaFo3Q01IOGNsdnhZVWNORnJuNXlMRXVGTkwwZkczZy95S3loclhxQ0o3UFo5b3UKMFVxQjkzQURKWDlJZjRBeVQ2bU9MZm9wUytpT2lLall4bG1NLzhlVWc3OGp1OVJ5T1BXelhyTzdLWTNHClFSWm8KPXc1dEYKLS0tLS1FTkQgUEdQIE1FU1NBR0UtLS0tLQo" - }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" - }, - "expMonth": { - "$ref": "#/components/schemas/CardExpMonth" - }, - "expYear": { - "$ref": "#/components/schemas/CardExpYear" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataCardAndAch" - } - } - }, - "VerificationErrorCode": { - "type": "string", - "description": "Indicates the failure reason of the card verification. Only present on cards with failed verification. Possible values are [verification_failed, verification_fraud_detected, verification_denied, verification_not_supported_by_issuer, verification_stopped_by_issuer, card_failed, card_invalid, card_address_mismatch, card_zip_mismatch, card_cvv_invalid, card_expired, card_limit_violated, card_not_honored, card_cvv_required, credit_card_not_allowed, card_account_ineligible, card_network_unsupported]'", - "nullable": true, - "enum": [ - "verification_failed", - "verification_fraud_detected", - "verification_denied", - "verification_not_supported_by_issuer", - "verification_stopped_by_issuer", - "card_failed", - "card_invalid", - "card_address_mismatch", - "card_zip_mismatch", - "card_cvv_invalid", - "card_expired", - "card_limit_violated", - "card_not_honored", - "card_cvv_required", - "credit_card_not_allowed", - "card_account_ineligible", - "card_network_unsupported" - ] - }, - "Card": { - "type": "object", - "required": [ - "id", - "status", - "billingDetails", - "expMonth", - "expYear", - "network", - "last4", - "fingerprint", - "verification", - "metadata", - "createDate", - "updateDate" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "status": { - "$ref": "#/components/schemas/ExternalFiatAccountStatus" - }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" - }, - "expMonth": { - "$ref": "#/components/schemas/CardExpMonth" - }, - "expYear": { - "$ref": "#/components/schemas/CardExpYear" - }, - "network": { - "type": "string", - "description": "The network of the card.", - "enum": [ - "VISA", - "MASTERCARD", - "AMEX", - "UNKNOWN" - ] - }, - "last4": { - "type": "string", - "description": "The last 4 digits of the card.", - "example": "0123" - }, - "bin": { - "type": "string", - "description": "The bank identification number (BIN), the first 6 digits of the card.", - "example": "401230" - }, - "issuerCountry": { - "type": "string", - "description": "The country code of the issuer bank. Follows the ISO 3166-1 alpha-2 standard.", - "example": "US" - }, - "fundingType": { - "description": "The funding type of the card. Possible values are `credit`, `debit`, `prepaid`, and `unknown`.", - "type": "string", - "enum": [ - "credit", - "debit", - "prepaid", - "unknown" - ] - }, - "fingerprint": { - "$ref": "#/components/schemas/Fingerprint" - }, - "errorCode": { - "$ref": "#/components/schemas/VerificationErrorCode" - }, - "verification": { - "$ref": "#/components/schemas/CardVerificationResponse" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataPhoneEmail" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "CardUpdate": { - "type": "object", - "required": [ - "keyId", - "encryptedData", - "expMonth", - "expYear" - ], - "properties": { - "keyId": { - "$ref": "#/components/schemas/IdKey" - }, - "encryptedData": { - "type": "string", - "format": "byte", - "description": "PGP encrypted base64 encoded string. Contains CVV.\n* **CVV (Card Verification Number)**: Three or four digit security code. REQUIRED'\n", - "example": "UHVibGljS2V5QmFzZTY0RW5jb2RlZA==" - }, - "expMonth": { - "$ref": "#/components/schemas/CardExpMonth" - }, - "expYear": { - "$ref": "#/components/schemas/CardExpYear" - } - } - }, - "ACHBillingDetails": { - "type": "object", - "description": "Billing details of the account holder.", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "description": "Full name of the card or bank account holder.", - "maxLength": 1024, - "example": "Satoshi Nakamoto" - }, - "city": { - "type": "string", - "description": "City portion of the address.", - "maxLength": 1024, - "example": "Boston" - }, - "country": { - "type": "string", - "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "maxLength": 2, - "example": "US" - }, - "line1": { - "type": "string", - "description": "Line one of the street address.", - "maxLength": 1024, - "example": "100 Money Street" - }, - "line2": { - "type": "string", - "description": "Line two of the street address.", - "maxLength": 1024, - "example": "Suite 1" - }, - "district": { - "type": "string", - "description": "State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision.", - "maxLength": 16, - "example": "MA" - }, - "postalCode": { - "type": "string", - "description": "Postal / ZIP code of the address.", - "maxLength": 16, - "example": "01234" - } - } - }, - "ACHCreationRequest": { - "type": "object", - "required": [ - "idempotencyKey", - "plaidProcessorToken", - "billingDetails", - "metadata" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "plaidProcessorToken": { - "type": "string", - "description": "The token for the ACH account provided by the processor (Plaid).", - "example": "processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621" - }, - "billingDetails": { - "$ref": "#/components/schemas/ACHBillingDetails" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataCardAndAch" - } - } - }, - "AccountNumberMasked": { - "type": "string", - "description": "The redacted account number of the ACH account.", - "example": "****6789" - }, - "RoutingNumber": { - "type": "string", - "description": "The routing number of the ACH account.", - "example": "613334455" - }, - "AchVerificationErrorCodes": { - "type": "string", - "description": "Indicates the failure reason of the ACH account. Only present on failed accounts. Possible values are [bank_account_authorization_expired, bank_account_error, bank_account_ineligible, bank_account_not_found, bank_account_unauthorized, unsupported_routing_number, verification_failed].", - "nullable": true, - "enum": [ - "bank_account_authorization_expired", - "bank_account_error", - "bank_account_ineligible", - "bank_account_not_found", - "bank_account_unauthorized", - "unsupported_routing_number", - "verification_failed" - ] - }, - "ACH": { - "type": "object", - "required": [ - "id", - "accountNumber", - "routingNumber", - "description", - "billingDetails", - "bankAddress", - "fingerprint", - "metadata", - "createDate", - "updateDate" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "status": { - "$ref": "#/components/schemas/ExternalFiatAccountStatus" - }, - "accountNumber": { - "$ref": "#/components/schemas/AccountNumberMasked" - }, - "routingNumber": { - "$ref": "#/components/schemas/RoutingNumber" - }, - "billingDetails": { - "$ref": "#/components/schemas/ACHBillingDetails" - }, - "bankAddress": { - "$ref": "#/components/schemas/BankAddress" - }, - "fingerprint": { - "$ref": "#/components/schemas/Fingerprint" - }, - "errorCode": { - "$ref": "#/components/schemas/AchVerificationErrorCodes" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataPhoneEmail" - } - } - }, - "MockAchAccount": { - "type": "object", - "required": [ - "accountNumber", - "routingNumber", - "description" - ], - "properties": { - "accountNumber": { - "type": "string", - "description": "The account number of the ACH account.", - "example": "123456789" - }, - "routingNumber": { - "type": "string", - "description": "The routing number of the ACH account.\n\nFor sandbox testing, valid routing numbers include `011000028`, `011201762`, `011500120`, `021214862`, `121000248`, `121140399`, `211073473`, `221172610`, and `011000138`.\n", - "example": "011000028" - }, - "description": { - "type": "string", - "description": "A description for the ACH account.", - "example": "My ACH account" - } - } - }, - "MockAchAccountCreationRequest": { - "type": "object", - "required": [ - "account", - "balance" - ], - "properties": { - "account": { - "$ref": "#/components/schemas/MockAchAccount" - }, - "balance": { - "$ref": "#/components/schemas/FiatMoneyUsd" - } - } - }, - "MockAchAccountResponse": { - "type": "object", - "properties": { - "processorToken": { - "type": "string", - "description": "The processor token needs to be provided when linking an ACH account against this mock.", - "example": "processor-sandbox-circle-82cf95bb-43f8-4191-8d30-2c9f42853621" - }, - "balance": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "account": { - "$ref": "#/components/schemas/MockAchAccount" - } - } - }, - "SEPACreationRequest": { - "type": "object", - "required": [ - "idempotencyKey", - "accountName", - "iban", - "billingDetails" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "iban": { - "type": "string", - "description": "International Bank Account Number (IBAN) for the bank account.", - "example": "DE31100400480532013000" - }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" - } - } - }, - "SEPA": { - "type": "object", - "required": [ - "id", - "status", - "description", - "trackingRef", - "fingerprint", - "billingDetails", - "createDate", - "updateDate" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "status": { - "$ref": "#/components/schemas/ExternalFiatAccountStatus" - }, - "description": { - "type": "string", - "description": "Bank name plus last four digits of the IBAN.", - "example": "Bank of Ireland ****0010" - }, - "trackingRef": { - "type": "string", - "description": "Tracking reference that needs to be set in the payment details or description.", - "example": "CIR13FB13A" - }, - "fingerprint": { - "$ref": "#/components/schemas/Fingerprint" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, - "billingDetails": { - "$ref": "#/components/schemas/BillingDetails" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "SEPAInstructionBeneficiary": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the beneficiary.", - "example": "CIRCLE INTERNET FINANCIAL INC" - }, - "address1": { - "type": "string", - "description": "Address line 1 of the beneficiary's address.", - "example": "99 HIGH STREET" - }, - "address2": { - "type": "string", - "description": "Address line 2 of the beneficiary's address.", - "example": "BOSTON MA 02110" - } - } - }, - "SEPAInstructionBeneficiaryBank": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the beneficiary's bank.", - "example": "LHV Bank" - }, - "bic": { - "type": "string", - "description": "BIC code of the beneficiary's bank account.", - "example": "LHVBEE22XXX" - }, - "iban": { - "description": "IBAN of the beneficiary's bank account.", - "type": "string", - "example": "****6789" - }, - "address": { - "description": "Address of the beneficiary's bank.", - "type": "string", - "example": "Tartu mnt 2, 10145 Tallinn" - }, - "city": { - "description": "City of the beneficiary's bank.", - "type": "string", - "example": "Tallinn" - }, - "postalCode": { - "description": "Postal code of the beneficiary's bank.", - "type": "string", - "example": "10017" - }, - "country": { - "description": "Country code of the beneficiary's bank. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.", - "type": "string", - "example": "EE" - } - } - }, - "SEPAInstruction": { - "type": "object", - "properties": { - "trackingRef": { - "type": "string", - "description": "Circle tracking reference that needs to be set in the SEPA transfer reference field.", - "example": "CIR13FB13A" - }, - "beneficiary": { - "$ref": "#/components/schemas/SEPAInstructionBeneficiary" - }, - "beneficiaryBank": { - "$ref": "#/components/schemas/SEPAInstructionBeneficiaryBank" - } - } - }, - "Settlement": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "merchantWalletId": { - "$ref": "#/components/schemas/MerchantWalletId" - }, - "walletId": { - "description": "If this settlement was used for a marketplace payment, the wallet involved in the settlement. Not included for standard merchant settlements.", - "type": "string", - "example": "12345" - }, - "totalDebits": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "totalCredits": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "paymentFees": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "chargebackFees": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "IdPayment": { - "type": "string", - "description": "Unique system generated identifier for the payment that is associated to the chargeback item.", - "format": "uuid", - "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" - }, - "ChargebackCategories": { - "type": "string", - "description": "Enumerated category of the chargeback status codes based on the chargeback status code.", - "enum": [ - "Canceled Recurring Payment", - "Customer Dispute", - "Fraudulent", - "General", - "Processing Error", - "Not Defined" - ] - }, - "IdSettlement": { - "type": "string", - "description": "Unique system generated identifier for the settlement related to the chargeback history.", - "format": "uuid", - "nullable": true, - "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" - }, - "BasicChargebackHistory": { - "type": "object", - "required": [ - "type", - "chargebackAmount", - "description" - ], - "properties": { - "type": { - "type": "string", - "description": "Enumerated type of the chargeback history event. `1st Chargeback` represents the first stage of the dispute procedure initiated by the cardholder’s issuing bank.\n `2nd Chargeback` represents the second stage of the dispute procedure initiated by the cardholder’s issuing bank (This stage is MasterCard only).\n `Chargeback Reversal` represents when 1st Chargeback or 2nd Chargeback is withdrawn by the issuer.\n `Representment` represents the stage when merchants decided to dispute 1st Chargeback or 2nd Chargeback.\n `Chargeback Settlement` can imply one of the two: 1) If merchant or marketplace is taking the lost of the chargeback, money will be debit from the wallet during this stage.\n 2) If merchant of marketplace successfully dispute the chargeback, money will be credit back to the wallet during this stage.\n", - "enum": [ - "1st Chargeback", - "2nd Chargeback", - "Chargeback Reversal", - "Representment", - "Chargeback Settlement" - ] - }, - "chargebackAmount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "fee": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "description": { - "type": "string", - "description": "The reason the chargeback was created.", - "example": "The cardholder claims an unauthorized transaction occurred." - }, - "settlementId": { - "$ref": "#/components/schemas/IdSettlement" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "BasicChargeback": { - "type": "object", - "required": [ - "id", - "paymentId", - "merchantId", - "history", - "reasonCode" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "paymentId": { - "$ref": "#/components/schemas/IdPayment" - }, - "merchantId": { - "$ref": "#/components/schemas/IdMerchant" - }, - "reasonCode": { - "description": "Reason code given by the card network for the chargeback item.", - "type": "string", - "example": "10.4" - }, - "category": { - "$ref": "#/components/schemas/ChargebackCategories" - }, - "history": { - "type": "array", - "description": "The chargeback item's history list will be sorted by create date descending: more recent chargeback statuses will be at the beginning of the list.\n", - "minItems": 1, - "items": { - "$ref": "#/components/schemas/BasicChargebackHistory" - } - } - } - }, - "MockChargebackCreationRequest": { - "type": "object", - "required": [ - "paymentId" - ], - "properties": { - "paymentId": { - "type": "string", - "format": "uuid", - "description": "The id of the payment to be charged back. Each payment can only be charged back once.", - "example": "fc988ed5-c129-4f70-a064-e5beb7eb8e32" - } - } - }, - "MockChargeback": { - "type": "object", - "properties": {} - }, - "Reversal": { - "type": "object", - "required": [ - "id", - "paymentId", - "amount", - "description", - "status", - "reason", - "fees", - "createDate", - "updateDate" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/IdKey" - }, - "paymentId": { - "$ref": "#/components/schemas/IdPayment" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "description": { - "type": "string", - "description": "Enumerated description of the payment.", - "example": "Merchant Payment Reversal" - }, - "status": { - "$ref": "#/components/schemas/CancelRefundReversalStatus" - }, - "reason": { - "$ref": "#/components/schemas/ReversalReason" - }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "Payout": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "sourceWalletId": { - "type": "string", - "description": "The identifier of the source wallet used to fund a payout.", - "example": "53535335" - }, - "destination": { - "$ref": "#/components/schemas/BankDestination" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "status": { - "$ref": "#/components/schemas/PayoutStatus" - }, - "trackingRef": { - "description": "A payout tracking reference. Will be present once known.", - "nullable": true, - "example": "CIR-6ESOQANEP3NAO" - }, - "errorCode": { - "$ref": "#/components/schemas/PayoutErrorCode" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, - "adjustments": { - "description": "Final adjustment which increases (credits) or decreases (debits) the total returned amount to the source wallet.", - "nullable": true, - "type": "object", - "properties": { - "fxCredit": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "fxDebit": { - "$ref": "#/components/schemas/FiatMoneyUsd" - } - } - }, - "return": { - "$ref": "#/components/schemas/UnwithdrawalObject" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - }, - "MetadataPayout": { - "type": "object", - "description": "Additional properties related to the payout beneficiary.", - "required": [ - "beneficiaryEmail" - ], - "properties": { - "beneficiaryEmail": { - "$ref": "#/components/schemas/Email" - } - } - }, - "PayoutCreationRequest": { - "type": "object", - "required": [ - "idempotencyKey", - "destination", - "amount", - "metadata" - ], - "properties": { - "idempotencyKey": { - "$ref": "#/components/schemas/IdempotencyKey" - }, - "source": { - "$ref": "#/components/schemas/WalletLocation" - }, - "destination": { - "$ref": "#/components/schemas/BankDestination" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "metadata": { - "$ref": "#/components/schemas/MetadataPayout" - } - } - }, - "DetailedPayout": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/Id" - }, - "sourceWalletId": { - "description": "The identifier of the source wallet used to fund a payout.", - "type": "string", - "example": "53535335" - }, - "destination": { - "$ref": "#/components/schemas/BankDestination" - }, - "amount": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "fees": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "status": { - "description": "Status of the payout. Status `pending` indicates that the payout is in process; `complete` indicates it finished successfully; `failed` indicates it failed.", - "type": "string", - "enum": [ - "pending", - "complete", - "failed" - ] - }, - "trackingRef": { - "description": "A payout tracking reference. Will be present once known.", - "nullable": true, - "example": "CIR-6ESOQANEP3NAO" - }, - "externalRef": { - "$ref": "#/components/schemas/ExternalRef" - }, - "errorCode": { - "$ref": "#/components/schemas/PayoutErrorCode" - }, - "riskEvaluation": { - "$ref": "#/components/schemas/RiskEvaluation" - }, - "adjustments": { - "description": "Final adjustment which increases (credits) or decreases (debits) the total returned amount to the source wallet.", - "nullable": true, - "type": "object", - "properties": { - "fxCredit": { - "$ref": "#/components/schemas/FiatMoneyUsd" - }, - "fxDebit": { - "$ref": "#/components/schemas/FiatMoneyUsd" - } - } - }, - "return": { - "$ref": "#/components/schemas/UnwithdrawalObject" - }, - "createDate": { - "$ref": "#/components/schemas/UTCTimestamp" - }, - "updateDate": { - "$ref": "#/components/schemas/UTCTimestamp" - } - } - } - }, - "responses": { - "NotAuthorized": { - "description": "The request has not been applied because it lacks valid authentication credentials.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "NotAuthorized", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "type": "integer", - "example": 400 - }, - "message": { - "type": "string", - "example": "Something went wrong." - } - }, - "example": { - "code": 401, - "message": "Malformed authorization." - } - }, - "examples": { - "response": { - "value": { - "code": 401, - "message": "Malformed authorization." - } - } - } - } - } - }, - "BadRequest": { - "description": "The request cannot be processed due to a client error.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "BadRequest", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "type": "integer", - "example": 400 - }, - "message": { - "type": "string", - "example": "Something went wrong." - } - }, - "example": { - "code": 400, - "message": "Bad request." - } - }, - "examples": { - "response": { - "value": { - "code": 400, - "message": "Bad request." - } - } - } - } - } - }, - "NotFound": { - "description": "The specified resource was not found.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "NotFound", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "type": "integer", - "example": 400 - }, - "message": { - "type": "string", - "example": "Something went wrong." - } - }, - "example": { - "code": 404, - "message": "Not found." - } - }, - "examples": { - "response": { - "value": { - "code": 404, - "message": "Not found." - } - } - } - } - } - }, - "Conflict": { - "description": "The request has not been applied because it comes in conflict with another request (such as re-using an idempotencyKey for a different request).", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Conflict", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "type": "integer", - "example": 400 - }, - "message": { - "type": "string", - "example": "Something went wrong." - } - }, - "example": { - "code": 409, - "message": "Conflicts with another request." - } - }, - "examples": { - "response": { - "value": { - "code": 409, - "message": "Conflicts with another request." - } - } - } - } - } - }, - "LimitExceeded": { - "description": "Limit exceeded. See error message for more details.", - "headers": { - "X-Request-Id": { - "$ref": "#/components/headers/XRequestId" - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "LimitExceeded", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "type": "integer", - "example": 400 - }, - "message": { - "type": "string", - "example": "Something went wrong." - } - }, - "example": { - "code": 429, - "message": "Too many requests." - } - }, - "examples": { - "response": { - "value": { - "code": 429, - "message": "Too many requests." - } - } - } - } - } - } - }, - "parameters": { - "destination": { - "name": "destination", - "description": "Universally unique identifier (UUID v4) for the destination bank account. Filters the results to fetch all payouts made to a destination bank account.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "example": "e3d0a838-d732-49d0-bf44-73a668e38973" - } - }, - "From": { - "name": "from", - "description": "Queries items created since the specified date-time (inclusive).", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "date-time", - "example": "2020-04-10T02:13:30.000Z" - } - }, - "To": { - "name": "to", - "description": "Queries items created before the specified date-time (inclusive).", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "date-time", - "example": "2020-04-10T02:13:30.000Z" - } - }, - "PageBefore": { - "name": "pageBefore", - "description": "A collection ID value used for pagination.\n\nIt marks the exclusive end of a page. When provided, the collection resource will return the next `n` items before\nthe id, with `n` being specified by `pageSize`.\n\nThe items will be returned in the natural order of the collection.\n\nThe resource will return the first page if neither `pageAfter` nor `pageBefore` are specified.\n\nSHOULD NOT be used in conjuction with pageAfter.\n", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - "PageAfter": { - "name": "pageAfter", - "description": "A collection ID value used for pagination.\n\nIt marks the exclusive begin of a page. When provided, the collection resource will return the next `n` items after\nthe id, with `n` being specified by `pageSize`.\n\nThe items will be returned in the natural order of the collection.\n\nThe resource will return the first page if neither `pageAfter` nor `pageBefore` are specified.\n\nSHOULD NOT be used in conjuction with pageBefore.\n", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - "PageSize": { - "name": "pageSize", - "description": "Limits the number of items to be returned.\n\nSome collections have a strict upper bound that will disregard this value. In case the specified value is higher\nthan the allowed limit, the collection limit will be used.\n\nIf avoided, the collection will determine the page size itself.\n", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "example": 5 - } - }, - "IdPath": { - "name": "id", - "description": "Universally unique identifier (UUID v4) of a resource.", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "example": "b3d9d2d5-4c12-4946-a09d-953e82fae2b0" - } - }, - "WalletId": { - "name": "walletId", - "description": "Identifier for the wallet.", - "in": "path", - "required": true, - "schema": { - "type": "string", - "example": "0123456789" - } - }, - "ReturnIdentities": { - "name": "returnIdentities", - "description": "Specify if you would like to see identities in the response. Restricts maximum returned items to 5. By default returnIdentities is false, resulting in the response not returning `data.source.identities`.", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "example": "true", - "default": false - } - }, - "Source": { - "name": "source", - "description": "Universally unique identifier (UUID v4) for the source. Filters results to fetch only payments made from the provdided source.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "example": "b3d9d2d5-4c12-4946-a09d-953e82fae2b0" - } - }, - "SettlementId": { - "name": "settlementId", - "description": "Queries items with the specified settlement id. Matches any settlement id if unspecified.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "example": "b48c8962-8e9f-40c3-9f1d-d9adde2ffe61" - } - }, - "PaymentSourceType": { - "name": "type", - "description": "Source account type. Filters the results to fetch all payments made from a specified account type. Matches any source type if unspecified.", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "card", - "wire", - "ach", - "sepa" - ] - } - } - }, - "PaymentStatus": { - "name": "status", - "description": "Queries items with the specified status. Matches any status if unspecified.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "pending", - "confirmed", - "paid", - "failed", - "action_required" - ] - } - }, - "PaymentId": { - "name": "paymentId", - "description": "The payment ID associated with the chargeback.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uuid", - "example": "202ad9ce-974c-49ca-8d34-3afb7d7247ae" - } - } - } - } -} \ No newline at end of file From 817f9d0a788cf7873c47f0a34e11a5dcebe6a5db Mon Sep 17 00:00:00 2001 From: deepakgummi Date: Tue, 9 Aug 2022 14:32:12 -0500 Subject: [PATCH 7/7] Renamed codegen folder to generated --- src/{codegen => generated}/.openapi-generator-ignore | 0 src/{codegen => generated}/.openapi-generator/FILES | 0 src/{codegen => generated}/.openapi-generator/VERSION | 0 src/{codegen => generated}/api.ts | 0 src/{codegen => generated}/base.ts | 0 src/{codegen => generated}/common.ts | 0 src/{codegen => generated}/configuration.ts | 0 src/{codegen => generated}/index.ts | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename src/{codegen => generated}/.openapi-generator-ignore (100%) rename src/{codegen => generated}/.openapi-generator/FILES (100%) rename src/{codegen => generated}/.openapi-generator/VERSION (100%) rename src/{codegen => generated}/api.ts (100%) rename src/{codegen => generated}/base.ts (100%) rename src/{codegen => generated}/common.ts (100%) rename src/{codegen => generated}/configuration.ts (100%) rename src/{codegen => generated}/index.ts (100%) diff --git a/src/codegen/.openapi-generator-ignore b/src/generated/.openapi-generator-ignore similarity index 100% rename from src/codegen/.openapi-generator-ignore rename to src/generated/.openapi-generator-ignore diff --git a/src/codegen/.openapi-generator/FILES b/src/generated/.openapi-generator/FILES similarity index 100% rename from src/codegen/.openapi-generator/FILES rename to src/generated/.openapi-generator/FILES diff --git a/src/codegen/.openapi-generator/VERSION b/src/generated/.openapi-generator/VERSION similarity index 100% rename from src/codegen/.openapi-generator/VERSION rename to src/generated/.openapi-generator/VERSION diff --git a/src/codegen/api.ts b/src/generated/api.ts similarity index 100% rename from src/codegen/api.ts rename to src/generated/api.ts diff --git a/src/codegen/base.ts b/src/generated/base.ts similarity index 100% rename from src/codegen/base.ts rename to src/generated/base.ts diff --git a/src/codegen/common.ts b/src/generated/common.ts similarity index 100% rename from src/codegen/common.ts rename to src/generated/common.ts diff --git a/src/codegen/configuration.ts b/src/generated/configuration.ts similarity index 100% rename from src/codegen/configuration.ts rename to src/generated/configuration.ts diff --git a/src/codegen/index.ts b/src/generated/index.ts similarity index 100% rename from src/codegen/index.ts rename to src/generated/index.ts