twilio-ruby 6.0.0.pre.rc.3 → 6.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +103 -47
  3. data/CONTRIBUTING.md +10 -8
  4. data/README.md +128 -46
  5. data/UPGRADE.md +7 -4
  6. data/advanced-examples/custom-http-client.md +170 -0
  7. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +1 -6
  8. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb +7 -42
  9. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +8 -42
  10. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +2 -10
  11. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +1 -6
  12. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +1 -5
  13. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -11
  14. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +1 -5
  15. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +1 -6
  16. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +2 -10
  17. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +1 -5
  18. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +3 -16
  19. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +1 -5
  20. data/lib/twilio-ruby/rest/api/v2010/account.rb +24 -103
  21. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +1 -5
  22. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +2 -10
  23. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +6 -24
  24. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +2 -9
  25. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +3 -15
  26. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -6
  27. data/lib/twilio-ruby/rest/chat/v1/service.rb +3 -12
  28. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +4 -20
  29. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +2 -10
  30. data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -16
  31. data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +11 -1
  32. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -5
  33. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +3 -12
  34. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -6
  35. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +3 -15
  36. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +1 -5
  37. data/lib/twilio-ruby/rest/conversations/v1/service.rb +5 -21
  38. data/lib/twilio-ruby/rest/conversations/v1/user.rb +1 -4
  39. data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -4
  40. data/lib/twilio-ruby/rest/events/v1/sink.rb +2 -10
  41. data/lib/twilio-ruby/rest/events/v1/subscription.rb +1 -4
  42. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +38 -44
  43. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +17 -23
  44. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +9 -9
  45. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +53 -53
  46. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +37 -37
  47. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +52 -52
  48. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +19 -92
  49. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +4 -4
  50. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +4 -4
  51. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +2 -11
  52. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +1 -4
  53. data/lib/twilio-ruby/rest/flex_api/v1.rb +30 -39
  54. data/lib/twilio-ruby/rest/insights/v1/call.rb +2 -10
  55. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +31 -3
  56. data/lib/twilio-ruby/rest/insights/v1/conference.rb +1 -4
  57. data/lib/twilio-ruby/rest/insights/v1/room.rb +1 -4
  58. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +3 -15
  59. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -6
  60. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +3 -12
  61. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +4 -20
  62. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +2 -10
  63. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -16
  64. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +2 -9
  65. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +28 -2
  66. data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +7 -0
  67. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +196 -0
  68. data/lib/twilio-ruby/rest/messaging/v1/service.rb +31 -47
  69. data/lib/twilio-ruby/rest/messaging/v1.rb +15 -15
  70. data/lib/twilio-ruby/rest/messaging.rb +1 -1
  71. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +2 -8
  72. data/lib/twilio-ruby/rest/microvisor.rb +2 -1
  73. data/lib/twilio-ruby/rest/notify/v1/service.rb +2 -9
  74. data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +224 -0
  75. data/lib/twilio-ruby/rest/numbers/v1.rb +49 -0
  76. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +4 -18
  77. data/lib/twilio-ruby/rest/oauth.rb +1 -1
  78. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +4 -16
  79. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +1 -5
  80. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +1 -4
  81. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +1 -4
  82. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -5
  83. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +2 -10
  84. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +2 -10
  85. data/lib/twilio-ruby/rest/preview/sync/service.rb +3 -12
  86. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +1 -5
  87. data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +2 -10
  88. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +5 -20
  89. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -6
  90. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +2 -10
  91. data/lib/twilio-ruby/rest/proxy/v1/service.rb +3 -12
  92. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +1 -5
  93. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +3 -15
  94. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +1 -5
  95. data/lib/twilio-ruby/rest/serverless/v1/service.rb +4 -16
  96. data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +1 -5
  97. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -5
  98. data/lib/twilio-ruby/rest/studio/v1/flow.rb +2 -8
  99. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -5
  100. data/lib/twilio-ruby/rest/studio/v2/flow.rb +2 -8
  101. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +1 -4
  102. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +2 -10
  103. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -5
  104. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +2 -10
  105. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +2 -10
  106. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -6
  107. data/lib/twilio-ruby/rest/sync/v1/service.rb +4 -16
  108. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +1 -5
  109. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +2 -10
  110. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +7 -28
  111. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +4 -16
  112. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +3 -12
  113. data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +3 -12
  114. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +1 -7
  115. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +3 -16
  116. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +1 -5
  117. data/lib/twilio-ruby/rest/verify/v2/service.rb +7 -29
  118. data/lib/twilio-ruby/rest/video/v1/room/participant.rb +3 -16
  119. data/lib/twilio-ruby/rest/video/v1/room.rb +3 -13
  120. data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +1 -4
  121. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +1 -5
  122. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +2 -10
  123. data/lib/twilio-ruby/rest.rb +1 -1
  124. data/lib/twilio-ruby/version.rb +1 -1
  125. data/twilio-ruby.gemspec +1 -1
  126. metadata +12 -9
  127. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +0 -744
