Skip to content

Commit

Permalink
Merge pull request #5 from CapturedMomentum/main
Browse files Browse the repository at this point in the history
Updated ticket endpoints request validators to handle latest paramete…
  • Loading branch information
amalfra authored Mar 12, 2022
2 parents e674f65 + 967e0ea commit 7d9944b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/API/Tickets.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public static function tickets($options = array()) {
self::validate($options, array(
'per_page', 'page', 'archived', 'spam',
'trash', 'replies', 'max_replies', 'assigned_user',
'assigned_group', 'starred', 'label', 'since',
'until', 'requester_emails'
'assigned_team', 'starred', 'label', 'since',
'until', 'sort_by', 'requester_emails', 'total_only'
));

return self::process_request('tickets', $options);
Expand All @@ -37,7 +37,7 @@ public static function search($options = array()) {

public static function create_ticket($options = array()) {
self::validate($options, array(
'subject', 'requester_name', 'requester_email', 'copied_emails',
'subject', 'requester_name', 'requester_email', 'cc', 'copied_emails', 'bcc',
'notify_requester', 'content', 'attachment_ids', 'forwarding_address_id'
), array('subject', 'requester_name', 'requester_email', 'content'));

Expand Down Expand Up @@ -87,11 +87,11 @@ public static function trash_ticket($id = 0) {
public static function untrash_ticket($id = 0) {
return self::process_request('tickets/'.$id.'/trash', array(), 'DELETE');
}

public static function add_label($id, $label) {
return self::process_request('tickets/'.$id.'/labels/'.$label, array(), 'POST');
}

public static function remove_label($id, $label) {
return self::process_request('tickets/'.$id.'/labels/'.$label, array(), 'DELETE');
}
Expand Down

0 comments on commit 7d9944b

Please sign in to comment.