twilio-ruby 5.29.0 → 5.29.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -0
  3. data/CHANGES.md +31 -0
  4. data/README.md +2 -2
  5. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +6 -2
  6. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +2 -1
  7. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +9 -7
  8. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +16 -0
  9. data/lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb +222 -0
  10. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +18 -6
  11. data/lib/twilio-ruby/rest/insights.rb +5 -5
  12. data/lib/twilio-ruby/rest/insights/v1.rb +10 -10
  13. data/lib/twilio-ruby/rest/insights/v1/call.rb +242 -0
  14. data/lib/twilio-ruby/rest/insights/v1/call/event.rb +278 -0
  15. data/lib/twilio-ruby/rest/insights/v1/call/metric.rb +268 -0
  16. data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +305 -0
  17. data/lib/twilio-ruby/rest/preview.rb +5 -4
  18. data/lib/twilio-ruby/rest/preview/marketplace.rb +2 -4
  19. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +9 -11
  20. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +14 -11
  21. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +27 -30
  22. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +17 -14
  23. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +9 -5
  24. data/lib/twilio-ruby/twiml/voice_response.rb +42 -0
  25. data/lib/twilio-ruby/version.rb +1 -1
  26. data/spec/integration/api/v2010/account/call_spec.rb +263 -45
  27. data/spec/integration/autopilot/v1/assistant/export_assistant_spec.rb +49 -0
  28. data/spec/integration/autopilot/v1/assistant_spec.rb +8 -4
  29. data/spec/integration/flex_api/v1/flex_flow_spec.rb +8 -4
  30. data/spec/integration/insights/v1/call/event_spec.rb +171 -0
  31. data/spec/integration/insights/v1/call/metric_spec.rb +159 -0
  32. data/spec/integration/insights/v1/{summary_spec.rb → call/summary_spec.rb} +4 -2
  33. data/spec/integration/insights/v1/call_spec.rb +47 -0
  34. data/spec/integration/verify/v2/service/verification_spec.rb +36 -0
  35. metadata +17 -5
  36. data/lib/twilio-ruby/rest/insights/v1/summary.rb +0 -302
@@ -47,7 +47,8 @@ describe 'Assistant' do
47
47
  "style_sheet": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/StyleSheet",
48
48
  "defaults": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Defaults",
49
49
  "dialogues": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Dialogues",
50
- "webhooks": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks"
50
+ "webhooks": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",
51
+ "export_assistant": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Export"
51
52
  },
52
53
  "url": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
53
54
  "callback_url": "https://example.com/callback_url",
@@ -125,7 +126,8 @@ describe 'Assistant' do
125
126
  "style_sheet": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/StyleSheet",
126
127
  "defaults": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Defaults",
127
128
  "dialogues": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Dialogues",
128
- "webhooks": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks"
129
+ "webhooks": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",
130
+ "export_assistant": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Export"
129
131
  },
130
132
  "url": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
131
133
  "callback_url": "https://example.com/callback_url",
@@ -188,7 +190,8 @@ describe 'Assistant' do
188
190
  "style_sheet": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/StyleSheet",
189
191
  "defaults": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Defaults",
190
192
  "dialogues": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Dialogues",
191
- "webhooks": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks"
193
+ "webhooks": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",
194
+ "export_assistant": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Export"
192
195
  },
193
196
  "url": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
194
197
  "callback_url": "https://example.com/callback_url",
@@ -240,7 +243,8 @@ describe 'Assistant' do
240
243
  "style_sheet": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/StyleSheet",
241
244
  "defaults": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Defaults",
242
245
  "dialogues": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Dialogues",
243
- "webhooks": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks"
246
+ "webhooks": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",
247
+ "export_assistant": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Export"
244
248
  },
245
249
  "url": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
246
250
  "callback_url": "https://example.com/callback_url",
@@ -51,7 +51,8 @@ describe 'FlexFlow' do
51
51
  "enabled": true,
52
52
  "integration_type": "studio",
53
53
  "integration": {
54
- "flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
54
+ "flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
55
+ "retry_count": 1
55
56
  },
56
57
  "long_lived": true,
57
58
  "janitor_enabled": true,
