rs4 0.2.8 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22cb71a5eaa8f0c8719e5865fd5ac49b47777e482bd992c51fbd54032be650eb
4
- data.tar.gz: 44d751a6a1eb28e598113b6056964a0204bfd7dc7822378210372e3c89450805
3
+ metadata.gz: 58c1470115558a69ec369b78be72bb1c7913e13ccbf29c64931d2020edfe8d5f
4
+ data.tar.gz: 79d8ab66e22e0eacce069057d0802c3157937b8fb311aa5ecb064dfae5932f9d
5
5
  SHA512:
6
- metadata.gz: 58ba86bdae0ee04e01a4f5633237442e208f32b000719e6717bd4d6aa4055d40da0885f6a49ab836f98209cbbcc6a8da849eddcf7445118a7037b0334fc07291
7
- data.tar.gz: 6d8a3142513f6a52d80483186fdcd0cfbcce7f85a09d8290846baacc1ca8d6f0e95249d02da88e66927b49334650ff5953000f9de0ac261b8293c343b6000510
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
 
@@ -1,3 +1,3 @@
1
1
  module RS4
2
- VERSION = '0.2.8'.freeze
2
+ VERSION = '0.2.9'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rs4
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - donny