Plentymarkets interface documentation

Ticket

Contracts

TicketMessageRepositoryContract

The TicketMessageRepositoryContract is the interface for the ticket message repository. This interface allows to get one particular ticket message, list all ticket messages and list public and internal ticket messages.

Namespace

Plenty\Modules\Ticket\Contracts

Methods
public get($ticketMessageId):Plenty\Modules\Ticket\Models\TicketMessage
Return type: TicketMessage

Gets the ticket message by the given ID.

Parameters

Name

Type

Description

$ticketMessageId

int

The ID of the ticket message

public list($ticketId):void

Lists all ticket messages of a ticket.

Parameters

Name

Type

Description

$ticketId

int

The ID of the ticket

public listInternal($ticketId):void

Lists all internal ticket messages of a ticket.

Parameters

Name

Type

Description

$ticketId

int

The ticket ID.

public listPublic($ticketId):void

Lists all public ticket messages of a ticket

Parameters

Name

Type

Description

$ticketId

int

The ID of the ticket

TicketRepositoryContract

The TicketRepositoryContract is the interface for the ticket repository. This interface allows to list tickets by filters.

Namespace

Plenty\Modules\Ticket\Contracts

Methods
public createTicket($data):Plenty\Modules\Ticket\Models\Ticket
Return type: Ticket

Creates a new ticket.

Parameters

Name

Type

Description

$data

array

The ticket data as associative array

public searchTickets($filter, $page = 1, $itemsPerPage = 50):array

List tickets by filter options.

Parameters

Name

Type

Description

$filter

array

The filter

$page

int

The page to get. The default page that will be returned is page 1.

$itemsPerPage

int

The number of tickets to be displayed per page. The default number of tickets per page is 50.

public deleteTicket($ticketId):void

Deletes a ticket by the ID.

Parameters

Name

Type

Description

$ticketId

int

The ID of the ticket

public createMessage($data, $ticketId):Plenty\Modules\Ticket\Models\TicketMessage
Return type: TicketMessage

Creates a message for a ticket.

Parameters

Name

Type

Description

$data

array

The message data as associative array

$ticketId

int

The ID of the ticket

public updateTicket($data, $ticketId):Plenty\Modules\Ticket\Models\Ticket
Return type: Ticket

Updates an existing ticket with given data.

Parameters

Name

Type

Description

$data

array

The updating data as associative array

$ticketId

int

The ID of the ticket

public findById($ticketId, $with = []):Plenty\Modules\Ticket\Models\Ticket
Return type: Ticket

Gets a ticket by the ID.

Parameters

Name

Type

Description

$ticketId

int

The ID of the ticket

$with

array

The relations to be loaded with the ticket. Possible values are 'order' and 'contact'.

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.

TicketRoleNameRepositoryContract

The TicketRoleNameRepositoryContract is the interface for the ticket role name repository. This interface allows to update, create and list ticket role names.

Namespace

Plenty\Modules\Ticket\Contracts

Methods
public update($data, $ticketRoleNameId):Plenty\Modules\Ticket\Models\TicketRoleName
Return type: TicketRoleName

Updates an existing ticket role name.

Parameters

Name

Type

Description

$data

array

The ticket role name data as associative array

$ticketRoleNameId

int

The ID of the ticket role name

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

Creates a ticket role name.

Parameters

Name

Type

Description

$data

array

The ticket role name data as associative array

public findByName($name, $lang):array

Lists the ticket roles by the name.

Parameters

Name

Type

Description

$name

string

The name of the ticket role

$lang

string

The language of the ticket role

public findByLang($lang):array

Lists the ticket roles by the language.

Parameters

Name

Type

Description

$lang

string

The language of the ticket role

TicketRoleRepositoryContract

The TicketRoleRepositoryContract is the interface for the ticket role repository. This interface allows to update and create ticket roles.

Namespace

Plenty\Modules\Ticket\Contracts

Methods
public update($data, $ticketRoleId):Plenty\Modules\Ticket\Models\TicketRole
Return type: TicketRole

Update an existing ticket role.

Parameters

Name

Type

Description

$data

array

The ticket role data as associative array

$ticketRoleId

int

The ID of the ticket role

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

Creates a ticket role.

Parameters

Name

Type

Description

$data

array

The ticket role data as associative array

TicketStatusNameRepositoryContract

The TicketStatusNameRepositoryContract is the interface for the ticket status names. This interface allows to update, create and list ticket status names.

Namespace

Plenty\Modules\Ticket\Contracts

Methods
public update($data, $ticketStatusNameId):Plenty\Modules\Ticket\Models\TicketStatusName
Return type: TicketStatusName

