twilio-ruby 5.37.0 → 5.38.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +32 -9
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +41 -5
  5. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -16
  6. data/lib/twilio-ruby/rest/client.rb +0 -7
  7. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +28 -3
  8. data/lib/twilio-ruby/rest/monitor/v1/alert.rb +8 -8
  9. data/lib/twilio-ruby/rest/verify/v2/service.rb +26 -0
  10. data/lib/twilio-ruby/rest/{authy/v1/service/entity.rb → verify/v2/service/webhook.rb} +154 -108
  11. data/lib/twilio-ruby/version.rb +1 -1
  12. data/spec/integration/api/v2010/account/conference/participant_spec.rb +60 -0
  13. data/spec/integration/autopilot/v1/assistant_spec.rb +4 -8
  14. data/spec/integration/conversations/v1/conversation_spec.rb +16 -0
  15. data/spec/integration/verify/v2/service/webhook_spec.rb +262 -0
  16. data/spec/integration/verify/v2/service_spec.rb +8 -4
  17. metadata +5 -22
  18. data/lib/twilio-ruby/rest/authy.rb +0 -55
  19. data/lib/twilio-ruby/rest/authy/v1.rb +0 -59
  20. data/lib/twilio-ruby/rest/authy/v1/form.rb +0 -197
  21. data/lib/twilio-ruby/rest/authy/v1/service.rb +0 -404
  22. data/lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb +0 -500
  23. data/lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb +0 -494
  24. data/lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb +0 -222
  25. data/spec/integration/authy/v1/form_spec.rb +0 -48
  26. data/spec/integration/authy/v1/service/entity/factor/challenge_spec.rb +0 -353
  27. data/spec/integration/authy/v1/service/entity/factor_spec.rb +0 -298
  28. data/spec/integration/authy/v1/service/entity_spec.rb +0 -201
  29. data/spec/integration/authy/v1/service_spec.rb +0 -231
  30. data/spec/integration/autopilot/v1/assistant/export_assistant_spec.rb +0 -49
