GitHub

DaffCartPaymentServiceInterface

The interface responsible for managing the selected payment method of a cart.

import { DaffCartPaymentServiceInterface } from '@daffodil/cart/driver'
interface DaffCartPaymentServiceInterface<T extends DaffCart = DaffCart> {
  get: Observable<T['payment']>
  update: Observable<Partial<T>>
  remove: Observable<void>
}

Properties

Name Type Description
get Observable<T['payment']>

Get the currently applied payment method of a cart.

update Observable<Partial<T>>

Update the payment method applied to a cart.

If a billing address is provided, the driver will update that simultaneously.

remove Observable<void>

Remove the payment method applied to a cart.