twilio-ruby 5.73.4 → 5.74.0

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: 15ff230b629767522e9f5fc479d1f788dba0ad5e
4
- data.tar.gz: 9aca0c5930e7f107750a17c671641ac1589409a9
3
+ metadata.gz: 9f1304a55ded86707fbad7aeae0ab4ae00aee341
4
+ data.tar.gz: 6f48062af91bc83b1322bb4b4bb8eb2bdd304140
5
5
  SHA512:
6
- metadata.gz: 5159b77870cc207317bba46ada0891cf4a3829ba11b1395fe93ed1820f67c82e7bf42359e79f6282f87b8a6ce5318ac9df227abc8128107b855879f9705ca26f
7
- data.tar.gz: 464f504b671e3e5232d7d20791438f0e9581bf38f541c8b0ad140f9460c19c1ba7c17540084fb16defe9ae3ed4430572740d96014337384d76a38cedf74d48bd
6
+ metadata.gz: c26962f53539a87ddbcc81754acb97e154dd437f77ddc92e5fca0308ba8074a5058241629a05f0d03cfdac432187a3f51dd7c6a5f1b190b3888497bf574d91ee
7
+ data.tar.gz: f79c209c112d8b914d1f625508673a1fef96e83d3e67c1fb8b654e9a21c30e7ce63754f1b6e47d98397dffadf6cd79d988ba3df184fa710dbadc6186a0bcd552
data/CHANGES.md CHANGED
@@ -1,6 +1,39 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2022-12-14] Version 5.74.0
5
+ ---------------------------
6
+ **Api**
7
+ - Add `street_secondary` param to address create and update
8
+ - Make `method` optional for user defined message subscription **(breaking change)**
9
+
10
+ **Flex**
11
+ - Flex Conversations is now Generally Available
12
+ - Adding the ie1 mapping for authorization api, updating service base uri and base url response attribute **(breaking change)**
13
+ - Change web channels to GA and library visibility to public
14
+ - Changing the uri for authorization api from using Accounts to Insights **(breaking change)**
15
+
16
+ **Media**
17
+ - Gate Twilio Live endpoints behind beta_feature for EOS
18
+
19
+ **Messaging**
20
+ - Mark `MessageFlow` as a required field for Campaign Creation **(breaking change)**
21
+
22
+ **Oauth**
23
+ - updated openid discovery endpoint uri **(breaking change)**
24
+ - Added device code authorization endpoint
25
+
26
+ **Supersim**
27
+ - Allow filtering the SettingsUpdates resource by `status`
28
+
29
+ **Twiml**
30
+ - Add new Polly Neural voices
31
+ - Add tr-TR, ar-AE, yue-CN, fi-FI languages to SSML `<lang>` element.
32
+ - Add x-amazon-jyutping, x-amazon-pinyin, x-amazon-pron-kana, x-amazon-yomigana alphabets to SSML `<phoneme>` element.
33
+ - Rename `character` value for SSML `<say-as>` `interpret-as` attribute to `characters`. **(breaking change)**
34
+ - Rename `role` attribute to `format` in SSML `<say-as>` element. **(breaking change)**
35
+
36
+
4
37
  [2022-11-30] Version 5.73.4
5
38
  ---------------------------
6
39
  **Flex**
data/README.md CHANGED
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
34
34
  To install using [Bundler][bundler] grab the latest stable version:
35
35
 
36
36
  ```ruby
37
- gem 'twilio-ruby', '~> 5.73.4'
37
+ gem 'twilio-ruby', '~> 5.74.0'
38
38
  ```
39
39
 
40
40
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
41
41
 
42
42
  ```bash
43
- gem install twilio-ruby -v 5.73.4
43
+ gem install twilio-ruby -v 5.74.0
44
44
  ```
45
45
 
46
46
  To build and install the development branch yourself from the latest source:
@@ -43,8 +43,10 @@ module Twilio
43
43
  # the address. Can be: `true` or `false` and the default is `true`. If empty or
44
44
  # `true`, we will correct the address you provide if necessary. If `false`, we
45
45
  # won't alter the address you provide.
46
+ # @param [String] street_secondary The additional number and street address of the
47
+ # address.
46
48
  # @return [AddressInstance] Created AddressInstance
47
- def create(customer_name: nil, street: nil, city: nil, region: nil, postal_code: nil, iso_country: nil, friendly_name: :unset, emergency_enabled: :unset, auto_correct_address: :unset)
49
+ def create(customer_name: nil, street: nil, city: nil, region: nil, postal_code: nil, iso_country: nil, friendly_name: :unset, emergency_enabled: :unset, auto_correct_address: :unset, street_secondary: :unset)
48
50
  data = Twilio::Values.of({
49
51
  'CustomerName' => customer_name,
50
52
  'Street' => street,
@@ -55,6 +57,7 @@ module Twilio
55
57
  'FriendlyName' => friendly_name,
56
58
  'EmergencyEnabled' => emergency_enabled,
57
59
  'AutoCorrectAddress' => auto_correct_address,
60
+ 'StreetSecondary' => street_secondary,
58
61
  })
59
62
 
