Skip to content
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

Merged
merged 5 commits into from
Dec 15, 2023
Merged

Embedded invite updates #44

merged 5 commits into from
Dec 15, 2023

Conversation

JiSoft
Copy link
Contributor

@JiSoft JiSoft commented Dec 11, 2023

No description provided.

*/
class EntityManager implements EntityManagerInterface
{
private const CLIENT = 'SN_PHP_SDK';
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

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
Copy link
Contributor

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) {
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Contributor Author

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

@JiSoft JiSoft merged commit 334ccd4 into master Dec 15, 2023
3 checks passed
@JiSoft JiSoft deleted the embedded-invite-updates branch December 15, 2023 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants