diff --git a/CHANGELOG.md b/CHANGELOG.md index 758b826..e301a86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip - Add `IdentificationResult` claims - Add `IdentificationsEndpoint.updateResult` - Add `SignatureScenarioVariant.signDocumentsAtOnce` +- Add `EnvelopeTagsEndpoint.updateValues` endpoint ## [2.3.0] - 2024-03-28 ### Added diff --git a/src/Endpoint/EnvelopeTagsEndpoint.php b/src/Endpoint/EnvelopeTagsEndpoint.php index 3e303bc..93b1b68 100644 --- a/src/Endpoint/EnvelopeTagsEndpoint.php +++ b/src/Endpoint/EnvelopeTagsEndpoint.php @@ -23,4 +23,12 @@ public function __construct(EnvelopesEndpoint $parent, Envelope|string $envelope { parent::__construct($parent, '/{envelope}/tags', EnvelopeTag::class, ['envelope' => $envelope]); } + + /** + * @param mixed[] $body + */ + public function updateValues(array $body): void + { + $this->putRequest('/values', ['json' => $body]); + } } diff --git a/tests/Endpoint/EnvelopeTagsEndpointTest.php b/tests/Endpoint/EnvelopeTagsEndpointTest.php index 428e9c5..c9dbeb2 100644 --- a/tests/Endpoint/EnvelopeTagsEndpointTest.php +++ b/tests/Endpoint/EnvelopeTagsEndpointTest.php @@ -14,6 +14,12 @@ public function testCRUD(): void self::assertCrudRequests(self::endpoint(), '/api/envelopes/bar/tags'); } + public function testUpdateValues(): void + { + self::endpoint()->updateValues(['foo' => 'bar']); + self::assertLastRequest('PUT', '/api/envelopes/bar/tags/values', ['foo' => 'bar']); + } + protected static function endpoint(): EnvelopeTagsEndpoint { return self::dgs()->envelopes()->tags('bar');