Class: WHMCS::Ticket
Overview
WHMCS::Ticket is the class for managing support tickets
Class Method Summary collapse
-
.add_ticket_note(params = {}) ⇒ Object
Add a note to an existing ticket.
-
.delete_ticket(params = {}) ⇒ Object
Delete an existing ticket.
-
.get_support_departments ⇒ Object
Get support departments.
-
.get_support_statuses(params = {}) ⇒ Object
Get support statuses.
-
.get_ticket(params = {}) ⇒ Object
Get a ticket.
-
.get_ticket_predefined_cats ⇒ Object
Get ticket predefined categories.
-
.get_ticket_predefined_repies(params = {}) ⇒ Object
Get ticket predefined replies.
-
.get_tickets(params = {}) ⇒ Object
Get tickets.
-
.open_ticket(params = {}) ⇒ Object
Open a new ticket.
-
.reply_ticket(params = {}) ⇒ Object
Reply to ticket.
-
.update_ticket(params = {}) ⇒ Object
Update an existing ticket.
Methods inherited from Base
Class Method Details
.add_ticket_note(params = {}) ⇒ Object
Add a note to an existing ticket
Parameters:
-
:ticketid
- Ticket ID the note is to be added -
:message
- The not to add
See:
107 108 109 110 |
# File 'lib/whmcs/ticket.rb', line 107 def self.add_ticket_note(params = {}) params.merge!(:action => 'addticketnote') send_request(params) end |
.delete_ticket(params = {}) ⇒ Object
Delete an existing ticket
Parameters:
-
:ticketid
- Ticket ID to be deleted
See:
121 122 123 124 |
# File 'lib/whmcs/ticket.rb', line 121 def self.delete_ticket(params = {}) params.merge!(:action => 'deleteticket') send_request(params) end |
.get_support_departments ⇒ Object
131 132 133 |
# File 'lib/whmcs/ticket.rb', line 131 def self.get_support_departments send_request(:action => 'getsupportdepartments') end |
.get_support_statuses(params = {}) ⇒ Object
Get support statuses
Parameters:
-
:deptid
- Optional - Send a Department ID to limit results
See:
144 145 146 147 |
# File 'lib/whmcs/ticket.rb', line 144 def self.get_support_statuses(params = {}) params.merge!(:action => 'getsupportstatuses') send_request(params) end |
.get_ticket(params = {}) ⇒ Object
75 76 77 78 |
# File 'lib/whmcs/ticket.rb', line 75 def self.get_ticket(params = {}) params.merge!(:action => 'getticket') send_request(params) end |
.get_ticket_predefined_cats ⇒ Object
154 155 156 |
# File 'lib/whmcs/ticket.rb', line 154 def self.get_ticket_predefined_cats send_request(:action => 'getticketpredefinedcats') end |
.get_ticket_predefined_repies(params = {}) ⇒ Object
Get ticket predefined replies
Parameters:
-
:catid
- Optional Select category to browse
See:
167 168 169 170 |
# File 'lib/whmcs/ticket.rb', line 167 def self.get_ticket_predefined_repies(params = {}) params.merge!(:action => 'getsupportstatuses') send_request(params) end |
.get_tickets(params = {}) ⇒ Object
Get tickets
Parameters:
-
:limitstart
- Optional start at which result (default 0) -
:limitnum
- Optional limit at how many results (default 25) -
:clientid
- Optional search for a particular client’s tickets -
:deptid
- Optional search in a particular department -
:status
- Optional search a particular status -
:subject
- Optional search for a word in the subject
See:
61 62 63 64 |
# File 'lib/whmcs/ticket.rb', line 61 def self.get_tickets(params = {}) params.merge!(:action => 'gettickets') send_request(params) end |
.open_ticket(params = {}) ⇒ Object
Open a new ticket
Parameters:
-
:clientid
- the ID of the client the ticket belongs to -
:name
- only required if not a registered client (clientid must be sent as 0) -
:email
- only required if not a registered client -
:deptid
- the ID of the ticket department -
:subject
-
:message
-
:priority
- can be “Low”, “Medium” or “High” -
:serviceid
- the ID if the ticket relates to a specific product -
:customfields
- a base 64 serialized array of field IDs => values
See:
22 23 24 25 |
# File 'lib/whmcs/ticket.rb', line 22 def self.open_ticket(params = {}) params.merge!(:action => 'openticket') send_request(params) end |
.reply_ticket(params = {}) ⇒ Object
Reply to ticket
Parameters:
-
:ticketid
- the ID of the ticket to add the reply to -
:clientid
- if adding reply as a client -
:name
- only required if not a registered client (clientid must be sent as 0) -
:email
- only required if not a registered client -
:adminusername
- if adding reply as an admin, name to show -
:message
-
:status
- specify if you want to set the status to On Hold or In Progress after reply
See:
42 43 44 45 |
# File 'lib/whmcs/ticket.rb', line 42 def self.reply_ticket(params = {}) params.merge!(:action => 'addticketreply') send_request(params) end |
.update_ticket(params = {}) ⇒ Object
Update an existing ticket
Parameters:
-
:ticketid
- Ticket ID to be updated -
:subject
-
:priority
- Low, Medium or High -
:status
- Open, Answered, Closed, etc…
See:
92 93 94 95 |
# File 'lib/whmcs/ticket.rb', line 92 def self.update_ticket(params = {}) params.merge!(:action => 'updateticket') send_request(params) end |