Skip to content

Commit

Permalink
- Add Account.guide endpoint and AccountGuide resource
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasDostalDS committed Jan 28, 2025
1 parent 5d4eabf commit ca78ca3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.guide` endpoint and `AccountGuide` resource
- Add `AccountBilling.multiSign`
- Edit `MultiSignRecipientInfo` resource
- Add `BatchSendingsEndpoint.MutiSignRecipients` endpoint
Expand Down
6 changes: 6 additions & 0 deletions src/Endpoint/AccountEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use DigitalCz\DigiSign\DigiSign;
use DigitalCz\DigiSign\Resource\Account;
use DigitalCz\DigiSign\Resource\AccountBilling;
use DigitalCz\DigiSign\Resource\AccountGuide;
use DigitalCz\DigiSign\Resource\AccountManageBilling;
use DigitalCz\DigiSign\Resource\AccountSmsLog;
use DigitalCz\DigiSign\Resource\AccountStatistics;
Expand Down Expand Up @@ -136,4 +137,9 @@ public function deactivate(): void
{
$this->postRequest('/deactivate');
}

public function guide(): AccountGuide
{
return $this->createResource($this->getRequest('/guide'), AccountGuide::class);
}
}
12 changes: 12 additions & 0 deletions src/Resource/AccountGuide.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

declare(strict_types=1);

namespace DigitalCz\DigiSign\Resource;

class AccountGuide extends BaseResource
{
public bool $firstEnvelopeSent;
public bool $firstUserInvited;
public bool $settingFilled;
}
6 changes: 6 additions & 0 deletions tests/Endpoint/AccountEndpointTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ public function testDeactivate(): void
self::assertLastRequest('POST', '/api/account/deactivate');
}

public function testGuide(): void
{
self::endpoint()->guide();
self::assertLastRequest('GET', '/api/account/guide');
}

protected static function endpoint(): AccountEndpoint
{
return self::dgs()->account();
Expand Down

0 comments on commit ca78ca3

Please sign in to comment.