twilio-ruby 5.58.3 → 5.61.1

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.
Files changed (51) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/deploy.yml +65 -0
  3. data/.github/workflows/test.yml +51 -0
  4. data/.gitignore +3 -1
  5. data/CHANGES.md +99 -0
  6. data/Makefile +3 -4
  7. data/README.md +4 -4
  8. data/lib/twilio-ruby/jwt/access_token.rb +13 -0
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +667 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +30 -4
  11. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +11 -4
  12. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +11 -4
  13. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +11 -4
  14. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +17 -10
  15. data/lib/twilio-ruby/rest/client.rb +7 -0
  16. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
  17. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
  18. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +31 -6
  19. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +36 -36
  20. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +384 -0
  21. data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +221 -0
  22. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +390 -0
  23. data/lib/twilio-ruby/rest/media/v1.rb +60 -0
  24. data/lib/twilio-ruby/rest/media.rb +56 -0
  25. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +353 -0
  26. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +43 -1
  27. data/lib/twilio-ruby/rest/messaging/v1/service.rb +29 -3
  28. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +188 -0
  29. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +188 -0
  30. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +40 -0
  31. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
  32. data/lib/twilio-ruby/rest/serverless/v1/service.rb +7 -0
  33. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -3
  34. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +7 -3
  35. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +23 -11
  36. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +8 -2
  37. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
  38. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +16 -6
  39. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +5 -5
  40. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +16 -6
  41. data/lib/twilio-ruby/rest/verify/v2/service.rb +22 -3
  42. data/lib/twilio-ruby/rest/verify/v2/{verification_template.rb → template.rb} +25 -25
  43. data/lib/twilio-ruby/rest/verify/v2.rb +4 -4
  44. data/lib/twilio-ruby/rest/verify.rb +3 -3
  45. data/lib/twilio-ruby/rest/video/v1/room.rb +12 -1
  46. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
  47. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +16 -26
  48. data/lib/twilio-ruby/twiml/voice_response.rb +613 -36
  49. data/lib/twilio-ruby/version.rb +1 -1
  50. metadata +16 -5
  51. data/.travis.yml +0 -56
