GitHub

DaffCartShippingInformationServiceInterface

import { DaffCartShippingInformationServiceInterface } from '@daffodil/cart/driver'

The interface responsible for mediating the interaction of the shipping information of a cart with a given platform.

interface DaffCartShippingInformationServiceInterface<T extends DaffCart = DaffCart> {
  get(cartId: T["id"]): Observable<T['shipping_information']>
  update(
    cartId: T["id"]
    shippingInfo: Partial<T["shipping_information"]>
  ): Observable<Partial<T>>
  delete(
    cartId: T["id"]
    id?: T["shipping_information"]["id"]
  ): Observable<Partial<T>>
}

() Methods

get
Observable<T['shipping_information']>

Get the currently selected shipping method of a cart.

Parameters
ParametercartId: T["id"]
Description
update
Observable<Partial<T>>

Update the currently selected shipping method of a cart.

Parameters
ParametercartId: T["id"]
Description
ParametershippingInfo: Partial
Description
delete
Observable<Partial<T>>

Remove the currently selected shipping method from a cart.

Parameters
ParametercartId: T["id"]
Description
Parameterid: T["shipping_information"]["id"]
Description