Pennylane API Client
    Preparing search index...

    Variable BankAccountsApiConst

    BankAccountsApi: {
        createBankAccount: (
            body: CreateBankAccountBody,
        ) => Effect<
            {
                balance: string;
                bank_establishment: { id: number };
                created_at: string;
                currency: string;
                id: number;
                journal: { id: number; url: string } | null;
                ledger_account: { id: number; url: string };
                name: string;
                updated_at: string;
            },
            CreateBankAccountError,
            PennylaneClient,
        >;
        getBankAccount: (
            id: number,
        ) => Effect<
            {
                balance: string;
                bank_establishment: { id: number };
                created_at: string;
                currency: string;
                id: number;
                journal: { id: number; url: string } | null;
                ledger_account: { id: number; url: string };
                name: string;
                updated_at: string;
            },
            GetBankAccountError,
            PennylaneClient,
        >;
        getBankAccounts: (
            params?: GetBankAccountsQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly {
                    balance: string;
                    bank_establishment: { id: number };
                    created_at: string;
                    currency: string;
                    id: number;
                    journal: { id: number; url: string } | null;
                    ledger_account: { id: number; url: string };
                    name: string;
                    updated_at: string;
                }[];
                next_cursor?: string
                | null;
            },
            GetBankAccountsError,
            PennylaneClient,
        >;
    } = ...

    Service containing methods for the "bank_accounts" endpoints.

    Type Declaration

    • createBankAccount: (
          body: CreateBankAccountBody,
      ) => Effect<
          {
              balance: string;
              bank_establishment: { id: number };
              created_at: string;
              currency: string;
              id: number;
              journal: { id: number; url: string } | null;
              ledger_account: { id: number; url: string };
              name: string;
              updated_at: string;
          },
          CreateBankAccountError,
          PennylaneClient,
      >

      Creates a bank account.

      Possible errors:

      • CreateBankAccountBadRequest (400): Missing or invalid request body
      • CreateBankAccountUnauthorized (401): Invalid or missing API key
      • CreateBankAccountForbidden (403): Insufficient permissions (bank_accounts:all scope required)
      • CreateBankAccountNotFound (404): Bank establishment not found
      • CreateBankAccountUnprocessableEntity (422): Request rejected by business validation
    • getBankAccount: (
          id: number,
      ) => Effect<
          {
              balance: string;
              bank_establishment: { id: number };
              created_at: string;
              currency: string;
              id: number;
              journal: { id: number; url: string } | null;
              ledger_account: { id: number; url: string };
              name: string;
              updated_at: string;
          },
          GetBankAccountError,
          PennylaneClient,
      >

      Retrieves a single bank account by its identifier.

      Possible errors:

      • GetBankAccountBadRequest (400): Invalid request
      • GetBankAccountUnauthorized (401): Invalid or missing API key
      • GetBankAccountForbidden (403): Insufficient permissions for this operation
      • GetBankAccountNotFound (404): Bank account not found
    • getBankAccounts: (
          params?: GetBankAccountsQueryParams,
      ) => Effect<
          {
              has_more: boolean;
              items: readonly {
                  balance: string;
                  bank_establishment: { id: number };
                  created_at: string;
                  currency: string;
                  id: number;
                  journal: { id: number; url: string } | null;
                  ledger_account: { id: number; url: string };
                  name: string;
                  updated_at: string;
              }[];
              next_cursor?: string
              | null;
          },
          GetBankAccountsError,
          PennylaneClient,
      >

      Retrieves a list of bank accounts.

      Uses cursor-based pagination.

      Possible errors:

      • GetBankAccountsBadRequest (400): Missing or invalid query parameters
      • GetBankAccountsUnauthorized (401): Invalid or missing API key
      • GetBankAccountsForbidden (403): Insufficient permissions (bank_accounts:readonly scope required)
      • GetBankAccountsNotFound (404): Resource not found