@@ -273,11 +273,7 @@ module Twilio
273
273
 
274
274
  unless @webhooks
275
275
  @webhooks = WebhookList.new(
276
- @version,
277
- service_sid: @solution[:service_sid],
278
- channel_sid: @solution[:sid]
279
-
280
- )
276
+ @version, service_sid: @solution[:service_sid], channel_sid: @solution[:sid], )
281
277
  end
282
278
 
283
279
  @webhooks
@@ -296,11 +292,7 @@ module Twilio
296
292
 
297
293
  unless @members
298
294
  @members = MemberList.new(
299
- @version,
300
- service_sid: @solution[:service_sid],
301
- channel_sid: @solution[:sid]
302
-
303
- )
295
+ @version, service_sid: @solution[:service_sid], channel_sid: @solution[:sid], )
304
296
  end
305
297
 
306
298
  @members
@@ -319,11 +311,7 @@ module Twilio
319
311
 
320
312
  unless @messages
321
313
  @messages = MessageList.new(
322
- @version,
323
- service_sid: @solution[:service_sid],
324
- channel_sid: @solution[:sid]
325
-
326
- )
314
+ @version, service_sid: @solution[:service_sid], channel_sid: @solution[:sid], )
327
315
  end
328
316
 
329
317
  @messages
@@ -342,11 +330,7 @@ module Twilio
342
330
 
343
331
  unless @invites
344
332
  @invites = InviteList.new(
345
- @version,
346
- service_sid: @solution[:service_sid],
347
- channel_sid: @solution[:sid]
348
-
349
- )
333
+ @version, service_sid: @solution[:service_sid], channel_sid: @solution[:sid], )
350
334
  end
351
335
 
352
336
  @invites
@@ -242,11 +242,7 @@ module Twilio
242
242
 
243
243
  unless @user_channels
244
244
  @user_channels = UserChannelList.new(
245
- @version,
246
- service_sid: @solution[:service_sid],
247
- user_sid: @solution[:sid]
248
-
249
- )
245
+ @version, service_sid: @solution[:service_sid], user_sid: @solution[:sid], )
250
246
  end
251
247
 
252
248
  @user_channels
@@ -265,11 +261,7 @@ module Twilio
265
261
 
266
262
  unless @user_bindings
267
263
  @user_bindings = UserBindingList.new(
268
- @version,
269
- service_sid: @solution[:service_sid],
270
- user_sid: @solution[:sid]
271
-
272
- )
264
+ @version, service_sid: @solution[:service_sid], user_sid: @solution[:sid], )
273
265
  end
274
266
 
275
267
  @user_bindings
@@ -307,10 +307,7 @@ module Twilio
307
307
 
308
308
  unless @bindings
309
309
  @bindings = BindingList.new(
310
- @version,
311
- service_sid: @solution[:sid]
312
-
313
- )
310
+ @version, service_sid: @solution[:sid], )
314
311
  end
315
312
 
316
313
  @bindings
@@ -329,10 +326,7 @@ module Twilio
329
326
 
330
327
  unless @channels
331
328
  @channels = ChannelList.new(
332
- @version,
333
- service_sid: @solution[:sid]
334
-
335
- )
329
+ @version, service_sid: @solution[:sid], )
336
330
  end
337
331
 
338
332
  @channels
@@ -351,10 +345,7 @@ module Twilio
351
345
 
352
346
  unless @roles
353
347
  @roles = RoleList.new(
354
- @version,
355
- service_sid: @solution[:sid]
356
-
357
- )
348
+ @version, service_sid: @solution[:sid], )
358
349
  end
359
350
 
360
351
  @roles
@@ -373,10 +364,7 @@ module Twilio
373
364
 
