twilio-ruby 6.8.3 → 6.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +36 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/http/http_client.rb +3 -2
  5. data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +0 -14
  6. data/lib/twilio-ruby/rest/client.rb +0 -5
  7. data/lib/twilio-ruby/rest/events/v1/event_type.rb +0 -2
  8. data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +0 -2
  9. data/lib/twilio-ruby/rest/events/v1/schema.rb +0 -2
  10. data/lib/twilio-ruby/rest/events/v1/sink.rb +0 -2
  11. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +4 -6
  12. data/lib/twilio-ruby/rest/events/v1/subscription.rb +0 -2
  13. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb +245 -0
  14. data/lib/twilio-ruby/rest/numbers/v1.rb +15 -0
  15. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +27 -27
  16. data/lib/twilio-ruby/rest/preview/sync/service.rb +27 -27
  17. data/lib/twilio-ruby/rest/preview.rb +1 -11
  18. data/lib/twilio-ruby/rest/preview_base.rb +0 -5
  19. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +6 -0
  20. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +6 -0
  21. data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +59 -2
  22. data/lib/twilio-ruby/version.rb +1 -1
  23. metadata +3 -35
  24. data/lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb +0 -241
  25. data/lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb +0 -217
  26. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +0 -389
  27. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +0 -435
  28. data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +0 -409
  29. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +0 -473
  30. data/lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb +0 -241
  31. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +0 -373
  32. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +0 -436
  33. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb +0 -253
  34. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +0 -226
  35. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +0 -525
  36. data/lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb +0 -433
  37. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -683
  38. data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +0 -207
  39. data/lib/twilio-ruby/rest/autopilot/v1.rb +0 -55
  40. data/lib/twilio-ruby/rest/autopilot.rb +0 -22
  41. data/lib/twilio-ruby/rest/autopilot_base.rb +0 -38
  42. data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb +0 -241
  43. data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_initiation_actions.rb +0 -241
  44. data/lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb +0 -217
  45. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +0 -389
  46. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +0 -435
  47. data/lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb +0 -409
  48. data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +0 -463
  49. data/lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb +0 -241
  50. data/lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb +0 -373
  51. data/lib/twilio-ruby/rest/preview/understand/assistant/task/sample.rb +0 -436
  52. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb +0 -253
  53. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +0 -226
  54. data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +0 -525
  55. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +0 -663
  56. data/lib/twilio-ruby/rest/preview/understand.rb +0 -49
