Liking cljdoc? Tell your friends :D

monero-store.collect.ledger

The book the store's money is written into.

An entry is a set of legs whose signed minor units sum to zero; a debit is positive and a credit is negative. The builders are pure and the in-memory implementation is the default, so the double-entry law holds with no backend present. A real book lives in an adapter behind its own alias.

The book the store's money is written into.

An entry is a set of legs whose signed minor units sum to zero; a debit is
positive and a credit is negative. The builders are pure and the in-memory
implementation is the default, so the double-entry law holds with no backend
present. A real book lives in an adapter behind its own alias.
raw docstring

accountsclj

The accounts one store's money moves between.

The accounts one store's money moves between.
sourceraw docstring

balanced?clj

(balanced? legs)

True when legs sum to zero minor units.

True when `legs` sum to zero minor units.
sourceraw docstring

Billableclj

What the book needs to know about an invoice, and nothing more.

Deliberately not schema/Invoice: a host store's invoice carries its own keys — a plan rather than an item, periods, entitlements — and the builders read none of them. Demanding the whole record would make the book unusable by the very stores it exists for.

What the book needs to know about an invoice, and nothing more.

Deliberately not `schema/Invoice`: a host store's invoice carries its own
keys — a plan rather than an item, periods, entitlements — and the builders
read none of them. Demanding the whole record would make the book unusable
by the very stores it exists for.
sourceraw docstring

ILedgercljprotocol

balanceclj

(balance this account currency-id)

Signed minor units of currency-id standing in account.

Signed minor units of `currency-id` standing in `account`.

post!clj

(post! this entry)

Record entry. Returns it, or nil when its reference was already recorded.

Record `entry`. Returns it, or nil when its reference was already recorded.

posted?clj

(posted? this reference)

True when reference has already been recorded.

True when `reference` has already been recorded.
source

InvoiceIdclj

However the host store names an invoice.

Deliberately not :uuid. This store mints uuids; another mints a string its gateway will echo back as a description. The book records the id it is given and never parses it.

However the host store names an invoice.

Deliberately not `:uuid`. This store mints uuids; another mints a string its
gateway will echo back as a description. The book records the id it is given
and never parses it.
sourceraw docstring

LedgerAccountclj

source

LedgerEntryclj

One balanced movement, identified by the reference that makes it repeatable.

One balanced movement, identified by the reference that makes it repeatable.
sourceraw docstring

LedgerLegclj

One side of an entry. :leg/amount is signed minor units: debit positive, credit negative.

One side of an entry. `:leg/amount` is signed minor units: debit positive,
credit negative.
sourceraw docstring

memory-ledgerclj

(memory-ledger)

ILedger over an atom. The default, and what the tests run on.

post! is a swap! that keeps the first entry for a reference, so a redelivered settlement adds nothing.

ILedger over an atom. The default, and what the tests run on.

`post!` is a `swap!` that keeps the first entry for a reference, so a
redelivered settlement adds nothing.
sourceraw docstring

Receivedclj

What the book needs to know about one observed movement of money.

:payment/reference is the idempotency key: derived from the movements the rail named, so re-seeing the same money yields the same reference and books once.

What the book needs to know about one observed movement of money.

`:payment/reference` is the idempotency key: derived from the movements the
rail named, so re-seeing the same money yields the same reference and books
once.
sourceraw docstring

sale-entryclj

(sale-entry invoice at)

The entry booking invoice as revenue owed: debit receivable, credit revenue.

at is the entry's timestamp. Pure.

The entry booking `invoice` as revenue owed: debit receivable, credit revenue.

`at` is the entry's timestamp. Pure.
sourceraw docstring

settlement-entryclj

(settlement-entry invoice payment)

The entry booking payment against invoice: debit wallet, credit receivable.

The reference is the payment's own, so the same observed movement books once however often it is seen. Pure.

The entry booking `payment` against `invoice`: debit wallet, credit receivable.

The reference is the payment's own, so the same observed movement books once
however often it is seen. Pure.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close