zoomus 0.6.0 → 0.7.0
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/README.md +1 -0
- data/lib/zoomus/actions/user.rb +6 -0
- data/spec/fixtures/user_permanent_delete.json +4 -0
- data/spec/lib/zoomus/actions/user/permanent_delete_spec.rb +48 -0
- data/zoomus.gemspec +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4f58efec858a0debc30dc7f20c073a6b8c484ab
|
4
|
+
data.tar.gz: c6e82906d36a543ad60c9f95221c2079693b50ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d31b5b9ceccaf8cacf4de877309d3427ce1109f117bbf4a85173695926fa0fb63a4b62dffcd815890546723338104d0bdfb17643a8c7764222ca7a14aa74f643
|
7
|
+
data.tar.gz: 15ccfc5d35b2c5e311c53c2b436587d87346a58d4e41a8e5a241c748b73ef8729d1afa491a4bcb6fff7ccadb280a7604413f0fa02dee0db7f2aa8fdd1fecede0
|
data/README.md
CHANGED
data/lib/zoomus/actions/user.rb
CHANGED
@@ -24,6 +24,12 @@ module Zoomus
|
|
24
24
|
Utils.parse_response self.class.post('/user/delete', :query => options)
|
25
25
|
end
|
26
26
|
|
27
|
+
def user_permanent_delete(*args)
|
28
|
+
options = Utils.extract_options!(args)
|
29
|
+
Utils.require_params([:id], options)
|
30
|
+
Utils.parse_response self.class.post('/user/permanentdelete', :query => options)
|
31
|
+
end
|
32
|
+
|
27
33
|
def user_custcreate(*args)
|
28
34
|
options = Utils.extract_options!(args)
|
29
35
|
Utils.require_params([:type, :email], options)
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Zoomus::Actions::User do
|
4
|
+
|
5
|
+
before :all do
|
6
|
+
@zc = zoomus_client
|
7
|
+
@args = {:id => '65q23kd9sqliy612h23k'}
|
8
|
+
end
|
9
|
+
|
10
|
+
describe '#user_permanent_delete action' do
|
11
|
+
before :each do
|
12
|
+
stub_request(
|
13
|
+
:post,
|
14
|
+
zoomus_url('/user/permanentdelete')
|
15
|
+
).to_return(:body => json_response('user_permanent_delete'))
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'requires id param' do
|
19
|
+
expect{@zc.user_permanent_delete(filter_key(@args, :id))}.to raise_error(ArgumentError)
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'returns a hash' do
|
23
|
+
expect(@zc.user_permanent_delete(@args)).to be_kind_of(Hash)
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'returns the id and the deleted_at' do
|
27
|
+
res = @zc.user_permanent_delete(@args)
|
28
|
+
|
29
|
+
expect(res['id']).to eq(@args[:id])
|
30
|
+
expect(res['deleted_at'].length).to be
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe '#user_permanent_delete! action' do
|
35
|
+
before :each do
|
36
|
+
stub_request(
|
37
|
+
:post,
|
38
|
+
zoomus_url('/user/permanentdelete')
|
39
|
+
).to_return(:body => json_response('error'))
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'raises Zoomus::Error exception' do
|
43
|
+
expect {
|
44
|
+
@zc.user_permanent_delete!(@args)
|
45
|
+
}.to raise_error(Zoomus::Error)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
data/zoomus.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zoomus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maxim Colls
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -129,6 +129,7 @@ files:
|
|
129
129
|
- spec/fixtures/user_getbyemail.json
|
130
130
|
- spec/fixtures/user_list.json
|
131
131
|
- spec/fixtures/user_pending.json
|
132
|
+
- spec/fixtures/user_permanent_delete.json
|
132
133
|
- spec/fixtures/user_update.json
|
133
134
|
- spec/fixtures/webinar_create.json
|
134
135
|
- spec/fixtures/webinar_delete.json
|
@@ -160,6 +161,7 @@ files:
|
|
160
161
|
- spec/lib/zoomus/actions/user/getbyemail_spec.rb
|
161
162
|
- spec/lib/zoomus/actions/user/list_spec.rb
|
162
163
|
- spec/lib/zoomus/actions/user/pending_spec.rb
|
164
|
+
- spec/lib/zoomus/actions/user/permanent_delete_spec.rb
|
163
165
|
- spec/lib/zoomus/actions/user/update_spec.rb
|
164
166
|
- spec/lib/zoomus/actions/webinar/create_spec.rb
|
165
167
|
- spec/lib/zoomus/actions/webinar/delete_spec.rb
|
@@ -219,6 +221,7 @@ test_files:
|
|
219
221
|
- spec/fixtures/user_getbyemail.json
|
220
222
|
- spec/fixtures/user_list.json
|
221
223
|
- spec/fixtures/user_pending.json
|
224
|
+
- spec/fixtures/user_permanent_delete.json
|
222
225
|
- spec/fixtures/user_update.json
|
223
226
|
- spec/fixtures/webinar_create.json
|
224
227
|
- spec/fixtures/webinar_delete.json
|
@@ -250,6 +253,7 @@ test_files:
|
|
250
253
|
- spec/lib/zoomus/actions/user/getbyemail_spec.rb
|
251
254
|
- spec/lib/zoomus/actions/user/list_spec.rb
|
252
255
|
- spec/lib/zoomus/actions/user/pending_spec.rb
|
256
|
+
- spec/lib/zoomus/actions/user/permanent_delete_spec.rb
|
253
257
|
- spec/lib/zoomus/actions/user/update_spec.rb
|
254
258
|
- spec/lib/zoomus/actions/webinar/create_spec.rb
|
255
259
|
- spec/lib/zoomus/actions/webinar/delete_spec.rb
|