What the store sells, as a registry of value objects.
An item is registered, never compiled in: a deployment declares its own
catalog at boot and nothing below this namespace knows what a :pro is. The
sample catalog exists so a fresh checkout runs before anyone has configured
anything.
What the store sells, as a registry of value objects. An item is registered, never compiled in: a deployment declares its own catalog at boot and nothing below this namespace knows what a `:pro` is. The sample catalog exists so a fresh checkout runs before anyone has configured anything.
(clear!)Forget every registered item. For tests and for a boot that owns the whole catalog.
Forget every registered item. For tests and for a boot that owns the whole catalog.
(item item-id)Registered Item for item-id, or nil.
Registered Item for `item-id`, or nil.
(items)Every registered item, in id order.
Every registered item, in id order.
(listed)Items a customer may see. An unlisted item is still sellable — an operator can open one — it simply is not advertised.
Items a customer may see. An unlisted item is still sellable — an operator can open one — it simply is not advertised.
(listed? item-id)True when item-id is registered and advertised.
True when `item-id` is registered and advertised.
(price item)The stored price of item, as Money.
The stored price of `item`, as Money.
(register! item)Register item, replacing any item with the same id. Returns the item.
Validated on the way in: an item priced in a currency nobody can settle, or with a negative amount, is a checkout that fails at the customer rather than at boot.
Register `item`, replacing any item with the same id. Returns the item. Validated on the way in: an item priced in a currency nobody can settle, or with a negative amount, is a checkout that fails at the customer rather than at boot.
(register-all! items)Register every item in items. Returns them.
Register every item in `items`. Returns them.
A catalog to run against before a deployment declares its own.
A catalog to run against before a deployment declares its own.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |