Liking cljdoc? Tell your friends :D

monero-store.collect.fulfilment

What the store does once money is confirmed — as a port.

This is the seam the host application implements: grant a licence, flip a feature, ship a key, extend a subscription. The store decides WHETHER; the host decides WHAT.

A fulfilment MUST be idempotent. The store gates on the invoice's pending -> paid transition, so it calls fulfil! once per invoice under normal operation — but a process that dies between the claim and the call is retried by the next sweep, and at-least-once is the only delivery a store and a foreign system can honestly agree on.

What the store does once money is confirmed — as a port.

This is the seam the host application implements: grant a licence, flip a
feature, ship a key, extend a subscription. The store decides WHETHER; the
host decides WHAT.

A fulfilment MUST be idempotent. The store gates on the invoice's
pending -> paid transition, so it calls `fulfil!` once per invoice under
normal operation — but a process that dies between the claim and the call is
retried by the next sweep, and at-least-once is the only delivery a store
and a foreign system can honestly agree on.
raw docstring

compositeclj

(composite fulfilments)

Fulfilment that runs every one of fulfilments, in order.

The first to throw stops the rest, and the store treats the whole grant as undelivered — so the arms must be individually idempotent, which is the same requirement each of them already carries.

Fulfilment that runs every one of `fulfilments`, in order.

The first to throw stops the rest, and the store treats the whole grant as
undelivered — so the arms must be individually idempotent, which is the same
requirement each of them already carries.
sourceraw docstring

handlerclj

(handler fulfil-fn)

Fulfilment from a plain function of the grant. The host application's seam when it has no reason to reify a protocol.

Fulfilment from a plain function of the grant. The host application's seam
when it has no reason to reify a protocol.
sourceraw docstring

IFulfilmentcljprotocol

fulfil!clj

(fulfil! this grant)

Hand over what grant bought. Must be idempotent for one invoice id.

grant is {:fulfilment/invoice-id :fulfilment/customer-id :fulfilment/item-id :fulfilment/period-end}. Throwing means the store did not manage to deliver: the invoice's claim is released and the sweep will try again.

Hand over what `grant` bought. Must be idempotent for one invoice id.

`grant` is {:fulfilment/invoice-id :fulfilment/customer-id
:fulfilment/item-id :fulfilment/period-end}. Throwing means the store did
not manage to deliver: the invoice's claim is released and the sweep will
try again.

revoke!clj

(revoke! this grant reason)

Take back what grant handed over. Called for a chargeback or an operator reversal, never by settlement itself.

Take back what `grant` handed over. Called for a chargeback or an
operator reversal, never by settlement itself.
source

ledgerclj

(ledger order-store)

Fulfilment that records the grant in the order store.

Useful on its own — the store becomes the record of who bought what — and as one arm of a composite alongside the host's real delivery.

Fulfilment that records the grant in the order store.

Useful on its own — the store becomes the record of who bought what — and as
one arm of a `composite` alongside the host's real delivery.
sourceraw docstring

loggingclj

(logging)

Fulfilment that only announces itself. For bringing a deployment up before the host side exists.

Fulfilment that only announces itself. For bringing a deployment up before
the host side exists.
sourceraw docstring

noopclj

(noop)

Fulfilment that does nothing. The default: a store that only takes money.

Fulfilment that does nothing. The default: a store that only takes money.
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