twilio-ruby 5.74.2 → 5.74.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +7 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +254 -0
- data/lib/twilio-ruby/rest/content/v1.rb +7 -0
- data/lib/twilio-ruby/rest/content.rb +6 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +314 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +394 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +84 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +105 -10
- data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +319 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +14 -6
- data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +14 -6
- data/lib/twilio-ruby/rest/flex_api/v1.rb +39 -0
- data/lib/twilio-ruby/rest/flex_api.rb +22 -0
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +14 -0
- data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +297 -0
- data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +290 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +317 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +310 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +54 -0
- data/lib/twilio-ruby/rest/microvisor/v1.rb +32 -0
- data/lib/twilio-ruby/rest/microvisor.rb +16 -0
- data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue_bulk_real_time_statistics.rb +149 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +23 -0
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf1900f5b33e9026e81a76e58431c440348374a2
|
4
|
+
data.tar.gz: 06eab21891c34b8a17cb3f0b16d9b298c0c5204a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff4fdb962d8636ce5fd05c7bf86b7c3331e7576eb9d8a9b3f0caac5b1dccfb1a4142fdb08580774fc24a06d71577b5b9ec62418298af96e84128822a872cc174
|
7
|
+
data.tar.gz: 90f0907003c094fcde142b81c17e98ec1c378964a409b758638efd793d077cdcbedc1550b7cc5954e4b1812cbf201cd8948871569b56762b6137cc87f08af15b
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2023-02-08] Version 5.74.3
|
5
|
+
---------------------------
|
6
|
+
**Lookups**
|
7
|
+
- Add `disposable_phone_number_risk` package to the lookup response
|
8
|
+
- Add `sms_pumping_risk` package to the lookup response
|
9
|
+
|
10
|
+
|
4
11
|
[2023-01-25] Version 5.74.2
|
5
12
|
---------------------------
|
6
13
|
**Api**
|
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.74.
|
37
|
+
gem 'twilio-ruby', '~> 5.74.3'
|
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.74.
|
43
|
+
gem install twilio-ruby -v 5.74.3
|
44
44
|
```
|
45
45
|
|
46
46
|
To build and install the development branch yourself from the latest source:
|
@@ -0,0 +1,254 @@
|
|
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 Content < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# 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.
|
15
|
+
class LegacyContentList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the LegacyContentList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [LegacyContentList] LegacyContentList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/LegacyContent"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Lists LegacyContentInstance records from the API as a list.
|
30
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
|
+
# memory before returning.
|
32
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
33
|
+
# guarantees to never return more than limit. Default is no limit
|
34
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
35
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
36
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
37
|
+
# efficient page size, i.e. min(limit, 1000)
|
38
|
+
# @return [Array] Array of up to limit results
|
39
|
+
def list(limit: nil, page_size: nil)
|
40
|
+
self.stream(limit: limit, page_size: page_size).entries
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Streams LegacyContentInstance records from the API as an Enumerable.
|
45
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
46
|
+
# is reached.
|
47
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
48
|
+
# guarantees to never return more than limit. Default is no limit.
|
49
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
50
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
51
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
52
|
+
# efficient page size, i.e. min(limit, 1000)
|
53
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
54
|
+
def stream(limit: nil, page_size: nil)
|
55
|
+
limits = @version.read_limits(limit, page_size)
|
56
|
+
|
57
|
+
page = self.page(page_size: limits[:page_size], )
|
58
|
+
|
59
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
60
|
+
end
|
61
|
+
|
62
|
+
##
|
63
|
+
# When passed a block, yields LegacyContentInstance records from the API.
|
64
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
65
|
+
# is reached.
|
66
|
+
def each
|
67
|
+
limits = @version.read_limits
|
68
|
+
|
69
|
+
page = self.page(page_size: limits[:page_size], )
|
70
|
+
|
71
|
+
@version.stream(page,
|
72
|
+
limit: limits[:limit],
|
73
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
74
|
+
end
|
75
|
+
|
76
|
+
##
|
77
|
+
# Retrieve a single page of LegacyContentInstance records from the API.
|
78
|
+
# Request is executed immediately.
|
79
|
+
# @param [String] page_token PageToken provided by the API
|
80
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
81
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
82
|
+
# @return [Page] Page of LegacyContentInstance
|
83
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
84
|
+
params = Twilio::Values.of({
|
85
|
+
'PageToken' => page_token,
|
86
|
+
'Page' => page_number,
|
87
|
+
'PageSize' => page_size,
|
88
|
+
})
|
89
|
+
|
90
|
+
response = @version.page('GET', @uri, params: params)
|
91
|
+
|
92
|
+
LegacyContentPage.new(@version, response, @solution)
|
93
|
+
end
|
94
|
+
|
95
|
+
##
|
96
|
+
# Retrieve a single page of LegacyContentInstance records from the API.
|
97
|
+
# Request is executed immediately.
|
98
|
+
# @param [String] target_url API-generated URL for the requested results page
|
99
|
+
# @return [Page] Page of LegacyContentInstance
|
100
|
+
def get_page(target_url)
|
101
|
+
response = @version.domain.request(
|
102
|
+
'GET',
|
103
|
+
target_url
|
104
|
+
)
|
105
|
+
LegacyContentPage.new(@version, response, @solution)
|
106
|
+
end
|
107
|
+
|
108
|
+
##
|
109
|
+
# Provide a user friendly representation
|
110
|
+
def to_s
|
111
|
+
'#<Twilio.Content.V1.LegacyContentList>'
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
##
|
116
|
+
# 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.
|
117
|
+
class LegacyContentPage < Page
|
118
|
+
##
|
119
|
+
# Initialize the LegacyContentPage
|
120
|
+
# @param [Version] version Version that contains the resource
|
121
|
+
# @param [Response] response Response from the API
|
122
|
+
# @param [Hash] solution Path solution for the resource
|
123
|
+
# @return [LegacyContentPage] LegacyContentPage
|
124
|
+
def initialize(version, response, solution)
|
125
|
+
super(version, response)
|
126
|
+
|
127
|
+
# Path Solution
|
128
|
+
@solution = solution
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# Build an instance of LegacyContentInstance
|
133
|
+
# @param [Hash] payload Payload response from the API
|
134
|
+
# @return [LegacyContentInstance] LegacyContentInstance
|
135
|
+
def get_instance(payload)
|
136
|
+
LegacyContentInstance.new(@version, payload, )
|
137
|
+
end
|
138
|
+
|
139
|
+
##
|
140
|
+
# Provide a user friendly representation
|
141
|
+
def to_s
|
142
|
+
'<Twilio.Content.V1.LegacyContentPage>'
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
##
|
147
|
+
# 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.
|
148
|
+
class LegacyContentInstance < InstanceResource
|
149
|
+
##
|
150
|
+
# Initialize the LegacyContentInstance
|
151
|
+
# @param [Version] version Version that contains the resource
|
152
|
+
# @param [Hash] payload payload that contains response from Twilio
|
153
|
+
# @return [LegacyContentInstance] LegacyContentInstance
|
154
|
+
def initialize(version, payload)
|
155
|
+
super(version)
|
156
|
+
|
157
|
+
# Marshaled Properties
|
158
|
+
@properties = {
|
159
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
160
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
161
|
+
'sid' => payload['sid'],
|
162
|
+
'account_sid' => payload['account_sid'],
|
163
|
+
'friendly_name' => payload['friendly_name'],
|
164
|
+
'language' => payload['language'],
|
165
|
+
'variables' => payload['variables'],
|
166
|
+
'types' => payload['types'],
|
167
|
+
'legacy_template_name' => payload['legacy_template_name'],
|
168
|
+
'legacy_body' => payload['legacy_body'],
|
169
|
+
'url' => payload['url'],
|
170
|
+
}
|
171
|
+
end
|
172
|
+
|
173
|
+
##
|
174
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was created
|
175
|
+
def date_created
|
176
|
+
@properties['date_created']
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
|
181
|
+
def date_updated
|
182
|
+
@properties['date_updated']
|
183
|
+
end
|
184
|
+
|
185
|
+
##
|
186
|
+
# @return [String] The unique string that identifies the resource
|
187
|
+
def sid
|
188
|
+
@properties['sid']
|
189
|
+
end
|
190
|
+
|
191
|
+
##
|
192
|
+
# @return [String] The SID of the Account that created the resource
|
193
|
+
def account_sid
|
194
|
+
@properties['account_sid']
|
195
|
+
end
|
196
|
+
|
197
|
+
##
|
198
|
+
# @return [String] A string name used to describe the Content resource
|
199
|
+
def friendly_name
|
200
|
+
@properties['friendly_name']
|
201
|
+
end
|
202
|
+
|
203
|
+
##
|
204
|
+
# @return [String] Two-letter language code identifying the language the Content resource is in.
|
205
|
+
def language
|
206
|
+
@properties['language']
|
207
|
+
end
|
208
|
+
|
209
|
+
##
|
210
|
+
# @return [Hash] Defines the default placeholder values for variables included in the Content resource
|
211
|
+
def variables
|
212
|
+
@properties['variables']
|
213
|
+
end
|
214
|
+
|
215
|
+
##
|
216
|
+
# @return [Hash] The Content types (e.g. twilio/text) for this Content resource
|
217
|
+
def types
|
218
|
+
@properties['types']
|
219
|
+
end
|
220
|
+
|
221
|
+
##
|
222
|
+
# @return [String] The string name of the legacy content template associated with this Content resource
|
223
|
+
def legacy_template_name
|
224
|
+
@properties['legacy_template_name']
|
225
|
+
end
|
226
|
+
|
227
|
+
##
|
228
|
+
# @return [String] The string body of this legacy content template
|
229
|
+
def legacy_body
|
230
|
+
@properties['legacy_body']
|
231
|
+
end
|
232
|
+
|
233
|
+
##
|
234
|
+
# @return [String] The URL of the resource, relative to `https://content.twilio.com`
|
235
|
+
def url
|
236
|
+
@properties['url']
|
237
|
+
end
|
238
|
+
|
239
|
+
##
|
240
|
+
# Provide a user friendly representation
|
241
|
+
def to_s
|
242
|
+
"<Twilio.Content.V1.LegacyContentInstance>"
|
243
|
+
end
|
244
|
+
|
245
|
+
##
|
246
|
+
# Provide a detailed, user friendly representation
|
247
|
+
def inspect
|
248
|
+
"<Twilio.Content.V1.LegacyContentInstance>"
|
249
|
+
end
|
250
|
+
end
|
251
|
+
end
|
252
|
+
end
|
253
|
+
end
|
254
|
+
end
|
@@ -16,6 +16,7 @@ module Twilio
|
|
16
16
|
super
|
17
17
|
@version = 'v1'
|
18
18
|
@contents = nil
|
19
|
+
@legacy_contents = nil
|
19
20
|
end
|
20
21
|
|
21
22
|
##
|
@@ -34,6 +35,12 @@ module Twilio
|
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
38
|
+
##
|
39
|
+
# @return [Twilio::REST::Content::V1::LegacyContentContext]
|
40
|
+
def legacy_contents
|
41
|
+
@legacy_contents ||= LegacyContentList.new self
|
42
|
+
end
|
43
|
+
|
37
44
|
##
|
38
45
|
# Provide a user friendly representation
|
39
46
|
def to_s
|
@@ -0,0 +1,314 @@
|
|
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 V1 < Version
|
13
|
+
##
|
14
|
+
# 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.
|
15
|
+
class InsightsAssessmentsCommentList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the InsightsAssessmentsCommentList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [InsightsAssessmentsCommentList] InsightsAssessmentsCommentList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/Insights/QM/Assessments/Comments"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Create the InsightsAssessmentsCommentInstance
|
30
|
+
# @param [String] category_id The ID of the category
|
31
|
+
# @param [String] category_name The name of the category
|
32
|
+
# @param [String] comment The Assessment comment.
|
33
|
+
# @param [String] segment_id The id of the segment.
|
34
|
+
# @param [String] user_name The name of the user.
|
35
|
+
# @param [String] user_email The email id of the user.
|
36
|
+
# @param [String] agent_id The id of the agent.
|
37
|
+
# @param [String] offset The offset
|
38
|
+
# @param [String] token The Token HTTP request header
|
39
|
+
# @return [InsightsAssessmentsCommentInstance] Created InsightsAssessmentsCommentInstance
|
40
|
+
def create(category_id: nil, category_name: nil, comment: nil, segment_id: nil, user_name: nil, user_email: nil, agent_id: nil, offset: nil, token: :unset)
|
41
|
+
data = Twilio::Values.of({
|
42
|
+
'CategoryId' => category_id,
|
43
|
+
'CategoryName' => category_name,
|
44
|
+
'Comment' => comment,
|
45
|
+
'SegmentId' => segment_id,
|
46
|
+
'UserName' => user_name,
|
47
|
+
'UserEmail' => user_email,
|
48
|
+
'AgentId' => agent_id,
|
49
|
+
'Offset' => offset,
|
50
|
+
})
|
51
|
+
headers = Twilio::Values.of({'Token' => token, })
|
52
|
+
|
53
|
+
payload = @version.create('POST', @uri, data: data, headers: headers)
|
54
|
+
|
55
|
+
InsightsAssessmentsCommentInstance.new(@version, payload, )
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# Lists InsightsAssessmentsCommentInstance records from the API as a list.
|
60
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
61
|
+
# memory before returning.
|
62
|
+
# @param [String] segment_id The id of the segment.
|
63
|
+
# @param [String] agent_id The id of the agent.
|
64
|
+
# @param [String] token The Token HTTP request header
|
65
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
66
|
+
# guarantees to never return more than limit. Default is no limit
|
67
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
68
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
69
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
70
|
+
# efficient page size, i.e. min(limit, 1000)
|
71
|
+
# @return [Array] Array of up to limit results
|
72
|
+
def list(segment_id: :unset, agent_id: :unset, token: :unset, limit: nil, page_size: nil)
|
73
|
+
self.stream(
|
74
|
+
segment_id: segment_id,
|
75
|
+
agent_id: agent_id,
|
76
|
+
token: token,
|
77
|
+
limit: limit,
|
78
|
+
page_size: page_size
|
79
|
+
).entries
|
80
|
+
end
|
81
|
+
|
82
|
+
##
|
83
|
+
# Streams InsightsAssessmentsCommentInstance records from the API as an Enumerable.
|
84
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
85
|
+
# is reached.
|
86
|
+
# @param [String] segment_id The id of the segment.
|
87
|
+
# @param [String] agent_id The id of the agent.
|
88
|
+
# @param [String] token The Token HTTP request header
|
89
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
90
|
+
# guarantees to never return more than limit. Default is no limit.
|
91
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
92
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
93
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
94
|
+
# efficient page size, i.e. min(limit, 1000)
|
95
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
96
|
+
def stream(segment_id: :unset, agent_id: :unset, token: :unset, limit: nil, page_size: nil)
|
97
|
+
limits = @version.read_limits(limit, page_size)
|
98
|
+
|
99
|
+
page = self.page(
|
100
|
+
segment_id: segment_id,
|
101
|
+
agent_id: agent_id,
|
102
|
+
token: token,
|
103
|
+
page_size: limits[:page_size],
|
104
|
+
)
|
105
|
+
|
106
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
107
|
+
end
|
108
|
+
|
109
|
+
##
|
110
|
+
# When passed a block, yields InsightsAssessmentsCommentInstance records from the API.
|
111
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
112
|
+
# is reached.
|
113
|
+
def each
|
114
|
+
limits = @version.read_limits
|
115
|
+
|
116
|
+
page = self.page(page_size: limits[:page_size], )
|
117
|
+
|
118
|
+
@version.stream(page,
|
119
|
+
limit: limits[:limit],
|
120
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
121
|
+
end
|
122
|
+
|
123
|
+
##
|
124
|
+
# Retrieve a single page of InsightsAssessmentsCommentInstance records from the API.
|
125
|
+
# Request is executed immediately.
|
126
|
+
# @param [String] segment_id The id of the segment.
|
127
|
+
# @param [String] agent_id The id of the agent.
|
128
|
+
# @param [String] token The Token HTTP request header
|
129
|
+
# @param [String] page_token PageToken provided by the API
|
130
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
131
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
132
|
+
# @return [Page] Page of InsightsAssessmentsCommentInstance
|
133
|
+
def page(segment_id: :unset, agent_id: :unset, token: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
134
|
+
params = Twilio::Values.of({
|
135
|
+
'SegmentId' => segment_id,
|
136
|
+
'AgentId' => agent_id,
|
137
|
+
'PageToken' => page_token,
|
138
|
+
'Page' => page_number,
|
139
|
+
'PageSize' => page_size,
|
140
|
+
})
|
141
|
+
headers = Twilio::Values.of({'Token' => token, })
|
142
|
+
|
143
|
+
response = @version.page('GET', @uri, params: params, headers: headers)
|
144
|
+
|
145
|
+
InsightsAssessmentsCommentPage.new(@version, response, @solution)
|
146
|
+
end
|
147
|
+
|
148
|
+
##
|
149
|
+
# Retrieve a single page of InsightsAssessmentsCommentInstance records from the API.
|
150
|
+
# Request is executed immediately.
|
151
|
+
# @param [String] target_url API-generated URL for the requested results page
|
152
|
+
# @return [Page] Page of InsightsAssessmentsCommentInstance
|
153
|
+
def get_page(target_url)
|
154
|
+
response = @version.domain.request(
|
155
|
+
'GET',
|
156
|
+
target_url
|
157
|
+
)
|
158
|
+
InsightsAssessmentsCommentPage.new(@version, response, @solution)
|
159
|
+
end
|
160
|
+
|
161
|
+
##
|
162
|
+
# Provide a user friendly representation
|
163
|
+
def to_s
|
164
|
+
'#<Twilio.FlexApi.V1.InsightsAssessmentsCommentList>'
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
##
|
169
|
+
# 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.
|
170
|
+
class InsightsAssessmentsCommentPage < Page
|
171
|
+
##
|
172
|
+
# Initialize the InsightsAssessmentsCommentPage
|
173
|
+
# @param [Version] version Version that contains the resource
|
174
|
+
# @param [Response] response Response from the API
|
175
|
+
# @param [Hash] solution Path solution for the resource
|
176
|
+
# @return [InsightsAssessmentsCommentPage] InsightsAssessmentsCommentPage
|
177
|
+
def initialize(version, response, solution)
|
178
|
+
super(version, response)
|
179
|
+
|
180
|
+
# Path Solution
|
181
|
+
@solution = solution
|
182
|
+
end
|
183
|
+
|
184
|
+
##
|
185
|
+
# Build an instance of InsightsAssessmentsCommentInstance
|
186
|
+
# @param [Hash] payload Payload response from the API
|
187
|
+
# @return [InsightsAssessmentsCommentInstance] InsightsAssessmentsCommentInstance
|
188
|
+
def get_instance(payload)
|
189
|
+
InsightsAssessmentsCommentInstance.new(@version, payload, )
|
190
|
+
end
|
191
|
+
|
192
|
+
##
|
193
|
+
# Provide a user friendly representation
|
194
|
+
def to_s
|
195
|
+
'<Twilio.FlexApi.V1.InsightsAssessmentsCommentPage>'
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
##
|
200
|
+
# 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.
|
201
|
+
class InsightsAssessmentsCommentInstance < InstanceResource
|
202
|
+
##
|
203
|
+
# Initialize the InsightsAssessmentsCommentInstance
|
204
|
+
# @param [Version] version Version that contains the resource
|
205
|
+
# @param [Hash] payload payload that contains response from Twilio
|
206
|
+
# @return [InsightsAssessmentsCommentInstance] InsightsAssessmentsCommentInstance
|
207
|
+
def initialize(version, payload)
|
208
|
+
super(version)
|
209
|
+
|
210
|
+
# Marshaled Properties
|
211
|
+
@properties = {
|
212
|
+
'account_sid' => payload['account_sid'],
|
213
|
+
'assessment_id' => payload['assessment_id'],
|
214
|
+
'comment' => payload['comment'],
|
215
|
+
'offset' => payload['offset'] == nil ? payload['offset'] : payload['offset'].to_f,
|
216
|
+
'report' => payload['report'],
|
217
|
+
'weight' => payload['weight'] == nil ? payload['weight'] : payload['weight'].to_f,
|
218
|
+
'agent_id' => payload['agent_id'],
|
219
|
+
'segment_id' => payload['segment_id'],
|
220
|
+
'user_name' => payload['user_name'],
|
221
|
+
'user_email' => payload['user_email'],
|
222
|
+
'timestamp' => payload['timestamp'] == nil ? payload['timestamp'] : payload['timestamp'].to_f,
|
223
|
+
'url' => payload['url'],
|
224
|
+
}
|
225
|
+
end
|
226
|
+
|
227
|
+
##
|
228
|
+
# @return [String] The SID of the Account that created the resource and owns this Flex Insights
|
229
|
+
def account_sid
|
230
|
+
@properties['account_sid']
|
231
|
+
end
|
232
|
+
|
233
|
+
##
|
234
|
+
# @return [String] The Unique Assessment Id.
|
235
|
+
def assessment_id
|
236
|
+
@properties['assessment_id']
|
237
|
+
end
|
238
|
+
|
239
|
+
##
|
240
|
+
# @return [Hash] The assessment comment
|
241
|
+
def comment
|
242
|
+
@properties['comment']
|
243
|
+
end
|
244
|
+
|
245
|
+
##
|
246
|
+
# @return [String] Offset.
|
247
|
+
def offset
|
248
|
+
@properties['offset']
|
249
|
+
end
|
250
|
+
|
251
|
+
##
|
252
|
+
# @return [Boolean] Part of assessment report
|
253
|
+
def report
|
254
|
+
@properties['report']
|
255
|
+
end
|
256
|
+
|
257
|
+
##
|
258
|
+
# @return [String] The weightage
|
259
|
+
def weight
|
260
|
+
@properties['weight']
|
261
|
+
end
|
262
|
+
|
263
|
+
##
|
264
|
+
# @return [String] Agent Id.
|
265
|
+
def agent_id
|
266
|
+
@properties['agent_id']
|
267
|
+
end
|
268
|
+
|
269
|
+
##
|
270
|
+
# @return [String] Segment Id.
|
271
|
+
def segment_id
|
272
|
+
@properties['segment_id']
|
273
|
+
end
|
274
|
+
|
275
|
+
##
|
276
|
+
# @return [String] The user name.
|
277
|
+
def user_name
|
278
|
+
@properties['user_name']
|
279
|
+
end
|
280
|
+
|
281
|
+
##
|
282
|
+
# @return [String] The user email id.
|
283
|
+
def user_email
|
284
|
+
@properties['user_email']
|
285
|
+
end
|
286
|
+
|
287
|
+
##
|
288
|
+
# @return [String] The timestamp.
|
289
|
+
def timestamp
|
290
|
+
@properties['timestamp']
|
291
|
+
end
|
292
|
+
|
293
|
+
##
|
294
|
+
# @return [String] The url
|
295
|
+
def url
|
296
|
+
@properties['url']
|
297
|
+
end
|
298
|
+
|
299
|
+
##
|
300
|
+
# Provide a user friendly representation
|
301
|
+
def to_s
|
302
|
+
"<Twilio.FlexApi.V1.InsightsAssessmentsCommentInstance>"
|
303
|
+
end
|
304
|
+
|
305
|
+
##
|
306
|
+
# Provide a detailed, user friendly representation
|
307
|
+
def inspect
|
308
|
+
"<Twilio.FlexApi.V1.InsightsAssessmentsCommentInstance>"
|
309
|
+
end
|
310
|
+
end
|
311
|
+
end
|
312
|
+
end
|
313
|
+
end
|
314
|
+
end
|