twilio-ruby 6.11.0 → 6.12.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.
@@ -1,276 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
- # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
- # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
- #
7
- # Twilio - Flex
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 FlexApi < FlexApiBase
19
- class V1 < Version
20
- class InsightsConversationalAiList < ListResource
21
-
22
- ##
23
- # Initialize the InsightsConversationalAiList
24
- # @param [Version] version Version that contains the resource
25
- # @return [InsightsConversationalAiList] InsightsConversationalAiList
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.FlexApi.V1.InsightsConversationalAiList>'
39
- end
40
- end
41
-
42
-
43
- ##
44
- #PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
45
- class InsightsConversationalAiContext < InstanceContext
46
- ##
47
- # Initialize the InsightsConversationalAiContext
48
- # @param [Version] version Version that contains the resource
49
- # @param [String] instance_sid Sid of Flex Service Instance
50
- # @return [InsightsConversationalAiContext] InsightsConversationalAiContext
51
- def initialize(version, instance_sid)
52
- super(version)
53
-
54
- # Path Solution
55
- @solution = { instance_sid: instance_sid, }
56
- @uri = "/Insights/Instances/#{@solution[:instance_sid]}/AI/Reports"
57
-
58
-
59
- end
60
- ##
61
- # Fetch the InsightsConversationalAiInstance
62
- # @param [String] max_rows Maximum number of rows to return
63
- # @param [String] report_id The type of report required to fetch.Like gauge,channel-metrics,queue-metrics
64
- # @param [Granularity] granularity The time period for which report is needed
65
- # @param [Time] include_date A reference date that should be included in the returned period
66
- # @return [InsightsConversationalAiInstance] Fetched InsightsConversationalAiInstance
67
- def fetch(
68
- max_rows: :unset,
69
- report_id: :unset,
70
- granularity: :unset,
71
- include_date: :unset
72
- )
73
-
74
- params = Twilio::Values.of({
75
- 'MaxRows' => max_rows,
76
- 'ReportId' => report_id,
77
- 'Granularity' => granularity,
78
- 'IncludeDate' => Twilio.serialize_iso8601_datetime(include_date),
79
- })
80
-
81
- payload = @version.fetch('GET', @uri, params: params)
82
- InsightsConversationalAiInstance.new(
83
- @version,
84
- payload,
85
- instance_sid: @solution[:instance_sid],
86
- )
87
- end
88
-
89
-
90
- ##
91
- # Provide a user friendly representation
92
- def to_s
93
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
94
- "#<Twilio.FlexApi.V1.InsightsConversationalAiContext #{context}>"
95
- end
96
-
97
- ##
98
- # Provide a detailed, user friendly representation
99
- def inspect
100
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
101
- "#<Twilio.FlexApi.V1.InsightsConversationalAiContext #{context}>"
102
- end
103
- end
104
-
105
- class InsightsConversationalAiPage < Page
106
- ##
107
- # Initialize the InsightsConversationalAiPage
108
- # @param [Version] version Version that contains the resource
109
- # @param [Response] response Response from the API
110
- # @param [Hash] solution Path solution for the resource
111
- # @return [InsightsConversationalAiPage] InsightsConversationalAiPage
112
- def initialize(version, response, solution)
113
- super(version, response)
114
-
115
- # Path Solution
116
- @solution = solution
117
- end
118
-
119
- ##
120
- # Build an instance of InsightsConversationalAiInstance
121
- # @param [Hash] payload Payload response from the API
122
- # @return [InsightsConversationalAiInstance] InsightsConversationalAiInstance
123
- def get_instance(payload)
124
- InsightsConversationalAiInstance.new(@version, payload)
125
- end
126
-
127
- ##
128
- # Provide a user friendly representation
129
- def to_s
130
- '<Twilio.FlexApi.V1.InsightsConversationalAiPage>'
131
- end
132
- end
133
- class InsightsConversationalAiInstance < InstanceResource
134
- ##
135
- # Initialize the InsightsConversationalAiInstance
136
- # @param [Version] version Version that contains the resource
137
- # @param [Hash] payload payload that contains response from Twilio
138
- # @param [String] account_sid The SID of the
139
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this InsightsConversationalAi
140
- # resource.
141
- # @param [String] sid The SID of the Call resource to fetch.
142
- # @return [InsightsConversationalAiInstance] InsightsConversationalAiInstance
143
- def initialize(version, payload , instance_sid: nil)
144
- super(version)
145
-
146
- # Marshaled Properties
147
- @properties = {
148
- 'instance_sid' => payload['instance_sid'],
149
- 'report_id' => payload['report_id'],
150
- 'granularity' => payload['granularity'],
151
- 'period_start' => Twilio.deserialize_iso8601_datetime(payload['period_start']),
152
- 'period_end' => Twilio.deserialize_iso8601_datetime(payload['period_end']),
153
- 'updated' => Twilio.deserialize_iso8601_datetime(payload['updated']),
154
- 'total_pages' => payload['total_pages'] == nil ? payload['total_pages'] : payload['total_pages'].to_i,
155
- 'page' => payload['page'] == nil ? payload['page'] : payload['page'].to_i,
156
- 'rows' => payload['rows'],
157
- 'url' => payload['url'],
158
- }
159
-
160
- # Context
161
- @instance_context = nil
162
- @params = { 'instance_sid' => instance_sid || @properties['instance_sid'] , }
163
- end
164
-
165
- ##
166
- # Generate an instance context for the instance, the context is capable of
167
- # performing various actions. All instance actions are proxied to the context
168
- # @return [InsightsConversationalAiContext] CallContext for this CallInstance
169
- def context
170
- unless @instance_context
171
- @instance_context = InsightsConversationalAiContext.new(@version , @params['instance_sid'])
172
- end
173
- @instance_context
174
- end
175
-
176
- ##
177
- # @return [String] Sid of Flex Service Instance
178
- def instance_sid
179
- @properties['instance_sid']
180
- end
181
-
182
- ##
183
- # @return [String] The type of report required to fetch.Like gauge,channel-metrics,queue-metrics
184
- def report_id
185
- @properties['report_id']
186
- end
187
-
188
- ##
189
- # @return [Granularity]
190
- def granularity
191
- @properties['granularity']
192
- end
193
-
194
- ##
195
- # @return [Time] The start date from which report data is included
196
- def period_start
197
- @properties['period_start']
198
- end
199
-
200
- ##
201
- # @return [Time] The end date till report data is included
202
- def period_end
203
- @properties['period_end']
204
- end
205
-
206
- ##
207
- # @return [Time] Updated time of the report
208
- def updated
209
- @properties['updated']
210
- end
211
-
212
- ##
213
- # @return [String] Represents total number of pages fetched report has
214
- def total_pages
215
- @properties['total_pages']
216
- end
217
-
218
- ##
219
- # @return [String] Page offset required for pagination
220
- def page
221
- @properties['page']
222
- end
223
-
224
- ##
225
- # @return [Array<Hash>] List of report breakdown
226
- def rows
227
- @properties['rows']
228
- end
229
-
230
- ##
231
- # @return [String] The URL of this resource.
232
- def url
233
- @properties['url']
234
- end
235
-
236
- ##
237
- # Fetch the InsightsConversationalAiInstance
238
- # @param [String] max_rows Maximum number of rows to return
239
- # @param [String] report_id The type of report required to fetch.Like gauge,channel-metrics,queue-metrics
240
- # @param [Granularity] granularity The time period for which report is needed
241
- # @param [Time] include_date A reference date that should be included in the returned period
242
- # @return [InsightsConversationalAiInstance] Fetched InsightsConversationalAiInstance
243
- def fetch(
244
- max_rows: :unset,
245
- report_id: :unset,
246
- granularity: :unset,
247
- include_date: :unset
248
- )
249
-
250
- context.fetch(
251
- max_rows: max_rows,
252
- report_id: report_id,
253
- granularity: granularity,
254
- include_date: include_date,
255
- )
256
- end
257
-
258
- ##
259
- # Provide a user friendly representation
260
- def to_s
261
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
262
- "<Twilio.FlexApi.V1.InsightsConversationalAiInstance #{values}>"
263
- end
264
-
265
- ##
266
- # Provide a detailed, user friendly representation
267
- def inspect
268
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
269
- "<Twilio.FlexApi.V1.InsightsConversationalAiInstance #{values}>"
270
- end
271
- end
272
-
273
- end
274
- end
275
- end
276
- end
@@ -1,255 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
- # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
- # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
- #
7
- # Twilio - Flex
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 FlexApi < FlexApiBase
19
- class V1 < Version
20
- class InsightsConversationalAiReportInsightsList < ListResource
21
-
22
- ##
23
- # Initialize the InsightsConversationalAiReportInsightsList
24
- # @param [Version] version Version that contains the resource
25
- # @return [InsightsConversationalAiReportInsightsList] InsightsConversationalAiReportInsightsList
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.FlexApi.V1.InsightsConversationalAiReportInsightsList>'
39
- end
40
- end
41
-
42
-
43
- ##
44
- #PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
45
- class InsightsConversationalAiReportInsightsContext < InstanceContext
46
- ##
47
- # Initialize the InsightsConversationalAiReportInsightsContext
48
- # @param [Version] version Version that contains the resource
49
- # @param [String] instance_sid The Instance SID of the instance for which report insights will be fetched
50
- # @return [InsightsConversationalAiReportInsightsContext] InsightsConversationalAiReportInsightsContext
51
- def initialize(version, instance_sid)
52
- super(version)
53
-
54
- # Path Solution
55
- @solution = { instance_sid: instance_sid, }
56
- @uri = "/Insights/Instances/#{@solution[:instance_sid]}/AI/ReportInsights"
57
-
58
-
59
- end
60
- ##
61
- # Fetch the InsightsConversationalAiReportInsightsInstance
62
- # @param [String] max_rows Maximum number of rows to return
63
- # @param [String] report_id The type of report insights required to fetch.Like gauge,channel-metrics,queue-metrics
64
- # @param [String] granularity The time period for which report insights is needed
65
- # @param [Time] include_date A reference date that should be included in the returned period
66
- # @return [InsightsConversationalAiReportInsightsInstance] Fetched InsightsConversationalAiReportInsightsInstance
67
- def fetch(
68
- max_rows: :unset,
69
- report_id: :unset,
70
- granularity: :unset,
71
- include_date: :unset
72
- )
73
-
74
- params = Twilio::Values.of({
75
- 'MaxRows' => max_rows,
76
- 'ReportId' => report_id,
77
- 'Granularity' => granularity,
78
- 'IncludeDate' => Twilio.serialize_iso8601_datetime(include_date),
79
- })
80
-
81
- payload = @version.fetch('GET', @uri, params: params)
82
- InsightsConversationalAiReportInsightsInstance.new(
83
- @version,
84
- payload,
85
- instance_sid: @solution[:instance_sid],
86
- )
87
- end
88
-
89
-
90
- ##
91
- # Provide a user friendly representation
92
- def to_s
93
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
94
- "#<Twilio.FlexApi.V1.InsightsConversationalAiReportInsightsContext #{context}>"
95
- end
96
-
97
- ##
98
- # Provide a detailed, user friendly representation
99
- def inspect
100
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
101
- "#<Twilio.FlexApi.V1.InsightsConversationalAiReportInsightsContext #{context}>"
102
- end
103
- end
104
-
105
- class InsightsConversationalAiReportInsightsPage < Page
106
- ##
107
- # Initialize the InsightsConversationalAiReportInsightsPage
108
- # @param [Version] version Version that contains the resource
109
- # @param [Response] response Response from the API
110
- # @param [Hash] solution Path solution for the resource
111
- # @return [InsightsConversationalAiReportInsightsPage] InsightsConversationalAiReportInsightsPage
112
- def initialize(version, response, solution)
113
- super(version, response)
114
-
115
- # Path Solution
116
- @solution = solution
117
- end
118
-
119
- ##
120
- # Build an instance of InsightsConversationalAiReportInsightsInstance
121
- # @param [Hash] payload Payload response from the API
122
- # @return [InsightsConversationalAiReportInsightsInstance] InsightsConversationalAiReportInsightsInstance
123
- def get_instance(payload)
124
- InsightsConversationalAiReportInsightsInstance.new(@version, payload)
125
- end
126
-
127
- ##
128
- # Provide a user friendly representation
129
- def to_s
130
- '<Twilio.FlexApi.V1.InsightsConversationalAiReportInsightsPage>'
131
- end
132
- end
133
- class InsightsConversationalAiReportInsightsInstance < InstanceResource
134
- ##
135
- # Initialize the InsightsConversationalAiReportInsightsInstance
136
- # @param [Version] version Version that contains the resource
137
- # @param [Hash] payload payload that contains response from Twilio
138
- # @param [String] account_sid The SID of the
139
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this InsightsConversationalAiReportInsights
140
- # resource.
141
- # @param [String] sid The SID of the Call resource to fetch.
142
- # @return [InsightsConversationalAiReportInsightsInstance] InsightsConversationalAiReportInsightsInstance
143
- def initialize(version, payload , instance_sid: nil)
144
- super(version)
145
-
146
- # Marshaled Properties
147
- @properties = {
148
- 'instance_sid' => payload['instance_sid'],
149
- 'report_id' => payload['report_id'],
150
- 'period_start' => Twilio.deserialize_iso8601_datetime(payload['period_start']),
151
- 'period_end' => Twilio.deserialize_iso8601_datetime(payload['period_end']),
152
- 'updated' => Twilio.deserialize_iso8601_datetime(payload['updated']),
153
- 'insights' => payload['insights'],
154
- 'url' => payload['url'],
155
- }
156
-
157
- # Context
158
- @instance_context = nil
159
- @params = { 'instance_sid' => instance_sid || @properties['instance_sid'] , }
160
- end
161
-
162
- ##
163
- # Generate an instance context for the instance, the context is capable of
164
- # performing various actions. All instance actions are proxied to the context
165
- # @return [InsightsConversationalAiReportInsightsContext] CallContext for this CallInstance
166
- def context
167
- unless @instance_context
168
- @instance_context = InsightsConversationalAiReportInsightsContext.new(@version , @params['instance_sid'])
169
- end
170
- @instance_context
171
- end
172
-
173
- ##
174
- # @return [String] The Instance SID of the instance for which report insights is fetched
175
- def instance_sid
176
- @properties['instance_sid']
177
- end
178
-
179
- ##
180
- # @return [String] The type of report insights required to fetch.Like gauge,channel-metrics,queue-metrics
181
- def report_id
182
- @properties['report_id']
183
- end
184
-
185
- ##
186
- # @return [Time] The start date from which report insights data is included
187
- def period_start
188
- @properties['period_start']
189
- end
190
-
191
- ##
192
- # @return [Time] The end date till report insights data is included
193
- def period_end
194
- @properties['period_end']
195
- end
196
-
197
- ##
198
- # @return [Time] Updated time of the report insights
199
- def updated
200
- @properties['updated']
201
- end
202
-
203
- ##
204
- # @return [Array<Hash>] List of report insights breakdown
205
- def insights
206
- @properties['insights']
207
- end
208
-
209
- ##
210
- # @return [String] The URL of this resource
211
- def url
212
- @properties['url']
213
- end
214
-
215
- ##
216
- # Fetch the InsightsConversationalAiReportInsightsInstance
217
- # @param [String] max_rows Maximum number of rows to return
218
- # @param [String] report_id The type of report insights required to fetch.Like gauge,channel-metrics,queue-metrics
219
- # @param [String] granularity The time period for which report insights is needed
220
- # @param [Time] include_date A reference date that should be included in the returned period
221
- # @return [InsightsConversationalAiReportInsightsInstance] Fetched InsightsConversationalAiReportInsightsInstance
222
- def fetch(
223
- max_rows: :unset,
224
- report_id: :unset,
225
- granularity: :unset,
226
- include_date: :unset
227
- )
228
-
229
- context.fetch(
230
- max_rows: max_rows,
231
- report_id: report_id,
232
- granularity: granularity,
233
- include_date: include_date,
234
- )
235
- end
236
-
237
- ##
238
- # Provide a user friendly representation
239
- def to_s
240
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
241
- "<Twilio.FlexApi.V1.InsightsConversationalAiReportInsightsInstance #{values}>"
242
- end
243
-
244
- ##
245
- # Provide a detailed, user friendly representation
246
- def inspect
247
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
248
- "<Twilio.FlexApi.V1.InsightsConversationalAiReportInsightsInstance #{values}>"
249
- end
250
- end
251
-
252
- end
253
- end
254
- end
255
- end