Add optional is_confirmed parameter for adding user email alias - #499
Conversation
|
Verified that @mattwiller has signed the CLA. Thanks for the pull request! |
| .add("email", email); | ||
| .add("email", email); | ||
|
|
||
| if (isConfirmed) { |
There was a problem hiding this comment.
How is this different from the addEmailAlias method when isConfirmed is false. Also, I can't find any documentation about it in https://developer.box.com/reference#get-all-email-aliases-for-a-user
There was a problem hiding this comment.
The is_confirmed parameter allows an admin to add an email alias for a user without needing the user to manually verify the email address. I'll follow up about how we want to document it, but it's definitely something that's in use today.
There was a problem hiding this comment.
Since is_confirmed defaults to false in the addEmailAlias(String) method, can we just make the second method simple, something like addConfirmedEmailAlias(String) which internally defaults the is_confirmed param as true.
There was a problem hiding this comment.
Is there a way to do that without duplicating logic? I'm looking at the code and it seems like in order to have two simple methods like that I would need to copy the main logic for the method across both.
There was a problem hiding this comment.
public EmailAlias addEmailAlias(String email)
public EmailAlias addConfirmedEmailAlias(String email)
private EmailAlias addEmailAlias(String email, boolean isConfirmed)
Both the public methods can call this private method
Fixes #469