@pwngh/economy-lab
    Preparing search index...

    Interface SaleStore

    Stores the summary of each completed sale, keyed by order id (a separate key from the idempotency key).

    interface SaleStore {
        get(orderId: string, options?: CallOptions): Promise<Sale | null>;
        put(sale: Sale, options?: CallOptions): Promise<void>;
    }
    Index
    • Upserts by sale.orderId. Called inside the charge's transaction, so a rolled-back sale leaves no row.

      Parameters

      Returns Promise<void>