twilio-ruby 7.5.0 → 7.5.2

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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +18 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/accounts/v1/safelist.rb +4 -4
  5. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +1 -1
  6. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +1 -1
  7. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +3 -0
  8. data/lib/twilio-ruby/rest/client.rb +5 -0
  9. data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +0 -39
  10. data/lib/twilio-ruby/rest/iam/v1/token.rb +186 -0
  11. data/lib/twilio-ruby/rest/iam/v1.rb +6 -0
  12. data/lib/twilio-ruby/rest/knowledge/v1/knowledge/chunk.rb +232 -0
  13. data/lib/twilio-ruby/rest/knowledge/v1/knowledge/knowledge_status.rb +213 -0
  14. data/lib/twilio-ruby/rest/knowledge/v1/knowledge.rb +617 -0
  15. data/lib/twilio-ruby/rest/{preview/sync.rb → knowledge/v1.rb} +16 -16
  16. data/lib/twilio-ruby/rest/knowledge.rb +6 -0
  17. data/lib/twilio-ruby/rest/knowledge_base.rb +38 -0
  18. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +2 -2
  19. data/lib/twilio-ruby/rest/monitor/v1/event.rb +1 -1
  20. data/lib/twilio-ruby/rest/preview_base.rb +0 -5
  21. data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +7 -0
  22. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb +7 -0
  23. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +7 -0
  24. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +2 -2
  25. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +2 -2
  26. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +4 -1
  27. data/lib/twilio-ruby/version.rb +1 -1
  28. metadata +9 -12
  29. data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -407
  30. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +0 -472
  31. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -467
  32. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -407
  33. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +0 -444
  34. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -470
  35. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -407
  36. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +0 -444
  37. data/lib/twilio-ruby/rest/preview/sync/service.rb +0 -529
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 932484fd792c75c2d29c62c1c8962dc0c5c40520
4
- data.tar.gz: 3170c41d518dac105b26dc928f3921b0c0ed4916
3
+ metadata.gz: d712ec9531d94615ce16b7b859693eb92efe8aef
4
+ data.tar.gz: 81f4f2fe625f922615d0874cfe652058d6419229
5
5
  SHA512:
6
- metadata.gz: 18f81f4d3b8d1fa95c7fea25cc2ed52b1e2ab9f92985ea94ce89999ef0608e1791725b0ea8939eff28a53fd0cfec5138a10c14224d7260e3cfb74d44cb9064d8
7
- data.tar.gz: baa1cb4cd8f6930c2518c2226e9ea2ee4967468570a3c5af2c3b8ae3eae5ca20f58817f33e34a4ba39e83810eac58f0468acb1bf30c527c0079b0be08b19cca4
6
+ metadata.gz: 33d089a34b55b75c13a3643d14b02183c368906770af28917ef9a8441abffd73afb88c3495b9a6bf7a41868bc36372c18999fc04ff4f40376a8a4cb552bbe982
7
+ data.tar.gz: 103dbb5c6885d46b382df7083ad299fb278392af5c9326fb63ec1e66fb0ce5af1be8ade1b2d4598c1b71b684f98af6c631d16c03f2fd8389c2f6b47dfc0529ba
data/CHANGES.md CHANGED
@@ -1,6 +1,24 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2025-04-07] Version 7.5.2
5
+ --------------------------
6
+ **Studio**
7
+ - Add documentation for parent_step_sid field in Step resource
8
+
9
+
10
+ [2025-03-20] Version 7.5.1
11
+ --------------------------
12
+ **Accounts**
13
+ - Update Safelist API docs as part of prefix supoort
14
+
15
+ **Flex**
16
+ - Removing `first_name`, `last_name`, and `friendly_name` from the Flex User API
17
+
18
+ **Messaging**
19
+ - Add missing tests under transaction/phone_numbers and transaction/short_code
20
+
21
+
4
22
  [2025-03-11] Version 7.5.0
5
23
  --------------------------
