-
Notifications
You must be signed in to change notification settings - Fork 25
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
[NV-PHP-5] Add tenants support #41
[NV-PHP-5] Add tenants support #41
Conversation
Thanks for the contribution @kraynel. It's not used. So no need to run them. I'll do a proper clean up soon of the linting soon. |
src/Actions/ManagesTenants.php
Outdated
} | ||
|
||
/** | ||
* Fetch one subscriber. |
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 should be Fetch a tenant
src/Actions/ManagesTenants.php
Outdated
*/ | ||
public function getTenant($tenantId) | ||
{ | ||
$subscriber = $this->get("tenant/{$tenantId}")['data']; |
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.
I believe this should be $tenant
, and not $subscriber
.
src/Actions/ManagesTenants.php
Outdated
{ | ||
$subscriber = $this->get("tenant/{$tenantId}")['data']; | ||
|
||
return new Tenant($subscriber, $this); |
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.
I believe this should be $tenant
, and not $subscriber
.
src/Resources/Tenant.php
Outdated
public $environmentId; | ||
|
||
/** | ||
* Return the array form of NotificationTemplate object. |
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.
I believe this should be Tenant object
, and not NotificationTemplate object
.
src/Actions/ManagesTenants.php
Outdated
* | ||
* @param string $tenantId | ||
* | ||
* @return \Novu\SDK\Resources\Subscriber |
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.
I believe this should return a Tenant Resource instead of a Subscriber resource
src/Actions/ManagesTenants.php
Outdated
*/ | ||
public function updateTenant($tenantId, array $data) | ||
{ | ||
$subscriber = $this->patch("tenants/{$tenantId}", $data)['data']; |
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.
I believe this should be $tenant, and not $subscriber.
src/Actions/ManagesTenants.php
Outdated
{ | ||
$subscriber = $this->patch("tenants/{$tenantId}", $data)['data']; | ||
|
||
return new Tenant($subscriber, $this); |
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.
I believe this should be $tenant, and not $subscriber.
/** | ||
* Create a new tenant. | ||
* | ||
* @return \Novu\SDK\Resources\Tenant |
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.
Please add the docs @param for this method
Please attend to the comments @kraynel ⭐ |
Thanks for the review @unicodeveloper, sorry for the poor copy/paste quality. It should be better now. |
Perfect. LGTM! ⭐ |
Hello !
This should add support for tenants and solve #33.
I tried
composer lint
andcomposer test
, but it updates almost all files in the repo, is it really used?