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

Commit 9e37255

Browse files
authored
Merge pull request #84 from HelloFax/Custom-Fields
Custom fields
2 parents 5dda722 + 4095854 commit 9e37255

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

lib/hello_sign/api/signature_request.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def get_signature_requests(opts={})
8888
# * :order (Integer) The order the signer is required to sign in
8989
# * :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.
9090
# @option opts [Array<String>] cc_email_addresses The email addresses that should be CCed.
91+
# @option opts [Array<Hash>] custom_fields An array of custom merge fields, representing those present on the document with Text Tags.
9192
# @option opts [String] form_fields_per_document
9293
#
9394
# @return [HelloSign::Resource::SignatureRequest] a SignatureRequest
@@ -122,6 +123,7 @@ def send_signature_request(opts)
122123
prepare_files opts
123124
prepare_signers opts
124125
prepare_form_fields opts
126+
prepare_custom_fields opts
125127

126128
HelloSign::Resource::SignatureRequest.new post('/signature_request/send', :body => opts)
127129
end
@@ -290,6 +292,7 @@ def signature_request_files(opts)
290292
# * :order (Integer) The order the signer is required to sign in
291293
# * :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.
292294
# @option opts [Array<String>] cc_email_addresses The email addresses that should be CCed.
295+
# @option opts [Array<Hash>] custom_fields An array of custom merge fields, representing those present on the document with Text Tags.
293296
# @option opts [String] form_fields_per_document
294297
# @option opts [Integer] ux_version sets the version of the signer page to use
295298
#
@@ -325,6 +328,7 @@ def create_embedded_signature_request(opts)
325328
prepare_files opts
326329
prepare_signers opts
327330
prepare_form_fields opts
331+
prepare_custom_fields opts
328332

329333
HelloSign::Resource::SignatureRequest.new post('/signature_request/create_embedded', :body => opts)
330334
end

lib/hello_sign/api/unclaimed_draft.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ module UnclaimedDraft
5555
# * :order (Integer) The order the signer is required to sign in (optional)
5656
# * :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)
5757
# @option opts [Array<String>] cc_email_addresses The email addresses that should be CCed.
58+
# @option opts [Array<Hash>] custom_fields An array of custom merge fields, representing those present on the document with Text Tags.
5859
# @option opts [String] form_fields_per_document
5960
#
6061
# @return [HelloSign::Resource::UnclaimedDraft] a UnclaimedDraft object
@@ -91,6 +92,8 @@ module UnclaimedDraft
9192
def create_unclaimed_draft opts
9293
prepare_files opts
9394
prepare_form_fields opts
95+
prepare_custom_fields opts
96+
9497
if opts[:type] == 'request_signature'
9598
prepare_signers opts
9699
end
@@ -116,6 +119,7 @@ def create_unclaimed_draft opts
116119
# * :order (Integer) The order the signer is required to sign in (optional)
117120
# * :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)
118121
# @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.
119123
#
120124
# @return [HelloSign::Resource::UnclaimedDraft] a UnclaimedDraft object
121125
#
@@ -147,6 +151,8 @@ def create_unclaimed_draft opts
147151
def create_embedded_unclaimed_draft(opts)
148152
opts[:client_id] ||= self.client_id
149153
prepare_files opts
154+
prepare_custom_fields opts
155+
150156
if opts[:type] == 'request_signature' || opts[:type] == 'send_document'
151157
prepare_signers opts
152158
end

lib/hello_sign/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@
2323
#
2424

2525
module HelloSign
26-
VERSION = '3.6.3'
26+
VERSION = '3.6.4'
2727
end

0 commit comments

Comments
 (0)