Skip to content

Commit

Permalink
feat: sync SDK to OpenAPI doc v1.5.0 (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
circle-github-action-bot authored Jan 23, 2023
1 parent 4cf654d commit aaa8a88
Show file tree
Hide file tree
Showing 5 changed files with 303 additions and 18 deletions.
122 changes: 104 additions & 18 deletions sdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}
],
"info": {
"version": "1.4.0",
"version": "1.5.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 @@ -7851,6 +7851,92 @@
"$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 checkout sessions",
"operationId": "listCheckoutSessions",
"tags": ["Checkout Sessions"],
"responses": {
"200": {
"description": "Successfully retrieved a list of checkout sessions.",
"headers": {
"X-Request-Id": {
"$ref": "#/components/headers/XRequestId"
}
},
"content": {
"application/json": {
"schema": {
"title": "ListCheckoutSessionsResponse",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CheckoutSession"
}
}
}
},
"examples": {
"response": {
"value": {
"data": [
{
"id": "3e4f4108-cbb4-4620-bd30-4bcf8c28ca20",
"type": "checkout_session",
"successUrl": "https://www.example.com/success",
"clientToken": "ck_test_19NoQz3jDq3mKgJFEuMkWs4dCk6Eiq1GZShWMF_jY_vL3dOAoT3EiTTgEprqaVcGbzB3pszRZhyU_v0mebyKiQ",
"status": "active",
"createDate": "2022-07-21T20:13:35.578678Z",
"updateDate": "2022-07-21T20:13:35.578678Z",
"expiresOn": "2022-07-21T20:19:24.859052Z",
"amount": {
"amount": "3.14",
"currency": "USD"
},
"amountPaid": {
"amount": "2.20",
"currency": "USD"
},
"paymentIds": [],
"paymentIntentIds": []
}
]
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/NotAuthorized"
}
}
}
},
"/v1/checkoutSessions/{id}": {
Expand Down Expand Up @@ -12532,6 +12618,11 @@
"description": "The URL returned to you through client-side callback when the payment is completed.",
"example": "https://www.example.com/success"
},
"CheckoutSessionStatus": {
"description": "Status of the checkout session. Active: the checkout session is still in-progress. Completed: the payments of a checkout session is successful and the checkout session is completed. Expired: indicates that it expired and is no longer accepting any new payments.",
"type": "string",
"enum": ["active", "completed", "expired"]
},
"CheckoutSessionMoney": {
"type": "object",
"required": ["amount", "currency"],
Expand All @@ -12548,23 +12639,6 @@
}
}
},
"CheckoutSessionCreationRequest": {
"type": "object",
"required": ["amount"],
"properties": {
"successUrl": {
"$ref": "#/components/schemas/SuccessUrl"
},
"amount": {
"$ref": "#/components/schemas/CheckoutSessionMoney"
}
}
},
"CheckoutSessionStatus": {
"description": "Status of the checkout session. Active: the checkout session is still in-progress. Completed: the payments of a checkout session is successful and the checkout session is completed. Expired: indicates that it expired and is no longer accepting any new payments.",
"type": "string",
"enum": ["active", "completed", "expired"]
},
"CheckoutSession": {
"type": "object",
"required": [
Expand Down Expand Up @@ -12636,6 +12710,18 @@
}
}
}
},
"CheckoutSessionCreationRequest": {
"type": "object",
"required": ["amount"],
"properties": {
"successUrl": {
"$ref": "#/components/schemas/SuccessUrl"
},
"amount": {
"$ref": "#/components/schemas/CheckoutSessionMoney"
}
}
}
},
"headers": {
Expand Down
1 change: 1 addition & 0 deletions src/generated/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ models/list-business-wire-accounts-response.ts
models/list-cards-response.ts
models/list-channels-response.ts
models/list-chargebacks-response.ts
models/list-checkout-sessions-response.ts
models/list-payment-intents-response-data-inner.ts
models/list-payment-intents-response.ts
models/list-payments-response-data-inner.ts
Expand Down
172 changes: 172 additions & 0 deletions src/generated/apis/checkout-sessions-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ import { ExtendCheckoutSessionResponse } from "../models";
// @ts-ignore
import { GetCheckoutSessionResponse } from "../models";
// @ts-ignore
import { ListCheckoutSessionsResponse } from "../models";
// @ts-ignore
import { NotAuthorized } from "../models";
// @ts-ignore
import { NotFound } from "../models";
Expand Down Expand Up @@ -211,6 +213,81 @@ export const CheckoutSessionsApiAxiosParamCreator = function (
...options.headers
};

return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions
};
},
/**
*
* @summary List all checkout sessions
* @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}
*/
listCheckoutSessions: async (
from?: string,
to?: string,
pageBefore?: string,
pageAfter?: string,
pageSize?: number,
options: AxiosRequestConfig = {}
): Promise<RequestArgs> => {
const localVarPath = `/v1/checkoutSessions`;
// 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
Expand Down Expand Up @@ -310,6 +387,46 @@ export const CheckoutSessionsApiFp = function (configuration?: Configuration) {
BASE_PATH,
configuration
);
},
/**
*
* @summary List all checkout sessions
* @param {string} [from] Queries items created since the specified date-time (inclusive).
* @param {string} [to] Queries items created before the specified date-time (inclusive).
* @param {string} [pageBefore] A collection ID value used for pagination. It marks the exclusive end of a page. When provided, the collection resource will return the next &#x60;n&#x60; items before the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageAfter.
* @param {string} [pageAfter] A collection ID value used for pagination. It marks the exclusive begin of a page. When provided, the collection resource will return the next &#x60;n&#x60; items after the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageBefore.
* @param {number} [pageSize] Limits the number of items to be returned. Some collections have a strict upper bound that will disregard this value. In case the specified value is higher than the allowed limit, the collection limit will be used. If avoided, the collection will determine the page size itself.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async listCheckoutSessions(
from?: string,
to?: string,
pageBefore?: string,
pageAfter?: string,
pageSize?: number,
options?: AxiosRequestConfig
): Promise<
(
axios?: AxiosInstance,
basePath?: string
) => AxiosPromise<ListCheckoutSessionsResponse>
> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.listCheckoutSessions(
from,
to,
pageBefore,
pageAfter,
pageSize,
options
);
return createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
);
}
};
};
Expand Down Expand Up @@ -371,6 +488,36 @@ export const CheckoutSessionsApiFactory = function (
return localVarFp
.getCheckoutSession(id, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary List all checkout sessions
* @param {string} [from] Queries items created since the specified date-time (inclusive).
* @param {string} [to] Queries items created before the specified date-time (inclusive).
* @param {string} [pageBefore] A collection ID value used for pagination. It marks the exclusive end of a page. When provided, the collection resource will return the next &#x60;n&#x60; items before the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageAfter.
* @param {string} [pageAfter] A collection ID value used for pagination. It marks the exclusive begin of a page. When provided, the collection resource will return the next &#x60;n&#x60; items after the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageBefore.
* @param {number} [pageSize] Limits the number of items to be returned. Some collections have a strict upper bound that will disregard this value. In case the specified value is higher than the allowed limit, the collection limit will be used. If avoided, the collection will determine the page size itself.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listCheckoutSessions(
from?: string,
to?: string,
pageBefore?: string,
pageAfter?: string,
pageSize?: number,
options?: any
): AxiosPromise<ListCheckoutSessionsResponse> {
return localVarFp
.listCheckoutSessions(
from,
to,
pageBefore,
pageAfter,
pageSize,
options
)
.then((request) => request(axios, basePath));
}
};
};
Expand Down Expand Up @@ -431,4 +578,29 @@ export class CheckoutSessionsApi extends BaseAPI {
.getCheckoutSession(id, options)
.then((request) => request(this.axios, this.basePath));
}

/**
*
* @summary List all checkout sessions
* @param {string} [from] Queries items created since the specified date-time (inclusive).
* @param {string} [to] Queries items created before the specified date-time (inclusive).
* @param {string} [pageBefore] A collection ID value used for pagination. It marks the exclusive end of a page. When provided, the collection resource will return the next &#x60;n&#x60; items before the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageAfter.
* @param {string} [pageAfter] A collection ID value used for pagination. It marks the exclusive begin of a page. When provided, the collection resource will return the next &#x60;n&#x60; items after the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageBefore.
* @param {number} [pageSize] Limits the number of items to be returned. Some collections have a strict upper bound that will disregard this value. In case the specified value is higher than the allowed limit, the collection limit will be used. If avoided, the collection will determine the page size itself.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CheckoutSessionsApi
*/
public listCheckoutSessions(
from?: string,
to?: string,
pageBefore?: string,
pageAfter?: string,
pageSize?: number,
options?: AxiosRequestConfig
) {
return CheckoutSessionsApiFp(this.configuration)
.listCheckoutSessions(from, to, pageBefore, pageAfter, pageSize, options)
.then((request) => request(this.axios, this.basePath));
}
}
1 change: 1 addition & 0 deletions src/generated/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ export * from "./list-business-wire-accounts-response";
export * from "./list-cards-response";
export * from "./list-channels-response";
export * from "./list-chargebacks-response";
export * from "./list-checkout-sessions-response";
export * from "./list-payment-intents-response";
export * from "./list-payment-intents-response-data-inner";
export * from "./list-payments-response";
Expand Down
Loading

0 comments on commit aaa8a88

Please sign in to comment.