6
24
  **Library - Feature**
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.5.0'
42
+ gem 'twilio-ruby', '~> 7.5.2'
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.5.0
48
+ gem install twilio-ruby -v 7.5.2
49
49
  ```
50
50
 
51
51
  To build and install the development branch yourself from the latest source:
@@ -32,7 +32,7 @@ module Twilio
32
32
  end
33
33
  ##
34
34
  # Create the SafelistInstance
35
- # @param [String] phone_number The phone number to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
35
+ # @param [String] phone_number The phone number or phone number 1k prefix to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
36
36
  # @return [SafelistInstance] Created SafelistInstance
37
37
  def create(
38
38
  phone_number: nil
@@ -57,7 +57,7 @@ module Twilio
57
57
 
58
58
  ##
59
59
  # Delete the SafelistInstance
60
- # @param [String] phone_number The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
60
+ # @param [String] phone_number The phone number or phone number 1k prefix to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
61
61
  # @return [Boolean] True if delete succeeds, false otherwise
62
62
  def delete(
63
63
  phone_number: :unset
@@ -75,7 +75,7 @@ module Twilio
75
75
 
76
76
  ##
77
77
  # Fetch the SafelistInstance
78
- # @param [String] phone_number The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
78
+ # @param [String] phone_number The phone number or phone number 1k prefix to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
79
79
  # @return [SafelistInstance] Fetched SafelistInstance
80
80
  def fetch(
81
81
  phone_number: :unset
@@ -162,7 +162,7 @@ module Twilio
162
162
  end
163
163
 
164
164
  ##
165
- # @return [String] The phone number in SafeList.
165
+ # @return [String] The phone number or phone number 1k prefix in SafeList.
166
166
  def phone_number
167
167
  @properties['phone_number']
168
168
  end
@@ -61,7 +61,7 @@ module Twilio
61
61
  # @param [String] recording_status_callback_method The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
62
62
  # @param [String] sip_auth_username The SIP username used for authentication.
63
63
  # @param [String] sip_auth_password The SIP password for authentication.
64
- # @param [String] region The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
64
+ # @param [String] region The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `us2`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
65
65
  # @param [String] conference_recording_status_callback The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available.
66
66
  # @param [String] conference_recording_status_callback_method The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
67
67
  # @param [Array[String]] recording_status_callback_event The recording state changes that should generate a call to `recording_status_callback`. Can be: `started`, `in-progress`, `paused`, `resumed`, `stopped`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'`.
@@ -406,7 +406,7 @@ module Twilio
406
406
  end
407
407
 
408
408
  ##
409
- # @return [String] A string that represents the Twilio Region where the conference audio was mixed. May be `us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, and `jp1`. Basic conference audio will always be mixed in `us1`. Global Conference audio will be mixed nearest to the majority of participants.
409
+ # @return [String] A string that represents the Twilio Region where the conference audio was mixed. May be `us1`, `us2`, `ie1`, `de1`, `sg1`, `br1`, `au1`, and `jp1`. Basic conference audio will always be mixed in `us1`. Global Conference audio will be mixed nearest to the majority of participants.
410
410
  def region
411
411
  @properties['region']
412
412
  end
@@ -46,6 +46,7 @@ module Twilio
46
46
  # @param [AddressRetention] address_retention
47
47
  # @param [Boolean] smart_encoded Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`.
48
48
  # @param [Array[String]] persistent_action Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp).
49
+ # @param [TrafficType] traffic_type
49
50
  # @param [Boolean] shorten_urls For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided.
50
51
  # @param [ScheduleType] schedule_type
51
52
  # @param [Time] send_at The time that Twilio will send the message. Must be in ISO 8601 format.
@@ -71,6 +72,7 @@ module Twilio
71
72
  address_retention: :unset,
72
73
  smart_encoded: :unset,
73
74
  persistent_action: :unset,
75
+ traffic_type: :unset,
74
76
  shorten_urls: :unset,
75
77
  schedule_type: :unset,
76
78
  send_at: :unset,
@@ -97,6 +99,7 @@ module Twilio
97
99
  'AddressRetention' => address_retention,
98
100
  'SmartEncoded' => smart_encoded,
99
101
  'PersistentAction' => Twilio.serialize_list(persistent_action) { |e| e },
102
+ 'TrafficType' => traffic_type,
100
103
  'ShortenUrls' => shorten_urls,
101
104
  'ScheduleType' => schedule_type,
102
105
  'SendAt' => Twilio.serialize_iso8601_datetime(send_at),
@@ -92,6 +92,11 @@ module Twilio
92
92
  @ip_messaging ||= IpMessaging.new self
93
93
  end
94
94
  ##
95
+ # Access the Knowledge Twilio Domain
96
+ def knowledge
97
+ @knowledge ||= Knowledge.new self
98
+ end
99
+ ##
95
100
  # Access the Lookups Twilio Domain
96
101
  def lookups
97
102
  @lookups ||= Lookups.new self
@@ -78,27 +78,18 @@ module Twilio
78
78
 
79
79
  ##
80
80
  # Update the FlexUserInstance
81
- # @param [String] first_name First name of the User.
82
- # @param [String] last_name Last name of the User.
83
81
  # @param [String] email Email of the User.