60
63
  payload = @version.create('POST', @uri, data: data)
@@ -262,8 +265,10 @@ module Twilio
262
265
  # the address. Can be: `true` or `false` and the default is `true`. If empty or
263
266
  # `true`, we will correct the address you provide if necessary. If `false`, we
264
267
  # won't alter the address you provide.
268
+ # @param [String] street_secondary The additional number and street address of the
269
+ # address.
265
270
  # @return [AddressInstance] Updated AddressInstance
266
- def update(friendly_name: :unset, customer_name: :unset, street: :unset, city: :unset, region: :unset, postal_code: :unset, emergency_enabled: :unset, auto_correct_address: :unset)
271
+ def update(friendly_name: :unset, customer_name: :unset, street: :unset, city: :unset, region: :unset, postal_code: :unset, emergency_enabled: :unset, auto_correct_address: :unset, street_secondary: :unset)
267
272
  data = Twilio::Values.of({
268
273
  'FriendlyName' => friendly_name,
269
274
  'CustomerName' => customer_name,
@@ -273,6 +278,7 @@ module Twilio
273
278
  'PostalCode' => postal_code,
274
279
  'EmergencyEnabled' => emergency_enabled,
275
280
  'AutoCorrectAddress' => auto_correct_address,
281
+ 'StreetSecondary' => street_secondary,
276
282
  })
277
283
 
278
284
  payload = @version.update('POST', @uri, data: data)
@@ -342,6 +348,7 @@ module Twilio
342
348
  'emergency_enabled' => payload['emergency_enabled'],
343
349
  'validated' => payload['validated'],
344
350
  'verified' => payload['verified'],
351
+ 'street_secondary' => payload['street_secondary'],
345
352
  }
346
353
 
347
354
  # Context
@@ -450,6 +457,12 @@ module Twilio
450
457
  @properties['verified']
451
458
  end
452
459
 
460
+ ##
461
+ # @return [String] The additional number and street address of the address
462
+ def street_secondary
463
+ @properties['street_secondary']
464
+ end
465
+
453
466
  ##
454
467
  # Delete the AddressInstance
455
468
  # @return [Boolean] true if delete succeeds, false otherwise
@@ -479,8 +492,10 @@ module Twilio
479
492
  # the address. Can be: `true` or `false` and the default is `true`. If empty or
480
493
  # `true`, we will correct the address you provide if necessary. If `false`, we
481
494
  # won't alter the address you provide.
495
+ # @param [String] street_secondary The additional number and street address of the
496
+ # address.
482
497
  # @return [AddressInstance] Updated AddressInstance
483
- def update(friendly_name: :unset, customer_name: :unset, street: :unset, city: :unset, region: :unset, postal_code: :unset, emergency_enabled: :unset, auto_correct_address: :unset)
498
+ def update(friendly_name: :unset, customer_name: :unset, street: :unset, city: :unset, region: :unset, postal_code: :unset, emergency_enabled: :unset, auto_correct_address: :unset, street_secondary: :unset)
484
499
  context.update(
485
500
  friendly_name: friendly_name,
486
501
  customer_name: customer_name,
@@ -490,6 +505,7 @@ module Twilio
490
505
  postal_code: postal_code,
491
506
  emergency_enabled: emergency_enabled,
492
507
  auto_correct_address: auto_correct_address,
508
+ street_secondary: street_secondary,
493
509
  )
494
510
  end
495
511
 
@@ -37,16 +37,16 @@ module Twilio
37
37
  # @param [String] callback The URL we should call using the `method` to send user
38
38
  # defined events to your application. URLs must contain a valid hostname
39
39
  # (underscores are not permitted).
40
- # @param [String] method The HTTP method Twilio will use when requesting the above
41
- # `Url`. Either `GET` or `POST`.
42
40
  # @param [String] idempotency_key A unique string value to identify API call. This
43
41
  # should be a unique string value per API call and can be a randomly generated.
42
+ # @param [String] method The HTTP method Twilio will use when requesting the above
43
+ # `Url`. Either `GET` or `POST`.
44
44
  # @return [UserDefinedMessageSubscriptionInstance] Created UserDefinedMessageSubscriptionInstance
45
- def create(callback: nil, method: nil, idempotency_key: :unset)
45
+ def create(callback: nil, idempotency_key: :unset, method: :unset)
46
46
  data = Twilio::Values.of({
47
47
  'Callback' => callback,
48
- 'Method' => method,
49
48
  'IdempotencyKey' => idempotency_key,
49
+ 'Method' => method,
50
50
  })
51
51
 
52
52
  payload = @version.create('POST', @uri, data: data)
@@ -68,7 +68,7 @@ module Twilio
68
68
 
69
69
  # Path Solution
70
70
  @solution = {}
71
- @uri = "/Accounts/GoodData"
71
+ @uri = "/Insights/Session"
72
72
  end
73
73
 
74
74
  ##
@@ -112,7 +112,7 @@ module Twilio
112
112
  'workspace_id' => payload['workspace_id'],
113
113
  'session_expiry' => payload['session_expiry'],
114
114
  'session_id' => payload['session_id'],