@@ -0,0 +1,353 @@
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 Messaging < Domain
12
+ class V1 < Version
13
+ class BrandRegistrationContext < InstanceContext
14
+ ##
15
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
16
+ class BrandVettingList < ListResource
17
+ ##
18
+ # Initialize the BrandVettingList
19
+ # @param [Version] version Version that contains the resource
20
+ # @param [String] brand_sid The unique string to identify Brand Registration.
21
+ # @return [BrandVettingList] BrandVettingList
22
+ def initialize(version, brand_sid: nil)
23
+ super(version)
24
+
25
+ # Path Solution
26
+ @solution = {brand_sid: brand_sid}
27
+ @uri = "/a2p/BrandRegistrations/#{@solution[:brand_sid]}/Vettings"
28
+ end
29
+
30
+ ##
31
+ # Create the BrandVettingInstance
32
+ # @param [brand_vetting.VettingProvider] vetting_provider The third-party provider
33
+ # of the vettings to create .
34
+ # @param [String] vetting_id The unique ID of the vetting
35
+ # @return [BrandVettingInstance] Created BrandVettingInstance
36
+ def create(vetting_provider: nil, vetting_id: :unset)
37
+ data = Twilio::Values.of({'VettingProvider' => vetting_provider, 'VettingId' => vetting_id, })
38
+
39
+ payload = @version.create('POST', @uri, data: data)
40
+
41
+ BrandVettingInstance.new(@version, payload, brand_sid: @solution[:brand_sid], )
42
+ end
43
+
44
+ ##
45
+ # Lists BrandVettingInstance records from the API as a list.
46
+ # Unlike stream(), this operation is eager and will load `limit` records into
47
+ # memory before returning.
48
+ # @param [brand_vetting.VettingProvider] vetting_provider The third-party provider
49
+ # of the vettings to read
50
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
51
+ # guarantees to never return more than limit. Default is no limit
52
+ # @param [Integer] page_size Number of records to fetch per request, when
53
+ # not set will use the default value of 50 records. If no page_size is defined
54
+ # but a limit is defined, stream() will attempt to read the limit with the most
55
+ # efficient page size, i.e. min(limit, 1000)
56
+ # @return [Array] Array of up to limit results
57
+ def list(vetting_provider: :unset, limit: nil, page_size: nil)
58
+ self.stream(vetting_provider: vetting_provider, limit: limit, page_size: page_size).entries
59
+ end
60
+
61
+ ##
62
+ # Streams BrandVettingInstance records from the API as an Enumerable.
63
+ # This operation lazily loads records as efficiently as possible until the limit
64
+ # is reached.
65
+ # @param [brand_vetting.VettingProvider] vetting_provider The third-party provider
66
+ # of the vettings to read
67
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
68
+ # guarantees to never return more than limit. Default is no limit.
69
+ # @param [Integer] page_size Number of records to fetch per request, when
70
+ # not set will use the default value of 50 records. If no page_size is defined
71
+ # but a limit is defined, stream() will attempt to read the limit with the most
72
+ # efficient page size, i.e. min(limit, 1000)
73
+ # @return [Enumerable] Enumerable that will yield up to limit results
74
+ def stream(vetting_provider: :unset, limit: nil, page_size: nil)
75
+ limits = @version.read_limits(limit, page_size)
76
+
77
+ page = self.page(vetting_provider: vetting_provider, page_size: limits[:page_size], )
78
+
79
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
80
+ end
81
+
82
+ ##
83
+ # When passed a block, yields BrandVettingInstance records from the API.
84
+ # This operation lazily loads records as efficiently as possible until the limit
85
+ # is reached.
86
+ def each
87
+ limits = @version.read_limits
88
+
89
+ page = self.page(page_size: limits[:page_size], )
90
+
91
+ @version.stream(page,
92
+ limit: limits[:limit],
93
+ page_limit: limits[:page_limit]).each {|x| yield x}
94
+ end
95
+
96
+ ##
97
+ # Retrieve a single page of BrandVettingInstance records from the API.
98
+ # Request is executed immediately.
99
+ # @param [brand_vetting.VettingProvider] vetting_provider The third-party provider
100
+ # of the vettings to read
101
+ # @param [String] page_token PageToken provided by the API
102
+ # @param [Integer] page_number Page Number, this value is simply for client state
103
+ # @param [Integer] page_size Number of records to return, defaults to 50
104
+ # @return [Page] Page of BrandVettingInstance
105
+ def page(vetting_provider: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
106
+ params = Twilio::Values.of({
107
+ 'VettingProvider' => vetting_provider,
108
+ 'PageToken' => page_token,
109
+ 'Page' => page_number,
110
+ 'PageSize' => page_size,
111
+ })
112
+
113
+ response = @version.page('GET', @uri, params: params)
114
+
115
+ BrandVettingPage.new(@version, response, @solution)
116
+ end
117
+
118
+ ##
119
+ # Retrieve a single page of BrandVettingInstance records from the API.
120
+ # Request is executed immediately.
121
+ # @param [String] target_url API-generated URL for the requested results page
122
+ # @return [Page] Page of BrandVettingInstance
123
+ def get_page(target_url)
124
+ response = @version.domain.request(
125
+ 'GET',
126
+ target_url
127
+ )
128
+ BrandVettingPage.new(@version, response, @solution)
129
+ end
130
+
131
+ ##
132
+ # Provide a user friendly representation
133
+ def to_s
134
+ '#<Twilio.Messaging.V1.BrandVettingList>'
135
+ end
136
+ end
137
+
138
+ ##
139
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
140
+ class BrandVettingPage < Page
141
+ ##
142
+ # Initialize the BrandVettingPage
143
+ # @param [Version] version Version that contains the resource
144
+ # @param [Response] response Response from the API
145
+ # @param [Hash] solution Path solution for the resource
146
+ # @return [BrandVettingPage] BrandVettingPage
147
+ def initialize(version, response, solution)
148
+ super(version, response)
149
+
150
+ # Path Solution
151
+ @solution = solution
152
+ end
153
+
154
+ ##
155
+ # Build an instance of BrandVettingInstance
156
+ # @param [Hash] payload Payload response from the API
157
+ # @return [BrandVettingInstance] BrandVettingInstance
158
+ def get_instance(payload)
159
+ BrandVettingInstance.new(@version, payload, brand_sid: @solution[:brand_sid], )
160
+ end
161
+
162
+ ##
163
+ # Provide a user friendly representation
164
+ def to_s
165
+ '<Twilio.Messaging.V1.BrandVettingPage>'
166
+ end
167
+ end
168
+
169
+ ##
170
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
171
+ class BrandVettingContext < InstanceContext
172
+ ##
173
+ # Initialize the BrandVettingContext
174
+ # @param [Version] version Version that contains the resource
175
+ # @param [String] brand_sid The SID of the Brand Registration resource of the
176
+ # vettings to read .
177
+ # @param [String] brand_vetting_sid The Twilio SID of the third-party vetting
178
+ # record.
179
+ # @return [BrandVettingContext] BrandVettingContext
180
+ def initialize(version, brand_sid, brand_vetting_sid)
181
+ super(version)
182
+
183
+ # Path Solution
184
+ @solution = {brand_sid: brand_sid, brand_vetting_sid: brand_vetting_sid, }
185
+ @uri = "/a2p/BrandRegistrations/#{@solution[:brand_sid]}/Vettings/#{@solution[:brand_vetting_sid]}"
186
+ end
187
+
188
+ ##
189
+ # Fetch the BrandVettingInstance
190
+ # @return [BrandVettingInstance] Fetched BrandVettingInstance
191
+ def fetch
192
+ payload = @version.fetch('GET', @uri)
193
+
194
+ BrandVettingInstance.new(
195
+ @version,
196
+ payload,
197
+ brand_sid: @solution[:brand_sid],
198
+ brand_vetting_sid: @solution[:brand_vetting_sid],
199
+ )
200
+ end
201
+
202
+ ##
203
+ # Provide a user friendly representation
204
+ def to_s
205
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
206
+ "#<Twilio.Messaging.V1.BrandVettingContext #{context}>"
207
+ end
208
+
209
+ ##
210
+ # Provide a detailed, user friendly representation
211
+ def inspect
212
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
213
+ "#<Twilio.Messaging.V1.BrandVettingContext #{context}>"
214
+ end
215
+ end
216
+
217
+ ##
218
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
219
+ class BrandVettingInstance < InstanceResource
220
+ ##
221
+ # Initialize the BrandVettingInstance
222
+ # @param [Version] version Version that contains the resource
223
+ # @param [Hash] payload payload that contains response from Twilio
224
+ # @param [String] brand_sid The unique string to identify Brand Registration.
225
+ # @param [String] brand_vetting_sid The Twilio SID of the third-party vetting
226
+ # record.
227
+ # @return [BrandVettingInstance] BrandVettingInstance
228
+ def initialize(version, payload, brand_sid: nil, brand_vetting_sid: nil)
229
+ super(version)
230
+
231
+ # Marshaled Properties
232
+ @properties = {
233
+ 'account_sid' => payload['account_sid'],
234
+ 'brand_sid' => payload['brand_sid'],
235
+ 'brand_vetting_sid' => payload['brand_vetting_sid'],
236
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
237
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
238
+ 'vetting_id' => payload['vetting_id'],
239
+ 'vetting_class' => payload['vetting_class'],
240
+ 'vetting_status' => payload['vetting_status'],
241
+ 'vetting_provider' => payload['vetting_provider'],
242
+ 'url' => payload['url'],
243
+ }
244
+
245
+ # Context
246
+ @instance_context = nil
247
+ @params = {
248
+ 'brand_sid' => brand_sid,
249
+ 'brand_vetting_sid' => brand_vetting_sid || @properties['brand_vetting_sid'],
250
+ }
251
+ end
252
+
253
+ ##
254
+ # Generate an instance context for the instance, the context is capable of
255
+ # performing various actions. All instance actions are proxied to the context
256
+ # @return [BrandVettingContext] BrandVettingContext for this BrandVettingInstance
257
+ def context
258
+ unless @instance_context
259
+ @instance_context = BrandVettingContext.new(
260
+ @version,
261
+ @params['brand_sid'],
262
+ @params['brand_vetting_sid'],
263
+ )
264
+ end
265
+ @instance_context
266
+ end
267
+
268
+ ##
269
+ # @return [String] The SID of the Account that created the vetting
270
+ def account_sid
271
+ @properties['account_sid']
272
+ end
273
+
274
+ ##
275
+ # @return [String] A2P BrandRegistration Sid
276
+ def brand_sid
277
+ @properties['brand_sid']
278
+ end
279
+
280
+ ##
281
+ # @return [String] SID for third-party vetting record
282
+ def brand_vetting_sid
283
+ @properties['brand_vetting_sid']
284
+ end
285
+
286
+ ##
287
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
288
+ def date_updated
289
+ @properties['date_updated']
290
+ end
291
+
292
+ ##
293
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was created
294
+ def date_created
295
+ @properties['date_created']
296
+ end
297
+
298
+ ##
299
+ # @return [String] The unique ID of the vetting
300
+ def vetting_id
301
+ @properties['vetting_id']
302
+ end
303
+
304
+ ##
305
+ # @return [String] The type of vetting
306
+ def vetting_class
307
+ @properties['vetting_class']
308
+ end
309
+
310
+ ##
311
+ # @return [String] Status of vetting attempt
312
+ def vetting_status
313
+ @properties['vetting_status']
314
+ end
315
+
316
+ ##
317
+ # @return [brand_vetting.VettingProvider] Third-party provider that has conducted the vetting
318
+ def vetting_provider
319
+ @properties['vetting_provider']
320
+ end
321
+
322
+ ##
323
+ # @return [String] The absolute URL of the Brand Vetting
324
+ def url
325
+ @properties['url']
326
+ end
327
+
328
+ ##
329
+ # Fetch the BrandVettingInstance
330
+ # @return [BrandVettingInstance] Fetched BrandVettingInstance
331
+ def fetch
332
+ context.fetch
333
+ end
334
+
335
+ ##
336
+ # Provide a user friendly representation
337
+ def to_s
338
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
339
+ "<Twilio.Messaging.V1.BrandVettingInstance #{values}>"
340
+ end
341
+
342
+ ##
343
+ # Provide a detailed, user friendly representation
344
+ def inspect
345
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
346
+ "<Twilio.Messaging.V1.BrandVettingInstance #{values}>"
347
+ end
348
+ end
349
+ end
350
+ end
351
+ end
352
+ end
353
+ end
@@ -184,6 +184,9 @@ module Twilio
184
184
  # Path Solution
185
185
  @solution = {sid: sid, }
186
186
  @uri = "/a2p/BrandRegistrations/#{@solution[:sid]}"
187
+
188
+ # Dependents
189
+ @brand_vettings = nil
187
190
  end
188
191
 
189
192
  ##
@@ -195,6 +198,24 @@ module Twilio
195
198
  BrandRegistrationInstance.new(@version, payload, sid: @solution[:sid], )
196
199
  end
197
200
 
201
+ ##
202
+ # Access the brand_vettings
203
+ # @return [BrandVettingList]
204
+ # @return [BrandVettingContext] if brand_vetting_sid was passed.
205
+ def brand_vettings(brand_vetting_sid=:unset)
206
+ raise ArgumentError, 'brand_vetting_sid cannot be nil' if brand_vetting_sid.nil?
207
+
208
+ if brand_vetting_sid != :unset
209
+ return BrandVettingContext.new(@version, @solution[:sid], brand_vetting_sid, )
210
+ end
211
+
212
+ unless @brand_vettings
213
+ @brand_vettings = BrandVettingList.new(@version, brand_sid: @solution[:sid], )
214
+ end
215
+
216
+ @brand_vettings
217
+ end
218
+
198
219
  ##
199
220
  # Provide a user friendly representation
200
221
  def to_s
@@ -236,11 +257,13 @@ module Twilio
236
257
  'failure_reason' => payload['failure_reason'],
237
258
  'url' => payload['url'],
238
259
  'brand_score' => payload['brand_score'] == nil ? payload['brand_score'] : payload['brand_score'].to_i,
260
+ 'brand_feedback' => payload['brand_feedback'],
239
261
  'identity_status' => payload['identity_status'],
240
262
  'russell_3000' => payload['russell_3000'],
241
263
  'tax_exempt_status' => payload['tax_exempt_status'],
242
264
  'skip_automatic_sec_vet' => payload['skip_automatic_sec_vet'],
243
265
  'mock' => payload['mock'],
266
+ 'links' => payload['links'],
244
267
  }
