Skip to content

Commit 9debfcc

Browse files
Version 3.13.1-RC1-v2.1-21.1.02.00 release (#195)
Co-authored-by: DevCenter-DocuSign <[email protected]>
1 parent bbf5aa5 commit 9debfcc

File tree

8 files changed

+153
-17
lines changed

8 files changed

+153
-17
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# DocuSign Java Client Changelog
22
See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for Product Release Notes.
33

4+
## [v3.13.1-RC1] - eSignature API v2.1-21.1.02.00 - 2021-05-28
5+
### Fixed
6+
- Issue [`#194`](https://github.com/docusign/docusign-java-client/issues/194): Error Reading Entity from Input Stream. (DCM-5802)
7+
48
## [v3.13.0-RC1] - eSignature API v2.1-21.1.02.00 - 2021-05-24
59
### Removed
610
- Removed methods `getAccountSettingsExport`,`getSealProviders` from Accounts.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This SDK is provided as open source, which enables you to customize its function
2727
<dependency>
2828
<groupId>com.docusign</groupId>
2929
<artifactId>docusign-esign-java</artifactId>
30-
<version>3.13.0-RC1</version>
30+
<version>3.13.1-RC1</version>
3131
</dependency>
3232
```
3333
8. If your project is still open, restart Eclipse.

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'idea'
22
apply plugin: 'eclipse'
33

44
group = 'com.docusign'
5-
version = '3.13.0-RC1'
5+
version = '3.13.1-RC1'
66

77
buildscript {
88
repositories {

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<artifactId>docusign-esign-java</artifactId>
55
<packaging>jar</packaging>
66
<name>docusign-esign-java</name>
7-
<version>3.13.0-RC1</version>
7+
<version>3.13.1-RC1</version>
88
<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>
99
<url>https://developers.docusign.com</url>
1010

src/main/java/com/docusign/esign/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public ApiClient() {
8484
this.dateFormat = new RFC3339DateFormat();
8585

8686
// Set default User-Agent.
87-
setUserAgent("Swagger-Codegen/3.13.0-RC1/java");
87+
setUserAgent("Swagger-Codegen/3.13.1-RC1/java");
8888

8989
// Setup authentications (key: authentication name, value: authentication).
9090
authentications = new HashMap<String, Authentication>();

src/main/java/com/docusign/esign/model/EnvelopeFormData.java

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.util.Objects;
44
import java.util.Arrays;
5+
import com.docusign.esign.model.EnvelopeFormDataPrefillFormData;
56
import com.docusign.esign.model.FormDataItem;
67
import com.docusign.esign.model.RecipientFormData;
78
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -25,7 +26,7 @@ public class EnvelopeFormData {
2526
private java.util.List<FormDataItem> formData = null;
2627

2728
@JsonProperty("prefillFormData")
28-
private java.util.List<FormDataItem> prefillFormData = null;
29+
private EnvelopeFormDataPrefillFormData prefillFormData = null;
2930

3031
@JsonProperty("recipientFormData")
3132
private java.util.List<RecipientFormData> recipientFormData = null;
@@ -98,29 +99,21 @@ public void setFormData(java.util.List<FormDataItem> formData) {
9899
this.formData = formData;
99100
}
100101

101-
public EnvelopeFormData prefillFormData(java.util.List<FormDataItem> prefillFormData) {
102+
public EnvelopeFormData prefillFormData(EnvelopeFormDataPrefillFormData prefillFormData) {
102103
this.prefillFormData = prefillFormData;
103104
return this;
104105
}
105106

106-
public EnvelopeFormData addPrefillFormDataItem(FormDataItem prefillFormDataItem) {
107-
if (this.prefillFormData == null) {
108-
this.prefillFormData = new java.util.ArrayList<FormDataItem>();
109-
}
110-
this.prefillFormData.add(prefillFormDataItem);
111-
return this;
112-
}
113-
114107
/**
115-
*
108+
* Get prefillFormData
116109
* @return prefillFormData
117110
**/
118111
@ApiModelProperty(value = "")
119-
public java.util.List<FormDataItem> getPrefillFormData() {
112+
public EnvelopeFormDataPrefillFormData getPrefillFormData() {
120113
return prefillFormData;
121114
}
122115

123-
public void setPrefillFormData(java.util.List<FormDataItem> prefillFormData) {
116+
public void setPrefillFormData(EnvelopeFormDataPrefillFormData prefillFormData) {
124117
this.prefillFormData = prefillFormData;
125118
}
126119

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
package com.docusign.esign.model;
2+
3+
import java.util.Objects;
4+
import java.util.Arrays;
5+
import com.docusign.esign.model.FormDataItem;
6+
import com.fasterxml.jackson.annotation.JsonProperty;
7+
import com.fasterxml.jackson.annotation.JsonCreator;
8+
import com.fasterxml.jackson.annotation.JsonValue;
9+
import io.swagger.annotations.ApiModel;
10+
import io.swagger.annotations.ApiModelProperty;
11+
12+
/**
13+
* EnvelopeFormDataPrefillFormData
14+
*/
15+
16+
public class EnvelopeFormDataPrefillFormData {
17+
@JsonProperty("formData")
18+
private java.util.List<FormDataItem> formData = null;
19+
20+
public EnvelopeFormDataPrefillFormData formData(java.util.List<FormDataItem> formData) {
21+
this.formData = formData;
22+
return this;
23+
}
24+
25+
public EnvelopeFormDataPrefillFormData addFormDataItem(FormDataItem formDataItem) {
26+
if (this.formData == null) {
27+
this.formData = new java.util.ArrayList<FormDataItem>();
28+
}
29+
this.formData.add(formDataItem);
30+
return this;
31+
}
32+
33+
/**
34+
*
35+
* @return formData
36+
**/
37+
@ApiModelProperty(value = "")
38+
public java.util.List<FormDataItem> getFormData() {
39+
return formData;
40+
}
41+
42+
public void setFormData(java.util.List<FormDataItem> formData) {
43+
this.formData = formData;
44+
}
45+
46+
47+
@Override
48+
public boolean equals(java.lang.Object o) {
49+
if (this == o) {
50+
return true;
51+
}
52+
if (o == null || getClass() != o.getClass()) {
53+
return false;
54+
}
55+
EnvelopeFormDataPrefillFormData envelopeFormDataPrefillFormData = (EnvelopeFormDataPrefillFormData) o;
56+
return Objects.equals(this.formData, envelopeFormDataPrefillFormData.formData);
57+
}
58+
59+
@Override
60+
public int hashCode() {
61+
return Objects.hash(formData);
62+
}
63+
64+
65+
@Override
66+
public String toString() {
67+
StringBuilder sb = new StringBuilder();
68+
sb.append("class EnvelopeFormDataPrefillFormData {\n");
69+
70+
sb.append(" formData: ").append(toIndentedString(formData)).append("\n");
71+
sb.append("}");
72+
return sb.toString();
73+
}
74+
75+
/**
76+
* Convert the given object to string with each line indented by 4 spaces
77+
* (except the first line).
78+
*/
79+
private String toIndentedString(java.lang.Object o) {
80+
if (o == null) {
81+
return "null";
82+
}
83+
return o.toString().replace("\n", "\n ");
84+
}
85+
86+
}
87+

src/test/java/SdkUnitTests.java

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,6 +1666,58 @@ public void DeleteSigningGroupUserTest()
16661666
}
16671667
}
16681668

1669+
@Test
1670+
public void GetFormDataTest() {
1671+
System.out.println("\nGetFormDataTest:\n" + "===========================================");
1672+
ApiClient apiClient = new ApiClient(BaseUrl);
1673+
//String currentDir = System.getProperty("user.dir");
1674+
1675+
try {
1676+
// IMPORTANT NOTE:
1677+
// the first time you ask for a JWT access token, you should grant access by making the following call
1678+
// get DocuSign OAuth authorization url:
1679+
//String oauthLoginUrl = apiClient.getJWTUri(IntegratorKey, RedirectURI, OAuthBaseUrl);
1680+
// open DocuSign OAuth authorization url in the browser, login and grant access
1681+
//Desktop.getDesktop().browse(URI.create(oauthLoginUrl));
1682+
// END OF NOTE
1683+
1684+
java.util.List<String> scopes = new ArrayList<String>();
1685+
scopes.add(OAuth.Scope_SIGNATURE);
1686+
1687+
OAuth.OAuthToken oAuthToken = apiClient.requestJWTUserToken(IntegratorKey, UserId, scopes, privateKeyBytes, 3600);
1688+
Assert.assertNotSame(null, oAuthToken);
1689+
// now that the API client has an OAuth token, let's use it in all
1690+
// DocuSign APIs
1691+
apiClient.setAccessToken(oAuthToken.getAccessToken(), oAuthToken.getExpiresIn());
1692+
UserInfo userInfo = apiClient.getUserInfo(oAuthToken.getAccessToken());
1693+
Assert.assertNotSame(null, userInfo);
1694+
Assert.assertNotNull(userInfo.getAccounts());
1695+
Assert.assertTrue(userInfo.getAccounts().size() > 0);
1696+
1697+
System.out.println("UserInfo: " + userInfo);
1698+
// parse first account's baseUrl
1699+
// below code required for production, no effect in demo (same
1700+
// domain)
1701+
apiClient.setBasePath(userInfo.getAccounts().get(0).getBaseUri() + "/restapi");
1702+
Configuration.setDefaultApiClient(apiClient);
1703+
String accountId = userInfo.getAccounts().get(0).getAccountId();
1704+
1705+
EnvelopesApi envelopesApi = new EnvelopesApi();
1706+
String envelopeId = "137e8369-3242-438e-ab0f-4808ec6047cd";
1707+
EnvelopeFormData envelopeFormData = envelopesApi.getFormData(accountId, envelopeId);
1708+
Assert.assertNotNull(envelopeFormData);
1709+
Assert.assertNotNull(envelopeFormData.getFormData());
1710+
Assert.assertNotNull(envelopeFormData.getFormData().get(0));
1711+
Assert.assertNotNull(envelopeFormData.getFormData().get(0).getName());
1712+
1713+
System.out.println("EnvelopeFormData: " + envelopeFormData);
1714+
} catch (ApiException ex) {
1715+
Assert.fail("Exception: " + ex);
1716+
} catch (Exception e) {
1717+
Assert.fail("Exception: " + e.getLocalizedMessage());
1718+
}
1719+
}
1720+
16691721
@Test
16701722
public void testRevoke() throws Exception {
16711723
ApiClient apiClient = new ApiClient(BaseUrl);

0 commit comments

Comments
 (0)