84
- # @param [String] friendly_name Friendly name of the User.
85
82
  # @param [String] user_sid The unique SID identifier of the Twilio Unified User.
86
83
  # @param [String] locale The locale preference of the user.
87
84
  # @return [FlexUserInstance] Updated FlexUserInstance
88
85
  def update(
89
- first_name: :unset,
90
- last_name: :unset,
91
86
  email: :unset,
92
- friendly_name: :unset,
93
87
  user_sid: :unset,
94
88
  locale: :unset
95
89
  )
96
90
 
97
91
  data = Twilio::Values.of({
98
- 'FirstName' => first_name,
99
- 'LastName' => last_name,
100
92
  'Email' => email,
101
- 'FriendlyName' => friendly_name,
102
93
  'UserSid' => user_sid,
103
94
  'Locale' => locale,
104
95
  })
@@ -184,11 +175,8 @@ module Twilio
184
175
  'worker_sid' => payload['worker_sid'],
185
176
  'workspace_sid' => payload['workspace_sid'],
186
177
  'flex_team_sid' => payload['flex_team_sid'],
187
- 'first_name' => payload['first_name'],
188
- 'last_name' => payload['last_name'],
189
178
  'username' => payload['username'],
190
179
  'email' => payload['email'],
191
- 'friendly_name' => payload['friendly_name'],
192
180
  'locale' => payload['locale'],
193
181
  'roles' => payload['roles'],
194
182
  'created_date' => Twilio.deserialize_iso8601_datetime(payload['created_date']),
@@ -255,18 +243,6 @@ module Twilio
255
243
  @properties['flex_team_sid']
256
244
  end
257
245
 
258
- ##
259
- # @return [String] First name of the User.
260
- def first_name
261
- @properties['first_name']
262
- end
263
-
264
- ##
265
- # @return [String] Last name of the User.
266
- def last_name
267
- @properties['last_name']
268
- end
269
-
270
246
  ##
271
247
  # @return [String] Username of the User.
272
248
  def username
@@ -279,12 +255,6 @@ module Twilio
279
255
  @properties['email']
280
256
  end
281
257
 
282
- ##
283
- # @return [String] Friendly name of the User.
284
- def friendly_name
285
- @properties['friendly_name']
286
- end
287
-
288
258
  ##
289
259
  # @return [String] The locale preference of the user.
290
260
  def locale
@@ -331,27 +301,18 @@ module Twilio
331
301
 
332
302
  ##
333
303
  # Update the FlexUserInstance
334
- # @param [String] first_name First name of the User.
335
- # @param [String] last_name Last name of the User.
336
304
  # @param [String] email Email of the User.
337
- # @param [String] friendly_name Friendly name of the User.
338
305
  # @param [String] user_sid The unique SID identifier of the Twilio Unified User.
339
306
  # @param [String] locale The locale preference of the user.
340
307
  # @return [FlexUserInstance] Updated FlexUserInstance
341
308
  def update(
342
- first_name: :unset,
343
- last_name: :unset,
344
309
  email: :unset,
345
- friendly_name: :unset,
346
310
  user_sid: :unset,
347
311
  locale: :unset
348
312
  )
349
313
 
350
314
  context.update(
351
- first_name: first_name,
352
- last_name: last_name,
353
315
  email: email,
354
- friendly_name: friendly_name,
355
316
  user_sid: user_sid,
356
317
  locale: locale,
357
318
  )
