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.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/CHANGES.md +31 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +6 -2
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +9 -7
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +16 -0
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb +222 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +18 -6
- data/lib/twilio-ruby/rest/insights.rb +5 -5
- data/lib/twilio-ruby/rest/insights/v1.rb +10 -10
- data/lib/twilio-ruby/rest/insights/v1/call.rb +242 -0
- data/lib/twilio-ruby/rest/insights/v1/call/event.rb +278 -0
- data/lib/twilio-ruby/rest/insights/v1/call/metric.rb +268 -0
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +305 -0
- data/lib/twilio-ruby/rest/preview.rb +5 -4
- data/lib/twilio-ruby/rest/preview/marketplace.rb +2 -4
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +9 -11
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +14 -11
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +27 -30
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +17 -14
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +9 -5
- data/lib/twilio-ruby/twiml/voice_response.rb +42 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call_spec.rb +263 -45
- data/spec/integration/autopilot/v1/assistant/export_assistant_spec.rb +49 -0
- data/spec/integration/autopilot/v1/assistant_spec.rb +8 -4
- data/spec/integration/flex_api/v1/flex_flow_spec.rb +8 -4
- data/spec/integration/insights/v1/call/event_spec.rb +171 -0
- data/spec/integration/insights/v1/call/metric_spec.rb +159 -0
- data/spec/integration/insights/v1/{summary_spec.rb → call/summary_spec.rb} +4 -2
- data/spec/integration/insights/v1/call_spec.rb +47 -0
- data/spec/integration/verify/v2/service/verification_spec.rb +36 -0
- metadata +17 -5
- data/lib/twilio-ruby/rest/insights/v1/summary.rb +0 -302
@@ -62,6 +62,42 @@ describe 'Verification' do
|
|
62
62
|
expect(actual).to_not eq(nil)
|
63
63
|
end
|
64
64
|
|
65
|
+
it "receives create_verification_email responses" do
|
66
|
+
@holodeck.mock(Twilio::Response.new(
|
67
|
+
201,
|
68
|
+
%q[
|
69
|
+
{
|
70
|
+
"sid": "VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
71
|
+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
72
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
73
|
+
"to": "mail@email.com",
|
74
|
+
"channel": "email",
|
75
|
+
"status": "pending",
|
76
|
+
"valid": false,
|
77
|
+
"date_created": "2015-07-30T20:00:00Z",
|
78
|
+
"date_updated": "2015-07-30T20:00:00Z",
|
79
|
+
"lookup": {
|
80
|
+
"carrier": {
|
81
|
+
"error_code": null,
|
82
|
+
"name": null,
|
83
|
+
"mobile_country_code": null,
|
84
|
+
"mobile_network_code": null,
|
85
|
+
"type": null
|
86
|
+
}
|
87
|
+
},
|
88
|
+
"amount": null,
|
89
|
+
"payee": null,
|
90
|
+
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
91
|
+
}
|
92
|
+
]
|
93
|
+
))
|
94
|
+
|
95
|
+
actual = @client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
96
|
+
.verifications.create(to: 'to', channel: 'channel')
|
97
|
+
|
98
|
+
expect(actual).to_not eq(nil)
|
99
|
+
end
|
100
|
+
|
65
101
|
it "receives create_verification_with_rate_limits responses" do
|
66
102
|
@holodeck.mock(Twilio::Response.new(
|
67
103
|
201,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.29.
|
4
|
+
version: 5.29.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -254,6 +254,7 @@ files:
|
|
254
254
|
- lib/twilio-ruby/rest/autopilot/v1/assistant.rb
|
255
255
|
- lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb
|
256
256
|
- lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb
|
257
|
+
- lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb
|
257
258
|
- lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb
|
258
259
|
- lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb
|
259
260
|
- lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb
|
@@ -309,7 +310,10 @@ files:
|
|
309
310
|
- lib/twilio-ruby/rest/flex_api/v1/web_channel.rb
|
310
311
|
- lib/twilio-ruby/rest/insights.rb
|
311
312
|
- lib/twilio-ruby/rest/insights/v1.rb
|
312
|
-
- lib/twilio-ruby/rest/insights/v1/
|
313
|
+
- lib/twilio-ruby/rest/insights/v1/call.rb
|
314
|
+
- lib/twilio-ruby/rest/insights/v1/call/event.rb
|
315
|
+
- lib/twilio-ruby/rest/insights/v1/call/metric.rb
|
316
|
+
- lib/twilio-ruby/rest/insights/v1/call/summary.rb
|
313
317
|
- lib/twilio-ruby/rest/ip_messaging.rb
|
314
318
|
- lib/twilio-ruby/rest/ip_messaging/v1.rb
|
315
319
|
- lib/twilio-ruby/rest/ip_messaging/v1/credential.rb
|
@@ -645,6 +649,7 @@ files:
|
|
645
649
|
- spec/integration/authy/v1/service_spec.rb
|
646
650
|
- spec/integration/autopilot/v1/assistant/defaults_spec.rb
|
647
651
|
- spec/integration/autopilot/v1/assistant/dialogue_spec.rb
|
652
|
+
- spec/integration/autopilot/v1/assistant/export_assistant_spec.rb
|
648
653
|
- spec/integration/autopilot/v1/assistant/field_type/field_value_spec.rb
|
649
654
|
- spec/integration/autopilot/v1/assistant/field_type_spec.rb
|
650
655
|
- spec/integration/autopilot/v1/assistant/model_build_spec.rb
|
@@ -689,7 +694,10 @@ files:
|
|
689
694
|
- spec/integration/flex_api/v1/configuration_spec.rb
|
690
695
|
- spec/integration/flex_api/v1/flex_flow_spec.rb
|
691
696
|
- spec/integration/flex_api/v1/web_channel_spec.rb
|
692
|
-
- spec/integration/insights/v1/
|
697
|
+
- spec/integration/insights/v1/call/event_spec.rb
|
698
|
+
- spec/integration/insights/v1/call/metric_spec.rb
|
699
|
+
- spec/integration/insights/v1/call/summary_spec.rb
|
700
|
+
- spec/integration/insights/v1/call_spec.rb
|
693
701
|
- spec/integration/ip_messaging/v1/credential_spec.rb
|
694
702
|
- spec/integration/ip_messaging/v1/service/channel/invite_spec.rb
|
695
703
|
- spec/integration/ip_messaging/v1/service/channel/member_spec.rb
|
@@ -1019,6 +1027,7 @@ test_files:
|
|
1019
1027
|
- spec/integration/authy/v1/service_spec.rb
|
1020
1028
|
- spec/integration/autopilot/v1/assistant/defaults_spec.rb
|
1021
1029
|
- spec/integration/autopilot/v1/assistant/dialogue_spec.rb
|
1030
|
+
- spec/integration/autopilot/v1/assistant/export_assistant_spec.rb
|
1022
1031
|
- spec/integration/autopilot/v1/assistant/field_type/field_value_spec.rb
|
1023
1032
|
- spec/integration/autopilot/v1/assistant/field_type_spec.rb
|
1024
1033
|
- spec/integration/autopilot/v1/assistant/model_build_spec.rb
|
@@ -1063,7 +1072,10 @@ test_files:
|
|
1063
1072
|
- spec/integration/flex_api/v1/configuration_spec.rb
|
1064
1073
|
- spec/integration/flex_api/v1/flex_flow_spec.rb
|
1065
1074
|
- spec/integration/flex_api/v1/web_channel_spec.rb
|
1066
|
-
- spec/integration/insights/v1/
|
1075
|
+
- spec/integration/insights/v1/call/event_spec.rb
|
1076
|
+
- spec/integration/insights/v1/call/metric_spec.rb
|
1077
|
+
- spec/integration/insights/v1/call/summary_spec.rb
|
1078
|
+
- spec/integration/insights/v1/call_spec.rb
|
1067
1079
|
- spec/integration/ip_messaging/v1/credential_spec.rb
|
1068
1080
|
- spec/integration/ip_messaging/v1/service/channel/invite_spec.rb
|
1069
1081
|
- spec/integration/ip_messaging/v1/service/channel/member_spec.rb
|
@@ -1,302 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# \ / _ _ _| _ _
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
6
|
-
#
|
7
|
-
# frozen_string_literal: true
|
8
|
-
|
9
|
-
module Twilio
|
10
|
-
module REST
|
11
|
-
class Insights < Domain
|
12
|
-
class V1 < Version
|
13
|
-
##
|
14
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
15
|
-
class CallSummaryList < ListResource
|
16
|
-
##
|
17
|
-
# Initialize the CallSummaryList
|
18
|
-
# @param [Version] version Version that contains the resource
|
19
|
-
# @return [CallSummaryList] CallSummaryList
|
20
|
-
def initialize(version)
|
21
|
-
super(version)
|
22
|
-
|
23
|
-
# Path Solution
|
24
|
-
@solution = {}
|
25
|
-
end
|
26
|
-
|
27
|
-
##
|
28
|
-
# Provide a user friendly representation
|
29
|
-
def to_s
|
30
|
-
'#<Twilio.Insights.V1.CallSummaryList>'
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
##
|
35
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
36
|
-
class CallSummaryPage < Page
|
37
|
-
##
|
38
|
-
# Initialize the CallSummaryPage
|
39
|
-
# @param [Version] version Version that contains the resource
|
40
|
-
# @param [Response] response Response from the API
|
41
|
-
# @param [Hash] solution Path solution for the resource
|
42
|
-
# @return [CallSummaryPage] CallSummaryPage
|
43
|
-
def initialize(version, response, solution)
|
44
|
-
super(version, response)
|
45
|
-
|
46
|
-
# Path Solution
|
47
|
-
@solution = solution
|
48
|
-
end
|
49
|
-
|
50
|
-
##
|
51
|
-
# Build an instance of CallSummaryInstance
|
52
|
-
# @param [Hash] payload Payload response from the API
|
53
|
-
# @return [CallSummaryInstance] CallSummaryInstance
|
54
|
-
def get_instance(payload)
|
55
|
-
CallSummaryInstance.new(@version, payload, )
|
56
|
-
end
|
57
|
-
|
58
|
-
##
|
59
|
-
# Provide a user friendly representation
|
60
|
-
def to_s
|
61
|
-
'<Twilio.Insights.V1.CallSummaryPage>'
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
##
|
66
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
67
|
-
class CallSummaryContext < InstanceContext
|
68
|
-
##
|
69
|
-
# Initialize the CallSummaryContext
|
70
|
-
# @param [Version] version Version that contains the resource
|
71
|
-
# @param [String] call_sid The call_sid
|
72
|
-
# @return [CallSummaryContext] CallSummaryContext
|
73
|
-
def initialize(version, call_sid)
|
74
|
-
super(version)
|
75
|
-
|
76
|
-
# Path Solution
|
77
|
-
@solution = {call_sid: call_sid, }
|
78
|
-
@uri = "/Voice/#{@solution[:call_sid]}/Summary"
|
79
|
-
end
|
80
|
-
|
81
|
-
##
|
82
|
-
# Fetch a CallSummaryInstance
|
83
|
-
# @param [call_summary.ProcessingState] processing_state The processing_state
|
84
|
-
# @return [CallSummaryInstance] Fetched CallSummaryInstance
|
85
|
-
def fetch(processing_state: :unset)
|
86
|
-
params = Twilio::Values.of({'ProcessingState' => processing_state, })
|
87
|
-
|
88
|
-
payload = @version.fetch(
|
89
|
-
'GET',
|
90
|
-
@uri,
|
91
|
-
params,
|
92
|
-
)
|
93
|
-
|
94
|
-
CallSummaryInstance.new(@version, payload, call_sid: @solution[:call_sid], )
|
95
|
-
end
|
96
|
-
|
97
|
-
##
|
98
|
-
# Provide a user friendly representation
|
99
|
-
def to_s
|
100
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
101
|
-
"#<Twilio.Insights.V1.CallSummaryContext #{context}>"
|
102
|
-
end
|
103
|
-
|
104
|
-
##
|
105
|
-
# Provide a detailed, user friendly representation
|
106
|
-
def inspect
|
107
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
108
|
-
"#<Twilio.Insights.V1.CallSummaryContext #{context}>"
|
109
|
-
end
|
110
|
-
end
|
111
|
-
|
112
|
-
##
|
113
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
114
|
-
class CallSummaryInstance < InstanceResource
|
115
|
-
##
|
116
|
-
# Initialize the CallSummaryInstance
|
117
|
-
# @param [Version] version Version that contains the resource
|
118
|
-
# @param [Hash] payload payload that contains response from Twilio
|
119
|
-
# @param [String] call_sid The call_sid
|
120
|
-
# @return [CallSummaryInstance] CallSummaryInstance
|
121
|
-
def initialize(version, payload, call_sid: nil)
|
122
|
-
super(version)
|
123
|
-
|
124
|
-
# Marshaled Properties
|
125
|
-
@properties = {
|
126
|
-
'account_sid' => payload['account_sid'],
|
127
|
-
'call_sid' => payload['call_sid'],
|
128
|
-
'call_type' => payload['call_type'],
|
129
|
-
'call_state' => payload['call_state'],
|
130
|
-
'processing_state' => payload['processing_state'],
|
131
|
-
'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
|
132
|
-
'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']),
|
133
|
-
'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
|
134
|
-
'connect_duration' => payload['connect_duration'] == nil ? payload['connect_duration'] : payload['connect_duration'].to_i,
|
135
|
-
'from' => payload['from'],
|
136
|
-
'to' => payload['to'],
|
137
|
-
'carrier_edge' => payload['carrier_edge'],
|
138
|
-
'client_edge' => payload['client_edge'],
|
139
|
-
'sdk_edge' => payload['sdk_edge'],
|
140
|
-
'sip_edge' => payload['sip_edge'],
|
141
|
-
'tags' => payload['tags'],
|
142
|
-
'url' => payload['url'],
|
143
|
-
'attributes' => payload['attributes'],
|
144
|
-
'properties' => payload['properties'],
|
145
|
-
}
|
146
|
-
|
147
|
-
# Context
|
148
|
-
@instance_context = nil
|
149
|
-
@params = {'call_sid' => call_sid || @properties['call_sid'], }
|
150
|
-
end
|
151
|
-
|
152
|
-
##
|
153
|
-
# Generate an instance context for the instance, the context is capable of
|
154
|
-
# performing various actions. All instance actions are proxied to the context
|
155
|
-
# @return [CallSummaryContext] CallSummaryContext for this CallSummaryInstance
|
156
|
-
def context
|
157
|
-
unless @instance_context
|
158
|
-
@instance_context = CallSummaryContext.new(@version, @params['call_sid'], )
|
159
|
-
end
|
160
|
-
@instance_context
|
161
|
-
end
|
162
|
-
|
163
|
-
##
|
164
|
-
# @return [String] The account_sid
|
165
|
-
def account_sid
|
166
|
-
@properties['account_sid']
|
167
|
-
end
|
168
|
-
|
169
|
-
##
|
170
|
-
# @return [String] The call_sid
|
171
|
-
def call_sid
|
172
|
-
@properties['call_sid']
|
173
|
-
end
|
174
|
-
|
175
|
-
##
|
176
|
-
# @return [call_summary.CallType] The call_type
|
177
|
-
def call_type
|
178
|
-
@properties['call_type']
|
179
|
-
end
|
180
|
-
|
181
|
-
##
|
182
|
-
# @return [call_summary.CallState] The call_state
|
183
|
-
def call_state
|
184
|
-
@properties['call_state']
|
185
|
-
end
|
186
|
-
|
187
|
-
##
|
188
|
-
# @return [call_summary.ProcessingState] The processing_state
|
189
|
-
def processing_state
|
190
|
-
@properties['processing_state']
|
191
|
-
end
|
192
|
-
|
193
|
-
##
|
194
|
-
# @return [Time] The start_time
|
195
|
-
def start_time
|
196
|
-
@properties['start_time']
|
197
|
-
end
|
198
|
-
|
199
|
-
##
|
200
|
-
# @return [Time] The end_time
|
201
|
-
def end_time
|
202
|
-
@properties['end_time']
|
203
|
-
end
|
204
|
-
|
205
|
-
##
|
206
|
-
# @return [String] The duration
|
207
|
-
def duration
|
208
|
-
@properties['duration']
|
209
|
-
end
|
210
|
-
|
211
|
-
##
|
212
|
-
# @return [String] The connect_duration
|
213
|
-
def connect_duration
|
214
|
-
@properties['connect_duration']
|
215
|
-
end
|
216
|
-
|
217
|
-
##
|
218
|
-
# @return [Hash] The from
|
219
|
-
def from
|
220
|
-
@properties['from']
|
221
|
-
end
|
222
|
-
|
223
|
-
##
|
224
|
-
# @return [Hash] The to
|
225
|
-
def to
|
226
|
-
@properties['to']
|
227
|
-
end
|
228
|
-
|
229
|
-
##
|
230
|
-
# @return [Hash] The carrier_edge
|
231
|
-
def carrier_edge
|
232
|
-
@properties['carrier_edge']
|
233
|
-
end
|
234
|
-
|
235
|
-
##
|
236
|
-
# @return [Hash] The client_edge
|
237
|
-
def client_edge
|
238
|
-
@properties['client_edge']
|
239
|
-
end
|
240
|
-
|
241
|
-
##
|
242
|
-
# @return [Hash] The sdk_edge
|
243
|
-
def sdk_edge
|
244
|
-
@properties['sdk_edge']
|
245
|
-
end
|
246
|
-
|
247
|
-
##
|
248
|
-
# @return [Hash] The sip_edge
|
249
|
-
def sip_edge
|
250
|
-
@properties['sip_edge']
|
251
|
-
end
|
252
|
-
|
253
|
-
##
|
254
|
-
# @return [String] The tags
|
255
|
-
def tags
|
256
|
-
@properties['tags']
|
257
|
-
end
|
258
|
-
|
259
|
-
##
|
260
|
-
# @return [String] The url
|
261
|
-
def url
|
262
|
-
@properties['url']
|
263
|
-
end
|
264
|
-
|
265
|
-
##
|
266
|
-
# @return [Hash] The attributes
|
267
|
-
def attributes
|
268
|
-
@properties['attributes']
|
269
|
-
end
|
270
|
-
|
271
|
-
##
|
272
|
-
# @return [Hash] The properties
|
273
|
-
def properties
|
274
|
-
@properties['properties']
|
275
|
-
end
|
276
|
-
|
277
|
-
##
|
278
|
-
# Fetch a CallSummaryInstance
|
279
|
-
# @param [call_summary.ProcessingState] processing_state The processing_state
|
280
|
-
# @return [CallSummaryInstance] Fetched CallSummaryInstance
|
281
|
-
def fetch(processing_state: :unset)
|
282
|
-
context.fetch(processing_state: processing_state, )
|
283
|
-
end
|
284
|
-
|
285
|
-
##
|
286
|
-
# Provide a user friendly representation
|
287
|
-
def to_s
|
288
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
289
|
-
"<Twilio.Insights.V1.CallSummaryInstance #{values}>"
|
290
|
-
end
|
291
|
-
|
292
|
-
##
|
293
|
-
# Provide a detailed, user friendly representation
|
294
|
-
def inspect
|
295
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
296
|
-
"<Twilio.Insights.V1.CallSummaryInstance #{values}>"
|
297
|
-
end
|
298
|
-
end
|
299
|
-
end
|
300
|
-
end
|
301
|
-
end
|
302
|
-
end
|