Updates the ticket status name by the given ID.

Parameters

Name

Type

Description

$data

array

The ticket status name data as associative array

$ticketStatusNameId

int

The ID of the ticket status name

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

Creates a ticket status name.

Parameters

Name

Type

Description

$data

array

The ticket status name data as associative array

public findByName($name, $lang):array

Gets the ticket status name.

Parameters

Name

Type

Description

$name

string

The name of the ticket status

$lang

string

The language of the ticket status name

public statusNameList($lang):array
Parameters

Name

Type

Description

$lang

string

The language of the ticket status name

public statusNameListWithTypeId($lang):array

Lists the ticket status names with type ID.

Parameters

Name

Type

Description

$lang

string

The language of the ticket status name

TicketStatusRepositoryContract

The TicketStatusRepositoryContract is the interface for the ticket status repository. This interface allows to update, create and list ticket statuses.

Namespace

Plenty\Modules\Ticket\Contracts

Methods
public update($data, $ticketStatusId):Plenty\Modules\Ticket\Models\TicketStatus
Return type: TicketStatus

Updates an existing ticket status.

Parameters

Name

Type

Description

$data

array

The ticket status data as associative array

$ticketStatusId

int

The ID of the ticket status

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

Creates a ticket status.

Parameters

Name

Type

Description

$data

array

The ticket status data as associative array

public findByTypeId($typeId):array

Lists the ticket statuses by the type ID.

Parameters

Name

Type

Description

$typeId

int

The ID of the type

TicketTypeNameRepositoryContract

The TicketTypeNameRepositoryContract is the interface for the ticket type name repository. This interface allows to update, create and list ticket type names.

Namespace

Plenty\Modules\Ticket\Contracts

Methods
public update($data, $ticketTypeNameId):Plenty\Modules\Ticket\Models\TicketTypeName
Return type: TicketTypeName

Updates an existing ticket type name.

Parameters

Name

Type

Description

$data

array

The ticket type name data as associative array

$ticketTypeNameId

int

The ID of the ticket type name

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

Creates a ticket type name.

Parameters

Name

Type

Description

$data

array

The ticket type name data as associative array

public findByName($name, $lang):array

Lists the ticket types by the name.

Parameters

Name

Type

Description

$name

string

The name of the ticket type

$lang

string

The language of the ticket type

public typeNameList($lang):array

Lists the ticket types by the language.

Parameters

Name

Type

Description

$lang

string

The language of the ticket type

TicketTypeRepositoryContract

The TicketTypeRepositoryContract is the interface for the ticket type repository. This interface allows to update and create ticket types.

Namespace

Plenty\Modules\Ticket\Contracts

Methods
public update($data, $ticketTypeId):Plenty\Modules\Ticket\Models\TicketType
Return type: TicketType

Updates the ticket type by the given ID.

Parameters

Name

Type

Description

$data

array

The ticket type data as associative array

$ticketTypeId

int

The ID of the ticket type

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

Creates a ticket type.

Parameters

Name

Type

Description

$data

array

The ticket type data as associative array

Models

Ticket

The ticket model.

Namespace

Plenty\Modules\Ticket\Models

Properties
Name Type Description

id

int

The ID of the ticket

typeId

int

The type ID of the ticket

priorityId

int

The priority ID of the ticket

parentTicketId

int

The ID of the parent ticket

statusId

int

The status ID of the ticket

confidential

array

The confidential value. Displays 1 if the ticket is confidential. Displays 0 if the ticket is not confidential.

contactId

int

The ID of the contact that is linked with the ticket

orderId

int

The ID of the order linked with the ticket

createdAt

string

The time the ticket was created as unix timestamp or carbon object

updatedAt

string

The time the ticket was last updated as unix timestamp or carbon object

contactLastUpdateAt

string

The time the contact was last updated

deadlineAt

string

The date of the ticket deadline

finishedAt

string

The date the ticket is solved and displays 100 percent in the progress bar

title

string

The title of the ticket

progress

int

The progress of the ticket in percent

plentyId

int

The ID of the client (store)

source

array

The source of the ticket. Possible values are 'frontend', 'backend', 'ebay' and 'email'.

documentsCount

int

The number of documents that are attached to the ticket

hasDocuments

int

Displays 1 if the ticket has one or more documents. Displays 0 if the ticket has no document.

childrenCount

int

The number of child tickets

resubmissionAt

string

The date the ticket should be resubmitted

parseData

string

The ParseData from the ticket

contact

Contact

The contact instance linked with the ticket

order

Order

The order instance linked with the ticket

owners

array

The owners of the ticket. It is a combination of the user ID and the role ID.

messages

array

