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

feat: Add content-type sign request response #1087

Merged
merged 7 commits into from
Aug 24, 2022

Conversation

congminh1254
Copy link
Member

Closes: SDK-2253

@coveralls
Copy link

coveralls commented Aug 23, 2022

Pull Request Test Coverage Report for Build #1937

  • 35 of 50 (70.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 69.853%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/com/box/sdk/BoxSignRequestSigner.java 35 50 70.0%
Totals Coverage Status
Change from base Build #1909: 0.02%
Covered Lines: 7271
Relevant Lines: 10409

💛 - Coveralls

Copy link
Contributor

@antusus antusus left a 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) {
Copy link
Contributor

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)
            );
    }
}

Copy link
Contributor

@antusus antusus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@congminh1254 congminh1254 merged commit 49411aa into main Aug 24, 2022
@congminh1254 congminh1254 deleted the sdk-2253-add-content-type-sign-request branch August 24, 2022 12:17
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