245
268
 
246
269
  # Context
@@ -302,7 +325,7 @@ module Twilio
302
325
  end
303
326
 
304
327
  ##
305
- # @return [brand_registration.Status] Brand Registration status
328
+ # @return [brand_registration.Status] Brand Registration status.
306
329
  def status
307
330
  @properties['status']
308
331
  end
@@ -331,6 +354,12 @@ module Twilio
331
354
  @properties['brand_score']
332
355
  end
333
356
 
357
+ ##
358
+ # @return [Array[brand_registration.BrandFeedback]] Brand feedback
359
+ def brand_feedback
360
+ @properties['brand_feedback']
361
+ end
362
+
334
363
  ##
335
364
  # @return [brand_registration.IdentityStatus] Identity Status
336
365
  def identity_status
@@ -361,6 +390,12 @@ module Twilio
361
390
  @properties['mock']
362
391
  end
363
392
 
393
+ ##
394
+ # @return [String] The links
395
+ def links
396
+ @properties['links']
397
+ end
398
+
364
399
  ##
365
400
  # Fetch the BrandRegistrationInstance
366
401
  # @return [BrandRegistrationInstance] Fetched BrandRegistrationInstance
@@ -368,6 +403,13 @@ module Twilio
368
403
  context.fetch
369
404
  end
