Plentymarkets interface documentation

Facet

Contracts

FacetNameRepositoryContract

The contract for the facet name repository

Namespace

Plenty\Modules\Facet\Facet\Contracts

Methods
public findOne($facetId, $lang):Plenty\Modules\Facet\Facet\Models\FacetName
Return type: FacetName
Parameters

Name

Type

Description

$facetId

int

$lang

string

public create($data):Plenty\Modules\Facet\Facet\Models\FacetName
Return type: FacetName
Parameters

Name

Type

Description

$data

array

public update($facetId, $lang, $data):Plenty\Modules\Facet\Facet\Models\FacetName
Return type: FacetName
Parameters

Name

Type

Description

$facetId

int

$lang

string

$data

array

public delete($facetId, $lang):Plenty\Repositories\Models\DeleteResponse
Return type: DeleteResponse
Parameters

Name

Type

Description

$facetId

int

$lang

string

FacetRepositoryContract

The contract for the facet repository

Namespace

Plenty\Modules\Facet\Facet\Contracts

Methods
Return type: Collection
Parameters

Name

Type

Description

$with

array

$filters

array

public listByPlentyId($plentyId, $lang = "de"):array
Parameters

Name

Type

Description

$plentyId

int

$lang

string

public findOne($id):Plenty\Modules\Facet\Facet\Models\Facet
Return type: Facet
Parameters

Name

Type

Description

$id

int

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

Name

Type

Description

$data

array

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

Name

Type

Description

$id

int

$data

array

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

Name

Type

Description

$id

int

public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

FacetValueNameRepositoryContract

The contract for the facet value name repository

Namespace

Plenty\Modules\Facet\Facet\Contracts

Methods
public findOne($valueId, $lang):Plenty\Modules\Facet\Facet\Models\FacetValueName
Return type: FacetValueName
Parameters

Name

Type

Description

$valueId

int

$lang

string

public create($data):Plenty\Modules\Facet\Facet\Models\FacetValueName
Return type: FacetValueName
Parameters

Name

Type

Description

$data

array

public update($valueId, $lang, $data):Plenty\Modules\Facet\Facet\Models\FacetValueName
Return type: FacetValueName
Parameters

Name

Type

Description

$valueId

int

$lang

string

$data

array

public delete($valueId, $lang):Plenty\Repositories\Models\DeleteResponse
Return type: DeleteResponse
Parameters

Name

Type

Description

$valueId

int

$lang

string

FacetValueReferenceRepositoryContract

The contract for the facet value reference repository

Namespace

Plenty\Modules\Facet\Facet\Contracts

Methods
Return type: Collection
Parameters

Name

Type

Description

$filters

array

public create($data):Plenty\Modules\Facet\Facet\Models\FacetValueReference
Return type: FacetValueReference
Parameters

Name

Type

Description

$data

array

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

Name

Type

Description

$id

int

public findOne($id):Plenty\Modules\Facet\Facet\Models\FacetValueReference
Return type: FacetValueReference
Parameters

Name

Type

Description

$id

int

public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

FacetValueRepositoryContract

The contract for the facet value repository

Namespace

Plenty\Modules\Facet\Facet\Contracts

Methods
Return type: Collection
Parameters

Name

Type

Description

$with

array

$filters

array

public create($data):Plenty\Modules\Facet\Facet\Models\FacetValue
Return type: FacetValue
Parameters

Name

Type

Description

$data

array

public update($id, $data):Plenty\Modules\Facet\Facet\Models\FacetValue
Return type: FacetValue
Parameters

Name

Type

Description

$id

int

$data

array

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

Name

Type

Description

$id

int

public findOne($id):Plenty\Modules\Facet\Facet\Models\FacetValue
Return type: FacetValue
Parameters

Name

Type

Description

$id

int

public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

Models

Facet

The facet model.

Namespace

Plenty\Modules\Facet\Facet\Models

Properties
Name Type Description

id

int

The unique ID of the facet

cssClass

string

position

int

The position of the facet. Default value is 1

sort

string

Allowed sorts are "position", "rate" and "a-z". Default value is "position"

createdAt

string

Timestamp of the date and time the facet was created.

updatedAt

string

Timestamp of the last date and time the facet was updated.

type

string

Allowed types: "dynamic", "producer", "availability", "price". Default value is "dynamic"

minResultCount

int

Default value is 1

maxResultCount

int

Default value is 50

filterMethod

string

Allowed filter methods: "restrict", "multi". Default value is "strict"

names

array

values

array

references

array

Methods
public toArray()

Returns this model as an array.

FacetName

The facet name model.

Namespace

Plenty\Modules\Facet\Facet\Models

Properties
Name Type Description

facetId

int

The unique ID of the facet

lang

string

The <a href="https://developers.plentymarkets.com/rest-doc/introduction#countries" target="_blank">language</a> of the facet

name

string

The name of the facet

facet

Facet

Methods
public toArray()

Returns this model as an array.

FacetValue

The facet value model.

Namespace

Plenty\Modules\Facet\Facet\Models

Properties
Name Type Description

id

int

The unique ID of the facet value

facetId

int

The unique ID of the facet

cssClass

string

The css class of the facet value

position

int

The position of the facet value

createdAt

string

Timestamp of the date and time the facet value was created.

updatedAt

string

Timestamp of the last date and time the facet value was updated.

facet

Facet

names

array

references

array

Methods
public toArray()

Returns this model as an array.

FacetValueName

The facet value name model.

Namespace

Plenty\Modules\Facet\Facet\Models

Properties
Name Type Description

valueId

int

The unique ID of the facet value

lang

string

The <a href="https://developers.plentymarkets.com/rest-doc/introduction#countries" target="_blank">language</a> of the facet value

name

string

The name of the facet value

value

FacetValue

Methods
public toArray()

Returns this model as an array.

FacetValueReference

The facet value reference model.

Namespace

Plenty\Modules\Facet\Facet\Models

Properties
Name Type Description

id

int

The unique ID of the facet value reference

facetId

int

The unique ID of the facet

facetValueId

int

The unique ID of the facet value

type

string

Allowed types are "attribute", "character", "producer" and "availability". Default value is "attribute"

groupId

int

The group ID of the facet value reference. Default value is 0

valueId

int

The value ID of the facet value reference. Default value is 0

createdAt

string

Timestamp of the date and time the facet was created.

facet

Facet

value

FacetValue

Methods
public toArray()

Returns this model as an array.