-
Notifications
You must be signed in to change notification settings - Fork 186
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
feat: Add content-type
sign request response
#1087
Conversation
Pull Request Test Coverage Report for Build #1937
💛 - Coveralls |
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.
Let's improve this a little
BoxSignRequestInputContentType(String jsonValue) { | ||
this.jsonValue = jsonValue; | ||
} | ||
static BoxSignRequestInputContentType fromJSONString(String jsonValue) { |
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.
Maybe let's use switch which is not used in SDK and I have no idea why...
And we should provide details about the faulty value
static BoxSignRequestInputContentType fromJSONString(String jsonValue) {
switch (jsonValue) {
case "initial":
return Initial;
case "stamp":
return Stamp;
case "signature":
return Signature;
case "company":
return Company;
case "title":
return Title;
case "email":
return Email;
case "full_name":
return FullName;
case "first_name":
return FirstName;
case "last_name":
return LastName;
case "text":
return Text;
case "date":
return Date;
case "checkbox":
return Checkbox;
default:
throw new IllegalArgumentException(
format("The provided JSON value '%s' isn't a valid BoxSignRequestInputContentType.", jsonValue)
);
}
}
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.
👍
Closes: SDK-2253