370
405
 
406
+ ##
407
+ # Access the brand_vettings
408
+ # @return [brand_vettings] brand_vettings
409
+ def brand_vettings
410
+ context.brand_vettings
411
+ end
412
+
371
413
  ##
372
414
  # Provide a user friendly representation
373
415
  def to_s
@@ -67,6 +67,9 @@ module Twilio
67
67
  # @param [String] validity_period How long, in seconds, messages sent from the
68
68
  # Service are valid. Can be an integer from `1` to `14,400`.
69
69
  # @param [Boolean] synchronous_validation Reserved.
70
+ # @param [String] usecase A string that describes the scenario in which the
71
+ # Messaging Service will be used. Examples: [notification, marketing,
72
+ # verification, poll ..].
70
73
  # @param [Boolean] use_inbound_webhook_on_number A boolean value that indicates
71
74
  # either the webhook url configured on the phone number will be used or
72
75
  # `inbound_request_url`/`fallback_url` url will be called when a message is
@@ -74,7 +77,7 @@ module Twilio
74
77
  # defined on the phone number will override the
75
78
  # `inbound_request_url`/`fallback_url` defined for the Messaging Service.
76
79
  # @return [ServiceInstance] Created ServiceInstance
77
- def create(friendly_name: nil, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, use_inbound_webhook_on_number: :unset)
80
+ def create(friendly_name: nil, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, usecase: :unset, use_inbound_webhook_on_number: :unset)
78
81
  data = Twilio::Values.of({
79
82
  'FriendlyName' => friendly_name,
80
83
  'InboundRequestUrl' => inbound_request_url,
@@ -90,6 +93,7 @@ module Twilio
90
93
  'AreaCodeGeomatch' => area_code_geomatch,
91
94
  'ValidityPeriod' => validity_period,
92
95
  'SynchronousValidation' => synchronous_validation,
96
+ 'Usecase' => usecase,
93
97
  'UseInboundWebhookOnNumber' => use_inbound_webhook_on_number,
94
98
  })
