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

Enumerated Status (and update documentation) #126

Open
chtibob69 opened this issue Jan 6, 2020 · 2 comments
Open

Enumerated Status (and update documentation) #126

chtibob69 opened this issue Jan 6, 2020 · 2 comments

Comments

@chtibob69
Copy link

While looking at com.docusign.esign.model.Envelope::getStatus, we found

@ApiModelProperty(example = "null", value = "Indicates the envelope status. Valid values are:  * sent - The envelope is sent to the recipients.  *created - The envelope is saved as a draft and can be modified and sent later.")
  public String getStatus() {
    return status;
  }

But there is many other status (completed created declined deleted delivered processing sent signed template voided) listed in the API documentation https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/listStatus)

The same applies for com.docusign.esign.model.Signer::getStatus...

Could you update the documentation to match the API ?

Improvement : I think it could be much Java to create specific enum type such as

public enum SignerStateEnum {

    // The recipient is in a draft state. This is only associated with draft envelopes (envelopes with a created status).
    @JsonProperty("created")
    CREATED("created"), //

    // The recipient has been sent an email notification that it is their turn to sign an envelope.
    @JsonProperty("sent")
    SENT("sent"), //

    // The recipient has viewed the documents in an envelope through the DocuSign signing web site. This is not an email delivery of the documents in an envelope.
    @JsonProperty("delivered")
    DELIVERED("delivered"), //
  ...
    @JsonEnumDefaultValue
    UNK("unk");

What's your opinion ?

@LarryKlugerDS
Copy link
Contributor

Thank you for your issue report.
Re: definition of the envelope status attribute. I've filed DEVDOCS-1818 to fix this.

Here is my recommendation for the definition:
The envelope's status.
Values are:
*completed: The envelope has been completed and all tags have been signed.
*created: The envelope is created as a draft. It can be modified and sent later.
*declined: The envelope has been declined by the recipients.
*delivered: The envelope has been delivered to the recipients.
*sent: The envelope is sent to the recipients.
*signed: The envelope has been signed by the recipients.
*voided: The envelope is no longer valid and recipients cannot access or sign the envelope.

During object creation, only created and sent values are allowed.

Re: Use enumerated value types for status and for the other API attributes with specific enumerated values. Yup, we agree. The first step is for the DocuSign eSignature Swagger file to be updated with the enumerated type attributes and values. Once that's done, we'll update the SDKs to use the Swagger information to create the enums for the Java SDK.

The first step has been requested and is on the roadmap but it is a large project.

Thank you for using DocuSign.

@jasonrberk
Copy link

@LarryKlugerDS you responded back in 2020 and I still don't see enums or constants available?

https://stackoverflow.com/questions/74689092/why-is-the-docusign-java-sdk-is-not-typesafe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants