twilio-ruby 7.2.4 → 7.3.1

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 (32) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +20 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +303 -0
  5. data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +626 -0
  6. data/lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb +229 -0
  7. data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +593 -0
  8. data/lib/twilio-ruby/rest/assistants/v1/policy.rb +264 -0
  9. data/lib/twilio-ruby/rest/assistants/v1/session/message.rb +264 -0
  10. data/lib/twilio-ruby/rest/assistants/v1/session.rb +328 -0
  11. data/lib/twilio-ruby/rest/assistants/v1/tool.rb +549 -0
  12. data/lib/twilio-ruby/rest/assistants/v1.rb +100 -0
  13. data/lib/twilio-ruby/rest/assistants.rb +6 -0
  14. data/lib/twilio-ruby/rest/assistants_base.rb +38 -0
  15. data/lib/twilio-ruby/rest/client.rb +10 -0
  16. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +11 -11
  17. data/lib/twilio-ruby/rest/content/v1/content.rb +103 -6
  18. data/lib/twilio-ruby/rest/iam/v1/api_key.rb +270 -0
  19. data/lib/twilio-ruby/rest/iam/v1/get_api_keys.rb +223 -0
  20. data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +177 -0
  21. data/lib/twilio-ruby/rest/iam/v1.rb +61 -0
  22. data/lib/twilio-ruby/rest/iam.rb +6 -0
  23. data/lib/twilio-ruby/rest/iam_base.rb +38 -0
  24. data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +11 -24
  25. data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +28 -15
  26. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +2 -2
  27. data/lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb +2 -2
  28. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +4 -4
  29. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
  30. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +1 -1
  31. data/lib/twilio-ruby/version.rb +1 -1
  32. metadata +19 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50b7f250eef229f7ad41283b7a467f21d14d582d
4
- data.tar.gz: 3d0e92e5ec5e0bebe8104ed78a538206bf2396e3
3
+ metadata.gz: 2a53ce791923b82cf98d5e73e79ad205845ccb0e
4
+ data.tar.gz: b0939883d6aecdb2bab7b837305c01f8b7701ac4
5
5
  SHA512:
6
- metadata.gz: eb2f8e158b162945a31aa8800b3175beb47e97c839dc12cd979cd9239c65ffe09b8608ef52fe146dc253328f237181391e8308d0c58f18c968c84e7a72a799f8
7
- data.tar.gz: 801d959e3b2670d56d1b9c3442cd32251e683356e989935dcfd19d98e89caa4356298feb636ad083ef918f5fdcb79341d9bde6caf4ae08bf291f1f6d02b51b83
6
+ metadata.gz: 748ddf00fa7eab5318808b35f3ad873c2fddbb71e5b8b0c466cf67761d896a1f32b0f75ddf8cfaabbdd0eb8d61ae98d1ce2ca9eceb6c4965c3a4c2d7ad8a5a49
7
+ data.tar.gz: 21168d4b82b52ee9d2a6c9312727a0f3cfa014b90dc25212dc7d54e670f14354c220b4e85a6e1cb37e1e3536512497c5589739182336b01588e17e0c6fc69f5c
data/CHANGES.md CHANGED
@@ -1,6 +1,26 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2024-09-18] Version 7.3.1
5
+ --------------------------
6
+ **Intelligence**
7
+ - Remove public from operator_type
8
+ - Update operator_type to include general-availablity and deprecated
9
+
10
+ **Numbers**
11
+ - Remove beta flag for bundle clone API
12
+
13
+
14
+ [2024-09-05] Version 7.3.0
15
+ --------------------------
16
+ **Iam**
17
+ - updated library_visibility public for new public apikeys
18
+
19
+ **Numbers**
20
+ - Add new field in Error Codes for Regulatory Compliance.
21
+ - Change typing of Port In Request date_created field to date_time instead of date **(breaking change)**
22
+
23
+
4
24
  [2024-08-26] Version 7.2.4
5
25
  --------------------------
6
26
  **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.2.4'
