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,296 +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 AssistantContext < InstanceContext
21
-
22
- class MessageList < ListResource
23
-
24
- class AssistantsV1ServiceAssistantSendMessageRequest
25
- # @param [identity]: [String] The unique identity of user for the session.
26
- # @param [session_id]: [String] The unique name for the session.
27
- # @param [body]: [String] The query to ask the assistant.
28
- # @param [webhook]: [String] The webhook url to call after the assistant has generated a response or report an error.
29
- # @param [mode]: [String] one of the modes 'chat', 'email' or 'voice'
30
- attr_accessor :identity, :session_id, :body, :webhook, :mode
31
- def initialize(payload)
32
- @identity = payload["identity"]
33
- @session_id = payload["session_id"]
34
- @body = payload["body"]
35
- @webhook = payload["webhook"]
36
- @mode = payload["mode"]
37
- end
38
- def to_json(options = {})
39
- {
40
- "identity": @identity,
41
- "session_id": @session_id,
42
- "body": @body,
43
- "webhook": @webhook,
44
- "mode": @mode,
45
- }.to_json(options)
46
- end
47
- end
48
-
49
-
50
- ##
51
- # Initialize the MessageList
52
- # @param [Version] version Version that contains the resource
53
- # @return [MessageList] MessageList
54
- def initialize(version, id: nil)
55
- super(version)
56
-
57
- # Path Solution
58
- @solution = { id: id }
59
- @uri = "/Assistants/#{@solution[:id]}/Messages"
60
-
61
- end
62
- ##
63
- # Create the MessageInstance
64
- # @param [AssistantsV1ServiceAssistantSendMessageRequest] assistants_v1_service_assistant_send_message_request
65
- # @return [MessageInstance] Created MessageInstance
66
- def create(assistants_v1_service_assistant_send_message_request: nil
67
- )
68
-
69
- headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
70
- headers['Content-Type'] = 'application/json'
71
-
72
-
73
-
74
-
75
- payload = @version.create('POST', @uri, headers: headers, data: assistants_v1_service_assistant_send_message_request.to_json)
76
- MessageInstance.new(
77
- @version,
78
- payload,
79
- id: @solution[:id],
80
- )
81
- end
82
-
83
- ##
84
- # Create the MessageInstanceMetadata
85
- # @param [AssistantsV1ServiceAssistantSendMessageRequest] assistants_v1_service_assistant_send_message_request
86
- # @return [MessageInstance] Created MessageInstance
87
- def create_with_metadata(assistants_v1_service_assistant_send_message_request: nil
88
- )
89
-
90
- headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
91
- headers['Content-Type'] = 'application/json'
92
-
93
-
94
-
95
-
96
- response = @version.create_with_metadata('POST', @uri, headers: headers, data: assistants_v1_service_assistant_send_message_request.to_json)
97
- message_instance = MessageInstance.new(
98
- @version,
99
- response.body,
100
- id: @solution[:id],
101
- )
102
- MessageInstanceMetadata.new(
103
- @version,
104
- message_instance,
105
- response.headers,
106
- response.status_code
107
- )
108
- end
109
-
110
-
111
-
112
-
113
- # Provide a user friendly representation
114
- def to_s
115
- '#<Twilio.Assistants.V1.MessageList>'
116
- end
117
- end
118
-
119
- class MessagePage < Page
120
- ##
121
- # Initialize the MessagePage
122
- # @param [Version] version Version that contains the resource
123
- # @param [Response] response Response from the API
124
- # @param [Hash] solution Path solution for the resource
125
- # @return [MessagePage] MessagePage
126
- def initialize(version, response, solution)
127
- super(version, response)
128
-
129
-
130
- # Path Solution
131
- @solution = solution
132
- end
133
-
134
- ##
135
- # Build an instance of MessageInstance
136
- # @param [Hash] payload Payload response from the API
137
- # @return [MessageInstance] MessageInstance
138
- def get_instance(payload)
139
- MessageInstance.new(@version, payload, id: @solution[:id])
140
- end
141
-
142
- ##
143
- # Provide a user friendly representation
144
- def to_s
145
- '<Twilio.Assistants.V1.MessagePage>'
146
- end
147
- end
148
-
149
- class MessagePageMetadata < PageMetadata
150
- attr_reader :message_page
151
-
152
- def initialize(version, response, solution, limit)
153
- super(version, response)
154
- @message_page = []
155
- @limit = limit
156
- key = get_key(response.body)
157
- records = 0
158
- while( limit != :unset && records < limit )
159
- @message_page << MessageListResponse.new(version, @payload, key, limit - records)
160
- @payload = self.next_page
161
- break unless @payload
162
- records += (@payload.body[key] || []).size
163
- end
164
- # Path Solution
165
- @solution = solution
166
- end
167
-
168
- def each
169
- @message_page.each do |record|
170
- yield record
171
- end
172
- end
173
-
174
- def to_s
175
- '<Twilio::REST::Assistants::V1PageMetadata>';
176
- end
177
- end
178
- class MessageListResponse < InstanceListResource
179
-
180
- # @param [Array<MessageInstance>] instance
181
- # @param [Hash{String => Object}] headers
182
- # @param [Integer] status_code
183
- def initialize(version, payload, key, limit = :unset)
184
- data_list = payload.body[key] || []
185
- if limit != :unset
186
- data_list = data_list[0, limit]
187
- end
188
- @message = data_list.map do |data|
189
- MessageInstance.new(version, data)
190
- end
191
- @headers = payload.headers
192
- @status_code = payload.status_code
193
- end
194
-
195
- def message
196
- @message
197
- end
198
-
199
- def headers
200
- @headers
201
- end
202
-
203
- def status_code
204
- @status_code
205
- end
206
- end
207
-
208
- class MessageInstance < InstanceResource
209
- ##
210
- # Initialize the MessageInstance
211
- # @param [Version] version Version that contains the resource
212
- # @param [Hash] payload payload that contains response from Twilio
213
- # @param [String] account_sid The SID of the
214
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Message
215
- # resource.
216
- # @param [String] sid The SID of the Call resource to fetch.
217
- # @return [MessageInstance] MessageInstance
218
- def initialize(version, payload , id: nil)
219
- super(version)
220
-
221
-
222
- # Marshaled Properties
223
- @properties = {
224
- 'status' => payload['status'],
225
- 'flagged' => payload['flagged'],
226
- 'aborted' => payload['aborted'],
227
- 'session_id' => payload['session_id'],
228
- 'account_sid' => payload['account_sid'],
229
- 'body' => payload['body'],
230
- 'error' => payload['error'],
231
- }
232
- end
233
-
234
-
235
- ##
236
- # @return [String] success or failure based on whether the request successfully generated a response.
237
- def status
238
- @properties['status']
239
- end
240
-
241
- ##
242
- # @return [Boolean] If successful, this property will denote whether the response was flagged or not.
243
- def flagged
244
- @properties['flagged']
245
- end
246
-
247
- ##
248
- # @return [Boolean] This property will denote whether the request was aborted or not.
249
- def aborted
250
- @properties['aborted']
251
- end
252
-
253
- ##
254
- # @return [String] The unique name for the session.
255
- def session_id
256
- @properties['session_id']
257
- end
258
-
259
- ##
260
- # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that sent the Message.
261
- def account_sid
262
- @properties['account_sid']
263
- end
264
-
265
- ##
266
- # @return [String] If successful, the body of the generated response
267
- def body
268
- @properties['body']
269
- end
270
-
271
- ##
272
- # @return [String] The error message if generation was not successful
273
- def error
274
- @properties['error']
275
- end
276
-
277
- ##
278
- # Provide a user friendly representation
279
- def to_s
280
- "<Twilio.Assistants.V1.MessageInstance>"
281
- end
282
-
283
- ##
284
- # Provide a detailed, user friendly representation
285
- def inspect
286
- "<Twilio.Assistants.V1.MessageInstance>"
287
- end
288
- end
289
-
290
- end
291
- end
292
- end
293
- end
294
- end
295
-
296
-