diff --git a/CHANGELOG.md b/CHANGELOG.md index 38bb96c..e185513 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip - Add `anonymizeAt` and `anonymizedAt` to `Envelope` - Add anonymize action to `Envelope` - Add `AccountEmailSendersEndpoint` and `AccountEmailSender` resource +- Add `approvedAt`, `deniedAt` and `denailMessage` to `Identification` +- Add `Identification.approve` endpoint and `Identification.deny` endpoint ### Changed - Change `EnvelopeDocument.file` to nullable diff --git a/src/Endpoint/IdentificationsEndpoint.php b/src/Endpoint/IdentificationsEndpoint.php index 1ef54dd..e4e328f 100644 --- a/src/Endpoint/IdentificationsEndpoint.php +++ b/src/Endpoint/IdentificationsEndpoint.php @@ -20,4 +20,17 @@ public function __construct(DigiSign $parent) { parent::__construct($parent, '/api/identifications', Identification::class); } + + public function approve(Identification|string $id): Identification + { + return $this->makeResource($this->postRequest('/{id}/approve', ['id' => $id])); + } + + /** + * @param mixed[] $body + */ + public function deny(Identification|string $id, array $body = []): Identification + { + return $this->makeResource($this->postRequest('/{id}/deny', ['id' => $id, 'json' => $body])); + } }