twilio-ruby 7.4.3 → 7.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7d6689c97fcad14e96b7d77b508bffcb02e1df1d
4
- data.tar.gz: 9dcf43a9e8af38ecadf3ac8cf10b0503e4b1bec7
3
+ metadata.gz: 3052de4c2fd8bfb5bb0970f38e72a95b7e79c15c
4
+ data.tar.gz: 568c38a60c149a631b1d61a70f237fdc0361743b
5
5
  SHA512:
6
- metadata.gz: 7e7b44610e849d581c114a13bc001a8057511f68dca0f06fcdda057c4b19ab2ee23f1d34e0dd9078d12e89992081a742866d470e010ec0fd12ef73abe1d96fdf
7
- data.tar.gz: aaeb5e71c902dd442b63eca4ee1ebc94a236cbb3f9d5710ff77c8a14c8a044d28cacb249a4aac0e5e295d458aa586a4936051c0d83b0c640a166dd71673b35a9
6
+ metadata.gz: 19a33d317d692b6bfefc92c964f581e03f819bc7ad0ec962db9fe328637ec939fb82d8d0b4c57d3e5d8980692bbff09b5e98d1620380104f9c67d07b2d72a649
7
+ data.tar.gz: bf7d58379d89208d557cf735d8d8f15b8b2bc3f39b5d7141c843919b27ab0f0239450b2d73dc428229ed9059ce3c6c935f9851206a388912acad2971a68da845
data/CHANGES.md CHANGED
@@ -1,6 +1,21 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2025-02-11] Version 7.4.4
5
+ --------------------------
6
+ **Api**
7
+ - Change downstream url and change media type for file `base/api/v2010/validation_request.json`.
8
+
9
+ **Intelligence**
10
+ - Add json_results for Generative JSON operator results
11
+
12
+ **Messaging**
13
+ - Add DestinationAlphaSender API to support Country-Specific Alpha Senders
14
+
15
+ **Video**
16
+ - Change codec type from enum to case-insensitive enum in recording and room_recording apis
17
+
18
+
4
19
  [2025-01-28] Version 7.4.3
5
20
  --------------------------
6
21
  **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.3'
42
+ gem 'twilio-ruby', '~> 7.4.4'
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.3
48
+ gem install twilio-ruby -v 7.4.4
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.
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '7.4.3'
2
+ VERSION = '7.4.4'
3
3
  end
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.3
4
+ version: 7.4.4
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-01-28 00:00:00.000000000 Z
11
+ date: 2025-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -612,6 +612,7 @@ files:
612
612
  - lib/twilio-ruby/rest/messaging/v1/service.rb
613
613
  - lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
614
614
  - lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb
615
+ - lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb
615
616
  - lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb
616
617
  - lib/twilio-ruby/rest/messaging/v1/service/short_code.rb
617
618
  - lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb