import { DaffInMemoryCartItemService } from '@daffodil/cart/driver/in-memory'
@Injectable()
class DaffInMemoryCartItemService extends DaffInMemoryDriverBase implements DaffCartItemServiceInterface {
list(cartId: string): Observable<DaffCartItem[]>
get(
cartId: string
itemId: string
): Observable<DaffCartItem>
add(
cartId: string
input: DaffCartItemInput
): Observable<Partial<DaffCart>>
update(
cartId: string
itemId: string
item: 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 |
ObservableDaffCart>> Add something to a cart.
| Parameter | cartId: string |
|---|---|
| Description |
| Parameter | input: DaffCartItemInput |
|---|---|
| Description |
ObservableDaffCart>> Update an existing item in a cart
| Parameter | cartId: string |
|---|---|
| Description |
| Parameter | itemId: string |
|---|---|
| Description |
| Parameter | item: Partial<DaffCartItem> |
|---|---|
| Description |
ObservableDaffCart>> Remove an item from a cart.
| Parameter | cartId: string |
|---|---|
| Description |
| Parameter | itemId: string |
|---|---|
| Description |