95
99
 
@@ -281,6 +285,9 @@ module Twilio
281
285
  # @param [String] validity_period How long, in seconds, messages sent from the
282
286
  # Service are valid. Can be an integer from `1` to `14,400`.
283
287
  # @param [Boolean] synchronous_validation Reserved.
288
+ # @param [String] usecase A string that describes the scenario in which the
289
+ # Messaging Service will be used. Examples: [notification, marketing,
290
+ # verification, poll ..]
284
291
  # @param [Boolean] use_inbound_webhook_on_number A boolean value that indicates
285
292
  # either the webhook url configured on the phone number will be used or
286
293
  # `inbound_request_url`/`fallback_url` url will be called when a message is
@@ -288,7 +295,7 @@ module Twilio
288
295
  # defined on the phone number will override the
289
296
  # `inbound_request_url`/`fallback_url` defined for the Messaging Service.
290
297
  # @return [ServiceInstance] Updated ServiceInstance
291
- def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, use_inbound_webhook_on_number: :unset)
298
+ def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, usecase: :unset, use_inbound_webhook_on_number: :unset)
292
299
  data = Twilio::Values.of({
293
300
  'FriendlyName' => friendly_name,
294
301
  'InboundRequestUrl' => inbound_request_url,
@@ -304,6 +311,7 @@ module Twilio
304
311
  'AreaCodeGeomatch' => area_code_geomatch,
305
312
  'ValidityPeriod' => validity_period,
306
313
  'SynchronousValidation' => synchronous_validation,
314
+ 'Usecase' => usecase,
307
315
  'UseInboundWebhookOnNumber' => use_inbound_webhook_on_number,
308
316
  })
