diff --git a/README.md b/README.md index 2252f38..e6abf08 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ $new = $api->tickets->create($data); $updated = $api->tickets->update($data); $api->tickets->delete($id); $existing = $api->tickets->view($id); +$archived = $api->archivedTickets->view($id); //Responses are simple arrays, e.g.: $id = $existing['id']; diff --git a/docs/Freshdesk-Api.md b/docs/Freshdesk-Api.md index b28236b..642d3ce 100644 --- a/docs/Freshdesk-Api.md +++ b/docs/Freshdesk-Api.md @@ -68,6 +68,11 @@ Group resources Ticket resources +### $archivedtickets + + public \Freshdesk\Resources\ArchivedTicket $archivedTickets + +Archived Ticket resources * Visibility: **public** diff --git a/src/Api.php b/src/Api.php index dd7ea45..13af667 100644 --- a/src/Api.php +++ b/src/Api.php @@ -27,6 +27,7 @@ use Freshdesk\Resources\Product; use Freshdesk\Resources\SLAPolicy; use Freshdesk\Resources\Ticket; +use Freshdesk\Resources\ArchivedTicket; use Freshdesk\Resources\TimeEntry; use Freshdesk\Resources\Topic; use GuzzleHttp\Client; @@ -82,6 +83,14 @@ class Api * @var Ticket */ public $tickets; + + /** + * Archived ticket resources + * + * @api + * @var AchivedTicket + */ + public $archivedTickets; /** * TimeEntry resources @@ -326,6 +335,7 @@ private function setupResources() //Tickets $this->tickets = new Ticket($this); + $this->archivedTickets = new ArchivedTicket($this); $this->timeEntries = new TimeEntry($this); $this->conversations = new Conversation($this); diff --git a/src/Resources/ArchivedTicket.php b/src/Resources/ArchivedTicket.php new file mode 100644 index 0000000..297218b --- /dev/null +++ b/src/Resources/ArchivedTicket.php @@ -0,0 +1,31 @@ +