twilio-ruby 7.10.7 → 7.11.1

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 (105) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test-and-deploy.yml +43 -67
  3. data/.gitignore +0 -1
  4. data/CHANGES.md +46 -0
  5. data/Gemfile +2 -0
  6. data/Gemfile.lock +154 -0
  7. data/README.md +3 -3
  8. data/Rakefile +1 -1
  9. data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +25 -6
  10. data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +48 -12
  11. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +6 -0
  12. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +56 -2
  13. data/lib/twilio-ruby/rest/client.rb +0 -5
  14. data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +11 -1
  15. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +10 -10
  16. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +10 -10
  17. data/lib/twilio-ruby/rest/conversations/v2/action.rb +2 -2
  18. data/lib/twilio-ruby/rest/conversations/v2/communication.rb +43 -21
  19. data/lib/twilio-ruby/rest/conversations/v2/configuration.rb +59 -21
  20. data/lib/twilio-ruby/rest/conversations/v2/conversation.rb +28 -28
  21. data/lib/twilio-ruby/rest/conversations/v2/operation.rb +10 -10
  22. data/lib/twilio-ruby/rest/conversations/v2/participant.rb +58 -58
  23. data/lib/twilio-ruby/rest/conversations/v2.rb +45 -45
  24. data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +2 -2
  25. data/lib/twilio-ruby/rest/iam/v1/o_auth_app.rb +15 -2
  26. data/lib/twilio-ruby/rest/iam_base.rb +6 -1
  27. data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +7 -0
  28. data/lib/twilio-ruby/rest/insights/v1/call/event.rb +7 -0
  29. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
  30. data/lib/twilio-ruby/rest/insights/v3/metadata.rb +1 -1
  31. data/lib/twilio-ruby/rest/insights/v3/query.rb +1 -1
  32. data/lib/twilio-ruby/rest/insights/v3.rb +1 -1
  33. data/lib/twilio-ruby/rest/intelligence/v3/conversation.rb +8 -8
  34. data/lib/twilio-ruby/rest/intelligence/v3/rule_execution.rb +502 -0
  35. data/lib/twilio-ruby/rest/intelligence/v3.rb +6 -0
  36. data/lib/twilio-ruby/rest/knowledge/v2/chunk.rb +28 -0
  37. data/lib/twilio-ruby/rest/knowledge/v2/knowledge.rb +38 -0
  38. data/lib/twilio-ruby/rest/knowledge/v2/search.rb +8 -117
  39. data/lib/twilio-ruby/rest/knowledge/v2.rb +1 -2
  40. data/lib/twilio-ruby/rest/memory/v1/bulk.rb +9 -118
  41. data/lib/twilio-ruby/rest/memory/v1/conversation_summary.rb +13 -5
  42. data/lib/twilio-ruby/rest/memory/v1/data_mapping.rb +6 -12
  43. data/lib/twilio-ruby/rest/memory/v1/identifier.rb +1 -1
  44. data/lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb +11 -132
  45. data/lib/twilio-ruby/rest/memory/v1/import.rb +28 -5
  46. data/lib/twilio-ruby/rest/memory/v1/lookup.rb +1 -1
  47. data/lib/twilio-ruby/rest/memory/v1/observation.rb +70 -18
  48. data/lib/twilio-ruby/rest/memory/v1/operation.rb +1 -1
  49. data/lib/twilio-ruby/rest/memory/v1/profile.rb +2 -2
  50. data/lib/twilio-ruby/rest/memory/v1/recall.rb +1 -1
  51. data/lib/twilio-ruby/rest/memory/v1/revision.rb +1 -1
  52. data/lib/twilio-ruby/rest/memory/v1/store.rb +1 -1
  53. data/lib/twilio-ruby/rest/memory/v1/trait.rb +1 -1
  54. data/lib/twilio-ruby/rest/memory/v1/trait_group.rb +56 -6
  55. data/lib/twilio-ruby/rest/memory/v1.rb +3 -46
  56. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +0 -18
  57. data/lib/twilio-ruby/rest/messaging/v2/channels_sender.rb +23 -4
  58. data/lib/twilio-ruby/rest/messaging/v3/typing_indicator.rb +4 -4
  59. data/lib/twilio-ruby/rest/numbers/v1/sms_verification.rb +231 -0
  60. data/lib/twilio-ruby/rest/numbers/v1/sms_verification_check.rb +238 -0
  61. data/lib/twilio-ruby/rest/numbers/v1/voice_verification.rb +245 -0
  62. data/lib/twilio-ruby/rest/numbers/v1/voice_verification_check.rb +224 -0
  63. data/lib/twilio-ruby/rest/numbers/v1.rb +24 -0
  64. data/lib/twilio-ruby/rest/{assistants/v1/session.rb → numbers/v2/caller_id.rb} +141 -127
  65. data/lib/twilio-ruby/rest/numbers/v2.rb +16 -0
  66. data/lib/twilio-ruby/rest/oauth/v2/authorize.rb +14 -2
  67. data/lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb +259 -0
  68. data/lib/twilio-ruby/rest/oauth/v2/token.rb +8 -2
  69. data/lib/twilio-ruby/rest/preview_iam/versionless/organization.rb +0 -19
  70. data/lib/twilio-ruby/rest/routes/v3/phone_number.rb +465 -0
  71. data/lib/twilio-ruby/rest/routes/v3.rb +50 -0
  72. data/lib/twilio-ruby/rest/routes_base.rb +6 -1
  73. data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration.rb +330 -0
  74. data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration_embedded_session.rb +233 -0
  75. data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration.rb +321 -0
  76. data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration_embedded_session.rb +233 -0
  77. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles_provisional_copy.rb +445 -0
  78. data/lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb +445 -0
  79. data/lib/twilio-ruby/rest/trusthub/v1.rb +74 -0
  80. data/lib/twilio-ruby/rest/voice/v2/account_default_configuration.rb +556 -0
  81. data/lib/twilio-ruby/rest/voice/v2/configuration/default.rb +356 -0
  82. data/lib/twilio-ruby/rest/voice/v2/configuration.rb +412 -0
  83. data/lib/twilio-ruby/rest/voice/v2/recording.rb +616 -0
  84. data/lib/twilio-ruby/rest/voice/v2/transcription.rb +591 -0
  85. data/lib/twilio-ruby/rest/voice/v2/type.rb +518 -0
  86. data/lib/twilio-ruby/rest/voice/v2.rb +141 -0
  87. data/lib/twilio-ruby/rest/voice_base.rb +5 -0
  88. data/lib/twilio-ruby/twiml/voice_response.rb +6 -68
  89. data/lib/twilio-ruby/version.rb +1 -1
  90. data/twilio-ruby.gemspec +1 -1
  91. metadata +33 -21
  92. data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_knowledge.rb +0 -558
  93. data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_tool.rb +0 -558
  94. data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +0 -431
  95. data/lib/twilio-ruby/rest/assistants/v1/assistant/message.rb +0 -296
  96. data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +0 -927
  97. data/lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb +0 -325
  98. data/lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb +0 -349
  99. data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +0 -871
  100. data/lib/twilio-ruby/rest/assistants/v1/policy.rb +0 -364
  101. data/lib/twilio-ruby/rest/assistants/v1/session/message.rb +0 -360
  102. data/lib/twilio-ruby/rest/assistants/v1/tool.rb +0 -847
  103. data/lib/twilio-ruby/rest/assistants/v1.rb +0 -104
  104. data/lib/twilio-ruby/rest/assistants.rb +0 -6
  105. data/lib/twilio-ruby/rest/assistants_base.rb +0 -38
