rs4 0.2.9 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rs4/document.rb +30 -0
- data/lib/rs4/reusable_template.rb +18 -0
- data/lib/rs4/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67df5afff0e76629545e1cc0d5fd9721395812a6b5c72c7adb6d3f9bc03e149b
|
4
|
+
data.tar.gz: '08dcb4aa33cfc70fbdd359cbe1fcd42e16ba0adf78a944b2ce36d37eb476d839'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '062720059d3fcd5e026e0b4e130121eacec1de5b1fe07d3432218902bf4303cadf67ef4c2037cef6a3454c0ee60691dac129b7e6e9a48bb5a92595095c51d72e'
|
7
|
+
data.tar.gz: 13a9dbcf8616d98dc76af53048b71ae60b136976084a194d16b4fcd03f759705945d3c1cca2ae429fb0b1811a255b3775b6c6ec962f032179f698e2b158dde70
|
data/lib/rs4/document.rb
CHANGED
@@ -112,6 +112,36 @@ module RS4
|
|
112
112
|
end
|
113
113
|
end
|
114
114
|
|
115
|
+
def get_force_complete(document_guid)
|
116
|
+
return unless document_guid.present?
|
117
|
+
|
118
|
+
path = "documents/#{document_guid}/force_complete"
|
119
|
+
|
120
|
+
response = RS4.configuration.request_handler.execute(path, :post)
|
121
|
+
|
122
|
+
unless response.is_a?(RS4::Error) || response.nil? # .class == Net::HTTPOK
|
123
|
+
raw_document = response.dig(:document) # JSON.parse(response.body, symbolize_names: true)
|
124
|
+
|
125
|
+
# Document.new(raw_document[:document])
|
126
|
+
Document.new(raw_document) if raw_document
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
def get_force_complete(document_guid)
|
131
|
+
return unless document_guid.present?
|
132
|
+
|
133
|
+
path = "documents/#{document_guid}/force_complete"
|
134
|
+
|
135
|
+
response = RS4.configuration.request_handler.execute(path, :get)
|
136
|
+
|
137
|
+
unless response.is_a?(RS4::Error) || response.nil? # .class == Net::HTTPOK
|
138
|
+
raw_document = response.dig(:document) # JSON.parse(response.body, symbolize_names: true)
|
139
|
+
|
140
|
+
# Document.new(raw_document[:document])
|
141
|
+
Document.new(raw_document) if raw_document
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
115
145
|
def get_documents
|
116
146
|
path = 'documents'
|
117
147
|
response = RS4.configuration.request_handler.execute(path, :get)
|
@@ -69,6 +69,24 @@ module RS4
|
|
69
69
|
RS4.configuration.request_handler.execute(path, :get)
|
70
70
|
end
|
71
71
|
|
72
|
+
def prepare_document(template_guid, options = {})
|
73
|
+
path = "reusable_templates/#{template_guid}/prepare_document"
|
74
|
+
|
75
|
+
body = options
|
76
|
+
|
77
|
+
response = RS4.configuration.request_handler.execute(path, :post, body)
|
78
|
+
|
79
|
+
Rails.logger.info("RS4::ReusableTemplate::embed_document:: #{response.inspect}")
|
80
|
+
|
81
|
+
unless response.is_a?(RS4::Error) || response.nil?
|
82
|
+
# parsed_response = JSON.parse(response.read_body, symbolize_names: true)
|
83
|
+
|
84
|
+
document_hash = response.dig(:document)
|
85
|
+
|
86
|
+
return RS4::Document.new(document_hash)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
72
90
|
def embed_document(template_guid, options = {})
|
73
91
|
path = "reusable_templates/#{template_guid}/embed_document"
|
74
92
|
|
data/lib/rs4/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rs4
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- donny
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Provides ruby access to CRUD operations for RightSignature documents
|
14
14
|
and reusable templates
|