@@ -122,7 +123,8 @@ describe 'FlexFlow' do
122
123
  "enabled": true,
123
124
  "integration_type": "studio",
124
125
  "integration": {
125
- "flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
126
+ "flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
127
+ "retry_count": 1
126
128
  },
127
129
  "long_lived": true,
128
130
  "janitor_enabled": true,
@@ -172,7 +174,8 @@ describe 'FlexFlow' do
172
174
  "enabled": true,
173
175
  "integration_type": "studio",
174
176
  "integration": {
175
- "flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
177
+ "flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
178
+ "retry_count": 1
176
179
  },
177
180
  "long_lived": true,
178
181
  "janitor_enabled": true,
@@ -217,7 +220,8 @@ describe 'FlexFlow' do
217
220
  "enabled": true,
218
221
  "integration_type": "studio",
219
222
  "integration": {
220
- "flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
223
+ "flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
224
+ "retry_count": 1
221
225
  },
222
226
  "long_lived": true,
223
227
  "janitor_enabled": true,
@@ -0,0 +1,171 @@
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 'Event' do
12
+ it "can read" do
13
+ @holodeck.mock(Twilio::Response.new(500, ''))
14
+
15
+ expect {
16
+ @client.insights.v1.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
17
+ .events.list()
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://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events',
25
+ ))).to eq(true)
26
+ end
27
+
28
+ it "receives read responses" do
29
+ @holodeck.mock(Twilio::Response.new(
30
+ 200,
31
+ %q[
32
+ {
33
+ "meta": {
34
+ "page": 0,
35
+ "page_size": 50,
36
+ "first_page_url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?PageSize=50&Page=0",
37
+ "previous_page_url": null,
38
+ "next_page_url": null,
39
+ "key": "events",
40
+ "url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?PageSize=50&Page=0"
41
+ },
42
+ "events": [
43
+ {
44
+ "timestamp": "2019-09-19T22:15:23Z",
45
+ "call_sid": "CA03a02b156c6faa96c86906f7e9ad0f38",
46
+ "account_sid": "AC998c10b68cbfda9f67277f7d8f4439c9",
47
+ "edge": "sdk_edge",
48
+ "group": "connection",
49
+ "name": "error",
50
+ "level": "ERROR",
51
+ "sdk_edge": {
52
+ "error": {
53
+ "code": 31600
54
+ },
55
+ "metadata": {
56
+ "client_name": "GTI9300323095d271b890c91568931321395",
57
+ "location": {
58
+ "lat": 37.4192,
59
+ "lon": -122.0574
60
+ },
61
+ "city": "Mountain View",
62
+ "country_code": "US",
63
+ "country_subdivision": "California",
64
+ "ip_address": "108.177.7.83",
65
+ "sdk": {
66
+ "type": "twilio-voice-android",
67
+ "version": "4.5.1",
68
+ "platform": "android",
69
+ "selected_region": "gll",
70
+ "os": {
71
+ "name": "android",
72
+ "version": "4.3"
73
+ },
74
+ "device": {
75
+ "model": "GT-I9300",
76
+ "type": "GT-I9300",
77
+ "vendor": "samsung",
78
+ "arch": "armeabi-v7a"
79
+ }
80
+ }
81
+ }
82
+ },
83
+ "client_edge": null,
84
+ "carrier_edge": null,
85
+ "sip_edge": null,
86
+ "gateway": null,
87
+ "client": null
88
+ }
89
+ ]
90
+ }
91
+ ]
92
+ ))
93
+
94
+ actual = @client.insights.v1.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
95
+ .events.list()
96
+
97
+ expect(actual).to_not eq(nil)
98
+ end
99
+
100
+ it "receives read_deep responses" do
101
+ @holodeck.mock(Twilio::Response.new(
102
+ 200,
103
+ %q[
104
+ {
105
+ "meta": {
106
+ "page": 10,
107
+ "page_size": 5,
108
+ "first_page_url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?PageSize=5&Page=0",
109
+ "previous_page_url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?PageSize=5&Page=9&PageToken=DP10",
110
+ "next_page_url": null,
111
+ "key": "events",
112
+ "url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?PageSize=5&Page=10"
113
+ },
114
+ "events": [
115
+ {
116
+ "timestamp": "2019-09-19T22:15:23Z",
117
+ "call_sid": "CA03a02b156c6faa96c86906f7e9ad0f38",
118
+ "account_sid": "AC998c10b68cbfda9f67277f7d8f4439c9",
119
+ "edge": "sdk_edge",
120
+ "group": "connection",
121
+ "name": "error",
122
+ "level": "ERROR",
123
+ "sdk_edge": {
124
+ "error": {
125
+ "code": 31600
126
+ },
127
+ "metadata": {
128
+ "client_name": "GTI9300323095d271b890c91568931321395",
129
+ "location": {
130
+ "lat": 37.4192,
131
+ "lon": -122.0574
132
+ },
133
+ "city": "Mountain View",
134
+ "country_code": "US",
135
+ "country_subdivision": "California",
136
+ "ip_address": "108.177.7.83",
137
+ "sdk": {
138
+ "type": "twilio-voice-android",
139
+ "version": "4.5.1",
140
+ "platform": "android",
141
+ "selected_region": "gll",
142
+ "os": {
143
+ "name": "android",
144
+ "version": "4.3"
145
+ },
146
+ "device": {
147
+ "model": "GT-I9300",
148
+ "type": "GT-I9300",
149
+ "vendor": "samsung",
150
+ "arch": "armeabi-v7a"
151
+ }
152
+ }
153
+ }
154
+ },
155
+ "client_edge": null,
156
+ "carrier_edge": null,
157
+ "sip_edge": null,
158
+ "gateway": null,
159
+ "client": null
160
+ }
161
+ ]
162
+ }
163
+ ]
164
+ ))
165
+
166
+ actual = @client.insights.v1.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
167
+ .events.list()
168
+
169
+ expect(actual).to_not eq(nil)
170
+ end
171
+ end
@@ -0,0 +1,159 @@
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 'Metric' do
12
+ it "can read" do
13
+ @holodeck.mock(Twilio::Response.new(500, ''))
14
+
15
+ expect {
16
+ @client.insights.v1.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
17
+ .metrics.list()
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://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Metrics',
25
+ ))).to eq(true)
26
+ end
27
+
28
+ it "receives read responses" do
29
+ @holodeck.mock(Twilio::Response.new(
30
+ 200,
31
+ %q[
32
+ {
33
+ "meta": {
34
+ "page": 0,
35
+ "page_size": 50,
36
+ "first_page_url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Metrics?PageSize=50&Page=0",
37
+ "previous_page_url": null,
38
+ "next_page_url": null,
39
+ "key": "metrics",
40
+ "url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Metrics?PageSize=50&Page=0"
41
+ },
42
+ "metrics": [
43
+ {
44
+ "timestamp": "2019-10-07T22:32:06Z",
45
+ "call_sid": "CA7569efe0253644fa4a88aa97beca3310",
46
+ "account_sid": "AC998c10b68cbfda9f67277f7d8f4439c9",
47
+ "edge": "sdk_edge",
48
+ "direction": "both",
49
+ "sdk_edge": {
50
+ "interval": {
51
+ "packets_received": 50,
52
+ "packets_lost": 0,
53
+ "audio_in": {
54
+ "value": 81.0
55
+ },
56
+ "audio_out": {
57
+ "value": 5237.0
58
+ },
59
+ "jitter": {
60
+ "value": 9
61
+ },
62
+ "mos": {
63
+ "value": 4.39
64
+ },
65
+ "rtt": {
66
+ "value": 81
67
+ }
68
+ },
69
+ "cumulative": {
70
+ "bytes_received": 547788,
71
+ "bytes_sent": 329425,
72
+ "packets_received": 3900,
73
+ "packets_lost": 0,
74
+ "packets_sent": 3934
75
+ }
76
+ },
77
+ "client_edge": null,
78
+ "carrier_edge": null,
79
+ "sip_edge": null,
80
+ "gateway": null,
81
+ "client": null
82
+ }
83
+ ]
84
+ }
85
+ ]
86
+ ))
87
+
88
+ actual = @client.insights.v1.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
89
+ .metrics.list()
90
+
91
+ expect(actual).to_not eq(nil)
92
+ end
93
+
94
+ it "receives read_full responses" do
95
+ @holodeck.mock(Twilio::Response.new(
96
+ 200,
97
+ %q[
98
+ {
99
+ "meta": {
100
+ "page": 10,
101
+ "page_size": 5,
102
+ "first_page_url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Metrics?Direction=both&Edge=sdk_edge&PageSize=5&Page=0",
103
+ "previous_page_url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Metrics?Direction=both&Edge=sdk_edge&PageSize=5&Page=9&PageToken=DP10",
104
+ "next_page_url": null,
105
+ "key": "metrics",
106
+ "url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Metrics?Direction=both&Edge=sdk_edge&PageSize=5&Page=10"
107
+ },
108
+ "metrics": [
109
+ {
110
+ "timestamp": "2019-10-07T22:32:06Z",
111
+ "call_sid": "CA7569efe0253644fa4a88aa97beca3310",
112
+ "account_sid": "AC998c10b68cbfda9f67277f7d8f4439c9",
113
+ "edge": "sdk_edge",
114
+ "direction": "both",
115
+ "sdk_edge": {
116
+ "interval": {
117
+ "packets_received": 50,
118
+ "packets_lost": 0,
119
+ "audio_in": {
120
+ "value": 81.0
121
+ },
122
+ "audio_out": {
123
+ "value": 5237.0
124
+ },
125
+ "jitter": {
126
+ "value": 9
127
+ },
128
+ "mos": {
129
+ "value": 4.39
130
+ },
131
+ "rtt": {
132
+ "value": 81
133
+ }
134
+ },
135
+ "cumulative": {
136
+ "bytes_received": 547788,
137
+ "bytes_sent": 329425,
138
+ "packets_received": 3900,
139
+ "packets_lost": 0,
140
+ "packets_sent": 3934
141
+ }
142
+ },
143
+ "client_edge": null,
144
+ "carrier_edge": null,
145
+ "sip_edge": null,
146
+ "gateway": null,
147
+ "client": null
148
+ }
149
+ ]
150
+ }
151
+ ]
152
+ ))
153
+
154
+ actual = @client.insights.v1.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
155
+ .metrics.list()
156
+
157
+ expect(actual).to_not eq(nil)
158
+ end
159
+ end
@@ -13,7 +13,8 @@ describe 'CallSummary' do
13
13
  @holodeck.mock(Twilio::Response.new(500, ''))
