/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { transactionsGetById } from "../funcs/transactionsGetById.js"; import { transactionsSearch } from "../funcs/transactionsSearch.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Transactions extends ClientSDK { /** * Get a transaction by ID * * @remarks * Retrieve a single transaction by ID. View payment details, status, and associated order information. */ async getById( transactionId: string, options?: RequestOptions, ): Promise { return unwrapAsync(transactionsGetById( this, transactionId, options, )); } /** * List all transactions * * @remarks * Search and retrieve payment transactions. Filter by customer, product, date range, and status. */ async search( customerId?: string | undefined, orderId?: string | undefined, productId?: string | undefined, pageNumber?: number | undefined, pageSize?: number | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(transactionsSearch( this, customerId, orderId, productId, pageNumber, pageSize, options, )); } }