twilio-ruby 7.8.7 → 7.8.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e58c5c7fea368238c55e9d246f2b29d8d32a2cff
4
- data.tar.gz: 523009baf572426ed7527001b64da58bd57090d2
3
+ metadata.gz: 2b11058a2f22cd95283f218eb0ead8ea6b142992
4
+ data.tar.gz: d51db32ebc6312550f6ed59fbe6d58b9fe1cc8a2
5
5
  SHA512:
6
- metadata.gz: 8dc7972e9d85581aebea205b76fe0a9d05c636637d3c64d48d387ab4f4a588e9a8d57d23eb717b7c59fbdfa3f047b7b564e70070a2885854de73f108132a4432
7
- data.tar.gz: cc3b10c122b8ff2ec6b3fae9752f272ac09d3cbe6da8de62cd1cc1bee4d06b23be280dbb921c8e29cd20d2e22c4da51448b4e8720a98f615591c14477d48f243
6
+ metadata.gz: a2c86f3c669803955244b87d44a7ef30baad9226eb6d065c7c98762a99b3ec43b403bb5e034e8cb1774fd76970a5192ac7051ee233162b77341100ea8c85bcaa
7
+ data.tar.gz: 1852bb1350df711ca233eb055277b20613b71b99bd9bcb4420d2ca89c43656deb8982b4cb9838b778b9344e564911f3ef2ad52d0f467db17f17de5646de8dc1c
data/CHANGES.md CHANGED
@@ -1,6 +1,22 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2025-12-03] Version 7.8.8
5
+ --------------------------
6
+ **Library - Fix**
7
+ - [PR #765](https://github.com/twilio/twilio-ruby/pull/765): Regional API domain processing. Thanks to [@manisha1997](https://github.com/manisha1997)!
8
+
9
+ **Api**
10
+ - Add `twiml_session` resource for calls
11
+ - Add `twiml_session` resource for calls
12
+
13
+ **Monitor**
14
+ - Update default output properties
15
+
16
+ **Trusthub**
17
+ - Added customer_profile_sid in toll-free initialize api payload.
18
+
19
+
4
20
  [2025-11-20] Version 7.8.7
5
21
  --------------------------
6
22
  **Memory**
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.8.7'
42
+ gem 'twilio-ruby', '~> 7.8.8'
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.8.7
48
+ gem install twilio-ruby -v 7.8.8
49
49
  ```
50
50
 
51
51
  To build and install the development branch yourself from the latest source:
@@ -3,6 +3,19 @@ module Twilio
3
3
  class ClientBase
4
4
  # rubocop:disable Style/ClassVars
5
5
  @@default_region = 'us1'
6
+ # Maps region codes to their corresponding edge location names
7
+ # Used to automatically set edge based on region for backward compatibility
8
+ @@region_mappings = {
9
+ 'au1' => 'sydney',
10
+ 'br1' => 'sao-paulo',
11
+ 'de1' => 'frankfurt',
12
+ 'ie1' => 'dublin',
13
+ 'jp1' => 'tokyo',
14
+ 'jp2' => 'osaka',
15
+ 'sg1' => 'singapore',
16
+ 'us1' => 'ashburn',
17
+ 'us2' => 'umatilla'
18
+ }
6
19
  # rubocop:enable Style/ClassVars
7
20
 
8
21
  attr_accessor :http_client, :username, :password, :account_sid, :auth_token, :region, :edge, :logger,
@@ -14,7 +27,17 @@ module Twilio
14
27
  @username = username || Twilio.account_sid
15
28
  @password = password || Twilio.auth_token
16
29
  @region = region || Twilio.region
17
- @edge = Twilio.edge
30
+ if (region.nil? && !Twilio.edge.nil?) || (!region.nil? && Twilio.edge.nil?)
31
+ # rubocop:disable Layout/LineLength
32
+ warn '[DEPRECATION] For regional processing, DNS is of format product.<edge>.<region>.twilio.com;otherwise use product.twilio.com.'
33
+ end
34
+ if Twilio.edge
35
+ @edge = Twilio.edge
36
+ elsif @region && @@region_mappings[region]
37
+ warn '[DEPRECATION] Setting default `Edge` for the provided `region`.'
38
+ # rubocop:enable Layout/LineLength
39
+ @edge = @@region_mappings[region]
40
+ end
18
41
  @account_sid = account_sid || @username
19
42
  @auth_token = @password
20
43
  @auth = [@username, @password]
@@ -78,6 +101,10 @@ module Twilio
78
101
  ##
79
102
  # Build the final request uri
80
103
  def build_uri(uri)
104
+ if @edge.nil? && @region && @@region_mappings[@region]
105
+ warn '[DEPRECATION] Setting default `Edge` for the provided `region`.'
106
+ @edge = @@region_mappings[@region]
107
+ end
81
108
  return uri if @region.nil? && @edge.nil?
82
109
 
83
110
  parsed_url = URI(uri)
@@ -0,0 +1,462 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Iam
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 Iam < IamBase
19
+ class V1 < Version
20
+ class OAuthAppList < ListResource
21
+
22
+ class IamV1AccountVendorOauthAppCreateRequest
23
+ # @param [type]: [String]
24
+ # @param [friendly_name]: [String]
25
+ # @param [owner_sid]: [String]
26
+ # @param [description]: [String]
27
+ # @param [client_sid]: [String]
28
+ # @param [policy]: [OAuthAppList.IamV1OrganizationVendoroauthappPolicy]
29
+ # @param [access_token_ttl]: [String]
30
+ attr_accessor :type, :friendly_name, :owner_sid, :description, :client_sid, :policy, :access_token_ttl
31
+ def initialize(payload)
32
+ @type = payload["type"]
33
+ @friendly_name = payload["friendly_name"]
34
+ @owner_sid = payload["owner_sid"]
35
+ @description = payload["description"]
36
+ @client_sid = payload["client_sid"]
37
+ @policy = payload["policy"]
38
+ @access_token_ttl = payload["access_token_ttl"]
39
+ end
40
+ def to_json(options = {})
41
+ {
42
+ "type": @type,
43
+ "friendly_name": @friendly_name,
44
+ "owner_sid": @owner_sid,
45
+ "description": @description,
46
+ "client_sid": @client_sid,
47
+ "policy": @policy,
48
+ "access_token_ttl": @access_token_ttl,
49
+ }.to_json(options)
50
+ end
51
+ end
52
+
53
+ class IamV1AccountVendorOauthAppUpdateRequest
54
+ # @param [type]: [String]
55
+ # @param [friendly_name]: [String]
56
+ # @param [description]: [String]
57
+ # @param [policy]: [OAuthAppList.IamV1OrganizationVendorOauthAppUpdateRequestPolicy]
58
+ # @param [access_token_ttl]: [String]
59
+ attr_accessor :type, :friendly_name, :description, :policy, :access_token_ttl
60
+ def initialize(payload)
61
+ @type = payload["type"]
62
+ @friendly_name = payload["friendly_name"]
63
+ @description = payload["description"]
64
+ @policy = payload["policy"]
65
+ @access_token_ttl = payload["access_token_ttl"]
66
+ end
67
+ def to_json(options = {})
68
+ {
69
+ "type": @type,
70
+ "friendly_name": @friendly_name,
71
+ "description": @description,
72
+ "policy": @policy,
73
+ "access_token_ttl": @access_token_ttl,
74
+ }.to_json(options)
75
+ end
76
+ end
77
+
78
+ class IamV1OrganizationVendorOauthAppUpdateRequestPolicy
79
+ # @param [allow]: [Array<String>] Set of permissions explicitly allowed
80
+ # @param [deny]: [Array<String>] Set of permissions explicitly denied
81
+ attr_accessor :allow, :deny
82
+ def initialize(payload)
83
+ @allow = payload["allow"]
84
+ @deny = payload["deny"]
85
+ end
86
+ def to_json(options = {})
87
+ {
88
+ "allow": @allow,
89
+ "deny": @deny,
90
+ }.to_json(options)
91
+ end
92
+ end
93
+
94
+
95
+ class IamV1AccountVendorOauthAppCreateRequest
96
+ # @param [type]: [String]
97
+ # @param [friendly_name]: [String]
98
+ # @param [owner_sid]: [String]
99
+ # @param [description]: [String]
100
+ # @param [client_sid]: [String]
101
+ # @param [policy]: [OAuthAppList.IamV1OrganizationVendoroauthappPolicy]
102
+ # @param [access_token_ttl]: [String]
103
+ attr_accessor :type, :friendly_name, :owner_sid, :description, :client_sid, :policy, :access_token_ttl
104
+ def initialize(payload)
105
+ @type = payload["type"]
106
+ @friendly_name = payload["friendly_name"]
107
+ @owner_sid = payload["owner_sid"]
108
+ @description = payload["description"]
109
+ @client_sid = payload["client_sid"]
110
+ @policy = payload["policy"]
111
+ @access_token_ttl = payload["access_token_ttl"]
112
+ end
113
+ def to_json(options = {})
114
+ {
115
+ "type": @type,
116
+ "friendly_name": @friendly_name,
117
+ "owner_sid": @owner_sid,
118
+ "description": @description,
119
+ "client_sid": @client_sid,
120
+ "policy": @policy,
121
+ "access_token_ttl": @access_token_ttl,
122
+ }.to_json(options)
123
+ end
124
+ end
125
+
126
+ class IamV1AccountVendorOauthAppUpdateRequest
127
+ # @param [type]: [String]
128
+ # @param [friendly_name]: [String]
129
+ # @param [description]: [String]
130
+ # @param [policy]: [OAuthAppList.IamV1OrganizationVendorOauthAppUpdateRequestPolicy]
131
+ # @param [access_token_ttl]: [String]
132
+ attr_accessor :type, :friendly_name, :description, :policy, :access_token_ttl
133
+ def initialize(payload)
134
+ @type = payload["type"]
135
+ @friendly_name = payload["friendly_name"]
136
+ @description = payload["description"]
137
+ @policy = payload["policy"]
138
+ @access_token_ttl = payload["access_token_ttl"]
139
+ end
140
+ def to_json(options = {})
141
+ {
142
+ "type": @type,
143
+ "friendly_name": @friendly_name,
144
+ "description": @description,
145
+ "policy": @policy,
146
+ "access_token_ttl": @access_token_ttl,
147
+ }.to_json(options)
148
+ end
149
+ end
150
+
151
+ class IamV1OrganizationVendorOauthAppUpdateRequestPolicy
152
+ # @param [allow]: [Array<String>] Set of permissions explicitly allowed
153
+ # @param [deny]: [Array<String>] Set of permissions explicitly denied
154
+ attr_accessor :allow, :deny
155
+ def initialize(payload)
156
+ @allow = payload["allow"]
157
+ @deny = payload["deny"]
158
+ end
159
+ def to_json(options = {})
160
+ {
161
+ "allow": @allow,
162
+ "deny": @deny,
163
+ }.to_json(options)
164
+ end
165
+ end
166
+
167
+
168
+ ##
169
+ # Initialize the OAuthAppList
170
+ # @param [Version] version Version that contains the resource
171
+ # @return [OAuthAppList] OAuthAppList
172
+ def initialize(version)
173
+ super(version)
174
+ # Path Solution
175
+ @solution = { }
176
+ @uri = "/Account/OAuthApps"
177
+
178
+ end
179
+ ##
180
+ # Create the OAuthAppInstance
181
+ # @param [IamV1AccountVendorOauthAppCreateRequest] iam_v1_account_vendor_oauth_app_create_request
182
+ # @return [OAuthAppInstance] Created OAuthAppInstance
183
+ def create(iam_v1_account_vendor_oauth_app_create_request: nil
184
+ )
185
+
186
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
187
+ headers['Content-Type'] = 'application/json'
188
+
189
+
190
+
191
+
192
+ payload = @version.create('POST', @uri, headers: headers, data: iam_v1_account_vendor_oauth_app_create_request.to_json)
193
+ OAuthAppInstance.new(
194
+ @version,
195
+ payload,
196
+ )
197
+ end
198
+
199
+
200
+
201
+
202
+ # Provide a user friendly representation
203
+ def to_s
204
+ '#<Twilio.Iam.V1.OAuthAppList>'
205
+ end
206
+ end
207
+
208
+
209
+ class OAuthAppContext < InstanceContext
210
+ ##
211
+ # Initialize the OAuthAppContext
212
+ # @param [Version] version Version that contains the resource
213
+ # @param [String] sid Unique ID (sid) of the OAuth app
214
+ # @return [OAuthAppContext] OAuthAppContext
215
+ def initialize(version, sid)
216
+ super(version)
217
+
218
+ # Path Solution
219
+ @solution = { sid: sid, }
220
+ @uri = "/Account/OAuthApps/#{@solution[:sid]}"
221
+
222
+
223
+ end
224
+ ##
225
+ # Delete the OAuthAppInstance
226
+ # @return [Boolean] True if delete succeeds, false otherwise
227
+ def delete
228
+
229
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
230
+
231
+
232
+
233
+ @version.delete('DELETE', @uri, headers: headers)
234
+ end
235
+
236
+ ##
237
+ # Update the OAuthAppInstance
238
+ # @param [IamV1AccountVendorOauthAppUpdateRequest] iam_v1_account_vendor_oauth_app_update_request
239
+ # @return [OAuthAppInstance] Updated OAuthAppInstance
240
+ def update(iam_v1_account_vendor_oauth_app_update_request: nil
241
+ )
242
+
243
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
244
+ headers['Content-Type'] = 'application/json'
245
+
246
+
247
+
248
+
249
+ payload = @version.update('PUT', @uri, headers: headers, data: iam_v1_account_vendor_oauth_app_update_request.to_json)
250
+ OAuthAppInstance.new(
251
+ @version,
252
+ payload,
253
+ sid: @solution[:sid],
254
+ )
255
+ end
256
+
257
+
258
+ ##
259
+ # Provide a user friendly representation
260
+ def to_s
261
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
262
+ "#<Twilio.Iam.V1.OAuthAppContext #{context}>"
263
+ end
264
+
265
+ ##
266
+ # Provide a detailed, user friendly representation
267
+ def inspect
268
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
269
+ "#<Twilio.Iam.V1.OAuthAppContext #{context}>"
270
+ end
271
+ end
272
+
273
+ class OAuthAppPage < Page
274
+ ##
275
+ # Initialize the OAuthAppPage
276
+ # @param [Version] version Version that contains the resource
277
+ # @param [Response] response Response from the API
278
+ # @param [Hash] solution Path solution for the resource
279
+ # @return [OAuthAppPage] OAuthAppPage
280
+ def initialize(version, response, solution)
281
+ super(version, response)
282
+
283
+ # Path Solution
284
+ @solution = solution
285
+ end
286
+
287
+ ##
288
+ # Build an instance of OAuthAppInstance
289
+ # @param [Hash] payload Payload response from the API
290
+ # @return [OAuthAppInstance] OAuthAppInstance
291
+ def get_instance(payload)
292
+ OAuthAppInstance.new(@version, payload)
293
+ end
294
+
295
+ ##
296
+ # Provide a user friendly representation
297
+ def to_s
298
+ '<Twilio.Iam.V1.OAuthAppPage>'
299
+ end
300
+ end
301
+ class OAuthAppInstance < InstanceResource
302
+ ##
303
+ # Initialize the OAuthAppInstance
304
+ # @param [Version] version Version that contains the resource
305
+ # @param [Hash] payload payload that contains response from Twilio
306
+ # @param [String] account_sid The SID of the
307
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this OAuthApp
308
+ # resource.
309
+ # @param [String] sid The SID of the Call resource to fetch.
310
+ # @return [OAuthAppInstance] OAuthAppInstance
311
+ def initialize(version, payload , sid: nil)
312
+ super(version)
313
+
314
+ # Marshaled Properties
315
+ @properties = {
316
+ 'type' => payload['type'],
317
+ 'sid' => payload['sid'],
318
+ 'friendly_name' => payload['friendly_name'],
319
+ 'description' => payload['description'],
320
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
321
+ 'created_by' => payload['created_by'],
322
+ 'secret' => payload['secret'],
323
+ 'status' => payload['status'],
324
+ 'policy' => payload['policy'],
325
+ 'access_token_ttl' => payload['access_token_ttl'] == nil ? payload['access_token_ttl'] : payload['access_token_ttl'].to_i,
326
+ 'code' => payload['code'],
327
+ 'message' => payload['message'],
328
+ 'more_info' => payload['more_info'],
329
+ }
330
+
331
+ # Context
332
+ @instance_context = nil
333
+ @params = { 'sid' => sid || @properties['sid'] , }
334
+ end
335
+
336
+ ##
337
+ # Generate an instance context for the instance, the context is capable of
338
+ # performing various actions. All instance actions are proxied to the context
339
+ # @return [OAuthAppContext] CallContext for this CallInstance
340
+ def context
341
+ unless @instance_context
342
+ @instance_context = OAuthAppContext.new(@version , @params['sid'])
343
+ end
344
+ @instance_context
345
+ end
346
+
347
+ ##
348
+ # @return [String]
349
+ def type
350
+ @properties['type']
351
+ end
352
+
353
+ ##
354
+ # @return [String]
355
+ def sid
356
+ @properties['sid']
357
+ end
358
+
359
+ ##
360
+ # @return [String]
361
+ def friendly_name
362
+ @properties['friendly_name']
363
+ end
364
+
365
+ ##
366
+ # @return [String]
367
+ def description
368
+ @properties['description']
369
+ end
370
+
371
+ ##
372
+ # @return [Time]
373
+ def date_created
374
+ @properties['date_created']
375
+ end
376
+
377
+ ##
378
+ # @return [String]
379
+ def created_by
380
+ @properties['created_by']
381
+ end
382
+
383
+ ##
384
+ # @return [String]
385
+ def secret
386
+ @properties['secret']
387
+ end
388
+
389
+ ##
390
+ # @return [String]
391
+ def status
392
+ @properties['status']
393
+ end
394
+
395
+ ##
396
+ # @return [IamV1OrganizationVendoroauthappPolicy]
397
+ def policy
398
+ @properties['policy']
399
+ end
400
+
401
+ ##
402
+ # @return [String]
403
+ def access_token_ttl
404
+ @properties['access_token_ttl']
405
+ end
406
+
407
+ ##
408
+ # @return [String] Twilio-specific error code
409
+ def code
410
+ @properties['code']
411
+ end
412
+
413
+ ##
414
+ # @return [String] Error message
415
+ def message
416
+ @properties['message']
417
+ end
418
+
419
+ ##
420
+ # @return [String] Link to Error Code References
421
+ def more_info
422
+ @properties['more_info']
423
+ end
424
+
425
+ ##
426
+ # Delete the OAuthAppInstance
427
+ # @return [Boolean] True if delete succeeds, false otherwise
428
+ def delete
429
+
430
+ context.delete
431
+ end
432
+
433
+ ##
434
+ # Update the OAuthAppInstance
435
+ # @param [IamV1AccountVendorOauthAppUpdateRequest] iam_v1_account_vendor_oauth_app_update_request
436
+ # @return [OAuthAppInstance] Updated OAuthAppInstance
437
+ def update(iam_v1_account_vendor_oauth_app_update_request: nil
438
+ )
439
+
440
+ context.update(
441
+ )
442
+ end
443
+
444
+ ##
445
+ # Provide a user friendly representation
446
+ def to_s
447
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
448
+ "<Twilio.Iam.V1.OAuthAppInstance #{values}>"
449
+ end
450
+
451
+ ##
452
+ # Provide a detailed, user friendly representation
453
+ def inspect
454
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
455
+ "<Twilio.Iam.V1.OAuthAppInstance #{values}>"
456
+ end
457
+ end
458
+
459
+ end
460
+ end
461
+ end
462
+ end
@@ -24,6 +24,7 @@ module Twilio
24
24
  @api_key = nil
25
25
  @get_api_keys = nil
26
26
  @new_api_key = nil
27
+ @o_auth_apps = nil
27
28
  @token = nil
28
29
  end
29
30
 
@@ -52,6 +53,20 @@ module Twilio
52
53
  @new_api_key ||= NewApiKeyList.new self
53
54
  end
54
55
  ##
56
+ # @param [String] sid Unique ID (sid) of the OAuth app
57
+ # @return [Twilio::REST::Iam::V1::OAuthAppContext] if sid was passed.
58
+ # @return [Twilio::REST::Iam::V1::OAuthAppList]
59
+ def o_auth_apps(sid=:unset)
60
+ if sid.nil?
61
+ raise ArgumentError, 'sid cannot be nil'
62
+ end
63
+ if sid == :unset
64
+ @o_auth_apps ||= OAuthAppList.new self
65
+ else
66
+ OAuthAppContext.new(self, sid)
67
+ end
68
+ end
69
+ ##
55
70
  # @return [Twilio::REST::Iam::V1::TokenList]
56
71
  def token
57
72
  @token ||= TokenList.new self
@@ -0,0 +1,208 @@
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 DomainValidateDnList < ListResource
21
+
22
+ ##
23
+ # Initialize the DomainValidateDnList
24
+ # @param [Version] version Version that contains the resource
25
+ # @return [DomainValidateDnList] DomainValidateDnList
26
+ def initialize(version)
27
+ super(version)
28
+ # Path Solution
29
+ @solution = { }
30
+
31
+
32
+ end
33
+
34
+
35
+
36
+ # Provide a user friendly representation
37
+ def to_s
38
+ '#<Twilio.Messaging.V1.DomainValidateDnList>'
39
+ end
40
+ end
41
+
42
+
43
+ class DomainValidateDnContext < InstanceContext
44
+ ##
45
+ # Initialize the DomainValidateDnContext
46
+ # @param [Version] version Version that contains the resource
47
+ # @param [String] domain_sid Unique string used to identify the domain.
48
+ # @return [DomainValidateDnContext] DomainValidateDnContext
49
+ def initialize(version, domain_sid)
50
+ super(version)
51
+
52
+ # Path Solution
53
+ @solution = { domain_sid: domain_sid, }
54
+ @uri = "/LinkShortening/Domains/#{@solution[:domain_sid]}/ValidateDns"
55
+
56
+
57
+ end
58
+ ##
59
+ # Fetch the DomainValidateDnInstance
60
+ # @return [DomainValidateDnInstance] Fetched DomainValidateDnInstance
61
+ def fetch
62
+
63
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
64
+
65
+
66
+
67
+
68
+
69
+ payload = @version.fetch('GET', @uri, headers: headers)
70
+ DomainValidateDnInstance.new(
71
+ @version,
72
+ payload,
73
+ domain_sid: @solution[:domain_sid],
74
+ )
75
+ end
76
+
77
+
78
+ ##
79
+ # Provide a user friendly representation
80
+ def to_s
81
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
82
+ "#<Twilio.Messaging.V1.DomainValidateDnContext #{context}>"
83
+ end
84
+
85
+ ##
86
+ # Provide a detailed, user friendly representation
87
+ def inspect
88
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
89
+ "#<Twilio.Messaging.V1.DomainValidateDnContext #{context}>"
90
+ end
91
+ end
92
+
93
+ class DomainValidateDnPage < Page
94
+ ##
95
+ # Initialize the DomainValidateDnPage
96
+ # @param [Version] version Version that contains the resource
97
+ # @param [Response] response Response from the API
98
+ # @param [Hash] solution Path solution for the resource
99
+ # @return [DomainValidateDnPage] DomainValidateDnPage
100
+ def initialize(version, response, solution)
101
+ super(version, response)
102
+
103
+ # Path Solution
104
+ @solution = solution
105
+ end
106
+
107
+ ##
108
+ # Build an instance of DomainValidateDnInstance
109
+ # @param [Hash] payload Payload response from the API
110
+ # @return [DomainValidateDnInstance] DomainValidateDnInstance
111
+ def get_instance(payload)
112
+ DomainValidateDnInstance.new(@version, payload)
113
+ end
114
+
115
+ ##
116
+ # Provide a user friendly representation
117
+ def to_s
118
+ '<Twilio.Messaging.V1.DomainValidateDnPage>'
119
+ end
120
+ end
121
+ class DomainValidateDnInstance < InstanceResource
122
+ ##
123
+ # Initialize the DomainValidateDnInstance
124
+ # @param [Version] version Version that contains the resource
125
+ # @param [Hash] payload payload that contains response from Twilio
126
+ # @param [String] account_sid The SID of the
127
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this DomainValidateDn
128
+ # resource.
129
+ # @param [String] sid The SID of the Call resource to fetch.
130
+ # @return [DomainValidateDnInstance] DomainValidateDnInstance
131
+ def initialize(version, payload , domain_sid: nil)
132
+ super(version)
133
+
134
+ # Marshaled Properties
135
+ @properties = {
136
+ 'domain_sid' => payload['domain_sid'],
137
+ 'is_valid' => payload['is_valid'],
138
+ 'reason' => payload['reason'],
139
+ 'url' => payload['url'],
140
+ }
141
+
142
+ # Context
143
+ @instance_context = nil
144
+ @params = { 'domain_sid' => domain_sid || @properties['domain_sid'] , }
145
+ end
146
+
147
+ ##
148
+ # Generate an instance context for the instance, the context is capable of
149
+ # performing various actions. All instance actions are proxied to the context
150
+ # @return [DomainValidateDnContext] CallContext for this CallInstance
151
+ def context
152
+ unless @instance_context
153
+ @instance_context = DomainValidateDnContext.new(@version , @params['domain_sid'])
154
+ end
155
+ @instance_context
156
+ end
157
+
158
+ ##
159
+ # @return [String] The unique string that we created to identify the Domain resource.
160
+ def domain_sid
161
+ @properties['domain_sid']
162
+ end
163
+
164
+ ##
165
+ # @return [Boolean]
166
+ def is_valid
167
+ @properties['is_valid']
168
+ end
169
+
170
+ ##
171
+ # @return [String]
172
+ def reason
173
+ @properties['reason']
174
+ end
175
+
176
+ ##
177
+ # @return [String]
178
+ def url
179
+ @properties['url']
180
+ end
181
+
182
+ ##
183
+ # Fetch the DomainValidateDnInstance
184
+ # @return [DomainValidateDnInstance] Fetched DomainValidateDnInstance
185
+ def fetch
186
+
187
+ context.fetch
188
+ end
189
+
190
+ ##
191
+ # Provide a user friendly representation
192
+ def to_s
193
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
194
+ "<Twilio.Messaging.V1.DomainValidateDnInstance #{values}>"
195
+ end
196
+
197
+ ##
198
+ # Provide a detailed, user friendly representation
199
+ def inspect
200
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
201
+ "<Twilio.Messaging.V1.DomainValidateDnInstance #{values}>"
202
+ end
203
+ end
204
+
205
+ end
206
+ end
207
+ end
208
+ end
@@ -26,6 +26,7 @@ module Twilio
26
26
  @domain_certs = nil
27
27
  @domain_config = nil
28
28
  @domain_config_messaging_service = nil
29
+ @domain_validate_dns = nil
29
30
  @external_campaign = nil
30
31
  @linkshortening_messaging_service = nil
31
32
  @linkshortening_messaging_service_domain_association = nil
@@ -97,6 +98,20 @@ module Twilio
97
98
  end
98
99
  end
99
100
  ##
101
+ # @param [String] domain_sid Unique string used to identify the domain.
102
+ # @return [Twilio::REST::Messaging::V1::DomainValidateDnContext] if domainSid was passed.
103
+ # @return [Twilio::REST::Messaging::V1::DomainValidateDnList]
104
+ def domain_validate_dns(domain_sid=:unset)
105
+ if domain_sid.nil?
106
+ raise ArgumentError, 'domain_sid cannot be nil'
107
+ end
108
+ if domain_sid == :unset
109
+ @domain_validate_dns ||= DomainValidateDnList.new self
110
+ else
111
+ DomainValidateDnContext.new(self, domain_sid)
112
+ end
113
+ end
114
+ ##
100
115
  # @return [Twilio::REST::Messaging::V1::ExternalCampaignList]
101
116
  def external_campaign
102
117
  @external_campaign ||= ExternalCampaignList.new self
@@ -32,6 +32,7 @@ module Twilio
32
32
  end
33
33
  ##
34
34
  # Create the TokenInstance
35
+ # @param [String] account_sid Optional Account SID to perform on behalf of requests.
35
36
  # @param [String] grant_type Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token.
36
37
  # @param [String] client_id A 34 character string that uniquely identifies this OAuth App.
37
38
  # @param [String] client_secret The credential for confidential OAuth App.
@@ -42,6 +43,7 @@ module Twilio
42
43
  # @param [String] scope The scope of token
43
44
  # @return [TokenInstance] Created TokenInstance
44
45
  def create(
46
+ account_sid: :unset,
45
47
  grant_type: :unset,
46
48
  client_id: :unset,
47
49
  client_secret: :unset,
@@ -52,6 +54,9 @@ module Twilio
52
54
  scope: :unset
53
55
  )
54
56
 
57
+ params = Twilio::Values.of({
58
+ 'account_sid' => account_sid,
59
+ })
55
60
  data = Twilio::Values.of({
56
61
  'grant_type' => grant_type,
57
62
  'client_id' => client_id,
@@ -69,7 +74,7 @@ module Twilio
69
74
 
70
75
 
71
76
 
72
- payload = @version.create('POST', @uri, data: data, headers: headers)
77
+ payload = @version.create('POST', @uri, params: params, data: data, headers: headers)
73
78
  TokenInstance.new(
74
79
  @version,
75
80
  payload,
@@ -34,6 +34,7 @@ module Twilio
34
34
  # Create the ComplianceTollfreeInquiriesInstance
35
35
  # @param [String] tollfree_phone_number The Tollfree phone number to be verified
36
36
  # @param [String] notification_email The email address to receive the notification about the verification result.
37
+ # @param [String] customer_profile_sid The Customer Profile Sid associated with the Account.
37
38
  # @param [String] business_name The name of the business or organization using the Tollfree number.
38
39
  # @param [String] business_website The website of the business or organization using the Tollfree number.
39
40
  # @param [Array[String]] use_case_categories The category of the use case for the Tollfree Number. List as many are applicable..
@@ -59,6 +60,7 @@ module Twilio
59
60
  def create(
60
61
  tollfree_phone_number: nil,
61
62
  notification_email: nil,
63
+ customer_profile_sid: :unset,
62
64
  business_name: :unset,
63
65
  business_website: :unset,
64
66
  use_case_categories: :unset,
@@ -85,6 +87,7 @@ module Twilio
85
87
  data = Twilio::Values.of({
86
88
  'TollfreePhoneNumber' => tollfree_phone_number,
87
89
  'NotificationEmail' => notification_email,
90
+ 'CustomerProfileSid' => customer_profile_sid,
88
91
  'BusinessName' => business_name,
89
92
  'BusinessWebsite' => business_website,
90
93
  'UseCaseCategories' => Twilio.serialize_list(use_case_categories) { |e| e },
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '7.8.7'
2
+ VERSION = '7.8.8'
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.8.7
4
+ version: 7.8.8
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-20 00:00:00.000000000 Z
11
+ date: 2025-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -499,6 +499,7 @@ files:
499
499
  - lib/twilio-ruby/rest/iam/v1/api_key.rb
500
500
  - lib/twilio-ruby/rest/iam/v1/get_api_keys.rb
501
501
  - lib/twilio-ruby/rest/iam/v1/new_api_key.rb
502
+ - lib/twilio-ruby/rest/iam/v1/o_auth_app.rb
502
503
  - lib/twilio-ruby/rest/iam/v1/token.rb
503
504
  - lib/twilio-ruby/rest/iam_base.rb
504
505
  - lib/twilio-ruby/rest/insights.rb
@@ -592,6 +593,7 @@ files:
592
593
  - lib/twilio-ruby/rest/messaging/v1/domain_certs.rb
593
594
  - lib/twilio-ruby/rest/messaging/v1/domain_config.rb
594
595
  - lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb
596
+ - lib/twilio-ruby/rest/messaging/v1/domain_validate_dn.rb
595
597
  - lib/twilio-ruby/rest/messaging/v1/external_campaign.rb
596
598
  - lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb
597
599
  - lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb