twilio-ruby 5.57.1 → 5.58.3
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/.gitignore +2 -0
- data/.travis.yml +24 -7
- data/CHANGES.md +83 -0
- data/Gemfile +1 -0
- data/README.md +2 -2
- data/examples/examples.rb +1 -1
- data/lib/twilio-ruby/http/http_client.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +4 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -11
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +12 -5
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +12 -5
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +434 -0
- data/lib/twilio-ruby/rest/insights/v1.rb +7 -0
- data/lib/twilio-ruby/rest/insights.rb +6 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +54 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +9 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +6 -2
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +19 -14
- data/lib/twilio-ruby/rest/pricing/v2/country.rb +280 -0
- data/lib/twilio-ruby/rest/pricing/v2/number.rb +225 -0
- data/lib/twilio-ruby/rest/pricing/v2.rb +37 -0
- data/lib/twilio-ruby/rest/pricing.rb +19 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +30 -20
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +6 -2
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +36 -11
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +11 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +8 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +7 -3
- data/lib/twilio-ruby/rest/verify/v2/verification_template.rb +206 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +7 -0
- data/lib/twilio-ruby/rest/verify.rb +6 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/sonar-project.properties +13 -0
- metadata +7 -2
@@ -0,0 +1,434 @@
|
|
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
|
+
class CallSummariesList < ListResource
|
14
|
+
##
|
15
|
+
# Initialize the CallSummariesList
|
16
|
+
# @param [Version] version Version that contains the resource
|
17
|
+
# @return [CallSummariesList] CallSummariesList
|
18
|
+
def initialize(version)
|
19
|
+
super(version)
|
20
|
+
|
21
|
+
# Path Solution
|
22
|
+
@solution = {}
|
23
|
+
@uri = "/Voice/Summaries"
|
24
|
+
end
|
25
|
+
|
26
|
+
##
|
27
|
+
# Lists CallSummariesInstance records from the API as a list.
|
28
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
29
|
+
# memory before returning.
|
30
|
+
# @param [Array[String]] from The from
|
31
|
+
# @param [Array[String]] to The to
|
32
|
+
# @param [Array[String]] from_carrier The from_carrier
|
33
|
+
# @param [Array[String]] to_carrier The to_carrier
|
34
|
+
# @param [Array[String]] from_country_code The from_country_code
|
35
|
+
# @param [Array[String]] to_country_code The to_country_code
|
36
|
+
# @param [Boolean] branded The branded
|
37
|
+
# @param [Boolean] verified_caller The verified_caller
|
38
|
+
# @param [Boolean] has_tag The has_tag
|
39
|
+
# @param [String] start_time The start_time
|
40
|
+
# @param [String] end_time The end_time
|
41
|
+
# @param [Array[call_summaries.CallType]] call_type The call_type
|
42
|
+
# @param [Array[call_summaries.CallState]] call_state The call_state
|
43
|
+
# @param [Array[call_summaries.CallDirection]] direction The direction
|
44
|
+
# @param [call_summaries.ProcessingStateRequest] processing_state The
|
45
|
+
# processing_state
|
46
|
+
# @param [call_summaries.SortBy] sort_by The sort_by
|
47
|
+
# @param [String] subaccount The subaccount
|
48
|
+
# @param [Boolean] abnormal_session The abnormal_session
|
49
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
50
|
+
# guarantees to never return more than limit. Default is no limit
|
51
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
52
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
53
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
54
|
+
# efficient page size, i.e. min(limit, 1000)
|
55
|
+
# @return [Array] Array of up to limit results
|
56
|
+
def list(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, limit: nil, page_size: nil)
|
57
|
+
self.stream(
|
58
|
+
from: from,
|
59
|
+
to: to,
|
60
|
+
from_carrier: from_carrier,
|
61
|
+
to_carrier: to_carrier,
|
62
|
+
from_country_code: from_country_code,
|
63
|
+
to_country_code: to_country_code,
|
64
|
+
branded: branded,
|
65
|
+
verified_caller: verified_caller,
|
66
|
+
has_tag: has_tag,
|
67
|
+
start_time: start_time,
|
68
|
+
end_time: end_time,
|
69
|
+
call_type: call_type,
|
70
|
+
call_state: call_state,
|
71
|
+
direction: direction,
|
72
|
+
processing_state: processing_state,
|
73
|
+
sort_by: sort_by,
|
74
|
+
subaccount: subaccount,
|
75
|
+
abnormal_session: abnormal_session,
|
76
|
+
limit: limit,
|
77
|
+
page_size: page_size
|
78
|
+
).entries
|
79
|
+
end
|
80
|
+
|
81
|
+
##
|
82
|
+
# Streams CallSummariesInstance records from the API as an Enumerable.
|
83
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
84
|
+
# is reached.
|
85
|
+
# @param [Array[String]] from The from
|
86
|
+
# @param [Array[String]] to The to
|
87
|
+
# @param [Array[String]] from_carrier The from_carrier
|
88
|
+
# @param [Array[String]] to_carrier The to_carrier
|
89
|
+
# @param [Array[String]] from_country_code The from_country_code
|
90
|
+
# @param [Array[String]] to_country_code The to_country_code
|
91
|
+
# @param [Boolean] branded The branded
|
92
|
+
# @param [Boolean] verified_caller The verified_caller
|
93
|
+
# @param [Boolean] has_tag The has_tag
|
94
|
+
# @param [String] start_time The start_time
|
95
|
+
# @param [String] end_time The end_time
|
96
|
+
# @param [Array[call_summaries.CallType]] call_type The call_type
|
97
|
+
# @param [Array[call_summaries.CallState]] call_state The call_state
|
98
|
+
# @param [Array[call_summaries.CallDirection]] direction The direction
|
99
|
+
# @param [call_summaries.ProcessingStateRequest] processing_state The
|
100
|
+
# processing_state
|
101
|
+
# @param [call_summaries.SortBy] sort_by The sort_by
|
102
|
+
# @param [String] subaccount The subaccount
|
103
|
+
# @param [Boolean] abnormal_session The abnormal_session
|
104
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
105
|
+
# guarantees to never return more than limit. Default is no limit.
|
106
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
107
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
108
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
109
|
+
# efficient page size, i.e. min(limit, 1000)
|
110
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
111
|
+
def stream(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, limit: nil, page_size: nil)
|
112
|
+
limits = @version.read_limits(limit, page_size)
|
113
|
+
|
114
|
+
page = self.page(
|
115
|
+
from: from,
|
116
|
+
to: to,
|
117
|
+
from_carrier: from_carrier,
|
118
|
+
to_carrier: to_carrier,
|
119
|
+
from_country_code: from_country_code,
|
120
|
+
to_country_code: to_country_code,
|
121
|
+
branded: branded,
|
122
|
+
verified_caller: verified_caller,
|
123
|
+
has_tag: has_tag,
|
124
|
+
start_time: start_time,
|
125
|
+
end_time: end_time,
|
126
|
+
call_type: call_type,
|
127
|
+
call_state: call_state,
|
128
|
+
direction: direction,
|
129
|
+
processing_state: processing_state,
|
130
|
+
sort_by: sort_by,
|
131
|
+
subaccount: subaccount,
|
132
|
+
abnormal_session: abnormal_session,
|
133
|
+
page_size: limits[:page_size],
|
134
|
+
)
|
135
|
+
|
136
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
137
|
+
end
|
138
|
+
|
139
|
+
##
|
140
|
+
# When passed a block, yields CallSummariesInstance records from the API.
|
141
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
142
|
+
# is reached.
|
143
|
+
def each
|
144
|
+
limits = @version.read_limits
|
145
|
+
|
146
|
+
page = self.page(page_size: limits[:page_size], )
|
147
|
+
|
148
|
+
@version.stream(page,
|
149
|
+
limit: limits[:limit],
|
150
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
151
|
+
end
|
152
|
+
|
153
|
+
##
|
154
|
+
# Retrieve a single page of CallSummariesInstance records from the API.
|
155
|
+
# Request is executed immediately.
|
156
|
+
# @param [Array[String]] from The from
|
157
|
+
# @param [Array[String]] to The to
|
158
|
+
# @param [Array[String]] from_carrier The from_carrier
|
159
|
+
# @param [Array[String]] to_carrier The to_carrier
|
160
|
+
# @param [Array[String]] from_country_code The from_country_code
|
161
|
+
# @param [Array[String]] to_country_code The to_country_code
|
162
|
+
# @param [Boolean] branded The branded
|
163
|
+
# @param [Boolean] verified_caller The verified_caller
|
164
|
+
# @param [Boolean] has_tag The has_tag
|
165
|
+
# @param [String] start_time The start_time
|
166
|
+
# @param [String] end_time The end_time
|
167
|
+
# @param [Array[call_summaries.CallType]] call_type The call_type
|
168
|
+
# @param [Array[call_summaries.CallState]] call_state The call_state
|
169
|
+
# @param [Array[call_summaries.CallDirection]] direction The direction
|
170
|
+
# @param [call_summaries.ProcessingStateRequest] processing_state The
|
171
|
+
# processing_state
|
172
|
+
# @param [call_summaries.SortBy] sort_by The sort_by
|
173
|
+
# @param [String] subaccount The subaccount
|
174
|
+
# @param [Boolean] abnormal_session The abnormal_session
|
175
|
+
# @param [String] page_token PageToken provided by the API
|
176
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
177
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
178
|
+
# @return [Page] Page of CallSummariesInstance
|
179
|
+
def page(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
180
|
+
params = Twilio::Values.of({
|
181
|
+
'From' => Twilio.serialize_list(from) { |e| e },
|
182
|
+
'To' => Twilio.serialize_list(to) { |e| e },
|
183
|
+
'FromCarrier' => Twilio.serialize_list(from_carrier) { |e| e },
|
184
|
+
'ToCarrier' => Twilio.serialize_list(to_carrier) { |e| e },
|
185
|
+
'FromCountryCode' => Twilio.serialize_list(from_country_code) { |e| e },
|
186
|
+
'ToCountryCode' => Twilio.serialize_list(to_country_code) { |e| e },
|
187
|
+
'Branded' => branded,
|
188
|
+
'VerifiedCaller' => verified_caller,
|
189
|
+
'HasTag' => has_tag,
|
190
|
+
'StartTime' => start_time,
|
191
|
+
'EndTime' => end_time,
|
192
|
+
'CallType' => Twilio.serialize_list(call_type) { |e| e },
|
193
|
+
'CallState' => Twilio.serialize_list(call_state) { |e| e },
|
194
|
+
'Direction' => Twilio.serialize_list(direction) { |e| e },
|
195
|
+
'ProcessingState' => processing_state,
|
196
|
+
'SortBy' => sort_by,
|
197
|
+
'Subaccount' => subaccount,
|
198
|
+
'AbnormalSession' => abnormal_session,
|
199
|
+
'PageToken' => page_token,
|
200
|
+
'Page' => page_number,
|
201
|
+
'PageSize' => page_size,
|
202
|
+
})
|
203
|
+
|
204
|
+
response = @version.page('GET', @uri, params: params)
|
205
|
+
|
206
|
+
CallSummariesPage.new(@version, response, @solution)
|
207
|
+
end
|
208
|
+
|
209
|
+
##
|
210
|
+
# Retrieve a single page of CallSummariesInstance records from the API.
|
211
|
+
# Request is executed immediately.
|
212
|
+
# @param [String] target_url API-generated URL for the requested results page
|
213
|
+
# @return [Page] Page of CallSummariesInstance
|
214
|
+
def get_page(target_url)
|
215
|
+
response = @version.domain.request(
|
216
|
+
'GET',
|
217
|
+
target_url
|
218
|
+
)
|
219
|
+
CallSummariesPage.new(@version, response, @solution)
|
220
|
+
end
|
221
|
+
|
222
|
+
##
|
223
|
+
# Provide a user friendly representation
|
224
|
+
def to_s
|
225
|
+
'#<Twilio.Insights.V1.CallSummariesList>'
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
class CallSummariesPage < Page
|
230
|
+
##
|
231
|
+
# Initialize the CallSummariesPage
|
232
|
+
# @param [Version] version Version that contains the resource
|
233
|
+
# @param [Response] response Response from the API
|
234
|
+
# @param [Hash] solution Path solution for the resource
|
235
|
+
# @return [CallSummariesPage] CallSummariesPage
|
236
|
+
def initialize(version, response, solution)
|
237
|
+
super(version, response)
|
238
|
+
|
239
|
+
# Path Solution
|
240
|
+
@solution = solution
|
241
|
+
end
|
242
|
+
|
243
|
+
##
|
244
|
+
# Build an instance of CallSummariesInstance
|
245
|
+
# @param [Hash] payload Payload response from the API
|
246
|
+
# @return [CallSummariesInstance] CallSummariesInstance
|
247
|
+
def get_instance(payload)
|
248
|
+
CallSummariesInstance.new(@version, payload, )
|
249
|
+
end
|
250
|
+
|
251
|
+
##
|
252
|
+
# Provide a user friendly representation
|
253
|
+
def to_s
|
254
|
+
'<Twilio.Insights.V1.CallSummariesPage>'
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
class CallSummariesInstance < InstanceResource
|
259
|
+
##
|
260
|
+
# Initialize the CallSummariesInstance
|
261
|
+
# @param [Version] version Version that contains the resource
|
262
|
+
# @param [Hash] payload payload that contains response from Twilio
|
263
|
+
# @return [CallSummariesInstance] CallSummariesInstance
|
264
|
+
def initialize(version, payload)
|
265
|
+
super(version)
|
266
|
+
|
267
|
+
# Marshaled Properties
|
268
|
+
@properties = {
|
269
|
+
'account_sid' => payload['account_sid'],
|
270
|
+
'call_sid' => payload['call_sid'],
|
271
|
+
'call_type' => payload['call_type'],
|
272
|
+
'call_state' => payload['call_state'],
|
273
|
+
'processing_state' => payload['processing_state'],
|
274
|
+
'created_time' => Twilio.deserialize_iso8601_datetime(payload['created_time']),
|
275
|
+
'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
|
276
|
+
'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']),
|
277
|
+
'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
|
278
|
+
'connect_duration' => payload['connect_duration'] == nil ? payload['connect_duration'] : payload['connect_duration'].to_i,
|
279
|
+
'from' => payload['from'],
|
280
|
+
'to' => payload['to'],
|
281
|
+
'carrier_edge' => payload['carrier_edge'],
|
282
|
+
'client_edge' => payload['client_edge'],
|
283
|
+
'sdk_edge' => payload['sdk_edge'],
|
284
|
+
'sip_edge' => payload['sip_edge'],
|
285
|
+
'tags' => payload['tags'],
|
286
|
+
'url' => payload['url'],
|
287
|
+
'attributes' => payload['attributes'],
|
288
|
+
'properties' => payload['properties'],
|
289
|
+
'trust' => payload['trust'],
|
290
|
+
}
|
291
|
+
end
|
292
|
+
|
293
|
+
##
|
294
|
+
# @return [String] The account_sid
|
295
|
+
def account_sid
|
296
|
+
@properties['account_sid']
|
297
|
+
end
|
298
|
+
|
299
|
+
##
|
300
|
+
# @return [String] The call_sid
|
301
|
+
def call_sid
|
302
|
+
@properties['call_sid']
|
303
|
+
end
|
304
|
+
|
305
|
+
##
|
306
|
+
# @return [call_summaries.CallType] The call_type
|
307
|
+
def call_type
|
308
|
+
@properties['call_type']
|
309
|
+
end
|
310
|
+
|
311
|
+
##
|
312
|
+
# @return [call_summaries.CallState] The call_state
|
313
|
+
def call_state
|
314
|
+
@properties['call_state']
|
315
|
+
end
|
316
|
+
|
317
|
+
##
|
318
|
+
# @return [call_summaries.ProcessingState] The processing_state
|
319
|
+
def processing_state
|
320
|
+
@properties['processing_state']
|
321
|
+
end
|
322
|
+
|
323
|
+
##
|
324
|
+
# @return [Time] The created_time
|
325
|
+
def created_time
|
326
|
+
@properties['created_time']
|
327
|
+
end
|
328
|
+
|
329
|
+
##
|
330
|
+
# @return [Time] The start_time
|
331
|
+
def start_time
|
332
|
+
@properties['start_time']
|
333
|
+
end
|
334
|
+
|
335
|
+
##
|
336
|
+
# @return [Time] The end_time
|
337
|
+
def end_time
|
338
|
+
@properties['end_time']
|
339
|
+
end
|
340
|
+
|
341
|
+
##
|
342
|
+
# @return [String] The duration
|
343
|
+
def duration
|
344
|
+
@properties['duration']
|
345
|
+
end
|
346
|
+
|
347
|
+
##
|
348
|
+
# @return [String] The connect_duration
|
349
|
+
def connect_duration
|
350
|
+
@properties['connect_duration']
|
351
|
+
end
|
352
|
+
|
353
|
+
##
|
354
|
+
# @return [Hash] The from
|
355
|
+
def from
|
356
|
+
@properties['from']
|
357
|
+
end
|
358
|
+
|
359
|
+
##
|
360
|
+
# @return [Hash] The to
|
361
|
+
def to
|
362
|
+
@properties['to']
|
363
|
+
end
|
364
|
+
|
365
|
+
##
|
366
|
+
# @return [Hash] The carrier_edge
|
367
|
+
def carrier_edge
|
368
|
+
@properties['carrier_edge']
|
369
|
+
end
|
370
|
+
|
371
|
+
##
|
372
|
+
# @return [Hash] The client_edge
|
373
|
+
def client_edge
|
374
|
+
@properties['client_edge']
|
375
|
+
end
|
376
|
+
|
377
|
+
##
|
378
|
+
# @return [Hash] The sdk_edge
|
379
|
+
def sdk_edge
|
380
|
+
@properties['sdk_edge']
|
381
|
+
end
|
382
|
+
|
383
|
+
##
|
384
|
+
# @return [Hash] The sip_edge
|
385
|
+
def sip_edge
|
386
|
+
@properties['sip_edge']
|
387
|
+
end
|
388
|
+
|
389
|
+
##
|
390
|
+
# @return [Array[String]] The tags
|
391
|
+
def tags
|
392
|
+
@properties['tags']
|
393
|
+
end
|
394
|
+
|
395
|
+
##
|
396
|
+
# @return [String] The url
|
397
|
+
def url
|
398
|
+
@properties['url']
|
399
|
+
end
|
400
|
+
|
401
|
+
##
|
402
|
+
# @return [Hash] The attributes
|
403
|
+
def attributes
|
404
|
+
@properties['attributes']
|
405
|
+
end
|
406
|
+
|
407
|
+
##
|
408
|
+
# @return [Hash] The properties
|
409
|
+
def properties
|
410
|
+
@properties['properties']
|
411
|
+
end
|
412
|
+
|
413
|
+
##
|
414
|
+
# @return [Hash] The trust
|
415
|
+
def trust
|
416
|
+
@properties['trust']
|
417
|
+
end
|
418
|
+
|
419
|
+
##
|
420
|
+
# Provide a user friendly representation
|
421
|
+
def to_s
|
422
|
+
"<Twilio.Insights.V1.CallSummariesInstance>"
|
423
|
+
end
|
424
|
+
|
425
|
+
##
|
426
|
+
# Provide a detailed, user friendly representation
|
427
|
+
def inspect
|
428
|
+
"<Twilio.Insights.V1.CallSummariesInstance>"
|
429
|
+
end
|
430
|
+
end
|
431
|
+
end
|
432
|
+
end
|
433
|
+
end
|
434
|
+
end
|
@@ -16,6 +16,7 @@ module Twilio
|
|
16
16
|
super
|
17
17
|
@version = 'v1'
|
18
18
|
@calls = nil
|
19
|
+
@call_summaries = nil
|
19
20
|
@rooms = nil
|
20
21
|
end
|
21
22
|
|
@@ -34,6 +35,12 @@ module Twilio
|
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
38
|
+
##
|
39
|
+
# @return [Twilio::REST::Insights::V1::CallSummariesContext]
|
40
|
+
def call_summaries
|
41
|
+
@call_summaries ||= CallSummariesList.new self
|
42
|
+
end
|
43
|
+
|
37
44
|
##
|
38
45
|
# @param [String] room_sid The SID of the Room resource.
|
39
46
|
# @return [Twilio::REST::Insights::V1::RoomContext] if room_sid was passed.
|
@@ -36,6 +36,12 @@ module Twilio
|
|
36
36
|
self.v1.calls(sid)
|
37
37
|
end
|
38
38
|
|
39
|
+
##
|
40
|
+
# @return [Twilio::REST::Insights::V1::CallSummariesInstance]
|
41
|
+
def call_summaries
|
42
|
+
self.v1.call_summaries()
|
43
|
+
end
|
44
|
+
|
39
45
|
##
|
40
46
|
# @param [String] room_sid Unique identifier for the room.
|
41
47
|
# @return [Twilio::REST::Insights::V1::RoomInstance] if room_sid was passed.
|
@@ -109,11 +109,22 @@ module Twilio
|
|
109
109
|
# Create the BrandRegistrationInstance
|
110
110
|
# @param [String] customer_profile_bundle_sid Customer Profile Bundle Sid.
|
111
111
|
# @param [String] a2p_profile_bundle_sid A2P Messaging Profile Bundle Sid.
|
112
|
+
# @param [String] brand_type Type of brand being created. One of: "STANDARD",
|
113
|
+
# "STARTER". STARTER is for low volume, starter use cases. STANDARD is for all
|
114
|
+
# other use cases.
|
115
|
+
# @param [Boolean] mock A boolean that specifies whether brand should be a mock or
|
116
|
+
# not. If true, brand will be registered as a mock brand. Defaults to false if no
|
117
|
+
# value is provided.
|
118
|
+
# @param [Boolean] skip_automatic_sec_vet A flag to disable automatic secondary
|
119
|
+
# vetting for brands which it would otherwise be done.
|
112
120
|
# @return [BrandRegistrationInstance] Created BrandRegistrationInstance
|
113
|
-
def create(customer_profile_bundle_sid: nil, a2p_profile_bundle_sid: nil)
|
121
|
+
def create(customer_profile_bundle_sid: nil, a2p_profile_bundle_sid: nil, brand_type: :unset, mock: :unset, skip_automatic_sec_vet: :unset)
|
114
122
|
data = Twilio::Values.of({
|
115
123
|
'CustomerProfileBundleSid' => customer_profile_bundle_sid,
|
116
124
|
'A2PProfileBundleSid' => a2p_profile_bundle_sid,
|
125
|
+
'BrandType' => brand_type,
|
126
|
+
'Mock' => mock,
|
127
|
+
'SkipAutomaticSecVet' => skip_automatic_sec_vet,
|
117
128
|
})
|
118
129
|
|
119
130
|
payload = @version.create('POST', @uri, data: data)
|
@@ -219,11 +230,17 @@ module Twilio
|
|
219
230
|
'a2p_profile_bundle_sid' => payload['a2p_profile_bundle_sid'],
|
220
231
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
221
232
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
233
|
+
'brand_type' => payload['brand_type'],
|
222
234
|
'status' => payload['status'],
|
223
235
|
'tcr_id' => payload['tcr_id'],
|
224
236
|
'failure_reason' => payload['failure_reason'],
|
225
237
|
'url' => payload['url'],
|
226
238
|
'brand_score' => payload['brand_score'] == nil ? payload['brand_score'] : payload['brand_score'].to_i,
|
239
|
+
'identity_status' => payload['identity_status'],
|
240
|
+
'russell_3000' => payload['russell_3000'],
|
241
|
+
'tax_exempt_status' => payload['tax_exempt_status'],
|
242
|
+
'skip_automatic_sec_vet' => payload['skip_automatic_sec_vet'],
|
243
|
+
'mock' => payload['mock'],
|
227
244
|
}
|
228
245
|
|
229
246
|
# Context
|
@@ -278,6 +295,12 @@ module Twilio
|
|
278
295
|
@properties['date_updated']
|
279
296
|
end
|
280
297
|
|
298
|
+
##
|
299
|
+
# @return [String] Type of brand. One of: "STANDARD", "STARTER".
|
300
|
+
def brand_type
|
301
|
+
@properties['brand_type']
|
302
|
+
end
|
303
|
+
|
281
304
|
##
|
282
305
|
# @return [brand_registration.Status] Brand Registration status
|
283
306
|
def status
|
@@ -308,6 +331,36 @@ module Twilio
|
|
308
331
|
@properties['brand_score']
|
309
332
|
end
|
310
333
|
|
334
|
+
##
|
335
|
+
# @return [brand_registration.IdentityStatus] Identity Status
|
336
|
+
def identity_status
|
337
|
+
@properties['identity_status']
|
338
|
+
end
|
339
|
+
|
340
|
+
##
|
341
|
+
# @return [Boolean] Russell 3000
|
342
|
+
def russell_3000
|
343
|
+
@properties['russell_3000']
|
344
|
+
end
|
345
|
+
|
346
|
+
##
|
347
|
+
# @return [String] Tax Exempt Status
|
348
|
+
def tax_exempt_status
|
349
|
+
@properties['tax_exempt_status']
|
350
|
+
end
|
351
|
+
|
352
|
+
##
|
353
|
+
# @return [Boolean] Skip Automatic Secondary Vetting
|
354
|
+
def skip_automatic_sec_vet
|
355
|
+
@properties['skip_automatic_sec_vet']
|
356
|
+
end
|
357
|
+
|
358
|
+
##
|
359
|
+
# @return [Boolean] A boolean that specifies whether brand should be a mock or not. If true, brand will be registered as a mock brand. Defaults to false if no value is provided.
|
360
|
+
def mock
|
361
|
+
@properties['mock']
|
362
|
+
end
|
363
|
+
|
311
364
|
##
|
312
365
|
# Fetch the BrandRegistrationInstance
|
313
366
|
# @return [BrandRegistrationInstance] Fetched BrandRegistrationInstance
|
@@ -33,8 +33,8 @@ module Twilio
|
|
33
33
|
# Create the UsAppToPersonInstance
|
34
34
|
# @param [String] brand_registration_sid A2P Brand Registration SID
|
35
35
|
# @param [String] description A short description of what this SMS campaign does.
|
36
|
-
# @param [Array[String]] message_samples Message samples, up to 5
|
37
|
-
# <=1024 chars each.
|
36
|
+
# @param [Array[String]] message_samples Message samples, at least 2 and up to 5
|
37
|
+
# sample messages, <=1024 chars each.
|
38
38
|
# @param [String] us_app_to_person_usecase A2P Campaign Use Case. Examples: [ 2FA,
|
39
39
|
# EMERGENCY, MARKETING..]
|
40
40
|
# @param [Boolean] has_embedded_links Indicates that this SMS campaign will send
|
@@ -273,6 +273,7 @@ module Twilio
|
|
273
273
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
274
274
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
275
275
|
'url' => payload['url'],
|
276
|
+
'mock' => payload['mock'],
|
276
277
|
}
|
277
278
|
|
278
279
|
# Context
|
@@ -391,6 +392,12 @@ module Twilio
|
|
391
392
|
@properties['url']
|
392
393
|
end
|
393
394
|
|
395
|
+
##
|
396
|
+
# @return [Boolean] A boolean that specifies whether campaign is a mock or not.
|
397
|
+
def mock
|
398
|
+
@properties['mock']
|
399
|
+
end
|
400
|
+
|
394
401
|
##
|
395
402
|
# Delete the UsAppToPersonInstance
|
396
403
|
# @return [Boolean] true if delete succeeds, false otherwise
|
@@ -30,9 +30,13 @@ module Twilio
|
|
30
30
|
|
31
31
|
##
|
32
32
|
# Fetch the UsAppToPersonUsecaseInstance
|
33
|
+
# @param [String] brand_registration_sid The unique string to identify the A2P
|
34
|
+
# brand.
|
33
35
|
# @return [UsAppToPersonUsecaseInstance] Fetched UsAppToPersonUsecaseInstance
|
34
|
-
def fetch
|
35
|
-
|
36
|
+
def fetch(brand_registration_sid: :unset)
|
37
|
+
params = Twilio::Values.of({'BrandRegistrationSid' => brand_registration_sid, })
|
38
|
+
|
39
|
+
payload = @version.fetch('GET', @uri, params: params)
|
36
40
|
|
37
41
|
UsAppToPersonUsecaseInstance.new(
|
38
42
|
@version,
|
@@ -34,12 +34,14 @@ module Twilio
|
|
34
34
|
# status changes.
|
35
35
|
# @param [String] regulation_sid The unique string of a regulation that is
|
36
36
|
# associated to the Bundle resource.
|
37
|
-
# @param [String] iso_country The ISO country
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
37
|
+
# @param [String] iso_country The {ISO country
|
38
|
+
# code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] of the Bundle's phone
|
39
|
+
# number country ownership request.
|
40
|
+
# @param [bundle.EndUserType] end_user_type The {type of End
|
41
|
+
# User}[https://www.twilio.com/docs/phone-numbers/regulatory/api/end-user-types]
|
42
|
+
# of the Bundle resource.
|
41
43
|
# @param [String] number_type The type of phone number of the Bundle's ownership
|
42
|
-
# request.
|
44
|
+
# request. Can be `local`, `mobile`, `national`, or `toll free`.
|
43
45
|
# @return [BundleInstance] Created BundleInstance
|
44
46
|
def create(friendly_name: nil, email: nil, status_callback: :unset, regulation_sid: :unset, iso_country: :unset, end_user_type: :unset, number_type: :unset)
|
45
47
|
data = Twilio::Values.of({
|
@@ -66,10 +68,11 @@ module Twilio
|
|
66
68
|
# resource.
|
67
69
|
# @param [String] regulation_sid The unique string of a regulation that is
|
68
70
|
# associated to the Bundle resource.
|
69
|
-
# @param [String] iso_country The ISO country
|
70
|
-
#
|
71
|
+
# @param [String] iso_country The {ISO country
|
72
|
+
# code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] of the Bundle's phone
|
73
|
+
# number country ownership request.
|
71
74
|
# @param [String] number_type The type of phone number of the Bundle's ownership
|
72
|
-
# request.
|
75
|
+
# request. Can be `local`, `mobile`, `national`, or `toll free`.
|
73
76
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
74
77
|
# guarantees to never return more than limit. Default is no limit
|
75
78
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -98,10 +101,11 @@ module Twilio
|
|
98
101
|
# resource.
|
99
102
|
# @param [String] regulation_sid The unique string of a regulation that is
|
100
103
|
# associated to the Bundle resource.
|
101
|
-
# @param [String] iso_country The ISO country
|
102
|
-
#
|
104
|
+
# @param [String] iso_country The {ISO country
|
105
|
+
# code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] of the Bundle's phone
|
106
|
+
# number country ownership request.
|
103
107
|
# @param [String] number_type The type of phone number of the Bundle's ownership
|
104
|
-
# request.
|
108
|
+
# request. Can be `local`, `mobile`, `national`, or `toll free`.
|
105
109
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
106
110
|
# guarantees to never return more than limit. Default is no limit.
|
107
111
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -146,10 +150,11 @@ module Twilio
|
|
146
150
|
# resource.
|
147
151
|
# @param [String] regulation_sid The unique string of a regulation that is
|
148
152
|
# associated to the Bundle resource.
|
149
|
-
# @param [String] iso_country The ISO country
|
150
|
-
#
|
153
|
+
# @param [String] iso_country The {ISO country
|
154
|
+
# code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] of the Bundle's phone
|
155
|
+
# number country ownership request.
|
151
156
|
# @param [String] number_type The type of phone number of the Bundle's ownership
|
152
|
-
# request.
|
157
|
+
# request. Can be `local`, `mobile`, `national`, or `toll free`.
|
153
158
|
# @param [String] page_token PageToken provided by the API
|
154
159
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
155
160
|
# @param [Integer] page_size Number of records to return, defaults to 50
|