yandex360 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +12 -0
  3. data/.github/workflows/ci.yml +51 -0
  4. data/.gitignore +2 -0
  5. data/.rspec +5 -0
  6. data/Gemfile +0 -9
  7. data/Gemfile.lock +40 -1
  8. data/README.md +68 -3
  9. data/lib/yandex360/resources/departments.rb +12 -10
  10. data/lib/yandex360/resources/groups.rb +12 -10
  11. data/lib/yandex360/resources/users.rb +2 -2
  12. data/lib/yandex360/version.rb +2 -2
  13. data/lib/yandex360.rb +2 -1
  14. data/spec/antispam_spec.rb +46 -0
  15. data/spec/client_spec.rb +24 -0
  16. data/spec/departments_spec.rb +131 -0
  17. data/spec/groups_spec.rb +133 -0
  18. data/spec/spec_helper.rb +59 -0
  19. data/spec/users_spec.rb +203 -0
  20. data/spec/vcr/anispam/create.yml +43 -0
  21. data/spec/vcr/anispam/delete.yml +41 -0
  22. data/spec/vcr/anispam/list.yml +41 -0
  23. data/spec/vcr/departments/add_alias.yml +43 -0
  24. data/spec/vcr/departments/create.yml +43 -0
  25. data/spec/vcr/departments/delete.yml +41 -0
  26. data/spec/vcr/departments/delete_alias.yml +41 -0
  27. data/spec/vcr/departments/delete_error.yml +37 -0
  28. data/spec/vcr/departments/info.yml +41 -0
  29. data/spec/vcr/departments/list.yml +41 -0
  30. data/spec/vcr/departments/update.yml +44 -0
  31. data/spec/vcr/groups/add_user.yml +43 -0
  32. data/spec/vcr/groups/create.yml +43 -0
  33. data/spec/vcr/groups/delete.yml +41 -0
  34. data/spec/vcr/groups/delete_user.yml +41 -0
  35. data/spec/vcr/groups/list.yml +48 -0
  36. data/spec/vcr/groups/params.yml +41 -0
  37. data/spec/vcr/groups/update.yml +43 -0
  38. data/spec/vcr/groups/users.yml +41 -0
  39. data/spec/vcr/users/add.yml +43 -0
  40. data/spec/vcr/users/add_alias.yml +43 -0
  41. data/spec/vcr/users/delete_alias.yml +41 -0
  42. data/spec/vcr/users/get2FA.yml +41 -0
  43. data/spec/vcr/users/get2FA_error.yml +37 -0
  44. data/spec/vcr/users/has2FA.yml +41 -0
  45. data/spec/vcr/users/info.yml +41 -0
  46. data/spec/vcr/users/list.yml +41 -0
  47. data/spec/vcr/users/list_error.yml +37 -0
  48. data/spec/vcr/users/update.yml +44 -0
  49. data/yandex360.gemspec +8 -0
  50. metadata +144 -2
