Ticket

Contracts

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(array $data):Ticket

Create a new ticket.

Parameters
array $data The ticket data as associative array.
public searchTickets(array $filter, int $page = 1, int $itemsPerPage = 50):array

List tickets by filter options.

Parameters
array $filter The filter
int $page The page to get. The default page that will be returned is page 1.
int $itemsPerPage The number of tickets to be displayed per page. The default number of tickets per page is 50.
public deleteTicket(int $ticketId):void

Deletes a ticket by given ticketId

Parameters
int $ticketId
public createMessage(array $data, int $ticketId):TicketMessage

Creates a message for a ticket.

Parameters
array $data The message data as associative array
int $ticketId The ID of the ticket to associate this to
public updateTicket(array $data, int $ticketId):Ticket

Updates a ticket with given data.

Parameters
array $data The updating data as associative array
int $ticketId The ID of the ticket to associate this to
public findById(int $ticketId):Ticket

Get an ticket

Parameters
int $ticketId The ID of the ticket
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

TicketRoleName Repository

Namespace

Plenty\Modules\Ticket\Contracts

Methods

public update(array $data, int $ticketRoleNameId):TicketRoleName
Parameters
array $data
int $ticketRoleNameId
public create(array $data):TicketRoleName
Parameters
array $data
public findByName(string $name, string $lang):array
Parameters
string $name
string $lang

TicketRoleRepositoryContract

Ticket role repository

Namespace

Plenty\Modules\Ticket\Contracts

Methods

public update(array $data, int $ticketRoleId):TicketRole
Parameters
array $data
int $ticketRoleId
public create(array $data):TicketRole
Parameters
array $data

TicketStatusNameRepositoryContract

TicketStatusName Repository

Namespace

Plenty\Modules\Ticket\Contracts

Methods

public update(array $data, int $ticketStatusNameId):TicketStatusName
Parameters
array $data
int $ticketStatusNameId
public create(array $data):TicketStatusName
Parameters
array $data
public findByName(string $name, string $lang):array
Parameters
string $name
string $lang
public statusNameList(string $lang):array
Parameters
string $lang

TicketStatusRepositoryContract

TicketStatus repository

Namespace

Plenty\Modules\Ticket\Contracts

Methods

public update(array $data, int $ticketStatusId):TicketStatus
Parameters
array $data
int $ticketStatusId
public create(array $data):TicketStatus
Parameters
array $data
public findByTypeId(int $typeId):array
Parameters
int $typeId

TicketTypeNameRepositoryContract

TicketTypeName repository

Namespace

Plenty\Modules\Ticket\Contracts

Methods

public update(array $data, int $ticketTypeNameId):TicketTypeName
Parameters
array $data
int $ticketTypeNameId
public create(array $data):TicketTypeName
Parameters
array $data
public findByName(string $name, string $lang):array
Parameters
string $name
string $lang
public typeNameList(string $lang):array
Parameters
string $lang

TicketTypeRepositoryContract

TicketType repository

Namespace

Plenty\Modules\Ticket\Contracts

Methods

public update(array $data, int $ticketTypeId):TicketType
Parameters
array $data
int $ticketTypeId
public create(array $data):TicketType
Parameters
array $data

Models

Ticket

The ticket model.

Namespace

Plenty\Modules\Ticket\Models

Properties

Type Name Description
int id The ID of the ticket
int typeId The type ID of the ticket
int priorityId The priority ID of the ticket
int parentTicketId The ID of the parent ticket
int statusId The status ID of the ticket
array confidential The confidential value. Displays 1 if the ticket is confidential. Displays 0 if the ticket is not confidential.
int contactId The ID of the contact that is linked with the ticket
string createdAt The time the ticket was created as unix timestamp or carbon object
string updatedAt The time the ticket was last updated as unix timestamp or carbon object
string contactLastUpdateAt The time the contact was last updated
string deadlineAt The date of the ticket deadline
string finishedAt The date the ticket is solved and displays 100 percent in the progress bar
string title The title of the ticket
int progress The progress of the ticket in percent
int plentyId The ID of the client (store)
array source The source of the ticket. Possible values are 'frontend', 'backend', 'ebay' and 'email'.
int documentsCount The number of documents that are attached to the ticket
int hasDocuments Displays 1 if the ticket has one or more documents. Displays 0 if the ticket has no document.
int childrenCount The number of child tickets
string resubmissionAt The date the ticket should be resubmitted
string parseData The ParseData from the ticket
array owners The owners of the ticket. It is a combination of the user ID and the role ID.
array messages The messages of the ticket

Methods

public toArray()

Returns this model as an array.

TicketMessage

The ticket message model.

Namespace

Plenty\Modules\Ticket\Models

Properties

Type Name Description
int id The ID of the message
int ticketId The ticket ID the message belongs to
int userId The user of the message
string createdAt The time the ticket message was created as unix timestamp or carbon object
string text The content of the message
array type The type of the message. Two types are available:
  • message (visible for the customer)
  • comment (not visible for the customer)
array source The origin of the message. The following sources are available by default and cannot be deleted.
  • backend
  • frontend
  • ebay
  • email
int topicId The ID of the topic the message is assigned to

Methods

public toArray()

Returns this model as an array.

TicketMessageTopic

The ticket message topic model.

Namespace

Plenty\Modules\Ticket\Models

Properties

Type Name Description
int id The id of the message
int position 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

Type Name Description
int id The ID of the message
int topicId The ID of the topic
string lang The language of the topic
string name 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

Type Name Description
int ticketId The ID of the ticket
int userId The user ID of the owner
int roleId 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

Type Name Description
int id The ID of the role
int position The position of the role
array names

Methods

public toArray()

Returns this model as an array.

TicketRoleName

The ticket role name model.

Namespace

Plenty\Modules\Ticket\Models

Properties

Type Name Description
int id The ID of the role name
int roleId The ID of the role
int lang The language of the role
string name 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

Type Name Description
int id The ID of the status
int typeId The type ID of the status
int position The position of the status
int statusGroupId The status group ID of the status
array names

Methods

public toArray()

Returns this model as an array.

TicketStatusGroup

The ticket status group model.

Namespace

Plenty\Modules\Ticket\Models

Properties

Type Name Description
int id The ID of the status group
int position The position of the status group
string color 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

Type Name Description
int id The ID of the ticket
int lang The language of the status group
string name 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

Type Name Description
int id The ID of the status name
int statusId The status ID of the status name
string lang The language of the status name
string name 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

Type Name Description
int id The ID of the role
int position The position of the role
array names

Methods

public toArray()

Returns this model as an array.

TicketTypeName

The ticket type name model.

Namespace

Plenty\Modules\Ticket\Models

Properties

Type Name Description
int id The ID of the role name
int typeId The type id of the role name
string lang The language of the role name
string name The name of the role

Methods

public toArray()

Returns this model as an array.