hellosign-ruby-sdk 3.7.0 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
data/lib/hello_sign/api/team.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
|
@@ -24,16 +24,14 @@
|
|
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 Team resource.
|
29
|
+
# Take a look at our API Documentation on the Team Resource (https://app.hellosign.com/api/reference#Team)
|
31
30
|
# for more information about this.
|
32
31
|
#
|
33
32
|
# @author [hellosign]
|
34
33
|
#
|
35
34
|
module Team
|
36
|
-
|
37
35
|
#
|
38
36
|
# Returns information about your Team as well as a list of its members.
|
39
37
|
# If you do not belong to a Team, HelloSign::Error::NotFound will be raised
|
@@ -48,9 +46,9 @@ module HelloSign
|
|
48
46
|
|
49
47
|
#
|
50
48
|
# Creates a new Team and makes you a member. You must not currently belong to a Team to invoke.
|
51
|
-
# @option opts [String] name The name of
|
49
|
+
# @option opts [String] name The name of the Team.
|
52
50
|
#
|
53
|
-
# @return [HelloSign::Resource::Team] new created Team
|
51
|
+
# @return [HelloSign::Resource::Team] new created Team object
|
54
52
|
#
|
55
53
|
# @example
|
56
54
|
# team = @client.create_team :name => 'Team America World Police'
|
@@ -60,7 +58,7 @@ module HelloSign
|
|
60
58
|
|
61
59
|
#
|
62
60
|
# Updates the name of your Team.
|
63
|
-
# @option opts [String] name The name of your Team
|
61
|
+
# @option opts [String] name The name of your Team.
|
64
62
|
#
|
65
63
|
# @return [HelloSign::Resource::Team] a Team object
|
66
64
|
#
|
@@ -71,7 +69,7 @@ module HelloSign
|
|
71
69
|
end
|
72
70
|
|
73
71
|
#
|
74
|
-
# Deletes your Team. Can only be invoked
|
72
|
+
# Deletes your Team. Can only be invoked with a Team with one member (yourself).
|
75
73
|
#
|
76
74
|
# @example
|
77
75
|
# team = @client.destroy_team
|
@@ -80,12 +78,13 @@ module HelloSign
|
|
80
78
|
end
|
81
79
|
|
82
80
|
#
|
83
|
-
# Adds or invites a user (specified using the email_address parameter) to
|
81
|
+
# Adds or invites a user (specified using the email_address parameter) to the Team.
|
84
82
|
# If the user does not currently have a HelloSign Account, a new one will be created for them.
|
85
|
-
# If the user currently has a paid subscription, they will
|
86
|
-
# If a user is already a part of
|
87
|
-
# @option opts [String] account_id The
|
88
|
-
# @option opts [String] email_address The email address
|
83
|
+
# If the user currently has a paid subscription, they will be emailed an invitation to join the Team.
|
84
|
+
# If a user is already a part of a Team, a "team_invite_failed" error will be returned.
|
85
|
+
# @option opts [String] account_id The user's Account ID to invite to the Team.
|
86
|
+
# @option opts [String] email_address The user's email address to invite to your Team.
|
87
|
+
# Note: The account_id prevails if both email_address and acccount_id are provided.
|
89
88
|
#
|
90
89
|
# @return [HelloSign::Resource::Team] updated Team object
|
91
90
|
#
|
@@ -95,11 +94,12 @@ module HelloSign
|
|
95
94
|
HelloSign::Resource::Team.new post('/team/add_member', :body => opts)
|
96
95
|
end
|
97
96
|
|
98
|
-
|
99
97
|
#
|
100
|
-
# Removes a user from
|
101
|
-
# @option opts [String] account_id The
|
102
|
-
# @option opts [String] email_address The email address
|
98
|
+
# Removes a user from the Team. If the user had an outstanding invitation to your Team, the original invitation will expire.
|
99
|
+
# @option opts [String] account_id The user's Account ID to remove from the Team.
|
100
|
+
# @option opts [String] email_address The user's email address to remove from your Team.
|
101
|
+
# @option opts [String] new_owner_email_address The Account's email address to receive all documents, API Apps (if applicable), and API key from removed account. (optional)
|
102
|
+
# Note: The account_id prevails if both email_address and acccount_id are provided.
|
103
103
|
#
|
104
104
|
# @return [HelloSign::Resource::Team] updated Team object
|
105
105
|
# @example
|
@@ -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 Template resource.
|
30
|
+
# Take a look at our API Documentation for Templates (https://app.hellosign.com/api/reference#Template)
|
31
31
|
# for more information about this.
|
32
32
|
#
|
33
33
|
# @author [hellosign]
|
@@ -36,7 +36,7 @@ module HelloSign
|
|
36
36
|
|
37
37
|
#
|
38
38
|
# Retrieves the Template specified by the id parameter.
|
39
|
-
# @option opts [String] template_id The
|
39
|
+
# @option opts [String] template_id The Template ID to retrieve.
|
40
40
|
#
|
41
41
|
# @return [HelloSign::Resource::Template] a Template object
|
42
42
|
#
|
@@ -48,20 +48,23 @@ module HelloSign
|
|
48
48
|
end
|
49
49
|
|
50
50
|
#
|
51
|
-
# Deletes the
|
52
|
-
# @option opts [String] template_id The
|
53
|
-
|
51
|
+
# Deletes the specified Template.
|
52
|
+
# @option opts [String] template_id The Template ID to delete.
|
53
|
+
#
|
54
54
|
# @example
|
55
|
-
# template = @client.
|
55
|
+
# template = @client.delete_template :template_id => 'f57db65d3f933b5316d398057a36176831451a35'
|
56
56
|
#
|
57
57
|
def delete_template(opts)
|
58
58
|
post("/template/delete/#{opts[:template_id]}")
|
59
59
|
end
|
60
60
|
|
61
61
|
#
|
62
|
-
# Retrieves the Templates for the current user
|
62
|
+
# Retrieves the Templates for the accessible by the current user.
|
63
63
|
#
|
64
|
-
# @option opts [
|
64
|
+
# @option opts [String] acount_id The Account ID to return Templates for and must be a team member. Use "all" for all team members. Defaults to current account. (optional)
|
65
|
+
# @option opts [Integer] page Sets the page number of the list to return. Defaults to 1. (optional)
|
66
|
+
# @option opts [Integer] page_size Determines the number of Templates returned per page. Defaults to 20. (optional)
|
67
|
+
# @option opts [String] query Search terms and/or fields to filter the Templates. (optional)
|
65
68
|
#
|
66
69
|
# @return [HelloSign::Resource::ResourceArray] a ResourceArray object
|
67
70
|
# @example
|
@@ -75,11 +78,12 @@ module HelloSign
|
|
75
78
|
end
|
76
79
|
|
77
80
|
#
|
78
|
-
# Gives the specified Account
|
81
|
+
# Gives the specified Account access to a Template. The Account must be part of your Team.
|
79
82
|
#
|
80
|
-
# @option opts [String] template_id The
|
81
|
-
# @option opts [String] account_id The
|
82
|
-
# @option opts [String] email_address The email address of the Account to
|
83
|
+
# @option opts [String] template_id The Template ID to give access to.
|
84
|
+
# @option opts [String] account_id The Account ID to receive access to the Template.
|
85
|
+
# @option opts [String] email_address The email address of the Account to receive access to the Template.
|
86
|
+
# Note: The account_id prevails if both email_address and acccount_id are provided.
|
83
87
|
#
|
84
88
|
# @return [Template] a Template object
|
85
89
|
# @example
|
@@ -92,11 +96,12 @@ module HelloSign
|
|
92
96
|
end
|
93
97
|
|
94
98
|
#
|
95
|
-
# Removes the specified Account
|
96
|
-
#
|
97
|
-
# @option opts [String] template_id The
|
98
|
-
# @option opts [String] account_id The
|
99
|
-
# @option opts [String] email_address The email address of the Account to remove access to the Template.
|
99
|
+
# Removes the specified Account access to the specified Template.
|
100
|
+
#
|
101
|
+
# @option opts [String] template_id The Template ID to remove access to.
|
102
|
+
# @option opts [String] account_id The Account ID to remove access to the Template.
|
103
|
+
# @option opts [String] email_address The email address of the Account to remove access to the Template.
|
104
|
+
# Note: The account_id prevails if both email_address and acccount_id are provided.
|
100
105
|
#
|
101
106
|
# @return [Template] a Template object
|
102
107
|
# @example
|
@@ -109,21 +114,25 @@ module HelloSign
|
|
109
114
|
end
|
110
115
|
|
111
116
|
#
|
112
|
-
# Creates a new embedded template draft object that can be launched in an
|
113
|
-
# @option opts [
|
114
|
-
# @option opts [
|
115
|
-
# @option opts [Array<String>]
|
116
|
-
# @option opts [String]
|
117
|
-
# @option opts [String]
|
118
|
-
# @option opts [String]
|
119
|
-
# @option opts [String] message The
|
120
|
-
# @option opts [Array<Hash>] signers List of
|
121
|
-
# * :name (String)
|
122
|
-
# * :order (Integer) The order the signer is required to sign in (optional)
|
123
|
-
# @option opts [Array<Hash>] cc_roles The
|
124
|
-
# @option opts [Array
|
125
|
-
# * :name (String)
|
126
|
-
# * :type (String)
|
117
|
+
# Creates a new embedded template draft object that can be launched in an iFrame using the claim_url.
|
118
|
+
# @option opts [Boolean] test_mode Indicates if this is a test Template draft. SignatureRequests using this Template will not be legally binding if set to 1. Defaults to 0. (optional)
|
119
|
+
# @option opts [String] client_id The API App Client ID associated with the Template draft. (optional)
|
120
|
+
# @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.
|
121
|
+
# @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.
|
122
|
+
# @option opts [String] title The default Template title. (optional)
|
123
|
+
# @option opts [String] subject The default Template title alias. (optional)
|
124
|
+
# @option opts [String] message The default message in the email that will be sent to the signer(s). (optional)
|
125
|
+
# @option opts [Array<Hash>] signers List of signers displayed when the Template is used to create a SignatureRequest
|
126
|
+
# * :name (String) Signer role name
|
127
|
+
# * :order (Integer) The order the signer role is required to sign in. (optional)
|
128
|
+
# @option opts [Array<Hash>] cc_roles The CC roles that must be assigned when using the Template to create a SignatureRequest. (optional)
|
129
|
+
# @option opts [String<Array><Hash>] merge_fields List of fields that can be pre-populated by your application when using the Template to send a SignatureRequest. (optional)
|
130
|
+
# * :name (String) Merge field name
|
131
|
+
# * :type (String) Field type - either "text" or "checkbox"
|
132
|
+
# @option opts [Boolean] skip_me_now Sets the "Me (Now)" option for the Template preparer. Defaults to 0. (optional)
|
133
|
+
# @option opts [Boolean] use_preexisting_fields Sets the detection of predefined PDF fields. Defaults to 0. (optional)
|
134
|
+
# @option opts [Hash] metadata Key-value data attached to the Template and all SignatureRequests created from the Template. (optional)
|
135
|
+
# @option opts [Boolean] allow_reassign Sets the ability for signers to reassign the SignatureRequest to other signers. Defaults to 0. (optional)
|
127
136
|
#
|
128
137
|
# @example create_embedded_draft
|
129
138
|
# template_draft = @client.create_embedded_template_draft(
|
@@ -158,6 +167,17 @@ module HelloSign
|
|
158
167
|
HelloSign::Resource::TemplateDraft.new post("/template/create_embedded_draft", :body => opts)
|
159
168
|
end
|
160
169
|
|
170
|
+
#
|
171
|
+
# Downloads the original files of a specified Template.
|
172
|
+
#
|
173
|
+
# @option opts [String] template_id The Template ID to retrieve.
|
174
|
+
# @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)
|
175
|
+
# @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)
|
176
|
+
#
|
177
|
+
# @return a PDF or Zip
|
178
|
+
# @example
|
179
|
+
# templates = @client.get_template_files :template_id => 'f57db65d3f933b5316d398057a36176831451a35', :file_type => 'zip'
|
180
|
+
#
|
161
181
|
def get_template_files(opts)
|
162
182
|
path = "/template/files/#{opts[:template_id]}"
|
163
183
|
if opts[:file_type]
|
@@ -171,6 +191,21 @@ module HelloSign
|
|
171
191
|
get(path)
|
172
192
|
end
|
173
193
|
|
194
|
+
#
|
195
|
+
# Overlays a new file with the overlay of the specified Template.
|
196
|
+
#
|
197
|
+
# @option opts [String] template_id The Template ID to update.
|
198
|
+
# @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.
|
199
|
+
# @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.
|
200
|
+
# @option opts [String] subject The updated default Template title alias. (optional)
|
201
|
+
# @option opts [String] message The updated default message in the email that will be sent to the signer(s). (optional)
|
202
|
+
# @option opts [String] client_id The API App Client ID associated with the Template draft. (optional)
|
203
|
+
# @option opts [Boolean] test_mode Indicates if this is a test Template draft. SignatureRequests using this Template will not be legally binding if set to 1. Defaults to 0. (optional)
|
204
|
+
#
|
205
|
+
# @return a Template ID
|
206
|
+
# @example
|
207
|
+
# templates = @client.update_template_files :template_id => 'f57db65d3f933b5316d398057a36176831451a35', :file => '@NDA.pdf'
|
208
|
+
#
|
174
209
|
def update_template_files(opts)
|
175
210
|
template_id = opts.delete(:template_id)
|
176
211
|
path = "/template/update_files/#{template_id}"
|
@@ -25,47 +25,52 @@
|
|
25
25
|
module HelloSign
|
26
26
|
module Api
|
27
27
|
|
28
|
-
#
|
29
|
-
# Contains all the api calls for the UnclaimedDraft resource.
|
30
|
-
# Take a look at our {https://app.hellosign.com/api/reference#UnclaimedDraft unclaimed draft document}
|
31
|
-
# for more information about this.
|
32
|
-
#
|
33
|
-
# @author [hellosign]
|
34
|
-
#
|
35
|
-
module UnclaimedDraft
|
36
|
-
|
37
28
|
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
|
45
|
-
|
46
|
-
# @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.
|
47
|
-
# @option opts [String] type The type of unclaimed draft to create. Use "send_document" to create a claimable file, and "request_signature" for a claimable signature request. If the type is "request_signature" then signers name and email_address are not optional.
|
48
|
-
# @option opts [String] subject The subject in the email that will be sent to the signers.
|
49
|
-
# @option opts [String] message The custom message in the email that will be sent to the signers.
|
50
|
-
# @option opts [String] signing_redirect_url The URL you want the signer redirected to after they successfully sign. (optional)
|
29
|
+
# Contains all the API calls for the UnclaimedDraft resource.
|
30
|
+
# Take a look at our API documentation for creating UnclaimedDrafts (https://app.hellosign.com/api/reference#UnclaimedDraft)
|
31
|
+
# for more information about this.
|
32
|
+
#
|
33
|
+
# @author [hellosign]
|
34
|
+
#
|
35
|
+
module UnclaimedDraft
|
36
|
+
|
51
37
|
#
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
# @option opts [Array<String>]
|
58
|
-
# @option opts [
|
59
|
-
#
|
38
|
+
# Creates a new UnclaimedDraft that can be claimed using the claim_url.
|
39
|
+
# The first authenticated user to access the claim_url claims the Draft and will be shown either the "Sign and send" or the "Request signature" page with the Draft loaded.
|
40
|
+
# Subsequent access to the claim_url will result in a 404 not found error.
|
41
|
+
# @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)
|
42
|
+
# @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.
|
43
|
+
# @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.
|
44
|
+
# @option opts [String] type The type of UnclaimedDraft to create. Use "send_document" to create a claimable file, and "request_signature" for a claimable signature request.
|
45
|
+
# * For "send_document," only the file parameter is required.
|
46
|
+
# * For "request_signature," then signer name and email_address are required.
|
47
|
+
# @option opts [String] subject The subject in the email that will be sent to the signer(s). (optional)
|
48
|
+
# @option opts [String] message The custom message in the email that will be sent to the signer(s). (optional)
|
49
|
+
# @option opts [Array<Hash>] signers List of signers, each item is a Hash with these keys: (optional)
|
50
|
+
# * :name (String) Signer's name
|
51
|
+
# * :email_address (String) Signer's email address
|
52
|
+
# * :order (Integer) The order the signers are required to sign in (optional)
|
53
|
+
# @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)
|
54
|
+
# * :name (String) Custom field name or "Field Label"
|
55
|
+
# * :value (String) The value of the field. This data will appear on the SignatureRequest.
|
56
|
+
# @option opts [Array<String>] cc_email_addresses The email addresses that should be CCed. (optional)
|
57
|
+
# @option opts [String] signing_redirect_url The URL you want the signer(s) redirected to after they successfully sign. (optional)
|
58
|
+
# @option opts [Boolean] use_text_tags Indicates whether the SignatureRequest should have Text Tags enabled. Defaults to 0. (optional)
|
59
|
+
# @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)
|
60
|
+
# @option opts [Boolean] use_preexisting_fields Sets the detection of predefined PDF fields. Defaults to 0. (optional)
|
61
|
+
# @option opts [Hash] metadata Key-value data attached to the SignatureRequest. (optional)
|
62
|
+
# @option opts [Boolean] allow_decline Allows signers to decline the SignatureRequest. Defaults to 0. (optional)
|
63
|
+
# @option opts [Boolean] allow_reassign Allows signers to reassign the SignatureRequest to another signer. Defaults to 0. (optional)
|
64
|
+
# @option opts [Array<Hash>] form_fields_per_document The fields that should appear on the document. (optional)
|
60
65
|
#
|
61
|
-
# @return [HelloSign::Resource::UnclaimedDraft]
|
66
|
+
# @return [HelloSign::Resource::UnclaimedDraft] an UnclaimedDraft object
|
62
67
|
#
|
63
|
-
# @example send_document
|
68
|
+
# @example type: send_document
|
64
69
|
# unclaimed_draft = @client.create_unclaimed_draft(
|
65
70
|
# :test_mode => 1,
|
66
71
|
# :files => ['NDA.pdf', 'AppendixA.pdf']
|
67
72
|
# )
|
68
|
-
# @example request_signature
|
73
|
+
# @example type: request_signature
|
69
74
|
# unclaimed_draft = @client.create_unclaimed_draft(
|
70
75
|
# :test_mode => 1,
|
71
76
|
# :type => 'request_signature',
|
@@ -102,26 +107,37 @@ module HelloSign
|
|
102
107
|
end
|
103
108
|
|
104
109
|
#
|
105
|
-
# Creates a new
|
106
|
-
# @option opts [
|
107
|
-
# @option opts [
|
108
|
-
# @option opts [Array<String>] files
|
109
|
-
# @option opts [Array<String>] file_urls
|
110
|
-
# @option opts [String]
|
111
|
-
# @option opts [String]
|
112
|
-
#
|
113
|
-
#
|
110
|
+
# Creates a new Embedded UnclaimedDraft object that can be launched in an iFrame using the claim_url.
|
111
|
+
# @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)
|
112
|
+
# @option opts [String] client_id The API App Client ID associated with the UnclaimedDraft.
|
113
|
+
# @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.
|
114
|
+
# @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.
|
115
|
+
# @option opts [String] requester_email_address The email address of the requester, if "request_signature" type.
|
116
|
+
# @option opts [String] type The type of UnclaimedDraft to create. Use "send_document" to create a claimable file, and "request_signature" for a claimable signature request.
|
117
|
+
# * For "send_document," only the file parameter is required.
|
118
|
+
# * For "request_signature," then signer name and email_address are required.
|
119
|
+
# @option opts [String] subject The subject in the email that will be sent to the signer(s). (optional)
|
120
|
+
# @option opts [String] message The custom message in the email that will be sent to the signer(s). (optional)
|
121
|
+
# @option opts [Array<Hash>] signers List of signers, each item is a Hash with these keys: (optional)
|
122
|
+
# * :name (String) Signer's name
|
123
|
+
# * :email_address (String) Signer's email address
|
124
|
+
# * :order (Integer) The order the signers are required to sign in (optional)
|
125
|
+
# @option opts [Array<String>] cc_email_addresses The email addresses that should be CCed. (optional)
|
114
126
|
# @option opts [String] signing_redirect_url The URL you want the signer redirected to after they successfully sign. (optional)
|
127
|
+
# @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)
|
128
|
+
# * :name (String) Custom field name or "Field Label"
|
129
|
+
# * :value (String) The value of the field. This data will appear on the SignatureRequest.
|
130
|
+
# @option opts [Boolean] use_text_tags Indicates whether the SignatureRequest should have Text Tags enabled. Defaults to 0. (optional)
|
131
|
+
# @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)
|
132
|
+
# @option opts [Boolean] use_preexisting_fields Sets the detection of predefined PDF fields. Defaults to 0. (optional)
|
133
|
+
# @option opts [Boolean] is_for_embedded_signing Enable the UnclaimedDraft to be used for an Embedded SignatureRequest. Defaults to 0. (optional)
|
134
|
+
# @option opts [Boolean] skip_me_now Disables the "Me (Now)" option for the preparer. Not available for type "send_document." Defaults to 0. (optional)
|
135
|
+
# @option opts [Hash] metadata Key-value data attached to the SignatureRequest. (optional)
|
136
|
+
# @option opts [Boolean] allow_decline Allows signers to decline the SignatureRequest. Defaults to 0. (optional)
|
137
|
+
# @option opts [Boolean] allow_reassign Allows signers to reassign the SignatureRequest to another signer. Defaults to 0. (optional)
|
138
|
+
# @option opts [Array<Hash>] form_fields_per_document The fields that should appear on the document. (optional)
|
115
139
|
#
|
116
|
-
# @
|
117
|
-
# * :name (String) Sender' name
|
118
|
-
# * :email_address (String) Sender's email address
|
119
|
-
# * :order (Integer) The order the signer is required to sign in (optional)
|
120
|
-
# * :pin (Integer) The 4-digit code that will secure this signer's signature page. You must have a business plan to use this feature. (optional)
|
121
|
-
# @option opts [Array<String>] cc_email_addresses The email addresses that should be CCed.
|
122
|
-
# @option opts [Array<Hash>] custom_fields An array of custom merge fields, representing those present on the document with Text Tags.
|
123
|
-
#
|
124
|
-
# @return [HelloSign::Resource::UnclaimedDraft] a UnclaimedDraft object
|
140
|
+
# @return [HelloSign::Resource::UnclaimedDraft] an UnclaimedDraft object
|
125
141
|
#
|
126
142
|
# @example request_signature
|
127
143
|
# unclaimed_draft = @client.create_embedded_unclaimed_draft(
|
@@ -152,7 +168,7 @@ module HelloSign
|
|
152
168
|
opts[:client_id] ||= self.client_id
|
153
169
|
prepare_files opts
|
154
170
|
prepare_custom_fields opts
|
155
|
-
|
171
|
+
|
156
172
|
if opts[:type] == 'request_signature' || opts[:type] == 'send_document'
|
157
173
|
prepare_signers opts
|
158
174
|
end
|
@@ -160,23 +176,36 @@ module HelloSign
|
|
160
176
|
HelloSign::Resource::UnclaimedDraft.new post('/unclaimed_draft/create_embedded', :body => opts)
|
161
177
|
end
|
162
178
|
|
163
|
-
|
164
179
|
#
|
165
|
-
# Creates a new
|
166
|
-
# @option opts [
|
167
|
-
# @option opts [String]
|
168
|
-
# @option opts [String]
|
169
|
-
#
|
180
|
+
# Creates a new Embedded UnclaimedDraft object from a Template that can be launched in an iFrame using the claim_url.
|
181
|
+
# @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)
|
182
|
+
# @option opts [String] client_id The API App Client ID associated with the UnclaimedDraft.
|
183
|
+
# @option opts [String] template_id The Template ID to use when creating the UnclaimedDraft.
|
184
|
+
# * Use template_ids[%i%] if using multiple templates, replacing %i% with an integer to indicate the order of the Templates
|
185
|
+
# @option opts [String] requester_email_address The email address of the requester, if "request_signature" type.
|
186
|
+
# @option opts [String] title The title you want to assign to the SignatureRequest. (optional)
|
187
|
+
# @option opts [String] subject The subject in the email that will be sent to the signer(s). (optional)
|
188
|
+
# @option opts [String] message The custom message in the email that will be sent to the signer(s). (optional)
|
189
|
+
# @option opts [Array<Hash>] signers List of signers
|
190
|
+
# * :role (String) The signer role indicated on the Template. Note that the role name is case sensitive.
|
191
|
+
# * :name (String) Signer's name
|
192
|
+
# * :email_address (String) Signer's email address
|
193
|
+
# @option opts [Array<Hash>] ccs The individual(s) to be CC'd on the SignatureRequest. Required when a CC role exists for the Template.
|
194
|
+
# * :role (String) The CC role indicated on the Template. Note that the role name is case sensitive.
|
195
|
+
# * :email_address (String) CC Recipient's email address
|
170
196
|
# @option opts [String] signing_redirect_url The URL you want the signer redirected to after they successfully sign. (optional)
|
197
|
+
# @option opts [String] requesting_redirect_url The URL you want the requester redirected to after they successfully request a SignatureRequest. (optional)
|
198
|
+
# @option opts [Hash] metadata Key-value data attached to the SignatureRequest. (optional)
|
199
|
+
# @option opts [Array<Hash>] custom_fields An array of custom merge fields, representing those present in the Template. (optional)
|
200
|
+
# * :name (String) Custom field name or "Field Label"
|
201
|
+
# * :value (String) The value of the field. This data will appear on the SignatureRequest.
|
202
|
+
# @option opts [Array<String>] files Use files to indicate the uploaded file(s) to append to the SignatureRequest. (optional)
|
203
|
+
# @option opts [Array<String>] file_urls Use file_urls to have HelloSign download the file(s) to append to the SignatureRequest. (optional)
|
204
|
+
# @option opts [Boolean] skip_me_now Disables the "Me (Now)" option for the preparer. Not available for type "send_document." Defaults to 0. (optional)
|
205
|
+
# @option opts [Boolean] allow_decline Allows signers to decline the SignatureRequest. Defaults to 0. (optional)
|
206
|
+
# @option opts [Boolean] allow_reassign Allows signers to reassign the SignatureRequest to another signer. Defaults to 0. (optional)
|
171
207
|
#
|
172
|
-
# @
|
173
|
-
# * :name (String) Sender' name
|
174
|
-
# * :email_address (String) Sender's email address
|
175
|
-
# * :order (Integer) The order the signer is required to sign in (optional)
|
176
|
-
# * :pin (Integer) The 4-digit code that will secure this signer's signature page. You must have a business plan to use this feature. (optional)
|
177
|
-
# @option opts [Array<String>] cc_email_addresses The email addresses that should be CCed.
|
178
|
-
#
|
179
|
-
# @return [HelloSign::Resource::UnclaimedDraft] a UnclaimedDraft object
|
208
|
+
# @return [HelloSign::Resource::UnclaimedDraft] an UnclaimedDraft object
|
180
209
|
#
|
181
210
|
# @example request_signature
|
182
211
|
# unclaimed_draft = @client.create_embedded_unclaimed_draft_with_template(
|
@@ -218,6 +247,25 @@ module HelloSign
|
|
218
247
|
HelloSign::Resource::UnclaimedDraft.new post('/unclaimed_draft/create_embedded_with_template', :body => opts)
|
219
248
|
end
|
220
249
|
|
250
|
+
#
|
251
|
+
# Creates a new SignatureRequest from an Embedded UnclaimedDraft. This UnclaimedDraft can be
|
252
|
+
# edited using the claim_url.
|
253
|
+
# @option opts [String] signature_request_id The SignatureRequest ID to edit and resend.
|
254
|
+
# @option opts [String] client_id The API App Client ID associated with the UnclaimedDraft.
|
255
|
+
# @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)
|
256
|
+
# @option opts [String] requesting_redirect_url The URL you want the requester redirected to after they successfully request a SignatureRequest. (optional)
|
257
|
+
# @option opts [String] signing_redirect_url The URL you want the signer redirected to after they successfully sign. (optional)
|
258
|
+
# @option opts [Boolean] is_for_embedded_signing Enable the UnclaimedDraft to be used for an Embedded SignatureRequest. Defaults to 0. (optional)
|
259
|
+
#
|
260
|
+
# @return [HelloSign::Resource::UnclaimedDraft] an UnclaimedDraft object
|
261
|
+
#
|
262
|
+
# @example
|
263
|
+
# unclaimed_draft = @client.edit_and_resend_unclaimed_draft(
|
264
|
+
# :signature_request_id => '75cdf7dc8b323d43b347e4a3614d1f822bd09491',
|
265
|
+
# :test_mode => 1,
|
266
|
+
# :client_id => 'b6b8e7deaf8f0b95c029dca049356d4a2cf9710a',
|
267
|
+
# )
|
268
|
+
#
|
221
269
|
def edit_and_resend_unclaimed_draft(opts)
|
222
270
|
signature_request_id = opts.delete(:signature_request_id)
|
223
271
|
path = "/unclaimed_draft/edit_and_resend/#{signature_request_id}"
|