The messages of the ticket

documents

array

The docuemts of the ticket

Methods
public toArray()

Returns this model as an array.

TicketDocument

The ticket document model.

Namespace

Plenty\Modules\Ticket\Models

Properties
Name Type Description

id

int

The ID of the ticket document

ticketId

int

TheID of the ticket

userId

int

The ID of the user

type

string

The type the document

name

string

The name (path) of the document storage location

internal

int

/TODO what is this for?

Methods
public toArray()

Returns this model as an array.

TicketFolder

The ticket type model.

Namespace

Plenty\Modules\Ticket\Models

Properties
Name Type Description

id

int

The ID of the folder

parent_id

int

The parent id

level

int

The level of the folder

name

string

The name of the folder

user_id

int

The user id of the folder

Methods
public toArray()

Returns this model as an array.

TicketMessage

The ticket message model.

Namespace

Plenty\Modules\Ticket\Models

Properties
Name Type Description

id

int

The ID of the message

ticketId

int

The ticket ID the message belongs to

userId

int

The user of the message

createdAt

string

The time the ticket message was created as unix timestamp or carbon object

text

string

The content of the message

type

array

The type of the message. Two types are available: <ul> <li>message (visible for the customer)</li> <li>comment (not visible for the customer)</li> </ul>

source

array

The origin of the message. The following sources are available by default and cannot be deleted. <ul> <li>backend</li> <li>frontend</li> <li>ebay</li> <li>email</li> </ul>

topicId

int

The ID of the topic the message is assigned to

ticket

Ticket

The corresponding ticket instance.

Methods
public toArray()

Returns this model as an array.

TicketMessageTopic

The ticket message topic model.

Namespace

Plenty\Modules\Ticket\Models

Properties
Name Type Description

id

int

The id of the message

position

int

The position of the topic

Methods
public toArray()

Returns this model as an array.

TicketMessageTopicName

The ticket message topic name model.

Namespace

Plenty\Modules\Ticket\Models

Properties
Name Type Description

id

int

The ID of the message

topicId

int

The ID of the topic

lang

string

The language of the topic

name

string

The name of the topic

Methods
public toArray()

Returns this model as an array.

TicketOwner

The ticket owner model.

Namespace

Plenty\Modules\Ticket\Models

Properties
Name Type Description

ticketId

int

The ID of the ticket

userId

int

The user ID of the owner

roleId

int

The role ID of the owner

Methods
public toArray()

Returns this model as an array.

TicketRole

The ticket role model.

Namespace

Plenty\Modules\Ticket\Models

Properties
Name Type Description

id

int

The ID of the role

position

int

The position of the role

names

array

Methods
public toArray()

Returns this model as an array.

TicketRoleName

The ticket role name model.

Namespace

Plenty\Modules\Ticket\Models

Properties
Name Type Description

id

int

The ID of the role name

roleId

int

The ID of the role

lang

int

The language of the role

name

string

The name of the role

Methods
public toArray()

Returns this model as an array.

TicketStatus

The ticket status model.

Namespace

Plenty\Modules\Ticket\Models

Properties
Name Type Description

id

int

The ID of the status

typeId

int

The type ID of the status

position

int

The position of the status

statusGroupId

int

The status group ID of the status

names

array

Methods
public toArray()

Returns this model as an array.

TicketStatusGroup

The ticket status group model.

Namespace

Plenty\Modules\Ticket\Models

Properties
Name Type Description

id

int

The ID of the status group

position

int

The position of the status group

color

string

The color of the status group

Methods
public toArray()

Returns this model as an array.

TicketStatusGroupName

The ticket status group name model.

Namespace

Plenty\Modules\Ticket\Models

Properties
Name Type Description

id

int

The ID of the ticket

lang

int

The language of the status group

name

string

The name of the status group

Methods
public toArray()

Returns this model as an array.

TicketStatusName

The ticket status name model.

Namespace

Plenty\Modules\Ticket\Models

Properties
Name Type Description

id

int

The ID of the status name

statusId

int

The status ID of the status name

lang

string

The language of the status name

name

string

The name of the status

Methods
public toArray()

Returns this model as an array.

TicketType

The ticket type model.

Namespace

Plenty\Modules\Ticket\Models

Properties
Name Type Description

id

int

The ID of the role

position

int

The position of the role

names

array

Methods
public toArray()

Returns this model as an array.

TicketTypeName

The ticket type name model.

Namespace

Plenty\Modules\Ticket\Models

Properties
Name Type Description

id

int

The ID of the role name

typeId

int

The type id of the role name

lang

string

The language of the role name

name

string

The name of the role

Methods
public toArray()

Returns this model as an array.