From a2a6986f148849d3c918e551aed877a72683511c Mon Sep 17 00:00:00 2001 From: IamDejv Date: Thu, 4 Jun 2026 10:15:21 +0200 Subject: [PATCH] Add `query` parameter to `EnvelopesEndpoint.get` method --- CHANGELOG.md | 1 + src/Endpoint/EnvelopesEndpoint.php | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7360a5..11b7528 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip - Add `EnvelopeRecipient.type` and `EnvelopeTemplateRecipient.type` property - Add `EnvelopeProperties.consumerWithdrawalPeriod` property - Add `EnvelopeProperties.consumerGuide` property +- Add `query` parameter to `EnvelopesEndpoint.get` method ## [2.11.0] - 2025-11-12 ### Deprecated diff --git a/src/Endpoint/EnvelopesEndpoint.php b/src/Endpoint/EnvelopesEndpoint.php index 7e7f769..4732204 100644 --- a/src/Endpoint/EnvelopesEndpoint.php +++ b/src/Endpoint/EnvelopesEndpoint.php @@ -13,7 +13,6 @@ /** * @extends ResourceEndpoint - * @method Envelope get(string $id) * @method Envelope create(array $body) * @method Envelope update(string $id, array $body) */ @@ -27,6 +26,14 @@ public function __construct(DigiSign $parent) parent::__construct($parent, '/api/envelopes', Envelope::class); } + /** + * @param mixed[] $query + */ + public function get(string $id, array $query = []): Envelope + { + return $this->makeResource($this->getRequest('/{id}', ['id' => $id, 'query' => $query])); + } + public function documents(Envelope|string $envelope): EnvelopeDocumentsEndpoint { return new EnvelopeDocumentsEndpoint($this, $envelope);