Transactions: money movements as your bank reports them on an internal account (posted or pending), with the payment orders, expected payments and returns they reconcile to.
Functions
get-transaction
fn (transaction-id: Str): Map
fn (transaction-id: Str, opts: Map): Map
GET /api/transactions/{id}: retrieve a transaction (reconciled says
whether it matched).
Example
transaction ::modern-treasury::transactions/get-transaction("e07c5a93-14d6-4f2b-9c38-7a0b6e2d1f45")
transaction.reconciled
list-line-items
fn (transaction-id: Str): Map
fn (transaction-id: Str, params: Map): Map
fn (transaction-id: Str, params: Map, opts: Map): Map
GET /api/transactions/{id}/line_items: one page of the line items a transaction is split into.
Example
page ::modern-treasury::transactions/list-line-items("e07c5a93-14d6-4f2b-9c38-7a0b6e2d1f45", {per_page: 50})
map(page.items, %.amount)
list-transactions
fn (): Map
fn (params: Map): Map
fn (params: Map, opts: Map): Map
GET /api/transactions: one page ({items, after_cursor, per_page}).
Filters: internal_account_id, posted (Bool), direction,
payment_type, counterparty_id, virtual_account_id,
vendor_id, description, as_of_date_start, as_of_date_end,
metadata, per_page, after_cursor.
Example
page ::modern-treasury::transactions/list-transactions({internal_account_id: "0f8e3719-3dfd-4613-9bbf-c0333781b59f", posted: true})