hellosign-ruby-sdk 3.5.2 → 3.5.3

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
  SHA1:
3
- metadata.gz: 5ef3acc677386e987430829c647aede33445b93c
4
- data.tar.gz: e0715f779f8ce57e072bbedc5dde244042843f83
3
+ metadata.gz: a7f3cb1c1abd39eaa31cce9e3ac17aef2755e9e0
4
+ data.tar.gz: 0b02b55dbbd23121f14e007ff1a43176f686c242
5
5
  SHA512:
6
- metadata.gz: 95e9f6d0658b54f51af44156368d768bd463664a7f4d007e7915894cb4e351d4fa9aefcf5bf04f6dc6403c7a16c19bd6961214a6b46a1647434f499f9f033eb6
7
- data.tar.gz: c1db30e55959eb09752d6d096e09c9d08b1ac71f91e67ea88c61f06433887962dabea531c32cb2af7d8157353c3c803ecd7588c181597524eeaa39590b466654
6
+ metadata.gz: d80be82243cbdbae5e7584e655bd83aba2cab845532b6f2b03a1300895041222941d424cd8090b3d780210fcfb8498acb3390ca7901563d31b891ae8cc5946f3
7
+ data.tar.gz: 2d46c00fc225726638121887a4020eb1d17cf554828f0f3e16e37c6c263c59a9ebd01d850298401cc56f0bac4945219bd5917315bb2fd1b8106a9e96b3bd1695
@@ -159,7 +159,16 @@ module HelloSign
159
159
  end
160
160
 
161
161
  def get_template_files(opts)
162
- get("/template/files/#{opts[:template_id]}")
162
+ path = "/template/files/#{opts[:template_id]}"
163
+ if opts[:file_type]
164
+ path = path + "?file_type=#{opts[:file_type]}"
165
+ end
166
+ if opts[:get_url]
167
+ separator = opts[:file_type].nil? ? '?' : '&'
168
+ path = path + "#{separator}get_url=#{opts[:get_url]}"
169
+ end
170
+
171
+ get(path)
163
172
  end
164
173
 
165
174
  def update_template_files(opts)
@@ -23,5 +23,5 @@
23
23
  #
24
24
 
25
25
  module HelloSign
26
- VERSION = '3.5.2'
26
+ VERSION = '3.5.3'
27
27
  end
@@ -84,6 +84,41 @@ describe HelloSign::Api::Template do
84
84
  end
85
85
  end
86
86
 
87
+ describe '#get_template_files with options' do
88
+ describe ':get_url' do
89
+ before do
90
+ stub_get('/template/files/1?get_url=true', 'file')
91
+ @files = HelloSign.get_template_files :template_id => 1, :get_url => true
92
+ end
93
+
94
+ it 'should get the correct resource' do
95
+ expect(a_get('/template/files/1?get_url=true')).to have_been_made
96
+ end
97
+ end
98
+
99
+ describe ':file_type' do
100
+ before do
101
+ stub_get('/template/files/1?file_type=pdf', 'file')
102
+ @files = HelloSign.get_template_files :template_id => 1, :file_type => 'pdf'
103
+ end
104
+
105
+ it 'should get the correct resource' do
106
+ expect(a_get('/template/files/1?file_type=pdf')).to have_been_made
107
+ end
108
+ end
109
+
110
+ describe ':file_type and :get_url' do
111
+ before do
112
+ stub_get('/template/files/1?file_type=pdf&get_url=true', 'file')
113
+ @files = HelloSign.get_template_files :template_id => 1, :file_type => 'pdf', :get_url => true
114
+ end
115
+
116
+ it 'should get the correct resource' do
117
+ expect(a_get('/template/files/1?file_type=pdf&get_url=true')).to have_been_made
118
+ end
119
+ end
120
+ end
121
+
87
122
  describe '#update_template_files' do
88
123
  before do
89
124
  stub_post('/template/update_files/1', 'template')
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.5.2
4
+ version: 3.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - HelloSign
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-27 00:00:00.000000000 Z
11
+ date: 2017-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler