-
Notifications
You must be signed in to change notification settings - Fork 42
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
Added support for subaccounts #129
Conversation
Thank you for the PR. Just in time for the 1.3 release slated for tomorrow. We'll get this reviewed ASAP. |
So it looks good, but we are changes the way we are doing some things. Just put everything you need to for create and update in |
Alright, I was able to get this done today after all. The subaccount library now matches the new API style as presented by the Relay Webhooks library. |
JSHint complains and dies because the validation for options brings the cyclomatic complexity of subaccounts.create to 6, where the settings say the maximum should be 5. Refactored the validation of options into its own function, but if there ever should be more required properties, then we'll be right back here again.
@@ -0,0 +1,165 @@ | |||
var chai = require('chai') |
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 file is misspelled. Must be subaccounts.spec.js
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.
Damn, nice catch. I didn't even notice that. I blame our product. Will fix in a couple minutes.
* `options.keyLabel` - user-friendly identifier for subaccount API key **required** | ||
* `options.keyGrants` - list of grants to give the subaccount API key **required** | ||
* `options.keyValidIps` - list of IPs the subaccount may be used from | ||
* `options.ipPool` - id of the default IP pool assigned to subaccount's transmissions |
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 can be set but has no effect yet. This feature is coming soon
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 still documented for the endpoint, therefore included.
Thanks again for the contribution. |
Adds a subaccounts library roughly matching the functionality and design of the templates library.
Closes #128