Class: HelloSign::Proxy::SignatureRequest
- Defined in:
- lib/hello_sign/proxy/signature_request.rb
Constant Summary
Constants inherited from Object
Instance Method Summary collapse
- #cancel ⇒ Object
- #create_embedded_request(params = {}, &block) ⇒ Object
- #deliver(params = {}, &block) ⇒ Object
- #final_copy ⇒ Object
-
#initialize(client, request_id) ⇒ SignatureRequest
constructor
A new instance of SignatureRequest.
- #list(params = {}) ⇒ Object
- #remind(params = {}) ⇒ Object
- #status ⇒ Object
- #temporary_signature_url(signature_id) ⇒ Object
Constructor Details
#initialize(client, request_id) ⇒ SignatureRequest
Returns a new instance of SignatureRequest.
9 10 11 12 13 |
# File 'lib/hello_sign/proxy/signature_request.rb', line 9 def initialize(client, request_id) super(client) @request_id = request_id end |
Instance Method Details
#cancel ⇒ Object
47 48 49 |
# File 'lib/hello_sign/proxy/signature_request.rb', line 47 def cancel @client.post("/signature_request/cancel/#@request_id") end |
#create_embedded_request(params = {}, &block) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/hello_sign/proxy/signature_request.rb', line 23 def (params = {}, &block) if (form_id = params[:form]) (form_id, &block) else (&block) end end |
#deliver(params = {}, &block) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/hello_sign/proxy/signature_request.rb', line 15 def deliver(params = {}, &block) if (form_id = params[:form]) deliver_request_with_form(form_id, &block) else deliver_request(&block) end end |
#final_copy ⇒ Object
51 52 53 |
# File 'lib/hello_sign/proxy/signature_request.rb', line 51 def final_copy @client.get("/signature_request/final_copy/#@request_id") end |
#list(params = {}) ⇒ Object
35 36 37 38 39 |
# File 'lib/hello_sign/proxy/signature_request.rb', line 35 def list(params = {}) @client.get('/signature_request/list', { params: {page: DEFAULT_PAGE}.merge(params) }) end |
#remind(params = {}) ⇒ Object
41 42 43 44 45 |
# File 'lib/hello_sign/proxy/signature_request.rb', line 41 def remind(params = {}) @client.post("/signature_request/remind/#@request_id", { body: {email_address: params.delete(:email)}.merge(params) }) end |
#status ⇒ Object
31 32 33 |
# File 'lib/hello_sign/proxy/signature_request.rb', line 31 def status @client.get("/signature_request/#@request_id") end |
#temporary_signature_url(signature_id) ⇒ Object
55 56 57 |
# File 'lib/hello_sign/proxy/signature_request.rb', line 55 def temporary_signature_url(signature_id) @client.get("/embedded/sign_url/#{signature_id}") end |