115
- 'gd_base_url' => payload['gd_base_url'],
115
+ 'base_url' => payload['base_url'],
116
116
  'url' => payload['url'],
117
117
  }
118
118
 
@@ -133,7 +133,7 @@ module Twilio
133
133
  end
134
134
 
135
135
  ##
136
- # @return [String] Unique workspace ID in gooddata
136
+ # @return [String] Unique ID to identify the user's workspace
137
137
  def workspace_id
138
138
  @properties['workspace_id']
139
139
  end
@@ -151,9 +151,9 @@ module Twilio
151
151
  end
152
152
 
153
153
  ##
154
- # @return [String] GoodData login base URL
155
- def gd_base_url
156
- @properties['gd_base_url']
154
+ # @return [String] Base URL to fetch reports and dashboards
155
+ def base_url
156
+ @properties['base_url']
157
157
  end
158
158
 
159
159
  ##
@@ -68,7 +68,7 @@ module Twilio
68
68
 
69
69
  # Path Solution
70
70
  @solution = {}
71
- @uri = "/Accounts/UserRoles"
71
+ @uri = "/Insights/UserRoles"
72
72
  end
73
73
 
74
74
  ##
@@ -0,0 +1,133 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class FlexApi < Domain
12
+ class V2 < Version
13
+ class WebChannelsList < ListResource
14
+ ##
15
+ # Initialize the WebChannelsList
16
+ # @param [Version] version Version that contains the resource
17
+ # @return [WebChannelsList] WebChannelsList
18
+ def initialize(version)
19
+ super(version)
20
+
21
+ # Path Solution
22
+ @solution = {}
23
+ @uri = "/WebChats"
24
+ end
25
+
26
+ ##
27
+ # Create the WebChannelsInstance
28
+ # @param [String] address_sid The SID of the Conversations Address. See {Address
29
+ # Configuration
30
+ # Resource}[https://www.twilio.com/docs/conversations/api/address-configuration-resource]
31
+ # for configuration details. When a conversation is created on the Flex backend,
32
+ # the callback URL will be set to the corresponding Studio Flow SID or webhook URL
33
+ # in your address configuration.
34
+ # @param [String] chat_friendly_name The Conversation's friendly name. See the
35
+ # {Conversation
36
+ # resource}[https://www.twilio.com/docs/conversations/api/conversation-resource]
37
+ # for an example.
38
+ # @param [String] customer_friendly_name The Conversation participant's friendly
39
+ # name. See the {Conversation Participant
40
+ # Resource}[https://www.twilio.com/docs/conversations/api/conversation-participant-resource]
41
+ # for an example.
42
+ # @param [String] pre_engagement_data The pre-engagement data.
43
+ # @return [WebChannelsInstance] Created WebChannelsInstance
44
+ def create(address_sid: nil, chat_friendly_name: :unset, customer_friendly_name: :unset, pre_engagement_data: :unset)
45
+ data = Twilio::Values.of({
46
+ 'AddressSid' => address_sid,
47
+ 'ChatFriendlyName' => chat_friendly_name,
48
+ 'CustomerFriendlyName' => customer_friendly_name,
49
+ 'PreEngagementData' => pre_engagement_data,
50
+ })
51
+
52
+ payload = @version.create('POST', @uri, data: data)
53
+
54
+ WebChannelsInstance.new(@version, payload, )
55
+ end
56
+
57
+ ##
58
+ # Provide a user friendly representation
59
+ def to_s
60
+ '#<Twilio.FlexApi.V2.WebChannelsList>'
61
+ end
62
+ end
63
+
64
+ class WebChannelsPage < Page
65
+ ##
66
+ # Initialize the WebChannelsPage
67
+ # @param [Version] version Version that contains the resource
68
+ # @param [Response] response Response from the API
69
+ # @param [Hash] solution Path solution for the resource
70
+ # @return [WebChannelsPage] WebChannelsPage
71
+ def initialize(version, response, solution)
72
+ super(version, response)
73
+
74
+ # Path Solution
75
+ @solution = solution
76
+ end
77
+
78
+ ##
79
+ # Build an instance of WebChannelsInstance
80
+ # @param [Hash] payload Payload response from the API
81
+ # @return [WebChannelsInstance] WebChannelsInstance
82
+ def get_instance(payload)
83
+ WebChannelsInstance.new(@version, payload, )
84
+ end
85
+
86
+ ##
87
+ # Provide a user friendly representation
88
+ def to_s
89
+ '<Twilio.FlexApi.V2.WebChannelsPage>'
90
+ end
91
+ end
92
+
93
+ class WebChannelsInstance < InstanceResource
94
+ ##
95
+ # Initialize the WebChannelsInstance
96
+ # @param [Version] version Version that contains the resource
97
+ # @param [Hash] payload payload that contains response from Twilio
98
+ # @return [WebChannelsInstance] WebChannelsInstance
99
+ def initialize(version, payload)
100
+ super(version)
101
+
102
+ # Marshaled Properties
103
+ @properties = {'conversation_sid' => payload['conversation_sid'], 'identity' => payload['identity'], }
104
+ end
105
+
106
+ ##
107
+ # @return [String] The unique string representing the Conversation resource created
108
+ def conversation_sid
109
+ @properties['conversation_sid']
110
+ end
111
+
112
+ ##
113
+ # @return [String] The unique string representing the User created
114
+ def identity
115
+ @properties['identity']
116
+ end
117
+
118
+ ##
119
+ # Provide a user friendly representation
120
+ def to_s
121
+ "<Twilio.FlexApi.V2.WebChannelsInstance>"
122
+ end
123
+
124
+ ##
125
+ # Provide a detailed, user friendly representation
126
+ def inspect
127
+ "<Twilio.FlexApi.V2.WebChannelsInstance>"
128
+ end
129
+ end
130
+ end
131
+ end
132
+ end
133
+ end
@@ -0,0 +1,35 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class FlexApi
12
+ class V2 < Version
13
+ ##
14
+ # Initialize the V2 version of FlexApi
15
+ def initialize(domain)
16
+ super
17
+ @version = 'v2'
18
+ @web_channels = nil
19
+ end
20
+
21
+ ##
22
+ # @return [Twilio::REST::Flex_api::V2::WebChannelsContext]
23
+ def web_channels
24
+ @web_channels ||= WebChannelsList.new self
25
+ end
26
+
27
+ ##
28
+ # Provide a user friendly representation
29
+ def to_s
30
+ '<Twilio::REST::FlexApi::V2>'
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -20,6 +20,7 @@ module Twilio
20
20
 
