Plentymarkets interface documentation

Tag

Contracts

TagAvailabilityRepositoryContract

The TagAvailabilityRepositoryContract is the interface for the tag availability repository. This interface allows to update and create tag availabilities.

Namespace

Plenty\Modules\Tag\Contracts

Methods
public update($data, $tagId, $availabilityType):Plenty\Modules\Tag\Models\TagAvailability
Return type: TagAvailability
Parameters

Name

Type

Description

$data

array

The availability data. The properties that are required to update an tag can be found in the TagAvailability model.

$tagId

int

The ID of the tag

$availabilityType

string

The type of the availability. The following types are available. <ul> <li>blog</li> <li>category</li> <li>content_page</li> <li>variation</li> <li>ticket</li> </ul>

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

Name

Type

Description

$data

array

The availability data. The properties that are required to update an tag can be found in the TagAvailability model.

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.

TagNameRepositoryContract

The TagNameRepositoryContract is the interface for the tag name repository. This interface allows to update, create and list tag names.

Namespace

Plenty\Modules\Tag\Contracts

Methods
public update($data, $tagId, $lang):Plenty\Modules\Tag\Models\TagName
Return type: TagName
Parameters

Name

Type

Description

$data

array

The name data. The properties that are required to update an name can be found in the TagName model.

$tagId

int

The ID of the tag

$lang

string

The language of the name

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

Name

Type

Description

$data

array

The name data. The properties that are required to update an name can be found in the TagName model.

public findByName($name, $lang):array
Parameters

Name

Type

Description

$name

string

The name of the tag

$lang

string

The language of the name

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.

TagRelationshipRepositoryContract

The TagRelationshipRepositoryContract is the interface for the tag relationship repository. This interface allows to update, create, delete and list tag relationships.

Namespace

Plenty\Modules\Tag\Contracts

Methods
public update($data, $tagId, $availabilityType, $relationshipValue):Plenty\Modules\Tag\Models\TagRelationship
Return type: TagRelationship
Parameters

Name

Type

Description

$data

array

The relationship data. The properties that are required to update a relationship can be found in the TagRelationship model.

$tagId

int

The ID of the tag

$availabilityType

string

The type of the availability. The following types are available: <ul> <li>category</li> <li>variation</li> <li>ticket</li> </ul>

$relationshipValue

int

The value of the relationship. This value is the ID of the data set the tag is linked to, e.g. item ID 1234.

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

Name

Type

Description

$data

array

The relationship data. The properties that are required to update a relationship can be found in the TagRelationship model.

public deleteRelation($relationshipValue, $tagId):void
Parameters

Name

Type

Description

$relationshipValue

int

The value of the relationship. This value is the ID of the data set the tag is linked to, e.g. item ID 1234.

$tagId

int

The ID of the tag

public deleteOneRelation($relationshipValue, $relationshipType, $tagId):void
Parameters

Name

Type

Description

$relationshipValue

int

The value of the relationship. This value is the ID of the data set the tag is linked to, e.g. item ID 1234.

$relationshipType

string

The type of the relationship, i.e. <b>category</b>, <b>item</b> or <b>ticket</b>

$tagId

int

The ID of the tag

public deleteOneRelationByUUID($relationshipUUID, $relationshipType, $tagId):int

Delete a tag relationship by the uuid5 value.

Parameters

Name

Type

Description

$relationshipUUID

string

The uuid5 value of the relationship.

$relationshipType

string

The type of the relationship, i.e. <b>board</b>

$tagId

int

The ID of the tag

public findByValueId($valueId):array
Parameters

Name

Type

Description

$valueId

int

The value of the relationship. This value is the ID of the data set the tag is linked to, e.g. item ID 1234.

public findByTagId($tagId):array
Parameters

Name

Type

Description

$tagId

int

The ID of the tag

public findRelationship($tagId, $relationshipValue, $relationshipType):Plenty\Modules\Tag\Models\TagRelationship
Return type: TagRelationship

Gets a specific tag relationship or returns null.

Parameters

Name

Type

Description

$tagId

int

The ID of the tag

$relationshipValue

int

The value of the relationship

$relationshipType

string

The type of the relationship

public delete($relationshipValue, $relationshipType):Plenty\Repositories\Models\DeleteResponse
Return type: DeleteResponse

Deletes tag links by reference value and relationship type.

Parameters

Name

Type

Description

$relationshipValue

int

The value of the relationship

$relationshipType

string

The type of the relationship

