X Tutup
Skip to content
This repository was archived by the owner on Oct 17, 2023. It is now read-only.

hellosign/hellosign-java-sdk

 
 

Repository files navigation

hellosign-java-sdk

Dropbox Sign v3 API

⚠ This package is not yet ready for production use ⚠

We are working hard on getting this package ready, but it is not there, yet!

You should think twice before using package on anything critical.

The interfaces may change without warning. Backwards compatibility is not yet guaranteed nor implied!

Contributing

Submodule

This repo is no longer accepting new issues or Pull Requests. All issues or Pull Requests must be opened against the hellosign/hellosign-openapi repo!

Changes to the SDK code

You must make SDK code changes in the mustache file within the templates directory that corresponds to the file you want updated.

We use OpenAPI Generator to automatically generate this SDK from the OAS, using the template files.

Building

You must have docker (or podman linked to docker) installed. Highly recommended to use rootless docker.

Run the following and everything is done for you:

./run-build

Attention: Any changes you have made to the SDK code that you have not made to the OAS file and/or the mustache template files will be lost when you run this command.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.hellosign</groupId>
  <artifactId>hellosign-java-sdk</artifactId>
  <version>6.0.0-beta22.22</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

  repositories {
    mavenCentral()     // Needed if the 'hellosign-java-sdk' jar has been published to maven central.
    mavenLocal()       // Needed if the 'hellosign-java-sdk' jar has been published to the local maven repo.
  }

  dependencies {
     implementation "com.hellosign:hellosign-java-sdk:6.0.0-beta22.22"
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/hellosign-java-sdk-6.0.0-beta22.22.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import com.hellosign.openapi.ApiClient;
import com.hellosign.openapi.ApiException;
import com.hellosign.openapi.Configuration;
import com.hellosign.openapi.api.*;
import com.hellosign.openapi.auth.HttpBasicAuth;
import com.hellosign.openapi.auth.HttpBearerAuth;
import com.hellosign.openapi.model.*;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure HTTP basic authorization: api_key
        HttpBasicAuth api_key = (HttpBasicAuth) defaultClient
            .getAuthentication("api_key");
        api_key.setUsername("YOUR_API_KEY");

        // or, configure Bearer (JWT) authorization: oauth2
        /*
        HttpBearerAuth oauth2 = (HttpBearerAuth) defaultClient
            .getAuthentication("oauth2");

        oauth2.setBearerToken("YOUR_ACCESS_TOKEN");
        */

        AccountApi api = new AccountApi(defaultClient);

        AccountCreateRequest data = new AccountCreateRequest()
            .emailAddress("newuser@hellosign.com");

        try {
            AccountCreateResponse result = api.accountCreate(data);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountApi#accountCreate");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Using a Proxy

To add a HTTP proxy for the API client, use ClientConfig:

  import org.glassfish.jersey.apache.connector.ApacheConnectorProvider;
  import org.glassfish.jersey.client.ClientConfig;
  import org.glassfish.jersey.client.ClientProperties;
  import com.hellosign.openapi.*;
  import com.hellosign.openapi.api.AccountApi;

  ...

  ApiClient defaultClient = Configuration.getDefaultApiClient();
  ClientConfig clientConfig = defaultClient.getClientConfig();
  clientConfig.connectorProvider(new ApacheConnectorProvider());
  clientConfig.property(ClientProperties.PROXY_URI, "http://proxy_url_here");
  clientConfig.property(ClientProperties.PROXY_USERNAME, "proxy_username");
  clientConfig.property(ClientProperties.PROXY_PASSWORD, "proxy_password");
  defaultClient.setClientConfig(clientConfig);

  AccountApi apiInstance = new AccountApi(defaultClient);

Documentation for API Endpoints

All URIs are relative to https://api.hellosign.com/v3

Class Method HTTP request Description
AccountApi accountCreate POST /account/create Create Account
AccountApi accountGet GET /account Get Account
AccountApi accountUpdate PUT /account Update Account
AccountApi accountVerify POST /account/verify Verify Account
ApiAppApi apiAppCreate POST /api_app Create API App
ApiAppApi apiAppDelete DELETE /api_app/{client_id} Delete API App
ApiAppApi apiAppGet GET /api_app/{client_id} Get API App
ApiAppApi apiAppList GET /api_app/list List API Apps
ApiAppApi apiAppUpdate PUT /api_app/{client_id} Update API App
BulkSendJobApi bulkSendJobGet GET /bulk_send_job/{bulk_send_job_id} Get Bulk Send Job
BulkSendJobApi bulkSendJobList GET /bulk_send_job/list List Bulk Send Jobs
EmbeddedApi embeddedEditUrl POST /embedded/edit_url/{template_id} Get Embedded Template Edit URL
EmbeddedApi embeddedSignUrl GET /embedded/sign_url/{signature_id} Get Embedded Sign URL
OAuthApi oauthTokenGenerate POST /oauth/token OAuth Token Generate
OAuthApi oauthTokenRefresh POST /oauth/token?refresh OAuth Token Refresh
ReportApi reportCreate POST /report/create Create Report
SignatureRequestApi signatureRequestBulkCreateEmbeddedWithTemplate POST /signature_request/bulk_create_embedded_with_template Embedded Bulk Send with Template
SignatureRequestApi signatureRequestBulkSendWithTemplate POST /signature_request/bulk_send_with_template Bulk Send with Template
SignatureRequestApi signatureRequestCancel POST /signature_request/cancel/{signature_request_id} Cancel Incomplete Signature Request
SignatureRequestApi signatureRequestCreateEmbedded POST /signature_request/create_embedded Create Embedded Signature Request
SignatureRequestApi signatureRequestCreateEmbeddedWithTemplate POST /signature_request/create_embedded_with_template Create Embedded Signature Request with Template
SignatureRequestApi signatureRequestFiles GET /signature_request/files/{signature_request_id} Download Files
SignatureRequestApi signatureRequestFilesAsDataUri GET /signature_request/files_as_data_uri/{signature_request_id} Download Files as Data Uri
SignatureRequestApi signatureRequestFilesAsFileUrl GET /signature_request/files_as_file_url/{signature_request_id} Download Files as File Url
SignatureRequestApi signatureRequestGet GET /signature_request/{signature_request_id} Get Signature Request
SignatureRequestApi signatureRequestList GET /signature_request/list List Signature Requests
SignatureRequestApi signatureRequestReleaseHold POST /signature_request/release_hold/{signature_request_id} Release On-Hold Signature Request
SignatureRequestApi signatureRequestRemind POST /signature_request/remind/{signature_request_id} Send Request Reminder
SignatureRequestApi signatureRequestRemove POST /signature_request/remove/{signature_request_id} Remove Signature Request Access
SignatureRequestApi signatureRequestSend POST /signature_request/send Send Signature Request
SignatureRequestApi signatureRequestSendWithTemplate POST /signature_request/send_with_template Send with Template
SignatureRequestApi signatureRequestUpdate POST /signature_request/update/{signature_request_id} Update Signature Request
TeamApi teamAddMember PUT /team/add_member Add User to Team
TeamApi teamCreate POST /team/create Create Team
TeamApi teamDelete DELETE /team/destroy Delete Team
TeamApi teamGet GET /team Get Team
TeamApi teamInfo GET /team/info Get Team Info
TeamApi teamInvites GET /team/invites List Team Invites
TeamApi teamMembers GET /team/members/{team_id} List Team Members
TeamApi teamRemoveMember POST /team/remove_member Remove User from Team
TeamApi teamSubTeams GET /team/sub_teams/{team_id} List Sub Teams
TeamApi teamUpdate PUT /team Update Team
TemplateApi templateAddUser POST /template/add_user/{template_id} Add User to Template
TemplateApi templateCreateEmbeddedDraft POST /template/create_embedded_draft Create Embedded Template Draft
TemplateApi templateDelete POST /template/delete/{template_id} Delete Template
TemplateApi templateFiles GET /template/files/{template_id} Get Template Files
TemplateApi templateFilesAsDataUri GET /template/files_as_data_uri/{template_id} Get Template Files as Data Uri
TemplateApi templateFilesAsFileUrl GET /template/files_as_file_url/{template_id} Get Template Files as File Url
TemplateApi templateGet GET /template/{template_id} Get Template
TemplateApi templateList GET /template/list List Templates
TemplateApi templateRemoveUser POST /template/remove_user/{template_id} Remove User from Template
TemplateApi templateUpdateFiles POST /template/update_files/{template_id} Update Template Files
UnclaimedDraftApi unclaimedDraftCreate POST /unclaimed_draft/create Create Unclaimed Draft
UnclaimedDraftApi unclaimedDraftCreateEmbedded POST /unclaimed_draft/create_embedded Create Embedded Unclaimed Draft
UnclaimedDraftApi unclaimedDraftCreateEmbeddedWithTemplate POST /unclaimed_draft/create_embedded_with_template Create Embedded Unclaimed Draft with Template
UnclaimedDraftApi unclaimedDraftEditAndResend POST /unclaimed_draft/edit_and_resend/{signature_request_id} Edit and Resend Unclaimed Draft

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

api_key

  • Type: HTTP basic authentication

oauth2

  • Type: HTTP basic authentication

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

apisupport@hellosign.com

About this package

This Java package is automatically generated by the OpenAPI Generator project:

  • API version: 3.0.0
    • Package version: 6.0.0-beta22.22
  • Build package: org.openapitools.codegen.languages.JavaClientCodegen

Working on this SDK

This section includes documentation about how to generate the SDK in case you want to make a contribution.

Building the SDK with Docker

Run ./build

Installation / Deployment

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

About

A Java SDK for the HelloSign API.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

X Tutup