Skip to content

Commit

Permalink
Fix AccountUsersEndpoint.invite endpoint (#241)
Browse files Browse the repository at this point in the history
* Fix AccountUsersEndpoint.invite endpoint

* Apply suggestions from code review

Fix invite endpoint body

Co-authored-by: Pavel Stejskal <spajxo@gmail.com>

---------

Co-authored-by: Pavel Stejskal <spajxo@gmail.com>
  • Loading branch information
tomasDostalDS and spajxo committed May 17, 2024
1 parent 1f83b2c commit 40387b5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 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]
- Fix `AccountUsersEndpoint.invite` endpoint
- Add `MyIdentifications.info` endpoint
- Add `EnvelopeRecipient.certificateInfo` endpoint

Expand Down
2 changes: 1 addition & 1 deletion src/Endpoint/AccountUsersEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function disinvite(string $id): void
*/
public function invite(array $body): User
{
return $this->makeCreateRequest($body);
return $this->makeResource($this->postRequest('/invite', ['json' => $body]));
}

public function reinvite(string $id): User
Expand Down
2 changes: 1 addition & 1 deletion tests/Endpoint/AccountUsersEndpointTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function testDisinvite(): void
public function testInvite(): void
{
self::endpoint()->invite(['foo' => 'bar']);
self::assertLastRequest('POST', '/api/account/users', ['foo' => 'bar']);
self::assertLastRequest('POST', '/api/account/users/invite', ['foo' => 'bar']);
}

public function testReinvite(): void
Expand Down

0 comments on commit 40387b5

Please sign in to comment.