Skip to content

Commit

Permalink
Version 2.21.1-RC1-v2-21.1.02.00 release (#196)
Browse files Browse the repository at this point in the history
Co-authored-by: DevCenter-DocuSign <dcdev@docusign.com>
  • Loading branch information
mmallis87 and DevCenter-DocuSign committed May 28, 2021
1 parent a016686 commit 79ac6b1
Show file tree
Hide file tree
Showing 8 changed files with 153 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# DocuSign Java Client Changelog
See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for Product Release Notes.

## [v2.21.1-RC1] - eSignature API v2.-21.1.02.00 - 2021-05-28
### Fixed
- Issue [`#194`](https://github.com/docusign/docusign-java-client/issues/194): Error Reading Entity from Input Stream. (DCM-5802)

## [v2.21.0-RC1] - eSignature API v2-21.1.02.00 - 2021-05-24
### Removed
- Removed methods `getAccountSettingsExport`,`getSealProviders` from Accounts.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This SDK is provided as open source, which enables you to customize its function
<dependency>
<groupId>com.docusign</groupId>
<artifactId>docusign-esign-java</artifactId>
<version>2.21.0-RC1</version>
<version>2.21.1-RC1</version>
</dependency>
```
8. If your project is still open, restart Eclipse.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'idea'
apply plugin: 'eclipse'

group = 'com.docusign'
version = '2.21.0-RC1'
version = '2.21.1-RC1'

buildscript {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<artifactId>docusign-esign-java</artifactId>
<packaging>jar</packaging>
<name>docusign-esign-java</name>
<version>2.21.0-RC1</version>
<version>2.21.1-RC1</version>
<description>The official DocuSign eSignature JAVA client is based on version 2 of the DocuSign REST API and provides libraries for JAVA application integration. It is recommended that you use this version of the library for new development.</description>
<url>https://developers.docusign.com</url>

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/docusign/esign/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public ApiClient() {
this.dateFormat = new RFC3339DateFormat();

// Set default User-Agent.
setUserAgent("Swagger-Codegen/2.21.0-RC1/java");
setUserAgent("Swagger-Codegen/2.21.1-RC1/java");

// Setup authentications (key: authentication name, value: authentication).
authentications = new HashMap<String, Authentication>();
Expand Down
19 changes: 6 additions & 13 deletions src/main/java/com/docusign/esign/model/EnvelopeFormData.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.util.Objects;
import java.util.Arrays;
import com.docusign.esign.model.EnvelopeFormDataPrefillFormData;
import com.docusign.esign.model.NameValue;
import com.docusign.esign.model.RecipientFormData;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand All @@ -25,7 +26,7 @@ public class EnvelopeFormData {
private java.util.List<NameValue> formData = null;

@JsonProperty("prefillFormData")
private java.util.List<NameValue> prefillFormData = null;
private EnvelopeFormDataPrefillFormData prefillFormData = null;

@JsonProperty("recipientFormData")
private java.util.List<RecipientFormData> recipientFormData = null;
Expand Down Expand Up @@ -98,29 +99,21 @@ public void setFormData(java.util.List<NameValue> formData) {
this.formData = formData;
}

public EnvelopeFormData prefillFormData(java.util.List<NameValue> prefillFormData) {
public EnvelopeFormData prefillFormData(EnvelopeFormDataPrefillFormData prefillFormData) {
this.prefillFormData = prefillFormData;
return this;
}

public EnvelopeFormData addPrefillFormDataItem(NameValue prefillFormDataItem) {
if (this.prefillFormData == null) {
this.prefillFormData = new java.util.ArrayList<NameValue>();
}
this.prefillFormData.add(prefillFormDataItem);
return this;
}

/**
*
* Get prefillFormData
* @return prefillFormData
**/
@ApiModelProperty(value = "")
public java.util.List<NameValue> getPrefillFormData() {
public EnvelopeFormDataPrefillFormData getPrefillFormData() {
return prefillFormData;
}

public void setPrefillFormData(java.util.List<NameValue> prefillFormData) {
public void setPrefillFormData(EnvelopeFormDataPrefillFormData prefillFormData) {
this.prefillFormData = prefillFormData;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
package com.docusign.esign.model;

import java.util.Objects;
import java.util.Arrays;
import com.docusign.esign.model.NameValue;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
* EnvelopeFormDataPrefillFormData
*/

public class EnvelopeFormDataPrefillFormData {
@JsonProperty("formData")
private java.util.List<NameValue> formData = null;

public EnvelopeFormDataPrefillFormData formData(java.util.List<NameValue> formData) {
this.formData = formData;
return this;
}

public EnvelopeFormDataPrefillFormData addFormDataItem(NameValue formDataItem) {
if (this.formData == null) {
this.formData = new java.util.ArrayList<NameValue>();
}
this.formData.add(formDataItem);
return this;
}

/**
*
* @return formData
**/
@ApiModelProperty(value = "")
public java.util.List<NameValue> getFormData() {
return formData;
}

public void setFormData(java.util.List<NameValue> formData) {
this.formData = formData;
}


@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EnvelopeFormDataPrefillFormData envelopeFormDataPrefillFormData = (EnvelopeFormDataPrefillFormData) o;
return Objects.equals(this.formData, envelopeFormDataPrefillFormData.formData);
}

@Override
public int hashCode() {
return Objects.hash(formData);
}


@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EnvelopeFormDataPrefillFormData {\n");

sb.append(" formData: ").append(toIndentedString(formData)).append("\n");
sb.append("}");
return sb.toString();
}

/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}

}

52 changes: 52 additions & 0 deletions src/test/java/SdkUnitTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -1704,6 +1704,58 @@ public void DeleteSigningGroupUserTest()
}
}

@Test
public void GetFormDataTest() {
System.out.println("\nGetFormDataTest:\n" + "===========================================");
ApiClient apiClient = new ApiClient(BaseUrl);
//String currentDir = System.getProperty("user.dir");

try {
// IMPORTANT NOTE:
// the first time you ask for a JWT access token, you should grant access by making the following call
// get DocuSign OAuth authorization url:
//String oauthLoginUrl = apiClient.getJWTUri(IntegratorKey, RedirectURI, OAuthBaseUrl);
// open DocuSign OAuth authorization url in the browser, login and grant access
//Desktop.getDesktop().browse(URI.create(oauthLoginUrl));
// END OF NOTE

java.util.List<String> scopes = new ArrayList<String>();
scopes.add(OAuth.Scope_SIGNATURE);

OAuth.OAuthToken oAuthToken = apiClient.requestJWTUserToken(IntegratorKey, UserId, scopes, privateKeyBytes, 3600);
Assert.assertNotSame(null, oAuthToken);
// now that the API client has an OAuth token, let's use it in all
// DocuSign APIs
apiClient.setAccessToken(oAuthToken.getAccessToken(), oAuthToken.getExpiresIn());
UserInfo userInfo = apiClient.getUserInfo(oAuthToken.getAccessToken());
Assert.assertNotSame(null, userInfo);
Assert.assertNotNull(userInfo.getAccounts());
Assert.assertTrue(userInfo.getAccounts().size() > 0);

System.out.println("UserInfo: " + userInfo);
// parse first account's baseUrl
// below code required for production, no effect in demo (same
// domain)
apiClient.setBasePath(userInfo.getAccounts().get(0).getBaseUri() + "/restapi");
Configuration.setDefaultApiClient(apiClient);
String accountId = userInfo.getAccounts().get(0).getAccountId();

EnvelopesApi envelopesApi = new EnvelopesApi();
String envelopeId = "137e8369-3242-438e-ab0f-4808ec6047cd";
EnvelopeFormData envelopeFormData = envelopesApi.getFormData(accountId, envelopeId);
Assert.assertNotNull(envelopeFormData);
Assert.assertNotNull(envelopeFormData.getFormData());
Assert.assertNotNull(envelopeFormData.getFormData().get(0));
Assert.assertNotNull(envelopeFormData.getFormData().get(0).getName());

System.out.println("EnvelopeFormData: " + envelopeFormData);
} catch (ApiException ex) {
Assert.fail("Exception: " + ex);
} catch (Exception e) {
Assert.fail("Exception: " + e.getLocalizedMessage());
}
}

@Test
public void testRevoke() throws Exception {
ApiClient apiClient = new ApiClient(BaseUrl);
Expand Down

0 comments on commit 79ac6b1

Please sign in to comment.