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.
- checksums.yaml +4 -4
- data/.github/workflows/test-and-deploy.yml +43 -67
- data/.gitignore +0 -1
- data/CHANGES.md +46 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +154 -0
- data/README.md +3 -3
- data/Rakefile +1 -1
- data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +25 -6
- data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +48 -12
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +6 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +56 -2
- data/lib/twilio-ruby/rest/client.rb +0 -5
- data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +11 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +10 -10
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +10 -10
- data/lib/twilio-ruby/rest/conversations/v2/action.rb +2 -2
- data/lib/twilio-ruby/rest/conversations/v2/communication.rb +43 -21
- data/lib/twilio-ruby/rest/conversations/v2/configuration.rb +59 -21
- data/lib/twilio-ruby/rest/conversations/v2/conversation.rb +28 -28
- data/lib/twilio-ruby/rest/conversations/v2/operation.rb +10 -10
- data/lib/twilio-ruby/rest/conversations/v2/participant.rb +58 -58
- data/lib/twilio-ruby/rest/conversations/v2.rb +45 -45
- data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +2 -2
- data/lib/twilio-ruby/rest/iam/v1/o_auth_app.rb +15 -2
- data/lib/twilio-ruby/rest/iam_base.rb +6 -1
- data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/call/event.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v3/metadata.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v3/query.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v3.rb +1 -1
- data/lib/twilio-ruby/rest/intelligence/v3/conversation.rb +8 -8
- data/lib/twilio-ruby/rest/intelligence/v3/rule_execution.rb +502 -0
- data/lib/twilio-ruby/rest/intelligence/v3.rb +6 -0
- data/lib/twilio-ruby/rest/knowledge/v2/chunk.rb +28 -0
- data/lib/twilio-ruby/rest/knowledge/v2/knowledge.rb +38 -0
- data/lib/twilio-ruby/rest/knowledge/v2/search.rb +8 -117
- data/lib/twilio-ruby/rest/knowledge/v2.rb +1 -2
- data/lib/twilio-ruby/rest/memory/v1/bulk.rb +9 -118
- data/lib/twilio-ruby/rest/memory/v1/conversation_summary.rb +13 -5
- data/lib/twilio-ruby/rest/memory/v1/data_mapping.rb +6 -12
- data/lib/twilio-ruby/rest/memory/v1/identifier.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb +11 -132
- data/lib/twilio-ruby/rest/memory/v1/import.rb +28 -5
- data/lib/twilio-ruby/rest/memory/v1/lookup.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/observation.rb +70 -18
- data/lib/twilio-ruby/rest/memory/v1/operation.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/profile.rb +2 -2
- data/lib/twilio-ruby/rest/memory/v1/recall.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/revision.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/store.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/trait.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/trait_group.rb +56 -6
- data/lib/twilio-ruby/rest/memory/v1.rb +3 -46
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +0 -18
- data/lib/twilio-ruby/rest/messaging/v2/channels_sender.rb +23 -4
- data/lib/twilio-ruby/rest/messaging/v3/typing_indicator.rb +4 -4
- data/lib/twilio-ruby/rest/numbers/v1/sms_verification.rb +231 -0
- data/lib/twilio-ruby/rest/numbers/v1/sms_verification_check.rb +238 -0
- data/lib/twilio-ruby/rest/numbers/v1/voice_verification.rb +245 -0
- data/lib/twilio-ruby/rest/numbers/v1/voice_verification_check.rb +224 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +24 -0
- data/lib/twilio-ruby/rest/{assistants/v1/session.rb → numbers/v2/caller_id.rb} +141 -127
- data/lib/twilio-ruby/rest/numbers/v2.rb +16 -0
- data/lib/twilio-ruby/rest/oauth/v2/authorize.rb +14 -2
- data/lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb +259 -0
- data/lib/twilio-ruby/rest/oauth/v2/token.rb +8 -2
- data/lib/twilio-ruby/rest/preview_iam/versionless/organization.rb +0 -19
- data/lib/twilio-ruby/rest/routes/v3/phone_number.rb +465 -0
- data/lib/twilio-ruby/rest/routes/v3.rb +50 -0
- data/lib/twilio-ruby/rest/routes_base.rb +6 -1
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration.rb +330 -0
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration_embedded_session.rb +233 -0
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration.rb +321 -0
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration_embedded_session.rb +233 -0
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles_provisional_copy.rb +445 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb +445 -0
- data/lib/twilio-ruby/rest/trusthub/v1.rb +74 -0
- data/lib/twilio-ruby/rest/voice/v2/account_default_configuration.rb +556 -0
- data/lib/twilio-ruby/rest/voice/v2/configuration/default.rb +356 -0
- data/lib/twilio-ruby/rest/voice/v2/configuration.rb +412 -0
- data/lib/twilio-ruby/rest/voice/v2/recording.rb +616 -0
- data/lib/twilio-ruby/rest/voice/v2/transcription.rb +591 -0
- data/lib/twilio-ruby/rest/voice/v2/type.rb +518 -0
- data/lib/twilio-ruby/rest/voice/v2.rb +141 -0
- data/lib/twilio-ruby/rest/voice_base.rb +5 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +6 -68
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +33 -21
- data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_knowledge.rb +0 -558
- data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_tool.rb +0 -558
- data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +0 -431
- data/lib/twilio-ruby/rest/assistants/v1/assistant/message.rb +0 -296
- data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +0 -927
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb +0 -325
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb +0 -349
- data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +0 -871
- data/lib/twilio-ruby/rest/assistants/v1/policy.rb +0 -364
- data/lib/twilio-ruby/rest/assistants/v1/session/message.rb +0 -360
- data/lib/twilio-ruby/rest/assistants/v1/tool.rb +0 -847
- data/lib/twilio-ruby/rest/assistants/v1.rb +0 -104
- data/lib/twilio-ruby/rest/assistants.rb +0 -6
- data/lib/twilio-ruby/rest/assistants_base.rb +0 -38
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
6
|
+
#
|
|
7
|
+
# Twilio API definition for public-api voice
|
|
8
|
+
# Powers Twilio public-api voice
|
|
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 Voice < VoiceBase
|
|
19
|
+
class V2 < Version
|
|
20
|
+
class Configuration < InstanceContext
|
|
21
|
+
|
|
22
|
+
class DefaultList < ListResource
|
|
23
|
+
|
|
24
|
+
class DefaultConfigurationRequest
|
|
25
|
+
# @param [configuration_id]: [String]
|
|
26
|
+
attr_accessor :configuration_id
|
|
27
|
+
def initialize(payload)
|
|
28
|
+
@configuration_id = payload["configuration_id"]
|
|
29
|
+
end
|
|
30
|
+
def to_json(options = {})
|
|
31
|
+
{
|
|
32
|
+
"configuration_id": @configuration_id,
|
|
33
|
+
}.to_json(options)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
##
|
|
39
|
+
# Initialize the DefaultList
|
|
40
|
+
# @param [Version] version Version that contains the resource
|
|
41
|
+
# @return [DefaultList] DefaultList
|
|
42
|
+
def initialize(version, type: nil)
|
|
43
|
+
super(version)
|
|
44
|
+
|
|
45
|
+
# Path Solution
|
|
46
|
+
@solution = { type: type }
|
|
47
|
+
@uri = "/Configurations/#{@solution[:type]}/Default"
|
|
48
|
+
|
|
49
|
+
end
|
|
50
|
+
##
|
|
51
|
+
# Create the DefaultInstance
|
|
52
|
+
# @param [DefaultConfigurationRequest] default_configuration_request
|
|
53
|
+
# @return [DefaultInstance] Created DefaultInstance
|
|
54
|
+
def create(default_configuration_request: :unset
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
58
|
+
headers['Content-Type'] = 'application/json'
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
payload = @version.create('POST', @uri, headers: headers, data: default_configuration_request.to_json)
|
|
64
|
+
DefaultInstance.new(
|
|
65
|
+
@version,
|
|
66
|
+
payload,
|
|
67
|
+
type: @solution[:type],
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
##
|
|
72
|
+
# Create the DefaultInstanceMetadata
|
|
73
|
+
# @param [DefaultConfigurationRequest] default_configuration_request
|
|
74
|
+
# @return [DefaultInstance] Created DefaultInstance
|
|
75
|
+
def create_with_metadata(default_configuration_request: :unset
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
79
|
+
headers['Content-Type'] = 'application/json'
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
response = @version.create_with_metadata('POST', @uri, headers: headers, data: default_configuration_request.to_json)
|
|
85
|
+
default_instance = DefaultInstance.new(
|
|
86
|
+
@version,
|
|
87
|
+
response.body,
|
|
88
|
+
type: @solution[:type],
|
|
89
|
+
)
|
|
90
|
+
DefaultInstanceMetadata.new(
|
|
91
|
+
@version,
|
|
92
|
+
default_instance,
|
|
93
|
+
response.headers,
|
|
94
|
+
response.status_code
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
##
|
|
99
|
+
# Fetch the DefaultInstance
|
|
100
|
+
# @return [DefaultInstance] Fetched DefaultInstance
|
|
101
|
+
def fetch
|
|
102
|
+
|
|
103
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
|
110
|
+
DefaultInstance.new(
|
|
111
|
+
@version,
|
|
112
|
+
payload,
|
|
113
|
+
type: @solution[:type],
|
|
114
|
+
)
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
##
|
|
118
|
+
# Fetch the DefaultInstanceMetadata
|
|
119
|
+
# @return [DefaultInstance] Fetched DefaultInstance
|
|
120
|
+
def fetch_with_metadata
|
|
121
|
+
|
|
122
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
response = @version.fetch_with_metadata('GET', @uri, headers: headers)
|
|
129
|
+
default_instance = DefaultInstance.new(
|
|
130
|
+
@version,
|
|
131
|
+
response.body,
|
|
132
|
+
type: @solution[:type],
|
|
133
|
+
)
|
|
134
|
+
DefaultInstanceMetadata.new(
|
|
135
|
+
@version,
|
|
136
|
+
default_instance,
|
|
137
|
+
response.headers,
|
|
138
|
+
response.status_code
|
|
139
|
+
)
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
# Provide a user friendly representation
|
|
146
|
+
def to_s
|
|
147
|
+
'#<Twilio.Voice.V2.DefaultList>'
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
class DefaultPage < Page
|
|
152
|
+
##
|
|
153
|
+
# Initialize the DefaultPage
|
|
154
|
+
# @param [Version] version Version that contains the resource
|
|
155
|
+
# @param [Response] response Response from the API
|
|
156
|
+
# @param [Hash] solution Path solution for the resource
|
|
157
|
+
# @return [DefaultPage] DefaultPage
|
|
158
|
+
def initialize(version, response, solution)
|
|
159
|
+
super(version, response)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
# Path Solution
|
|
163
|
+
@solution = solution
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
##
|
|
167
|
+
# Build an instance of DefaultInstance
|
|
168
|
+
# @param [Hash] payload Payload response from the API
|
|
169
|
+
# @return [DefaultInstance] DefaultInstance
|
|
170
|
+
def get_instance(payload)
|
|
171
|
+
DefaultInstance.new(@version, payload, type: @solution[:type])
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
##
|
|
175
|
+
# Provide a user friendly representation
|
|
176
|
+
def to_s
|
|
177
|
+
'<Twilio.Voice.V2.DefaultPage>'
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
class DefaultPageMetadata < PageMetadata
|
|
182
|
+
attr_reader :default_page
|
|
183
|
+
|
|
184
|
+
def initialize(version, response, solution, limit)
|
|
185
|
+
super(version, response)
|
|
186
|
+
@default_page = []
|
|
187
|
+
@limit = limit
|
|
188
|
+
key = get_key(response.body)
|
|
189
|
+
records = 0
|
|
190
|
+
while( limit != :unset && records < limit )
|
|
191
|
+
@default_page << DefaultListResponse.new(version, @payload, key, limit - records)
|
|
192
|
+
@payload = self.next_page
|
|
193
|
+
break unless @payload
|
|
194
|
+
records += (@payload.body[key] || []).size
|
|
195
|
+
end
|
|
196
|
+
# Path Solution
|
|
197
|
+
@solution = solution
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
def each
|
|
201
|
+
@default_page.each do |record|
|
|
202
|
+
yield record
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
def to_s
|
|
207
|
+
'<Twilio::REST::Voice::V2PageMetadata>';
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
class DefaultListResponse < InstanceListResource
|
|
211
|
+
|
|
212
|
+
# @param [Array<DefaultInstance>] instance
|
|
213
|
+
# @param [Hash{String => Object}] headers
|
|
214
|
+
# @param [Integer] status_code
|
|
215
|
+
def initialize(version, payload, key, limit = :unset)
|
|
216
|
+
data_list = payload.body[key] || []
|
|
217
|
+
if limit != :unset
|
|
218
|
+
data_list = data_list[0, limit]
|
|
219
|
+
end
|
|
220
|
+
@default = data_list.map do |data|
|
|
221
|
+
DefaultInstance.new(version, data)
|
|
222
|
+
end
|
|
223
|
+
@headers = payload.headers
|
|
224
|
+
@status_code = payload.status_code
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
def default
|
|
228
|
+
@default
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
def headers
|
|
232
|
+
@headers
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
def status_code
|
|
236
|
+
@status_code
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
class DefaultInstance < InstanceResource
|
|
241
|
+
##
|
|
242
|
+
# Initialize the DefaultInstance
|
|
243
|
+
# @param [Version] version Version that contains the resource
|
|
244
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
245
|
+
# @param [String] account_sid The SID of the
|
|
246
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Default
|
|
247
|
+
# resource.
|
|
248
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
|
249
|
+
# @return [DefaultInstance] DefaultInstance
|
|
250
|
+
def initialize(version, payload , type: nil)
|
|
251
|
+
super(version)
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
# Marshaled Properties
|
|
255
|
+
@properties = {
|
|
256
|
+
'message' => payload['message'],
|
|
257
|
+
'code' => payload['code'],
|
|
258
|
+
'status' => payload['status'],
|
|
259
|
+
'more_info' => payload['more_info'],
|
|
260
|
+
'id' => payload['id'],
|
|
261
|
+
'account_sid' => payload['account_sid'],
|
|
262
|
+
'unique_name' => payload['unique_name'],
|
|
263
|
+
'description' => payload['description'],
|
|
264
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
265
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
266
|
+
'configuration' => payload['configuration'],
|
|
267
|
+
}
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
##
|
|
272
|
+
# @return [String] Error message
|
|
273
|
+
def message
|
|
274
|
+
@properties['message']
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
##
|
|
278
|
+
# @return [String] Twilio error code
|
|
279
|
+
def code
|
|
280
|
+
@properties['code']
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
##
|
|
284
|
+
# @return [String] status code
|
|
285
|
+
def status
|
|
286
|
+
@properties['status']
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
##
|
|
290
|
+
# @return [String] More information about the error
|
|
291
|
+
def more_info
|
|
292
|
+
@properties['more_info']
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
##
|
|
296
|
+
# @return [String] Configuration Identifier
|
|
297
|
+
def id
|
|
298
|
+
@properties['id']
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
##
|
|
302
|
+
# @return [String] Account sid
|
|
303
|
+
def account_sid
|
|
304
|
+
@properties['account_sid']
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
##
|
|
308
|
+
# @return [String] The unique name
|
|
309
|
+
def unique_name
|
|
310
|
+
@properties['unique_name']
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
##
|
|
314
|
+
# @return [String] The description
|
|
315
|
+
def description
|
|
316
|
+
@properties['description']
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
##
|
|
320
|
+
# @return [Time]
|
|
321
|
+
def date_created
|
|
322
|
+
@properties['date_created']
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
##
|
|
326
|
+
# @return [Time]
|
|
327
|
+
def date_updated
|
|
328
|
+
@properties['date_updated']
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
##
|
|
332
|
+
# @return [Hash]
|
|
333
|
+
def configuration
|
|
334
|
+
@properties['configuration']
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
##
|
|
338
|
+
# Provide a user friendly representation
|
|
339
|
+
def to_s
|
|
340
|
+
"<Twilio.Voice.V2.DefaultInstance>"
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
##
|
|
344
|
+
# Provide a detailed, user friendly representation
|
|
345
|
+
def inspect
|
|
346
|
+
"<Twilio.Voice.V2.DefaultInstance>"
|
|
347
|
+
end
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
end
|
|
351
|
+
end
|
|
352
|
+
end
|
|
353
|
+
end
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
|