Module: HelloSign::Api::UnclaimedDraft
- Included in:
- Client
- Defined in:
- lib/hello_sign/api/unclaimed_draft.rb
Overview
Contains all the api calls for the UnclaimedDraft resource. Take a look at our unclaimed draft document for more information about this.
Instance Method Summary collapse
-
#create_embedded_unclaimed_draft(opts) ⇒ HelloSign::Resource::UnclaimedDraft
Creates a new embedded unclaimed draft object that can be launched in an iframe using the claim URL.
-
#create_embedded_unclaimed_draft_with_template(opts) ⇒ HelloSign::Resource::UnclaimedDraft
Creates a new embedded unclaimed draft object from a template that can be launched in an iframe using the claim URL.
-
#create_unclaimed_draft(opts) ⇒ HelloSign::Resource::UnclaimedDraft
Creates a new Draft that can be claimed using the claim URL.
- #edit_and_resend_unclaimed_draft(opts) ⇒ Object
Instance Method Details
#create_embedded_unclaimed_draft(opts) ⇒ HelloSign::Resource::UnclaimedDraft
Creates a new embedded unclaimed draft object that can be launched in an iframe using the claim URL.
147 148 149 150 151 152 153 154 155 |
# File 'lib/hello_sign/api/unclaimed_draft.rb', line 147 def (opts) opts[:client_id] ||= self.client_id prepare_files opts if opts[:type] == 'request_signature' prepare_signers opts end HelloSign::Resource::UnclaimedDraft.new post('/unclaimed_draft/create_embedded', :body => opts) end |
#create_embedded_unclaimed_draft_with_template(opts) ⇒ HelloSign::Resource::UnclaimedDraft
Creates a new embedded unclaimed draft object from a template that can be launched in an iframe using the claim URL.
205 206 207 208 209 210 211 212 |
# File 'lib/hello_sign/api/unclaimed_draft.rb', line 205 def (opts) opts[:client_id] ||= self.client_id prepare_signers opts prepare_ccs opts prepare_templates opts prepare_files opts HelloSign::Resource::UnclaimedDraft.new post('/unclaimed_draft/create_embedded_with_template', :body => opts) end |
#create_unclaimed_draft(opts) ⇒ HelloSign::Resource::UnclaimedDraft
Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the “Sign and send” or the “Request signature” page with the Draft loaded. Subsequent access to the claim URL will result in a 404 not found. If the type is “send_document” then only the file parameter is required. If the type is “request_signature”, then the identities of the signers and optionally the location of signing elements on the page are also required.
91 92 93 94 95 96 97 98 99 |
# File 'lib/hello_sign/api/unclaimed_draft.rb', line 91 def create_unclaimed_draft opts prepare_files opts prepare_form_fields opts if opts[:type] == 'request_signature' prepare_signers opts end HelloSign::Resource::UnclaimedDraft.new post('/unclaimed_draft/create', :body => opts) end |
#edit_and_resend_unclaimed_draft(opts) ⇒ Object
214 215 216 217 218 |
# File 'lib/hello_sign/api/unclaimed_draft.rb', line 214 def edit_and_resend_unclaimed_draft(opts) signature_request_id = opts.delete(:signature_request_id) path = "/unclaimed_draft/edit_and_resend/#{signature_request_id}" HelloSign::Resource::UnclaimedDraft.new post(path, :body => opts) end |