diff --git a/CHANGELOG.md b/CHANGELOG.md index 1861556..fb8b3c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip - Edit `BatchSending` resource with envelopeTemplate - Extend `BatchSendingStats` resource with deleted - Add `AccountBilling.cancelAt` +- Add `AccountEndpoint.createDefaultSubscription` endpoint ## [2.5.0] - 2024-10-14 - Add `AccountBilling.automaticTagsPlacement` diff --git a/src/Endpoint/AccountEndpoint.php b/src/Endpoint/AccountEndpoint.php index 7f3371c..eda4d22 100644 --- a/src/Endpoint/AccountEndpoint.php +++ b/src/Endpoint/AccountEndpoint.php @@ -117,6 +117,11 @@ public function manageBilling(): AccountManageBilling return $this->createResource($this->postRequest('/manage-billing'), AccountManageBilling::class); } + public function createDefaultSubscription(): void + { + $this->postRequest('/billing/default-subscription'); + } + public function smsSenders(): AccountSmsSendersEndpoint { return new AccountSmsSendersEndpoint($this); diff --git a/tests/Endpoint/AccountEndpointTest.php b/tests/Endpoint/AccountEndpointTest.php index cc0a571..c3aab4d 100644 --- a/tests/Endpoint/AccountEndpointTest.php +++ b/tests/Endpoint/AccountEndpointTest.php @@ -57,6 +57,12 @@ public function testManageBilling(): void self::assertLastRequest('POST', '/api/account/manage-billing'); } + public function testCreateDefaultSubscription(): void + { + self::endpoint()->createDefaultSubscription(); + self::assertLastRequest('POST', '/api/account/billing/default-subscription'); + } + public function testDeactivate(): void { self::endpoint()->deactivate();