import { DaffMagentoCartItemService } from '@daffodil/cart/driver/magento'
A service for making Magento GraphQL queries for carts.
@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>>
}
Observable<DaffCartItem[]>
List all of the available items of a cart
Parameter | cartId: string |
---|---|
Description |
Observable<DaffCartItem>
Get a specific cart item of a cart.
Parameter | cartId: string |
---|---|
Description |
Parameter | itemId: string |
---|---|
Description |
Observable<Partial<DaffCart>>
Add something to a cart.
Parameter | cartId: string |
---|---|
Description |
Parameter | cartItemInput: DaffCartItemInput |
---|---|
Description |
Observable<Partial<DaffCart>>
Update an existing item in a cart
Parameter | cartId: string |
---|---|
Description |
Parameter | itemId: string |
---|---|
Description |
Parameter | changes: Partial<DaffCartItem> |
---|---|
Description |
Observable<Partial<DaffCart>>
Remove an item from a cart.
Parameter | cartId: string |
---|---|
Description |
Parameter | itemId: string |
---|---|
Description |