21
21
  # Versions
22
22
  @v1 = nil
23
+ @v2 = nil
23
24
  end
24
25
 
25
26
  ##
@@ -28,6 +29,12 @@ module Twilio
28
29
  @v1 ||= V1.new self
29
30
  end
30
31
 
32
+ ##
33
+ # Version v2 of flex_api
34
+ def v2
35
+ @v2 ||= V2.new self
36
+ end
37
+
31
38
  ##
32
39
  # @return [Twilio::REST::Flex_api::V1::AssessmentsInstance]
33
40
  def assessments
@@ -88,6 +95,12 @@ module Twilio
88
95
  self.v1.web_channel(sid)
89
96
  end
90
97
 
98
+ ##
99
+ # @return [Twilio::REST::Flex_api::V2::WebChannelsInstance]
100
+ def web_channels
101
+ self.v2.web_channels()
102
+ end
103
+
91
104
  ##
92
105
  # Provide a user friendly representation
93
106
  def to_s
@@ -33,38 +33,63 @@ module Twilio
33
33
  # Create the UsAppToPersonInstance
34
34
  # @param [String] brand_registration_sid A2P Brand Registration SID
35
35
  # @param [String] description A short description of what this SMS campaign does.
36
- # @param [Array[String]] message_samples Message samples, at least 2 and up to 5
37
- # sample messages, <=1024 chars each.
36
+ # Min length: 40 characters. Max length: 4096 characters.
37
+ # @param [String] message_flow Required for all Campaigns. Details around how a
38
+ # consumer opts-in to their campaign, therefore giving consent to receive their
39
+ # messages. If multiple opt-in methods can be used for the same campaign, they
40
+ # must all be listed. 40 character minimum. 2048 character maximum.
41
+ # @param [Array[String]] message_samples Message samples, at least 1 and up to 5
42
+ # sample messages (at least 2 for sole proprietor), >=20 chars, <=1024 chars each.
38
43
  # @param [String] us_app_to_person_usecase A2P Campaign Use Case. Examples: [ 2FA,
39
44
  # EMERGENCY, MARKETING..]
40
45
  # @param [Boolean] has_embedded_links Indicates that this SMS campaign will send
41
46
  # messages that contain links.
42
47
  # @param [Boolean] has_embedded_phone Indicates that this SMS campaign will send
43
48
  # messages that contain phone numbers.