374
365
  unless @users
375
366
  @users = UserList.new(
376
- @version,
377
- service_sid: @solution[:sid]
378
-
379
- )
367
+ @version, service_sid: @solution[:sid], )
380
368
  end
381
369
 
382
370
  @users
@@ -207,12 +207,8 @@ module Twilio
207
207
  def brand_registration_otps
208
208
  unless @brand_registration_otps
209
209
  @brand_registration_otps = BrandRegistrationOtpList.new(
210
- @version,
211
- brand_registration_sid: @solution[:sid]
212
-
213
- )
210
+ @version, brand_registration_sid: @solution[:sid], )
214
211
  end
215
-
216
212
  @brand_registration_otps
217
213
  end
218
214
  ##
@@ -229,10 +225,7 @@ module Twilio
229
225
 
230
226
  unless @brand_vettings
231
227
  @brand_vettings = BrandVettingList.new(
232
- @version,
233
- brand_registration_sid: @solution[:sid]
234
-
235
- )
228
+ @version, brand_sid: @solution[:sid], )
236
229
  end
237
230
 
238
231
  @brand_vettings
@@ -73,15 +73,21 @@ module Twilio
73
73
  # Update the DomainConfigInstance
74
74
  # @param [String] fallback_url Any requests we receive to this domain that do not match an existing shortened message will be redirected to the fallback url. These will likely be either expired messages, random misdirected traffic, or intentional scraping.
75
75
  # @param [String] callback_url URL to receive click events to your webhook whenever the recipients click on the shortened links
76
+ # @param [Boolean] continue_on_failure Boolean field to set customer delivery preference when there is a failure in linkShortening service
77
+ # @param [Boolean] disable_https Customer's choice to send links with/without \\\"https://\\\" attached to shortened url. If true, messages will not be sent with https:// at the beginning of the url. If false, messages will be sent with https:// at the beginning of the url. False is the default behavior if it is not specified.
76
78
  # @return [DomainConfigInstance] Updated DomainConfigInstance
77
79
  def update(
78
80
  fallback_url: :unset,
79
- callback_url: :unset
81
+ callback_url: :unset,
82
+ continue_on_failure: :unset,
83
+ disable_https: :unset
80
84
  )
81
85
 
82
86
  data = Twilio::Values.of({
83
87
  'FallbackUrl' => fallback_url,
84
88
  'CallbackUrl' => callback_url,
89
+ 'ContinueOnFailure' => continue_on_failure,
90
+ 'DisableHttps' => disable_https,
85
91
  })
86
92
 
87
93
  payload = @version.update('POST', @uri, data: data)
@@ -155,9 +161,11 @@ module Twilio
155
161
  'config_sid' => payload['config_sid'],
156
162
  'fallback_url' => payload['fallback_url'],
157
163
  'callback_url' => payload['callback_url'],
164
+ 'continue_on_failure' => payload['continue_on_failure'],
158
165
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
159
166
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
160
167
  'url' => payload['url'],
168
+ 'disable_https' => payload['disable_https'],
161
169
  }
162
170
 
163
171
  # Context
@@ -200,6 +208,12 @@ module Twilio
200
208
  @properties['callback_url']
201
209
  end
202
210
 
211
+ ##
212
+ # @return [Boolean] Boolean field to set customer delivery preference when there is a failure in linkShortening service
213
+ def continue_on_failure
214
+ @properties['continue_on_failure']
215
+ end
216
+
203
217
  ##
204
218
  # @return [Time] Date this Domain Config was created.
205
219
  def date_created
@@ -218,6 +232,12 @@ module Twilio
218
232
  @properties['url']
219
233
  end
220
234
 
235
+ ##
236
+ # @return [Boolean] Customer's choice to send links with/without \"https://\" attached to shortened url. If true, messages will not be sent with https:// at the beginning of the url. If false, messages will be sent with https:// at the beginning of the url. False is the default behavior if it is not specified.
237
+ def disable_https
238
+ @properties['disable_https']
239
+ end
240
+
221
241
  ##
222
242
  # Fetch the DomainConfigInstance
223
243
  # @return [DomainConfigInstance] Fetched DomainConfigInstance
@@ -230,15 +250,21 @@ module Twilio
230
250
  # Update the DomainConfigInstance
