GitHub

DaffMagentoCartItemService

A service for making Magento GraphQL queries for carts.

import { DaffMagentoCartItemService } from '@daffodil/cart/driver/magento'
@Injectable()
class DaffMagentoCartItemService implements DaffCartItemServiceInterface {
  list(cartId: string): Observable<DaffCartItem[]>
  get(
    cartId: string
    itemId: string
  ): Observable<DaffCartItem>
  add(
    cartId: string
    cartItemInput: DaffCartItemInput
  ): Observable<Partial<DaffCart>>
  update(
    cartId: string
    itemId: string
    changes: Partial<DaffCartItem>
  ): Observable<Partial<DaffCart>>
  delete(
    cartId: string
    itemId: string
  ): Observable<Partial<DaffCart>>
}

Properties

Name Type Description
list Observable<DaffCartItem[]>

List all of the available items of a cart

get Observable<DaffCartItem>

Get a specific cart item of a cart.

add Observable<Partial<DaffCart>>

Add something to a cart.

update Observable<Partial<DaffCart>>

Update an existing item in a cart

delete Observable<Partial<DaffCart>>

Remove an item from a cart.