GitHub

DaffTestingCartCouponService

import { DaffTestingCartCouponService } from '@daffodil/cart/driver/testing'
@Injectable()
class DaffTestingCartCouponService implements DaffCartCouponServiceInterface {
  list(cartId: string): Observable<DaffCartCoupon[]>
  apply(
    cartId: string
    coupon: DaffCartCoupon
  ): Observable<Partial<DaffCart>>
  remove(
    cartId: string
    coupon: DaffCartCoupon
  ): Observable<Partial<DaffCart>>
  removeAll(cartId: string): Observable<Partial<DaffCart>>
}

Properties

Name Type Description
list Observable<DaffCartCoupon[]>

List coupon codes applied to a cart.

apply Observable<Partial<DaffCart>>

Apply a coupon to the cart and return a partial of the cart.

remove Observable<Partial<DaffCart>>

Remove a coupon from the cart and return a partial of the cart.

removeAll Observable<Partial<DaffCart>>

Remove all coupons from the cart and return a partial of the cart.