231
251
  # @param [String] fallback_url Any requests we receive to this domain that do not match an existing shortened message will be redirected to the fallback url. These will likely be either expired messages, random misdirected traffic, or intentional scraping.
232
252
  # @param [String] callback_url URL to receive click events to your webhook whenever the recipients click on the shortened links
253
+ # @param [Boolean] continue_on_failure Boolean field to set customer delivery preference when there is a failure in linkShortening service
254
+ # @param [Boolean] disable_https Customer's choice to send links with/without \\\"https://\\\" attached to shortened url. If true, messages will not be sent with https:// at the beginning of the url. If false, messages will be sent with https:// at the beginning of the url. False is the default behavior if it is not specified.
233
255
  # @return [DomainConfigInstance] Updated DomainConfigInstance
234
256
  def update(
235
257
  fallback_url: :unset,
236
- callback_url: :unset
258
+ callback_url: :unset,
259
+ continue_on_failure: :unset,
260
+ disable_https: :unset
237
261
  )
238
262
 
239
263
  context.update(
240
264
  fallback_url: fallback_url,
241
265
  callback_url: callback_url,
266
+ continue_on_failure: continue_on_failure,
267
+ disable_https: disable_https,
242
268
  )
243
269
  end
244
270
 
@@ -133,6 +133,7 @@ module Twilio
133
133
  'messaging_service_sid' => payload['messaging_service_sid'],
134
134
  'fallback_url' => payload['fallback_url'],
135
135
  'callback_url' => payload['callback_url'],
136
+ 'continue_on_failure' => payload['continue_on_failure'],
136
137
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
137
138
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
138
139
  'url' => payload['url'],
@@ -184,6 +185,12 @@ module Twilio
184
185
  @properties['callback_url']
185
186
  end
186
187
 
188
+ ##
189
+ # @return [Boolean] Boolean field to set customer delivery preference when there is a failure in linkShortening service
190
+ def continue_on_failure
191
+ @properties['continue_on_failure']
192
+ end
193
+
187
194
  ##
188
195
  # @return [Time] Date this Domain Config was created.
189
196
  def date_created