309
317
 
@@ -464,6 +472,8 @@ module Twilio
464
472
  'validity_period' => payload['validity_period'].to_i,
465
473
  'url' => payload['url'],
466
474
  'links' => payload['links'],
475
+ 'usecase' => payload['usecase'],
476
+ 'us_app_to_person_registered' => payload['us_app_to_person_registered'],
467
477
  'use_inbound_webhook_on_number' => payload['use_inbound_webhook_on_number'],
468
478
  }
469
479
 
@@ -603,6 +613,18 @@ module Twilio
603
613
  @properties['links']
604
614
  end
605
615
 
616
+ ##
617
+ # @return [String] A string describing the scenario in which the Messaging Service will be used
618
+ def usecase
619
+ @properties['usecase']
620
+ end
621
+
622
+ ##
623
+ # @return [Boolean] Whether US A2P campaign is registered for this Service.
624
+ def us_app_to_person_registered
625
+ @properties['us_app_to_person_registered']
626
+ end
627
+
606
628
  ##
607
629
  # @return [Boolean] If enabled, the webhook url configured on the phone number will be used and will override the `inbound_request_url`/`fallback_url` url called when an inbound message is received.
608
630
  def use_inbound_webhook_on_number
@@ -651,6 +673,9 @@ module Twilio
651
673
  # @param [String] validity_period How long, in seconds, messages sent from the
652
674
  # Service are valid. Can be an integer from `1` to `14,400`.
653
675
  # @param [Boolean] synchronous_validation Reserved.
676
+ # @param [String] usecase A string that describes the scenario in which the
677
+ # Messaging Service will be used. Examples: [notification, marketing,
678
+ # verification, poll ..]
654
679
  # @param [Boolean] use_inbound_webhook_on_number A boolean value that indicates
655
680
  # either the webhook url configured on the phone number will be used or
656
681
  # `inbound_request_url`/`fallback_url` url will be called when a message is
@@ -658,7 +683,7 @@ module Twilio
658
683
  # defined on the phone number will override the
659
684
  # `inbound_request_url`/`fallback_url` defined for the Messaging Service.
660
685
  # @return [ServiceInstance] Updated ServiceInstance
661
- def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, use_inbound_webhook_on_number: :unset)
686
+ def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, usecase: :unset, use_inbound_webhook_on_number: :unset)
662
687
  context.update(
663
688
  friendly_name: friendly_name,
664
689
  inbound_request_url: inbound_request_url,
@@ -674,6 +699,7 @@ module Twilio
674
699
  area_code_geomatch: area_code_geomatch,
675
700
  validity_period: validity_period,
676
701
  synchronous_validation: synchronous_validation,
702
+ usecase: usecase,
677
703
  use_inbound_webhook_on_number: use_inbound_webhook_on_number,
678
704
  )
679
705
  end