diff --git a/CHANGELOG.md b/CHANGELOG.md index 2833bd5..64b2527 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes will be documented in this file. Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles. ## [Unreleased] +- Add `Account.billingPortal` endpoint with `AccountBillingPortal` and `Price` resources - Add `EnvelopeProperties.expirationTimeOfDay` - Add `Period` resource - Add `EnvelopeProperties.expirationPeriod` property diff --git a/src/Endpoint/AccountEndpoint.php b/src/Endpoint/AccountEndpoint.php index 29870d7..cc5743a 100644 --- a/src/Endpoint/AccountEndpoint.php +++ b/src/Endpoint/AccountEndpoint.php @@ -7,6 +7,7 @@ use DigitalCz\DigiSign\DigiSign; use DigitalCz\DigiSign\Resource\Account; use DigitalCz\DigiSign\Resource\AccountBilling; +use DigitalCz\DigiSign\Resource\AccountBillingPortal; use DigitalCz\DigiSign\Resource\AccountGuide; use DigitalCz\DigiSign\Resource\AccountManageBilling; use DigitalCz\DigiSign\Resource\AccountSmsLog; @@ -128,6 +129,11 @@ public function billing(): AccountBilling return $this->createResource($this->getRequest('/billing'), AccountBilling::class); } + public function billingPortal(): AccountBillingPortal + { + return $this->createResource($this->getRequest('/billing-portal'), AccountBillingPortal::class); + } + public function manageBilling(): AccountManageBilling { return $this->createResource($this->postRequest('/manage-billing'), AccountManageBilling::class); diff --git a/src/Resource/AccountBillingPortal.php b/src/Resource/AccountBillingPortal.php new file mode 100644 index 0000000..8ea0ceb --- /dev/null +++ b/src/Resource/AccountBillingPortal.php @@ -0,0 +1,41 @@ +billingPortal(); + self::assertLastRequest('GET', '/api/account/billing-portal'); + } + protected static function endpoint(): AccountEndpoint { return self::dgs()->account();