public deleteByUUID($relationshipValue, $relationshipType):Plenty\Repositories\Models\DeleteResponse
Return type: DeleteResponse

Deletes tag links by uuid5 reference value and relationship type.

Parameters

Name

Type

Description

$relationshipValue

string

The value of the relationship

$relationshipType

string

The type of the relationship

public deleteBulk($data):Illuminate\Support\Collection
Return type: Collection

Deletes a list of tag relationships. The tag ID, tag type and relation value must be specified.

Parameters

Name

Type

Description

$data

array

The array containing the data.

public listRelationships($with = []):Illuminate\Support\Collection
Return type: Collection

Returns all tag relationships.

Parameters

Name

Type

Description

$with

array

An array with child instances to be loaded

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.

TagRepositoryContract

The TagRepositoryContract is the interface for the tag repository. This interface allows to create, update and delete tags.

Namespace

Plenty\Modules\Tag\Contracts

Methods
public create($name):Plenty\Modules\Tag\Models\Tag
Return type: Tag

Creates a new tag.

Parameters

Name

Type

Description

$name

string

The name of the tag

public update($data, $tagId):Plenty\Modules\Tag\Models\Tag
Return type: Tag

Updates a tag.

Parameters

Name

Type

Description

$data

array

The tag data. The properties that are required to update a tag can be found in the Tag model.

$tagId

int

The ID of the tag

public delete($tagId):void

Deletes a tag by the given tag ID.

Parameters

Name

Type

Description

$tagId

int

The ID of the tag

public getTagByName($name):Plenty\Modules\Tag\Models\Tag
Return type: Tag
Parameters

Name

Type

Description

$name

string

The name of the tag

public getTagsByIds($ids):array
Parameters

Name

Type

Description

$ids

array

The IDs of the tags

public getTagById($id, $with = []):Plenty\Modules\Tag\Models\Tag
Return type: Tag
Parameters

Name

Type

Description

$id

int

The ID of the tag

$with

array

An array with child instances to be loaded

public getTagsByAvailability($availabilityType):array
Parameters

Name

Type

Description

$availabilityType

string

The type of the availability. The following types are available. <ul> <li>blog</li> <li>category</li> <li>content_page</li> <li>variation</li> <li>ticket</li> <li>board</li> </ul>

public getTagsByRelationship($relationshipType, $value, $isUUID = false):array
Parameters

Name

Type

Description

$relationshipType

string

The relationship type

$value

The relationship value (string if UUID, otherwise int)

$isUUID

bool

Indicates whether the value is a UUID5 or not.

public listTags($with = []):Illuminate\Support\Collection
Return type: Collection

Returns all tags.

Parameters

Name

Type

Description

$with

array

An array with child instances to be loaded

public createTag($data):Plenty\Modules\Tag\Models\Tag
Return type: Tag

Creates a new tag.

Parameters

Name

Type

Description

$data

array

The data as associative array

public createBulk($data):array

Creates up to 50 new tags.

Parameters

Name

Type

Description

$data

array

The data as associative array

public updateBulk($data):array

Updates up to 50 tags.

Parameters

Name

Type

Description

$data

array

The data as associative array

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

Tag

The Tag model (deprecated)

Namespace

Plenty\Modules\Tag\Models

Properties
Name Type Description

id

int

The tag ID

tagName

string

The name of the tag

color

string

The color for the tag

availabilities

array

The availabilities of the tag.

names

array

The names of the tag.

relationships

array

The relationships of the tag.

clients

array

The clients of the tag.

updatedAt

string

The updated at timestamp of the tag.

createdAt

string

The created at timestamp of the tag.

Methods
public toArray()

Returns this model as an array.

TagAvailability

The tag availability model (deprecated).

Namespace

Plenty\Modules\Tag\Models

Properties
Name Type Description

tagId

int

The Tag ID of the tag

tagType

string

The type of the tag. The following types are available. <ul> <li>blog</li> <li>category</li> <li>content_page</li> <li>variation</li> <li>ticket</li> <li>board</li> <li>order</li> </ul>

Methods
public toArray()

Returns this model as an array.

TagClient

The tag client model (deprecated).

Namespace

Plenty\Modules\Tag\Models

Properties
Name Type Description

id

int

The id of the relation

tagId

int

The Tag ID of the tag

plentyId

int

The PlentyId of the client

Methods
public toArray()

Returns this model as an array.

TagName

The tag name model (deprecated).

Namespace

Plenty\Modules\Tag\Models

Properties
Name Type Description

id

int

The name ID of the tag

