Skip to content

Commit c12603f

Browse files
authored
Merge pull request #74 from docusign/2.6.0
version 2.6.0
2 parents be073fa + 62094a1 commit c12603f

File tree

16 files changed

+1023
-449
lines changed

16 files changed

+1023
-449
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for
77
### Changed
88
- Updated the package with the latest API monthly release.
99

10+
## [2.6.0] - 2018-05-16
11+
12+
### Added
13+
- Support for OAuth implicit grant.
14+
- Support for OAuth Get User Info.
15+
1016
## [2.5.1] - 2018-04-21
1117
### Fixed
1218
- PR [`#71`](https://github.com/docusign/docusign-java-client/pull/71): Empty response body in ApiException.

README.md

Lines changed: 110 additions & 116 deletions
Large diffs are not rendered by default.

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 = '2.5.1'
5+
version = '2.6.0'
66

77
buildscript {
88
repositories {

params.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Docusign-java-client",
33
"tagline": "Java Client Library used to interact with the DocuSign REST API. Send, sign, and approve documents using this client.",
4-
"body": "# DocuSign Java Client\r\n\r\nYou can sign up for a free [developer sandbox](https://www.docusign.com/developer-center).\r\n\r\nRequirements\r\n============\r\n\r\nJava 1.6 or later. \r\n\r\nInstallation\r\n============\r\n\r\n### Maven users\r\n\r\nAdd this dependency to your project's POM:\r\n\r\n```xml\r\n<dependency>\r\n <groupId>com.docusign</groupId>\r\n <artifactId>docusign-esign-java</artifactId>\r\n <version>2.1.0</version>\r\n</dependency>\r\n```\r\n\r\n### Gradle users\r\n\r\nAdd this dependency to your project's build file:\r\n\r\n```groovy\r\ncompile \"com.docusign:docusign-esign-java:2.1.0\"\r\n```\r\n\r\n#### Note for Android Developers \r\n\r\nIf you encounter build errors due to duplicate definitions, include the following in your build.gradle module:\r\n\r\n```\r\nandroid {\r\n packagingOptions {\r\n pickFirst 'META-INF/services/javax.ws.rs.ext.MessageBodyReader’\r\n pickFirst 'META-INF/services/javax.ws.rs.ext.MessageBodyWriter’\r\n pickFirst 'META-INF/services/com.sun.jersey.spi.inject.InjectableProvider’\r\n pickFirst 'META-INF/jersey-module-version' pickFirst 'META-INF/NOTICE’\r\n pickFirst 'META-INF/LICENSE’\r\n pickFirst 'META-INF/services/com.fasterxml.jackson.databind.Module’\r\n pickFirst 'META-INF/services/com.fasterxml.jackson.core.ObjectCodec’\r\n pickFirst 'META-INF/services/com.fasterxml.jackson.core.JsonFactory’\r\n }\r\n}\r\n```\r\n\r\n### Package Managers\r\n\r\nThis client is available through the following Java package managers:\r\n\r\n- [Nexus Repository Manager](https://oss.sonatype.org/#nexus-search;quick~docusign-esign-java) (oss.sonatype.org). You can search for com.docusign or docusign-esign-java. The current version is 2.1.0.\r\n- [JFrog Bintray](https://bintray.com/search?query=docusign-esign-java) (bintray.com). You can search for com.docusign or docusign-esign-java. The current version is 2.1.0.\r\n\r\n### Others\r\n\r\nOr you can manually download and add the following JARs to your project:\r\n\r\n* The [docusign-esign-java-2.1.0](/target/docusign-esign-java-2.1.0.jar) JAR.\r\n* The [Dependency JARs](/target/lib) in /lib folder.\r\n\r\n\r\nUsage\r\n=====\r\n\r\nTo send a signature request from a Template:\r\n\r\n```java\r\nimport com.docusign.esign.api.*;\r\nimport com.docusign.esign.client.*;\r\nimport com.docusign.esign.model.*;\r\n\r\npublic class DocuSignExample {\r\n\tpublic static void main(String[] args) {\r\n\t\tString username = \"[EMAIL]\";\r\n\t\tString password = \"[PASSWORD]\";\r\n\t\tString integratorKey = \"[INTEGRATOR_KEY]\";\r\n\t\t\r\n\t\t// initialize client for desired environment and add X-DocuSign-Authentication header\r\n\t\tApiClient apiClient = new ApiClient();\r\n\t\tapiClient.setBasePath(\"https://demo.docusign.net/restapi\");\r\n\t\t\r\n\t\t// configure 'X-DocuSign-Authentication' authentication header\r\n String authHeader = \"{\\\"Username\\\":\\\"\" + username + \"\\\",\\\"Password\\\":\\\"\" + password + \"\\\",\\\"IntegratorKey\\\":\\\"\" + integratorKey + \"\\\"}\";\r\n apiClient.addDefaultHeader(\"X-DocuSign-Authentication\", authHeader);\r\n Configuration.setDefaultApiClient(apiClient);\r\n try\r\n {\r\n \r\n /////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n // STEP 1: AUTHENTICATE TO RETRIEVE ACCOUNTID & BASEURL \r\n /////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n\t \r\n AuthenticationApi authApi = new AuthenticationApi();\r\n LoginInformation loginInfo = authApi.login();\r\n \r\n // parse first account ID (user might belong to multiple accounts) and baseUrl\r\n String accountId = loginInfo.getLoginAccounts().get(0).getAccountId(); \r\n String baseUrl = loginInfo.getLoginAccounts().get(0).getBaseUrl();\r\n String[] accountDomain = baseUrl.split(\"/v2\");\r\n \r\n // below code required for production, no effect in demo (same domain) \r\n apiClient.setBasePath(accountDomain[0]);\r\n Configuration.setDefaultApiClient(apiClient);\r\n \r\n /////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n // *** STEP 2: CREATE ENVELOPE FROM TEMPLATE \r\n /////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n \r\n // create a new envelope to manage the signature request\r\n EnvelopeDefinition envDef = new EnvelopeDefinition();\r\n envDef.setEmailSubject(\"DocuSign Java SDK - Sample Signature Request\");\r\n \r\n // assign template information including ID and role(s)\r\n envDef.setTemplateId(\"[TEMPLATE_ID]\");\r\n \r\n // create a template role with a valid templateId and roleName and assign signer info\r\n TemplateRole tRole = new TemplateRole();\r\n tRole.setRoleName(\"[ROLE_NAME]\");\r\n tRole.setName(\"[SIGNER_NAME]\");\r\n tRole.setEmail(\"[SIGNER_EMAIL]\");\r\n \r\n // create a list of template roles and add our newly created role\r\n List<TemplateRole> templateRolesList = new ArrayList<TemplateRole>();\r\n templateRolesList.add(tRole);\r\n \r\n // assign template role(s) to the envelope \r\n envDef.setTemplateRoles(templateRolesList);\r\n \r\n // send the envelope by setting |status| to \"sent\". To save as a draft set to \"created\"\r\n envDef.setStatus(\"sent\");\r\n \r\n // instantiate a new EnvelopesApi object\r\n EnvelopesApi envelopesApi = new EnvelopesApi();\r\n \r\n // call the createEnvelope() API\r\n EnvelopeSummary envelopeSummary = envelopesApi.createEnvelope(accountId, envDef);\r\n }\r\n catch (com.docusign.esign.client.ApiException ex)\r\n {\r\n System.out.println(\"Exception: \" + ex);\r\n }\r\n\t}\r\n} \r\n```\r\n\r\nSee [SdkUnitTests.java](https://github.com/docusign/docusign-java-client/blob/master/src/test/java/SdkUnitTests.java) for more examples.\r\n\r\nTesting\r\n=======\r\n\r\nYou must have Maven installed. To run the tests:\r\n\r\n mvn test\r\n\r\nSupport\r\n=======\r\n\r\nFeel free to log issues against this client through GitHub. We also have an active developer community on Stack Overflow, search the [DocuSignAPI](http://stackoverflow.com/questions/tagged/docusignapi) tag.\r\n\r\nLicense\r\n=======\r\n\r\nThe DocuSign Java Client is licensed under the following [License](LICENSE).",
4+
"body": "# DocuSign Java Client\r\n\r\nYou can sign up for a free [developer sandbox](https://www.docusign.com/developer-center).\r\n\r\nRequirements\r\n============\r\n\r\nJava 1.7 or later. \r\n\r\nInstallation\r\n============\r\n\r\n### Maven users\r\n\r\nAdd this dependency to your project's POM:\r\n\r\n```xml\r\n<dependency>\r\n <groupId>com.docusign</groupId>\r\n <artifactId>docusign-esign-java</artifactId>\r\n <version>2.1.0</version>\r\n</dependency>\r\n```\r\n\r\n### Gradle users\r\n\r\nAdd this dependency to your project's build file:\r\n\r\n```groovy\r\ncompile \"com.docusign:docusign-esign-java:2.1.0\"\r\n```\r\n\r\n#### Note for Android Developers \r\n\r\nIf you encounter build errors due to duplicate definitions, include the following in your build.gradle module:\r\n\r\n```\r\nandroid {\r\n packagingOptions {\r\n pickFirst 'META-INF/services/javax.ws.rs.ext.MessageBodyReader’\r\n pickFirst 'META-INF/services/javax.ws.rs.ext.MessageBodyWriter’\r\n pickFirst 'META-INF/services/com.sun.jersey.spi.inject.InjectableProvider’\r\n pickFirst 'META-INF/jersey-module-version' pickFirst 'META-INF/NOTICE’\r\n pickFirst 'META-INF/LICENSE’\r\n pickFirst 'META-INF/services/com.fasterxml.jackson.databind.Module’\r\n pickFirst 'META-INF/services/com.fasterxml.jackson.core.ObjectCodec’\r\n pickFirst 'META-INF/services/com.fasterxml.jackson.core.JsonFactory’\r\n }\r\n}\r\n```\r\n\r\n### Package Managers\r\n\r\nThis client is available through the following Java package managers:\r\n\r\n- [Nexus Repository Manager](https://oss.sonatype.org/#nexus-search;quick~docusign-esign-java) (oss.sonatype.org). You can search for com.docusign or docusign-esign-java. The current version is 2.1.0.\r\n- [JFrog Bintray](https://bintray.com/search?query=docusign-esign-java) (bintray.com). You can search for com.docusign or docusign-esign-java. The current version is 2.1.0.\r\n\r\n### Others\r\n\r\nOr you can manually download and add the following JARs to your project:\r\n\r\n* The [docusign-esign-java-2.1.0](/target/docusign-esign-java-2.1.0.jar) JAR.\r\n* The [Dependency JARs](/target/lib) in /lib folder.\r\n\r\n\r\nUsage\r\n=====\r\n\r\nTo send a signature request from a Template:\r\n\r\n```java\r\nimport com.docusign.esign.api.*;\r\nimport com.docusign.esign.client.*;\r\nimport com.docusign.esign.model.*;\r\n\r\npublic class DocuSignExample {\r\n\tpublic static void main(String[] args) {\r\n\t\tString username = \"[EMAIL]\";\r\n\t\tString password = \"[PASSWORD]\";\r\n\t\tString integratorKey = \"[INTEGRATOR_KEY]\";\r\n\t\t\r\n\t\t// initialize client for desired environment and add X-DocuSign-Authentication header\r\n\t\tApiClient apiClient = new ApiClient();\r\n\t\tapiClient.setBasePath(\"https://demo.docusign.net/restapi\");\r\n\t\t\r\n\t\t// configure 'X-DocuSign-Authentication' authentication header\r\n String authHeader = \"{\\\"Username\\\":\\\"\" + username + \"\\\",\\\"Password\\\":\\\"\" + password + \"\\\",\\\"IntegratorKey\\\":\\\"\" + integratorKey + \"\\\"}\";\r\n apiClient.addDefaultHeader(\"X-DocuSign-Authentication\", authHeader);\r\n Configuration.setDefaultApiClient(apiClient);\r\n try\r\n {\r\n \r\n /////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n // STEP 1: AUTHENTICATE TO RETRIEVE ACCOUNTID & BASEURL \r\n /////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n\t \r\n AuthenticationApi authApi = new AuthenticationApi();\r\n LoginInformation loginInfo = authApi.login();\r\n \r\n // parse first account ID (user might belong to multiple accounts) and baseUrl\r\n String accountId = loginInfo.getLoginAccounts().get(0).getAccountId(); \r\n String baseUrl = loginInfo.getLoginAccounts().get(0).getBaseUrl();\r\n String[] accountDomain = baseUrl.split(\"/v2\");\r\n \r\n // below code required for production, no effect in demo (same domain) \r\n apiClient.setBasePath(accountDomain[0]);\r\n Configuration.setDefaultApiClient(apiClient);\r\n \r\n /////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n // *** STEP 2: CREATE ENVELOPE FROM TEMPLATE \r\n /////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n \r\n // create a new envelope to manage the signature request\r\n EnvelopeDefinition envDef = new EnvelopeDefinition();\r\n envDef.setEmailSubject(\"DocuSign Java SDK - Sample Signature Request\");\r\n \r\n // assign template information including ID and role(s)\r\n envDef.setTemplateId(\"[TEMPLATE_ID]\");\r\n \r\n // create a template role with a valid templateId and roleName and assign signer info\r\n TemplateRole tRole = new TemplateRole();\r\n tRole.setRoleName(\"[ROLE_NAME]\");\r\n tRole.setName(\"[SIGNER_NAME]\");\r\n tRole.setEmail(\"[SIGNER_EMAIL]\");\r\n \r\n // create a list of template roles and add our newly created role\r\n List<TemplateRole> templateRolesList = new ArrayList<TemplateRole>();\r\n templateRolesList.add(tRole);\r\n \r\n // assign template role(s) to the envelope \r\n envDef.setTemplateRoles(templateRolesList);\r\n \r\n // send the envelope by setting |status| to \"sent\". To save as a draft set to \"created\"\r\n envDef.setStatus(\"sent\");\r\n \r\n // instantiate a new EnvelopesApi object\r\n EnvelopesApi envelopesApi = new EnvelopesApi();\r\n \r\n // call the createEnvelope() API\r\n EnvelopeSummary envelopeSummary = envelopesApi.createEnvelope(accountId, envDef);\r\n }\r\n catch (com.docusign.esign.client.ApiException ex)\r\n {\r\n System.out.println(\"Exception: \" + ex);\r\n }\r\n\t}\r\n} \r\n```\r\n\r\nSee [SdkUnitTests.java](https://github.com/docusign/docusign-java-client/blob/master/src/test/java/SdkUnitTests.java) for more examples.\r\n\r\nTesting\r\n=======\r\n\r\nYou must have Maven installed. To run the tests:\r\n\r\n mvn test\r\n\r\nSupport\r\n=======\r\n\r\nFeel free to log issues against this client through GitHub. We also have an active developer community on Stack Overflow, search the [DocuSignAPI](http://stackoverflow.com/questions/tagged/docusignapi) tag.\r\n\r\nLicense\r\n=======\r\n\r\nThe DocuSign Java Client is licensed under the following [License](LICENSE).",
55
"note": "Don't delete this file! It's used internally to help with page regeneration."
66
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>docusign-esign-java</artifactId>
66
<packaging>jar</packaging>
77
<name>docusign-esign-java</name>
8-
<version>2.5.1</version>
8+
<version>2.6.0</version>
99
<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>
1010
<url>https://www.docusign.com/developer-center</url>
1111

0 commit comments

Comments
 (0)