Skip to main content

InMemoryPurchaseStore

@totemsdk/edge


@totemsdk/edge / InMemoryPurchaseStore

Class: InMemoryPurchaseStore

In-memory purchase store. No crash guarantees — dev/test only.

Implements​

Constructors​

Constructor​

new InMemoryPurchaseStore(): InMemoryPurchaseStore

Returns​

InMemoryPurchaseStore

Methods​

compareAndSet()​

compareAndSet(purchaseId, expectedRevision, next): Promise<boolean>

Parameters​

purchaseId​

string

expectedRevision​

number

next​

PurchaseRecord

Returns​

Promise<boolean>

Implementation of​

PurchaseStore.compareAndSet


create()​

create(record): Promise<void>

Parameters​

record​

PurchaseRecord

Returns​

Promise<void>

Implementation of​

PurchaseStore.create


get()​

get(purchaseId): Promise<PurchaseRecord | undefined>

Parameters​

purchaseId​

string

Returns​

Promise<PurchaseRecord | undefined>

Implementation of​

PurchaseStore.get


listRecoverable()​

listRecoverable(): Promise<PurchaseRecord[]>

Returns​

Promise<PurchaseRecord[]>

Implementation of​

PurchaseStore.listRecoverable