42
+ gem 'twilio-ruby', '~> 7.3.1'
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.2.4
48
+ gem install twilio-ruby -v 7.3.1
49
49
  ```
50
50
 
51
51
  To build and install the development branch yourself from the latest source:
@@ -0,0 +1,303 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Assistants
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 Assistants < AssistantsBase
19
+ class V1 < Version
20
+ class Assistant < InstanceContext
21
+
22
+ class FeedbackList < ListResource
23
+
24
+ class AssistantsV1ServiceCreateFeedbackRequest
25
+ # @param [message_id]: [String] The message ID.
26
+ # @param [score]: [Float] The score to be given(0-1).
27
+ # @param [session_id]: [String] The Session ID.
28
+ # @param [text]: [String] The text to be given as feedback.
29
+ attr_accessor :message_id, :score, :session_id, :text
30
+ def initialize(payload)
31
+ @message_id = payload["message_id"]
32
+ @score = payload["score"]
33
+ @session_id = payload["session_id"]
34
+ @text = payload["text"]
35
+ end
36
+ def to_json(options = {})
37
+ {
38
+ message_id: @message_id,
39
+ score: @score,
40
+ session_id: @session_id,
41
+ text: @text,
42
+ }.to_json(options)
43
+ end
44
+ end
45
+
46
+ ##
47
+ # Initialize the FeedbackList
48
+ # @param [Version] version Version that contains the resource
49
+ # @return [FeedbackList] FeedbackList
50
+ def initialize(version, id: nil)
51
+ super(version)
52
+ # Path Solution
53
+ @solution = { id: id }
54
+ @uri = "/Assistants/#{@solution[:id]}/Feedbacks"
55
+
56
+ end
57
+ ##
58
+ # Create the FeedbackInstance
59
+ # @param [AssistantsV1ServiceCreateFeedbackRequest] assistants_v1_service_create_feedback_request
60
+ # @return [FeedbackInstance] Created FeedbackInstance
61
+ def create(assistants_v1_service_create_feedback_request: nil
62
+ )
63
+
64
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
65
+ headers['Content-Type'] = 'application/json'
66
+ payload = @version.create('POST', @uri, headers: headers, data: assistants_v1_service_create_feedback_request.to_json)
67
+ FeedbackInstance.new(
68
+ @version,
69
+ payload,
70
+ id: @solution[:id],
71
+ )
72
+ end
73
+
74
+
75
+ ##
76
+ # Lists FeedbackInstance records from the API as a list.
77
+ # Unlike stream(), this operation is eager and will load `limit` records into
78
+ # memory before returning.
79
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
80
+ # guarantees to never return more than limit. Default is no limit
81
+ # @param [Integer] page_size Number of records to fetch per request, when
82
+ # not set will use the default value of 50 records. If no page_size is defined
83
+ # but a limit is defined, stream() will attempt to read the limit with the most
84
+ # efficient page size, i.e. min(limit, 1000)
85
+ # @return [Array] Array of up to limit results
86
+ def list(limit: nil, page_size: nil)
87
+ self.stream(
88
+ limit: limit,
89
+ page_size: page_size
90
+ ).entries
91
+ end
92
+
93
+ ##
94
+ # Streams Instance records from the API as an Enumerable.
95
+ # This operation lazily loads records as efficiently as possible until the limit
96
+ # is reached.
97
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
98
+ # guarantees to never return more than limit. Default is no limit
99
+ # @param [Integer] page_size Number of records to fetch per request, when
100
+ # not set will use the default value of 50 records. If no page_size is defined
101
+ # but a limit is defined, stream() will attempt to read the limit with the most
102
+ # efficient page size, i.e. min(limit, 1000)
103
+ # @return [Enumerable] Enumerable that will yield up to limit results
104
+ def stream(limit: nil, page_size: nil)
105
+ limits = @version.read_limits(limit, page_size)
106
+
107
+ page = self.page(
108
+ page_size: limits[:page_size], )
109
+
110
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
111
+ end
112
+
113
+ ##
114
+ # When passed a block, yields FeedbackInstance records from the API.
115
+ # This operation lazily loads records as efficiently as possible until the limit
116
+ # is reached.
117
+ def each
118
+ limits = @version.read_limits
119
+
120
+ page = self.page(page_size: limits[:page_size], )
121
+
122
+ @version.stream(page,
123
+ limit: limits[:limit],
124
+ page_limit: limits[:page_limit]).each {|x| yield x}
125
+ end
126
+
127
+ ##
128
+ # Retrieve a single page of FeedbackInstance records from the API.
129
+ # Request is executed immediately.
130
+ # @param [String] page_token PageToken provided by the API
131
+ # @param [Integer] page_number Page Number, this value is simply for client state
132
+ # @param [Integer] page_size Number of records to return, defaults to 50
133
+ # @return [Page] Page of FeedbackInstance
134
+ def page(page_token: :unset, page_number: :unset, page_size: :unset)
135
+ params = Twilio::Values.of({
136
+ 'PageToken' => page_token,
137
+ 'Page' => page_number,
138
+ 'PageSize' => page_size,
139
+ })
140
+
141
+ response = @version.page('GET', @uri, params: params)
142
+
143
+ FeedbackPage.new(@version, response, @solution)
144
+ end
145
+
146
+ ##
147
+ # Retrieve a single page of FeedbackInstance records from the API.
148
+ # Request is executed immediately.
149
+ # @param [String] target_url API-generated URL for the requested results page
150
+ # @return [Page] Page of FeedbackInstance
151
+ def get_page(target_url)
152
+ response = @version.domain.request(
153
+ 'GET',
154
+ target_url
155
+ )
156
+ FeedbackPage.new(@version, response, @solution)
157
+ end
158
+
159
+
160
+
161
+ # Provide a user friendly representation
162
+ def to_s
163
+ '#<Twilio.Assistants.V1.FeedbackList>'
164
+ end
165
+ end
166
+
167
+ class FeedbackPage < Page
168
+ ##
169
+ # Initialize the FeedbackPage
170
+ # @param [Version] version Version that contains the resource
171
+ # @param [Response] response Response from the API
172
+ # @param [Hash] solution Path solution for the resource
173
+ # @return [FeedbackPage] FeedbackPage
174
+ def initialize(version, response, solution)
175
+ super(version, response)
176
+
177
+ # Path Solution
178
+ @solution = solution
179
+ end
180
+
181
+ ##
182
+ # Build an instance of FeedbackInstance
183
+ # @param [Hash] payload Payload response from the API
184
+ # @return [FeedbackInstance] FeedbackInstance
185
+ def get_instance(payload)
186
+ FeedbackInstance.new(@version, payload, id: @solution[:id])
187
+ end
188
+
189
+ ##
190
+ # Provide a user friendly representation
191
+ def to_s
192
+ '<Twilio.Assistants.V1.FeedbackPage>'
193
+ end
194
+ end
195
+ class FeedbackInstance < InstanceResource
196
+ ##
197
+ # Initialize the FeedbackInstance
198
+ # @param [Version] version Version that contains the resource
199
+ # @param [Hash] payload payload that contains response from Twilio
200
+ # @param [String] account_sid The SID of the
201
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Feedback
202
+ # resource.
203
+ # @param [String] sid The SID of the Call resource to fetch.
204
+ # @return [FeedbackInstance] FeedbackInstance
205
+ def initialize(version, payload , id: nil)
206
+ super(version)
207
+
208
+ # Marshaled Properties
209
+ @properties = {
210
+ 'assistant_id' => payload['assistant_id'],
211
+ 'id' => payload['id'],
212
+ 'account_sid' => payload['account_sid'],
213
+ 'user_sid' => payload['user_sid'],
214
+ 'message_id' => payload['message_id'],
215
+ 'score' => payload['score'],
216
+ 'session_id' => payload['session_id'],
217
+ 'text' => payload['text'],
218
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
219
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
220
+ }
221
+ end
222
+
223
+
224
+ ##
225
+ # @return [String] The Assistant ID.
226
+ def assistant_id
227
+ @properties['assistant_id']
228
+ end
229
+
230
+ ##
231
+ # @return [String] The Feedback ID.
232
+ def id
233
+ @properties['id']
234
+ end
235
+
236
+ ##
237
+ # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Feedback.
238
+ def account_sid
239
+ @properties['account_sid']
240
+ end
241
+
242
+ ##
243
+ # @return [String] The SID of the User created the Feedback.
244
+ def user_sid
245
+ @properties['user_sid']
246
+ end
247
+
248
+ ##
249
+ # @return [String] The Message ID.
250
+ def message_id
251
+ @properties['message_id']
252
+ end
253
+
254
+ ##
255
+ # @return [Float] The Score to provide as Feedback (0-1)
256
+ def score
257
+ @properties['score']
258
+ end
259
+
260
+ ##
261
+ # @return [String] The Session ID.
262
+ def session_id
263
+ @properties['session_id']
264
+ end
265
+
266
+ ##
267
+ # @return [String] The text to be given as feedback.
268
+ def text
269
+ @properties['text']
270
+ end
271
+
272
+ ##
273
+ # @return [Time] The date and time in GMT when the Feedback was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
274
+ def date_created
275
+ @properties['date_created']
276
+ end
277
+
278
+ ##
279
+ # @return [Time] The date and time in GMT when the Feedback was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
280
+ def date_updated
281
+ @properties['date_updated']
282
+ end
283
+
284
+ ##
285
+ # Provide a user friendly representation
286
+ def to_s
287
+ "<Twilio.Assistants.V1.FeedbackInstance>"
288
+ end
289
+
290
+ ##
291
+ # Provide a detailed, user friendly representation
292
+ def inspect
293
+ "<Twilio.Assistants.V1.FeedbackInstance>"
294
+ end
295
+ end
296
+
297
+ end
298
+ end
299
+ end
300
+ end
301
+ end
302
+
303
+