/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Mercoa from "../../../index.js"; export declare namespace Transaction { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; token: core.Supplier; /** Override the X-API-Version header */ xApiVersion?: "2024-08-01"; /** Additional headers to include in requests. */ headers?: Record | undefined>; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Additional query string parameters to include in the request. */ queryParams?: Record; /** Additional headers to include in the request. */ headers?: Record | undefined>; /** Override the X-API-Version header */ xApiVersion?: "2024-08-01"; } } export declare class Transaction { protected readonly _options: Transaction.Options; constructor(_options: Transaction.Options); /** * Search transactions * * @param {Mercoa.FindTransactionsRequest} request * @param {Transaction.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Mercoa.BadRequest} * @throws {@link Mercoa.Unauthorized} * @throws {@link Mercoa.Forbidden} * @throws {@link Mercoa.NotFound} * @throws {@link Mercoa.Conflict} * @throws {@link Mercoa.InternalServerError} * @throws {@link Mercoa.Unimplemented} * * @example * await client.transaction.find({ * startDate: new Date("2024-01-15T09:30:00.000Z"), * endDate: new Date("2024-01-15T09:30:00.000Z"), * limit: 10 * }) */ find(request?: Mercoa.FindTransactionsRequest, requestOptions?: Transaction.RequestOptions): core.HttpResponsePromise; private __find; /** * Get Transaction * * @param {Mercoa.TransactionId} transactionId * @param {Transaction.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Mercoa.BadRequest} * @throws {@link Mercoa.Unauthorized} * @throws {@link Mercoa.Forbidden} * @throws {@link Mercoa.NotFound} * @throws {@link Mercoa.Conflict} * @throws {@link Mercoa.InternalServerError} * @throws {@link Mercoa.Unimplemented} * * @example * await client.transaction.get("trx_bb08e72f-19f8-45f3-bcf9-46fdc46cb2f4") */ get(transactionId: Mercoa.TransactionId, requestOptions?: Transaction.RequestOptions): core.HttpResponsePromise; private __get; /** * Get a URL to download transactions as a CSV/JSON file. * * @param {Mercoa.DownloadTransactionsRequest} request * @param {Transaction.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Mercoa.BadRequest} * @throws {@link Mercoa.Unauthorized} * @throws {@link Mercoa.Forbidden} * @throws {@link Mercoa.NotFound} * @throws {@link Mercoa.Conflict} * @throws {@link Mercoa.InternalServerError} * @throws {@link Mercoa.Unimplemented} * * @example * await client.transaction.download({ * format: "CSV" * }) */ download(request?: Mercoa.DownloadTransactionsRequest, requestOptions?: Transaction.RequestOptions): core.HttpResponsePromise; private __download; protected _getAuthorizationHeader(): Promise; }