@@ -0,0 +1,196 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Messaging
8
+ # This is the public Twilio REST API.
9
+ #
10
+ # NOTE: This class is auto generated by OpenAPI Generator.
11
+ # https://openapi-generator.tech
12
+ # Do not edit the class manually.
13
+ #
14
+
15
+
16
+ module Twilio
17
+ module REST
18
+ class Messaging < MessagingBase
19
+ class V1 < Version
20
+ class LinkshorteningMessagingServiceDomainAssociationList < ListResource
21
+ ##
22
+ # Initialize the LinkshorteningMessagingServiceDomainAssociationList
23
+ # @param [Version] version Version that contains the resource
24
+ # @return [LinkshorteningMessagingServiceDomainAssociationList] LinkshorteningMessagingServiceDomainAssociationList
25
+ def initialize(version)
26
+ super(version)
27
+ # Path Solution
28
+ @solution = { }
29
+
30
+
31
+ end
32
+
33
+
34
+
35
+ # Provide a user friendly representation
36
+ def to_s
37
+ '#<Twilio.Messaging.V1.LinkshorteningMessagingServiceDomainAssociationList>'
38
+ end
39
+ end
40
+
41
+
42
+ ##
43
+ #PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
44
+ class LinkshorteningMessagingServiceDomainAssociationContext < InstanceContext
45
+ ##
46
+ # Initialize the LinkshorteningMessagingServiceDomainAssociationContext
47
+ # @param [Version] version Version that contains the resource
48
+ # @param [String] messaging_service_sid Unique string used to identify the Messaging service that this domain should be associated with.
49
+ # @return [LinkshorteningMessagingServiceDomainAssociationContext] LinkshorteningMessagingServiceDomainAssociationContext
50
+ def initialize(version, messaging_service_sid)
51
+ super(version)
52
+
53
+ # Path Solution
54
+ @solution = { messaging_service_sid: messaging_service_sid, }
55
+ @uri = "/LinkShortening/MessagingServices/#{@solution[:messaging_service_sid]}/Domain"
56
+
57
+
58
+ end
59
+ ##
60
+ # Fetch the LinkshorteningMessagingServiceDomainAssociationInstance
61
+ # @return [LinkshorteningMessagingServiceDomainAssociationInstance] Fetched LinkshorteningMessagingServiceDomainAssociationInstance
62
+ def fetch
63
+
64
+ payload = @version.fetch('GET', @uri)
65
+ LinkshorteningMessagingServiceDomainAssociationInstance.new(
66
+ @version,
67
+ payload,
68
+ messaging_service_sid: @solution[:messaging_service_sid],
69
+ )
70
+ end
71
+
72
+
73
+ ##
74
+ # Provide a user friendly representation
75
+ def to_s
76
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
77
+ "#<Twilio.Messaging.V1.LinkshorteningMessagingServiceDomainAssociationContext #{context}>"
78
+ end
79
+
80
+ ##
81
+ # Provide a detailed, user friendly representation
82
+ def inspect
83
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
84
+ "#<Twilio.Messaging.V1.LinkshorteningMessagingServiceDomainAssociationContext #{context}>"
85
+ end
86
+ end
87
+
88
+ class LinkshorteningMessagingServiceDomainAssociationPage < Page
89
+ ##
90
+ # Initialize the LinkshorteningMessagingServiceDomainAssociationPage
91
+ # @param [Version] version Version that contains the resource
92
+ # @param [Response] response Response from the API
93
+ # @param [Hash] solution Path solution for the resource
94
+ # @return [LinkshorteningMessagingServiceDomainAssociationPage] LinkshorteningMessagingServiceDomainAssociationPage
95
+ def initialize(version, response, solution)
96
+ super(version, response)
97
+
98
+ # Path Solution
99
+ @solution = solution
100
+ end
101
+
102
+ ##
103
+ # Build an instance of LinkshorteningMessagingServiceDomainAssociationInstance
104
+ # @param [Hash] payload Payload response from the API
105
+ # @return [LinkshorteningMessagingServiceDomainAssociationInstance] LinkshorteningMessagingServiceDomainAssociationInstance
106
+ def get_instance(payload)
107
+ LinkshorteningMessagingServiceDomainAssociationInstance.new(@version, payload)
108
+ end
109
+
110
+ ##
111
+ # Provide a user friendly representation
112
+ def to_s
113
+ '<Twilio.Messaging.V1.LinkshorteningMessagingServiceDomainAssociationPage>'
114
+ end
115
+ end
116
+ class LinkshorteningMessagingServiceDomainAssociationInstance < InstanceResource
117
+ ##
118
+ # Initialize the LinkshorteningMessagingServiceDomainAssociationInstance
119
+ # @param [Version] version Version that contains the resource
120
+ # @param [Hash] payload payload that contains response from Twilio
121
+ # @param [String] account_sid The SID of the
122
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this LinkshorteningMessagingServiceDomainAssociation
123
+ # resource.
124
+ # @param [String] sid The SID of the Call resource to fetch.
125
+ # @return [LinkshorteningMessagingServiceDomainAssociationInstance] LinkshorteningMessagingServiceDomainAssociationInstance
126
+ def initialize(version, payload , messaging_service_sid: nil)
127
+ super(version)
128
+
129
+ # Marshaled Properties
130
+ @properties = {
131
+ 'domain_sid' => payload['domain_sid'],
132
+ 'messaging_service_sid' => payload['messaging_service_sid'],
133
+ 'url' => payload['url'],
134
+ }
135
+
136
+ # Context
137
+ @instance_context = nil
138
+ @params = { 'messaging_service_sid' => messaging_service_sid || @properties['messaging_service_sid'] , }
139
+ end
140
+
141
+ ##
142
+ # Generate an instance context for the instance, the context is capable of
143
+ # performing various actions. All instance actions are proxied to the context
144
+ # @return [LinkshorteningMessagingServiceDomainAssociationContext] CallContext for this CallInstance
145
+ def context
146
+ unless @instance_context
147
+ @instance_context = LinkshorteningMessagingServiceDomainAssociationContext.new(@version , @params['messaging_service_sid'])
148
+ end
149
+ @instance_context
150
+ end
151
+
152
+ ##
153
+ # @return [String] The unique string that we created to identify the Domain resource.
154
+ def domain_sid
155
+ @properties['domain_sid']
156
+ end
157
+
158
+ ##
159
+ # @return [String] The unique string that identifies the messaging service
160
+ def messaging_service_sid
161
+ @properties['messaging_service_sid']
162
+ end
163
+
164
+ ##
165
+ # @return [String]
166
+ def url
167
+ @properties['url']
168
+ end
169
+
170
+ ##
171
+ # Fetch the LinkshorteningMessagingServiceDomainAssociationInstance
172
+ # @return [LinkshorteningMessagingServiceDomainAssociationInstance] Fetched LinkshorteningMessagingServiceDomainAssociationInstance
173
+ def fetch
174
+
175
+ context.fetch
176
+ end
177
+
178
+ ##
179
+ # Provide a user friendly representation
180
+ def to_s
181
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
182
+ "<Twilio.Messaging.V1.LinkshorteningMessagingServiceDomainAssociationInstance #{values}>"
183
+ end
184
+
185
+ ##
186
+ # Provide a detailed, user friendly representation
187
+ def inspect
188
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
189
+ "<Twilio.Messaging.V1.LinkshorteningMessagingServiceDomainAssociationInstance #{values}>"
190
+ end
191
+ end
192
+
193
+ end
194
+ end
195
+ end
196
+ end
@@ -205,10 +205,10 @@ module Twilio
205
205
 
