hellosign-api 1.0.5 → 1.0.6

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: 5d58b51d0771dffb7e056cc4d754d8b2a09741f74d2d011d065f05269bba52c1
4
- data.tar.gz: ce1a575005e7ea6fd5e5ff4705f163b2735b38e64fadf790db3084eb19f37f6b
3
+ metadata.gz: 4666b6681f4d92b608c07eb22db61bdbd466fb797d83ddd2cd56319ba0607569
4
+ data.tar.gz: bad67e806000fc4c2c7f33af059c4f92795bec1c1e00382001c9f008bc965a15
5
5
  SHA512:
6
- metadata.gz: 8f4431930761f16cc12871ab00a0fb432e936f61e9628c08200fbfc063c95d93c870b5f5750882194ad26a8f12523503783a0948c20dbc322ec59e95d788d4b5
7
- data.tar.gz: c8f0d8a5981861b6f4e2c304db0a70d6bcb29d49219dcd9a3e5ca113bdf3492facaf2fbab0e4ba470298b1a3068943ab2ad8bcca5f62b2c2c97dc72a3744b18d
6
+ metadata.gz: c04af622689d244d0a3290af96f2c68e1fe25c033a3567157706a4e66ea46f3d342cf856fd7235eb58bf574f48c8decb18cce69e509ee1bb74c5eafe771a2297
7
+ data.tar.gz: 64726079c3b8832a85290dc87869cc41132969fb6668ae4a3738c7a64c0a3cdbf78d7eab660b66639beec164b77f594d1d09fe14cd850fb58d1cdbf9a76b78c2
@@ -176,6 +176,7 @@ module HelloSign
176
176
  prepare_files opts
177
177
  prepare_signer_roles opts
178
178
  prepare_attachments opts
179
+ prepare_merge_fields opts
179
180
  HelloSign::Resource::TemplateDraft.new post("/template/create_embedded_draft", body: opts)
180
181
  end
181
182
 
@@ -21,5 +21,5 @@
21
21
  # SOFTWARE.
22
22
 
23
23
  module HelloSign
24
- VERSION = '1.0.5'
24
+ VERSION = '1.0.6'
25
25
  end
@@ -0,0 +1,7 @@
1
+ {
2
+ "template": {
3
+ "template_id": "a364138e0d8ae6393aa425a8ec64715580f3748b",
4
+ "edit_url": "https://embedded.hellosign.com/prep-and-send/embedded-template?cached_params_token=xxxxxxxxx",
5
+ "expires_at": 1649096573
6
+ }
7
+ }
@@ -169,4 +169,36 @@ describe HelloSign::Api::Template do
169
169
  expect(@template.headers).to_not be_nil
170
170
  end
171
171
  end
172
+
173
+ describe '#create_embedded_template_draft' do
174
+ before do
175
+ stub_post('/template/create_embedded_draft', 'template_draft')
176
+ @template_draft = HelloSign.create_embedded_template_draft :title => 'Document Test', :file_url => 'http://hellosign.com/test.pdf'
177
+ end
178
+
179
+ it 'should return a Template Draft' do
180
+ expect(@template_draft).to be_an HelloSign::Resource::TemplateDraft
181
+ end
182
+
183
+ it 'should return response headers' do
184
+ expect(@template_draft.headers).to_not be_nil
185
+ end
186
+
187
+ context 'with multiple signer_roles' do
188
+ before do
189
+ stub_post('/template/create_embedded_draft', 'template_draft')
190
+ @template_draft = HelloSign.create_embedded_template_draft(
191
+ :title => 'Document Test',
192
+ :file_url => 'http://hellosign.com/test.pdf',
193
+ :signer_roles => [{ :name => 'Employee' }, { :name => 'CEO' }]
194
+ )
195
+ end
196
+
197
+ it 'should send signer_roles as json' do
198
+ expect(a_post('/template/create_embedded_draft').with(
199
+ :body => hash_including({ :signer_roles => [{ :name => 'Employee' }, { :name => 'CEO' }] }))
200
+ ).to have_been_made
201
+ end
202
+ end
203
+ end
172
204
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hellosign-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - HelloSign, Aubrey Holland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-11 00:00:00.000000000 Z
11
+ date: 2022-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -182,6 +182,7 @@ files:
182
182
  - spec/fixtures/signature_requests.json
183
183
  - spec/fixtures/team.json
184
184
  - spec/fixtures/template.json
185
+ - spec/fixtures/template_draft.json
185
186
  - spec/fixtures/templates.json
186
187
  - spec/fixtures/token.json
187
188
  - spec/fixtures/unclaimed_draft.json
@@ -240,6 +241,7 @@ test_files:
240
241
  - spec/fixtures/signature_requests.json
241
242
  - spec/fixtures/team.json
242
243
  - spec/fixtures/template.json
244
+ - spec/fixtures/template_draft.json
243
245
  - spec/fixtures/templates.json
244
246
  - spec/fixtures/token.json
245
247
  - spec/fixtures/unclaimed_draft.json