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

Commit

Permalink
Merge pull request #84 from HelloFax/Custom-Fields
Browse files Browse the repository at this point in the history
Custom fields
  • Loading branch information
jyoung488 authored Apr 26, 2018
2 parents 5dda722 + 4095854 commit 9e37255
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/hello_sign/api/signature_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def get_signature_requests(opts={})
# * :order (Integer) The order the signer is required to sign in
# * :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.
# @option opts [Array<String>] cc_email_addresses The email addresses that should be CCed.
# @option opts [Array<Hash>] custom_fields An array of custom merge fields, representing those present on the document with Text Tags.
# @option opts [String] form_fields_per_document
#
# @return [HelloSign::Resource::SignatureRequest] a SignatureRequest
Expand Down Expand Up @@ -122,6 +123,7 @@ def send_signature_request(opts)
prepare_files opts
prepare_signers opts
prepare_form_fields opts
prepare_custom_fields opts

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

HelloSign::Resource::SignatureRequest.new post('/signature_request/create_embedded', :body => opts)
end
Expand Down
6 changes: 6 additions & 0 deletions lib/hello_sign/api/unclaimed_draft.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ module UnclaimedDraft
# * :order (Integer) The order the signer is required to sign in (optional)
# * :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)
# @option opts [Array<String>] cc_email_addresses The email addresses that should be CCed.
# @option opts [Array<Hash>] custom_fields An array of custom merge fields, representing those present on the document with Text Tags.
# @option opts [String] form_fields_per_document
#
# @return [HelloSign::Resource::UnclaimedDraft] a UnclaimedDraft object
Expand Down Expand Up @@ -91,6 +92,8 @@ module UnclaimedDraft
def create_unclaimed_draft opts
prepare_files opts
prepare_form_fields opts
prepare_custom_fields opts

if opts[:type] == 'request_signature'
prepare_signers opts
end
Expand All @@ -116,6 +119,7 @@ def create_unclaimed_draft opts
# * :order (Integer) The order the signer is required to sign in (optional)
# * :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)
# @option opts [Array<String>] cc_email_addresses The email addresses that should be CCed.
# @option opts [Array<Hash>] custom_fields An array of custom merge fields, representing those present on the document with Text Tags.
#
# @return [HelloSign::Resource::UnclaimedDraft] a UnclaimedDraft object
#
Expand Down Expand Up @@ -147,6 +151,8 @@ def create_unclaimed_draft opts
def create_embedded_unclaimed_draft(opts)
opts[:client_id] ||= self.client_id
prepare_files opts
prepare_custom_fields opts

if opts[:type] == 'request_signature' || opts[:type] == 'send_document'
prepare_signers opts
end
Expand Down
2 changes: 1 addition & 1 deletion lib/hello_sign/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
#

module HelloSign
VERSION = '3.6.3'
VERSION = '3.6.4'
end

0 comments on commit 9e37255

Please sign in to comment.