/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { checkoutSessionsCreate } from "../funcs/checkoutSessionsCreate.js"; import { checkoutSessionsDelete } from "../funcs/checkoutSessionsDelete.js"; import { checkoutSessionsGet } from "../funcs/checkoutSessionsGet.js"; import { checkoutSessionsUpdate } from "../funcs/checkoutSessionsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; export class CheckoutSessions extends ClientSDK { /** * Create checkout session * * @remarks * Create a new checkout session. */ async create( checkoutSessionCreate?: components.CheckoutSessionCreate | undefined, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(checkoutSessionsCreate( this, checkoutSessionCreate, merchantAccountId, options, )); } /** * Update checkout session * * @remarks * Update the information stored on a checkout session. */ async update( checkoutSessionCreate: components.CheckoutSessionCreate, sessionId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(checkoutSessionsUpdate( this, checkoutSessionCreate, sessionId, merchantAccountId, options, )); } /** * Get checkout session * * @remarks * Retrieve the information stored on a checkout session. */ async get( sessionId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(checkoutSessionsGet( this, sessionId, merchantAccountId, options, )); } /** * Delete checkout session * * @remarks * Delete a checkout session and all of its (PCI) data. */ async delete( sessionId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(checkoutSessionsDelete( this, sessionId, merchantAccountId, options, )); } }