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 API documentation for creating UnclaimedDrafts (app.hellosign.com/api/reference#UnclaimedDraft) for more information about this.
Instance Method Summary collapse
-
#create_embedded_unclaimed_draft(opts) ⇒ HelloSign::Resource::UnclaimedDraft
Creates a new Embedded UnclaimedDraft 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 UnclaimedDraft 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 UnclaimedDraft that can be claimed using the claim_url.
-
#edit_and_resend_unclaimed_draft(opts) ⇒ HelloSign::Resource::UnclaimedDraft
Creates a new SignatureRequest from an Embedded UnclaimedDraft.
Instance Method Details
#create_embedded_unclaimed_draft(opts) ⇒ HelloSign::Resource::UnclaimedDraft
Creates a new Embedded UnclaimedDraft object that can be launched in an iFrame using the claim_url.
167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/hello_sign/api/unclaimed_draft.rb', line 167 def (opts) opts[:client_id] ||= self.client_id prepare_files opts prepare_form_fields opts prepare_custom_fields opts if opts[:type] == 'request_signature' || opts[:type] == 'send_document' 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 UnclaimedDraft object from a Template that can be launched in an iFrame using the claim_url.
241 242 243 244 245 246 247 248 249 |
# File 'lib/hello_sign/api/unclaimed_draft.rb', line 241 def (opts) opts[:client_id] ||= self.client_id prepare_signers opts prepare_custom_fields 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 UnclaimedDraft that can be claimed using the claim_url. The first authenticated user to access the claim_url claims 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 error.
97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/hello_sign/api/unclaimed_draft.rb', line 97 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 HelloSign::Resource::UnclaimedDraft.new post('/unclaimed_draft/create', :body => opts) end |
#edit_and_resend_unclaimed_draft(opts) ⇒ HelloSign::Resource::UnclaimedDraft
Creates a new SignatureRequest from an Embedded UnclaimedDraft. This UnclaimedDraft can be edited using the claim_url.
270 271 272 273 274 |
# File 'lib/hello_sign/api/unclaimed_draft.rb', line 270 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 |