@@ -1,207 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
- # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
- # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
- #
7
- # Twilio - Autopilot
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 Autopilot < AutopilotBase
19
- class V1 < Version
20
- class RestoreAssistantList < ListResource
21
- ##
22
- # Initialize the RestoreAssistantList
23
- # @param [Version] version Version that contains the resource
24
- # @return [RestoreAssistantList] RestoreAssistantList
25
- def initialize(version)
26
- super(version)
27
- # Path Solution
28
- @solution = { }
29
- @uri = "/Assistants/Restore"
30
-
31
- end
32
- ##
33
- # Update the RestoreAssistantInstance
34
- # @param [String] assistant The Twilio-provided string that uniquely identifies the Assistant resource to restore.
35
- # @return [RestoreAssistantInstance] Updated RestoreAssistantInstance
36
- def update(
37
- assistant: nil
38
- )
39
-
40
- data = Twilio::Values.of({
41
- 'Assistant' => assistant,
42
- })
43
-
44
- payload = @version.update('POST', @uri, data: data)
45
- RestoreAssistantInstance.new(
46
- @version,
47
- payload,
48
- )
49
- end
50
-
51
-
52
-
53
-
54
- # Provide a user friendly representation
55
- def to_s
56
- '#<Twilio.Autopilot.V1.RestoreAssistantList>'
57
- end
58
- end
59
-
60
- class RestoreAssistantPage < Page
61
- ##
62
- # Initialize the RestoreAssistantPage
63
- # @param [Version] version Version that contains the resource
64
- # @param [Response] response Response from the API
65
- # @param [Hash] solution Path solution for the resource
66
- # @return [RestoreAssistantPage] RestoreAssistantPage
67
- def initialize(version, response, solution)
68
- super(version, response)
69
-
70
- # Path Solution
71
- @solution = solution
72
- end
73
-
74
- ##
75
- # Build an instance of RestoreAssistantInstance
76
- # @param [Hash] payload Payload response from the API
77
- # @return [RestoreAssistantInstance] RestoreAssistantInstance
78
- def get_instance(payload)
79
- RestoreAssistantInstance.new(@version, payload)
80
- end
81
-
82
- ##
83
- # Provide a user friendly representation
84
- def to_s
85
- '<Twilio.Autopilot.V1.RestoreAssistantPage>'
86
- end
87
- end
88
- class RestoreAssistantInstance < InstanceResource
89
- ##
90
- # Initialize the RestoreAssistantInstance
91
- # @param [Version] version Version that contains the resource
92
- # @param [Hash] payload payload that contains response from Twilio
93
- # @param [String] account_sid The SID of the
94
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this RestoreAssistant
95
- # resource.
96
- # @param [String] sid The SID of the Call resource to fetch.
97
- # @return [RestoreAssistantInstance] RestoreAssistantInstance
98
- def initialize(version, payload )
99
- super(version)
100
-
101
- # Marshaled Properties
102
- @properties = {
103
- 'account_sid' => payload['account_sid'],
104
- 'sid' => payload['sid'],
105
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
106
- 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
107
- 'unique_name' => payload['unique_name'],
108
- 'friendly_name' => payload['friendly_name'],
109
- 'needs_model_build' => payload['needs_model_build'],
110
- 'latest_model_build_sid' => payload['latest_model_build_sid'],
111
- 'log_queries' => payload['log_queries'],
112
- 'development_stage' => payload['development_stage'],
113
- 'callback_url' => payload['callback_url'],
114
- 'callback_events' => payload['callback_events'],
115
- }
116
- end
117
-
118
-
119
- ##
120
- # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Assistant resource.
121
- def account_sid
122
- @properties['account_sid']
123
- end
124
-
125
- ##
126
- # @return [String] The unique string that we created to identify the Assistant resource.
127
- def sid
128
- @properties['sid']
129
- end
130
-
131
- ##
132
- # @return [Time] The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
133
- def date_created
134
- @properties['date_created']
135
- end
136
-
137
- ##
138
- # @return [Time] The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
139
- def date_updated
140
- @properties['date_updated']
141
- end
142
-
143
- ##
144
- # @return [String] An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource.
145
- def unique_name
146
- @properties['unique_name']
147
- end
148
-
149
- ##
150
- # @return [String] The string that you assigned to describe the resource. It is not unique and can be up to 255 characters long.
151
- def friendly_name
152
- @properties['friendly_name']
153
- end
154
-
155
- ##
156
- # @return [Boolean] Whether model needs to be rebuilt.
157
- def needs_model_build
158
- @properties['needs_model_build']
159
- end
160
-
161
- ##
162
- # @return [String] Reserved.
163
- def latest_model_build_sid
164
- @properties['latest_model_build_sid']
165
- end
166
-
167
- ##
168
- # @return [Boolean] Whether queries should be logged and kept after training. Can be: `true` or `false` and defaults to `true`. If `true`, queries are stored for 30 days, and then deleted. If `false`, no queries are stored.
169
- def log_queries
170
- @properties['log_queries']
171
- end
172
-
173
- ##
174
- # @return [String] A string describing the state of the assistant.
175
- def development_stage
176
- @properties['development_stage']
177
- end
178
-
179
- ##
180
- # @return [String] Reserved.
181
- def callback_url
182
- @properties['callback_url']
183
- end
184
-
185
- ##
186
- # @return [String] Reserved.
187
- def callback_events
188
- @properties['callback_events']
189
- end
190
-
191
- ##
192
- # Provide a user friendly representation
193
- def to_s
194
- "<Twilio.Autopilot.V1.RestoreAssistantInstance>"
195
- end
196
-
197
- ##
198
- # Provide a detailed, user friendly representation
199
- def inspect
200
- "<Twilio.Autopilot.V1.RestoreAssistantInstance>"
201
- end
202
- end
203
-
204
- end
205
- end
206
- end
207
- end
@@ -1,55 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
- # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
- # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
- #
7
- # Twilio - Autopilot
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
- module Twilio
16
- module REST
17
- class Autopilot
18
- class V1 < Version
19
- ##
20
- # Initialize the V1 version of Autopilot
21
- def initialize(domain)
22
- super
23
- @version = 'v1'
24
- @assistants = nil
25
- @restore_assistant = nil
26
- end
27
-
28
- ##
29
- # @param [String] sid The Twilio-provided string that uniquely identifies the Assistant resource to fetch.
30
- # @return [Twilio::REST::Autopilot::V1::AssistantContext] if sid was passed.
31
- # @return [Twilio::REST::Autopilot::V1::AssistantList]
32
- def assistants(sid=:unset)
33
- if sid.nil?
34
- raise ArgumentError, 'sid cannot be nil'
35
- end
36
- if sid == :unset
37
- @assistants ||= AssistantList.new self
38
- else
39
- AssistantContext.new(self, sid)
40
- end
41
- end
42
- ##
43
- # @return [Twilio::REST::Autopilot::V1::RestoreAssistantList]
44
- def restore_assistant
45
- @restore_assistant ||= RestoreAssistantList.new self
46
- end
47
- ##
48
- # Provide a user friendly representation
49
- def to_s
50
- '<Twilio::REST::Autopilot::V1>';
51
- end
52
- end
53
- end
54
- end
55
- end
@@ -1,22 +0,0 @@
1
- module Twilio
2
- module REST
3
- class Autopilot < AutopilotBase
4
- ##
5
- # @param [String] sid The unique string that we created to identify the Assistant
6
- # resource.
7
- # @return [Twilio::REST::Autopilot::V1::AssistantInstance] if sid was passed.
8
- # @return [Twilio::REST::Autopilot::V1::AssistantList]
9
- def assistants(sid=:unset)
10
- warn "assistants is deprecated. Use v1.assistants instead."
11
- self.v1.assistants(sid)
12
- end
13
-
14
- ##
15
- # @return [Twilio::REST::Autopilot::V1::RestoreAssistantInstance]
16
- def restore_assistant
17
- warn "restore_assistant is deprecated. Use v1.restore_assistant instead."
18
- self.v1.restore_assistant()
19
- end
20
- end
21
- end
22
- end
@@ -1,38 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
- # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
- # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
- #
7
- # NOTE: This class is auto generated by OpenAPI Generator.
8
- # https://openapi-generator.tech
9
- # Do not edit the class manually.
10
- # frozen_string_literal: true
11
- module Twilio
12
- module REST
13
- class AutopilotBase < Domain
14
- ##
15
- # Initialize autopilot domain
16
- #
17
- # @param twilio - The twilio client
18
- #
19
- def initialize(twilio)
20
- super(twilio)
21
- @base_url = "https://autopilot.twilio.com"
22
- @host = "autopilot.twilio.com"
23
- @port = 443
24
- @v1 = nil
25
- end
26
-
27
- def v1
28
- @v1 ||= Autopilot::V1.new self
29
- end
30
-
31
- ##
32
- # Provide a user friendly representation
33
- def to_s
34
- '<Twilio::REST::Autopilot::V1>';
35
- end
36
- end
37
- end
38
- end
@@ -1,241 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
- # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
- # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
- #
7
- # Twilio - Preview
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 Preview < PreviewBase
19
- class Understand < Version
20
- class AssistantContext < InstanceContext
21
-
22
- class AssistantFallbackActionsList < ListResource
23
- ##
24
- # Initialize the AssistantFallbackActionsList
25
- # @param [Version] version Version that contains the resource
26
- # @return [AssistantFallbackActionsList] AssistantFallbackActionsList
27
- def initialize(version, assistant_sid: nil)
28
- super(version)
29
- # Path Solution
30
- @solution = { assistant_sid: assistant_sid }
31
-
32
-
33
- end
34
-
35
-
36
-
37
- # Provide a user friendly representation
38
- def to_s
39
- '#<Twilio.Preview.Understand.AssistantFallbackActionsList>'
40
- end
41
- end
42
-
43
-
44
- ##
45
- #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.
46
- class AssistantFallbackActionsContext < InstanceContext
47
- ##
48
- # Initialize the AssistantFallbackActionsContext
49
- # @param [Version] version Version that contains the resource
50
- # @param [String] assistant_sid
51
- # @return [AssistantFallbackActionsContext] AssistantFallbackActionsContext
52
- def initialize(version, assistant_sid)
53
- super(version)
54
-
55
- # Path Solution
56
- @solution = { assistant_sid: assistant_sid, }
57
- @uri = "/Assistants/#{@solution[:assistant_sid]}/FallbackActions"
58
-
59
-
60
- end
61
- ##
62
- # Fetch the AssistantFallbackActionsInstance
63
- # @return [AssistantFallbackActionsInstance] Fetched AssistantFallbackActionsInstance
64
- def fetch
65
-
66
- payload = @version.fetch('GET', @uri)
67
- AssistantFallbackActionsInstance.new(
68
- @version,
69
- payload,
70
- assistant_sid: @solution[:assistant_sid],
71
- )
72
- end
73
-
74
- ##
75
- # Update the AssistantFallbackActionsInstance
76
- # @param [Object] fallback_actions
77
- # @return [AssistantFallbackActionsInstance] Updated AssistantFallbackActionsInstance
78
- def update(
79
- fallback_actions: :unset
80
- )
81
-
82
- data = Twilio::Values.of({
83
- 'FallbackActions' => Twilio.serialize_object(fallback_actions),
84
- })
85
-
86
- payload = @version.update('POST', @uri, data: data)
87
- AssistantFallbackActionsInstance.new(
88
- @version,
89
- payload,
90
- assistant_sid: @solution[:assistant_sid],
91
- )
92
- end
93
-
94
-
95
- ##
96
- # Provide a user friendly representation
97
- def to_s
98
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
99
- "#<Twilio.Preview.Understand.AssistantFallbackActionsContext #{context}>"
100
- end
101
-
102
- ##
103
- # Provide a detailed, user friendly representation
104
- def inspect
105
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
106
- "#<Twilio.Preview.Understand.AssistantFallbackActionsContext #{context}>"
107
- end
108
- end
109
-
110
- class AssistantFallbackActionsPage < Page
111
- ##
112
- # Initialize the AssistantFallbackActionsPage
113
- # @param [Version] version Version that contains the resource
114
- # @param [Response] response Response from the API
115
- # @param [Hash] solution Path solution for the resource
116
- # @return [AssistantFallbackActionsPage] AssistantFallbackActionsPage
117
- def initialize(version, response, solution)
118
- super(version, response)
119
-
120
- # Path Solution
121
- @solution = solution
122
- end
123
-
124
- ##
125
- # Build an instance of AssistantFallbackActionsInstance
126
- # @param [Hash] payload Payload response from the API
127
- # @return [AssistantFallbackActionsInstance] AssistantFallbackActionsInstance
128
- def get_instance(payload)
129
- AssistantFallbackActionsInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid])
130
- end
131
-
132
- ##
133
- # Provide a user friendly representation
134
- def to_s
135
- '<Twilio.Preview.Understand.AssistantFallbackActionsPage>'
136
- end
137
- end
138
- class AssistantFallbackActionsInstance < InstanceResource
139
- ##
140
- # Initialize the AssistantFallbackActionsInstance
141
- # @param [Version] version Version that contains the resource
142
- # @param [Hash] payload payload that contains response from Twilio
143
- # @param [String] account_sid The SID of the
144
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this AssistantFallbackActions
145
- # resource.
146
- # @param [String] sid The SID of the Call resource to fetch.
147
- # @return [AssistantFallbackActionsInstance] AssistantFallbackActionsInstance
148
- def initialize(version, payload , assistant_sid: nil)
149
- super(version)
150
-
151
- # Marshaled Properties
152
- @properties = {
153
- 'account_sid' => payload['account_sid'],
154
- 'assistant_sid' => payload['assistant_sid'],
155
- 'url' => payload['url'],
156
- 'data' => payload['data'],
157
- }
158
-
159
- # Context
160
- @instance_context = nil
161
- @params = { 'assistant_sid' => assistant_sid || @properties['assistant_sid'] , }
162
- end
163
-
164
- ##
165
- # Generate an instance context for the instance, the context is capable of
166
- # performing various actions. All instance actions are proxied to the context
167
- # @return [AssistantFallbackActionsContext] CallContext for this CallInstance
168
- def context
169
- unless @instance_context
170
- @instance_context = AssistantFallbackActionsContext.new(@version , @params['assistant_sid'])
171
- end
172
- @instance_context
173
- end
174
-
175
- ##
176
- # @return [String]
177
- def account_sid
178
- @properties['account_sid']
179
- end
180
-
181
- ##
182
- # @return [String]
183
- def assistant_sid
184
- @properties['assistant_sid']
185
- end
186
-
187
- ##
188
- # @return [String]
189
- def url
190
- @properties['url']
191
- end
192
-
193
- ##
194
- # @return [Hash]
195
- def data
196
- @properties['data']
197
- end
198
-
199
- ##
200
- # Fetch the AssistantFallbackActionsInstance
201
- # @return [AssistantFallbackActionsInstance] Fetched AssistantFallbackActionsInstance
202
- def fetch
203
-
204
- context.fetch
205
- end
206
-
207
- ##
208
- # Update the AssistantFallbackActionsInstance
209
- # @param [Object] fallback_actions
210
- # @return [AssistantFallbackActionsInstance] Updated AssistantFallbackActionsInstance
211
- def update(
212
- fallback_actions: :unset
213
- )
214
-
215
- context.update(
216
- fallback_actions: fallback_actions,
217
- )
218
- end
219
-
220
- ##
221
- # Provide a user friendly representation
222
- def to_s
223
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
224
- "<Twilio.Preview.Understand.AssistantFallbackActionsInstance #{values}>"
225
- end
226
-
227
- ##
228
- # Provide a detailed, user friendly representation
229
- def inspect
230
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
231
- "<Twilio.Preview.Understand.AssistantFallbackActionsInstance #{values}>"
232
- end
233
- end
234
-
235
- end
236
- end
237
- end
238
- end
239
- end
240
-
241
-