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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58c1470115558a69ec369b78be72bb1c7913e13ccbf29c64931d2020edfe8d5f
4
- data.tar.gz: 79d8ab66e22e0eacce069057d0802c3157937b8fb311aa5ecb064dfae5932f9d
3
+ metadata.gz: 67df5afff0e76629545e1cc0d5fd9721395812a6b5c72c7adb6d3f9bc03e149b
4
+ data.tar.gz: '08dcb4aa33cfc70fbdd359cbe1fcd42e16ba0adf78a944b2ce36d37eb476d839'
5
5
  SHA512:
6
- metadata.gz: 973322b9feae4038cea97011992d227074f9f7a0286a649447c02fd5c98459c59df903cd17081fe3d994bb63cd447d9e4ee7b5b7dfc623c908cc3bb138b656fa
7
- data.tar.gz: 6dd001b29aab096e7f54c5c29196601768fd9aceb96c235e2f40d7b91b51c5dc6a3581f3cb06e8cc0d6d55c930cddb4b2c1098a43ea025fcdfb2cd1dfc8a1dfe
6
+ metadata.gz: '062720059d3fcd5e026e0b4e130121eacec1de5b1fe07d3432218902bf4303cadf67ef4c2037cef6a3454c0ee60691dac129b7e6e9a48bb5a92595095c51d72e'
7
+ data.tar.gz: 13a9dbcf8616d98dc76af53048b71ae60b136976084a194d16b4fcd03f759705945d3c1cca2ae429fb0b1811a255b3775b6c6ec962f032179f698e2b158dde70
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module RS4
2
- VERSION = '0.2.9'.freeze
2
+ VERSION = '0.2.10'.freeze
3
3
  end
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.9
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-09 00:00:00.000000000 Z
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