-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b23dd22
commit 5dbd74e
Showing
20 changed files
with
860 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace EdsonAlvesan\DigiSac\Objects; | ||
|
||
|
||
class Department extends BaseObject | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function relations() | ||
{ | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace EdsonAlvesan\DigiSac\Objects; | ||
|
||
|
||
class Group extends BaseObject | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function relations() | ||
{ | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace EdsonAlvesan\DigiSac\Objects; | ||
|
||
|
||
class Organization extends BaseObject | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function relations() | ||
{ | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace EdsonAlvesan\DigiSac\Objects; | ||
|
||
|
||
class Person extends BaseObject | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function relations() | ||
{ | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace EdsonAlvesan\DigiSac\Objects; | ||
|
||
|
||
class Tag extends BaseObject | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function relations() | ||
{ | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace EdsonAlvesan\DigiSac\Objects; | ||
|
||
|
||
class TicketTopic extends BaseObject | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function relations() | ||
{ | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?php | ||
|
||
namespace EdsonAlvesan\DigiSac\Traits; | ||
|
||
use EdsonAlvesan\DigiSac\Objects\Contact; | ||
|
||
trait ContactTrait | ||
{ | ||
|
||
/** | ||
* @return Contact | ||
*/ | ||
|
||
public function getContact(array $url_token, $id, array $params) | ||
{ | ||
if (!empty($url_token)) { | ||
$this->url_token = $url_token; | ||
} | ||
|
||
$response = $this->get('contacts', $id, $params); | ||
|
||
return new Contact($response->getDecodedBody()); | ||
} | ||
|
||
public function addContact(array $url_token, $id, array $params) | ||
{ | ||
if (!empty($url_token)) { | ||
$this->url_token = $url_token; | ||
} | ||
|
||
$response = $this->post('contacts', $params); | ||
|
||
return new Contact($response->getDecodedBody()); | ||
} | ||
|
||
public function updateContact(array $url_token, $id, array $params) | ||
{ | ||
if (!empty($url_token)) { | ||
$this->url_token = $url_token; | ||
} | ||
|
||
$response = $this->put('contacts', $params); | ||
|
||
return new Contact($response->getDecodedBody()); | ||
} | ||
|
||
public function deleteContact(array $url_token, $id) | ||
{ | ||
if (!empty($url_token)) { | ||
$this->url_token = $url_token; | ||
} | ||
|
||
$response = $this->delete('contacts', $id); | ||
|
||
return new Contact($response->getDecodedBody()); | ||
} | ||
|
||
public function contactExists(array $url_token, $id, array $params) | ||
{ | ||
if (!empty($url_token)) { | ||
$this->url_token = $url_token; | ||
} | ||
|
||
$response = $this->post('contacts', $params); | ||
|
||
return new Contact($response->getDecodedBody()); | ||
} | ||
|
||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
namespace EdsonAlvesan\DigiSac\Traits; | ||
|
||
use EdsonAlvesan\DigiSac\Objects\Department; | ||
|
||
trait DepartmentTrait | ||
{ | ||
|
||
public function getDepartment(array $url_token, $id, array $params) | ||
{ | ||
if (!empty($url_token)) { | ||
$this->url_token = $url_token; | ||
} | ||
|
||
$response = $this->get('departments', $id, $params); | ||
|
||
return new Department($response->getDecodedBody()); | ||
} | ||
|
||
public function addDepartment(array $url_token, $id, array $params) | ||
{ | ||
if (!empty($url_token)) { | ||
$this->url_token = $url_token; | ||
} | ||
|
||
$response = $this->post('departments', $params); | ||
|
||
return new Department($response->getDecodedBody()); | ||
} | ||
|
||
public function updateDepartment(array $url_token, $id, array $params) | ||
{ | ||
if (!empty($url_token)) { | ||
$this->url_token = $url_token; | ||
} | ||
|
||
$response = $this->put('departments', $params); | ||
|
||
return new Department($response->getDecodedBody()); | ||
} | ||
|
||
public function deleteDepartment(array $url_token, $id) | ||
{ | ||
if (!empty($url_token)) { | ||
$this->url_token = $url_token; | ||
} | ||
|
||
$response = $this->delete('departments', $id); | ||
|
||
return new Department($response->getDecodedBody()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace EdsonAlvesan\DigiSac\Traits; | ||
|
||
use EdsonAlvesan\DigiSac\Objects\Contact; | ||
|
||
trait FileTrait | ||
{ | ||
|
||
} |
Oops, something went wrong.