14
14
 
15
15
  expect {
16
- @client.insights.v1.summary('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
16
+ @client.insights.v1.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
17
+ .summary().fetch()
17
18
  }.to raise_exception(Twilio::REST::TwilioError)
18
19
 
19
20
  values = {}
@@ -54,7 +55,8 @@ describe 'CallSummary' do
54
55
  ]
55
56
  ))
56
57
 
57
- actual = @client.insights.v1.summary('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
58
+ actual = @client.insights.v1.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
59
+ .summary().fetch()
58
60
 
59
61
  expect(actual).to_not eq(nil)
60
62
  end
@@ -0,0 +1,47 @@
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 'Call' do
12
+ it "can fetch" do
13
+ @holodeck.mock(Twilio::Response.new(500, ''))
14
+
15
+ expect {
16
+ @client.insights.v1.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
17
+ }.to raise_exception(Twilio::REST::TwilioError)
18
+
19
+ values = {}
20
+ expect(
21
+ @holodeck.has_request?(Holodeck::Request.new(
22
+ method: 'get',
23
+ url: 'https://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
24
+ ))).to eq(true)
25
+ end
26
+
27
+ it "receives fetch responses" do
28
+ @holodeck.mock(Twilio::Response.new(
29
+ 200,
30
+ %q[
31
+ {
32
+ "sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
33
+ "url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34
+ "links": {
35
+ "events": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events",
36
+ "metrics": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Metrics",
37
+ "summary": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Summary"
38
+ }
39
+ }
40
+ ]
41
+ ))
42
+
43
+ actual = @client.insights.v1.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
44
+
45
+ expect(actual).to_not eq(nil)
46
+ end
47
+ end