Method: HelloSign::Api::SignatureRequest#create_embedded_signature_request_with_template

Defined in:
lib/hello_sign/api/signature_request.rb

#create_embedded_signature_request_with_template(opts) ⇒ HelloSign::Resource::SignatureRequest

Creates a new SignatureRequest based on the given Template to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on HelloSign.

Examples:

request = @client.create_embedded_signature_request_with_template(
  :test_mode => 1,
  :client_id => 'b6b8e7deaf8f0b95c029dca049356d4a2cf9710a',
  :template_id => 'c26b8a16784a872da37ea946b9ddec7c1e11dff6',
  :title => 'Purchase Order',
  :subject => 'Purchase Order',
  :message => 'Glad we could come to an agreement.',
  :metadata => {
   :client_id => '1234',
   :custom_text => 'NDA #9'
  },
  :signers => [
    {
      :email_address => '[email protected]',
      :name => 'George',
      :role => 'Client'
    }
  ],
  :ccs => [
    {
      :email_address =>'[email protected]',
      :role => "Accounting"
    }
  ],
  :custom_fields => {
    :Cost => '$20,000'
  }
)

Parameters:

  • opts (Hash)

    a customizable set of options

Options Hash (opts):

  • test_mode (Integer) — default: 0

    Whether this is a test, the signature request will not be legally binding if set to 1.

  • client_id (String)

    Client id of the app you’re using to create this embedded signature request. Visit our embedded page page to learn more about this parameter.

  • template_id (String)

    The id of the Template to use when creating the SignatureRequest.

  • title (String)

    The title you want to assign to the SignatureRequest.

  • subject (String)

    The subject in the email that will be sent to the signers.

  • message (String)

    The custom message in the email that will be sent to the signers.

  • signing_redirect_url (String)

    The URL you want the signer redirected to after they successfully sign. (optional)

  • hide_text_tags (Integer)

    Whether or not your text tags hidden after parsing

  • use_text_tags (Integer)

    Whether or not your document contains parseable text-tags

  • signers (Array<Hash>)

    List of signers, each item is a Hash with these keys:

    • :name (String) Sender’ name

    • :email_address (String) Sender’s email address

    • :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.

  • ccs (Hash)

    The email address of the CC filling the role of RoleName. Required when a CC role exists for the Template.

  • custom_fields (Hash)

    The value to fill in for custom field with the name of CustomFieldName. Required when a CustomField exists in the Template.

  • ux_version (Integer)

    sets the version of the signer page to use

Returns:



356
357
358
359
360
361
362
363
# File 'lib/hello_sign/api/signature_request.rb', line 356

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