44
- # @param [String] message_flow Description of how end users opt-in to the SMS
45
- # campaign, therefore giving consent to receive messages.
46
- # @param [String] opt_in_message The message that will be sent to the user when
47
- # they opt in to the SMS campaign.
48
- # @param [String] opt_out_message The message that will be sent to the user when
49
- # they opt out of the SMS campaign.
50
- # @param [String] help_message The message that will be sent to the user when they
51
- # request help for the SMS campaign.
52
- # @param [Array[String]] opt_in_keywords The keywords that will be used to opt in
53
- # to the SMS campaign.
54
- # @param [Array[String]] opt_out_keywords The keywords that will be used to opt
55
- # out of the SMS campaign.
56
- # @param [Array[String]] help_keywords The keywords that will be used to request
57
- # help for the SMS campaign.
49
+ # @param [String] opt_in_message If end users can text in a keyword to start
50
+ # receiving messages from this campaign, the auto-reply messages sent to the end
51
+ # users must be provided. The opt-in response should include the Brand name,
52
+ # confirmation of opt-in enrollment to a recurring message campaign, how to get
53
+ # help, and clear description of how to opt-out. This field is required if end
54
+ # users can text in a keyword to start receiving messages from this campaign. 20
55
+ # character minimum. 320 character maximum.
56
+ # @param [String] opt_out_message Upon receiving the opt-out keywords from the end
57
+ # users, Twilio customers are expected to send back an auto-generated response,
58
+ # which must provide acknowledgment of the opt-out request and confirmation that
59
+ # no further messages will be sent. It is also recommended that these opt-out
60
+ # messages include the brand name. This field is required if managing opt out
61
+ # keywords yourself (i.e. not using Twilio's Default or Advanced Opt Out
62
+ # features). 20 character minimum. 320 character maximum.
63
+ # @param [String] help_message When customers receive the help keywords from their
64
+ # end users, Twilio customers are expected to send back an auto-generated
65
+ # response; this may include the brand name and additional support contact
66
+ # information. This field is required if managing help keywords yourself (i.e. not
67
+ # using Twilio's Default or Advanced Opt Out features). 20 character minimum. 320
68
+ # character maximum.
69
+ # @param [Array[String]] opt_in_keywords If end users can text in a keyword to
70
+ # start receiving messages from this campaign, those keywords must be provided.
71
+ # This field is required if end users can text in a keyword to start receiving
72
+ # messages from this campaign. Values must be alphanumeric. 255 character maximum.
73
+ # @param [Array[String]] opt_out_keywords End users should be able to text in a
74
+ # keyword to stop receiving messages from this campaign. Those keywords must be
75
+ # provided. This field is required if managing opt out keywords yourself (i.e. not
76
+ # using Twilio's Default or Advanced Opt Out features). Values must be
77
+ # alphanumeric. 255 character maximum.
78
+ # @param [Array[String]] help_keywords End users should be able to text in a
79
+ # keyword to receive help. Those keywords must be provided as part of the campaign
80
+ # registration request. This field is required if managing help keywords yourself
81
+ # (i.e. not using Twilio's Default or Advanced Opt Out features). Values must be
82
+ # alphanumeric. 255 character maximum.
58
83
  # @return [UsAppToPersonInstance] Created UsAppToPersonInstance
