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
@@ -136,8 +136,13 @@ module Twilio
136
136
  # @param [Boolean] secure Whether secure SIP is enabled for the domain. If
137
137
  # enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls
138
138
  # to this sip domain.
139
+ # @param [String] byoc_trunk_sid The SID of the BYOC Trunk(Bring Your Own Carrier)
140
+ # resource that the Sip Domain will be associated with.
141
+ # @param [String] emergency_caller_sid Whether an emergency caller sid is
142
+ # configured for the domain. If present, this phone number will be used as the
143
+ # callback for the emergency call.
139
144
  # @return [DomainInstance] Newly created DomainInstance
140
- def create(domain_name: nil, friendly_name: :unset, voice_url: :unset, voice_method: :unset, voice_fallback_url: :unset, voice_fallback_method: :unset, voice_status_callback_url: :unset, voice_status_callback_method: :unset, sip_registration: :unset, emergency_calling_enabled: :unset, secure: :unset)
145
+ def create(domain_name: nil, friendly_name: :unset, voice_url: :unset, voice_method: :unset, voice_fallback_url: :unset, voice_fallback_method: :unset, voice_status_callback_url: :unset, voice_status_callback_method: :unset, sip_registration: :unset, emergency_calling_enabled: :unset, secure: :unset, byoc_trunk_sid: :unset, emergency_caller_sid: :unset)
141
146
  data = Twilio::Values.of({
142
147
  'DomainName' => domain_name,
143
148
  'FriendlyName' => friendly_name,
@@ -150,6 +155,8 @@ module Twilio
150
155
  'SipRegistration' => sip_registration,
151
156
  'EmergencyCallingEnabled' => emergency_calling_enabled,
152
157
  'Secure' => secure,
158
+ 'ByocTrunkSid' => byoc_trunk_sid,
159
+ 'EmergencyCallerSid' => emergency_caller_sid,
153
160
  })
154
161
 
