hellosign-ruby-sdk 3.7.0 → 3.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hello_sign.rb +4 -5
- data/lib/hello_sign/api/account.rb +3 -4
- data/lib/hello_sign/api/api_app.rb +27 -22
- data/lib/hello_sign/api/embedded.rb +14 -10
- data/lib/hello_sign/api/oauth.rb +24 -17
- data/lib/hello_sign/api/signature_request.rb +156 -86
- data/lib/hello_sign/api/team.rb +19 -19
- data/lib/hello_sign/api/template.rb +68 -33
- data/lib/hello_sign/api/unclaimed_draft.rb +114 -66
- data/lib/hello_sign/client.rb +23 -26
- data/lib/hello_sign/configuration.rb +0 -1
- data/lib/hello_sign/resource/account.rb +8 -10
- data/lib/hello_sign/resource/api_app.rb +5 -7
- data/lib/hello_sign/resource/base_resource.rb +8 -12
- data/lib/hello_sign/resource/embedded.rb +8 -10
- data/lib/hello_sign/resource/resource_array.rb +3 -5
- data/lib/hello_sign/resource/signature_request.rb +7 -10
- data/lib/hello_sign/resource/team.rb +7 -9
- data/lib/hello_sign/resource/template.rb +7 -9
- data/lib/hello_sign/resource/template_draft.rb +7 -9
- data/lib/hello_sign/resource/unclaimed_draft.rb +8 -8
- data/lib/hello_sign/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0cc3e4f7c32e8b3350b2859e11d67afe4015934
|
4
|
+
data.tar.gz: 61b340752b75b9fca5171b5fc9f7178c591e0f61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c90e577bee0dc8ecbd2f9875faf53b851ff8eeca7ff126bd3480cdb9b3c082144c1a0c93c81bbf0152a51603540988fd4e12aca0f20ad7e8550d1b75a5de86bc
|
7
|
+
data.tar.gz: eca005244bfe6735a00181d89d855fa6dba5fc7877bd9c1d4c5149667c3ed293dddc0590e44e66495406341a667d0c610c6df10cfcc4dee2142608b6a5d4ca60
|
data/lib/hello_sign.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#
|
2
2
|
# The MIT License (MIT)
|
3
|
-
#
|
3
|
+
#
|
4
4
|
# Copyright (C) 2014 hellosign.com
|
5
|
-
#
|
5
|
+
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the "Software"), to deal
|
8
8
|
# in the Software without restriction, including without limitation the rights
|
@@ -28,9 +28,8 @@ require 'hello_sign/client'
|
|
28
28
|
|
29
29
|
module HelloSign
|
30
30
|
extend Configuration
|
31
|
-
|
32
31
|
#
|
33
|
-
# # If HelloSign module
|
32
|
+
# # If HelloSign module doesn't respond to method, then delegates it to HelloSign::Client
|
34
33
|
# @param method [Symbol] method name
|
35
34
|
# @param *args [Array] arguments passed into the method
|
36
35
|
# @param &block [Block] a block passed into the method
|
@@ -41,7 +40,7 @@ module HelloSign
|
|
41
40
|
end
|
42
41
|
|
43
42
|
#
|
44
|
-
# If HelloSign module don't
|
43
|
+
# If HelloSign module don't respond to method, asks HelloSign::Client whether it responded or not
|
45
44
|
# @param method [Symbol] method name
|
46
45
|
#
|
47
46
|
def self.respond_to?(method, include_all=false)
|
@@ -26,14 +26,13 @@ module HelloSign
|
|
26
26
|
module Api
|
27
27
|
|
28
28
|
#
|
29
|
-
# Contains all the
|
30
|
-
# Take a look at our
|
29
|
+
# Contains all the API calls for the Account resource.
|
30
|
+
# Take a look at our API Documentation on the Account resource (https://app.hellosign.com/api/reference#Account)
|
31
31
|
# for more information about this.
|
32
32
|
#
|
33
33
|
# @author [hellosign]
|
34
34
|
#
|
35
35
|
module Account
|
36
|
-
|
37
36
|
#
|
38
37
|
# Returns the current user's account information.
|
39
38
|
#
|
@@ -47,7 +46,7 @@ module HelloSign
|
|
47
46
|
end
|
48
47
|
|
49
48
|
#
|
50
|
-
# Creates a new HelloSign account. The user will still need to confirm
|
49
|
+
# Creates a new HelloSign account. The user will still need to confirm the email address
|
51
50
|
# to complete the creation process.
|
52
51
|
#
|
53
52
|
# Note: This request does not require authentication.
|
@@ -24,10 +24,9 @@
|
|
24
24
|
|
25
25
|
module HelloSign
|
26
26
|
module Api
|
27
|
-
|
28
27
|
#
|
29
|
-
# Contains all the
|
30
|
-
# Take a look at our
|
28
|
+
# Contains all the API calls for the ApiApp resource.
|
29
|
+
# Take a look at our API Documentation for ApiApps (https://app.hellosign.com/api/reference#ApiApp)
|
31
30
|
# for more information about this.
|
32
31
|
#
|
33
32
|
# @author [hellosign]
|
@@ -36,8 +35,9 @@ module HelloSign
|
|
36
35
|
|
37
36
|
#
|
38
37
|
# Retrieves information about a specific API App by a given ID
|
38
|
+
# @option opts [String] client_id The Client ID of the ApiApp.
|
39
39
|
#
|
40
|
-
# @return [HelloSign::Resource::ApiApp] the
|
40
|
+
# @return [HelloSign::Resource::ApiApp] the ApiApp
|
41
41
|
#
|
42
42
|
# @example
|
43
43
|
# app = @client.get_api_app :client_id => 'fa5c8a0b0f492d768749333ad6fcc214c111e967'
|
@@ -48,8 +48,8 @@ module HelloSign
|
|
48
48
|
|
49
49
|
#
|
50
50
|
# Returns a list of ApiApps that you currently have access to on your account
|
51
|
-
# @option opts [Integer] page
|
52
|
-
# @option opts [Integer] page_size
|
51
|
+
# @option opts [Integer] page Sets the page number of the list to return. Defaults to 1. (optional)
|
52
|
+
# @option opts [Integer] page_size Determines the number of ApiApps returned per page. Defaults to 20. (optional)
|
53
53
|
#
|
54
54
|
# @return [HelloSign::Resource::ResourceArray]
|
55
55
|
#
|
@@ -65,12 +65,14 @@ module HelloSign
|
|
65
65
|
|
66
66
|
#
|
67
67
|
# Creates a new API Application on your account
|
68
|
-
# @option opts [String] name The name
|
69
|
-
# @option opts [String] domain The domain
|
70
|
-
# @option opts [String] callback_url
|
71
|
-
# @option opts [String] custom_logo_file
|
72
|
-
# @option opts [String] oauth[callback_url]
|
73
|
-
# @option opts [String] oauth[scopes]
|
68
|
+
# @option opts [String] name The name assigned to the ApiApp.
|
69
|
+
# @option opts [String] domain The domain associated with the ApiApp.
|
70
|
+
# @option opts [String] callback_url The URL that will receive callback events for the ApiApp. (optional)
|
71
|
+
# @option opts [String] custom_logo_file An image file to use as a custom logo in embedded workflows, if available in the API subscription. (optional)
|
72
|
+
# @option opts [String] oauth[callback_url] The callback URL to be used for OAuth flows. (optional)
|
73
|
+
# @option opts [String] oauth[scopes] A comma-separated list of OAuth scopes to be granted to the app. (optional)
|
74
|
+
# @option opts [String<Hash>] white_labeling_options Object with elements and values serialized to a string to customize the signer page, if available in the API subscription. (optional)
|
75
|
+
# @option opts [Boolean] options[can_insert_everywhere] Determines if signers can "Insert Everywhere" when signing a document. (optional)
|
74
76
|
#
|
75
77
|
# @return [HelloSign::Resource::ApiApp] newly created ApiApp object
|
76
78
|
#
|
@@ -81,14 +83,16 @@ module HelloSign
|
|
81
83
|
end
|
82
84
|
|
83
85
|
#
|
84
|
-
# Updates
|
85
|
-
# @
|
86
|
-
# @option opts [String] name
|
87
|
-
# @option opts [String] domain
|
88
|
-
# @option opts [String] callback_url
|
89
|
-
# @option opts [String] custom_logo_file
|
90
|
-
# @option opts [String] oauth[callback_url]
|
91
|
-
# @option opts [String] oauth[scopes]
|
86
|
+
# Updates settings for a specific ApiApp on your account
|
87
|
+
# @option opts [String] client_id The Client ID of the ApiApp you want to update.
|
88
|
+
# @option opts [String] name The name assigned to the ApiApp. (optional)
|
89
|
+
# @option opts [String] domain The domain associated with the ApiApp. (optional)
|
90
|
+
# @option opts [String] callback_url The URL that will receive callback events for the ApiApp. (optional)
|
91
|
+
# @option opts [String] custom_logo_file An image file to use as a custom logo in embedded workflows, if available in the API subscription. (optional)
|
92
|
+
# @option opts [String] oauth[callback_url] The callback URL to be used for OAuth flows. (optional)
|
93
|
+
# @option opts [String] oauth[scopes] A comma-separated list of OAuth scopes to be granted to the app. (optional)
|
94
|
+
# @option opts [String<Hash>] white_labeling_options Object with elements and values serialized to a string to customize the signer page, if available in the API subscription. (optional)
|
95
|
+
# @option opts [Boolean] options[can_insert_everywhere] Determines if signers can "Insert Everywhere" when signing a document. (optional)
|
92
96
|
#
|
93
97
|
# @return [HelloSign::Resource::ApiApp] an ApiApp object
|
94
98
|
#
|
@@ -101,10 +105,11 @@ module HelloSign
|
|
101
105
|
end
|
102
106
|
|
103
107
|
#
|
104
|
-
# Deletes an
|
108
|
+
# Deletes an ApiApp. Only available for ApiApps you own.
|
109
|
+
# @option opts [String] client_id The Client ID of the ApiApp you want to delete.
|
105
110
|
#
|
106
111
|
# @example
|
107
|
-
# result = @client.delete_api_app :client_id => '
|
112
|
+
# result = @client.delete_api_app :client_id => 'fa5c8a0b0f492d768749333ad6fcc214c111e967'
|
108
113
|
def delete_api_app(opts)
|
109
114
|
path = '/api_app/' + opts[:client_id]
|
110
115
|
delete(path)
|
@@ -24,11 +24,10 @@
|
|
24
24
|
|
25
25
|
module HelloSign
|
26
26
|
module Api
|
27
|
-
|
28
27
|
#
|
29
28
|
# HelloSign allows you to embed the signing page on your site in an iFrame
|
30
|
-
# without the need for the
|
31
|
-
# Take a look at our
|
29
|
+
# without the need for the signer/preparer to create a HelloSign account.
|
30
|
+
# Take a look at our Embedded Signing Walkthrough (https://app.hellosign.com/api/embeddedSigningWalkthrough)
|
32
31
|
# for more information about this.
|
33
32
|
#
|
34
33
|
# @author [hellosign]
|
@@ -36,8 +35,9 @@ module HelloSign
|
|
36
35
|
module Embedded
|
37
36
|
|
38
37
|
#
|
39
|
-
# Retrieves the embedded signature
|
40
|
-
#
|
38
|
+
# Retrieves the embedded signature sign_url.
|
39
|
+
#
|
40
|
+
# @option opts [String] signature_id The Signature ID to retrieve the embedded sign_url for.
|
41
41
|
#
|
42
42
|
# @return [HelloSign::Resource::Embedded] Returns an Embedded object
|
43
43
|
# @example
|
@@ -47,11 +47,15 @@ module HelloSign
|
|
47
47
|
HelloSign::Resource::Embedded.new get("/embedded/sign_url/#{opts[:signature_id]}")
|
48
48
|
end
|
49
49
|
#
|
50
|
-
# Retrieves the
|
51
|
-
# @option opts [
|
52
|
-
# @option opts [
|
53
|
-
# @option opts [
|
54
|
-
# @option opts [Array
|
50
|
+
# Retrieves the edit_url for an embedded template.
|
51
|
+
# @option opts [Boolean] test_mode Indicates if this is a test Embedded Template. A boolean value is also accepted. Defaults to 0. (optional)
|
52
|
+
# @option opts [String] template_id The Template ID to retreive the embedded edit_url for.
|
53
|
+
# @option opts [Array<Hash>] cc_roles The CC roles that must be assigned when using the Embedded Template to create a SignatureRequest. (optional)
|
54
|
+
# @option opts [String<Array><Hash>] merge_fields List of fields that can be pre-populated by your application when using the Embedded Template to send a SignatureRequest. (optional)
|
55
|
+
# * :name (String) Merge field name
|
56
|
+
# * :type (String) Field type - either "text" or "checkbox"
|
57
|
+
# @option opts [Boolean] skip_signer_roles Removes the prompt to edit signer roles, if already provided. Defaults to 0. (optional)
|
58
|
+
# @option opts [Boolean] skip_subject_message Removes the prompt to edit the subject and message, if already provided. Defaults to 0. (optional)
|
55
59
|
#
|
56
60
|
# @return [HelloSign::Resource::Embedded] Returns an Embedded object
|
57
61
|
# @example
|
data/lib/hello_sign/api/oauth.rb
CHANGED
@@ -27,18 +27,19 @@ module HelloSign
|
|
27
27
|
|
28
28
|
#
|
29
29
|
# OAuth allows you to perform actions on behalf of other users after they grant you the authorization to do so.
|
30
|
-
# For example, you could send signature requests on behalf of your users.
|
31
|
-
#
|
30
|
+
# For example, you could send signature requests on behalf of your users.
|
31
|
+
# For more information, see our OAuth API documentation (https://app.hellosign.com/api/oauthWalkthrough).
|
32
32
|
#
|
33
|
-
# With OAuth, you (the app owner) will be charged for all signature requests sent on behalf of other users via your app.
|
33
|
+
# IMPORTANT: With some OAuth scopes, you (the app owner) will be charged for all signature requests sent on behalf of other users via your app.
|
34
34
|
#
|
35
35
|
# @author [hellosign]
|
36
36
|
#
|
37
37
|
module OAuth
|
38
38
|
|
39
39
|
#
|
40
|
-
#
|
41
|
-
#
|
40
|
+
# Returns the OAuth URL where users can give permission for your application to perform actions on their behalf.
|
41
|
+
#
|
42
|
+
# @param state [String] used for security and must match throughout the flow for a given user.
|
42
43
|
# It can be set to the value of your choice (preferably something random). You should verify it matches the expected value when validating the OAuth callback.
|
43
44
|
# @return [type] [description]
|
44
45
|
def oauth_url(state)
|
@@ -46,12 +47,14 @@ module HelloSign
|
|
46
47
|
end
|
47
48
|
|
48
49
|
#
|
49
|
-
#
|
50
|
+
# Retrieves the OAuth token
|
50
51
|
#
|
51
|
-
# @option opts [String] state
|
52
|
-
# @option opts [String] code The
|
52
|
+
# @option opts [String] state Random value that was used when you created oauth_url for a specific user.
|
53
|
+
# @option opts [String] code The code passed to your callback when the user granted access.
|
54
|
+
# @option opts [String] client_id The API App Client ID.
|
55
|
+
# @option opts [String] client_secret The secret token of your API App.
|
53
56
|
#
|
54
|
-
# @return [Hash]
|
57
|
+
# @return [Hash] OAuth data of the user
|
55
58
|
#
|
56
59
|
# @example
|
57
60
|
# client = HelloSign::Client.new :api_key => '%apikey%', :client_id => 'cc91c61d00f8bb2ece1428035716b', :client_secret => '1d14434088507ffa390e6f5528465'
|
@@ -64,11 +67,11 @@ module HelloSign
|
|
64
67
|
end
|
65
68
|
|
66
69
|
#
|
67
|
-
#
|
70
|
+
# Refreshes the user's OAuth token.
|
68
71
|
#
|
69
|
-
# @
|
70
|
-
#
|
71
|
-
#
|
72
|
+
# @option opts [String] refresh_token The refresh provided when the access token has expired.
|
73
|
+
#
|
74
|
+
# @return [Hash] Refreshed OAuth info
|
72
75
|
#
|
73
76
|
# @example
|
74
77
|
# client.refresh_oauth_token :refresh_token => 'hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3'
|
@@ -79,12 +82,16 @@ module HelloSign
|
|
79
82
|
post('/oauth/token', { :body => opts, :oauth_request => true })
|
80
83
|
end
|
81
84
|
|
82
|
-
|
83
85
|
#
|
84
|
-
# Create new user and get their OAuth token. The user will receive an email asking them to confirm the access being granted.
|
85
|
-
#
|
86
|
+
# Create new user and get their OAuth token. The user will receive an email asking them to confirm the access being granted.
|
87
|
+
# Your app will not be able to perform actions on behalf of this user until they confirm.
|
88
|
+
#
|
89
|
+
# @option opts [String] email_address New user email address.
|
90
|
+
#
|
91
|
+
# @example
|
92
|
+
# client.oauth_create_account :email_address => 'new_user@example.com'
|
86
93
|
#
|
87
|
-
# @return [Hash] details about new user, including
|
94
|
+
# @return [Hash] details about new user, including OAuth data
|
88
95
|
def oauth_create_account(opts)
|
89
96
|
opts[:client_id] = self.client_id
|
90
97
|
opts[:client_secret] = self.client_secret
|
@@ -26,8 +26,8 @@ module HelloSign
|
|
26
26
|
module Api
|
27
27
|
|
28
28
|
#
|
29
|
-
# Contains all the
|
30
|
-
# Take a look at our
|
29
|
+
# Contains all the API calls for the SignatureRequest resource.
|
30
|
+
# Take a look at our API Documentation for sending Signature Requests (https://app.hellosign.com/api/reference#SignatureRequest)
|
31
31
|
# for more information about this.
|
32
32
|
#
|
33
33
|
# @author [hellosign]
|
@@ -37,7 +37,6 @@ module HelloSign
|
|
37
37
|
#
|
38
38
|
# Retrieves a Signature Request with the given ID.
|
39
39
|
# @option opts [String] signature_request_id The id of the SignatureRequest to retrieve.
|
40
|
-
# @option opts [Integer] ux_version sets the version of the signer page to use
|
41
40
|
#
|
42
41
|
# @return [HelloSign::Resource::SignatureRequest] a SignatureRequest object
|
43
42
|
#
|
@@ -52,10 +51,11 @@ module HelloSign
|
|
52
51
|
end
|
53
52
|
|
54
53
|
#
|
55
|
-
# Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been
|
56
|
-
# @option opts
|
57
|
-
# @option opts
|
58
|
-
# @option opts
|
54
|
+
# Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CC'd on.
|
55
|
+
# @option opts [String] account_id Indicates which account to return SignatureRequests for. Defaults to your account. (optional)
|
56
|
+
# @option opts [Integer] page Sets the page number of the list to return. Defaults to 1. (optional)
|
57
|
+
# @option opts [Integer] page_size Determines the number of SignatureRequests returned per page. Defaults to 20. (optional)
|
58
|
+
# @option opts [String] query Search terms and/or fields to filter the SignatureRequests. (optional)
|
59
59
|
#
|
60
60
|
# @return [HelloSign::Resource::ResourceArray]
|
61
61
|
#
|
@@ -72,23 +72,33 @@ module HelloSign
|
|
72
72
|
|
73
73
|
#
|
74
74
|
# Creates and sends a new SignatureRequest with the submitted documents.
|
75
|
-
# If form_fields_per_document is not specified, a signature page will be affixed at the end
|
75
|
+
# If form_fields_per_document is not specified or use_text_tags is not enabled, a signature page will be affixed at the end
|
76
76
|
# and all signers will be required to add their signature there.
|
77
|
-
# @option opts [
|
78
|
-
# @option opts [Array<String>] files
|
79
|
-
# @option opts [Array<String>] file_urls
|
80
|
-
# @option opts [String] title The title you want to assign to the SignatureRequest.
|
81
|
-
# @option opts [String] subject The subject in the email that will be sent to the
|
82
|
-
# @option opts [String] message The custom message in the email that will be sent to the
|
83
|
-
# @option opts [String] signing_redirect_url The URL you want the signer redirected to after they successfully sign. (optional)
|
77
|
+
# @option opts [Boolean] test_mode Indicates if this is a test SignatureRequest, it will not be legally binding if set to 1. A boolean value is also accepted. Defaults to 0. (optional)
|
78
|
+
# @option opts [Array<String>] files Specified file path(s) to upload file(s) to send for signature. Currently we only support use of either the files parameter or file_urls parameter, not both.
|
79
|
+
# @option opts [Array<String>] file_urls URL(s) for HelloSign to download the file(s) to send for signature. Currently we only support use of either the files parameter or file_urls parameter, not both.
|
80
|
+
# @option opts [String] title The title you want to assign to the SignatureRequest. (optional)
|
81
|
+
# @option opts [String] subject The subject in the email that will be sent to the signer(s). (optional)
|
82
|
+
# @option opts [String] message The custom message in the email that will be sent to the signer(s). (optional)
|
83
|
+
# @option opts [String] signing_redirect_url The URL you want the signer(s) redirected to after they successfully sign. (optional)
|
84
84
|
# @option opts [Array<Hash>] signers List of signers, each item is a Hash with these keys:
|
85
|
-
# * :name (String)
|
86
|
-
# * :email_address (String)
|
87
|
-
# * :order (Integer) The order the
|
88
|
-
# * :pin (Integer) The 4- to 12-character access code that will secure this signer's signature page. You must have a business plan to use this feature.
|
89
|
-
# @option opts [Array<
|
90
|
-
#
|
91
|
-
#
|
85
|
+
# * :name (String) Signer's name
|
86
|
+
# * :email_address (String) Signer's email address
|
87
|
+
# * :order (Integer) The order the signers are required to sign in (optional)
|
88
|
+
# * :pin (Integer) The 4- to 12-character access code that will secure this signer's signature page. You must have a business plan to use this feature. (optional)
|
89
|
+
# @option opts [Array<Hash>] custom_fields An array of custom merge fields, representing those present on the document with Text Tags or form_fields_per_document (optional)
|
90
|
+
# * :name (String) Custom field name or "Field Label"
|
91
|
+
# * :value (String) The value of the field. This data will appear on the SignatureRequest.
|
92
|
+
# * :editor (String) The signer name indicated on the Text Tag or form_fields_per_document that can edit the value of the field. (optional)
|
93
|
+
# * :required (Boolean) Determines if the field is required or not. (optional)
|
94
|
+
# @option opts [Array<String>] cc_email_addresses The email addresses that should be CCed on the SignatureRequest. (optional)
|
95
|
+
# @option opts [Boolean] use_text_tags Indicates whether the SignatureRequest should have Text Tags enabled. Defaults to 0. (optional)
|
96
|
+
# @option opts [Boolean] hide_text_tags Indicates whether the Text Tags should be removed automatically. Note that this is not the preferred method. Defaults to 0. (optional)
|
97
|
+
# @option opts [Hash] metadata Key-value data attached to the SignatureRequest. (optional)
|
98
|
+
# @option opts [String] client_id The API App Client ID associated with the SignatureRequest. (optional)
|
99
|
+
# @option opts [Boolean] allow_decline Allows signers to decline the SignatureRequest. Defaults to 0. (optional)
|
100
|
+
# @option opts [Boolean] allow_reassign Allows signers to reassign the SignatureRequest to another signer. Defaults to 0. (optional)
|
101
|
+
# @option opts [Array<Hash>] form_fields_per_document The fields that should appear on the document. (optional)
|
92
102
|
#
|
93
103
|
# @return [HelloSign::Resource::SignatureRequest] a SignatureRequest
|
94
104
|
#
|
@@ -114,7 +124,31 @@ module HelloSign
|
|
114
124
|
# }
|
115
125
|
# ],
|
116
126
|
# :cc_email_addresses => ['lawyer@example.com', 'lawyer@example2.com'],
|
117
|
-
# :files => ['NDA.pdf', 'AppendixA.pdf']
|
127
|
+
# :files => ['NDA.pdf', 'AppendixA.pdf'],
|
128
|
+
# :form_fields_per_document => [
|
129
|
+
# [
|
130
|
+
# {
|
131
|
+
# "name": "address",
|
132
|
+
# "type": "text",
|
133
|
+
# "x": 160,
|
134
|
+
# "y": 80,
|
135
|
+
# "width": 206,
|
136
|
+
# "height": 32,
|
137
|
+
# "signer": 0
|
138
|
+
# }
|
139
|
+
# ],
|
140
|
+
# [
|
141
|
+
# {
|
142
|
+
# "name": "phone",
|
143
|
+
# "type": "text",
|
144
|
+
# "x": 160,
|
145
|
+
# "y": 150,
|
146
|
+
# "width": 206,
|
147
|
+
# "height": 32,
|
148
|
+
# "signer": 1
|
149
|
+
# }
|
150
|
+
# ]
|
151
|
+
# ]
|
118
152
|
# )
|
119
153
|
#
|
120
154
|
|
@@ -129,22 +163,30 @@ module HelloSign
|
|
129
163
|
|
130
164
|
#
|
131
165
|
# Creates and sends a new SignatureRequest based off of the Template specified with the template_id parameter.
|
132
|
-
# @option opts [
|
133
|
-
# @option opts [String] template_id The
|
134
|
-
#
|
135
|
-
# @option opts [String]
|
136
|
-
# @option opts [String]
|
137
|
-
# @option opts [String]
|
166
|
+
# @option opts [Boolean] test_mode Indicates if this is a test SignatureRequest, it will not be legally binding if set to 1. A boolean value is also accepted. Defaults to 0. (optional)
|
167
|
+
# @option opts [String] template_id The Template ID to use when creating the SignatureRequest.
|
168
|
+
# * Use template_ids[%i%] if using multiple templates, replacing %i% with an integer to indicate the order of the Templates
|
169
|
+
# @option opts [String] title The title you want to assign to the SignatureRequest. (optional)
|
170
|
+
# @option opts [String] subject The subject in the email that will be sent to the signer(s). (optional)
|
171
|
+
# @option opts [String] message The custom message in the email that will be sent to the signer(s). (optional)
|
172
|
+
# @option opts [String] signing_redirect_url The URL you want the signer(s) redirected to after they successfully sign. (optional)
|
138
173
|
# @option opts [Array<Hash>] signers List of signers
|
139
|
-
# * :
|
140
|
-
# * :
|
141
|
-
# * :
|
142
|
-
# * :pin (Integer) The 4- to 12-character access code that will secure this signer's signature page. You must have a business plan to use this feature.
|
143
|
-
# @option opts [Array<Hash>] ccs The
|
144
|
-
#
|
145
|
-
#
|
146
|
-
# @option opts [
|
147
|
-
#
|
174
|
+
# * :role (String) The signer role indicated on the Template. Note that the role name is case sensitive.
|
175
|
+
# * :name (String) Signer's name
|
176
|
+
# * :email_address (String) Signer's email address
|
177
|
+
# * :pin (Integer) The 4- to 12-character access code that will secure this signer's signature page. You must have a business plan to use this feature. (optional)
|
178
|
+
# @option opts [Array<Hash>] ccs The individual(s) to be CC'd on the SignatureRequest. Required when a CC role exists for the Template.
|
179
|
+
# * :role (String) The CC role indicated on the Template. Note that the role name is case sensitive.
|
180
|
+
# * :email_address (String) CC Recipient's email address
|
181
|
+
# @option opts [Array<Hash>] custom_fields An array of custom merge fields, representing those present in the Template. (optional)
|
182
|
+
# * :name (String) Custom field name or "Field Label"
|
183
|
+
# * :value (String) The value of the field. This data will appear on the SignatureRequest.
|
184
|
+
# * :editor (String) The signer name indicated on the Text Tag or form_fields_per_document that can edit the value of the field. (optional)
|
185
|
+
# * :required (Boolean) Determines if the field is required or not. (optional)
|
186
|
+
# @option opts [Hash] metadata Key-value data attached to the SignatureRequest. (optional)
|
187
|
+
# @option opts [String] client_id The API App Client ID associated with the SignatureRequest. (optional)
|
188
|
+
# @option opts [Array<String>] files Use files to indicate the uploaded file(s) to append to the SignatureRequest. (optional)
|
189
|
+
# @option opts [Array<String>] file_urls Use file_urls to have HelloSign download the file(s) to append to the SignatureRequest. (optional)
|
148
190
|
# @return [HelloSign::Resource::SignatureRequest] a SignatureRequest
|
149
191
|
# @example
|
150
192
|
# signature_request = @client.send_signature_request_with_template(
|
@@ -200,10 +242,11 @@ module HelloSign
|
|
200
242
|
# :role => "Accounting"
|
201
243
|
# }
|
202
244
|
# ],
|
203
|
-
# :custom_fields =>
|
204
|
-
#
|
205
|
-
#
|
206
|
-
#
|
245
|
+
# :custom_fields => [
|
246
|
+
# {
|
247
|
+
# :CustomFieldName => '$20,000'
|
248
|
+
# }
|
249
|
+
# ]
|
207
250
|
# )
|
208
251
|
#
|
209
252
|
def send_signature_request_with_template(opts)
|
@@ -218,9 +261,9 @@ module HelloSign
|
|
218
261
|
|
219
262
|
#
|
220
263
|
# Sends an email to the signer reminding them to sign the signature request.
|
221
|
-
# @option opts [String] signature_request_id
|
222
|
-
# @option opts [String] email_address The email address of the signer
|
223
|
-
# @option opts [
|
264
|
+
# @option opts [String] signature_request_id Indicates the ID of the SignatureRequest to send a reminder.
|
265
|
+
# @option opts [String] email_address The email address of the signer who will receive a reminder.
|
266
|
+
# @option opts [String] name The name of the signer who will receive a reminder. (optional)
|
224
267
|
#
|
225
268
|
# @return [HelloSign::Resource::SignatureRequest] a SignatureRequest
|
226
269
|
# @example
|
@@ -232,7 +275,7 @@ module HelloSign
|
|
232
275
|
|
233
276
|
#
|
234
277
|
# Cancels a SignatureRequest.
|
235
|
-
# @option opts [String] signature_request_id The
|
278
|
+
# @option opts [String] signature_request_id The ID of the incomplete SignatureRequest to cancel.
|
236
279
|
#
|
237
280
|
# @example
|
238
281
|
# @client.cancel_signature_request :signature_request_id => '75cdf7dc8b323d43b347e4a3614d1f822bd09491'
|
@@ -242,7 +285,7 @@ module HelloSign
|
|
242
285
|
|
243
286
|
#
|
244
287
|
# Removes your access to a completed a SignatureRequest.
|
245
|
-
# @option opts [String] signature_request_id The
|
288
|
+
# @option opts [String] signature_request_id The ID of the completed SignatureRequest to remove access.
|
246
289
|
#
|
247
290
|
# @example
|
248
291
|
# @client.remove_signature_request :signature_request_id => '75cdf7dc8b323d43b347e4a3614d1f822bd09491'
|
@@ -251,12 +294,12 @@ module HelloSign
|
|
251
294
|
end
|
252
295
|
|
253
296
|
#
|
254
|
-
# Download
|
255
|
-
# @option opts [String]
|
256
|
-
# @option opts [String]
|
257
|
-
# @option opts [
|
297
|
+
# Download a copy of the SignatureRequest documents specified by the signature_request_id parameter.
|
298
|
+
# @option opts [String] signature_request_id The ID of the SignatureRequest to download.
|
299
|
+
# @option opts [String] file_type Determines the format of the file - either 'pdf' or 'zip' depending on the file type desired. Defaults to pdf. (optional)
|
300
|
+
# @option opts [Boolean] get_url Response contains a URL link to the file if set to true. Links are only available for PDFs and have a TTL of 3 days. Defaults to false. (optional)
|
258
301
|
#
|
259
|
-
# @return a PDF
|
302
|
+
# @return a PDF or Zip
|
260
303
|
#
|
261
304
|
# @example
|
262
305
|
# pdf = @client.signature_request_files :signature_request_id => '75cdf7dc8b323d43b347e4a3614d1f822bd09491'
|
@@ -275,25 +318,34 @@ module HelloSign
|
|
275
318
|
|
276
319
|
#
|
277
320
|
# Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame.
|
278
|
-
# If form_fields_per_document is not specified, a signature page will be affixed
|
279
|
-
#
|
280
|
-
#
|
281
|
-
#
|
321
|
+
# If form_fields_per_document is not specified or use_text_tags is not enabled, a signature page will be affixed at the end
|
322
|
+
# and all signers will be required to add their signature there.
|
323
|
+
# Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on HelloSign.com.
|
324
|
+
# See our Embedded Signing Walkthrough for more information on Embedded Signing: https://app.hellosign.com/api/embeddedSigningWalkthrough
|
325
|
+
# @option opts [Boolean] test_mode Indicates if this is a test SignatureRequest, it will not be legally binding if set to 1. A boolean value is also accepted. Defaults to 0. (optional)
|
326
|
+
# @option opts [String] client_id The API App Client ID associated with the this embedded SignatureRequest.
|
282
327
|
# @option opts [Array<String>] files Use files to indicate the uploaded file(s) to send for signature. Currently we only support use of either the files parameter or file_urls parameter, not both.
|
283
328
|
# @option opts [Array<String>] file_urls Use file_urls to have HelloSign download the file(s) to send for signature. Currently we only support use of either the files parameter or file_urls parameter, not both.
|
284
|
-
# @option opts [String] title The title you want to assign to the SignatureRequest.
|
285
|
-
# @option opts [String] subject The subject in the email that will be sent to the
|
286
|
-
# @option opts [String] message The custom message in the email that will be sent to the
|
287
|
-
# @option opts [String] signing_redirect_url The URL you want the signer redirected to after they successfully sign. (optional)
|
329
|
+
# @option opts [String] title The title you want to assign to the SignatureRequest. (optional)
|
330
|
+
# @option opts [String] subject The subject in the email that will be sent to the signer(s). (optional)
|
331
|
+
# @option opts [String] message The custom message in the email that will be sent to the signer(s). (optional)
|
288
332
|
# @option opts [Array<Hash>] signers List of signers, each item is a Hash with these keys:
|
289
|
-
# * :name (String)
|
290
|
-
# * :email_address (String)
|
291
|
-
# * :order (Integer) The order the
|
292
|
-
# * :pin (Integer) The 4- to 12-character access code that will secure this signer's signature page. You must have a business plan to use this feature.
|
293
|
-
# @option opts [Array<
|
294
|
-
#
|
295
|
-
#
|
296
|
-
#
|
333
|
+
# * :name (String) Signer's name
|
334
|
+
# * :email_address (String) Signer's email address
|
335
|
+
# * :order (Integer) The order the signers are required to sign in (optional)
|
336
|
+
# * :pin (Integer) The 4- to 12-character access code that will secure this signer's signature page. You must have a business plan to use this feature. (optional)
|
337
|
+
# @option opts [Array<Hash>] custom_fields An array of custom merge fields, representing those present on the document with Text Tags or form_fields_per_document (optional)
|
338
|
+
# * :name (String) Custom field name or "Field Label"
|
339
|
+
# * :value (String) The value of the field. This data will appear on the SignatureRequest
|
340
|
+
# * :editor (String) The signer name indicated on the Text Tag or form_fields_per_document that can edit the value of the field. (optional)
|
341
|
+
# * :required (Boolean) Determines if the field is required or not. (optional)
|
342
|
+
# @option opts [Array<String>] cc_email_addresses The email addresses that should be CCed on the SignatureRequest. (optional)
|
343
|
+
# @option opts [Boolean] use_text_tags Indicates whether the SignatureRequest should have Text Tags enabled. Defaults to 0. (optional)
|
344
|
+
# @option opts [Boolean] hide_text_tags Indicates whether the Text Tags should be removed automatically. Note that this is not the preferred method. Defaults to 0. (optional)
|
345
|
+
# @option opts [Hash] metadata Key-value data attached to the SignatureRequest. (optional)
|
346
|
+
# @option opts [Boolean] allow_decline Allows signers to decline the SignatureRequest. Defaults to 0. (optional)
|
347
|
+
# @option opts [Boolean] allow_reassign Allows signers to reassign the SignatureRequest to another signer. Defaults to 0. (optional)
|
348
|
+
# @option opts [Array<Hash>] form_fields_per_document The fields that should appear on the document. (optional)
|
297
349
|
#
|
298
350
|
# @return [HelloSign::Resource::SignatureRequest] a SignatureRequest
|
299
351
|
# @example
|
@@ -335,24 +387,29 @@ module HelloSign
|
|
335
387
|
#
|
336
388
|
# Creates a new SignatureRequest based on the given Template to be signed in an embedded iFrame.
|
337
389
|
# Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on HelloSign.
|
338
|
-
# @option opts [
|
339
|
-
# @option opts [String] client_id
|
340
|
-
# @option opts [String] template_id The
|
341
|
-
#
|
342
|
-
# @option opts [String]
|
343
|
-
# @option opts [String]
|
344
|
-
# @option opts [String]
|
345
|
-
# @option opts [
|
346
|
-
#
|
347
|
-
#
|
348
|
-
# * :
|
349
|
-
# * :
|
350
|
-
#
|
351
|
-
# * :
|
352
|
-
#
|
353
|
-
# @option opts [Hash] custom_fields
|
354
|
-
#
|
355
|
-
#
|
390
|
+
# @option opts [Boolean] test_mode Indicates if this is a test SignatureRequest, it will not be legally binding if set to 1. A boolean value is also accepted. Defaults to 0. (optional)
|
391
|
+
# @option opts [String] client_id The API App Client ID associated with the this embedded SignatureRequest.
|
392
|
+
# @option opts [String] template_id The Template ID to use when creating the SignatureRequest.
|
393
|
+
# * Use template_ids[%i%] if using multiple templates, replacing %i% with an integer to indicate the order of the Templates
|
394
|
+
# @option opts [String] title The title you want to assign to the SignatureRequest. (optional)
|
395
|
+
# @option opts [String] subject The subject in the email that will be sent to the signer(s). (optional)
|
396
|
+
# @option opts [String] message The custom message in the email that will be sent to the signer(s). (optional)
|
397
|
+
# @option opts [Array<Hash>] signers List of signers
|
398
|
+
# * :role (String) The signer role indicated on the Template. Note that the role name is case sensitive.
|
399
|
+
# * :name (String) Signer's name
|
400
|
+
# * :email_address (String) Signer's email address
|
401
|
+
# * :pin (Integer) The 4- to 12-character access code that will secure this signer's signature page. You must have a business plan to use this feature. (optional)
|
402
|
+
# @option opts [Array<Hash>] ccs The individual(s) to be CC'd on the SignatureRequest. Required when a CC role exists for the Template.
|
403
|
+
# * :role (String) The CC role indicated on the Template. Note that the role name is case sensitive.
|
404
|
+
# * :email_address (String) CC Recipient's email address
|
405
|
+
# @option opts [Array<Hash>] custom_fields An array of custom merge fields, representing those present in the Template. (optional)
|
406
|
+
# * :name (String) Custom field name or "Field Label"
|
407
|
+
# * :value (String) The value of the field. This data will appear on the SignatureRequest.
|
408
|
+
# * :editor (String) The signer name indicated on the Text Tag or form_fields_per_document that can edit the value of the field. (optional)
|
409
|
+
# * :required (Boolean) Determines if the field is required or not. (optional)
|
410
|
+
# @option opts [Hash] metadata Key-value data attached to the SignatureRequest. (optional)
|
411
|
+
# @option opts [Array<String>] files Use files to indicate the uploaded file(s) to append to the SignatureRequest. (optional)
|
412
|
+
# @option opts [Array<String>] file_urls Use file_urls to have HelloSign download the file(s) to append to the SignatureRequest. (optional)
|
356
413
|
#
|
357
414
|
# @return [HelloSign::Resource::SignatureRequest] a SignatureRequest
|
358
415
|
# @example
|
@@ -398,6 +455,19 @@ module HelloSign
|
|
398
455
|
HelloSign::Resource::SignatureRequest.new post('/signature_request/create_embedded_with_template', :body => opts)
|
399
456
|
end
|
400
457
|
|
458
|
+
#
|
459
|
+
# Updates the email address on a SignatureRequest.
|
460
|
+
# @option opts [String] signature_request_id The ID of the SignatureRequest to update.
|
461
|
+
# @option opts [String] signature_id The Signature ID of the recipient to update.
|
462
|
+
# @option opts [String] email_address The new email address of the recipient.
|
463
|
+
#
|
464
|
+
# @example
|
465
|
+
# @client.update_signature_request(
|
466
|
+
# :signature_request_id => '75cdf7dc8b323d43b347e4a3614d1f822bd09491',
|
467
|
+
# :signature_id => '5064ca698bde9581ad75f6d62450eb4b',
|
468
|
+
# :email_address => 'newEmail@example.com'
|
469
|
+
# )
|
470
|
+
|
401
471
|
def update_signature_request(opts)
|
402
472
|
signature_request_id = opts.delete(:signature_request_id)
|
403
473
|
path = "/signature_request/update/#{signature_request_id}"
|