59
- def create(brand_registration_sid: nil, description: nil, message_samples: nil, us_app_to_person_usecase: nil, has_embedded_links: nil, has_embedded_phone: nil, message_flow: :unset, opt_in_message: :unset, opt_out_message: :unset, help_message: :unset, opt_in_keywords: :unset, opt_out_keywords: :unset, help_keywords: :unset)
84
+ def create(brand_registration_sid: nil, description: nil, message_flow: nil, message_samples: nil, us_app_to_person_usecase: nil, has_embedded_links: nil, has_embedded_phone: nil, opt_in_message: :unset, opt_out_message: :unset, help_message: :unset, opt_in_keywords: :unset, opt_out_keywords: :unset, help_keywords: :unset)
60
85
  data = Twilio::Values.of({
61
86
  'BrandRegistrationSid' => brand_registration_sid,
62
87
  'Description' => description,
88
+ 'MessageFlow' => message_flow,
63
89
  'MessageSamples' => Twilio.serialize_list(message_samples) { |e| e },
64
90
  'UsAppToPersonUsecase' => us_app_to_person_usecase,
65
91
  'HasEmbeddedLinks' => has_embedded_links,
66
92
  'HasEmbeddedPhone' => has_embedded_phone,
67
- 'MessageFlow' => message_flow,
68
93
  'OptInMessage' => opt_in_message,
69
94
  'OptOutMessage' => opt_out_message,
70
95
  'HelpMessage' => help_message,
@@ -0,0 +1,153 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class Oauth < Domain
12
+ class V1 < Version
13
+ class DeviceCodeList < ListResource
14
+ ##
15
+ # Initialize the DeviceCodeList
16
+ # @param [Version] version Version that contains the resource
17
+ # @return [DeviceCodeList] DeviceCodeList
18
+ def initialize(version)
19
+ super(version)
20
+
21
+ # Path Solution
22
+ @solution = {}
23
+ @uri = "/device/code"
24
+ end
25
+
26
+ ##
27
+ # Create the DeviceCodeInstance
28
+ # @param [String] client_sid A 34 character string that uniquely identifies this
29
+ # OAuth App.
30
+ # @param [Array[String]] scopes An Array of scopes for authorization request
31
+ # @param [Array[String]] audiences An array of intended audiences for token
32
+ # requests
33
+ # @return [DeviceCodeInstance] Created DeviceCodeInstance
34
+ def create(client_sid: nil, scopes: nil, audiences: :unset)
35
+ data = Twilio::Values.of({
36
+ 'ClientSid' => client_sid,
37
+ 'Scopes' => Twilio.serialize_list(scopes) { |e| e },
38
+ 'Audiences' => Twilio.serialize_list(audiences) { |e| e },
39
+ })
40
+
41
+ payload = @version.create('POST', @uri, data: data)
42
+
43
+ DeviceCodeInstance.new(@version, payload, )
44
+ end
45
+
46
+ ##
47
+ # Provide a user friendly representation
48
+ def to_s
49
+ '#<Twilio.Oauth.V1.DeviceCodeList>'
50
+ end
51
+ end
52
+
53
+ class DeviceCodePage < Page
54
+ ##
55
+ # Initialize the DeviceCodePage
56
+ # @param [Version] version Version that contains the resource
57
+ # @param [Response] response Response from the API
58
+ # @param [Hash] solution Path solution for the resource
59
+ # @return [DeviceCodePage] DeviceCodePage
60
+ def initialize(version, response, solution)
61
+ super(version, response)
62
+
63
+ # Path Solution
64
+ @solution = solution
65
+ end
66
+
67
+ ##
68
+ # Build an instance of DeviceCodeInstance
69
+ # @param [Hash] payload Payload response from the API
70
+ # @return [DeviceCodeInstance] DeviceCodeInstance
71
+ def get_instance(payload)
72
+ DeviceCodeInstance.new(@version, payload, )
73
+ end
74
+
75
+ ##
76
+ # Provide a user friendly representation
77
+ def to_s
78
+ '<Twilio.Oauth.V1.DeviceCodePage>'
79
+ end
80
+ end
81
+
82
+ class DeviceCodeInstance < InstanceResource
83
+ ##
84
+ # Initialize the DeviceCodeInstance
85
+ # @param [Version] version Version that contains the resource
86
+ # @param [Hash] payload payload that contains response from Twilio
87
+ # @return [DeviceCodeInstance] DeviceCodeInstance
88
+ def initialize(version, payload)
89
+ super(version)
90
+
91
+ # Marshaled Properties
92
+ @properties = {
93
+ 'device_code' => payload['device_code'],
94
+ 'user_code' => payload['user_code'],
95
+ 'verification_uri' => payload['verification_uri'],
96
+ 'verification_uri_complete' => payload['verification_uri_complete'],
97
+ 'expires_in' => payload['expires_in'] == nil ? payload['expires_in'] : payload['expires_in'].to_i,
98
+ 'interval' => payload['interval'] == nil ? payload['interval'] : payload['interval'].to_i,
99
+ }
100
+ end
101
+
102
+ ##
103
+ # @return [String] The device verification code
104
+ def device_code
105
+ @properties['device_code']
106
+ end
107
+
108
+ ##
109
+ # @return [String] The verification code for the end user
110
+ def user_code
111
+ @properties['user_code']
112
+ end
113
+
114
+ ##
115
+ # @return [String] The URI that the end user visits to verify request
116
+ def verification_uri
117
+ @properties['verification_uri']
118
+ end
119
+
120
+ ##
121
+ # @return [String] he URI with user_code that the end-user alternatively visits to verify request
122
+ def verification_uri_complete
123
+ @properties['verification_uri_complete']
124
+ end
125
+
126
+ ##
127
+ # @return [String] The expiration time of the device_code and user_code in seconds
128
+ def expires_in
129
+ @properties['expires_in']
130
+ end
131
+
132
+ ##
133
+ # @return [String] The minimum amount of time in seconds that the client should wait between polling requests to the token endpoint
134
+ def interval
135
+ @properties['interval']
136
+ end
137
+
138
+ ##
139
+ # Provide a user friendly representation
140
+ def to_s
141
+ "<Twilio.Oauth.V1.DeviceCodeInstance>"
142
+ end
143
+
144
+ ##
145
+ # Provide a detailed, user friendly representation
146
+ def inspect
147
+ "<Twilio.Oauth.V1.DeviceCodeInstance>"
148
+ end
149
+ end
150
+ end
151
+ end
152
+ end
153
+ end
@@ -68,7 +68,7 @@ module Twilio
68
68
 
69
69
  # Path Solution
70
70
  @solution = {}
71
- @uri = "/well-known/openid-configuration"
71
+ @uri = "/.well-known/openid-configuration"
72
72
  end
73
73
 
74
74
  ##
@@ -16,6 +16,7 @@ module Twilio
16
16
  super
17
17
  @version = 'v1'
18
18
  @oauth = nil
19
+ @device_code = nil
19
20
  @openid_discovery = nil
20
21
  @token = nil
21
22
  @user_info = nil
@@ -27,6 +28,12 @@ module Twilio
27
28
  @oauth ||= OauthContext.new self
28
29
  end
29
30
 
31
+ ##
32
+ # @return [Twilio::REST::Oauth::V1::DeviceCodeContext]
33
+ def device_code
34
+ @device_code ||= DeviceCodeList.new self
35
+ end
36
+
30
37
  ##
31
38
  # @return [Twilio::REST::Oauth::V1::OpenidDiscoveryContext]
32
39
  def openid_discovery
@@ -34,6 +34,12 @@ module Twilio
34
34
  self.v1.oauth()
35
35
  end
36
36
 
37
+ ##
38
+ # @return [Twilio::REST::Oauth::V1::DeviceCodeInstance]
39
+ def device_code
40
+ self.v1.device_code()
41
+ end
42
+
37
43
  ##
38
44
  # @return [Twilio::REST::Oauth::V1::OpenidDiscoveryInstance]
39
45
  def openid_discovery
@@ -31,6 +31,8 @@ module Twilio
31
31
  # memory before returning.
32
32
  # @param [String] sim Filter the Settings Updates by a Super SIM's SID or
33
33
  # UniqueName.
34
+ # @param [settings_update.Status] status Filter the Settings Updates by status.
35
+ # Can be `scheduled`, `in-progress`, `successful`, or `failed`.
34
36
  # @param [Integer] limit Upper limit for the number of records to return. stream()
35
37
  # guarantees to never return more than limit. Default is no limit
36
38
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -38,8 +40,8 @@ module Twilio
38
40
  # but a limit is defined, stream() will attempt to read the limit with the most
39
41
  # efficient page size, i.e. min(limit, 1000)
40
42
  # @return [Array] Array of up to limit results
41
- def list(sim: :unset, limit: nil, page_size: nil)
42
- self.stream(sim: sim, limit: limit, page_size: page_size).entries
43
+ def list(sim: :unset, status: :unset, limit: nil, page_size: nil)
44
+ self.stream(sim: sim, status: status, limit: limit, page_size: page_size).entries
43
45
  end
44
46
 
45
47
  ##
@@ -48,6 +50,8 @@ module Twilio
48
50
  # is reached.
49
51
  # @param [String] sim Filter the Settings Updates by a Super SIM's SID or
50
52
  # UniqueName.
53
+ # @param [settings_update.Status] status Filter the Settings Updates by status.
54
+ # Can be `scheduled`, `in-progress`, `successful`, or `failed`.
51
55
  # @param [Integer] limit Upper limit for the number of records to return. stream()
52
56
  # guarantees to never return more than limit. Default is no limit.
53
57
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -55,10 +59,10 @@ module Twilio
55
59
  # but a limit is defined, stream() will attempt to read the limit with the most
56
60
  # efficient page size, i.e. min(limit, 1000)
57
61
  # @return [Enumerable] Enumerable that will yield up to limit results
58
- def stream(sim: :unset, limit: nil, page_size: nil)
62
+ def stream(sim: :unset, status: :unset, limit: nil, page_size: nil)
59
63
  limits = @version.read_limits(limit, page_size)
60
64
 
61
- page = self.page(sim: sim, page_size: limits[:page_size], )
65
+ page = self.page(sim: sim, status: status, page_size: limits[:page_size], )
62
66
 
63
67
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
64
68
  end
@@ -82,13 +86,16 @@ module Twilio
82
86
  # Request is executed immediately.
83
87
  # @param [String] sim Filter the Settings Updates by a Super SIM's SID or
84
88
  # UniqueName.
89
+ # @param [settings_update.Status] status Filter the Settings Updates by status.
90
+ # Can be `scheduled`, `in-progress`, `successful`, or `failed`.
85
91
  # @param [String] page_token PageToken provided by the API
86
92
  # @param [Integer] page_number Page Number, this value is simply for client state
87
93
  # @param [Integer] page_size Number of records to return, defaults to 50
88
94
  # @return [Page] Page of SettingsUpdateInstance
89
- def page(sim: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
95
+ def page(sim: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
90
96
  params = Twilio::Values.of({
91
97
  'Sim' => sim,
98
+ 'Status' => status,
92
99
  'PageToken' => page_token,
93
100
  'Page' => page_number,
94
101
  'PageSize' => page_size,
@@ -614,10 +614,10 @@ module Twilio
614
614
  # Create a new <Say-As> element
615
615
  # words:: Words to be interpreted
616
616
  # interpretAs:: Specify the type of words are spoken
617
- # role:: Specify the format of the date when interpret-as is set to date
617
+ # format:: Specify the format of the date when interpret-as is set to date
618
618
  # keyword_args:: additional attributes
619
- def say_as(words, interpretAs: nil, role: nil, **keyword_args)
620
- append(SsmlSayAs.new(words, interpretAs: interpretAs, role: role, **keyword_args))
619
+ def say_as(words, interpretAs: nil, format: nil, **keyword_args)
620
+ append(SsmlSayAs.new(words, interpretAs: interpretAs, format: format, **keyword_args))
621
621
  end
622
622
 
623
623
  ##
@@ -701,10 +701,10 @@ module Twilio
701
701
  # Create a new <Say-As> element
702
702
  # words:: Words to be interpreted
703
703
  # interpretAs:: Specify the type of words are spoken
704
- # role:: Specify the format of the date when interpret-as is set to date
704
+ # format:: Specify the format of the date when interpret-as is set to date
705
705
  # keyword_args:: additional attributes
706
- def say_as(words, interpretAs: nil, role: nil, **keyword_args)
707
- append(SsmlSayAs.new(words, interpretAs: interpretAs, role: role, **keyword_args))
706
+ def say_as(words, interpretAs: nil, format: nil, **keyword_args)
707
+ append(SsmlSayAs.new(words, interpretAs: interpretAs, format: format, **keyword_args))
708
708
  end
709
709
 
710
710
  ##
@@ -832,10 +832,10 @@ module Twilio
832
832
  # Create a new <Say-As> element
833
833
  # words:: Words to be interpreted
834
834
  # interpretAs:: Specify the type of words are spoken
835
- # role:: Specify the format of the date when interpret-as is set to date
835
+ # format:: Specify the format of the date when interpret-as is set to date
836
836
  # keyword_args:: additional attributes
837
- def say_as(words, interpretAs: nil, role: nil, **keyword_args)
838
- append(SsmlSayAs.new(words, interpretAs: interpretAs, role: role, **keyword_args))
837
+ def say_as(words, interpretAs: nil, format: nil, **keyword_args)
838
+ append(SsmlSayAs.new(words, interpretAs: interpretAs, format: format, **keyword_args))
839
839
  end
840
840
 
841
841
  ##
@@ -931,10 +931,10 @@ module Twilio
931
931
  # Create a new <Say-As> element
932
932
  # words:: Words to be interpreted
933
933
  # interpretAs:: Specify the type of words are spoken
934
- # role:: Specify the format of the date when interpret-as is set to date
934
+ # format:: Specify the format of the date when interpret-as is set to date
935
935
  # keyword_args:: additional attributes
936
- def say_as(words, interpretAs: nil, role: nil, **keyword_args)
937
- append(SsmlSayAs.new(words, interpretAs: interpretAs, role: role, **keyword_args))
936
+ def say_as(words, interpretAs: nil, format: nil, **keyword_args)
937
+ append(SsmlSayAs.new(words, interpretAs: interpretAs, format: format, **keyword_args))
938
938
  end
939
939
 
940
940
  ##
@@ -1063,10 +1063,10 @@ module Twilio
1063
1063
  # Create a new <Say-As> element
1064
1064
  # words:: Words to be interpreted
1065
1065
  # interpretAs:: Specify the type of words are spoken
1066
- # role:: Specify the format of the date when interpret-as is set to date
1066
+ # format:: Specify the format of the date when interpret-as is set to date
1067
1067
  # keyword_args:: additional attributes
1068
- def say_as(words, interpretAs: nil, role: nil, **keyword_args)
1069
- append(SsmlSayAs.new(words, interpretAs: interpretAs, role: role, **keyword_args))
1068
+ def say_as(words, interpretAs: nil, format: nil, **keyword_args)
1069
+ append(SsmlSayAs.new(words, interpretAs: interpretAs, format: format, **keyword_args))
1070
1070
  end
1071
1071
 
1072
1072
  ##
@@ -1173,10 +1173,10 @@ module Twilio
1173
1173
  # Create a new <Say-As> element
1174
1174
  # words:: Words to be interpreted
1175
1175
  # interpretAs:: Specify the type of words are spoken
1176
- # role:: Specify the format of the date when interpret-as is set to date
1176
+ # format:: Specify the format of the date when interpret-as is set to date
1177
1177
  # keyword_args:: additional attributes
1178
- def say_as(words, interpretAs: nil, role: nil, **keyword_args)
1179
- append(SsmlSayAs.new(words, interpretAs: interpretAs, role: role, **keyword_args))
1178
+ def say_as(words, interpretAs: nil, format: nil, **keyword_args)
1179
+ append(SsmlSayAs.new(words, interpretAs: interpretAs, format: format, **keyword_args))
1180
1180
  end
1181
1181
 
1182
1182
  ##
@@ -1272,10 +1272,10 @@ module Twilio
1272
1272
  # Create a new <Say-As> element
1273
1273
  # words:: Words to be interpreted
1274
1274
  # interpretAs:: Specify the type of words are spoken
1275
- # role:: Specify the format of the date when interpret-as is set to date
1275
+ # format:: Specify the format of the date when interpret-as is set to date
1276
1276
  # keyword_args:: additional attributes
1277
- def say_as(words, interpretAs: nil, role: nil, **keyword_args)
1278
- append(SsmlSayAs.new(words, interpretAs: interpretAs, role: role, **keyword_args))
1277
+ def say_as(words, interpretAs: nil, format: nil, **keyword_args)
1278
+ append(SsmlSayAs.new(words, interpretAs: interpretAs, format: format, **keyword_args))
1279
1279
  end
1280
1280
 
1281
1281
  ##
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.73.4'
2
+ VERSION = '5.74.0'
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: 5.73.4
4
+ version: 5.74.0
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: 2022-11-30 00:00:00.000000000 Z
11
+ date: 2022-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -437,6 +437,8 @@ files:
437
437
  - lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb
438
438
  - lib/twilio-ruby/rest/flex_api/v1/user_roles.rb
439
439
  - lib/twilio-ruby/rest/flex_api/v1/web_channel.rb
440
+ - lib/twilio-ruby/rest/flex_api/v2.rb
441
+ - lib/twilio-ruby/rest/flex_api/v2/web_channels.rb
440
442
  - lib/twilio-ruby/rest/frontline_api.rb
441
443
  - lib/twilio-ruby/rest/frontline_api/v1.rb
442
444
  - lib/twilio-ruby/rest/frontline_api/v1/user.rb
@@ -533,6 +535,7 @@ files:
533
535
  - lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb
534
536
  - lib/twilio-ruby/rest/oauth.rb
535
537
  - lib/twilio-ruby/rest/oauth/v1.rb
538
+ - lib/twilio-ruby/rest/oauth/v1/device_code.rb
536
539
  - lib/twilio-ruby/rest/oauth/v1/oauth.rb
537
540
  - lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb
538
541
  - lib/twilio-ruby/rest/oauth/v1/token.rb