Module: HelloSign::Api::Embedded

Included in:
Client
Defined in:
lib/hello_sign/api/embedded.rb

Overview

HelloSign allows you to embed the signing page on your site in an iFrame without the need for the signer/preparer to create a HelloSign account. Take a look at our Embedded Signing Walkthrough (app.hellosign.com/api/embeddedSigningWalkthrough) for more information about this.

Author:

  • hellosign

Instance Method Summary collapse

Instance Method Details

#get_embedded_sign_url(opts) ⇒ HelloSign::Resource::Embedded

Retrieves the embedded signature sign_url.

Examples:

embedded = @client.get_embedded_sign_url :signature_id => '50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b'

Parameters:

  • opts (Hash)

    a customizable set of options

Options Hash (opts):

  • signature_id (String)

    The Signature ID to retrieve the embedded sign_url for.

Returns:



46
47
48
# File 'lib/hello_sign/api/embedded.rb', line 46

def get_embedded_sign_url(opts)
  HelloSign::Resource::Embedded.new get("/embedded/sign_url/#{opts[:signature_id]}")
end

#get_embedded_template_edit_url(opts) ⇒ HelloSign::Resource::Embedded

Retrieves the edit_url for an embedded template.

Examples:

edit_url = @client.get_embedded_template_edit_url :template_id => '39e3387f738adfa7ddd4cbd4c00d2a8ab6e4194b'

Parameters:

  • opts (Hash)

    a customizable set of options

Options Hash (opts):

  • test_mode (Boolean)

    Indicates if this is a test Embedded Template. A boolean value is also accepted. Defaults to 0. (optional)

  • template_id (String)

    The Template ID to retreive the embedded edit_url for.

  • cc_roles (Array<Hash>)

    The CC roles that must be assigned when using the Embedded Template to create a SignatureRequest. (optional)

  • merge_fields (String<Array><Hash>)

    List of fields that can be pre-populated by your application when using the Embedded Template to send a SignatureRequest. (optional)

    • :name (String) Merge field name

    • :type (String) Field type - either “text” or “checkbox”

  • skip_signer_roles (Boolean)

    Removes the prompt to edit signer roles, if already provided. Defaults to 0. (optional)

  • skip_subject_message (Boolean)

    Removes the prompt to edit the subject and message, if already provided. Defaults to 0. (optional)

Returns:



64
65
66
67
68
69
70
71
# File 'lib/hello_sign/api/embedded.rb', line 64

def get_embedded_template_edit_url(opts)
  defaults = { :skip_signer_roles => 0, :skip_subject_message => 0, :test_mode => 0 }
  opts = defaults.merge(opts)

  prepare_merge_fields opts

  HelloSign::Resource::Embedded.new post("/embedded/edit_url/#{opts[:template_id]}", :body => opts)
end