twilio-ruby 5.58.2 → 5.61.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/deploy.yml +63 -0
  3. data/.github/workflows/test.yml +51 -0
  4. data/.gitignore +2 -1
  5. data/.yardoc/checksums +532 -0
  6. data/.yardoc/complete +0 -0
  7. data/.yardoc/object_types +0 -0
  8. data/.yardoc/objects/root.dat +0 -0
  9. data/.yardoc/proxy_types +0 -0
  10. data/CHANGES.md +87 -0
  11. data/Makefile +3 -4
  12. data/README.md +4 -4
  13. data/lib/twilio-ruby/jwt/access_token.rb +13 -0
  14. data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +667 -0
  15. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +27 -1
  16. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +11 -4
  17. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +11 -4
  18. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +11 -4
  19. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +17 -10
  20. data/lib/twilio-ruby/rest/client.rb +7 -0
  21. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
  22. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
  23. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +36 -36
  24. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +384 -0
  25. data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +221 -0
  26. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +390 -0
  27. data/lib/twilio-ruby/rest/media/v1.rb +60 -0
  28. data/lib/twilio-ruby/rest/media.rb +56 -0
  29. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +272 -0
  30. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +69 -2
  31. data/lib/twilio-ruby/rest/messaging/v1/service.rb +29 -3
  32. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +188 -0
  33. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +188 -0
  34. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +59 -14
  35. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
  36. data/lib/twilio-ruby/rest/serverless/v1/service.rb +7 -0
  37. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -3
  38. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +7 -3
  39. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +23 -11
  40. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +8 -2
  41. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
  42. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +4 -4
  43. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +3 -3
  44. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +16 -6
  45. data/lib/twilio-ruby/rest/verify/v2/service.rb +22 -3
  46. data/lib/twilio-ruby/rest/verify/v2/{verification_template.rb → template.rb} +25 -25
  47. data/lib/twilio-ruby/rest/verify/v2.rb +4 -4
  48. data/lib/twilio-ruby/rest/verify.rb +3 -3
  49. data/lib/twilio-ruby/rest/video/v1/room.rb +12 -1
  50. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
  51. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +16 -26
  52. data/lib/twilio-ruby/version.rb +1 -1
  53. metadata +21 -5
  54. data/.travis.yml +0 -56
@@ -0,0 +1,272 @@
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 BrandVettingInstance < InstanceResource
172
+ ##
173
+ # Initialize the BrandVettingInstance
174
+ # @param [Version] version Version that contains the resource
175
+ # @param [Hash] payload payload that contains response from Twilio
176
+ # @param [String] brand_sid The unique string to identify Brand Registration.
177
+ # @return [BrandVettingInstance] BrandVettingInstance
178
+ def initialize(version, payload, brand_sid: nil)
179
+ super(version)
180
+
181
+ # Marshaled Properties
182
+ @properties = {
183
+ 'account_sid' => payload['account_sid'],
184
+ 'brand_sid' => payload['brand_sid'],
185
+ 'brand_vetting_sid' => payload['brand_vetting_sid'],
186
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
187
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
188
+ 'vetting_id' => payload['vetting_id'],
189
+ 'vetting_class' => payload['vetting_class'],
190
+ 'vetting_status' => payload['vetting_status'],
191
+ 'vetting_provider' => payload['vetting_provider'],
192
+ 'url' => payload['url'],
193
+ }
194
+ end
195
+
196
+ ##
197
+ # @return [String] The SID of the Account that created the vetting
198
+ def account_sid
199
+ @properties['account_sid']
200
+ end
201
+
202
+ ##
203
+ # @return [String] A2P BrandRegistration Sid
204
+ def brand_sid
205
+ @properties['brand_sid']
206
+ end
207
+
208
+ ##
209
+ # @return [String] SID for third-party vetting record
210
+ def brand_vetting_sid
211
+ @properties['brand_vetting_sid']
212
+ end
213
+
214
+ ##
215
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
216
+ def date_updated
217
+ @properties['date_updated']
218
+ end
219
+
220
+ ##
221
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was created
222
+ def date_created
223
+ @properties['date_created']
224
+ end
225
+
226
+ ##
227
+ # @return [String] The unique ID of the vetting
228
+ def vetting_id
229
+ @properties['vetting_id']
230
+ end
231
+
232
+ ##
233
+ # @return [String] The type of vetting
234
+ def vetting_class
235
+ @properties['vetting_class']
236
+ end
237
+
238
+ ##
239
+ # @return [String] Status of vetting attempt
240
+ def vetting_status
241
+ @properties['vetting_status']
242
+ end
243
+
244
+ ##
245
+ # @return [brand_vetting.VettingProvider] Third-party provider that has conducted the vetting
246
+ def vetting_provider
247
+ @properties['vetting_provider']
248
+ end
249
+
250
+ ##
251
+ # @return [String] The absolute URL of the Brand Vetting
252
+ def url
253
+ @properties['url']
254
+ end
255
+
256
+ ##
257
+ # Provide a user friendly representation
258
+ def to_s
259
+ "<Twilio.Messaging.V1.BrandVettingInstance>"
260
+ end
261
+
262
+ ##
263
+ # Provide a detailed, user friendly representation
264
+ def inspect
265
+ "<Twilio.Messaging.V1.BrandVettingInstance>"
266
+ end
267
+ end
268
+ end
269
+ end
270
+ end
271
+ end
272
+ end
@@ -115,13 +115,16 @@ module Twilio
115
115
  # @param [Boolean] mock A boolean that specifies whether brand should be a mock or