@@ -0,0 +1,186 @@
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 TokenList < ListResource
21
+
22
+ ##
23
+ # Initialize the TokenList
24
+ # @param [Version] version Version that contains the resource
25
+ # @return [TokenList] TokenList
26
+ def initialize(version)
27
+ super(version)
28
+ # Path Solution
29
+ @solution = { }
30
+ @uri = "/token"
31
+
32
+ end
33
+ ##
34
+ # Create the TokenInstance
35
+ # @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
+ # @param [String] client_id A 34 character string that uniquely identifies this OAuth App.
37
+ # @param [String] client_secret The credential for confidential OAuth App.
38
+ # @param [String] code JWT token related to the authorization code grant type.
39
+ # @param [String] redirect_uri The redirect uri
40
+ # @param [String] audience The targeted audience uri
41
+ # @param [String] refresh_token JWT token related to refresh access token.
42
+ # @param [String] scope The scope of token
43
+ # @return [TokenInstance] Created TokenInstance
44
+ def create(
45
+ grant_type: nil,
46
+ client_id: nil,
47
+ client_secret: :unset,
48
+ code: :unset,
49
+ redirect_uri: :unset,
50
+ audience: :unset,
51
+ refresh_token: :unset,
52
+ scope: :unset
53
+ )
54
+
55
+ data = Twilio::Values.of({
56
+ 'grant_type' => grant_type,
57
+ 'client_id' => client_id,
58
+ 'client_secret' => client_secret,
59
+ 'code' => code,
60
+ 'redirect_uri' => redirect_uri,
61
+ 'audience' => audience,
62
+ 'refresh_token' => refresh_token,
63
+ 'scope' => scope,
64
+ })
65
+
66
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
67
+
68
+
69
+
70
+
71
+
72
+ payload = @version.create('POST', @uri, data: data, headers: headers)
73
+ TokenInstance.new(
74
+ @version,
75
+ payload,
76
+ )
77
+ end
78
+
79
+
80
+
81
+
82
+ # Provide a user friendly representation
83
+ def to_s
84
+ '#<Twilio.Iam.V1.TokenList>'
85
+ end
86
+ end
87
+
88
+ class TokenPage < Page
89
+ ##
90
+ # Initialize the TokenPage
91
+ # @param [Version] version Version that contains the resource
92
+ # @param [Response] response Response from the API
93
+ # @param [Hash] solution Path solution for the resource
94
+ # @return [TokenPage] TokenPage
95
+ def initialize(version, response, solution)
96
+ super(version, response)
97
+
98
+ # Path Solution
99
+ @solution = solution
100
+ end
101
+
102
+ ##
103
+ # Build an instance of TokenInstance
104
+ # @param [Hash] payload Payload response from the API
105
+ # @return [TokenInstance] TokenInstance
106
+ def get_instance(payload)
107
+ TokenInstance.new(@version, payload)
108
+ end
109
+
110
+ ##
111
+ # Provide a user friendly representation
112
+ def to_s
113
+ '<Twilio.Iam.V1.TokenPage>'
114
+ end
115
+ end
116
+ class TokenInstance < InstanceResource
117
+ ##
118
+ # Initialize the TokenInstance
119
+ # @param [Version] version Version that contains the resource
120
+ # @param [Hash] payload payload that contains response from Twilio
121
+ # @param [String] account_sid The SID of the
122
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Token
123
+ # resource.
124
+ # @param [String] sid The SID of the Call resource to fetch.
125
+ # @return [TokenInstance] TokenInstance
126
+ def initialize(version, payload )
127
+ super(version)
128
+
129
+ # Marshaled Properties
130
+ @properties = {
131
+ 'access_token' => payload['access_token'],
132
+ 'refresh_token' => payload['refresh_token'],
133
+ 'id_token' => payload['id_token'],
134
+ 'token_type' => payload['token_type'],
135
+ 'expires_in' => payload['expires_in'],
136
+ }
137
+ end
138
+
139
+
140
+ ##
141
+ # @return [String] Token which carries the necessary information to access a Twilio resource directly.
142
+ def access_token
143
+ @properties['access_token']
144
+ end
145
+
146
+ ##
147
+ # @return [String] Token which carries the information necessary to get a new access token.
148
+ def refresh_token
149
+ @properties['refresh_token']
150
+ end
151
+
152
+ ##
153
+ # @return [String] Token which carries the information necessary of user profile.
154
+ def id_token
155
+ @properties['id_token']
156
+ end
157
+
158
+ ##
159
+ # @return [String] Token type
160
+ def token_type
161
+ @properties['token_type']
162
+ end
163
+
164
+ ##
165
+ # @return [String]
166
+ def expires_in
167
+ @properties['expires_in']
168
+ end
169
+
170
+ ##
171
+ # Provide a user friendly representation
172
+ def to_s
173
+ "<Twilio.Iam.V1.TokenInstance>"
174
+ end
175
+
176
+ ##
177
+ # Provide a detailed, user friendly representation
178
+ def inspect
179
+ "<Twilio.Iam.V1.TokenInstance>"
180
+ end
181
+ end
182
+
183
+ end
184
+ end
185
+ end
186
+ 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
+ @token = nil
27
28
  end
28
29
 
29
30
  ##
@@ -51,6 +52,11 @@ module Twilio
51
52
  @new_api_key ||= NewApiKeyList.new self
52
53
  end
53
54
  ##
55
+ # @return [Twilio::REST::Iam::V1::TokenList]
56
+ def token
57
+ @token ||= TokenList.new self
58
+ end
59
+ ##
54
60
  # Provide a user friendly representation
55
61
  def to_s
56
62
  '<Twilio::REST::Iam::V1>';