@@ -0,0 +1,133 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "spec_helper"
4
+ require "yandex360"
5
+
6
+ RSpec.describe "#groups.create" do
7
+ let(:org_id) { "1234567" }
8
+ let(:name) { "Hotline" }
9
+
10
+ context "with params" do
11
+ subject(:resp) do
12
+ VCR.use_cassette("groups/create") do
13
+ @yandex360.groups.create org_id: org_id, name: name
14
+ end
15
+ end
16
+
17
+ it { expect(resp).to be_an Yandex360::Group }
18
+ end
19
+ end
20
+
21
+ RSpec.describe "#groups.update" do
22
+ let(:name) { "Hotline 247" }
23
+ let(:org_id) { "1234567" }
24
+ let(:group_id) { "19" }
25
+
26
+ context "with params" do
27
+ subject(:resp) do
28
+ VCR.use_cassette("groups/update") do
29
+ @yandex360.groups.update org_id: org_id, group_id: group_id, name: name
30
+ end
31
+ end
32
+
33
+ it { expect(resp).to be_an Yandex360::Group }
34
+ end
35
+ end
36
+
37
+ RSpec.describe "#groups.params" do
38
+ let(:org_id) { "1234567" }
39
+ let(:group_id) { "19" }
40
+
41
+ context "with params" do
42
+ subject(:resp) do
43
+ VCR.use_cassette("groups/params") do
44
+ @yandex360.groups.params org_id: org_id, group_id: group_id
45
+ end
46
+ end
47
+
48
+ it { expect(resp).to be_an Yandex360::Group }
49
+ end
50
+ end
51
+
52
+ RSpec.describe "#groups.list" do
53
+ let(:org_id) { "1234567" }
54
+
55
+ context "with params" do
56
+ subject(:resp) do
57
+ VCR.use_cassette("groups/list") do
58
+ @yandex360.groups.list org_id: org_id
59
+ end
60
+ end
61
+
62
+ it { expect(resp).to be_an Yandex360::Collection }
63
+ it { expect(resp.data.first).to be_an Yandex360::Group }
64
+ end
65
+ end
66
+
67
+ RSpec.describe "#groups.add_user" do
68
+ let(:org_id) { "1234567" }
69
+ let(:user_id) { "987654321" }
70
+
71
+ context "with params" do
72
+ subject(:resp) do
73
+ VCR.use_cassette("groups/add_user") do
74
+ @yandex360.groups.add_user org_id: org_id, group_id: "19", user_id: user_id, type: "user"
75
+ end
76
+ end
77
+
78
+ it { expect(resp).to be_an Yandex360::Group }
79
+ it { expect(resp.added).to be true }
80
+ it { expect(resp.id).to eq user_id }
81
+ it { expect(resp.type).to eq "user" }
82
+ end
83
+ end
84
+
85
+ RSpec.describe "#groups.users" do
86
+ let(:org_id) { "1234567" }
87
+ let(:group_id) { "19" }
88
+
89
+ context "with params" do
90
+ subject(:resp) do
91
+ VCR.use_cassette("groups/users") do
92
+ @yandex360.groups.users org_id: org_id, group_id: group_id
93
+ end
94
+ end
95
+
96
+ it { expect(resp).to be_an Yandex360::Collection }
97
+ it { expect(resp.data.first).to be_an Yandex360::User }
98
+ end
99
+ end
100
+
101
+ RSpec.describe "#groups.delete_user" do
102
+ let(:org_id) { "1234567" }
103
+ let(:user_id) { "987654321" }
104
+
105
+ context "with params" do
106
+ subject(:resp) do
107
+ VCR.use_cassette("groups/delete_user") do
108
+ @yandex360.groups.delete_user org_id: org_id, group_id: "19", type: "user", user_id: user_id
109
+ end
110
+ end
111
+
112
+ it { expect(resp.deleted).to be true }
113
+ it { expect(resp.type).to eq "user" }
114
+ it { expect(resp.id).to eq user_id }
115
+ end
116
+ end
117
+
118
+ RSpec.describe "#groups.delete" do
119
+ let(:org_id) { "1234567" }
120
+ let(:group_id) { 19 }
121
+
122
+ context "with params" do
123
+ subject(:resp) do
124
+ VCR.use_cassette("groups/delete") do
125
+ @yandex360.groups.delete org_id: org_id, group_id: group_id
126
+ end
127
+ end
128
+
129
+ it { expect(resp).to be_an Yandex360::Group }
130
+ it { expect(resp.removed).to eq true }
131
+ it { expect(resp.id).to eq group_id }
132
+ end
133
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/setup"
4
+ require "simplecov"
5
+ require "simplecov-lcov"
6
+ require "yandex360"
7
+ require "webmock/rspec"
8
+ require "vcr"
9
+
10
+ SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
11
+ SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
12
+
13
+ SimpleCov.start do
14
+ add_filter "spec/"
15
+ add_group "Lib", "lib"
16
+ minimum_coverage 80.0
17
+ end
18
+
19
+ ACCESS_TOKEN = ENV["YANDEX360_ACCESS_TOKEN"] || "SECRET_TOKEN"
20
+
21
+ RSpec.configure do |config|
22
+ config.before(:each) do
23
+ @yandex360 = Yandex360::Client.new(token: ACCESS_TOKEN)
24
+ end
25
+
26
+ config.example_status_persistence_file_path = ".rspec_status"
27
+ config.disable_monkey_patching!
28
+
29
+ config.expect_with :rspec do |c|
30
+ c.syntax = :expect
31
+ c.include_chain_clauses_in_custom_matcher_descriptions = true
32
+ end
33
+
34
+ config.mock_with :rspec do |mocks|
35
+ mocks.verify_partial_doubles = true
36
+ end
37
+ config.shared_context_metadata_behavior = :apply_to_host_groups
38
+ end
39
+
40
+ VCR.configure do |c|
41
+ c.before_record do |i|
42
+ i.response.body.force_encoding("UTF-8")
43
+ end
44
+
45
+ c.ignore_localhost = true
46
+ c.cassette_library_dir = "spec/vcr"
47
+ c.hook_into :webmock
48
+
49
+ c.default_cassette_options = {
50
+ decode_compressed_response: true,
51
+ allow_unused_http_interactions: false
52
+ }
53
+
54
+ c.filter_sensitive_data("TOKEN") do |i|
55
+ i.request["headers"]["Authorization"].first
56
+ end
57
+
58
+ c.configure_rspec_metadata!
59
+ end
@@ -0,0 +1,203 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "spec_helper"
4
+ require "yandex360"
5
+
6
+ RSpec.describe "#users.list" do
7
+ let(:org_id) { "1234567" }
8
+
9
+ context "with params" do
10
+ subject(:resp) do
11
+ VCR.use_cassette("users/list") do
12
+ @yandex360.users.list(org_id: org_id)
13
+ end
14
+ end
15
+
16
+ it { expect(resp).to be_an(Yandex360::Collection) }
17
+ it { expect(resp.data.first).to be_an(Yandex360::User) }
18
+ end
19
+
20
+ context "with error" do
21
+ let(:org_id) { "3287461283" }
22
+ subject(:resp) do
23
+ VCR.use_cassette("users/list_error") do
24
+ @yandex360.users.list(org_id: org_id)
25
+ end
26
+ end
27
+
28
+ it { expect { resp }.to raise_error(Yandex360::Error, /not allowed/) }
29
+ end
30
+ end
31
+
32
+ RSpec.describe "#users.add" do
33
+ let(:org_id) { "1234567" }
34
+
35
+ context "with params" do
36
+ subject(:resp) do
37
+ VCR.use_cassette("users/add") do
38
+ @yandex360.users.add(
39
+ org_id: org_id,
40
+ dep_id: 1,
41
+ about: "Yandex360",
42
+ name: {
43
+ first: "Ivan",
44
+ last: "Ivanov",
45
+ middle: "Ruby"
46
+ },
47
+ nickname: "yandex360",
48
+ password: "W!846f456678"
49
+ )
50
+ end
51
+ end
52
+ it { expect(resp).to be_an(Yandex360::User) }
53
+ it { expect(resp.name.first).to eq "Ivan" }
54
+ it { expect(resp.about).to eq "Yandex360" }
55
+ end
56
+ end
57
+
58
+ RSpec.describe "#users.update" do
59
+ let(:user_id) { "1130000061922106" }
60
+ let(:org_id) { "1234567" }
61
+
62
+ context "with params" do
63
+ subject(:resp) do
64
+ VCR.use_cassette("users/update") do
65
+ @yandex360.users.update(
66
+ org_id: org_id,
67
+ user_id: user_id,
68
+ about: "Yandex360 - Ruby API gem",
69
+ name: {
70
+ first: "Ruby",
71
+ last: "gem",
72
+ middle: "API"
73
+ },
74
+ nickname: "yandex360-ruby-api-client",
75
+ password: "passswrrdwithstrrngscrrty"
76
+ )
77
+ end
78
+ end
79
+ it { expect(resp).to be_an(Yandex360::User) }
80
+ it { expect(resp.id).to eq user_id }
81
+ it { expect(resp.name.first).to eq "Ruby" }
82
+ it { expect(resp.about).to eq "Yandex360 - Ruby API gem" }
83
+ end
84
+ end
85
+
86
+ RSpec.describe "#users.add_alias" do
87
+ let(:org_id) { "1234567" }
88
+ let(:user_id) { "1130000018743049" }
89
+ let(:user_alias) { "ruby_gem_api" }
90
+
91
+ context "with params" do
92
+ subject(:resp) do
93
+ VCR.use_cassette("users/add_alias") do
94
+ @yandex360.users.add_alias org_id: org_id, user_id: user_id, user_alias: user_alias
95
+ end
96
+ end
97
+
98
+ it { expect(resp).to be_an(Yandex360::User) }
99
+ it { expect(resp.aliases.first).to eq user_alias }
100
+ end
101
+ end
102
+
103
+ RSpec.describe "#users.delete_alias" do
104
+ let(:org_id) { "1234567" }
105
+ let(:user_id) { "1130000018743049" }
106
+ let(:user_alias) { "ruby_gem_api" }
107
+
108
+ context "with params" do
109
+ subject(:resp) do
110
+ VCR.use_cassette("users/delete_alias") do
111
+ @yandex360.users.delete_alias org_id: org_id, user_id: user_id, user_alias: user_alias
112
+ end
113
+ end
114
+
115
+ it { expect(resp).to be_an(Yandex360::Alias) }
116
+ it { expect(resp.alias).to eq user_alias }
117
+ it { expect(resp.removed).to be(true) }
118
+ end
119
+ end
120
+
121
+ RSpec.describe "#users.has2FA" do
122
+ let(:org_id) { "1234567" }
123
+ let(:user_id) { "1130000018743049" }
124
+
125
+ context "with params" do
126
+ subject(:resp) do
127
+ VCR.use_cassette("users/has2FA") do
128
+ @yandex360.users.has2FA? org_id: org_id, user_id: user_id
129
+ end
130
+ end
131
+
132
+ it { expect(resp).to be(true).or be(false) }
133
+ end
134
+ end
135
+
136
+ RSpec.describe "#users.get2FA" do
137
+ let(:org_id) { "1234567" }
138
+ let(:user_id) { "1130000018743049" }
139
+
140
+ context "with params" do
141
+ subject(:resp) do
142
+ VCR.use_cassette("users/get2FA") do
143
+ @yandex360.users.get2FA(org_id: org_id, user_id: user_id)
144
+ end
145
+ end
146
+
147
+ it { expect(resp).to be_an(Yandex360::Object) }
148
+ it { expect(resp.userId).to eq(user_id) }
149
+ it { expect(resp.has2fa).to be(true).or be(false) }
150
+ end
151
+
152
+ context "with error" do
153
+ subject(:resp) do
154
+ VCR.use_cassette("users/get2FA_error") do
155
+ @yandex360.users.get2FA(org_id: 123, user_id: 123)
156
+ end
157
+ end
158
+
159
+ it { expect { resp }.to raise_error(Yandex360::Error, /not allowed/) }
160
+ end
161
+ end
162
+
163
+ RSpec.describe "#users.has2FA" do
164
+ let(:org_id) { "1234567" }
165
+ let(:user_id) { "1130000018743049" }
166
+
167
+ context "with params" do
168
+ subject(:resp) do
169
+ VCR.use_cassette("users/has2FA") do
170
+ @yandex360.users.has2FA? org_id: org_id, user_id: user_id
171
+ end
172
+ end
173
+
174
+ it { expect(resp).to be(true).or be(false) }
175
+ end
176
+ end
177
+
178
+ RSpec.describe "#users.info" do
179
+ let(:org_id) { "1234567" }
180
+ let(:user_id) { "987654321" }
181
+
182
+ context "with params" do
183
+ subject(:resp) do
184
+ VCR.use_cassette("users/info") do
185
+ @yandex360.users.info(org_id: org_id, user_id: user_id)
186
+ end
187
+ end
188
+
189
+ it { expect(resp).to be_an(Yandex360::User) }
190
+ it { expect(resp.name).to be_an(OpenStruct) }
191
+ it { expect(resp.contacts).to be_an(Array) }
192
+ end
193
+
194
+ context "without params" do
195
+ subject(:resp) do
196
+ VCR.use_cassette("users_info") do
197
+ @yandex360.users.info
198
+ end
199
+ end
200
+
201
+ it { expect { resp }.to raise_error(ArgumentError) }
202
+ end
203
+ end
@@ -0,0 +1,43 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api360.yandex.net/admin/v1/org/1234567/mail/antispam/allowlist/ips
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"allowList":["127.0.0.1","172.0.1.10"]}'
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.10.2
12
+ Authorization:
13
+ - TOKEN
14
+ Content-Type:
15
+ - application/json
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - "*/*"
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Content-Type:
26
+ - application/json
27
+ Date:
28
+ - Sat, 15 Oct 2022 11:29:15 GMT
29
+ Grpc-Status:
30
+ - '0'
31
+ Grpc-Message:
32
+ - OK
33
+ Content-Length:
34
+ - '2'
35
+ Server:
36
+ - api360
37
+ X-Request-Id:
38
+ - '09887e4f-02dc-4fc0-aac9-4cfdb5ccf8e6'
39
+ body:
40
+ encoding: UTF-8
41
+ string: "{}"
42
+ recorded_at: Sat, 15 Oct 2022 11:29:15 GMT
43
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,41 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api360.yandex.net/admin/v1/org/1234567/mail/antispam/allowlist/ips
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.10.2
12
+ Authorization:
13
+ - TOKEN
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Content-Type:
24
+ - application/json
25
+ Date:
26
+ - Sat, 15 Oct 2022 11:30:51 GMT
27
+ Grpc-Status:
28
+ - '0'
29
+ Grpc-Message:
30
+ - OK
31
+ Content-Length:
32
+ - '2'
33
+ Server:
34
+ - api360
35
+ X-Request-Id:
36
+ - 56193e69-ff82-42e7-8770-d24c1fddd07f
37
+ body:
38
+ encoding: UTF-8
39
+ string: "{}"
40
+ recorded_at: Sat, 15 Oct 2022 11:30:51 GMT
41
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,41 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api360.yandex.net/admin/v1/org/1234567/mail/antispam/allowlist/ips
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.10.2
12
+ Authorization:
13
+ - TOKEN
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Content-Type:
24
+ - application/json
25
+ Date:
26
+ - Sat, 15 Oct 2022 11:29:15 GMT
27
+ Grpc-Status:
28
+ - '0'
29
+ Grpc-Message:
30
+ - OK
31
+ Content-Length:
32
+ - '40'
33
+ Server:
34
+ - api360
35
+ X-Request-Id:
36
+ - d51ba76c-429d-4e9b-920c-0e34ba77f461
37
+ body:
38
+ encoding: UTF-8
39
+ string: '{"allowList":["127.0.0.1","172.0.1.10"]}'
40
+ recorded_at: Sat, 15 Oct 2022 11:29:15 GMT
41
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,43 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api360.yandex.net/directory/v1/org/1234567/departments/13/aliases
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"alias":"support-team"}'
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.10.2
12
+ Authorization:
13
+ - TOKEN
14
+ Content-Type:
15
+ - application/json
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - "*/*"
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Content-Type:
26
+ - application/json
27
+ Date:
28
+ - Fri, 14 Oct 2022 12:23:15 GMT
29
+ Grpc-Status:
30
+ - '0'
31
+ Grpc-Message:
32
+ - OK
33
+ Content-Length:
34
+ - '240'
35
+ Server:
36
+ - api360
37
+ X-Request-Id:
38
+ - 78978203-a92f-4b6c-9c30-f8a60f4bdad9
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"id":13,"name":"Support Team","parentId":1,"description":"Yandex360","externalId":"","label":"support-team","email":"support-team@example.ru","headId":"0","membersCount":0,"aliases":["support-team"],"createdAt":"2022-10-14T12:23:13.909Z"}'
42
+ recorded_at: Fri, 14 Oct 2022 12:23:16 GMT
43
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,43 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api360.yandex.net/directory/v1/org/1234567/departments
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"parentId":1,"name":"Support"}'
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.10.2
12
+ Authorization:
13
+ - TOKEN
14
+ Content-Type:
15
+ - application/json
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - "*/*"
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Content-Type:
26
+ - application/json
27
+ Date:
28
+ - Fri, 14 Oct 2022 12:23:14 GMT
29
+ Grpc-Status:
30
+ - '0'
31
+ Grpc-Message:
32
+ - OK
33
+ Content-Length:
34
+ - '176'
35
+ Server:
36
+ - api360
37
+ X-Request-Id:
38
+ - 84738e03-3b04-4459-ac42-20ae8e3814bb
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"id":13,"name":"Support","parentId":1,"description":"","externalId":"","label":"","email":"","headId":"0","membersCount":0,"aliases":[],"createdAt":"2022-10-14T12:23:13.909Z"}'
42
+ recorded_at: Fri, 14 Oct 2022 12:23:14 GMT
43
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,41 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api360.yandex.net/directory/v1/org/1234567/departments/13
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.10.2
12
+ Authorization:
13
+ - TOKEN
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Content-Type:
24
+ - application/json
25
+ Date:
26
+ - Fri, 14 Oct 2022 12:23:17 GMT
27
+ Grpc-Status:
28
+ - '0'
29
+ Grpc-Message:
30
+ - OK
31
+ Content-Length:
32
+ - '24'
33
+ Server:
34
+ - api360
35
+ X-Request-Id:
36
+ - c178cb13-7678-4eb2-8ba4-d79b6c310008
37
+ body:
38
+ encoding: UTF-8
39
+ string: '{"id":13,"removed":true}'
40
+ recorded_at: Fri, 14 Oct 2022 12:23:17 GMT
41
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,41 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api360.yandex.net/directory/v1/org/1234567/departments/13/aliases/support-team
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.10.2
12
+ Authorization:
13
+ - TOKEN
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Content-Type:
24
+ - application/json
25
+ Date:
26
+ - Fri, 14 Oct 2022 12:23:16 GMT
27
+ Grpc-Status:
28
+ - '0'
29
+ Grpc-Message:
30
+ - OK
31
+ Content-Length:
32
+ - '39'
33
+ Server:
34
+ - api360
35
+ X-Request-Id:
36
+ - 41abba20-602a-4a9e-94fe-ced93fd801cb
37
+ body:
38
+ encoding: UTF-8
39
+ string: '{"alias":"support-team","removed":true}'
40
+ recorded_at: Fri, 14 Oct 2022 12:23:16 GMT
41
+ recorded_with: VCR 6.1.0