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(int $ticketMessageId):TicketMessage

Gets the ticket message by the given ID.

Parameters
int $ticketMessageId The ID of the ticket message
public list(int $ticketId):void

Lists all ticket messages of a ticket.

Parameters
int $ticketId The ID of the ticket
public listInternal(int $ticketId):void

Lists all internal ticket messages of a ticket.

Parameters
int $ticketId The ticket ID.
public listPublic(int $ticketId):void

Lists all public ticket messages of a ticket

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

Creates 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 the ID.

Parameters
int $ticketId The ID of the ticket
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
public updateTicket(array $data, int $ticketId):Ticket

Updates an existing ticket with given data.

Parameters
array $data The updating data as associative array
int $ticketId The ID of the ticket
public findById(int $ticketId, array $with = []):Ticket

Gets a ticket by the ID.

Parameters
int $ticketId The ID of the ticket
array $with 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(array $data, int $ticketRoleNameId):TicketRoleName

Updates an existing ticket role name.

Parameters
array $data The ticket role name data as associative array
int $ticketRoleNameId The ID of the ticket role name
public create(array $data):TicketRoleName

Creates a ticket role name.

Parameters
array $data The ticket role name data as associative array
public findByName(string $name, string $lang):array

Lists the ticket roles by the name.

Parameters
string $name The name of the ticket role
string $lang The language of the ticket role
public findByLang(string $lang):array

Lists the ticket roles by the language.

Parameters
string $lang 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(array $data, int $ticketRoleId):TicketRole

Update an existing ticket role.

Parameters
array $data The ticket role data as associative array
int $ticketRoleId The ID of the ticket role
public create(array $data):TicketRole

Creates a ticket role.

Parameters
array $data 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(array $data, int $ticketStatusNameId):TicketStatusName

Updates the ticket status name by the given ID.

Parameters
array $data The ticket status name data as associative array
int $ticketStatusNameId The ID of the ticket status name
public create(array $data):TicketStatusName

Creates a ticket status name.

Parameters
array $data The ticket status name data as associative array
public findByName(string $name, string $lang):array

Gets the ticket status name.

Parameters
string $name The name of the ticket status
string $lang The language of the ticket status name
public statusNameList(string $lang):array
Parameters
string $lang The language of the ticket status name
public statusNameListWithTypeId(string $lang):array

Lists the ticket status names with type ID.

Parameters
string $lang 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(array $data, int $ticketStatusId):TicketStatus

Updates an existing ticket status.

Parameters
array $data The ticket status data as associative array
int $ticketStatusId The ID of the ticket status
public create(array $data):TicketStatus

Creates a ticket status.

Parameters
array $data The ticket status data as associative array
public findByTypeId(int $typeId):array

Lists the ticket statuses by the type ID.

Parameters
int $typeId 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(array $data, int $ticketTypeNameId):TicketTypeName

Updates an existing ticket type name.

Parameters
array $data The ticket type name data as associative array
int $ticketTypeNameId The ID of the ticket type name
public create(array $data):TicketTypeName

Creates a ticket type name.

Parameters
array $data The ticket type name data as associative array
public findByName(string $name, string $lang):array

Lists the ticket types by the name.

Parameters
string $name The name of the ticket type
string $lang The language of the ticket type
public typeNameList(string $lang):array

Lists the ticket types by the language.

Parameters
string $lang 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(array $data, int $ticketTypeId):TicketType

Updates the ticket type by the given ID.

Parameters
array $data The ticket type data as associative array
int $ticketTypeId The ID of the ticket type
public create(array $data):TicketType

Creates a ticket type.

Parameters
array $data The ticket type data as associative array

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
int orderId The ID of the order 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
Contact contact The contact instance linked with the ticket
Order order The order instance linked with 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
array documents 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

Type Name Description
int id The ID of the ticket document
int ticketId TheID of the ticket
int userId The ID of the user
string type The type the document
string name The name (path) of the document storage location
int internal /TODO what is this for?

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
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

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.