Skip to content

basalt / subscriptions/src / MemoryInvoiceStore

Class: MemoryInvoiceStore ​

Defined in: subscriptions/src/invoice.ts:105

In-memory store — per-process. Back it with your database in production.

Implements ​

Constructors ​

Constructor ​

> new MemoryInvoiceStore(): MemoryInvoiceStore

Returns ​

MemoryInvoiceStore

Methods ​

forBillable() ​

> forBillable(billableId): Promise<Invoice[]>

Defined in: subscriptions/src/invoice.ts:116

Newest first.

Parameters ​

billableId ​

string

Returns ​

Promise<Invoice[]>

Implementation of ​

InvoiceStore.forBillable


get() ​

> get(id): Promise<Invoice | null>

Defined in: subscriptions/src/invoice.ts:112

Parameters ​

id ​

string

Returns ​

Promise<Invoice | null>

Implementation of ​

InvoiceStore.get


nextNumber() ​

> nextNumber(prefix, year): Promise<string>

Defined in: subscriptions/src/invoice.ts:122

Atomically allocate the next human-readable invoice number.

Parameters ​

prefix ​

string

year ​

number

Returns ​

Promise<string>

Implementation of ​

InvoiceStore.nextNumber


save() ​

> save(invoice): Promise<void>

Defined in: subscriptions/src/invoice.ts:109

Parameters ​

invoice ​

Invoice

Returns ​

Promise<void>

Implementation of ​

InvoiceStore.save

Released under the MIT License.