/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { productsCreate } from "../funcs/productsCreate.js"; import { productsGet } from "../funcs/productsGet.js"; import { productsSearch } from "../funcs/productsSearch.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Products extends ClientSDK { /** * Retrieve a product * * @remarks * Retrieve product details by ID. View pricing, billing type, status, and product configuration. */ async get( productId: string, options?: RequestOptions, ): Promise { return unwrapAsync(productsGet( this, productId, options, )); } /** * Creates a new product. * * @remarks * Create a new product for one-time payments or subscriptions. Configure pricing, billing cycles, and features. */ async create( request: components.CreateProductRequestEntity, options?: RequestOptions, ): Promise { return unwrapAsync(productsCreate( this, request, options, )); } /** * List all products * * @remarks * Search and retrieve a paginated list of products. Filter by status, billing type, and other criteria. */ async search( pageNumber?: number | undefined, pageSize?: number | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(productsSearch( this, pageNumber, pageSize, options, )); } }