206
206
  # Dependents
207
207
  @us_app_to_person_usecases = nil
208
+ @alpha_senders = nil
208
209
  @short_codes = nil
209
210
  @us_app_to_person = nil
210
211
  @phone_numbers = nil
211
- @alpha_senders = nil
212
212
  end
213
213
  ##
214
214
  # Delete the ServiceInstance
@@ -303,15 +303,30 @@ module Twilio
303
303
  def us_app_to_person_usecases
304
304
  unless @us_app_to_person_usecases
305
305
  @us_app_to_person_usecases = UsAppToPersonUsecaseList.new(
306
- @version,
307
- service_sid: @solution[:sid]
308
-
309
- )
306
+ @version, messaging_service_sid: @solution[:sid], )
310
307
  end
311
-
312
308
  @us_app_to_person_usecases
313
309
  end
314
310
  ##
311
+ # Access the alpha_senders
312
+ # @return [AlphaSenderList]
313
+ # @return [AlphaSenderContext] if sid was passed.
314
+ def alpha_senders(sid=:unset)
315
+
316
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
317
+
318
+ if sid != :unset
319
+ return AlphaSenderContext.new(@version, @solution[:sid],sid )
320
+ end
321
+
322
+ unless @alpha_senders
323
+ @alpha_senders = AlphaSenderList.new(
324
+ @version, service_sid: @solution[:sid], )
325
+ end
326
+
327
+ @alpha_senders
328
+ end
329
+ ##
315
330
  # Access the short_codes
316
331
  # @return [ShortCodeList]
317
332
  # @return [ShortCodeContext] if sid was passed.
@@ -325,10 +340,7 @@ module Twilio
325
340
 
326
341
  unless @short_codes
327
342
  @short_codes = ShortCodeList.new(
328
- @version,
329
- service_sid: @solution[:sid]
330
-
331
- )
343
+ @version, service_sid: @solution[:sid], )
332
344
  end
333
345
 
334
346
  @short_codes
@@ -347,10 +359,7 @@ module Twilio
347
359
 
348
360
  unless @us_app_to_person
349
361
  @us_app_to_person = UsAppToPersonList.new(
350
- @version,
351
- service_sid: @solution[:sid]
352
-
353
- )
362
+ @version, messaging_service_sid: @solution[:sid], )
354
363
  end
355
364
 
356
365
  @us_app_to_person
@@ -369,36 +378,11 @@ module Twilio
369
378
 
370
379
  unless @phone_numbers
371
380
  @phone_numbers = PhoneNumberList.new(
372
- @version,
373
- service_sid: @solution[:sid]
374
-
375
- )
381
+ @version, service_sid: @solution[:sid], )
376
382
  end
377
383
 
378
384
  @phone_numbers
379
385
  end
380
- ##
381
- # Access the alpha_senders
382
- # @return [AlphaSenderList]
383
- # @return [AlphaSenderContext] if sid was passed.
384
- def alpha_senders(sid=:unset)
385
-
386
- raise ArgumentError, 'sid cannot be nil' if sid.nil?
387
-
388
- if sid != :unset
389
- return AlphaSenderContext.new(@version, @solution[:sid],sid )
390
- end
391
-
392
- unless @alpha_senders
393
- @alpha_senders = AlphaSenderList.new(
394
- @version,
395
- service_sid: @solution[:sid]
396
-
397
- )
398
- end
399
-
400
- @alpha_senders
401
- end
402
386
 
