Skip to content

Commit

Permalink
Add approve/deny enpoints to IdentificationsResource
Browse files Browse the repository at this point in the history
  • Loading branch information
mertic18 committed Oct 18, 2023
1 parent 1d8be37 commit 458fcdb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions src/Endpoint/IdentificationsEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,17 @@ public function __construct(DigiSign $parent)
{
parent::__construct($parent, '/api/identifications', Identification::class);
}

public function approve(Identification|string $id): Identification

Check warning on line 24 in src/Endpoint/IdentificationsEndpoint.php

View check run for this annotation

Codecov / codecov/patch

src/Endpoint/IdentificationsEndpoint.php#L24

Added line #L24 was not covered by tests
{
return $this->makeResource($this->postRequest('/{id}/approve', ['id' => $id]));

Check warning on line 26 in src/Endpoint/IdentificationsEndpoint.php

View check run for this annotation

Codecov / codecov/patch

src/Endpoint/IdentificationsEndpoint.php#L26

Added line #L26 was not covered by tests
}

/**
* @param mixed[] $body
*/
public function deny(Identification|string $id, array $body = []): Identification

Check warning on line 32 in src/Endpoint/IdentificationsEndpoint.php

View check run for this annotation

Codecov / codecov/patch

src/Endpoint/IdentificationsEndpoint.php#L32

Added line #L32 was not covered by tests
{
return $this->makeResource($this->postRequest('/{id}/deny', ['id' => $id, 'json' => $body]));

Check warning on line 34 in src/Endpoint/IdentificationsEndpoint.php

View check run for this annotation

Codecov / codecov/patch

src/Endpoint/IdentificationsEndpoint.php#L34

Added line #L34 was not covered by tests
}
}

0 comments on commit 458fcdb

Please sign in to comment.