155
162
  payload = @version.create(
@@ -261,8 +268,13 @@ module Twilio
261
268
  # @param [Boolean] secure Whether secure SIP is enabled for the domain. If
262
269
  # enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls
263
270
  # to this sip domain.
271
+ # @param [String] byoc_trunk_sid The SID of the BYOC Trunk(Bring Your Own Carrier)
272
+ # resource that the Sip Domain will be associated with.
273
+ # @param [String] emergency_caller_sid Whether an emergency caller sid is
274
+ # configured for the domain. If present, this phone number will be used as the
275
+ # callback for the emergency call.
264
276
  # @return [DomainInstance] Updated DomainInstance
265
- def update(friendly_name: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_status_callback_method: :unset, voice_status_callback_url: :unset, voice_url: :unset, sip_registration: :unset, domain_name: :unset, emergency_calling_enabled: :unset, secure: :unset)
277
+ def update(friendly_name: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_status_callback_method: :unset, voice_status_callback_url: :unset, voice_url: :unset, sip_registration: :unset, domain_name: :unset, emergency_calling_enabled: :unset, secure: :unset, byoc_trunk_sid: :unset, emergency_caller_sid: :unset)
266
278
  data = Twilio::Values.of({
267
279
  'FriendlyName' => friendly_name,
268
280
  'VoiceFallbackMethod' => voice_fallback_method,
@@ -275,6 +287,8 @@ module Twilio
275
287
  'DomainName' => domain_name,
276
288
  'EmergencyCallingEnabled' => emergency_calling_enabled,
277
289
  'Secure' => secure,
290
+ 'ByocTrunkSid' => byoc_trunk_sid,
291
+ 'EmergencyCallerSid' => emergency_caller_sid,
278
292
  })
279
293
 
280
294
  payload = @version.update(
@@ -407,6 +421,8 @@ module Twilio
407
421
  'sip_registration' => payload['sip_registration'],
408
422
  'emergency_calling_enabled' => payload['emergency_calling_enabled'],
409
423
  'secure' => payload['secure'],
424
+ 'byoc_trunk_sid' => payload['byoc_trunk_sid'],
425
+ 'emergency_caller_sid' => payload['emergency_caller_sid'],
410
426
  }
411
427
 
412
428
  # Context
@@ -539,6 +555,18 @@ module Twilio
539
555
  @properties['secure']
540
556
  end
541
557
 
558
+ ##
559
+ # @return [String] The SID of the BYOC Trunk resource.
560
+ def byoc_trunk_sid
561
+ @properties['byoc_trunk_sid']
562
+ end
563
+
564
+ ##
565
+ # @return [String] Whether an emergency caller sid is configured for the domain.
566
+ def emergency_caller_sid
567
+ @properties['emergency_caller_sid']
568
+ end
569
+
542
570
  ##
543
571
  # Fetch a DomainInstance
544
572
  # @return [DomainInstance] Fetched DomainInstance
@@ -572,8 +600,13 @@ module Twilio
572
600
  # @param [Boolean] secure Whether secure SIP is enabled for the domain. If
573
601
  # enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls
574
602
  # to this sip domain.
603
+ # @param [String] byoc_trunk_sid The SID of the BYOC Trunk(Bring Your Own Carrier)
604
+ # resource that the Sip Domain will be associated with.
605
+ # @param [String] emergency_caller_sid Whether an emergency caller sid is
606
+ # configured for the domain. If present, this phone number will be used as the
607
+ # callback for the emergency call.
575
608
  # @return [DomainInstance] Updated DomainInstance
576
- def update(friendly_name: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_status_callback_method: :unset, voice_status_callback_url: :unset, voice_url: :unset, sip_registration: :unset, domain_name: :unset, emergency_calling_enabled: :unset, secure: :unset)
609
+ def update(friendly_name: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_status_callback_method: :unset, voice_status_callback_url: :unset, voice_url: :unset, sip_registration: :unset, domain_name: :unset, emergency_calling_enabled: :unset, secure: :unset, byoc_trunk_sid: :unset, emergency_caller_sid: :unset)
577
610
  context.update(
578
611
  friendly_name: friendly_name,
579
612
  voice_fallback_method: voice_fallback_method,
@@ -586,6 +619,8 @@ module Twilio
586
619
  domain_name: domain_name,
587
620
  emergency_calling_enabled: emergency_calling_enabled,
588
621
  secure: secure,
622
+ byoc_trunk_sid: byoc_trunk_sid,
623
+ emergency_caller_sid: emergency_caller_sid,
589
624
  )
590
625
  end
591
626
 
@@ -117,10 +117,10 @@ module Twilio
117
117
  # Marshaled Properties
118
118
  @properties = {
119
119
  'account_sid' => payload['account_sid'],
120
- 'phone_number' => payload['phone_number'],
121
- 'friendly_name' => payload['friendly_name'],
122
- 'validation_code' => payload['validation_code'].to_i,
123
120
  'call_sid' => payload['call_sid'],
121
+ 'friendly_name' => payload['friendly_name'],
122
+ 'phone_number' => payload['phone_number'],
123
+ 'validation_code' => payload['validation_code'],
124
124
  }
125
125
  end
126
126
 
@@ -131,9 +131,9 @@ module Twilio
131
131
  end
132
132
 
133
133
  ##
134
- # @return [String] The phone number to verify in E.164 format
135
- def phone_number
136
- @properties['phone_number']
134
+ # @return [String] The SID of the Call the resource is associated with
135
+ def call_sid
136
+ @properties['call_sid']
137
137
  end
138
138
 
139
139
  ##
@@ -143,15 +143,15 @@ module Twilio
143
143
  end
144
144
 
145
145
  ##
146
- # @return [String] The 6 digit validation code that someone must enter to validate the Caller ID when `phone_number` is called
147
- def validation_code
148
- @properties['validation_code']
146
+ # @return [String] The phone number to verify in E.164 format
147
+ def phone_number
148
+ @properties['phone_number']
149
149
  end
150
150
 
151
151
  ##
152
- # @return [String] The SID of the Call the resource is associated with
153
- def call_sid
154
- @properties['call_sid']
152
+ # @return [String] The 6 digit validation code that someone must enter to validate the Caller ID when `phone_number` is called
153
+ def validation_code
154
+ @properties['validation_code']
155
155
  end
156
156
 
157
157
  ##
@@ -37,6 +37,12 @@ module Twilio
37
37
  self.v1.assistants(sid)
38
38
  end
39
39
 
40
+ ##
41
+ # @return [Twilio::REST::Autopilot::V1::RestoreAssistantInstance]
42
+ def restore_assistant
43
+ self.v1.restore_assistant()
44
+ end
45
+
40
46
  ##
41
47
  # Provide a user friendly representation
42
48
  def to_s
@@ -16,6 +16,7 @@ module Twilio
16
16
  super
17
17
  @version = 'v1'
18
18
  @assistants = nil
19
+ @restore_assistant = nil
19
20
  end
20
21
 
21
22
  ##
@@ -33,6 +34,12 @@ module Twilio
33
34
  end
34
35
  end
35
36
 
37
+ ##
38
+ # @return [Twilio::REST::Autopilot::V1::RestoreAssistantContext]
39
+ def restore_assistant
40
+ @restore_assistant ||= RestoreAssistantList.new self
41
+ end
42
+
36
43
  ##
37
44
  # Provide a user friendly representation
38
45
  def to_s
@@ -209,7 +209,6 @@ module Twilio
209
209
  @defaults = nil
210
210
  @dialogues = nil
211
211
  @webhooks = nil
212
- @export_assistant = nil
213
212
  end
214
213
 
215
214
  ##
@@ -399,14 +398,6 @@ module Twilio
399
398
  @webhooks
400
399
  end
401
400
 
402
- ##
403
- # Access the export_assistant
404
- # @return [ExportAssistantList]
405
- # @return [ExportAssistantContext]
406
- def export_assistant
407
- ExportAssistantContext.new(@version, @solution[:sid], )
408
- end
409
-
410
401
  ##
411
402
  # Provide a user friendly representation
412
403
  def to_s
@@ -656,13 +647,6 @@ module Twilio
656
647
  context.webhooks
657
648
  end
658
649
 
659
- ##
660
- # Access the export_assistant
661
- # @return [export_assistant] export_assistant
662
- def export_assistant
663
- context.export_assistant
664
- end
665
-
666
650
  ##
667
651
  # Provide a user friendly representation
668
652
  def to_s
@@ -39,6 +39,8 @@ module Twilio
39
39
  # Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
40
40
  # @param [String] status The status of the resources to read. Can be:
41
41
  # `pending-review`, `reviewed`, or `discarded`
42
+ # @param [String] dialogue_sid The SID of the
43
+ # [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue).
42
44
  # @param [Integer] limit Upper limit for the number of records to return. stream()
43
45
  # guarantees to never return more than limit. Default is no limit
44
46
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -46,11 +48,12 @@ module Twilio
46
48
  # but a limit is defined, stream() will attempt to read the limit with the most
47
49
  # efficient page size, i.e. min(limit, 1000)
48
50
  # @return [Array] Array of up to limit results
49
- def list(language: :unset, model_build: :unset, status: :unset, limit: nil, page_size: nil)
51
+ def list(language: :unset, model_build: :unset, status: :unset, dialogue_sid: :unset, limit: nil, page_size: nil)
50
52
  self.stream(
51
53
  language: language,
52
54
  model_build: model_build,
53
55
  status: status,
56
+ dialogue_sid: dialogue_sid,
54
57
  limit: limit,
55
58
  page_size: page_size
56
59
  ).entries
@@ -66,6 +69,8 @@ module Twilio
66
69
  # Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
67
70
  # @param [String] status The status of the resources to read. Can be:
68
71
  # `pending-review`, `reviewed`, or `discarded`
72
+ # @param [String] dialogue_sid The SID of the
73
+ # [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue).
69
74
  # @param [Integer] limit Upper limit for the number of records to return. stream()
70
75
  # guarantees to never return more than limit. Default is no limit.
71
76
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -73,13 +78,14 @@ module Twilio
73
78
  # but a limit is defined, stream() will attempt to read the limit with the most
74
79
  # efficient page size, i.e. min(limit, 1000)
75
80
  # @return [Enumerable] Enumerable that will yield up to limit results
76
- def stream(language: :unset, model_build: :unset, status: :unset, limit: nil, page_size: nil)
81
+ def stream(language: :unset, model_build: :unset, status: :unset, dialogue_sid: :unset, limit: nil, page_size: nil)
77
82
  limits = @version.read_limits(limit, page_size)
78
83
 
79
84
  page = self.page(
80
85
  language: language,
81
86
  model_build: model_build,
82
87
  status: status,
88
+ dialogue_sid: dialogue_sid,
83
89
  page_size: limits[:page_size],
84
90
  )
85
91
 
@@ -109,15 +115,18 @@ module Twilio
109
115
  # Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
110
116
  # @param [String] status The status of the resources to read. Can be:
111
117
  # `pending-review`, `reviewed`, or `discarded`
118
+ # @param [String] dialogue_sid The SID of the
119
+ # [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue).
112
120
  # @param [String] page_token PageToken provided by the API
113
121
  # @param [Integer] page_number Page Number, this value is simply for client state
114
122
  # @param [Integer] page_size Number of records to return, defaults to 50
115
123
  # @return [Page] Page of QueryInstance
116
- def page(language: :unset, model_build: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
124
+ def page(language: :unset, model_build: :unset, status: :unset, dialogue_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
117
125
  params = Twilio::Values.of({
118
126
  'Language' => language,
119
127
  'ModelBuild' => model_build,
120
128
  'Status' => status,
129
+ 'DialogueSid' => dialogue_sid,
121
130
  'PageToken' => page_token,
122
131
  'Page' => page_number,
123
132
  'PageSize' => page_size,
@@ -0,0 +1,198 @@
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 Autopilot < Domain
12
+ class V1 < Version
13
+ ##
14
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
15
+ class RestoreAssistantList < ListResource
16
+ ##
17
+ # Initialize the RestoreAssistantList
18
+ # @param [Version] version Version that contains the resource
19
+ # @return [RestoreAssistantList] RestoreAssistantList
20
+ def initialize(version)
21
+ super(version)
22
+
23
+ # Path Solution
24
+ @solution = {}
25
+ @uri = "/Assistants/Restore"
26
+ end
27
+
28
+ ##
29
+ # Update the RestoreAssistantInstance
30
+ # @param [String] assistant The Twilio-provided string that uniquely identifies
31
+ # the Assistant resource to restore.
32
+ # @return [RestoreAssistantInstance] Updated RestoreAssistantInstance
33
+ def update(assistant: nil)
34
+ data = Twilio::Values.of({'Assistant' => assistant, })
35
+
36
+ payload = @version.update(
37
+ 'POST',
38
+ @uri,
39
+ data: data,
40
+ )
41
+
42
+ RestoreAssistantInstance.new(@version, payload, )
43
+ end
44
+
45
+ ##
46
+ # Provide a user friendly representation
47
+ def to_s
48
+ '#<Twilio.Autopilot.V1.RestoreAssistantList>'
49
+ end
50
+ end
51
+
52
+ ##
53
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
54
+ class RestoreAssistantPage < Page
55
+ ##
56
+ # Initialize the RestoreAssistantPage
57
+ # @param [Version] version Version that contains the resource
58
+ # @param [Response] response Response from the API
59
+ # @param [Hash] solution Path solution for the resource
60
+ # @return [RestoreAssistantPage] RestoreAssistantPage
61
+ def initialize(version, response, solution)
62
+ super(version, response)
63
+
64
+ # Path Solution
65
+ @solution = solution
66
+ end
67
+
68
+ ##
69
+ # Build an instance of RestoreAssistantInstance
70
+ # @param [Hash] payload Payload response from the API
71
+ # @return [RestoreAssistantInstance] RestoreAssistantInstance
72
+ def get_instance(payload)
73
+ RestoreAssistantInstance.new(@version, payload, )
74
+ end
75
+
76
+ ##
77
+ # Provide a user friendly representation
78
+ def to_s
79
+ '<Twilio.Autopilot.V1.RestoreAssistantPage>'
80
+ end
81
+ end
82
+
83
+ ##
84
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
85
+ class RestoreAssistantInstance < InstanceResource
86
+ ##
87
+ # Initialize the RestoreAssistantInstance
88
+ # @param [Version] version Version that contains the resource
89
+ # @param [Hash] payload payload that contains response from Twilio
90
+ # @return [RestoreAssistantInstance] RestoreAssistantInstance
91
+ def initialize(version, payload)
92
+ super(version)
93
+
94
+ # Marshaled Properties
95
+ @properties = {
96
+ 'account_sid' => payload['account_sid'],
97
+ 'sid' => payload['sid'],
98
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
99
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
100
+ 'unique_name' => payload['unique_name'],
101
+ 'friendly_name' => payload['friendly_name'],
102
+ 'needs_model_build' => payload['needs_model_build'],
103
+ 'latest_model_build_sid' => payload['latest_model_build_sid'],
104
+ 'log_queries' => payload['log_queries'],
105
+ 'development_stage' => payload['development_stage'],
106
+ 'callback_url' => payload['callback_url'],
107
+ 'callback_events' => payload['callback_events'],
108
+ }
109
+ end
110
+
111
+ ##
112
+ # @return [String] The SID of the Account that created the resource
113
+ def account_sid
114
+ @properties['account_sid']
115
+ end
116
+
117
+ ##
118
+ # @return [String] The unique string that identifies the resource
119
+ def sid
120
+ @properties['sid']
121
+ end
122
+
123
+ ##
124
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was created
125
+ def date_created
126
+ @properties['date_created']
127
+ end
128
+
129
+ ##
130
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
131
+ def date_updated
132
+ @properties['date_updated']
133
+ end
134
+
135
+ ##
136
+ # @return [String] An application-defined string that uniquely identifies the resource
137
+ def unique_name
138
+ @properties['unique_name']
139
+ end
140
+
141
+ ##
142
+ # @return [String] The string that you assigned to describe the resource
143
+ def friendly_name
144
+ @properties['friendly_name']
145
+ end
146
+
147
+ ##
148
+ # @return [Boolean] Whether model needs to be rebuilt
149
+ def needs_model_build
150
+ @properties['needs_model_build']
151
+ end
152
+
153
+ ##
154
+ # @return [String] Reserved
155
+ def latest_model_build_sid
156
+ @properties['latest_model_build_sid']
157
+ end
158
+
159
+ ##
160
+ # @return [Boolean] Whether queries should be logged and kept after training
161
+ def log_queries
162
+ @properties['log_queries']
163
+ end
164
+
165
+ ##
166
+ # @return [String] A string describing the state of the assistant.
167
+ def development_stage
168
+ @properties['development_stage']
169
+ end
170
+
171
+ ##
172
+ # @return [String] Reserved
173
+ def callback_url
174
+ @properties['callback_url']
175
+ end
176
+
177
+ ##
178
+ # @return [String] Reserved
179
+ def callback_events
180
+ @properties['callback_events']
181
+ end
182
+
183
+ ##
184
+ # Provide a user friendly representation
185
+ def to_s
186
+ "<Twilio.Autopilot.V1.RestoreAssistantInstance>"
187
+ end
188
+
189
+ ##
190
+ # Provide a detailed, user friendly representation
191
+ def inspect
192
+ "<Twilio.Autopilot.V1.RestoreAssistantInstance>"
193
+ end
194
+ end
195
+ end
196
+ end
197
+ end
198
+ end