Aller au contenu

Banking

Bank accounts, transactions and reconciliation.

Bases: SyncAPIResource

Manage bank transactions.

list

list(
    *,
    cursor: str | None = None,
    limit: int | None = None,
    filter: FiltersInput | None = None,
    sort: str | None = None,
) -> SyncCursorPage[Transaction]

List transactions.

Scope: transactions:readonly. Reference: https://pennylane.readme.io/reference/gettransactions

Parameters:

Name Type Description Default
cursor str | None

Pagination cursor from a previous page.

None
limit int | None

Results per page (1-100, API default 20).

None
filter FiltersInput | None

Conditions built with :mod:pennylane_sdk.filters.

None
sort str | None

Sort field, prefixed with - for descending (default -id).

None

create

create(
    *,
    bank_account_id: int,
    label: str,
    date: str,
    amount: MoneyInput,
    fee: MoneyInput | None = None,
) -> Transaction

Create a transaction.

Scope: transactions:all. Reference: https://pennylane.readme.io/reference/createtransaction

Parameters:

Name Type Description Default
bank_account_id int

Bank account the transaction is registered on.

required
label str

Transaction label.

required
date str

Transaction date (YYYY-MM-DD).

required
amount MoneyInput

Transaction amount (Decimal or string).

required
fee MoneyInput | None

Transaction fee (Decimal or string).

None

get

get(transaction_id: int) -> Transaction

Retrieve a transaction by its Pennylane identifier.

Scope: transactions:readonly. Reference: https://pennylane.readme.io/reference/gettransaction

update

update(
    transaction_id: int,
    *,
    customer_id: int | None = None,
    supplier_id: int | None = None,
) -> Transaction

Update a transaction, linking it to a customer or a supplier.

The body is a oneOf: pass either customer_id or supplier_id (either may be None to unlink).

Scope: transactions:all. Reference: https://pennylane.readme.io/reference/updatetransaction

list_categories

list_categories(
    transaction_id: int,
    *,
    cursor: str | None = None,
    limit: int | None = None,
) -> SyncCursorPage[TransactionCategory]

List the analytical categories of a bank transaction.

Scope: transactions:readonly. Reference: https://pennylane.readme.io/reference/gettransactioncategories

categorize

categorize(
    transaction_id: int, *, categories: list[dict[str, Any]]
) -> builtins.list[TransactionCategory]

Set the analytical categories of a bank transaction.

Categories may belong to different category groups; the weights of categories from the same group must sum to 1.

Scope: transactions:all. Reference: https://pennylane.readme.io/reference/puttransactioncategories

Parameters:

Name Type Description Default
transaction_id int

The transaction to categorize.

required
categories list[dict[str, Any]]

A list of {"id": <category id>, "weight": "<0-1>"}.

required

list_matched_invoices

list_matched_invoices(
    transaction_id: int,
    *,
    cursor: str | None = None,
    limit: int | None = None,
) -> SyncCursorPage[MatchedInvoiceLink]

List the invoices matched to a bank transaction.

Scope: transactions:readonly. Reference: https://pennylane.readme.io/reference/gettransactionmatchedinvoices

Bases: SyncAPIResource

Manage bank accounts.

list

list(
    *,
    cursor: str | None = None,
    limit: int | None = None,
    sort: str | None = None,
) -> SyncCursorPage[BankAccount]

List bank accounts.

Scope: bank_accounts:readonly. Reference: https://pennylane.readme.io/reference/getbankaccounts

Parameters:

Name Type Description Default
cursor str | None

Pagination cursor from a previous page.

None
limit int | None

Results per page (1-100, API default 20).

None
sort str | None

Sort field, prefixed with - for descending (default -id).

None

create

create(
    *,
    name: str,
    bank_establishment_id: int | None = None,
    iban: str | None = None,
    bic: str | None = None,
    currency: str | None = None,
    account_type: str | None = None,
) -> BankAccount

Create a bank account.

Scope: bank_accounts:all. Reference: https://pennylane.readme.io/reference/postbankaccount

Parameters:

Name Type Description Default
name str

The name of the bank account.

required
bank_establishment_id int | None

Bank establishment id (Other if omitted).

None
iban str | None

International Bank Account Number.

None
bic str | None

Bank Identifier Code.

None
currency str | None

ISO currency code (default EUR).

None
account_type str | None

One of current (deprecated), card, savings, shares, loan, life_insurance, other, checking.

None

get

get(bank_account_id: int) -> BankAccount

Retrieve a bank account by its Pennylane identifier.

Scope: bank_accounts:readonly. Reference: https://pennylane.readme.io/reference/getbankaccount

Bases: SyncAPIResource

Browse the reference list of bank establishments.

list

list(
    *,
    cursor: str | None = None,
    limit: int | None = None,
    filter: FiltersInput | None = None,
    sort: str | None = None,
) -> SyncCursorPage[BankEstablishment]

List bank establishments.

Scope: bank_establishments:readonly. Reference: https://pennylane.readme.io/reference/getbankestablishments

Parameters:

Name Type Description Default
cursor str | None

Pagination cursor from a previous page.

None
limit int | None

Results per page (1-100, API default 20).

None
filter FiltersInput | None

Conditions built with :mod:pennylane_sdk.filters.

None
sort str | None

Sort field, prefixed with - for descending (default -id).

None