116
116
  # not. If true, brand will be registered as a mock brand. Defaults to false if no
117
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.
118
120
  # @return [BrandRegistrationInstance] Created BrandRegistrationInstance
119
- def create(customer_profile_bundle_sid: nil, a2p_profile_bundle_sid: nil, brand_type: :unset, mock: :unset)
121
+ def create(customer_profile_bundle_sid: nil, a2p_profile_bundle_sid: nil, brand_type: :unset, mock: :unset, skip_automatic_sec_vet: :unset)
120
122
  data = Twilio::Values.of({
121
123
  'CustomerProfileBundleSid' => customer_profile_bundle_sid,
122
124
  'A2PProfileBundleSid' => a2p_profile_bundle_sid,
123
125
  'BrandType' => brand_type,
124
126
  'Mock' => mock,
127
+ 'SkipAutomaticSecVet' => skip_automatic_sec_vet,
125
128
  })
126
129
 
127
130
  payload = @version.create('POST', @uri, data: data)
@@ -181,6 +184,9 @@ module Twilio
181
184
  # Path Solution
182
185
  @solution = {sid: sid, }
183
186
  @uri = "/a2p/BrandRegistrations/#{@solution[:sid]}"
187
+
188
+ # Dependents
189
+ @brand_vettings = nil
184
190
  end
185
191
 
186
192
  ##
@@ -192,6 +198,18 @@ module Twilio
192
198
  BrandRegistrationInstance.new(@version, payload, sid: @solution[:sid], )
193
199
  end
194
200
 
201
+ ##
202
+ # Access the brand_vettings
203
+ # @return [BrandVettingList]
204
+ # @return [BrandVettingContext]
205
+ def brand_vettings
206
+ unless @brand_vettings
207
+ @brand_vettings = BrandVettingList.new(@version, brand_sid: @solution[:sid], )
208
+ end
209
+
210
+ @brand_vettings
211
+ end
212
+
195
213
  ##
196
214
  # Provide a user friendly representation
197
215
  def to_s
@@ -233,7 +251,13 @@ module Twilio
233
251
  'failure_reason' => payload['failure_reason'],
234
252
  'url' => payload['url'],
235
253
  'brand_score' => payload['brand_score'] == nil ? payload['brand_score'] : payload['brand_score'].to_i,
254
+ 'brand_feedback' => payload['brand_feedback'],
255
+ 'identity_status' => payload['identity_status'],
256
+ 'russell_3000' => payload['russell_3000'],
257
+ 'tax_exempt_status' => payload['tax_exempt_status'],
258
+ 'skip_automatic_sec_vet' => payload['skip_automatic_sec_vet'],
236
259
  'mock' => payload['mock'],
260
+ 'links' => payload['links'],
237
261
  }
238
262
 
239
263
  # Context
@@ -295,7 +319,7 @@ module Twilio
295
319
  end
296
320
 
297
321
  ##
298
- # @return [brand_registration.Status] Brand Registration status
322
+ # @return [brand_registration.Status] Brand Registration status.
299
323
  def status
300
324
  @properties['status']
301
325
  end
@@ -324,12 +348,48 @@ module Twilio
324
348
  @properties['brand_score']
325
349
  end
326
350
 
351
+ ##
352
+ # @return [Array[brand_registration.BrandFeedback]] Brand feedback
353
+ def brand_feedback
354
+ @properties['brand_feedback']
355
+ end
356
+
357
+ ##
358
+ # @return [brand_registration.IdentityStatus] Identity Status
359
+ def identity_status
360
+ @properties['identity_status']
361
+ end
362
+
363
+ ##
364
+ # @return [Boolean] Russell 3000
365
+ def russell_3000
366
+ @properties['russell_3000']
367
+ end
368
+
369
+ ##
370
+ # @return [String] Tax Exempt Status
371
+ def tax_exempt_status
372
+ @properties['tax_exempt_status']
373
+ end
374
+
375
+ ##
376
+ # @return [Boolean] Skip Automatic Secondary Vetting
377
+ def skip_automatic_sec_vet
378
+ @properties['skip_automatic_sec_vet']
379
+ end
380
+
327
381
  ##
328
382
  # @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.
329
383
  def mock
330
384
  @properties['mock']
331
385
  end
332
386
 
387
+ ##
388
+ # @return [String] The links
389
+ def links
390
+ @properties['links']
391
+ end
392
+
333
393
  ##
334
394
  # Fetch the BrandRegistrationInstance
335
395
  # @return [BrandRegistrationInstance] Fetched BrandRegistrationInstance
@@ -337,6 +397,13 @@ module Twilio
337
397
  context.fetch
338
398
  end
339
399
 
400
+ ##
401
+ # Access the brand_vettings
402
+ # @return [brand_vettings] brand_vettings
403
+ def brand_vettings
404
+ context.brand_vettings
405
+ end
406
+
340
407
  ##
341
408
  # Provide a user friendly representation
342
409
  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