Skip to content

Commit

Permalink
feat: sync SDK to OpenAPI doc v1.6.0 (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
circle-github-action-bot authored Feb 14, 2023
1 parent 8439551 commit b69592c
Show file tree
Hide file tree
Showing 19 changed files with 266 additions and 10 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.1
1.6.0
98 changes: 97 additions & 1 deletion sdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
},
Expand Down Expand Up @@ -3373,6 +3373,12 @@
"amount": "1.00",
"currency": "ETH"
},
"fromAddresses": {
"chain": "ETH",
"addresses": [
"0x0d4344cFF68F72A5B9Abded37CA5862941a62050"
]
},
"depositAddress": {
"chain": "ETH",
"address": "0x97de855690955e0da79ce5c1b6804847e7070c7f"
Expand Down Expand Up @@ -4123,13 +4129,24 @@
"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",
"settlementAmount": {
"amount": "1.00",
"currency": "USD"
},
"fromAddresses": {
"chain": "ETH",
"addresses": [
"0x0d4344cFF68F72A5B9Abded37CA5862941a62050"
]
},
"depositAddress": {
"chain": "ETH",
"address": "0x97de855690955e0da79ce5c1b6804847e7070c7f"
Expand Down Expand Up @@ -4489,13 +4506,24 @@
"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",
"settlementAmount": {
"amount": "1.00",
"currency": "USD"
},
"fromAddresses": {
"chain": "ETH",
"addresses": [
"0x0d4344cFF68F72A5B9Abded37CA5862941a62050"
]
},
"depositAddress": {
"chain": "ETH",
"address": "0x97de855690955e0da79ce5c1b6804847e7070c7f"
Expand Down Expand Up @@ -5411,6 +5439,10 @@
"amount": "3.14",
"currency": "USD"
},
"networkFees": {
"amount": "0.14",
"currency": "USD"
},
"status": "pending",
"errorCode": "transaction_denied",
"riskEvaluation": {
Expand Down Expand Up @@ -5641,6 +5673,10 @@
"amount": "3.14",
"currency": "USD"
},
"networkFees": {
"amount": "0.14",
"currency": "USD"
},
"status": "pending",
"errorCode": "transaction_denied",
"riskEvaluation": {
Expand Down Expand Up @@ -5786,6 +5822,10 @@
"amount": "3.14",
"currency": "USD"
},
"networkFees": {
"amount": "0.14",
"currency": "USD"
},
"status": "pending",
"errorCode": "transaction_denied",
"riskEvaluation": {
Expand Down Expand Up @@ -10130,6 +10170,9 @@
},
"createDate": {
"$ref": "#/components/schemas/UtcTimestamp"
},
"merchantWalletId": {
"$ref": "#/components/schemas/MerchantWalletId"
}
}
},
Expand Down Expand Up @@ -10190,6 +10233,9 @@
"type": {
"type": "string",
"enum": ["continuous"]
},
"merchantWalletId": {
"$ref": "#/components/schemas/MerchantWalletId"
}
}
},
Expand Down Expand Up @@ -10218,6 +10264,9 @@
"items": {
"$ref": "#/components/schemas/PaymentMethodBlockchain"
}
},
"merchantWalletId": {
"$ref": "#/components/schemas/MerchantWalletId"
}
}
},
Expand Down Expand Up @@ -10249,6 +10298,9 @@
"$ref": "#/components/schemas/PaymentMethodBlockchain"
}
},
"merchantWalletId": {
"$ref": "#/components/schemas/MerchantWalletId"
},
"type": {
"type": "string",
"enum": ["continuous"]
Expand Down Expand Up @@ -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.",
Expand Down Expand Up @@ -10364,6 +10437,9 @@
"fees": {
"$ref": "#/components/schemas/FiatMoneyUsd"
},
"networkFees": {
"$ref": "#/components/schemas/CryptoPaymentNetworkFee"
},
"paymentIntentId": {
"type": "string",
"format": "uuid",
Expand All @@ -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": {
Expand All @@ -10381,6 +10471,9 @@
"address": {
"type": "string",
"example": "0x97de855690955e0da79ce5c1b6804847e7070c7f"
},
"addressTag": {
"$ref": "#/components/schemas/AddressTag"
}
}
},
Expand Down Expand Up @@ -11599,6 +11692,9 @@
"fees": {
"$ref": "#/components/schemas/PayoutMoney"
},
"networkFees": {
"$ref": "#/components/schemas/PayoutMoney"
},
"status": {
"$ref": "#/components/schemas/PayoutStatus"
},
Expand Down
2 changes: 2 additions & 0 deletions src/generated/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/generated/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.2.1
6.3.0
11 changes: 4 additions & 7 deletions src/generated/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(/\/+$/, "");

Expand Down Expand Up @@ -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";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ export interface ContinuousPaymentIntentCreationRequest {
* @memberof ContinuousPaymentIntentCreationRequest
*/
paymentMethods: Array<PaymentMethodBlockchain>;
/**
* Unique system generated identifier for the wallet of the merchant.
* @type {string}
* @memberof ContinuousPaymentIntentCreationRequest
*/
merchantWalletId?: string;
/**
*
* @type {string}
Expand Down
6 changes: 6 additions & 0 deletions src/generated/models/continuous-payment-intent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
6 changes: 6 additions & 0 deletions src/generated/models/crypto-payment-deposit-address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
31 changes: 31 additions & 0 deletions src/generated/models/crypto-payment-from-addresses.ts
Original file line number Diff line number Diff line change
@@ -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<string>}
* @memberof CryptoPaymentFromAddresses
*/
addresses?: Array<string>;
}
50 changes: 50 additions & 0 deletions src/generated/models/crypto-payment-network-fee.ts
Original file line number Diff line number Diff line change
@@ -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];
Loading

0 comments on commit b69592c

Please sign in to comment.