twilio-ruby 5.34.0 → 5.38.0

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 (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +126 -0
  3. data/README.md +24 -3
  4. data/lib/twilio-ruby.rb +1 -1
  5. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +87 -87
  6. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +14 -0
  7. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +47 -9
  8. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +71 -71
  9. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +29 -29
  10. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +38 -3
  11. data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +12 -12
  12. data/lib/twilio-ruby/rest/autopilot.rb +6 -0
  13. data/lib/twilio-ruby/rest/autopilot/v1.rb +7 -0
  14. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -16
  15. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +12 -3
  16. data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +198 -0
  17. data/lib/twilio-ruby/rest/client.rb +35 -15
  18. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +28 -3
  19. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +27 -4
  20. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +2 -1
  21. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
  22. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +6 -3
  23. data/lib/twilio-ruby/rest/monitor/v1/alert.rb +8 -8
  24. data/lib/twilio-ruby/rest/notify/v1/service.rb +20 -1
  25. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +26 -0
  26. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +324 -0
  27. data/lib/twilio-ruby/rest/preview.rb +6 -0
  28. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +7 -0
  29. data/lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb +193 -0
  30. data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +26 -0
  31. data/lib/twilio-ruby/rest/{autopilot/v1/assistant/export_assistant.rb → preview/trusted_comms/business/brand.rb} +88 -71
  32. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +266 -0
  33. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +194 -0
  34. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +7 -0
  35. data/lib/twilio-ruby/rest/supersim.rb +18 -0
  36. data/lib/twilio-ruby/rest/supersim/v1.rb +30 -0
  37. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +63 -16
  38. data/lib/twilio-ruby/rest/supersim/v1/network.rb +315 -0
  39. data/lib/twilio-ruby/rest/{authy/v1/service.rb → supersim/v1/network_access_profile.rb} +95 -121
  40. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +352 -0
  41. data/lib/twilio-ruby/rest/verify.rb +9 -0
  42. data/lib/twilio-ruby/rest/verify/v2.rb +16 -0
  43. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/form.rb +8 -8
  44. data/lib/twilio-ruby/rest/verify/v2/service.rb +74 -3
  45. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity.rb +32 -8
  46. data/lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb +141 -0
  47. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor.rb +8 -8
  48. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor/challenge.rb +8 -8
  49. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -3
  50. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +425 -0
  51. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +8 -4
  52. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +8 -4
  53. data/lib/twilio-ruby/rest/voice.rb +36 -0
  54. data/lib/twilio-ruby/rest/voice/v1.rb +64 -0
  55. data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +513 -0
  56. data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +379 -0
  57. data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +458 -0
  58. data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +366 -0
  59. data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +346 -0
  60. data/lib/twilio-ruby/util/configuration.rb +9 -1
  61. data/lib/twilio-ruby/version.rb +1 -1
  62. data/spec/integration/api/v2010/account/call_spec.rb +5 -5
  63. data/spec/integration/api/v2010/account/conference/participant_spec.rb +177 -0
  64. data/spec/integration/api/v2010/account/conference_spec.rb +42 -14
  65. data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +8 -14
  66. data/spec/integration/api/v2010/account/sip/domain_spec.rb +12 -4
  67. data/spec/integration/api/v2010/account/token_spec.rb +23 -11
  68. data/spec/integration/api/v2010/account/validation_request_spec.rb +1 -1
  69. data/spec/integration/autopilot/v1/assistant/query_spec.rb +4 -4
  70. data/spec/integration/autopilot/v1/assistant_spec.rb +4 -8
  71. data/spec/integration/autopilot/v1/restore_assistant_spec.rb +53 -0
  72. data/spec/integration/conversations/v1/conversation/participant_spec.rb +7 -0
  73. data/spec/integration/conversations/v1/conversation_spec.rb +16 -0
  74. data/spec/integration/flex_api/v1/configuration_spec.rb +3 -0
  75. data/spec/integration/numbers/v2/regulatory_compliance/bundle/evaluation_spec.rb +623 -0
  76. data/spec/integration/numbers/v2/regulatory_compliance/bundle_spec.rb +4 -0
  77. data/spec/integration/preview/trusted_comms/brands_information_spec.rb +44 -0
  78. data/spec/integration/preview/trusted_comms/business/brand/branded_channel/channel_spec.rb +54 -0
  79. data/spec/integration/preview/trusted_comms/business/brand/branded_channel_spec.rb +52 -0
  80. data/spec/integration/preview/trusted_comms/business/brand_spec.rb +49 -0
  81. data/spec/integration/preview/trusted_comms/business_spec.rb +1 -0
  82. data/spec/integration/serverless/v1/service/environment/log_spec.rb +1 -0
  83. data/spec/integration/supersim/v1/fleet_spec.rb +16 -7
  84. data/spec/integration/supersim/v1/network_access_profile/network_access_profile_network_spec.rb +179 -0
  85. data/spec/integration/supersim/v1/network_access_profile_spec.rb +223 -0
  86. data/spec/integration/supersim/v1/network_spec.rb +139 -0
  87. data/spec/integration/supersim/v1/sim_spec.rb +78 -6
  88. data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +13 -13
  89. data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +23 -23
  90. data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +28 -28
  91. data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +17 -17
  92. data/spec/integration/trunking/v1/trunk_spec.rb +33 -33
  93. data/spec/integration/{authy/v1 → verify/v2}/form_spec.rb +4 -4
  94. data/spec/integration/verify/v2/service/entity/access_token_spec.rb +46 -0
  95. data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor/challenge_spec.rb +73 -73
  96. data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor_spec.rb +54 -54
  97. data/spec/integration/verify/v2/service/entity_spec.rb +204 -0
  98. data/spec/integration/verify/v2/service/webhook_spec.rb +262 -0
  99. data/spec/integration/verify/v2/service_spec.rb +32 -4
  100. data/spec/integration/voice/v1/byoc_trunk_spec.rb +250 -0
  101. data/spec/integration/voice/v1/connection_policy/connection_policy_target_spec.rb +246 -0
  102. data/spec/integration/voice/v1/connection_policy_spec.rb +226 -0
  103. data/spec/integration/voice/v1/ip_record_spec.rb +223 -0
  104. data/spec/integration/voice/v1/source_ip_mapping_spec.rb +219 -0
  105. data/spec/rest/client_spec.rb +168 -58
  106. data/spec/util/configuration_spec.rb +12 -0
  107. data/twilio-ruby.gemspec +1 -1
  108. metadata +63 -23
  109. data/lib/twilio-ruby/rest/authy.rb +0 -55
  110. data/lib/twilio-ruby/rest/authy/v1.rb +0 -59
  111. data/spec/integration/authy/v1/service/entity_spec.rb +0 -201
  112. data/spec/integration/authy/v1/service_spec.rb +0 -231
  113. data/spec/integration/autopilot/v1/assistant/export_assistant_spec.rb +0 -49
@@ -11,14 +11,17 @@ module Twilio
11
11
  ##
12
12
  # A client for accessing the Twilio API.
13
13
  class Client
14
- attr_accessor :http_client, :username, :password, :account_sid, :auth_token, :region
14
+ @@default_region = 'us1'
15
+
16
+ attr_accessor :http_client, :username, :password, :account_sid, :auth_token, :region, :edge
15
17
 
16
18
  ##
17
19
  # Initializes the Twilio Client
18
20
  def initialize(username=nil, password=nil, account_sid=nil, region=nil, http_client=nil)
19
21
  @username = username || Twilio.account_sid
20
22
  @password = password || Twilio.auth_token
21
- @region = region
23
+ @region = region || Twilio.region
24
+ @edge = Twilio.edge
22
25
  @account_sid = account_sid || @username
23
26
  @auth_token = @password
24
27
  @auth = [@username, @password]
@@ -27,7 +30,6 @@ module Twilio
27
30
  # Domains
28
31
  @accounts = nil
29
32
  @api = nil
30
- @authy = nil
31
33
  @autopilot = nil
32
34
  @chat = nil
33
35
  @conversations = nil
@@ -75,12 +77,7 @@ module Twilio
75
77
  headers['Accept'] = 'application/json'
76
78
  end
77
79
 
78
- if !region.nil?
79
- head, tail = uri.split('.', 2)
80
- if !tail.start_with?(region)
81
- uri = [head, region, tail].join('.')
82
- end
83
- end
80
+ uri = build_uri(uri)
84
81
 
85
82
  @http_client.request(
86
83
  host,
@@ -95,6 +92,35 @@ module Twilio
95
92
  )
96
93
  end
97
94
 
95
+ ##
96
+ # Build the final request uri
97
+ def build_uri(uri)
98
+ if @region.nil? and @edge.nil?
99
+ return uri
100
+ end
101
+
102
+ parsed_url = URI(uri)
103
+ pieces = parsed_url.host.split('.')
104
+ product = pieces[0]
105
+ domain = pieces[-2, 2]
106
+ new_edge = @edge
107
+ new_region = @region
108
+
109
+ if pieces.length == 4
110
+ new_region ||= pieces[1]
111
+ elsif pieces.length == 5
112
+ new_edge ||= pieces[1]
113
+ new_region ||= pieces[2]
114
+ end
115
+
116
+ if !new_edge.nil? && new_region.nil?
117
+ new_region = @@default_region
118
+ end
119
+
120
+ parsed_url.host = [product, new_edge, new_region, domain].select {|item| !item.nil?}.join('.')
121
+ parsed_url.to_s
122
+ end
123
+
98
124
  ##
99
125
  # Validate the new SSL certificate for the Twilio API
100
126
  def validate_ssl_certificate
@@ -116,12 +142,6 @@ module Twilio
116
142
  @api ||= Api.new self
117
143
  end
118
144
 
119
- ##
120
- # Access the Authy Twilio Domain
121
- def authy
122
- @authy ||= Authy.new self
123
- end
124
-
125
145
  ##
126
146
  # Access the Autopilot Twilio Domain
127
147
  def autopilot
@@ -41,8 +41,12 @@ module Twilio
41
41
  # returned.
42
42
  # @param [conversation.State] state Current state of this conversation. Can be
43
43
  # either `active`, `inactive` or `closed` and defaults to `active`
44
+ # @param [String] timers_inactive ISO8601 duration when conversation will be
45
+ # switched to `inactive` state. Minimum value for this timer is 1 minute.
46
+ # @param [String] timers_closed ISO8601 duration when conversation will be
47
+ # switched to `closed` state. Minimum value for this timer is 10 minutes.
44
48
  # @return [ConversationInstance] Newly created ConversationInstance
45
- def create(friendly_name: :unset, date_created: :unset, date_updated: :unset, messaging_service_sid: :unset, attributes: :unset, state: :unset)
49
+ def create(friendly_name: :unset, date_created: :unset, date_updated: :unset, messaging_service_sid: :unset, attributes: :unset, state: :unset, timers_inactive: :unset, timers_closed: :unset)
46
50
  data = Twilio::Values.of({
47
51
  'FriendlyName' => friendly_name,
48
52
  'DateCreated' => Twilio.serialize_iso8601_datetime(date_created),
@@ -50,6 +54,8 @@ module Twilio
50
54
  'MessagingServiceSid' => messaging_service_sid,
51
55
  'Attributes' => attributes,
52
56
  'State' => state,
57
+ 'Timers.Inactive' => timers_inactive,
58
+ 'Timers.Closed' => timers_closed,
53
59
  })
54
60
 
55
61
  payload = @version.create(
@@ -218,8 +224,12 @@ module Twilio
218
224
  # to.
219
225
  # @param [conversation.State] state Current state of this conversation. Can be
220
226
  # either `active`, `inactive` or `closed` and defaults to `active`
227
+ # @param [String] timers_inactive ISO8601 duration when conversation will be
228
+ # switched to `inactive` state. Minimum value for this timer is 1 minute.
229
+ # @param [String] timers_closed ISO8601 duration when conversation will be
230
+ # switched to `closed` state. Minimum value for this timer is 10 minutes.
221
231
  # @return [ConversationInstance] Updated ConversationInstance
222
- def update(friendly_name: :unset, date_created: :unset, date_updated: :unset, attributes: :unset, messaging_service_sid: :unset, state: :unset)
232
+ def update(friendly_name: :unset, date_created: :unset, date_updated: :unset, attributes: :unset, messaging_service_sid: :unset, state: :unset, timers_inactive: :unset, timers_closed: :unset)
223
233
  data = Twilio::Values.of({
224
234
  'FriendlyName' => friendly_name,
225
235
  'DateCreated' => Twilio.serialize_iso8601_datetime(date_created),
@@ -227,6 +237,8 @@ module Twilio
227
237
  'Attributes' => attributes,
228
238
  'MessagingServiceSid' => messaging_service_sid,
229
239
  'State' => state,
240
+ 'Timers.Inactive' => timers_inactive,
241
+ 'Timers.Closed' => timers_closed,
230
242
  })
231
243
 
232
244
  payload = @version.update(
@@ -353,6 +365,7 @@ module Twilio
353
365
  'state' => payload['state'],
354
366
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
355
367
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
368
+ 'timers' => payload['timers'],
356
369
  'url' => payload['url'],
357
370
  'links' => payload['links'],
358
371
  }
@@ -427,6 +440,12 @@ module Twilio
427
440
  @properties['date_updated']
428
441
  end
429
442
 
443
+ ##
444
+ # @return [Hash] Timer date values for this conversation.
445
+ def timers
446
+ @properties['timers']
447
+ end
448
+
430
449
  ##
431
450
  # @return [String] An absolute URL for this conversation.
432
451
  def url
@@ -454,8 +473,12 @@ module Twilio
454
473
  # to.
455
474
  # @param [conversation.State] state Current state of this conversation. Can be
456
475
  # either `active`, `inactive` or `closed` and defaults to `active`
476
+ # @param [String] timers_inactive ISO8601 duration when conversation will be
477
+ # switched to `inactive` state. Minimum value for this timer is 1 minute.
478
+ # @param [String] timers_closed ISO8601 duration when conversation will be
479
+ # switched to `closed` state. Minimum value for this timer is 10 minutes.
457
480
  # @return [ConversationInstance] Updated ConversationInstance
458
- def update(friendly_name: :unset, date_created: :unset, date_updated: :unset, attributes: :unset, messaging_service_sid: :unset, state: :unset)
481
+ def update(friendly_name: :unset, date_created: :unset, date_updated: :unset, attributes: :unset, messaging_service_sid: :unset, state: :unset, timers_inactive: :unset, timers_closed: :unset)
459
482
  context.update(
460
483
  friendly_name: friendly_name,
461
484
  date_created: date_created,
@@ -463,6 +486,8 @@ module Twilio
463
486
  attributes: attributes,
464
487
  messaging_service_sid: messaging_service_sid,
465
488
  state: state,
489
+ timers_inactive: timers_inactive,
490
+ timers_closed: timers_closed,
466
491
  )
467
492
  end
468
493
 
@@ -53,8 +53,11 @@ module Twilio
53
53
  # @param [String] messaging_binding_projected_address The address of the Twilio
54
54
  # phone number that is used in Group MMS. Communication mask for the Chat
55
55
  # participant with Identity.
56
+ # @param [String] role_sid The SID of the
57
+ # [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the
58
+ # participant.
56
59
  # @return [ParticipantInstance] Newly created ParticipantInstance
57
- def create(identity: :unset, messaging_binding_address: :unset, messaging_binding_proxy_address: :unset, date_created: :unset, date_updated: :unset, attributes: :unset, messaging_binding_projected_address: :unset)
60
+ def create(identity: :unset, messaging_binding_address: :unset, messaging_binding_proxy_address: :unset, date_created: :unset, date_updated: :unset, attributes: :unset, messaging_binding_projected_address: :unset, role_sid: :unset)
58
61
  data = Twilio::Values.of({
59
62
  'Identity' => identity,
60
63
  'MessagingBinding.Address' => messaging_binding_address,
@@ -63,6 +66,7 @@ module Twilio
63
66
  'DateUpdated' => Twilio.serialize_iso8601_datetime(date_updated),
64
67
  'Attributes' => attributes,
65
68
  'MessagingBinding.ProjectedAddress' => messaging_binding_projected_address,
69
+ 'RoleSid' => role_sid,
66
70
  })
67
71
 
68
72
  payload = @version.create(
@@ -221,12 +225,16 @@ module Twilio
221
225
  # store any data you wish. The string value must contain structurally valid JSON
222
226
  # if specified. **Note** that if the attributes are not set "{}" will be
223
227
  # returned.
228
+ # @param [String] role_sid The SID of the
229
+ # [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the
230
+ # participant.
224
231
  # @return [ParticipantInstance] Updated ParticipantInstance
225
- def update(date_created: :unset, date_updated: :unset, attributes: :unset)
232
+ def update(date_created: :unset, date_updated: :unset, attributes: :unset, role_sid: :unset)
226
233
  data = Twilio::Values.of({
227
234
  'DateCreated' => Twilio.serialize_iso8601_datetime(date_created),
228
235
  'DateUpdated' => Twilio.serialize_iso8601_datetime(date_updated),
229
236
  'Attributes' => attributes,
237
+ 'RoleSid' => role_sid,
230
238
  })
231
239
 
232
240
  payload = @version.update(
@@ -308,6 +316,7 @@ module Twilio
308
316
  'identity' => payload['identity'],
309
317
  'attributes' => payload['attributes'],
310
318
  'messaging_binding' => payload['messaging_binding'],
319
+ 'role_sid' => payload['role_sid'],
311
320
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
312
321
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
313
322
  'url' => payload['url'],
@@ -365,6 +374,12 @@ module Twilio
365
374
  @properties['messaging_binding']
366
375
  end
367
376
 
377
+ ##
378
+ # @return [String] The SID of the Role to assign to the participant
379
+ def role_sid
380
+ @properties['role_sid']
381
+ end
382
+
368
383
  ##
369
384
  # @return [Time] The date that this resource was created.
370
385
  def date_created
@@ -391,9 +406,17 @@ module Twilio
391
406
  # store any data you wish. The string value must contain structurally valid JSON
392
407
  # if specified. **Note** that if the attributes are not set "{}" will be
393
408
  # returned.
409
+ # @param [String] role_sid The SID of the
410
+ # [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the
411
+ # participant.
394
412
  # @return [ParticipantInstance] Updated ParticipantInstance
395
- def update(date_created: :unset, date_updated: :unset, attributes: :unset)
396
- context.update(date_created: date_created, date_updated: date_updated, attributes: attributes, )
413
+ def update(date_created: :unset, date_updated: :unset, attributes: :unset, role_sid: :unset)
414
+ context.update(
415
+ date_created: date_created,
416
+ date_updated: date_updated,
417
+ attributes: attributes,
418
+ role_sid: role_sid,
419
+ )
397
420
  end
398
421
 
399
422
  ##
@@ -117,7 +117,8 @@ module Twilio
117
117
  # of an SMS.
118
118
  # @param [String] chat_unique_name The chat channel's unique name.
119
119
  # @param [String] pre_engagement_data The pre-engagement data.
120
- # @param [String] task_sid The SID of the TaskRouter task.
120
+ # @param [String] task_sid The SID of the TaskRouter task. Only valid when
121
+ # integration type is `task`. `null` for integration types `studio` & `external`
121
122
  # @param [String] task_attributes The task attributes to be added for the
122
123
  # TaskRouter Task.
123
124
  # @param [Boolean] long_lived Whether to create the channel as long-lived.
@@ -161,6 +161,7 @@ module Twilio
161
161
  'runtime_domain' => payload['runtime_domain'],
162
162
  'messaging_service_instance_sid' => payload['messaging_service_instance_sid'],
163
163
  'chat_service_instance_sid' => payload['chat_service_instance_sid'],
164
+ 'flex_service_instance_sid' => payload['flex_service_instance_sid'],
164
165
  'ui_language' => payload['ui_language'],
165
166
  'ui_attributes' => payload['ui_attributes'],
166
167
  'ui_dependencies' => payload['ui_dependencies'],
@@ -296,6 +297,12 @@ module Twilio
296
297
  @properties['chat_service_instance_sid']
297
298
  end
298
299
 
300
+ ##
301
+ # @return [String] The SID of the Flex service instance
302
+ def flex_service_instance_sid
303
+ @properties['flex_service_instance_sid']
304
+ end
305
+
299
306
  ##
300
307
  # @return [String] The primary language of the Flex UI
301
308
  def ui_language
@@ -145,9 +145,10 @@ module Twilio
145
145
  # misconfigured Flex Flow and no tasks will be created.
146
146
  # @param [Boolean] long_lived When enabled, Flex will keep the chat channel active
147
147
  # so that it may be used for subsequent interactions with a contact identity.
148
+ # Defaults to `false`.
148
149
  # @param [Boolean] janitor_enabled When enabled, the Messaging Channel Janitor
149
150
  # will remove active Proxy sessions if the associated Task is deleted outside of
150
- # the Flex UI.
151
+ # the Flex UI. Defaults to `false`.
151
152
  # @param [String] integration_retry_count The number of times to retry the webhook
152
153
  # if the first attempt fails. Can be an integer between 0 and 3, inclusive, and
153
154
  # the default is 0.
@@ -279,9 +280,10 @@ module Twilio
279
280
  # misconfigured Flex Flow and no tasks will be created.
280
281
  # @param [Boolean] long_lived When enabled, Flex will keep the chat channel active
281
282
  # so that it may be used for subsequent interactions with a contact identity.
283
+ # Defaults to `false`.
282
284
  # @param [Boolean] janitor_enabled When enabled, the Messaging Channel Janitor
283
285
  # will remove active Proxy sessions if the associated Task is deleted outside of
284
- # the Flex UI.
286
+ # the Flex UI. Defaults to `false`.
285
287
  # @param [String] integration_retry_count The number of times to retry the webhook
286
288
  # if the first attempt fails. Can be an integer between 0 and 3, inclusive, and
287
289
  # the default is 0.
@@ -505,9 +507,10 @@ module Twilio
505
507
  # misconfigured Flex Flow and no tasks will be created.
506
508
  # @param [Boolean] long_lived When enabled, Flex will keep the chat channel active
507
509
  # so that it may be used for subsequent interactions with a contact identity.
510
+ # Defaults to `false`.
508
511
  # @param [Boolean] janitor_enabled When enabled, the Messaging Channel Janitor
509
512
  # will remove active Proxy sessions if the associated Task is deleted outside of
510
- # the Flex UI.
513
+ # the Flex UI. Defaults to `false`.
511
514
  # @param [String] integration_retry_count The number of times to retry the webhook
512
515
  # if the first attempt fails. Can be an integer between 0 and 3, inclusive, and
513
516
  # the default is 0.
@@ -29,10 +29,10 @@ module Twilio
29
29
  # memory before returning.
30
30
  # @param [String] log_level Only show alerts for this log-level. Can be: `error`,
31
31
  # `warning`, `notice`, or `debug`.
32
- # @param [Date] start_date Only include alerts that occurred on or after this date
32
+ # @param [Time] start_date Only include alerts that occurred on or after this date
33
33
  # and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or
34
34
  # `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported.
35
- # @param [Date] end_date Only include alerts that occurred on or before this date
35
+ # @param [Time] end_date Only include alerts that occurred on or before this date
36
36
  # and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or
37
37
  # `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported.
38
38
  # @param [Integer] limit Upper limit for the number of records to return. stream()
@@ -58,10 +58,10 @@ module Twilio
58
58
  # is reached.
59
59
  # @param [String] log_level Only show alerts for this log-level. Can be: `error`,
60
60
  # `warning`, `notice`, or `debug`.
61
- # @param [Date] start_date Only include alerts that occurred on or after this date
61
+ # @param [Time] start_date Only include alerts that occurred on or after this date
62
62
  # and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or
63
63
  # `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported.
64
- # @param [Date] end_date Only include alerts that occurred on or before this date
64
+ # @param [Time] end_date Only include alerts that occurred on or before this date
65
65
  # and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or
66
66
  # `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported.
67
67
  # @param [Integer] limit Upper limit for the number of records to return. stream()
@@ -103,10 +103,10 @@ module Twilio
103
103
  # Request is executed immediately.
104
104
  # @param [String] log_level Only show alerts for this log-level. Can be: `error`,
105
105
  # `warning`, `notice`, or `debug`.
106
- # @param [Date] start_date Only include alerts that occurred on or after this date
106
+ # @param [Time] start_date Only include alerts that occurred on or after this date
107
107
  # and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or
108
108
  # `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported.
109
- # @param [Date] end_date Only include alerts that occurred on or before this date
109
+ # @param [Time] end_date Only include alerts that occurred on or before this date
110
110
  # and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or
111
111
  # `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported.
112
112
  # @param [String] page_token PageToken provided by the API
@@ -116,8 +116,8 @@ module Twilio
116
116
  def page(log_level: :unset, start_date: :unset, end_date: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
117
117
  params = Twilio::Values.of({
118
118
  'LogLevel' => log_level,
119
- 'StartDate' => Twilio.serialize_iso8601_date(start_date),
120
- 'EndDate' => Twilio.serialize_iso8601_date(end_date),
119
+ 'StartDate' => Twilio.serialize_iso8601_datetime(start_date),
120
+ 'EndDate' => Twilio.serialize_iso8601_datetime(end_date),
121
121
  'PageToken' => page_token,
122
122
  'Page' => page_number,
123
123
  'PageSize' => page_size,
@@ -60,8 +60,11 @@ module Twilio
60
60
  # `false` and the default is `true`.
61
61
  # @param [String] alexa_skill_id Deprecated.
62
62
  # @param [String] default_alexa_notification_protocol_version Deprecated.
63
+ # @param [String] delivery_callback_url URL to send delivery status callback.
64
+ # @param [Boolean] delivery_callback_enabled Callback configuration that enables
65
+ # delivery callbacks, default false
63
66
  # @return [ServiceInstance] Newly created ServiceInstance
64
- def create(friendly_name: :unset, apn_credential_sid: :unset, gcm_credential_sid: :unset, messaging_service_sid: :unset, facebook_messenger_page_id: :unset, default_apn_notification_protocol_version: :unset, default_gcm_notification_protocol_version: :unset, fcm_credential_sid: :unset, default_fcm_notification_protocol_version: :unset, log_enabled: :unset, alexa_skill_id: :unset, default_alexa_notification_protocol_version: :unset)
67
+ def create(friendly_name: :unset, apn_credential_sid: :unset, gcm_credential_sid: :unset, messaging_service_sid: :unset, facebook_messenger_page_id: :unset, default_apn_notification_protocol_version: :unset, default_gcm_notification_protocol_version: :unset, fcm_credential_sid: :unset, default_fcm_notification_protocol_version: :unset, log_enabled: :unset, alexa_skill_id: :unset, default_alexa_notification_protocol_version: :unset, delivery_callback_url: :unset, delivery_callback_enabled: :unset)
65
68
  data = Twilio::Values.of({
66
69
  'FriendlyName' => friendly_name,
67
70
  'ApnCredentialSid' => apn_credential_sid,
@@ -75,6 +78,8 @@ module Twilio
75
78
  'LogEnabled' => log_enabled,
76
79
  'AlexaSkillId' => alexa_skill_id,
77
80
  'DefaultAlexaNotificationProtocolVersion' => default_alexa_notification_protocol_version,
81
+ 'DeliveryCallbackUrl' => delivery_callback_url,
82
+ 'DeliveryCallbackEnabled' => delivery_callback_enabled,
78
83
  })
79
84
 
80
85
  payload = @version.create(
@@ -399,6 +404,8 @@ module Twilio
399
404
  'links' => payload['links'],
400
405
  'alexa_skill_id' => payload['alexa_skill_id'],
401
406
  'default_alexa_notification_protocol_version' => payload['default_alexa_notification_protocol_version'],
407
+ 'delivery_callback_url' => payload['delivery_callback_url'],
408
+ 'delivery_callback_enabled' => payload['delivery_callback_enabled'],
402
409
  }
403
410
 
404
411
  # Context
@@ -525,6 +532,18 @@ module Twilio
525
532
  @properties['default_alexa_notification_protocol_version']
526
533
  end
527
534
 
535
+ ##
536
+ # @return [String] Webhook URL
537
+ def delivery_callback_url
538
+ @properties['delivery_callback_url']
539
+ end
540
+
541
+ ##
542
+ # @return [Boolean] Enable delivery callbacks
543
+ def delivery_callback_enabled
544
+ @properties['delivery_callback_enabled']
545
+ end
546
+
528
547
  ##
529
548
  # Deletes the ServiceInstance
530
549
  # @return [Boolean] true if delete succeeds, false otherwise
@@ -242,6 +242,7 @@ module Twilio
242
242
  @uri = "/RegulatoryCompliance/Bundles/#{@solution[:sid]}"
243
243
 
244
244
  # Dependents
245
+ @evaluations = nil
245
246
  @item_assignments = nil
246
247
  end
247
248
 
@@ -287,6 +288,24 @@ module Twilio
287
288
  BundleInstance.new(@version, payload, sid: @solution[:sid], )
288
289
  end
289
290
 
291
+ ##
292
+ # Access the evaluations
293
+ # @return [EvaluationList]
294
+ # @return [EvaluationContext] if sid was passed.
295
+ def evaluations(sid=:unset)
296
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
297
+
298
+ if sid != :unset
299
+ return EvaluationContext.new(@version, @solution[:sid], sid, )
300
+ end
301
+
302
+ unless @evaluations
303
+ @evaluations = EvaluationList.new(@version, bundle_sid: @solution[:sid], )
304
+ end
305
+
306
+ @evaluations
307
+ end
308
+
290
309
  ##
291
310
  # Access the item_assignments
292
311
  # @return [ItemAssignmentList]
@@ -454,6 +473,13 @@ module Twilio
454
473
  )
455
474
  end
456
475
 
476
+ ##
477
+ # Access the evaluations
478
+ # @return [evaluations] evaluations
479
+ def evaluations
480
+ context.evaluations
481
+ end
482
+
457
483
  ##
458
484
  # Access the item_assignments
459
485
  # @return [item_assignments] item_assignments