GitHub

DaffCartStoreCreditInMemoryDriver

The cart store credit in-memory driver to mock the cart store credit backend service.

import { DaffCartStoreCreditInMemoryDriver } from '@daffodil/cart-store-credit/driver/in-memory'
@Injectable()
class DaffCartStoreCreditInMemoryDriver extends DaffInMemoryDriverBase implements DaffCartStoreCreditDriverInterface {
  apply(cartId: string): Observable<DaffCartWithStoreCredit>
  remove(cartId: string): Observable<DaffCartWithStoreCredit>
}

Properties

Name Type Description
apply Observable<DaffCartWithStoreCredit>

Apply store credit to the cart.

remove Observable<DaffCartWithStoreCredit>

Remove store credit from the cart.