403
387
  ##
404
388
  # Provide a user friendly representation
@@ -718,6 +702,13 @@ module Twilio
718
702
  context.us_app_to_person_usecases
719
703
  end
720
704
 
705
+ ##
706
+ # Access the alpha_senders
707
+ # @return [alpha_senders] alpha_senders
708
+ def alpha_senders
709
+ context.alpha_senders
710
+ end
711
+
721
712
  ##
722
713
  # Access the short_codes
723
714
  # @return [short_codes] short_codes
@@ -739,13 +730,6 @@ module Twilio
739
730
  context.phone_numbers
740
731
  end
741
732
 
742
- ##
743
- # Access the alpha_senders
744
- # @return [alpha_senders] alpha_senders
745
- def alpha_senders
746
- context.alpha_senders
747
- end
748
-
749
733
  ##
750
734
  # Provide a user friendly representation
751
735
  def to_s
@@ -28,8 +28,8 @@ module Twilio
28
28
  @domain_config_messaging_service = nil
29
29
  @external_campaign = nil
30
30
  @linkshortening_messaging_service = nil
31
+ @linkshortening_messaging_service_domain_association = nil
31
32
  @services = nil
32
- @tollfree_verifications = nil
33
33
  @usecases = nil
34
34
  end
35
35
 
@@ -136,6 +136,20 @@ module Twilio
136
136
  end
137
137
  end
138
138
  ##
139
+ # @param [String] messaging_service_sid Unique string used to identify the Messaging service that this domain should be associated with.
140
+ # @return [Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceDomainAssociationContext] if messagingServiceSid was passed.
141
+ # @return [Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceDomainAssociationList]
142
+ def linkshortening_messaging_service_domain_association(messaging_service_sid=:unset)
143
+ if messaging_service_sid.nil?
144
+ raise ArgumentError, 'messaging_service_sid cannot be nil'
145
+ end
146
+ if messaging_service_sid == :unset
147
+ @linkshortening_messaging_service_domain_association ||= LinkshorteningMessagingServiceDomainAssociationList.new self
148
+ else
149
+ LinkshorteningMessagingServiceDomainAssociationContext.new(self, messaging_service_sid)
150
+ end
151
+ end
152
+ ##
139
153
  # @param [String] sid The SID of the Service resource to fetch.
140
154
  # @return [Twilio::REST::Messaging::V1::ServiceContext] if sid was passed.
141
155
  # @return [Twilio::REST::Messaging::V1::ServiceList]
@@ -150,20 +164,6 @@ module Twilio
150
164
  end
151
165
  end
152
166
  ##
153
- # @param [String] sid The unique string to identify Tollfree Verification.
154
- # @return [Twilio::REST::Messaging::V1::TollfreeVerificationContext] if sid was passed.
155
- # @return [Twilio::REST::Messaging::V1::TollfreeVerificationList]
156
- def tollfree_verifications(sid=:unset)
157
- if sid.nil?
158
- raise ArgumentError, 'sid cannot be nil'
159
- end
160
- if sid == :unset
161
- @tollfree_verifications ||= TollfreeVerificationList.new self
162
- else
163
- TollfreeVerificationContext.new(self, sid)
164
- end
165
- end
166
- ##
167
167
  # @return [Twilio::REST::Messaging::V1::UsecaseList]
168
168
  def usecases
169
169
  @usecases ||= UsecaseList.new self
@@ -71,4 +71,4 @@ module Twilio
71
71
  end
72
72
  end
73
73
  end
74
- end
74
+ end
@@ -196,10 +196,7 @@ module Twilio
196
196
 
197
197
  unless @device_secrets
198
198
  @device_secrets = DeviceSecretList.new(
199
- @version,
200
- device_sid: @solution[:sid]
201
-
202
- )
199
+ @version, device_sid: @solution[:sid], )
203
200
  end
204
201
 
205
202
  @device_secrets
@@ -218,10 +215,7 @@ module Twilio
218
215
 
219
216
  unless @device_configs
220
217
  @device_configs = DeviceConfigList.new(
221
- @version,
222
- device_sid: @solution[:sid]
223
-
224
- )
218
+ @version, device_sid: @solution[:sid], )
225
219
  end
226
220
 
227
221
  @device_configs