svbclient 2.0.2 → 2.0.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 +4 -4
- data/lib/svbclient.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aef2cf061294df9f0a35dd9bb628fa162bd93a11
|
4
|
+
data.tar.gz: fc83eb55c86efcfa64f4f64268c3cf86eb36230a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0e54a705060199c3b8550b7bfb3ed01091d2e8a7483f76de4bfd29c1b694fde698301a76fca8bed57d52c5f332f4c4877b2a2c04ac6961dec216aeda2002167
|
7
|
+
data.tar.gz: 24bac0007bec8b679e6ce6e7d4c10308735db8cc39454b31be527a8c3c1ca7f995099fbfec3d15ab573c599f30cb0b889adc43e9fa13f82aee898787d2fa3d8c
|
data/lib/svbclient.rb
CHANGED
@@ -189,10 +189,12 @@ class SVBClient::Onboarding
|
|
189
189
|
end
|
190
190
|
end
|
191
191
|
|
192
|
-
def file(id: nil, file: nil,
|
192
|
+
def file(id: nil, file: nil, mimetype: nil)
|
193
193
|
if id.nil?
|
194
194
|
# upload this file
|
195
195
|
resource = @client.upload("/v1/files", file, mimetype)
|
196
|
+
body = JSON.parse(resource.body)
|
197
|
+
SVBClient::Onboarding::File.new(@client, id)
|
196
198
|
else
|
197
199
|
# verify that the resource exists
|
198
200
|
@client.get("/v1/files/#{id}")
|