diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 524cb55..dc1e644 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -1.1.1 +1.6.0 diff --git a/sdk.json b/sdk.json index 4cd01fe..a9a44f0 100644 --- a/sdk.json +++ b/sdk.json @@ -6,7 +6,7 @@ } ], "info": { - "version": "1.5.0", + "version": "1.6.0", "title": "All Circle APIs", "description": "Circle's General, Core Functionality, Payments, Payouts, Accounts, and Crypto Payments APIs bundled into one OpenAPI Specification." }, @@ -3373,6 +3373,12 @@ "amount": "1.00", "currency": "ETH" }, + "fromAddresses": { + "chain": "ETH", + "addresses": [ + "0x0d4344cFF68F72A5B9Abded37CA5862941a62050" + ] + }, "depositAddress": { "chain": "ETH", "address": "0x97de855690955e0da79ce5c1b6804847e7070c7f" @@ -4123,6 +4129,11 @@ "amount": "0.01", "currency": "USD" }, + "networkFees": { + "amount": "0.01", + "currency": "USD", + "feePayer": "endUser" + }, "merchantId": "f1397191-56e6-42fd-be86-0a7b9bd91522", "merchantWalletId": "1000999922", "paymentIntentId": "6e4d4047-db14-4c09-b238-1215aee50d03", @@ -4130,6 +4141,12 @@ "amount": "1.00", "currency": "USD" }, + "fromAddresses": { + "chain": "ETH", + "addresses": [ + "0x0d4344cFF68F72A5B9Abded37CA5862941a62050" + ] + }, "depositAddress": { "chain": "ETH", "address": "0x97de855690955e0da79ce5c1b6804847e7070c7f" @@ -4489,6 +4506,11 @@ "amount": "0.01", "currency": "USD" }, + "networkFees": { + "amount": "0.01", + "currency": "USD", + "feePayer": "endUser" + }, "merchantId": "f1397191-56e6-42fd-be86-0a7b9bd91522", "merchantWalletId": "1000999922", "paymentIntentId": "6e4d4047-db14-4c09-b238-1215aee50d03", @@ -4496,6 +4518,12 @@ "amount": "1.00", "currency": "USD" }, + "fromAddresses": { + "chain": "ETH", + "addresses": [ + "0x0d4344cFF68F72A5B9Abded37CA5862941a62050" + ] + }, "depositAddress": { "chain": "ETH", "address": "0x97de855690955e0da79ce5c1b6804847e7070c7f" @@ -5411,6 +5439,10 @@ "amount": "3.14", "currency": "USD" }, + "networkFees": { + "amount": "0.14", + "currency": "USD" + }, "status": "pending", "errorCode": "transaction_denied", "riskEvaluation": { @@ -5641,6 +5673,10 @@ "amount": "3.14", "currency": "USD" }, + "networkFees": { + "amount": "0.14", + "currency": "USD" + }, "status": "pending", "errorCode": "transaction_denied", "riskEvaluation": { @@ -5786,6 +5822,10 @@ "amount": "3.14", "currency": "USD" }, + "networkFees": { + "amount": "0.14", + "currency": "USD" + }, "status": "pending", "errorCode": "transaction_denied", "riskEvaluation": { @@ -10130,6 +10170,9 @@ }, "createDate": { "$ref": "#/components/schemas/UtcTimestamp" + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" } } }, @@ -10190,6 +10233,9 @@ "type": { "type": "string", "enum": ["continuous"] + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" } } }, @@ -10218,6 +10264,9 @@ "items": { "$ref": "#/components/schemas/PaymentMethodBlockchain" } + }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" } } }, @@ -10249,6 +10298,9 @@ "$ref": "#/components/schemas/PaymentMethodBlockchain" } }, + "merchantWalletId": { + "$ref": "#/components/schemas/MerchantWalletId" + }, "type": { "type": "string", "enum": ["continuous"] @@ -10336,6 +10388,27 @@ "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"] }, + "CryptoPaymentNetworkFee": { + "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"] + }, + "feePayer": { + "type": "string", + "description": "The party that pays the network fee based on merchant configuration.", + "enum": ["endUser", "merchant"] + } + } + }, "CryptoPayment": { "type": "object", "description": "Status information of the related payment. This property is only present on refund or cancel items.", @@ -10364,6 +10437,9 @@ "fees": { "$ref": "#/components/schemas/FiatMoneyUsd" }, + "networkFees": { + "$ref": "#/components/schemas/CryptoPaymentNetworkFee" + }, "paymentIntentId": { "type": "string", "format": "uuid", @@ -10372,6 +10448,20 @@ "settlementAmount": { "$ref": "#/components/schemas/FiatMoneyUsd" }, + "fromAddresses": { + "type": "object", + "properties": { + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "addresses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Address" + } + } + } + }, "depositAddress": { "type": "object", "properties": { @@ -10381,6 +10471,9 @@ "address": { "type": "string", "example": "0x97de855690955e0da79ce5c1b6804847e7070c7f" + }, + "addressTag": { + "$ref": "#/components/schemas/AddressTag" } } }, @@ -11599,6 +11692,9 @@ "fees": { "$ref": "#/components/schemas/PayoutMoney" }, + "networkFees": { + "$ref": "#/components/schemas/PayoutMoney" + }, "status": { "$ref": "#/components/schemas/PayoutStatus" }, diff --git a/src/generated/.openapi-generator/FILES b/src/generated/.openapi-generator/FILES index da048f8..ce8a654 100644 --- a/src/generated/.openapi-generator/FILES +++ b/src/generated/.openapi-generator/FILES @@ -114,6 +114,8 @@ models/create-wallet-response.ts models/create-wire-account-response.ts models/create-wire-payment-response.ts models/crypto-payment-deposit-address.ts +models/crypto-payment-from-addresses.ts +models/crypto-payment-network-fee.ts models/crypto-payment.ts models/crypto-payments-money.ts models/crypto-payments-optional-amount-money.ts diff --git a/src/generated/.openapi-generator/VERSION b/src/generated/.openapi-generator/VERSION index 0df17dd..e7e42a4 100644 --- a/src/generated/.openapi-generator/VERSION +++ b/src/generated/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1 \ No newline at end of file +6.3.0 \ No newline at end of file diff --git a/src/generated/base.ts b/src/generated/base.ts index 9a48349..1348624 100644 --- a/src/generated/base.ts +++ b/src/generated/base.ts @@ -6,14 +6,11 @@ * Do not edit the class manually. */ -import { Configuration } from "./configuration"; +import type { Configuration } from "./configuration"; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { - AxiosPromise, - AxiosInstance, - AxiosRequestConfig -} from "axios"; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from "axios"; +import globalAxios from "axios"; export const BASE_PATH = "https://api-sandbox.circle.com".replace(/\/+$/, ""); @@ -65,8 +62,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + this.name = "RequiredError"; } } diff --git a/src/generated/models/continuous-payment-intent-creation-request.ts b/src/generated/models/continuous-payment-intent-creation-request.ts index 42d8e0c..7fb0cb7 100644 --- a/src/generated/models/continuous-payment-intent-creation-request.ts +++ b/src/generated/models/continuous-payment-intent-creation-request.ts @@ -40,6 +40,12 @@ export interface ContinuousPaymentIntentCreationRequest { * @memberof ContinuousPaymentIntentCreationRequest */ paymentMethods: Array; + /** + * Unique system generated identifier for the wallet of the merchant. + * @type {string} + * @memberof ContinuousPaymentIntentCreationRequest + */ + merchantWalletId?: string; /** * * @type {string} diff --git a/src/generated/models/continuous-payment-intent.ts b/src/generated/models/continuous-payment-intent.ts index db9c3e4..4dabaf8 100644 --- a/src/generated/models/continuous-payment-intent.ts +++ b/src/generated/models/continuous-payment-intent.ts @@ -91,6 +91,12 @@ export interface ContinuousPaymentIntent { * @memberof ContinuousPaymentIntent */ type: ContinuousPaymentIntentTypeEnum; + /** + * Unique system generated identifier for the wallet of the merchant. + * @type {string} + * @memberof ContinuousPaymentIntent + */ + merchantWalletId?: string; } export const ContinuousPaymentIntentCurrencyEnum = { diff --git a/src/generated/models/crypto-payment-deposit-address.ts b/src/generated/models/crypto-payment-deposit-address.ts index 66039d7..ec5d2df 100644 --- a/src/generated/models/crypto-payment-deposit-address.ts +++ b/src/generated/models/crypto-payment-deposit-address.ts @@ -28,4 +28,10 @@ export interface CryptoPaymentDepositAddress { * @memberof CryptoPaymentDepositAddress */ 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 CryptoPaymentDepositAddress + */ + addressTag?: string | null; } diff --git a/src/generated/models/crypto-payment-from-addresses.ts b/src/generated/models/crypto-payment-from-addresses.ts new file mode 100644 index 0000000..96f01f8 --- /dev/null +++ b/src/generated/models/crypto-payment-from-addresses.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Chain } from "./chain"; + +/** + * + * @export + * @interface CryptoPaymentFromAddresses + */ +export interface CryptoPaymentFromAddresses { + /** + * + * @type {Chain} + * @memberof CryptoPaymentFromAddresses + */ + chain?: Chain; + /** + * + * @type {Array} + * @memberof CryptoPaymentFromAddresses + */ + addresses?: Array; +} diff --git a/src/generated/models/crypto-payment-network-fee.ts b/src/generated/models/crypto-payment-network-fee.ts new file mode 100644 index 0000000..6218b96 --- /dev/null +++ b/src/generated/models/crypto-payment-network-fee.ts @@ -0,0 +1,50 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * 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 CryptoPaymentNetworkFee + */ +export interface CryptoPaymentNetworkFee { + /** + * Magnitude of the amount, in units of the currency, with a `.`. + * @type {string} + * @memberof CryptoPaymentNetworkFee + */ + amount: string; + /** + * Currency code for the amount. + * @type {string} + * @memberof CryptoPaymentNetworkFee + */ + currency: CryptoPaymentNetworkFeeCurrencyEnum; + /** + * The party that pays the network fee based on merchant configuration. + * @type {string} + * @memberof CryptoPaymentNetworkFee + */ + feePayer?: CryptoPaymentNetworkFeeFeePayerEnum; +} + +export const CryptoPaymentNetworkFeeCurrencyEnum = { + Usd: "USD", + Eur: "EUR", + Btc: "BTC", + Eth: "ETH" +} as const; + +export type CryptoPaymentNetworkFeeCurrencyEnum = + typeof CryptoPaymentNetworkFeeCurrencyEnum[keyof typeof CryptoPaymentNetworkFeeCurrencyEnum]; +export const CryptoPaymentNetworkFeeFeePayerEnum = { + EndUser: "endUser", + Merchant: "merchant" +} as const; + +export type CryptoPaymentNetworkFeeFeePayerEnum = + typeof CryptoPaymentNetworkFeeFeePayerEnum[keyof typeof CryptoPaymentNetworkFeeFeePayerEnum]; diff --git a/src/generated/models/crypto-payment.ts b/src/generated/models/crypto-payment.ts index 552eacd..bb93c55 100644 --- a/src/generated/models/crypto-payment.ts +++ b/src/generated/models/crypto-payment.ts @@ -11,6 +11,12 @@ import { CryptoPaymentDepositAddress } from "./crypto-payment-deposit-address"; // May contain unused imports in some cases // @ts-ignore +import { CryptoPaymentFromAddresses } from "./crypto-payment-from-addresses"; +// May contain unused imports in some cases +// @ts-ignore +import { CryptoPaymentNetworkFee } from "./crypto-payment-network-fee"; +// May contain unused imports in some cases +// @ts-ignore import { CryptoPaymentsOptionalAmountMoney } from "./crypto-payments-optional-amount-money"; // May contain unused imports in some cases // @ts-ignore @@ -67,6 +73,12 @@ export interface CryptoPayment { * @memberof CryptoPayment */ fees?: FiatMoneyUsd; + /** + * + * @type {CryptoPaymentNetworkFee} + * @memberof CryptoPayment + */ + networkFees?: CryptoPaymentNetworkFee; /** * * @type {string} @@ -79,6 +91,12 @@ export interface CryptoPayment { * @memberof CryptoPayment */ settlementAmount?: FiatMoneyUsd; + /** + * + * @type {CryptoPaymentFromAddresses} + * @memberof CryptoPayment + */ + fromAddresses?: CryptoPaymentFromAddresses; /** * * @type {CryptoPaymentDepositAddress} diff --git a/src/generated/models/crypto-payout.ts b/src/generated/models/crypto-payout.ts index 90a0b64..8ccff02 100644 --- a/src/generated/models/crypto-payout.ts +++ b/src/generated/models/crypto-payout.ts @@ -64,6 +64,12 @@ export interface CryptoPayout { * @memberof CryptoPayout */ fees?: PayoutMoney; + /** + * + * @type {PayoutMoney} + * @memberof CryptoPayout + */ + networkFees?: PayoutMoney; /** * * @type {PayoutStatus} diff --git a/src/generated/models/get-payment-response-data.ts b/src/generated/models/get-payment-response-data.ts index acc10ad..06c7c50 100644 --- a/src/generated/models/get-payment-response-data.ts +++ b/src/generated/models/get-payment-response-data.ts @@ -14,6 +14,12 @@ import { CryptoPayment } from "./crypto-payment"; import { CryptoPaymentDepositAddress } from "./crypto-payment-deposit-address"; // May contain unused imports in some cases // @ts-ignore +import { CryptoPaymentFromAddresses } from "./crypto-payment-from-addresses"; +// May contain unused imports in some cases +// @ts-ignore +import { CryptoPaymentNetworkFee } from "./crypto-payment-network-fee"; +// May contain unused imports in some cases +// @ts-ignore import { CryptoPaymentsOptionalAmountMoney } from "./crypto-payments-optional-amount-money"; // May contain unused imports in some cases // @ts-ignore diff --git a/src/generated/models/index.ts b/src/generated/models/index.ts index 371d2bd..97f3f07 100644 --- a/src/generated/models/index.ts +++ b/src/generated/models/index.ts @@ -82,6 +82,8 @@ export * from "./create-wire-account-response"; export * from "./create-wire-payment-response"; export * from "./crypto-payment"; export * from "./crypto-payment-deposit-address"; +export * from "./crypto-payment-from-addresses"; +export * from "./crypto-payment-network-fee"; export * from "./crypto-payments-money"; export * from "./crypto-payments-optional-amount-money"; export * from "./crypto-payout"; diff --git a/src/generated/models/list-payment-intents-response-data-inner.ts b/src/generated/models/list-payment-intents-response-data-inner.ts index 74f84e1..4fffd8e 100644 --- a/src/generated/models/list-payment-intents-response-data-inner.ts +++ b/src/generated/models/list-payment-intents-response-data-inner.ts @@ -109,6 +109,12 @@ export interface ListPaymentIntentsResponseDataInner { * @memberof ListPaymentIntentsResponseDataInner */ createDate?: string; + /** + * Unique system generated identifier for the wallet of the merchant. + * @type {string} + * @memberof ListPaymentIntentsResponseDataInner + */ + merchantWalletId?: string; /** * Desired currency of the payment. * @type {string} diff --git a/src/generated/models/list-payments-response-data-inner.ts b/src/generated/models/list-payments-response-data-inner.ts index 20310c0..af19f6b 100644 --- a/src/generated/models/list-payments-response-data-inner.ts +++ b/src/generated/models/list-payments-response-data-inner.ts @@ -17,6 +17,12 @@ import { CryptoPayment } from "./crypto-payment"; import { CryptoPaymentDepositAddress } from "./crypto-payment-deposit-address"; // May contain unused imports in some cases // @ts-ignore +import { CryptoPaymentFromAddresses } from "./crypto-payment-from-addresses"; +// May contain unused imports in some cases +// @ts-ignore +import { CryptoPaymentNetworkFee } from "./crypto-payment-network-fee"; +// May contain unused imports in some cases +// @ts-ignore import { FiatCancel } from "./fiat-cancel"; // May contain unused imports in some cases // @ts-ignore diff --git a/src/generated/models/list-payouts-response-data-inner.ts b/src/generated/models/list-payouts-response-data-inner.ts index a3c7ef3..eae0593 100644 --- a/src/generated/models/list-payouts-response-data-inner.ts +++ b/src/generated/models/list-payouts-response-data-inner.ts @@ -124,4 +124,10 @@ export interface ListPayoutsResponseDataInner { * @memberof ListPayoutsResponseDataInner */ updateDate?: string; + /** + * + * @type {PayoutMoney} + * @memberof ListPayoutsResponseDataInner + */ + networkFees?: PayoutMoney; } diff --git a/src/generated/models/payment-intent-creation-request.ts b/src/generated/models/payment-intent-creation-request.ts index d788da6..7dea00c 100644 --- a/src/generated/models/payment-intent-creation-request.ts +++ b/src/generated/models/payment-intent-creation-request.ts @@ -43,6 +43,12 @@ export interface PaymentIntentCreationRequest { * @memberof PaymentIntentCreationRequest */ paymentMethods: Array; + /** + * Unique system generated identifier for the wallet of the merchant. + * @type {string} + * @memberof PaymentIntentCreationRequest + */ + merchantWalletId?: string; } export const PaymentIntentCreationRequestSettlementCurrencyEnum = { diff --git a/src/generated/models/payment-intent.ts b/src/generated/models/payment-intent.ts index c21aab4..f575515 100644 --- a/src/generated/models/payment-intent.ts +++ b/src/generated/models/payment-intent.ts @@ -103,6 +103,12 @@ export interface PaymentIntent { * @memberof PaymentIntent */ createDate?: string; + /** + * Unique system generated identifier for the wallet of the merchant. + * @type {string} + * @memberof PaymentIntent + */ + merchantWalletId?: string; } export const PaymentIntentSettlementCurrencyEnum = {