hellosign-ruby-sdk 3.4.0 → 3.5.0

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
  SHA1:
3
- metadata.gz: a385289e3cf44bf369dd47ddfebc38cac0c92f85
4
- data.tar.gz: cb4e117e1514387c2ae5d9b90c70303a2d56441f
3
+ metadata.gz: 5fcfeb85587e9fe001bb4f3a125d87759bc3cf5c
4
+ data.tar.gz: be28d1f240e2ebf7928f7261b33d128ab93be7f0
5
5
  SHA512:
6
- metadata.gz: c9b21616f1202c91af28b220f4155ccb1b53edab87a1eb2f8aebf530b78d7230d76d0c9e85f5deb2091507fb47e11e28891feb963e1e04f0a98f7e610e3f20ca
7
- data.tar.gz: 92d814dc38788bf034ebc28b84afe10bde5aed0ffd926a803deba54da8552461f2b3e8155b679d1342197c384746207d567c7c2f006ad9d3ae25a0d3ed886230
6
+ metadata.gz: 072fc75ebabbc2556f373a406d4c7b6a673d6e2314e4ca9e5883f5d63abc9226dbd340cb9bfddbb44c962dd7ea2fd456e18eabd97669cf0c9ba26f245b616765
7
+ data.tar.gz: ccca94202840f9df34c39a2a022e3e78558e04075c33023b3533d688e008f3fea2fc75c1e42ac1e4beca1f9b3fb36ba9294f458ada397fb1c995e64cb7524c48
@@ -161,6 +161,12 @@ module HelloSign
161
161
  def get_template_files(opts)
162
162
  get("/template/files/#{opts[:template_id]}")
163
163
  end
164
+
165
+ def update_template_files(opts)
166
+ template_id = opts.delete(:template_id)
167
+ path = "/template/update_files/#{template_id}"
168
+ HelloSign::Resource::Template.new post(path, :body => opts)
169
+ end
164
170
  end
165
171
  end
166
172
  end
@@ -1,8 +1,8 @@
1
1
  #
2
2
  # The MIT License (MIT)
3
- #
3
+ #
4
4
  # Copyright (C) 2014 hellosign.com
5
- #
5
+ #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  # of this software and associated documentation files (the "Software"), to deal
8
8
  # in the Software without restriction, including without limitation the rights
@@ -207,6 +207,12 @@ module HelloSign
207
207
  prepare_templates opts
208
208
  HelloSign::Resource::UnclaimedDraft.new post('/unclaimed_draft/create_embedded_with_template', :body => opts)
209
209
  end
210
+
211
+ def edit_and_resend_unclaimed_draft(opts)
212
+ signature_request_id = opts.delete(:signature_request_id)
213
+ path = "/unclaimed_draft/edit_and_resend/#{signature_request_id}"
214
+ HelloSign::Resource::UnclaimedDraft.new post(path, :body => opts)
215
+ end
210
216
  end
211
217
  end
212
218
  end
@@ -23,5 +23,5 @@
23
23
  #
24
24
 
25
25
  module HelloSign
26
- VERSION = '3.4.0'
26
+ VERSION = '3.5.0'
27
27
  end
@@ -83,4 +83,19 @@ describe HelloSign::Api::Template do
83
83
  expect(a_get('/template/files/1')).to have_been_made
84
84
  end
85
85
  end
86
+
87
+ describe '#update_template_files' do
88
+ before do
89
+ stub_post('/template/update_files/1', 'template')
90
+ @template = HelloSign.update_template_files :template_id => 1, :file_url => 'http://hellosign.com/test.pdf'
91
+ end
92
+
93
+ it 'should return a Template' do
94
+ expect(@template).to be_an HelloSign::Resource::Template
95
+ end
96
+
97
+ it 'should get the correct resource' do
98
+ expect(a_post('/template/update_files/1')).to have_been_made
99
+ end
100
+ end
86
101
  end
@@ -31,5 +31,23 @@ describe HelloSign::Api::UnclaimedDraft do
31
31
  expect(@unclaimed_draft).to be_an HelloSign::Resource::UnclaimedDraft
32
32
  end
33
33
  end
34
+
35
+ context 'edit_and_resend' do
36
+ before do
37
+ stub_post('/unclaimed_draft/edit_and_resend/1', 'unclaimed_draft')
38
+ @unclaimed_draft = HelloSign.edit_and_resend_unclaimed_draft(
39
+ :signature_request_id => '1',
40
+ :client_id => '5e365c014bea2e9a05a9d0834f3e7ca4'
41
+ )
42
+ end
43
+
44
+ it 'should get the correct resource' do
45
+ expect(a_post('/unclaimed_draft/edit_and_resend/1')).to have_been_made
46
+ end
47
+
48
+ it 'should return an UnclaimedDraft response' do
49
+ expect(@unclaimed_draft).to be_a HelloSign::Resource::UnclaimedDraft
50
+ end
51
+ end
34
52
  end
35
53
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hellosign-ruby-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - HelloSign
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-21 00:00:00.000000000 Z
11
+ date: 2017-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler