rs4 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rs4/reusable_template.rb +18 -0
- data/lib/rs4/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58c1470115558a69ec369b78be72bb1c7913e13ccbf29c64931d2020edfe8d5f
|
4
|
+
data.tar.gz: 79d8ab66e22e0eacce069057d0802c3157937b8fb311aa5ecb064dfae5932f9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 973322b9feae4038cea97011992d227074f9f7a0286a649447c02fd5c98459c59df903cd17081fe3d994bb63cd447d9e4ee7b5b7dfc623c908cc3bb138b656fa
|
7
|
+
data.tar.gz: 6dd001b29aab096e7f54c5c29196601768fd9aceb96c235e2f40d7b91b51c5dc6a3581f3cb06e8cc0d6d55c930cddb4b2c1098a43ea025fcdfb2cd1dfc8a1dfe
|
@@ -69,6 +69,24 @@ module RS4
|
|
69
69
|
RS4.configuration.request_handler.execute(path, :get)
|
70
70
|
end
|
71
71
|
|
72
|
+
def embed_document(template_guid, options = {})
|
73
|
+
path = "reusable_templates/#{template_guid}/embed_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 send_document(template_guid, options = {})
|
73
91
|
path = "reusable_templates/#{template_guid}/send_document"
|
74
92
|
|
data/lib/rs4/version.rb
CHANGED