hellosign-ruby-sdk 3.2.3 → 3.2.4
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/api/signature_request.rb +13 -3
- data/lib/hello_sign/client.rb +21 -0
- 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: e380990f36888628927e0232c6c0b7e9f2a13bba
|
4
|
+
data.tar.gz: e636e1d7a0a7f39f074b490a0d9f04aa1e662947
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61b7d9b4974815af4906cfee7679ca9e85f10808e79db665c7261047483fe6576b99f7824ba4059408d8cc44ca7010a636052decee4262258e3a1c38626dd382
|
7
|
+
data.tar.gz: 795d36640edab7dc61d2ba9d570b291a5958a01bbab1dac4d20c66135d855cf2e127ec4672b8f667bf649dd36449afa14ef594e9cdf47f1fd60439d7014a4893
|
@@ -37,6 +37,7 @@ 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
|
40
41
|
#
|
41
42
|
# @return [HelloSign::Resource::SignatureRequest] a SignatureRequest object
|
42
43
|
#
|
@@ -44,12 +45,16 @@ module HelloSign
|
|
44
45
|
# signature_request = @client.get_signature_request :signature_request_id => 'fa5c8a0b0f492d768749333ad6fcc214c111e967'
|
45
46
|
#
|
46
47
|
def get_signature_request(opts)
|
47
|
-
|
48
|
+
path = "/signature_request/#{opts[:signature_request_id]}"
|
49
|
+
query = create_query_string(opts, [:ux_version])
|
50
|
+
path += query
|
51
|
+
HelloSign::Resource::SignatureRequest.new get(path)
|
48
52
|
end
|
49
53
|
|
50
54
|
#
|
51
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 CCed on.
|
52
56
|
# @option opts [Integer] page (1) Which page number of the Template List to return.
|
57
|
+
# @option opts [Integer] ux_version sets the version of the signer page to use
|
53
58
|
#
|
54
59
|
# @return [HelloSign::Resource::ResourceArray]
|
55
60
|
#
|
@@ -58,8 +63,8 @@ module HelloSign
|
|
58
63
|
#
|
59
64
|
def get_signature_requests(opts={})
|
60
65
|
path = '/signature_request/list'
|
61
|
-
|
62
|
-
path +=
|
66
|
+
query = create_query_string(opts, [:page, :page_size, :ux_version])
|
67
|
+
path += query
|
63
68
|
HelloSign::Resource::ResourceArray.new get(path, opts), 'signature_requests', HelloSign::Resource::SignatureRequest
|
64
69
|
end
|
65
70
|
|
@@ -131,6 +136,7 @@ module HelloSign
|
|
131
136
|
# * :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.
|
132
137
|
# @option opts [Array<Hash>] ccs The email addresses CC destinations. Required when a CC role exists for the Template.
|
133
138
|
# @option opts [Array<Hash>] custom_fields The value to fill in for the custom field with the name of CustomFieldName. Required when a CustomField exists in the Template.
|
139
|
+
# @option opts [Integer] ux_version sets the version of the signer page to use
|
134
140
|
#
|
135
141
|
# @return [HelloSign::Resource::SignatureRequest] a SignatureRequest
|
136
142
|
# @example
|
@@ -202,6 +208,7 @@ module HelloSign
|
|
202
208
|
# Sends an email to the signer reminding them to sign the signature request.
|
203
209
|
# @option opts [String] signature_request_id The id of the SignatureRequest to send a reminder for.
|
204
210
|
# @option opts [String] email_address The email address of the signer to send a reminder to.
|
211
|
+
# @option opts [Integer] ux_version sets the version of the signer page to use
|
205
212
|
#
|
206
213
|
# @return [HelloSign::Resource::SignatureRequest] a SignatureRequest
|
207
214
|
# @example
|
@@ -258,6 +265,7 @@ module HelloSign
|
|
258
265
|
# * :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.
|
259
266
|
# @option opts [Array<String>] cc_email_addresses The email addresses that should be CCed.
|
260
267
|
# @option opts [String] form_fields_per_document
|
268
|
+
# @option opts [Integer] ux_version sets the version of the signer page to use
|
261
269
|
#
|
262
270
|
# @return [HelloSign::Resource::SignatureRequest] a SignatureRequest
|
263
271
|
# @example
|
@@ -312,6 +320,8 @@ module HelloSign
|
|
312
320
|
# * :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.
|
313
321
|
# @option opts [Hash] ccs The email address of the CC filling the role of RoleName. Required when a CC role exists for the Template.
|
314
322
|
# @option opts [Hash] custom_fields The value to fill in for custom field with the name of CustomFieldName. Required when a CustomField exists in the Template.
|
323
|
+
# @option opts [Integer] ux_version sets the version of the signer page to use
|
324
|
+
#
|
315
325
|
# @return [HelloSign::Resource::SignatureRequest] a SignatureRequest
|
316
326
|
# @example
|
317
327
|
# request = @client.create_embedded_signature_request_with_template(
|
data/lib/hello_sign/client.rb
CHANGED
@@ -248,6 +248,27 @@ module HelloSign
|
|
248
248
|
end
|
249
249
|
end
|
250
250
|
|
251
|
+
# Takes options given to an API endpoint as a hash, plus an array of parameters (as symbols), and creates a
|
252
|
+
# query string out of any listed parameters present (that also have values)
|
253
|
+
|
254
|
+
def create_query_string(opts, parameterList)
|
255
|
+
result = ""
|
256
|
+
is_first = true
|
257
|
+
parameterList.each do |param|
|
258
|
+
if (opts.has_key?(param) && opts[param])
|
259
|
+
if (!is_first)
|
260
|
+
result += "&"
|
261
|
+
end
|
262
|
+
is_first = false
|
263
|
+
result += "#{param}=#{opts[param]}"
|
264
|
+
end
|
265
|
+
end
|
266
|
+
if (result.length > 0)
|
267
|
+
result = "?" + result
|
268
|
+
end
|
269
|
+
result
|
270
|
+
end
|
271
|
+
|
251
272
|
def prepare_signers(opts)
|
252
273
|
prepare opts, :signers
|
253
274
|
end
|
data/lib/hello_sign/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hellosign-ruby-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HelloSign
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|