@@ -1,364 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
- # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
- # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
- #
7
- # Twilio - Assistants
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 Assistants < AssistantsBase
19
- class V1 < Version
20
- class PolicyList < ListResource
21
-
22
- ##
23
- # Initialize the PolicyList
24
- # @param [Version] version Version that contains the resource
25
- # @return [PolicyList] PolicyList
26
- def initialize(version)
27
- super(version)
28
-
29
- # Path Solution
30
- @solution = { }
31
- @uri = "/Policies"
32
-
33
- end
34
-
35
- ##
36
- # Lists PolicyInstance records from the API as a list.
37
- # Unlike stream(), this operation is eager and will load `limit` records into
38
- # memory before returning.
39
- # @param [String] tool_id The tool ID.
40
- # @param [String] knowledge_id The knowledge ID.
41
- # @param [Integer] limit Upper limit for the number of records to return. stream()
42
- # guarantees to never return more than limit. Default is no limit
43
- # @param [Integer] page_size Number of records to fetch per request, when
44
- # not set will use the default value of 50 records. If no page_size is defined
45
- # but a limit is defined, stream() will attempt to read the limit with the most
46
- # efficient page size, i.e. min(limit, 1000)
47
- # @return [Array] Array of up to limit results
48
- def list(tool_id: :unset, knowledge_id: :unset, limit: nil, page_size: nil)
49
- self.stream(
50
- tool_id: tool_id,
51
- knowledge_id: knowledge_id,
52
- limit: limit,
53
- page_size: page_size
54
- ).entries
55
- end
56
-
57
- ##
58
- # Streams Instance records from the API as an Enumerable.
59
- # This operation lazily loads records as efficiently as possible until the limit
60
- # is reached.
61
- # @param [String] tool_id The tool ID.
62
- # @param [String] knowledge_id The knowledge ID.
63
- # @param [Integer] limit Upper limit for the number of records to return. stream()
64
- # guarantees to never return more than limit. Default is no limit
65
- # @param [Integer] page_size Number of records to fetch per request, when
66
- # not set will use the default value of 50 records. If no page_size is defined
67
- # but a limit is defined, stream() will attempt to read the limit with the most
68
- # efficient page size, i.e. min(limit, 1000)
69
- # @return [Enumerable] Enumerable that will yield up to limit results
70
- def stream(tool_id: :unset, knowledge_id: :unset, limit: nil, page_size: nil)
71
- limits = @version.read_limits(limit, page_size)
72
-
73
- page = self.page(
74
- tool_id: tool_id,
75
- knowledge_id: knowledge_id,
76
- page_size: limits[:page_size], )
77
-
78
- return [].each if page.nil?
79
-
80
- result = @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
81
- return [].each if result.nil?
82
- result
83
- end
84
-
85
- ##
86
- # Lists PolicyPageMetadata records from the API as a list.
87
- # @param [String] tool_id The tool ID.
88
- # @param [String] knowledge_id The knowledge ID.
89
- # @param [Integer] limit Upper limit for the number of records to return. stream()
90
- # guarantees to never return more than limit. Default is no limit
91
- # @param [Integer] page_size Number of records to fetch per request, when
92
- # not set will use the default value of 50 records. If no page_size is defined
93
- # but a limit is defined, stream() will attempt to read the limit with the most
94
- # efficient page size, i.e. min(limit, 1000)
95
- # @return [Array] Array of up to limit results
96
- def list_with_metadata(tool_id: :unset, knowledge_id: :unset, limit: nil, page_size: nil)
97
- limits = @version.read_limits(limit, page_size)
98
- params = Twilio::Values.of({
99
- 'ToolId' => tool_id,
100
- 'KnowledgeId' => knowledge_id,
101
-
102
- 'PageSize' => limits[:page_size],
103
- });
104
- headers = Twilio::Values.of({})
105
-
106
- response = @version.page('GET', @uri, params: params, headers: headers)
107
-
108
- PolicyPageMetadata.new(@version, response, @solution, limits[:limit])
109
- end
110
-
111
- ##
112
- # When passed a block, yields PolicyInstance records from the API.
113
- # This operation lazily loads records as efficiently as possible until the limit
114
- # is reached.
115
- def each
116
- limits = @version.read_limits
117
-
118
- page = self.page(page_size: limits[:page_size], )
119
-
120
- return [].each if page.nil?
121
-
122
- result = @version.stream(page,
123
- limit: limits[:limit],
124
- page_limit: limits[:page_limit])
125
- return [].each if result.nil?
126
- result.each {|x| yield x}
127
- end
128
-
129
- ##
130
- # Retrieve a single page of PolicyInstance records from the API.
131
- # Request is executed immediately.
132
- # @param [String] tool_id The tool ID.
133
- # @param [String] knowledge_id The knowledge ID.
134
- # @param [String] page_token PageToken provided by the API
135
- # @param [Integer] page_number Page Number, this value is simply for client state
136
- # @param [Integer] page_size Number of records to return, defaults to 50
137
- # @return [Page] Page of PolicyInstance
138
- def page(tool_id: :unset, knowledge_id: :unset, page_token: :unset, page_number: :unset,page_size: :unset)
139
- params = Twilio::Values.of({
140
- 'ToolId' => tool_id,
141
- 'KnowledgeId' => knowledge_id,
142
- 'PageToken' => page_token,
143
- 'Page' => page_number,
144
- 'PageSize' => page_size,
145
- })
146
- headers = Twilio::Values.of({})
147
-
148
-
149
-
150
- response = @version.page('GET', @uri, params: params, headers: headers)
151
-
152
- PolicyPage.new(@version, response, @solution)
153
- end
154
-
155
- ##
156
- # Retrieve a single page of PolicyInstance records from the API.
157
- # Request is executed immediately.
158
- # @param [String] target_url API-generated URL for the requested results page
159
- # @return [Page] Page of PolicyInstance
160
- def get_page(target_url)
161
- response = @version.domain.request(
162
- 'GET',
163
- target_url
164
- )
165
- PolicyPage.new(@version, response, @solution)
166
- end
167
-
168
-
169
-
170
- # Provide a user friendly representation
171
- def to_s
172
- '#<Twilio.Assistants.V1.PolicyList>'
173
- end
174
- end
175
-
176
- class PolicyPage < Page
177
- ##
178
- # Initialize the PolicyPage
179
- # @param [Version] version Version that contains the resource
180
- # @param [Response] response Response from the API
181
- # @param [Hash] solution Path solution for the resource
182
- # @return [PolicyPage] PolicyPage
183
- def initialize(version, response, solution)
184
- super(version, response)
185
-
186
-
187
- # Path Solution
188
- @solution = solution
189
- end
190
-
191
- ##
192
- # Build an instance of PolicyInstance
193
- # @param [Hash] payload Payload response from the API
194
- # @return [PolicyInstance] PolicyInstance
195
- def get_instance(payload)
196
- PolicyInstance.new(@version, payload)
197
- end
198
-
199
- ##
200
- # Provide a user friendly representation
201
- def to_s
202
- '<Twilio.Assistants.V1.PolicyPage>'
203
- end
204
- end
205
-
206
- class PolicyPageMetadata < PageMetadata
207
- attr_reader :policy_page
208
-
209
- def initialize(version, response, solution, limit)
210
- super(version, response)
211
- @policy_page = []
212
- @limit = limit
213
- key = get_key(response.body)
214
- records = 0
215
- while( limit != :unset && records < limit )
216
- @policy_page << PolicyListResponse.new(version, @payload, key, limit - records)
217
- @payload = self.next_page
218
- break unless @payload
219
- records += (@payload.body[key] || []).size
220
- end
221
- # Path Solution
222
- @solution = solution
223
- end
224
-
225
- def each
226
- @policy_page.each do |record|
227
- yield record
228
- end
229
- end
230
-
231
- def to_s
232
- '<Twilio::REST::Assistants::V1PageMetadata>';
233
- end
234
- end
235
- class PolicyListResponse < InstanceListResource
236
-
237
- # @param [Array<PolicyInstance>] instance
238
- # @param [Hash{String => Object}] headers
239
- # @param [Integer] status_code
240
- def initialize(version, payload, key, limit = :unset)
241
- data_list = payload.body[key] || []
242
- if limit != :unset
243
- data_list = data_list[0, limit]
244
- end
245
- @policy = data_list.map do |data|
246
- PolicyInstance.new(version, data)
247
- end
248
- @headers = payload.headers
249
- @status_code = payload.status_code
250
- end
251
-
252
- def policy
253
- @policy
254
- end
255
-
256
- def headers
257
- @headers
258
- end
259
-
260
- def status_code
261
- @status_code
262
- end
263
- end
264
-
265
- class PolicyInstance < InstanceResource
266
- ##
267
- # Initialize the PolicyInstance
268
- # @param [Version] version Version that contains the resource
269
- # @param [Hash] payload payload that contains response from Twilio
270
- # @param [String] account_sid The SID of the
271
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Policy
272
- # resource.
273
- # @param [String] sid The SID of the Call resource to fetch.
274
- # @return [PolicyInstance] PolicyInstance
275
- def initialize(version, payload )
276
- super(version)
277
-
278
-
279
- # Marshaled Properties
280
- @properties = {
281
- 'id' => payload['id'],
282
- 'name' => payload['name'],
283
- 'description' => payload['description'],
284
- 'account_sid' => payload['account_sid'],
285
- 'user_sid' => payload['user_sid'],
286
- 'type' => payload['type'],
287
- 'policy_details' => payload['policy_details'],
288
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
289
- 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
290
- }
291
- end
292
-
293
-
294
- ##
295
- # @return [String] The Policy ID.
296
- def id
297
- @properties['id']
298
- end
299
-
300
- ##
301
- # @return [String] The name of the policy.
302
- def name
303
- @properties['name']
304
- end
305
-
306
- ##
307
- # @return [String] The description of the policy.
308
- def description
309
- @properties['description']
310
- end
311
-
312
- ##
313
- # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Policy resource.
314
- def account_sid
315
- @properties['account_sid']
316
- end
317
-
318
- ##
319
- # @return [String] The SID of the User that created the Policy resource.
320
- def user_sid
321
- @properties['user_sid']
322
- end
323
-
324
- ##
325
- # @return [String] The type of the policy.
326
- def type
327
- @properties['type']
328
- end
329
-
330
- ##
331
- # @return [Hash] The details of the policy based on the type.
332
- def policy_details
333
- @properties['policy_details']
334
- end
335
-
336
- ##
337
- # @return [Time] The date and time in GMT when the Policy was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
338
- def date_created
339
- @properties['date_created']
340
- end
341
-
342
- ##
343
- # @return [Time] The date and time in GMT when the Policy was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
344
- def date_updated
345
- @properties['date_updated']
346
- end
347
-
348
- ##
349
- # Provide a user friendly representation
350
- def to_s
351
- "<Twilio.Assistants.V1.PolicyInstance>"
352
- end
353
-
354
- ##
355
- # Provide a detailed, user friendly representation
356
- def inspect
357
- "<Twilio.Assistants.V1.PolicyInstance>"
358
- end
359
- end
360
-
361
- end
362
- end
363
- end
364
- end