Copied!

ShoppingListServiceInterface

ShoppingListServiceInterface.php : 22
Interface

Methods

publicaddEntries()

ShoppingListServiceInterface.php : 70
public addEntries(ShoppingListInterface $shoppingList, array<string|int, EntryAddStruct$entryAddStructs) : ShoppingListInterface

Parameters

Name Type Default value Description
$shoppingList ShoppingListInterface - -
$entryAddStructs array<string|int, EntryAddStruct> - -

Return values

ShoppingListInterface

Tags
Throws
InvalidArgumentException
Throws
UnauthorizedException

publicclearShoppingList()

ShoppingListServiceInterface.php : 62
public clearShoppingList(ShoppingListInterface $shoppingList) : ShoppingListInterface

Parameters

Name Type Default value Description
$shoppingList ShoppingListInterface - -

Return values

ShoppingListInterface

Tags
Throws
UnauthorizedException

publiccreateShoppingList()

ShoppingListServiceInterface.php : 42
public createShoppingList(ShoppingListCreateStruct $createStruct) : ShoppingListInterface

Parameters

Name Type Default value Description
$createStruct ShoppingListCreateStruct - -

Return values

ShoppingListInterface

Tags
Throws
UnauthorizedException
Throws
InvalidArgumentException

publicdeleteShoppingList()

ShoppingListServiceInterface.php : 57
public deleteShoppingList(ShoppingListInterface $shoppingList) : void

Parameters

Name Type Default value Description
$shoppingList ShoppingListInterface - -
Tags
Throws
UnauthorizedException
Throws
InvalidArgumentException

if trying to delete the default shopping list

publicfindShoppingLists()

ShoppingListServiceInterface.php : 36
public findShoppingLists([ShoppingListQuery|null $query = null ]) : ShoppingListCollectionInterface

Parameters

Name Type Default value Description
$query ShoppingListQuery|null null -

Return values

ShoppingListCollectionInterface

publicgetEntry()

ShoppingListServiceInterface.php : 34
public getEntry(string $identifier) : ShoppingListEntryInterface

Parameters

Name Type Default value Description
$identifier string - -

Return values

ShoppingListEntryInterface

Tags
Throws
UnauthorizedException
Throws
NotFoundException

publicgetOrCreateDefaultShoppingList()

ShoppingListServiceInterface.php : 106

Returns the default shopping list for the current user.

public getOrCreateDefaultShoppingList() : ShoppingListInterface

If no default list exists, it will be created automatically.

Return values

ShoppingListInterface

Tags
Throws
UnauthorizedException

publicgetShoppingList()

ShoppingListServiceInterface.php : 28
public getShoppingList(string $identifier) : ShoppingListInterface

Parameters

Name Type Default value Description
$identifier string - -

Return values

ShoppingListInterface

Tags
Throws
UnauthorizedException
Throws
NotFoundException

publicmoveEntries()

ShoppingListServiceInterface.php : 93
public moveEntries(ShoppingListInterface $targetShoppingList, array<string|int, ShoppingListEntryInterface$entries[, bool $copy = false ]) : void

Parameters

Name Type Default value Description
$targetShoppingList ShoppingListInterface - -
$entries array<string|int, ShoppingListEntryInterface> - -
$copy bool false

If true, copies entries without deleting from source. If false (default), moves entries (deletes from source).

Tags
Throws
InvalidArgumentException
Throws
UnauthorizedException

publicremoveEntries()

ShoppingListServiceInterface.php : 81
public removeEntries(ShoppingListInterface $shoppingList, array<string|int, ShoppingListEntryInterface$entries) : ShoppingListInterface

Parameters

Name Type Default value Description
$shoppingList ShoppingListInterface - -
$entries array<string|int, ShoppingListEntryInterface> - -

Return values

ShoppingListInterface

Tags
Throws
InvalidArgumentException
Throws
UnauthorizedException

publicupdateShoppingList()

ShoppingListServiceInterface.php : 48
public updateShoppingList(ShoppingListInterface $shoppingList, ShoppingListUpdateStruct $updateStruct) : ShoppingListInterface

Parameters

Name Type Default value Description
$shoppingList ShoppingListInterface - -
$updateStruct ShoppingListUpdateStruct - -

Return values

ShoppingListInterface

Tags
Throws
UnauthorizedException
Throws
InvalidArgumentException