SharedShoppingCartRepositoryInterface

Extends

Interface SharedShoppingCartRepositoryInterface

category

System

package

SharedShoppingCart

subpackage

Interfaces

Methods

Deletes all shared shopping carts by a given customer ID.

deleteShoppingCartsByCustomerId(\IdType $customerId) 

Arguments

$customerId

\IdType

Deletes all shared shopping carts that are expired

deleteShoppingCartsOlderThan(\DateTime $expirationDate) 

Arguments

$expirationDate

\DateTime

All shared shopping carts older than that date are expired

Gets the content in JSON format of the shopping cart corresponding to the hash

getShoppingCart(\StringType $shoppingCartHash) : string

Arguments

$shoppingCartHash

\StringType

Hash of the shopping cart

Response

string

JSON representation of the shopping cart

Gets a collection of all shared shopping carts by a given customer ID.

getShoppingCartsByCustomerId(\IdType $customerId) : \SharedShoppingCartCollection

Arguments

$customerId

\IdType

Response

\SharedShoppingCartCollection

Stores the cart and returns the hash

storeShoppingCart(\StringType $jsonShoppingCart, \IdType|null $userId) : string
Throws
\InvalidArgumentException

Arguments

$jsonShoppingCart

\StringType

JSON representation of the cart

$userId

\IdType|null

The user ID of the user who is sharing the cart

Response

string

The hash of the cart