/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { customersGenerateBillingLinks } from "../funcs/customersGenerateBillingLinks.js"; import { customersList } from "../funcs/customersList.js"; import { customersRetrieve } from "../funcs/customersRetrieve.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Customers extends ClientSDK { /** * List all customers * * @remarks * Retrieve a paginated list of all customers. Filter and search through your customer base. */ async list( pageNumber?: number | undefined, pageSize?: number | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(customersList( this, pageNumber, pageSize, options, )); } /** * Retrieve a customer * * @remarks * Retrieve customer information by ID or email. View purchase history, subscriptions, and profile details. */ async retrieve( customerId?: string | undefined, email?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(customersRetrieve( this, customerId, email, options, )); } /** * Generate Customer Links * * @remarks * Generate a customer portal link for managing billing, subscriptions, and payment methods. */ async generateBillingLinks( request: components.CreateCustomerPortalLinkRequestEntity, options?: RequestOptions, ): Promise { return unwrapAsync(customersGenerateBillingLinks( this, request, options, )); } }