twilio-ruby 7.4.3 → 7.4.5
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/CHANGES.md +27 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb +352 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +27 -0
- data/lib/twilio-ruby/rest/iam/v1/{new_api_key.rb → key.rb} +20 -20
- data/lib/twilio-ruby/rest/iam/v1.rb +4 -4
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb +7 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb +386 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +27 -0
- data/lib/twilio-ruby/rest/numbers/v1/{porting_webhook_configuration_fetch.rb → webhook.rb} +20 -20
- data/lib/twilio-ruby/rest/numbers/v1.rb +6 -6
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 619d3a6713b7b6f33c44d24de3dce37e52e4c698
|
4
|
+
data.tar.gz: 993c12964af11fad24601bfeca3e281e5cb7ae1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0616330d6da95abbfb8b450beea2b3a81cc1b361c90b22225afd6dced81a1ccbc4ba83fac594517b8ce87e0e7fa52364014e15bcc876c17631279cd5565043b1
|
7
|
+
data.tar.gz: 165d87b36bed7e7bd27a01b2d033553a6719ebb3c27220ea9e0f1b6dd6abc20cd12c23aba8130a854cb417c959a8fa81b95f6e25b0df91dbbe0d006c78717666
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,33 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2025-02-20] Version 7.4.5
|
5
|
+
--------------------------
|
6
|
+
**Flex**
|
7
|
+
- Adding Digital Transfers APIs under v1/Interactions
|
8
|
+
|
9
|
+
**Numbers**
|
10
|
+
- Convert webhook_type to ienum type in v1/Porting/Configuration/Webhook/{webhook_type}
|
11
|
+
|
12
|
+
**Trusthub**
|
13
|
+
- Changing TrustHub SupportingDocument status enum from lowercase to uppercase since kyc-orch returns status capitalized and rest proxy requires strict casing
|
14
|
+
|
15
|
+
|
16
|
+
[2025-02-11] Version 7.4.4
|
17
|
+
--------------------------
|
18
|
+
**Api**
|
19
|
+
- Change downstream url and change media type for file `base/api/v2010/validation_request.json`.
|
20
|
+
|
21
|
+
**Intelligence**
|
22
|
+
- Add json_results for Generative JSON operator results
|
23
|
+
|
24
|
+
**Messaging**
|
25
|
+
- Add DestinationAlphaSender API to support Country-Specific Alpha Senders
|
26
|
+
|
27
|
+
**Video**
|
28
|
+
- Change codec type from enum to case-insensitive enum in recording and room_recording apis
|
29
|
+
|
30
|
+
|
4
31
|
[2025-01-28] Version 7.4.3
|
5
32
|
--------------------------
|
6
33
|
**Library - Chore**
|
data/README.md
CHANGED
@@ -39,13 +39,13 @@ This library supports the following Ruby implementations:
|
|
39
39
|
To install using [Bundler][bundler] grab the latest stable version:
|
40
40
|
|
41
41
|
```ruby
|
42
|
-
gem 'twilio-ruby', '~> 7.4.
|
42
|
+
gem 'twilio-ruby', '~> 7.4.5'
|
43
43
|
```
|
44
44
|
|
45
45
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
46
46
|
|
47
47
|
```bash
|
48
|
-
gem install twilio-ruby -v 7.4.
|
48
|
+
gem install twilio-ruby -v 7.4.5
|
49
49
|
```
|
50
50
|
|
51
51
|
To build and install the development branch yourself from the latest source:
|
@@ -251,7 +251,7 @@ module Twilio
|
|
251
251
|
|
252
252
|
##
|
253
253
|
# Update the AddressInstance
|
254
|
-
# @param [String] friendly_name A descriptive string that you create to describe the address. It can be up to 64 characters long.
|
254
|
+
# @param [String] friendly_name A descriptive string that you create to describe the new address. It can be up to 64 characters long for Regulatory Compliance addresses and 32 characters long for Emergency addresses.
|
255
255
|
# @param [String] customer_name The name to associate with the address.
|
256
256
|
# @param [String] street The number and street address of the address.
|
257
257
|
# @param [String] city The city of the address.
|
@@ -518,7 +518,7 @@ module Twilio
|
|
518
518
|
|
519
519
|
##
|
520
520
|
# Update the AddressInstance
|
521
|
-
# @param [String] friendly_name A descriptive string that you create to describe the address. It can be up to 64 characters long.
|
521
|
+
# @param [String] friendly_name A descriptive string that you create to describe the new address. It can be up to 64 characters long for Regulatory Compliance addresses and 32 characters long for Emergency addresses.
|
522
522
|
# @param [String] customer_name The name to associate with the address.
|
523
523
|
# @param [String] street The number and street address of the address.
|
524
524
|
# @param [String] city The city of the address.
|
@@ -48,7 +48,7 @@ module Twilio
|
|
48
48
|
# @param [String] speech_model Recognition model used by the transcription engine, among those supported by the provider
|
49
49
|
# @param [String] hints A Phrase contains words and phrase \\\"hints\\\" so that the speech recognition engine is more likely to recognize them.
|
50
50
|
# @param [Boolean] enable_automatic_punctuation The provider will add punctuation to recognition result
|
51
|
-
# @param [String] intelligence_service The SID of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .
|
51
|
+
# @param [String] intelligence_service The SID or unique name of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .
|
52
52
|
# @return [TranscriptionInstance] Created TranscriptionInstance
|
53
53
|
def create(
|
54
54
|
name: :unset,
|
@@ -0,0 +1,352 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Flex
|
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 FlexApi < FlexApiBase
|
19
|
+
class V1 < Version
|
20
|
+
class InteractionContext < InstanceContext
|
21
|
+
class InteractionChannelContext < InstanceContext
|
22
|
+
|
23
|
+
class InteractionTransferList < ListResource
|
24
|
+
|
25
|
+
##
|
26
|
+
# Initialize the InteractionTransferList
|
27
|
+
# @param [Version] version Version that contains the resource
|
28
|
+
# @return [InteractionTransferList] InteractionTransferList
|
29
|
+
def initialize(version, interaction_sid: nil, channel_sid: nil)
|
30
|
+
super(version)
|
31
|
+
# Path Solution
|
32
|
+
@solution = { interaction_sid: interaction_sid, channel_sid: channel_sid }
|
33
|
+
@uri = "/Interactions/#{@solution[:interaction_sid]}/Channels/#{@solution[:channel_sid]}/Transfers"
|
34
|
+
|
35
|
+
end
|
36
|
+
##
|
37
|
+
# Create the InteractionTransferInstance
|
38
|
+
# @param [Object] body
|
39
|
+
# @return [InteractionTransferInstance] Created InteractionTransferInstance
|
40
|
+
def create(body: :unset
|
41
|
+
)
|
42
|
+
|
43
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
44
|
+
headers['Content-Type'] = 'application/json'
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
payload = @version.create('POST', @uri, headers: headers, data: body.to_json)
|
50
|
+
InteractionTransferInstance.new(
|
51
|
+
@version,
|
52
|
+
payload,
|
53
|
+
interaction_sid: @solution[:interaction_sid],
|
54
|
+
channel_sid: @solution[:channel_sid],
|
55
|
+
)
|
56
|
+
end
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
# Provide a user friendly representation
|
62
|
+
def to_s
|
63
|
+
'#<Twilio.FlexApi.V1.InteractionTransferList>'
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
class InteractionTransferContext < InstanceContext
|
69
|
+
##
|
70
|
+
# Initialize the InteractionTransferContext
|
71
|
+
# @param [Version] version Version that contains the resource
|
72
|
+
# @param [String] interaction_sid The Interaction Sid for this channel.
|
73
|
+
# @param [String] channel_sid The Channel Sid for this Transfer.
|
74
|
+
# @param [String] sid The unique string created by Twilio to identify a Transfer resource.
|
75
|
+
# @return [InteractionTransferContext] InteractionTransferContext
|
76
|
+
def initialize(version, interaction_sid, channel_sid, sid)
|
77
|
+
super(version)
|
78
|
+
|
79
|
+
# Path Solution
|
80
|
+
@solution = { interaction_sid: interaction_sid, channel_sid: channel_sid, sid: sid, }
|
81
|
+
@uri = "/Interactions/#{@solution[:interaction_sid]}/Channels/#{@solution[:channel_sid]}/Transfers/#{@solution[:sid]}"
|
82
|
+
|
83
|
+
|
84
|
+
end
|
85
|
+
##
|
86
|
+
# Fetch the InteractionTransferInstance
|
87
|
+
# @return [InteractionTransferInstance] Fetched InteractionTransferInstance
|
88
|
+
def fetch
|
89
|
+
|
90
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
97
|
+
InteractionTransferInstance.new(
|
98
|
+
@version,
|
99
|
+
payload,
|
100
|
+
interaction_sid: @solution[:interaction_sid],
|
101
|
+
channel_sid: @solution[:channel_sid],
|
102
|
+
sid: @solution[:sid],
|
103
|
+
)
|
104
|
+
end
|
105
|
+
|
106
|
+
##
|
107
|
+
# Update the InteractionTransferInstance
|
108
|
+
# @param [Object] body
|
109
|
+
# @return [InteractionTransferInstance] Updated InteractionTransferInstance
|
110
|
+
def update(body: :unset
|
111
|
+
)
|
112
|
+
|
113
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
114
|
+
headers['Content-Type'] = 'application/json'
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
payload = @version.update('POST', @uri, headers: headers, data: body.to_json)
|
120
|
+
InteractionTransferInstance.new(
|
121
|
+
@version,
|
122
|
+
payload,
|
123
|
+
interaction_sid: @solution[:interaction_sid],
|
124
|
+
channel_sid: @solution[:channel_sid],
|
125
|
+
sid: @solution[:sid],
|
126
|
+
)
|
127
|
+
end
|
128
|
+
|
129
|
+
|
130
|
+
##
|
131
|
+
# Provide a user friendly representation
|
132
|
+
def to_s
|
133
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
134
|
+
"#<Twilio.FlexApi.V1.InteractionTransferContext #{context}>"
|
135
|
+
end
|
136
|
+
|
137
|
+
##
|
138
|
+
# Provide a detailed, user friendly representation
|
139
|
+
def inspect
|
140
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
141
|
+
"#<Twilio.FlexApi.V1.InteractionTransferContext #{context}>"
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
class InteractionTransferPage < Page
|
146
|
+
##
|
147
|
+
# Initialize the InteractionTransferPage
|
148
|
+
# @param [Version] version Version that contains the resource
|
149
|
+
# @param [Response] response Response from the API
|
150
|
+
# @param [Hash] solution Path solution for the resource
|
151
|
+
# @return [InteractionTransferPage] InteractionTransferPage
|
152
|
+
def initialize(version, response, solution)
|
153
|
+
super(version, response)
|
154
|
+
|
155
|
+
# Path Solution
|
156
|
+
@solution = solution
|
157
|
+
end
|
158
|
+
|
159
|
+
##
|
160
|
+
# Build an instance of InteractionTransferInstance
|
161
|
+
# @param [Hash] payload Payload response from the API
|
162
|
+
# @return [InteractionTransferInstance] InteractionTransferInstance
|
163
|
+
def get_instance(payload)
|
164
|
+
InteractionTransferInstance.new(@version, payload, interaction_sid: @solution[:interaction_sid], channel_sid: @solution[:channel_sid])
|
165
|
+
end
|
166
|
+
|
167
|
+
##
|
168
|
+
# Provide a user friendly representation
|
169
|
+
def to_s
|
170
|
+
'<Twilio.FlexApi.V1.InteractionTransferPage>'
|
171
|
+
end
|
172
|
+
end
|
173
|
+
class InteractionTransferInstance < InstanceResource
|
174
|
+
##
|
175
|
+
# Initialize the InteractionTransferInstance
|
176
|
+
# @param [Version] version Version that contains the resource
|
177
|
+
# @param [Hash] payload payload that contains response from Twilio
|
178
|
+
# @param [String] account_sid The SID of the
|
179
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this InteractionTransfer
|
180
|
+
# resource.
|
181
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
182
|
+
# @return [InteractionTransferInstance] InteractionTransferInstance
|
183
|
+
def initialize(version, payload , interaction_sid: nil, channel_sid: nil, sid: nil)
|
184
|
+
super(version)
|
185
|
+
|
186
|
+
# Marshaled Properties
|
187
|
+
@properties = {
|
188
|
+
'sid' => payload['sid'],
|
189
|
+
'instance_sid' => payload['instance_sid'],
|
190
|
+
'account_sid' => payload['account_sid'],
|
191
|
+
'interaction_sid' => payload['interaction_sid'],
|
192
|
+
'channel_sid' => payload['channel_sid'],
|
193
|
+
'execution_sid' => payload['execution_sid'],
|
194
|
+
'type' => payload['type'],
|
195
|
+
'status' => payload['status'],
|
196
|
+
'from' => payload['from'],
|
197
|
+
'to' => payload['to'],
|
198
|
+
'note_sid' => payload['note_sid'],
|
199
|
+
'summary_sid' => payload['summary_sid'],
|
200
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
201
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
202
|
+
'url' => payload['url'],
|
203
|
+
}
|
204
|
+
|
205
|
+
# Context
|
206
|
+
@instance_context = nil
|
207
|
+
@params = { 'interaction_sid' => interaction_sid || @properties['interaction_sid'] ,'channel_sid' => channel_sid || @properties['channel_sid'] ,'sid' => sid || @properties['sid'] , }
|
208
|
+
end
|
209
|
+
|
210
|
+
##
|
211
|
+
# Generate an instance context for the instance, the context is capable of
|
212
|
+
# performing various actions. All instance actions are proxied to the context
|
213
|
+
# @return [InteractionTransferContext] CallContext for this CallInstance
|
214
|
+
def context
|
215
|
+
unless @instance_context
|
216
|
+
@instance_context = InteractionTransferContext.new(@version , @params['interaction_sid'], @params['channel_sid'], @params['sid'])
|
217
|
+
end
|
218
|
+
@instance_context
|
219
|
+
end
|
220
|
+
|
221
|
+
##
|
222
|
+
# @return [String] The unique string created by Twilio to identify an Interaction Transfer resource.
|
223
|
+
def sid
|
224
|
+
@properties['sid']
|
225
|
+
end
|
226
|
+
|
227
|
+
##
|
228
|
+
# @return [String] The SID of the Instance associated with the Transfer.
|
229
|
+
def instance_sid
|
230
|
+
@properties['instance_sid']
|
231
|
+
end
|
232
|
+
|
233
|
+
##
|
234
|
+
# @return [String] The SID of the Account that created the Transfer.
|
235
|
+
def account_sid
|
236
|
+
@properties['account_sid']
|
237
|
+
end
|
238
|
+
|
239
|
+
##
|
240
|
+
# @return [String] The Interaction Sid for this channel.
|
241
|
+
def interaction_sid
|
242
|
+
@properties['interaction_sid']
|
243
|
+
end
|
244
|
+
|
245
|
+
##
|
246
|
+
# @return [String] The Channel Sid for this Transfer.
|
247
|
+
def channel_sid
|
248
|
+
@properties['channel_sid']
|
249
|
+
end
|
250
|
+
|
251
|
+
##
|
252
|
+
# @return [String] The Execution SID associated with the Transfer.
|
253
|
+
def execution_sid
|
254
|
+
@properties['execution_sid']
|
255
|
+
end
|
256
|
+
|
257
|
+
##
|
258
|
+
# @return [TransferType]
|
259
|
+
def type
|
260
|
+
@properties['type']
|
261
|
+
end
|
262
|
+
|
263
|
+
##
|
264
|
+
# @return [TransferStatus]
|
265
|
+
def status
|
266
|
+
@properties['status']
|
267
|
+
end
|
268
|
+
|
269
|
+
##
|
270
|
+
# @return [String] The SID of the Participant initiating the Transfer.
|
271
|
+
def from
|
272
|
+
@properties['from']
|
273
|
+
end
|
274
|
+
|
275
|
+
##
|
276
|
+
# @return [String] The SID of the Participant receiving the Transfer.
|
277
|
+
def to
|
278
|
+
@properties['to']
|
279
|
+
end
|
280
|
+
|
281
|
+
##
|
282
|
+
# @return [String] The SID of the Note associated with the Transfer.
|
283
|
+
def note_sid
|
284
|
+
@properties['note_sid']
|
285
|
+
end
|
286
|
+
|
287
|
+
##
|
288
|
+
# @return [String] The SID of the Summary associated with the Transfer.
|
289
|
+
def summary_sid
|
290
|
+
@properties['summary_sid']
|
291
|
+
end
|
292
|
+
|
293
|
+
##
|
294
|
+
# @return [Time] The date and time when the Transfer was created.
|
295
|
+
def date_created
|
296
|
+
@properties['date_created']
|
297
|
+
end
|
298
|
+
|
299
|
+
##
|
300
|
+
# @return [Time] The date and time when the Transfer was last updated.
|
301
|
+
def date_updated
|
302
|
+
@properties['date_updated']
|
303
|
+
end
|
304
|
+
|
305
|
+
##
|
306
|
+
# @return [String]
|
307
|
+
def url
|
308
|
+
@properties['url']
|
309
|
+
end
|
310
|
+
|
311
|
+
##
|
312
|
+
# Fetch the InteractionTransferInstance
|
313
|
+
# @return [InteractionTransferInstance] Fetched InteractionTransferInstance
|
314
|
+
def fetch
|
315
|
+
|
316
|
+
context.fetch
|
317
|
+
end
|
318
|
+
|
319
|
+
##
|
320
|
+
# Update the InteractionTransferInstance
|
321
|
+
# @param [Object] body
|
322
|
+
# @return [InteractionTransferInstance] Updated InteractionTransferInstance
|
323
|
+
def update(body: :unset
|
324
|
+
)
|
325
|
+
|
326
|
+
context.update(
|
327
|
+
)
|
328
|
+
end
|
329
|
+
|
330
|
+
##
|
331
|
+
# Provide a user friendly representation
|
332
|
+
def to_s
|
333
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
334
|
+
"<Twilio.FlexApi.V1.InteractionTransferInstance #{values}>"
|
335
|
+
end
|
336
|
+
|
337
|
+
##
|
338
|
+
# Provide a detailed, user friendly representation
|
339
|
+
def inspect
|
340
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
341
|
+
"<Twilio.FlexApi.V1.InteractionTransferInstance #{values}>"
|
342
|
+
end
|
343
|
+
end
|
344
|
+
|
345
|
+
end
|
346
|
+
end
|
347
|
+
end
|
348
|
+
end
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
352
|
+
|
@@ -145,6 +145,7 @@ module Twilio
|
|
145
145
|
|
146
146
|
# Dependents
|
147
147
|
@invites = nil
|
148
|
+
@transfers = nil
|
148
149
|
@participants = nil
|
149
150
|
end
|
150
151
|
##
|
@@ -209,6 +210,25 @@ module Twilio
|
|
209
210
|
@invites
|
210
211
|
end
|
211
212
|
##
|
213
|
+
# Access the transfers
|
214
|
+
# @return [InteractionTransferList]
|
215
|
+
# @return [InteractionTransferContext] if sid was passed.
|
216
|
+
def transfers(sid=:unset)
|
217
|
+
|
218
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
219
|
+
|
220
|
+
if sid != :unset
|
221
|
+
return InteractionTransferContext.new(@version, @solution[:interaction_sid], @solution[:sid],sid )
|
222
|
+
end
|
223
|
+
|
224
|
+
unless @transfers
|
225
|
+
@transfers = InteractionTransferList.new(
|
226
|
+
@version, interaction_sid: @solution[:interaction_sid], channel_sid: @solution[:sid], )
|
227
|
+
end
|
228
|
+
|
229
|
+
@transfers
|
230
|
+
end
|
231
|
+
##
|
212
232
|
# Access the participants
|
213
233
|
# @return [InteractionChannelParticipantList]
|
214
234
|
# @return [InteractionChannelParticipantContext] if sid was passed.
|
@@ -391,6 +411,13 @@ module Twilio
|
|
391
411
|
context.invites
|
392
412
|
end
|
393
413
|
|
414
|
+
##
|
415
|
+
# Access the transfers
|
416
|
+
# @return [transfers] transfers
|
417
|
+
def transfers
|
418
|
+
context.transfers
|
419
|
+
end
|
420
|
+
|
394
421
|
##
|
395
422
|
# Access the participants
|
396
423
|
# @return [participants] participants
|
@@ -17,12 +17,12 @@ module Twilio
|
|
17
17
|
module REST
|
18
18
|
class Iam < IamBase
|
19
19
|
class V1 < Version
|
20
|
-
class
|
20
|
+
class KeyList < ListResource
|
21
21
|
|
22
22
|
##
|
23
|
-
# Initialize the
|
23
|
+
# Initialize the KeyList
|
24
24
|
# @param [Version] version Version that contains the resource
|
25
|
-
# @return [
|
25
|
+
# @return [KeyList] KeyList
|
26
26
|
def initialize(version)
|
27
27
|
super(version)
|
28
28
|
# Path Solution
|
@@ -31,12 +31,12 @@ module Twilio
|
|
31
31
|
|
32
32
|
end
|
33
33
|
##
|
34
|
-
# Create the
|
34
|
+
# Create the KeyInstance
|
35
35
|
# @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
|
36
36
|
# @param [String] friendly_name A descriptive string that you create to describe the resource. It can be up to 64 characters long.
|
37
37
|
# @param [Keytype] key_type
|
38
38
|
# @param [Object] policy The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
|
39
|
-
# @return [
|
39
|
+
# @return [KeyInstance] Created KeyInstance
|
40
40
|
def create(
|
41
41
|
account_sid: nil,
|
42
42
|
friendly_name: :unset,
|
@@ -58,7 +58,7 @@ module Twilio
|
|
58
58
|
|
59
59
|
|
60
60
|
payload = @version.create('POST', @uri, data: data, headers: headers)
|
61
|
-
|
61
|
+
KeyInstance.new(
|
62
62
|
@version,
|
63
63
|
payload,
|
64
64
|
)
|
@@ -69,17 +69,17 @@ module Twilio
|
|
69
69
|
|
70
70
|
# Provide a user friendly representation
|
71
71
|
def to_s
|
72
|
-
'#<Twilio.Iam.V1.
|
72
|
+
'#<Twilio.Iam.V1.KeyList>'
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
-
class
|
76
|
+
class KeyPage < Page
|
77
77
|
##
|
78
|
-
# Initialize the
|
78
|
+
# Initialize the KeyPage
|
79
79
|
# @param [Version] version Version that contains the resource
|
80
80
|
# @param [Response] response Response from the API
|
81
81
|
# @param [Hash] solution Path solution for the resource
|
82
|
-
# @return [
|
82
|
+
# @return [KeyPage] KeyPage
|
83
83
|
def initialize(version, response, solution)
|
84
84
|
super(version, response)
|
85
85
|
|
@@ -88,29 +88,29 @@ module Twilio
|
|
88
88
|
end
|
89
89
|
|
90
90
|
##
|
91
|
-
# Build an instance of
|
91
|
+
# Build an instance of KeyInstance
|
92
92
|
# @param [Hash] payload Payload response from the API
|
93
|
-
# @return [
|
93
|
+
# @return [KeyInstance] KeyInstance
|
94
94
|
def get_instance(payload)
|
95
|
-
|
95
|
+
KeyInstance.new(@version, payload)
|
96
96
|
end
|
97
97
|
|
98
98
|
##
|
99
99
|
# Provide a user friendly representation
|
100
100
|
def to_s
|
101
|
-
'<Twilio.Iam.V1.
|
101
|
+
'<Twilio.Iam.V1.KeyPage>'
|
102
102
|
end
|
103
103
|
end
|
104
|
-
class
|
104
|
+
class KeyInstance < InstanceResource
|
105
105
|
##
|
106
|
-
# Initialize the
|
106
|
+
# Initialize the KeyInstance
|
107
107
|
# @param [Version] version Version that contains the resource
|
108
108
|
# @param [Hash] payload payload that contains response from Twilio
|
109
109
|
# @param [String] account_sid The SID of the
|
110
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this
|
110
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Key
|
111
111
|
# resource.
|
112
112
|
# @param [String] sid The SID of the Call resource to fetch.
|
113
|
-
# @return [
|
113
|
+
# @return [KeyInstance] KeyInstance
|
114
114
|
def initialize(version, payload )
|
115
115
|
super(version)
|
116
116
|
|
@@ -165,13 +165,13 @@ module Twilio
|
|
165
165
|
##
|
166
166
|
# Provide a user friendly representation
|
167
167
|
def to_s
|
168
|
-
"<Twilio.Iam.V1.
|
168
|
+
"<Twilio.Iam.V1.KeyInstance>"
|
169
169
|
end
|
170
170
|
|
171
171
|
##
|
172
172
|
# Provide a detailed, user friendly representation
|
173
173
|
def inspect
|
174
|
-
"<Twilio.Iam.V1.
|
174
|
+
"<Twilio.Iam.V1.KeyInstance>"
|
175
175
|
end
|
176
176
|
end
|
177
177
|
|
@@ -23,7 +23,7 @@ module Twilio
|
|
23
23
|
@version = 'v1'
|
24
24
|
@api_key = nil
|
25
25
|
@get_api_keys = nil
|
26
|
-
@
|
26
|
+
@keys = nil
|
27
27
|
end
|
28
28
|
|
29
29
|
##
|
@@ -46,9 +46,9 @@ module Twilio
|
|
46
46
|
@get_api_keys ||= GetApiKeysList.new self
|
47
47
|
end
|
48
48
|
##
|
49
|
-
# @return [Twilio::REST::Iam::V1::
|
50
|
-
def
|
51
|
-
@
|
49
|
+
# @return [Twilio::REST::Iam::V1::KeyList]
|
50
|
+
def keys
|
51
|
+
@keys ||= KeyList.new self
|
52
52
|
end
|
53
53
|
##
|
54
54
|
# Provide a user friendly representation
|
@@ -249,6 +249,7 @@ module Twilio
|
|
249
249
|
'label_probabilities' => payload['label_probabilities'],
|
250
250
|
'extract_results' => payload['extract_results'],
|
251
251
|
'text_generation_results' => payload['text_generation_results'],
|
252
|
+
'json_results' => payload['json_results'],
|
252
253
|
'transcript_sid' => payload['transcript_sid'],
|
253
254
|
'url' => payload['url'],
|
254
255
|
}
|
@@ -347,6 +348,12 @@ module Twilio
|
|
347
348
|
@properties['text_generation_results']
|
348
349
|
end
|
349
350
|
|
351
|
+
##
|
352
|
+
# @return [Hash]
|
353
|
+
def json_results
|
354
|
+
@properties['json_results']
|
355
|
+
end
|
356
|
+
|
350
357
|
##
|
351
358
|
# @return [String] A 34 character string that uniquely identifies this Transcript.
|
352
359
|
def transcript_sid
|
@@ -0,0 +1,386 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Messaging
|
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 Messaging < MessagingBase
|
19
|
+
class V1 < Version
|
20
|
+
class ServiceContext < InstanceContext
|
21
|
+
|
22
|
+
class DestinationAlphaSenderList < ListResource
|
23
|
+
|
24
|
+
##
|
25
|
+
# Initialize the DestinationAlphaSenderList
|
26
|
+
# @param [Version] version Version that contains the resource
|
27
|
+
# @return [DestinationAlphaSenderList] DestinationAlphaSenderList
|
28
|
+
def initialize(version, service_sid: nil)
|
29
|
+
super(version)
|
30
|
+
# Path Solution
|
31
|
+
@solution = { service_sid: service_sid }
|
32
|
+
@uri = "/Services/#{@solution[:service_sid]}/DestinationAlphaSenders"
|
33
|
+
|
34
|
+
end
|
35
|
+
##
|
36
|
+
# Create the DestinationAlphaSenderInstance
|
37
|
+
# @param [String] alpha_sender The Alphanumeric Sender ID string. Can be up to 11 characters long. Valid characters are A-Z, a-z, 0-9, space, hyphen `-`, plus `+`, underscore `_` and ampersand `&`. This value cannot contain only numbers.
|
38
|
+
# @param [String] iso_country_code The Optional Two Character ISO Country Code the Alphanumeric Sender ID will be used for. If the IsoCountryCode is not provided, a default Alpha Sender will be created that can be used across all countries.
|
39
|
+
# @return [DestinationAlphaSenderInstance] Created DestinationAlphaSenderInstance
|
40
|
+
def create(
|
41
|
+
alpha_sender: nil,
|
42
|
+
iso_country_code: :unset
|
43
|
+
)
|
44
|
+
|
45
|
+
data = Twilio::Values.of({
|
46
|
+
'AlphaSender' => alpha_sender,
|
47
|
+
'IsoCountryCode' => iso_country_code,
|
48
|
+
})
|
49
|
+
|
50
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
payload = @version.create('POST', @uri, data: data, headers: headers)
|
57
|
+
DestinationAlphaSenderInstance.new(
|
58
|
+
@version,
|
59
|
+
payload,
|
60
|
+
service_sid: @solution[:service_sid],
|
61
|
+
)
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
##
|
66
|
+
# Lists DestinationAlphaSenderInstance records from the API as a list.
|
67
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
68
|
+
# memory before returning.
|
69
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
70
|
+
# guarantees to never return more than limit. Default is no limit
|
71
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
72
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
73
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
74
|
+
# efficient page size, i.e. min(limit, 1000)
|
75
|
+
# @return [Array] Array of up to limit results
|
76
|
+
def list(limit: nil, page_size: nil)
|
77
|
+
self.stream(
|
78
|
+
limit: limit,
|
79
|
+
page_size: page_size
|
80
|
+
).entries
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# Streams Instance records from the API as an Enumerable.
|
85
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
86
|
+
# is reached.
|
87
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
88
|
+
# guarantees to never return more than limit. Default is no limit
|
89
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
90
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
91
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
92
|
+
# efficient page size, i.e. min(limit, 1000)
|
93
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
94
|
+
def stream(limit: nil, page_size: nil)
|
95
|
+
limits = @version.read_limits(limit, page_size)
|
96
|
+
|
97
|
+
page = self.page(
|
98
|
+
page_size: limits[:page_size], )
|
99
|
+
|
100
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# When passed a block, yields DestinationAlphaSenderInstance records from the API.
|
105
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
106
|
+
# is reached.
|
107
|
+
def each
|
108
|
+
limits = @version.read_limits
|
109
|
+
|
110
|
+
page = self.page(page_size: limits[:page_size], )
|
111
|
+
|
112
|
+
@version.stream(page,
|
113
|
+
limit: limits[:limit],
|
114
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
115
|
+
end
|
116
|
+
|
117
|
+
##
|
118
|
+
# Retrieve a single page of DestinationAlphaSenderInstance records from the API.
|
119
|
+
# Request is executed immediately.
|
120
|
+
# @param [String] page_token PageToken provided by the API
|
121
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
122
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
123
|
+
# @return [Page] Page of DestinationAlphaSenderInstance
|
124
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
125
|
+
params = Twilio::Values.of({
|
126
|
+
'PageToken' => page_token,
|
127
|
+
'Page' => page_number,
|
128
|
+
'PageSize' => page_size,
|
129
|
+
})
|
130
|
+
headers = Twilio::Values.of({})
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
response = @version.page('GET', @uri, params: params, headers: headers)
|
135
|
+
|
136
|
+
DestinationAlphaSenderPage.new(@version, response, @solution)
|
137
|
+
end
|
138
|
+
|
139
|
+
##
|
140
|
+
# Retrieve a single page of DestinationAlphaSenderInstance records from the API.
|
141
|
+
# Request is executed immediately.
|
142
|
+
# @param [String] target_url API-generated URL for the requested results page
|
143
|
+
# @return [Page] Page of DestinationAlphaSenderInstance
|
144
|
+
def get_page(target_url)
|
145
|
+
response = @version.domain.request(
|
146
|
+
'GET',
|
147
|
+
target_url
|
148
|
+
)
|
149
|
+
DestinationAlphaSenderPage.new(@version, response, @solution)
|
150
|
+
end
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
# Provide a user friendly representation
|
155
|
+
def to_s
|
156
|
+
'#<Twilio.Messaging.V1.DestinationAlphaSenderList>'
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
|
161
|
+
class DestinationAlphaSenderContext < InstanceContext
|
162
|
+
##
|
163
|
+
# Initialize the DestinationAlphaSenderContext
|
164
|
+
# @param [Version] version Version that contains the resource
|
165
|
+
# @param [String] service_sid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the resource from.
|
166
|
+
# @param [String] sid The SID of the AlphaSender resource to fetch.
|
167
|
+
# @return [DestinationAlphaSenderContext] DestinationAlphaSenderContext
|
168
|
+
def initialize(version, service_sid, sid)
|
169
|
+
super(version)
|
170
|
+
|
171
|
+
# Path Solution
|
172
|
+
@solution = { service_sid: service_sid, sid: sid, }
|
173
|
+
@uri = "/Services/#{@solution[:service_sid]}/DestinationAlphaSenders/#{@solution[:sid]}"
|
174
|
+
|
175
|
+
|
176
|
+
end
|
177
|
+
##
|
178
|
+
# Delete the DestinationAlphaSenderInstance
|
179
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
180
|
+
def delete
|
181
|
+
|
182
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
@version.delete('DELETE', @uri, headers: headers)
|
187
|
+
end
|
188
|
+
|
189
|
+
##
|
190
|
+
# Fetch the DestinationAlphaSenderInstance
|
191
|
+
# @return [DestinationAlphaSenderInstance] Fetched DestinationAlphaSenderInstance
|
192
|
+
def fetch
|
193
|
+
|
194
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
201
|
+
DestinationAlphaSenderInstance.new(
|
202
|
+
@version,
|
203
|
+
payload,
|
204
|
+
service_sid: @solution[:service_sid],
|
205
|
+
sid: @solution[:sid],
|
206
|
+
)
|
207
|
+
end
|
208
|
+
|
209
|
+
|
210
|
+
##
|
211
|
+
# Provide a user friendly representation
|
212
|
+
def to_s
|
213
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
214
|
+
"#<Twilio.Messaging.V1.DestinationAlphaSenderContext #{context}>"
|
215
|
+
end
|
216
|
+
|
217
|
+
##
|
218
|
+
# Provide a detailed, user friendly representation
|
219
|
+
def inspect
|
220
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
221
|
+
"#<Twilio.Messaging.V1.DestinationAlphaSenderContext #{context}>"
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
class DestinationAlphaSenderPage < Page
|
226
|
+
##
|
227
|
+
# Initialize the DestinationAlphaSenderPage
|
228
|
+
# @param [Version] version Version that contains the resource
|
229
|
+
# @param [Response] response Response from the API
|
230
|
+
# @param [Hash] solution Path solution for the resource
|
231
|
+
# @return [DestinationAlphaSenderPage] DestinationAlphaSenderPage
|
232
|
+
def initialize(version, response, solution)
|
233
|
+
super(version, response)
|
234
|
+
|
235
|
+
# Path Solution
|
236
|
+
@solution = solution
|
237
|
+
end
|
238
|
+
|
239
|
+
##
|
240
|
+
# Build an instance of DestinationAlphaSenderInstance
|
241
|
+
# @param [Hash] payload Payload response from the API
|
242
|
+
# @return [DestinationAlphaSenderInstance] DestinationAlphaSenderInstance
|
243
|
+
def get_instance(payload)
|
244
|
+
DestinationAlphaSenderInstance.new(@version, payload, service_sid: @solution[:service_sid])
|
245
|
+
end
|
246
|
+
|
247
|
+
##
|
248
|
+
# Provide a user friendly representation
|
249
|
+
def to_s
|
250
|
+
'<Twilio.Messaging.V1.DestinationAlphaSenderPage>'
|
251
|
+
end
|
252
|
+
end
|
253
|
+
class DestinationAlphaSenderInstance < InstanceResource
|
254
|
+
##
|
255
|
+
# Initialize the DestinationAlphaSenderInstance
|
256
|
+
# @param [Version] version Version that contains the resource
|
257
|
+
# @param [Hash] payload payload that contains response from Twilio
|
258
|
+
# @param [String] account_sid The SID of the
|
259
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this DestinationAlphaSender
|
260
|
+
# resource.
|
261
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
262
|
+
# @return [DestinationAlphaSenderInstance] DestinationAlphaSenderInstance
|
263
|
+
def initialize(version, payload , service_sid: nil, sid: nil)
|
264
|
+
super(version)
|
265
|
+
|
266
|
+
# Marshaled Properties
|
267
|
+
@properties = {
|
268
|
+
'sid' => payload['sid'],
|
269
|
+
'account_sid' => payload['account_sid'],
|
270
|
+
'service_sid' => payload['service_sid'],
|
271
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
272
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
273
|
+
'alpha_sender' => payload['alpha_sender'],
|
274
|
+
'capabilities' => payload['capabilities'],
|
275
|
+
'url' => payload['url'],
|
276
|
+
'iso_country_code' => payload['iso_country_code'],
|
277
|
+
}
|
278
|
+
|
279
|
+
# Context
|
280
|
+
@instance_context = nil
|
281
|
+
@params = { 'service_sid' => service_sid || @properties['service_sid'] ,'sid' => sid || @properties['sid'] , }
|
282
|
+
end
|
283
|
+
|
284
|
+
##
|
285
|
+
# Generate an instance context for the instance, the context is capable of
|
286
|
+
# performing various actions. All instance actions are proxied to the context
|
287
|
+
# @return [DestinationAlphaSenderContext] CallContext for this CallInstance
|
288
|
+
def context
|
289
|
+
unless @instance_context
|
290
|
+
@instance_context = DestinationAlphaSenderContext.new(@version , @params['service_sid'], @params['sid'])
|
291
|
+
end
|
292
|
+
@instance_context
|
293
|
+
end
|
294
|
+
|
295
|
+
##
|
296
|
+
# @return [String] The unique string that we created to identify the AlphaSender resource.
|
297
|
+
def sid
|
298
|
+
@properties['sid']
|
299
|
+
end
|
300
|
+
|
301
|
+
##
|
302
|
+
# @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AlphaSender resource.
|
303
|
+
def account_sid
|
304
|
+
@properties['account_sid']
|
305
|
+
end
|
306
|
+
|
307
|
+
##
|
308
|
+
# @return [String] The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) the resource is associated with.
|
309
|
+
def service_sid
|
310
|
+
@properties['service_sid']
|
311
|
+
end
|
312
|
+
|
313
|
+
##
|
314
|
+
# @return [Time] The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
315
|
+
def date_created
|
316
|
+
@properties['date_created']
|
317
|
+
end
|
318
|
+
|
319
|
+
##
|
320
|
+
# @return [Time] The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
321
|
+
def date_updated
|
322
|
+
@properties['date_updated']
|
323
|
+
end
|
324
|
+
|
325
|
+
##
|
326
|
+
# @return [String] The Alphanumeric Sender ID string.
|
327
|
+
def alpha_sender
|
328
|
+
@properties['alpha_sender']
|
329
|
+
end
|
330
|
+
|
331
|
+
##
|
332
|
+
# @return [Array<String>] An array of values that describe whether the number can receive calls or messages. Can be: `SMS`.
|
333
|
+
def capabilities
|
334
|
+
@properties['capabilities']
|
335
|
+
end
|
336
|
+
|
337
|
+
##
|
338
|
+
# @return [String] The absolute URL of the AlphaSender resource.
|
339
|
+
def url
|
340
|
+
@properties['url']
|
341
|
+
end
|
342
|
+
|
343
|
+
##
|
344
|
+
# @return [String] The Two Character ISO Country Code the Alphanumeric Sender ID will be used for. For Default Alpha Senders that work across countries, this value will be an empty string
|
345
|
+
def iso_country_code
|
346
|
+
@properties['iso_country_code']
|
347
|
+
end
|
348
|
+
|
349
|
+
##
|
350
|
+
# Delete the DestinationAlphaSenderInstance
|
351
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
352
|
+
def delete
|
353
|
+
|
354
|
+
context.delete
|
355
|
+
end
|
356
|
+
|
357
|
+
##
|
358
|
+
# Fetch the DestinationAlphaSenderInstance
|
359
|
+
# @return [DestinationAlphaSenderInstance] Fetched DestinationAlphaSenderInstance
|
360
|
+
def fetch
|
361
|
+
|
362
|
+
context.fetch
|
363
|
+
end
|
364
|
+
|
365
|
+
##
|
366
|
+
# Provide a user friendly representation
|
367
|
+
def to_s
|
368
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
369
|
+
"<Twilio.Messaging.V1.DestinationAlphaSenderInstance #{values}>"
|
370
|
+
end
|
371
|
+
|
372
|
+
##
|
373
|
+
# Provide a detailed, user friendly representation
|
374
|
+
def inspect
|
375
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
376
|
+
"<Twilio.Messaging.V1.DestinationAlphaSenderInstance #{values}>"
|
377
|
+
end
|
378
|
+
end
|
379
|
+
|
380
|
+
end
|
381
|
+
end
|
382
|
+
end
|
383
|
+
end
|
384
|
+
end
|
385
|
+
|
386
|
+
|
@@ -216,6 +216,7 @@ module Twilio
|
|
216
216
|
@us_app_to_person = nil
|
217
217
|
@phone_numbers = nil
|
218
218
|
@alpha_senders = nil
|
219
|
+
@destination_alpha_senders = nil
|
219
220
|
@channel_senders = nil
|
220
221
|
end
|
221
222
|
##
|
@@ -408,6 +409,25 @@ module Twilio
|
|
408
409
|
@alpha_senders
|
409
410
|
end
|
410
411
|
##
|
412
|
+
# Access the destination_alpha_senders
|
413
|
+
# @return [DestinationAlphaSenderList]
|
414
|
+
# @return [DestinationAlphaSenderContext] if sid was passed.
|
415
|
+
def destination_alpha_senders(sid=:unset)
|
416
|
+
|
417
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
418
|
+
|
419
|
+
if sid != :unset
|
420
|
+
return DestinationAlphaSenderContext.new(@version, @solution[:sid],sid )
|
421
|
+
end
|
422
|
+
|
423
|
+
unless @destination_alpha_senders
|
424
|
+
@destination_alpha_senders = DestinationAlphaSenderList.new(
|
425
|
+
@version, service_sid: @solution[:sid], )
|
426
|
+
end
|
427
|
+
|
428
|
+
@destination_alpha_senders
|
429
|
+
end
|
430
|
+
##
|
411
431
|
# Access the channel_senders
|
412
432
|
# @return [ChannelSenderList]
|
413
433
|
# @return [ChannelSenderContext] if sid was passed.
|
@@ -773,6 +793,13 @@ module Twilio
|
|
773
793
|
context.alpha_senders
|
774
794
|
end
|
775
795
|
|
796
|
+
##
|
797
|
+
# Access the destination_alpha_senders
|
798
|
+
# @return [destination_alpha_senders] destination_alpha_senders
|
799
|
+
def destination_alpha_senders
|
800
|
+
context.destination_alpha_senders
|
801
|
+
end
|
802
|
+
|
776
803
|
##
|
777
804
|
# Access the channel_senders
|
778
805
|
# @return [channel_senders] channel_senders
|
@@ -17,12 +17,12 @@ module Twilio
|
|
17
17
|
module REST
|
18
18
|
class Numbers < NumbersBase
|
19
19
|
class V1 < Version
|
20
|
-
class
|
20
|
+
class WebhookList < ListResource
|
21
21
|
|
22
22
|
##
|
23
|
-
# Initialize the
|
23
|
+
# Initialize the WebhookList
|
24
24
|
# @param [Version] version Version that contains the resource
|
25
|
-
# @return [
|
25
|
+
# @return [WebhookList] WebhookList
|
26
26
|
def initialize(version)
|
27
27
|
super(version)
|
28
28
|
# Path Solution
|
@@ -31,8 +31,8 @@ module Twilio
|
|
31
31
|
|
32
32
|
end
|
33
33
|
##
|
34
|
-
# Fetch the
|
35
|
-
# @return [
|
34
|
+
# Fetch the WebhookInstance
|
35
|
+
# @return [WebhookInstance] Fetched WebhookInstance
|
36
36
|
def fetch
|
37
37
|
|
38
38
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
@@ -42,7 +42,7 @@ module Twilio
|
|
42
42
|
|
43
43
|
|
44
44
|
payload = @version.fetch('GET', @uri, headers: headers)
|
45
|
-
|
45
|
+
WebhookInstance.new(
|
46
46
|
@version,
|
47
47
|
payload,
|
48
48
|
)
|
@@ -53,17 +53,17 @@ module Twilio
|
|
53
53
|
|
54
54
|
# Provide a user friendly representation
|
55
55
|
def to_s
|
56
|
-
'#<Twilio.Numbers.V1.
|
56
|
+
'#<Twilio.Numbers.V1.WebhookList>'
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
-
class
|
60
|
+
class WebhookPage < Page
|
61
61
|
##
|
62
|
-
# Initialize the
|
62
|
+
# Initialize the WebhookPage
|
63
63
|
# @param [Version] version Version that contains the resource
|
64
64
|
# @param [Response] response Response from the API
|
65
65
|
# @param [Hash] solution Path solution for the resource
|
66
|
-
# @return [
|
66
|
+
# @return [WebhookPage] WebhookPage
|
67
67
|
def initialize(version, response, solution)
|
68
68
|
super(version, response)
|
69
69
|
|
@@ -72,29 +72,29 @@ module Twilio
|
|
72
72
|
end
|
73
73
|
|
74
74
|
##
|
75
|
-
# Build an instance of
|
75
|
+
# Build an instance of WebhookInstance
|
76
76
|
# @param [Hash] payload Payload response from the API
|
77
|
-
# @return [
|
77
|
+
# @return [WebhookInstance] WebhookInstance
|
78
78
|
def get_instance(payload)
|
79
|
-
|
79
|
+
WebhookInstance.new(@version, payload)
|
80
80
|
end
|
81
81
|
|
82
82
|
##
|
83
83
|
# Provide a user friendly representation
|
84
84
|
def to_s
|
85
|
-
'<Twilio.Numbers.V1.
|
85
|
+
'<Twilio.Numbers.V1.WebhookPage>'
|
86
86
|
end
|
87
87
|
end
|
88
|
-
class
|
88
|
+
class WebhookInstance < InstanceResource
|
89
89
|
##
|
90
|
-
# Initialize the
|
90
|
+
# Initialize the WebhookInstance
|
91
91
|
# @param [Version] version Version that contains the resource
|
92
92
|
# @param [Hash] payload payload that contains response from Twilio
|
93
93
|
# @param [String] account_sid The SID of the
|
94
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this
|
94
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Webhook
|
95
95
|
# resource.
|
96
96
|
# @param [String] sid The SID of the Call resource to fetch.
|
97
|
-
# @return [
|
97
|
+
# @return [WebhookInstance] WebhookInstance
|
98
98
|
def initialize(version, payload )
|
99
99
|
super(version)
|
100
100
|
|
@@ -149,13 +149,13 @@ module Twilio
|
|
149
149
|
##
|
150
150
|
# Provide a user friendly representation
|
151
151
|
def to_s
|
152
|
-
"<Twilio.Numbers.V1.
|
152
|
+
"<Twilio.Numbers.V1.WebhookInstance>"
|
153
153
|
end
|
154
154
|
|
155
155
|
##
|
156
156
|
# Provide a detailed, user friendly representation
|
157
157
|
def inspect
|
158
|
-
"<Twilio.Numbers.V1.
|
158
|
+
"<Twilio.Numbers.V1.WebhookInstance>"
|
159
159
|
end
|
160
160
|
end
|
161
161
|
|
@@ -28,8 +28,8 @@ module Twilio
|
|
28
28
|
@porting_portabilities = nil
|
29
29
|
@porting_webhook_configurations = nil
|
30
30
|
@porting_webhook_configurations_delete = nil
|
31
|
-
@porting_webhook_configuration_fetch = nil
|
32
31
|
@signing_request_configurations = nil
|
32
|
+
@webhook = nil
|
33
33
|
end
|
34
34
|
|
35
35
|
##
|
@@ -135,16 +135,16 @@ module Twilio
|
|
135
135
|
end
|
136
136
|
end
|
137
137
|
##
|
138
|
-
# @return [Twilio::REST::Numbers::V1::PortingWebhookConfigurationFetchList]
|
139
|
-
def porting_webhook_configuration_fetch
|
140
|
-
@porting_webhook_configuration_fetch ||= PortingWebhookConfigurationFetchList.new self
|
141
|
-
end
|
142
|
-
##
|
143
138
|
# @return [Twilio::REST::Numbers::V1::SigningRequestConfigurationList]
|
144
139
|
def signing_request_configurations
|
145
140
|
@signing_request_configurations ||= SigningRequestConfigurationList.new self
|
146
141
|
end
|
147
142
|
##
|
143
|
+
# @return [Twilio::REST::Numbers::V1::WebhookList]
|
144
|
+
def webhook
|
145
|
+
@webhook ||= WebhookList.new self
|
146
|
+
end
|
147
|
+
##
|
148
148
|
# Provide a user friendly representation
|
149
149
|
def to_s
|
150
150
|
'<Twilio::REST::Numbers::V1>';
|
data/lib/twilio-ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.4.
|
4
|
+
version: 7.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -502,6 +502,7 @@ files:
|
|
502
502
|
- lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb
|
503
503
|
- lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb
|
504
504
|
- lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb
|
505
|
+
- lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb
|
505
506
|
- lib/twilio-ruby/rest/flex_api/v1/plugin.rb
|
506
507
|
- lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb
|
507
508
|
- lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb
|
@@ -524,7 +525,7 @@ files:
|
|
524
525
|
- lib/twilio-ruby/rest/iam/v1.rb
|
525
526
|
- lib/twilio-ruby/rest/iam/v1/api_key.rb
|
526
527
|
- lib/twilio-ruby/rest/iam/v1/get_api_keys.rb
|
527
|
-
- lib/twilio-ruby/rest/iam/v1/
|
528
|
+
- lib/twilio-ruby/rest/iam/v1/key.rb
|
528
529
|
- lib/twilio-ruby/rest/iam_base.rb
|
529
530
|
- lib/twilio-ruby/rest/insights.rb
|
530
531
|
- lib/twilio-ruby/rest/insights/v1.rb
|
@@ -612,6 +613,7 @@ files:
|
|
612
613
|
- lib/twilio-ruby/rest/messaging/v1/service.rb
|
613
614
|
- lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
|
614
615
|
- lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb
|
616
|
+
- lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb
|
615
617
|
- lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb
|
616
618
|
- lib/twilio-ruby/rest/messaging/v1/service/short_code.rb
|
617
619
|
- lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
|
@@ -650,8 +652,8 @@ files:
|
|
650
652
|
- lib/twilio-ruby/rest/numbers/v1/porting_portability.rb
|
651
653
|
- lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb
|
652
654
|
- lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb
|
653
|
-
- lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_fetch.rb
|
654
655
|
- lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb
|
656
|
+
- lib/twilio-ruby/rest/numbers/v1/webhook.rb
|
655
657
|
- lib/twilio-ruby/rest/numbers/v2.rb
|
656
658
|
- lib/twilio-ruby/rest/numbers/v2/authorization_document.rb
|
657
659
|
- lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb
|