@@ -1,231 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # \ / _ _ _| _ _
4
- # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
- # / /
6
- #
7
- # frozen_string_literal: true
8
-
9
- require 'spec_helper.rb'
10
-
11
- describe 'Service' do
12
- it "can create" do
13
- @holodeck.mock(Twilio::Response.new(500, ''))
14
-
15
- expect {
16
- @client.authy.v1.services.create(friendly_name: 'friendly_name')
17
- }.to raise_exception(Twilio::REST::TwilioError)
18
-
19
- values = {'FriendlyName' => 'friendly_name', }
20
- expect(
21
- @holodeck.has_request?(Holodeck::Request.new(
22
- method: 'post',
23
- url: 'https://authy.twilio.com/v1/Services',
24
- data: values,
25
- ))).to eq(true)
26
- end
27
-
28
- it "receives create responses" do
29
- @holodeck.mock(Twilio::Response.new(
30
- 201,
31
- %q[
32
- {
33
- "sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34
- "friendly_name": "friendly_name",
35
- "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
- "date_created": "2015-07-30T20:00:00Z",
37
- "date_updated": "2015-07-30T20:00:00Z",
38
- "configuration": {},
39
- "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
40
- "links": {
41
- "entities": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities"
42
- }
43
- }
44
- ]
45
- ))
46
-
47
- actual = @client.authy.v1.services.create(friendly_name: 'friendly_name')
48
-
49
- expect(actual).to_not eq(nil)
50
- end
51
-
52
- it "can delete" do
53
- @holodeck.mock(Twilio::Response.new(500, ''))
54
-
55
- expect {
56
- @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
57
- }.to raise_exception(Twilio::REST::TwilioError)
58
-
59
- values = {}
60
- expect(
61
- @holodeck.has_request?(Holodeck::Request.new(
62
- method: 'delete',
63
- url: 'https://authy.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
64
- ))).to eq(true)
65
- end
66
-
67
- it "receives delete responses" do
68
- @holodeck.mock(Twilio::Response.new(
69
- 204,
70
- nil,
71
- ))
72
-
73
- actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
74
-
75
- expect(actual).to eq(true)
76
- end
77
-
78
- it "can fetch" do
79
- @holodeck.mock(Twilio::Response.new(500, ''))
80
-
81
- expect {
82
- @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
83
- }.to raise_exception(Twilio::REST::TwilioError)
84
-
85
- values = {}
86
- expect(
87
- @holodeck.has_request?(Holodeck::Request.new(
88
- method: 'get',
89
- url: 'https://authy.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
90
- ))).to eq(true)
91
- end
92
-
93
- it "receives fetch responses" do
94
- @holodeck.mock(Twilio::Response.new(
95
- 200,
96
- %q[
97
- {
98
- "sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
99
- "friendly_name": "friendly_name",
100
- "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
101
- "date_created": "2015-07-30T20:00:00Z",
102
- "date_updated": "2015-07-30T20:00:00Z",
103
- "configuration": {},
104
- "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
105
- "links": {
106
- "entities": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities"
107
- }
108
- }
109
- ]
110
- ))
111
-
112
- actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
113
-
114
- expect(actual).to_not eq(nil)
115
- end
116
-
117
- it "can read" do
118
- @holodeck.mock(Twilio::Response.new(500, ''))
119
-
120
- expect {
121
- @client.authy.v1.services.list()
122
- }.to raise_exception(Twilio::REST::TwilioError)
123
-
124
- values = {}
125
- expect(
126
- @holodeck.has_request?(Holodeck::Request.new(
127
- method: 'get',
128
- url: 'https://authy.twilio.com/v1/Services',
129
- ))).to eq(true)
130
- end
131
-
132
- it "receives read_empty responses" do
133
- @holodeck.mock(Twilio::Response.new(
134
- 200,
135
- %q[
136
- {
137
- "services": [],
138
- "meta": {
139
- "page": 0,
140
- "page_size": 50,
141
- "first_page_url": "https://authy.twilio.com/v1/Services?PageSize=50&Page=0",
142
- "previous_page_url": null,
143
- "url": "https://authy.twilio.com/v1/Services?PageSize=50&Page=0",
144
- "next_page_url": null,
145
- "key": "services"
146
- }
147
- }
148
- ]
149
- ))
150
-
151
- actual = @client.authy.v1.services.list()
152
-
153
- expect(actual).to_not eq(nil)
154
- end
155
-
156
- it "receives read_full responses" do
157
- @holodeck.mock(Twilio::Response.new(
158
- 200,
159
- %q[
160
- {
161
- "services": [
162
- {
163
- "sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
164
- "friendly_name": "friendly_name",
165
- "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
166
- "date_created": "2015-07-30T20:00:00Z",
167
- "date_updated": "2015-07-30T20:00:00Z",
168
- "configuration": {},
169
- "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
170
- "links": {
171
- "entities": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities"
172
- }
173
- }
174
- ],
175
- "meta": {
176
- "page": 0,
177
- "page_size": 50,
178
- "first_page_url": "https://authy.twilio.com/v1/Services?PageSize=50&Page=0",
179
- "previous_page_url": null,
180
- "url": "https://authy.twilio.com/v1/Services?PageSize=50&Page=0",
181
- "next_page_url": null,
182
- "key": "services"
183
- }
184
- }
185
- ]
186
- ))
187
-
188
- actual = @client.authy.v1.services.list()
189
-
190
- expect(actual).to_not eq(nil)
191
- end
192
-
193
- it "can update" do
194
- @holodeck.mock(Twilio::Response.new(500, ''))
195
-
196
- expect {
197
- @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
198
- }.to raise_exception(Twilio::REST::TwilioError)
199
-
200
- values = {}
201
- expect(
202
- @holodeck.has_request?(Holodeck::Request.new(
203
- method: 'post',
204
- url: 'https://authy.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
205
- ))).to eq(true)
206
- end
207
-
208
- it "receives update responses" do
209
- @holodeck.mock(Twilio::Response.new(
210
- 200,
211
- %q[
212
- {
213
- "sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
214
- "friendly_name": "friendly_name",
215
- "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
216
- "date_created": "2015-07-30T20:00:00Z",
217
- "date_updated": "2015-07-30T20:00:00Z",
218
- "configuration": {},
219
- "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
220
- "links": {
221
- "entities": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities"
222
- }
223
- }
224
- ]
225
- ))
226
-
227
- actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
228
-
229
- expect(actual).to_not eq(nil)
230
- end
231
- end
@@ -1,49 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # \ / _ _ _| _ _
4
- # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
- # / /
6
- #
7
- # frozen_string_literal: true
8
-
9
- require 'spec_helper.rb'
10
-
11
- describe 'ExportAssistant' do
12
- it "can fetch" do
13
- @holodeck.mock(Twilio::Response.new(500, ''))
14
-
15
- expect {
16
- @client.autopilot.v1.assistants('UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
17
- .export_assistant().fetch()
18
- }.to raise_exception(Twilio::REST::TwilioError)
19
-
20
- values = {}
21
- expect(
22
- @holodeck.has_request?(Holodeck::Request.new(
23
- method: 'get',
24
- url: 'https://autopilot.twilio.com/v1/Assistants/UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Export',
25
- ))).to eq(true)
26
- end
27
-
28
- it "receives fetch responses" do
29
- @holodeck.mock(Twilio::Response.new(
30
- 200,
31
- %q[
32
- {
33
- "url": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Export",
34
- "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
35
- "assistant_sid": "UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
- "date_created": "2015-07-30T20:00:00Z",
37
- "status": "building",
38
- "error_code": null,
39
- "schema": {}
40
- }
41
- ]
42
- ))
43
-
44
- actual = @client.autopilot.v1.assistants('UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
45
- .export_assistant().fetch()
46
-
47
- expect(actual).to_not eq(nil)
48
- end
49
- end