-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Embedded invite updates #44
Conversation
*/ | ||
class EntityManager implements EntityManagerInterface | ||
{ | ||
private const CLIENT = 'SN_PHP_SDK'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CLIENT_NAME OR SN_CLIENT as option
use SignNow\Api\Entity\DocumentGroup\GroupInvite\InviteStep; | ||
use SignNow\Api\Entity\DocumentGroup\GroupInvite\Reminder; | ||
use SignNow\Rest\EntityManager; | ||
use SignNow\Api\Service\EntityManager\EntityManager; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more unused import
use SignNow\Api\Entity\DocumentGroup\GroupInvite\InviteStep; | ||
use SignNow\Api\Entity\DocumentGroup\GroupInvite\Reminder; | ||
use SignNow\Rest\EntityManager; | ||
use SignNow\Api\Service\EntityManager\EntityManager; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more unused import
return $this; | ||
} | ||
|
||
public function getClientName(): ?string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->clientName
can't be null, because in the constructor you have $this->clientName = $clientName ?? self::CLIENT
*/ | ||
private function makeHeaders(array $headers): array | ||
{ | ||
if ($this->getClientName() === null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may drop it if clientName
cant be empty
* | ||
* @return InviteRequest | ||
*/ | ||
public function setDeclineRedirectUri(?string $declineRedirectUri): InviteRequest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What for we are allowing to send null as an attribute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not required attribute
so it can be nullable
and someone could remove it from sending request
No description provided.