tagId

int

The tag ID

tagLang

string

The lang of the tag name.

tagName

string

The name of the tag.

Methods
public toArray()

Returns this model as an array.

TagRelationship

The tag relationship model (deprecated).

Namespace

Plenty\Modules\Tag\Models

Properties
Name Type Description

tagId

int

The ID of the tag

tagType

string

The type of tag.

relationshipValue

int

The ID of the data record for which a tag relationship is created

relationshipUUID5

string

The ID of the data record for which a tag relationship is created. For models with uuid5 as primary key

Methods
public toArray()

Returns this model as an array.

V2

Contracts

TagNameRepositoryContract

The interface for the V2 TagNameRepository.

Namespace

Plenty\Modules\Tag\V2\Contracts

Methods
public delete($id):bool

Deletes a tag name. The ID of the tag name must be specified.

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.

TagRelationshipRepositoryContract

The interface for the V2 TagRelationshipRepository.

Namespace

Plenty\Modules\Tag\V2\Contracts

Methods

Gets a list of tag relationships. Filter can be specified.

Parameters

Name

Type

Description

$with

array

$perPage

int

$page

int

$sorting

array

public count():int

Count the tag relationships

public create($data):Plenty\Modules\Tag\V2\Models\TagRelationship
Return type: TagRelationship

Creates a new tag relationship.

Parameters

Name

Type

Description

$data

array

public delete($id):bool

Deletes a tag relationship. The ID of the relationship must be specified.

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.

TagRepositoryContract

The interface for the V2 TagRepository.

Namespace

Plenty\Modules\Tag\V2\Contracts

Methods

Gets a list of tags. Filter can be specified.

Parameters

Name

Type

Description

$with

array

$perPage

int

$page

int

$sorting

array

$lang

string

public count():int

Count the tags.

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

Creates a tag.

Parameters

Name

Type

Description

$data

array

public update($data, $tagId):Plenty\Modules\Tag\V2\Models\Tag
Return type: Tag

Updates a tag. The ID of the tag must be specified.

Parameters

Name

Type

Description

$data

array

$tagId

int

public delete($tagId):bool

Deletes a tag. The ID of the tag must specified.

Parameters

Name

Type

Description

$tagId

int

public getById($tagId, $with = []):Plenty\Modules\Tag\V2\Models\Tag
Return type: Tag

Gets a tag. The ID of the tag must be specified.

Parameters

Name

Type

Description

$tagId

int

$with

array

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

Tag

The V2 tag model.

Namespace

Plenty\Modules\Tag\V2\Models

Properties
Name Type Description

id

int

The ID of the tag

name

string

The backend name of the tag

color

string

The color for the tag

createdAt

The time the tag was created

updatedAt

The time the tag was last updated

names

TagName

The names of the tag

clients

TagClient

The clients of the tag

availabilities

TagAvailability

The availabilities of the tag

Methods
public toArray()

Returns this model as an array.

TagAvailability

The V2 tag availability model.

Namespace

Plenty\Modules\Tag\V2\Models

Properties
Name Type Description

tagId

int

The ID of the tag

type

string

The type of the availability

createdAt

The time the tag availability was created

tag

Tag

The related tag

Methods
public toArray()

Returns this model as an array.

TagClient

The V2 tag client model.

Namespace

Plenty\Modules\Tag\V2\Models

Properties
Name Type Description

id

int

The unique ID of the tag client

tagId

int

The unique ID of the tag

plentyId

int

The unique ID of the plenty store

createdAt

The time the tag client was created

updatedAt

The time the tag client was last updated

tag

Tag

The related tag

Methods
public toArray()

Returns this model as an array.

TagName

The V2 tag name model.

Namespace

Plenty\Modules\Tag\V2\Models

Properties
Name Type Description

id

int

The unique ID of the tag name

tagId

int

The unique ID of the tag

name

string

The name of the tag name

lang

string

The language of the tag name

createdAt

The time the tag was created

updatedAt

The time the tag was last updated

tag

Tag

The related tag

Methods
public toArray()

Returns this model as an array.

TagRelationship

The V2 tag relationship model.

Namespace

Plenty\Modules\Tag\V2\Models

Properties
Name Type Description

tagId

int

The ID of the tag

type

string

The type of the relationship

value

string

The value of the relationship

UUID5

string

The UUID5 of the relationship

createdAt

The time the relationship was created

updatedAt

The time the relationship was last updated

tag

Tag

The related tag

Methods
public toArray()

Returns this model as an array.