lib/hello_sign/api/signature_request.rb in hellosign-ruby-sdk-3.0.4 vs lib/hello_sign/api/signature_request.rb in hellosign-ruby-sdk-3.0.5
- old
+ new
@@ -105,10 +105,33 @@
#
# @return [HelloSign::Resource::SignatureRequest] a SignatureRequest
# @example
# signature_request = @client.send_signature_request_with_template(
# :test_mode => 1,
+ # :template_ids => [
+ # 'c26b8a16784a872da37ea946b9ddec7c1e11dff6',
+ # 'c7ab48e9a9ee7102dd6229dbbc719abc7d90ff9f'
+ # ],
+ # :title => 'Purchase Order',
+ # :subject => 'Purchase Order',
+ # :message => 'Glad we could come to an agreement.',
+ # :signers => [
+ # {
+ # :email_address => 'george@example.com',
+ # :name => 'George',
+ # :role => 'Client'
+ # },
+ # {
+ # :email_address => 'mary@example.com',
+ # :name => 'Mary',
+ # :role => 'Manager'
+ # }
+ # ]
+ # )
+ # @example
+ # signature_request = @client.send_signature_request_with_template(
+ # :test_mode => 1,
# :template_id => 'c26b8a16784a872da37ea946b9ddec7c1e11dff6',
# :title => 'Purchase Order',
# :subject => 'Purchase Order',
# :message => 'Glad we could come to an agreement.',
# :signers => [
@@ -131,10 +154,12 @@
# )
#
def send_signature_request_with_template(opts)
prepare_signers opts
prepare_ccs opts
+ prepare_templates opts
+
HelloSign::Resource::SignatureRequest.new post('/signature_request/send_with_template', :body => opts)
end
#
# Sends an email to the signer reminding them to sign the signature request.
@@ -275,9 +300,10 @@
#
def create_embedded_signature_request_with_template(opts)
opts[:client_id] ||= self.client_id
prepare_signers opts
prepare_ccs opts
+ prepare_templates opts
HelloSign::Resource::SignatureRequest.new post('/signature_request/create_embedded_with_template', :body => opts)
end
end
end