/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { checkoutsCreate } from "../funcs/checkoutsCreate.js"; import { checkoutsRetrieve } from "../funcs/checkoutsRetrieve.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Checkouts extends ClientSDK { /** * Retrieve a checkout session. * * @remarks * Retrieve details of a checkout session by ID. View status, customer info, and payment details. */ async retrieve( checkoutId: string, options?: RequestOptions, ): Promise { return unwrapAsync(checkoutsRetrieve( this, checkoutId, options, )); } /** * Creates a new checkout session. * * @remarks * Create a new checkout session to accept one-time payments or start subscriptions. Returns a checkout URL to redirect customers. */ async create( request: components.CreateCheckoutRequest, options?: RequestOptions, ): Promise { return unwrapAsync(checkoutsCreate( this, request, options, )); } }