// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../core/resource'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; export class Funds extends APIResource { /** * Retrieve the funding history for the authenticated user, including details about * each funding transaction. * * @example * ```ts * const response = * await client.billing.funds.retrieveHistory(); * ``` */ retrieveHistory(options?: RequestOptions): APIPromise { return this._client.get('/billing/funds/history', options); } } export type FundRetrieveHistoryResponse = Array; export namespace FundRetrieveHistoryResponse { export interface FundRetrieveHistoryResponseItem { /** * Fund history unique identifier */ id: string; /** * Amount of the transaction */ amount: number; /** * Timestamp of the transaction creation */ createdAt: string; /** * Currency of the transaction */ currency: string; /** * Unique identifier of the source entity */ fromId: string; /** * Type of the source entity */ fromType: string; /** * Reason for the transaction */ reason: string; /** * Unique identifier of the destination entity */ toId: string; /** * Type of the destination entity */ toType: string; } } export declare namespace Funds { export { type FundRetrieveHistoryResponse as FundRetrieveHistoryResponse }; }