Plentymarkets interface documentation

ItemSet

Contracts

ItemSetComponentRepositoryContract

The contract for the item set component repository

Namespace

Plenty\Modules\ItemSet\Contracts

Methods
public show($id, $with):Plenty\Modules\ItemSet\Models\ItemSetComponent
Return type: ItemSetComponent

Gets an item set component. The ID of the item set component must be specified.

Parameters

Name

Type

Description

$id

int

The unique ID of the item set component

$with

array

public get($setId, $id):Plenty\Modules\ItemSet\Models\ItemSetComponent
Return type: ItemSetComponent

Gets an item set component. The item ID of the item set and the component ID must be specified.

Parameters

Name

Type

Description

$setId

int

The unique item ID of the item set

$id

int

The unique ID of the item set component

public create($setConfigId, $data):Plenty\Modules\ItemSet\Models\ItemSetComponent
Return type: ItemSetComponent

Creates an item set component.

Parameters

Name

Type

Description

$setConfigId

int

The unique ID of the item set configuration

$data

array

public createComponents($setId, $data):Plenty\Modules\ItemSet\Models\ItemSetComponent
Return type: ItemSetComponent

Creates a link between an item and a set item and adds the item as a set component.

Parameters

Name

Type

Description

$setId

int

The unique item ID of the item set

$data

array

public updateComponents($setId, $data):Plenty\Modules\ItemSet\Models\ItemSetComponent
Return type: ItemSetComponent

Updates the item set components of a set item.

Parameters

Name

Type

Description

$setId

int

The unique item ID of the item set

$data

array

public update($setId, $id, $data):Plenty\Modules\ItemSet\Models\ItemSetComponent
Return type: ItemSetComponent

Updates an item set component. The item ID of the set and the ID of the set component must be specified.

Parameters

Name

Type

Description

$setId

int

The unique item ID of the item set

$id

int

The unique ID of the item set component

$data

array

public deleteComponents($setId, $data):Plenty\Repositories\Models\DeleteResponse
Return type: DeleteResponse

Removes all item set components from an item set.

Parameters

Name

Type

Description

$setId

int

The unique item ID of the item set

$data

array

public delete($setId, $id):Plenty\Repositories\Models\DeleteResponse
Return type: DeleteResponse

Deletes the link between an item set component and an item set. The item ID of the set and the ID of the set component must be specified.

Parameters

Name

Type

Description

$setId

int

The unique item ID of the item set

$id

int

The unique ID of the item set component

public all():array

Lists all item set components.

public findBySetId($setId, $with):array

Lists the item set components of a set. The item ID of the item set must be specified.

Parameters

Name

Type

Description

$setId

int

The unique item ID of the item set

$with

array

public findByItemId($itemId):array

Lists the item set components of a set. The item ID of the item set component must be specified.

Parameters

Name

Type

Description

$itemId

int

The unique item ID of the item set component

public deleteOne($setConfigId, $itemId):Plenty\Repositories\Models\DeleteResponse
Return type: DeleteResponse

Delete an item set component. The item ID of the item set component and the set config ID must be specified.

Parameters

Name

Type

Description

$setConfigId

int

$itemId

int

ItemSetConfigRepositoryContract

The contract for the item set configuration repository

Namespace

Plenty\Modules\ItemSet\Contracts

Methods
public show($id):Plenty\Modules\ItemSet\Models\ItemSetConfig
Return type: ItemSetConfig

Gets an item set. The ID of the item set configuration must be specified.

Parameters

Name

Type

Description

$id

int

The unique ID of the item set configuration

public create($data):Plenty\Modules\ItemSet\Models\ItemSetConfig
Return type: ItemSetConfig

Creates an item set configuration.

Parameters

Name

Type

Description

$data

array

public update($id, $data):Plenty\Modules\ItemSet\Models\ItemSetConfig
Return type: ItemSetConfig

Updates an item set configuration. The ID of the item set configuration must be specified.

Parameters

Name

Type

Description

$id

int

$data

array

public delete($id):Plenty\Repositories\Models\DeleteResponse
Return type: DeleteResponse

Deletes an item set configuration. The ID of the item set configuration must be specified.

Parameters

Name

Type

Description

$id

int

The unique ID of the item set configuration

public get($setId, $setConfigId):Plenty\Modules\ItemSet\Models\ItemSetConfig
Return type: ItemSetConfig

Gets the item set configuration of an item set.

Parameters

Name

Type

Description

$setId

int

The unique item ID of the item set

$setConfigId

int

The unique ID of the item set configuration

public findBySetId($setId):Plenty\Modules\ItemSet\Models\ItemSetConfig
Return type: ItemSetConfig

Gets the item set configuration of an item set. The item ID of the set item must be specified.

Parameters

Name

Type

Description

$setId

int

The unique item ID of the item set

public calculateSetPrice($setId):void

Trigger a sales price calculation for an item set

Parameters

Name

Type

Description

$setId

int

ItemSetRepositoryContract

The contract for the item set repository

Namespace

Plenty\Modules\ItemSet\Contracts

Methods
public show($id):Plenty\Modules\ItemSet\Models\ItemSet
Return type: ItemSet

Gets an item set. The item ID of the set must be specified.

Parameters

Name

Type

Description

$id

int

The unique item ID of the set

public create($data):Plenty\Modules\ItemSet\Models\ItemSet
Return type: ItemSet

Creates an item set.

Parameters

Name

Type

Description

$data

array

public createSets($data):Plenty\Modules\ItemSet\Models\ItemSet
Return type: ItemSet

Creates item sets.

Parameters

Name

Type

Description

$data

array

public updateSets($data):array

Updates item sets.

Parameters

Name

Type

Description

$data

array

public update($id, $data):Plenty\Modules\ItemSet\Models\ItemSet
Return type: ItemSet

Updates an item set. The item ID of the set must be specified.

Parameters

Name

Type

Description

$id

int

The unique item ID of the set.

$data

array

public deleteSets($data):Plenty\Repositories\Models\DeleteResponse
Return type: DeleteResponse

Deletes item sets.

Parameters

Name

Type

Description

$data

array

public delete($id):Plenty\Repositories\Models\DeleteResponse
Return type: DeleteResponse

Deletes an item set configuration. The ID must be specified.

Parameters

Name

Type

Description

$id

int

public all():array

Lists all item set configurations.

Models

ItemSet

The ItemSet model.

Namespace

Plenty\Modules\ItemSet\Models

Properties
Name Type Description

id

int

The item ID of the item set. The ID must be unique.

name

string

The name of the item set. The default language of the system is used.

categories

array

The array with categories of the item set. The category ID key "categoryId" must be specified. Example for JSON Object: "categories":[{"categoryId":"34"},{"categoryId":"35"}]}]

Methods
public toArray()

Returns this model as an array.

ItemSetComponent

The ItemSetComponent model.

Namespace

Plenty\Modules\ItemSet\Models

Properties
Name Type Description

id

int

The item set component ID. The ID must be unique.

setId

int

The item ID of the item set. The ID must be unique.

itemId

int

The item ID of the set component

minimalOrderQuantity

float

Minimum order quantity.

maximumOrderQuantity

float

Maximum order quantity.

orderQuantityPossible

bool

Order quantities possible.

Methods
public toArray()

Returns this model as an array.

ItemSetConfig

The ItemSetConfig model.

Namespace

Plenty\Modules\ItemSet\Models

Properties
Name Type Description

setId

int

set id The item ID of the item set. The ID must be unique.

rebate

float

The discount in percent to be subtracted from the sum of the prices of the selected set components.

Methods
public toArray()

Returns this model as an array.