GitHub

DaffCartShippingInformationServiceInterface

Type

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"]): any
  update(
    cartId: T["id"]
    shippingInfo: Partial<T["shipping_information"]>
  ): any
  delete(
    cartId: T["id"]
    id?: T["shipping_information"]["id"]
  ): any
}

() Methods

get
any

Get the currently selected shipping method of a cart.

Parameters
ParametercartId: T["id"]
Description
update
any

Update the currently selected shipping method of a cart.

Parameters
ParametercartId: T["id"]
Description
ParametershippingInfo: Partial
Description
delete
any

Remove the currently selected shipping method from a cart.

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