Class: Docusigner::Envelope
- Inherits:
-
Base
- Object
- ReactiveResource::Base
- Base
- Docusigner::Envelope
show all
- Defined in:
- lib/docusigner/envelope.rb
Defined Under Namespace
Modules: Status
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
act_as_user, authorization=, connection, headers, #to_json, token=
#add_document, #encode
Class Method Details
.documents_combined(id, prefix_options = {}) ⇒ Object
fetch documents - don’t use helper b/c we don’t want to try to parse as json
33
34
35
|
# File 'lib/docusigner/envelope.rb', line 33
def documents_combined(id, prefix_options = {})
connection.get(custom_method_collection_url("#{id}/documents/combined", prefix_options), ).body
end
|
.recipient_url(id, prefix_options = {}, params = {}) ⇒ Object
27
28
29
30
|
# File 'lib/docusigner/envelope.rb', line 27
def recipient_url(id, prefix_options = {}, params = {})
resp = post("#{id}/views/recipient", prefix_options, params.to_json)
format.decode(resp.body)
end
|
Instance Method Details
#correct_url(params = {}) ⇒ Object
60
61
62
63
|
# File 'lib/docusigner/envelope.rb', line 60
def correct_url(params = {})
resp = post("views/correct", prefix_options, params.to_json)
self.class.format.decode(resp.body)
end
|
#documents_combined(params = {}) ⇒ Object
fetch documents - don’t use helper b/c we don’t want to try to parse as json
66
67
68
|
# File 'lib/docusigner/envelope.rb', line 66
def documents_combined(params = {})
connection.get(custom_method_element_url("documents/combined", prefix_options.merge(params)), self.class.).body
end
|
#recipient_url(params = {}) ⇒ Object
50
51
52
53
|
# File 'lib/docusigner/envelope.rb', line 50
def recipient_url(params = {})
resp = post("views/recipient", prefix_options, params.to_json)
self.class.format.decode(resp.body)
end
|
#send! ⇒ Object
39
40
41
|
# File 'lib/docusigner/envelope.rb', line 39
def send!
update_attribute(:status, Docusigner::Envelope::Status::SENT)
end
|
#sender_url(params = {}) ⇒ Object
55
56
57
58
|
# File 'lib/docusigner/envelope.rb', line 55
def sender_url(params = {})
resp = post("views/sender", prefix_options, params.to_json)
self.class.format.decode(resp.body)
end
|
#void!(reason) ⇒ Object
43
44
45
46
47
48
|
# File 'lib/docusigner/envelope.rb', line 43
def void!(reason)
update_attributes({
:status => Docusigner::Envelope::Status::VOIDED,
:voidReason => reason
})
end
|