twilio-ruby 5.74.0 → 5.74.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.
- checksums.yaml +4 -4
- data/CHANGES.md +30 -0
- data/LICENSE +1 -1
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +22 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +16 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +16 -1
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +229 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +288 -0
- data/lib/twilio-ruby/rest/flex_api/v1/{good_data.rb → insights_session.rb} +28 -28
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb +144 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +130 -0
- data/lib/twilio-ruby/rest/flex_api/v1/{user_roles.rb → insights_user_roles.rb} +28 -28
- data/lib/twilio-ruby/rest/flex_api/v1.rb +64 -18
- data/lib/twilio-ruby/rest/flex_api.rb +43 -15
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +151 -1
- data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +4 -1
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +10 -5
- data/lib/twilio-ruby/twiml/voice_response.rb +83 -2
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +10 -6
@@ -0,0 +1,288 @@
|
|
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 InsightsQuestionnairesQuestionList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the InsightsQuestionnairesQuestionList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [InsightsQuestionnairesQuestionList] InsightsQuestionnairesQuestionList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/Insights/QM/Questions"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Create the InsightsQuestionnairesQuestionInstance
|
30
|
+
# @param [String] category_id The ID of the category
|
31
|
+
# @param [String] question The question.
|
32
|
+
# @param [String] description The description for the question.
|
33
|
+
# @param [String] answer_set_id The answer_set for the question.
|
34
|
+
# @param [Boolean] allow_na The flag to enable for disable NA for answer.
|
35
|
+
# @param [String] token The Token HTTP request header
|
36
|
+
# @return [InsightsQuestionnairesQuestionInstance] Created InsightsQuestionnairesQuestionInstance
|
37
|
+
def create(category_id: nil, question: nil, description: nil, answer_set_id: nil, allow_na: nil, token: :unset)
|
38
|
+
data = Twilio::Values.of({
|
39
|
+
'CategoryId' => category_id,
|
40
|
+
'Question' => question,
|
41
|
+
'Description' => description,
|
42
|
+
'AnswerSetId' => answer_set_id,
|
43
|
+
'AllowNa' => allow_na,
|
44
|
+
})
|
45
|
+
headers = Twilio::Values.of({'Token' => token, })
|
46
|
+
|
47
|
+
payload = @version.create('POST', @uri, data: data, headers: headers)
|
48
|
+
|
49
|
+
InsightsQuestionnairesQuestionInstance.new(@version, payload, )
|
50
|
+
end
|
51
|
+
|
52
|
+
##
|
53
|
+
# Provide a user friendly representation
|
54
|
+
def to_s
|
55
|
+
'#<Twilio.FlexApi.V1.InsightsQuestionnairesQuestionList>'
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
##
|
60
|
+
# 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.
|
61
|
+
class InsightsQuestionnairesQuestionPage < Page
|
62
|
+
##
|
63
|
+
# Initialize the InsightsQuestionnairesQuestionPage
|
64
|
+
# @param [Version] version Version that contains the resource
|
65
|
+
# @param [Response] response Response from the API
|
66
|
+
# @param [Hash] solution Path solution for the resource
|
67
|
+
# @return [InsightsQuestionnairesQuestionPage] InsightsQuestionnairesQuestionPage
|
68
|
+
def initialize(version, response, solution)
|
69
|
+
super(version, response)
|
70
|
+
|
71
|
+
# Path Solution
|
72
|
+
@solution = solution
|
73
|
+
end
|
74
|
+
|
75
|
+
##
|
76
|
+
# Build an instance of InsightsQuestionnairesQuestionInstance
|
77
|
+
# @param [Hash] payload Payload response from the API
|
78
|
+
# @return [InsightsQuestionnairesQuestionInstance] InsightsQuestionnairesQuestionInstance
|
79
|
+
def get_instance(payload)
|
80
|
+
InsightsQuestionnairesQuestionInstance.new(@version, payload, )
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# Provide a user friendly representation
|
85
|
+
def to_s
|
86
|
+
'<Twilio.FlexApi.V1.InsightsQuestionnairesQuestionPage>'
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
##
|
91
|
+
# 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.
|
92
|
+
class InsightsQuestionnairesQuestionContext < InstanceContext
|
93
|
+
##
|
94
|
+
# Initialize the InsightsQuestionnairesQuestionContext
|
95
|
+
# @param [Version] version Version that contains the resource
|
96
|
+
# @param [String] question_id The unique ID of the question
|
97
|
+
# @return [InsightsQuestionnairesQuestionContext] InsightsQuestionnairesQuestionContext
|
98
|
+
def initialize(version, question_id)
|
99
|
+
super(version)
|
100
|
+
|
101
|
+
# Path Solution
|
102
|
+
@solution = {question_id: question_id, }
|
103
|
+
@uri = "/Insights/QM/Questions/#{@solution[:question_id]}"
|
104
|
+
end
|
105
|
+
|
106
|
+
##
|
107
|
+
# Update the InsightsQuestionnairesQuestionInstance
|
108
|
+
# @param [String] question The question.
|
109
|
+
# @param [String] description The description for the question.
|
110
|
+
# @param [String] answer_set_id The answer_set for the question.
|
111
|
+
# @param [Boolean] allow_na The flag to enable for disable NA for answer.
|
112
|
+
# @param [String] category_id The ID of the category
|
113
|
+
# @param [String] token The Token HTTP request header
|
114
|
+
# @return [InsightsQuestionnairesQuestionInstance] Updated InsightsQuestionnairesQuestionInstance
|
115
|
+
def update(question: nil, description: nil, answer_set_id: nil, allow_na: nil, category_id: :unset, token: :unset)
|
116
|
+
data = Twilio::Values.of({
|
117
|
+
'Question' => question,
|
118
|
+
'Description' => description,
|
119
|
+
'AnswerSetId' => answer_set_id,
|
120
|
+
'AllowNa' => allow_na,
|
121
|
+
'CategoryId' => category_id,
|
122
|
+
})
|
123
|
+
headers = Twilio::Values.of({'Token' => token, })
|
124
|
+
|
125
|
+
payload = @version.update('POST', @uri, data: data, headers: headers)
|
126
|
+
|
127
|
+
InsightsQuestionnairesQuestionInstance.new(@version, payload, question_id: @solution[:question_id], )
|
128
|
+
end
|
129
|
+
|
130
|
+
##
|
131
|
+
# Delete the InsightsQuestionnairesQuestionInstance
|
132
|
+
# @param [String] token The Token HTTP request header
|
133
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
134
|
+
def delete(token: :unset)
|
135
|
+
headers = Twilio::Values.of({'Token' => token, })
|
136
|
+
|
137
|
+
@version.delete('DELETE', @uri, headers: headers)
|
138
|
+
end
|
139
|
+
|
140
|
+
##
|
141
|
+
# Provide a user friendly representation
|
142
|
+
def to_s
|
143
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
144
|
+
"#<Twilio.FlexApi.V1.InsightsQuestionnairesQuestionContext #{context}>"
|
145
|
+
end
|
146
|
+
|
147
|
+
##
|
148
|
+
# Provide a detailed, user friendly representation
|
149
|
+
def inspect
|
150
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
151
|
+
"#<Twilio.FlexApi.V1.InsightsQuestionnairesQuestionContext #{context}>"
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
##
|
156
|
+
# 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.
|
157
|
+
class InsightsQuestionnairesQuestionInstance < InstanceResource
|
158
|
+
##
|
159
|
+
# Initialize the InsightsQuestionnairesQuestionInstance
|
160
|
+
# @param [Version] version Version that contains the resource
|
161
|
+
# @param [Hash] payload payload that contains response from Twilio
|
162
|
+
# @param [String] question_id The unique ID of the question
|
163
|
+
# @return [InsightsQuestionnairesQuestionInstance] InsightsQuestionnairesQuestionInstance
|
164
|
+
def initialize(version, payload, question_id: nil)
|
165
|
+
super(version)
|
166
|
+
|
167
|
+
# Marshaled Properties
|
168
|
+
@properties = {
|
169
|
+
'account_sid' => payload['account_sid'],
|
170
|
+
'question_id' => payload['question_id'],
|
171
|
+
'question' => payload['question'],
|
172
|
+
'description' => payload['description'],
|
173
|
+
'category' => payload['category'],
|
174
|
+
'answer_set_id' => payload['answer_set_id'],
|
175
|
+
'allow_na' => payload['allow_na'],
|
176
|
+
'url' => payload['url'],
|
177
|
+
}
|
178
|
+
|
179
|
+
# Context
|
180
|
+
@instance_context = nil
|
181
|
+
@params = {'question_id' => question_id || @properties['question_id'], }
|
182
|
+
end
|
183
|
+
|
184
|
+
##
|
185
|
+
# Generate an instance context for the instance, the context is capable of
|
186
|
+
# performing various actions. All instance actions are proxied to the context
|
187
|
+
# @return [InsightsQuestionnairesQuestionContext] InsightsQuestionnairesQuestionContext for this InsightsQuestionnairesQuestionInstance
|
188
|
+
def context
|
189
|
+
unless @instance_context
|
190
|
+
@instance_context = InsightsQuestionnairesQuestionContext.new(@version, @params['question_id'], )
|
191
|
+
end
|
192
|
+
@instance_context
|
193
|
+
end
|
194
|
+
|
195
|
+
##
|
196
|
+
# @return [String] The SID of the Account that created the resource and owns this Flex Insights
|
197
|
+
def account_sid
|
198
|
+
@properties['account_sid']
|
199
|
+
end
|
200
|
+
|
201
|
+
##
|
202
|
+
# @return [String] Unique Question ID
|
203
|
+
def question_id
|
204
|
+
@properties['question_id']
|
205
|
+
end
|
206
|
+
|
207
|
+
##
|
208
|
+
# @return [String] The question.
|
209
|
+
def question
|
210
|
+
@properties['question']
|
211
|
+
end
|
212
|
+
|
213
|
+
##
|
214
|
+
# @return [String] The question description.
|
215
|
+
def description
|
216
|
+
@properties['description']
|
217
|
+
end
|
218
|
+
|
219
|
+
##
|
220
|
+
# @return [Hash] The question category.
|
221
|
+
def category
|
222
|
+
@properties['category']
|
223
|
+
end
|
224
|
+
|
225
|
+
##
|
226
|
+
# @return [String] The answer_set for question.
|
227
|
+
def answer_set_id
|
228
|
+
@properties['answer_set_id']
|
229
|
+
end
|
230
|
+
|
231
|
+
##
|
232
|
+
# @return [Boolean] Flag to enable NA for answer.
|
233
|
+
def allow_na
|
234
|
+
@properties['allow_na']
|
235
|
+
end
|
236
|
+
|
237
|
+
##
|
238
|
+
# @return [String] The url
|
239
|
+
def url
|
240
|
+
@properties['url']
|
241
|
+
end
|
242
|
+
|
243
|
+
##
|
244
|
+
# Update the InsightsQuestionnairesQuestionInstance
|
245
|
+
# @param [String] question The question.
|
246
|
+
# @param [String] description The description for the question.
|
247
|
+
# @param [String] answer_set_id The answer_set for the question.
|
248
|
+
# @param [Boolean] allow_na The flag to enable for disable NA for answer.
|
249
|
+
# @param [String] category_id The ID of the category
|
250
|
+
# @param [String] token The Token HTTP request header
|
251
|
+
# @return [InsightsQuestionnairesQuestionInstance] Updated InsightsQuestionnairesQuestionInstance
|
252
|
+
def update(question: nil, description: nil, answer_set_id: nil, allow_na: nil, category_id: :unset, token: :unset)
|
253
|
+
context.update(
|
254
|
+
question: question,
|
255
|
+
description: description,
|
256
|
+
answer_set_id: answer_set_id,
|
257
|
+
allow_na: allow_na,
|
258
|
+
category_id: category_id,
|
259
|
+
token: token,
|
260
|
+
)
|
261
|
+
end
|
262
|
+
|
263
|
+
##
|
264
|
+
# Delete the InsightsQuestionnairesQuestionInstance
|
265
|
+
# @param [String] token The Token HTTP request header
|
266
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
267
|
+
def delete(token: :unset)
|
268
|
+
context.delete(token: token, )
|
269
|
+
end
|
270
|
+
|
271
|
+
##
|
272
|
+
# Provide a user friendly representation
|
273
|
+
def to_s
|
274
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
275
|
+
"<Twilio.FlexApi.V1.InsightsQuestionnairesQuestionInstance #{values}>"
|
276
|
+
end
|
277
|
+
|
278
|
+
##
|
279
|
+
# Provide a detailed, user friendly representation
|
280
|
+
def inspect
|
281
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
282
|
+
"<Twilio.FlexApi.V1.InsightsQuestionnairesQuestionInstance #{values}>"
|
283
|
+
end
|
284
|
+
end
|
285
|
+
end
|
286
|
+
end
|
287
|
+
end
|
288
|
+
end
|
@@ -10,11 +10,11 @@ module Twilio
|
|
10
10
|
module REST
|
11
11
|
class FlexApi < Domain
|
12
12
|
class V1 < Version
|
13
|
-
class
|
13
|
+
class InsightsSessionList < ListResource
|
14
14
|
##
|
15
|
-
# Initialize the
|
15
|
+
# Initialize the InsightsSessionList
|
16
16
|
# @param [Version] version Version that contains the resource
|
17
|
-
# @return [
|
17
|
+
# @return [InsightsSessionList] InsightsSessionList
|
18
18
|
def initialize(version)
|
19
19
|
super(version)
|
20
20
|
|
@@ -25,17 +25,17 @@ module Twilio
|
|
25
25
|
##
|
26
26
|
# Provide a user friendly representation
|
27
27
|
def to_s
|
28
|
-
'#<Twilio.FlexApi.V1.
|
28
|
+
'#<Twilio.FlexApi.V1.InsightsSessionList>'
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
class
|
32
|
+
class InsightsSessionPage < Page
|
33
33
|
##
|
34
|
-
# Initialize the
|
34
|
+
# Initialize the InsightsSessionPage
|
35
35
|
# @param [Version] version Version that contains the resource
|
36
36
|
# @param [Response] response Response from the API
|
37
37
|
# @param [Hash] solution Path solution for the resource
|
38
|
-
# @return [
|
38
|
+
# @return [InsightsSessionPage] InsightsSessionPage
|
39
39
|
def initialize(version, response, solution)
|
40
40
|
super(version, response)
|
41
41
|
|
@@ -44,25 +44,25 @@ module Twilio
|
|
44
44
|
end
|
45
45
|
|
46
46
|
##
|
47
|
-
# Build an instance of
|
47
|
+
# Build an instance of InsightsSessionInstance
|
48
48
|
# @param [Hash] payload Payload response from the API
|
49
|
-
# @return [
|
49
|
+
# @return [InsightsSessionInstance] InsightsSessionInstance
|
50
50
|
def get_instance(payload)
|
51
|
-
|
51
|
+
InsightsSessionInstance.new(@version, payload, )
|
52
52
|
end
|
53
53
|
|
54
54
|
##
|
55
55
|
# Provide a user friendly representation
|
56
56
|
def to_s
|
57
|
-
'<Twilio.FlexApi.V1.
|
57
|
+
'<Twilio.FlexApi.V1.InsightsSessionPage>'
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
class
|
61
|
+
class InsightsSessionContext < InstanceContext
|
62
62
|
##
|
63
|
-
# Initialize the
|
63
|
+
# Initialize the InsightsSessionContext
|
64
64
|
# @param [Version] version Version that contains the resource
|
65
|
-
# @return [
|
65
|
+
# @return [InsightsSessionContext] InsightsSessionContext
|
66
66
|
def initialize(version)
|
67
67
|
super(version)
|
68
68
|
|
@@ -72,38 +72,38 @@ module Twilio
|
|
72
72
|
end
|
73
73
|
|
74
74
|
##
|
75
|
-
# Create the
|
75
|
+
# Create the InsightsSessionInstance
|
76
76
|
# @param [String] token The Token HTTP request header
|
77
|
-
# @return [
|
77
|
+
# @return [InsightsSessionInstance] Created InsightsSessionInstance
|
78
78
|
def create(token: :unset)
|
79
79
|
headers = Twilio::Values.of({'Token' => token, })
|
80
80
|
|
81
81
|
payload = @version.create('POST', @uri, headers: headers)
|
82
82
|
|
83
|
-
|
83
|
+
InsightsSessionInstance.new(@version, payload, )
|
84
84
|
end
|
85
85
|
|
86
86
|
##
|
87
87
|
# Provide a user friendly representation
|
88
88
|
def to_s
|
89
89
|
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
90
|
-
"#<Twilio.FlexApi.V1.
|
90
|
+
"#<Twilio.FlexApi.V1.InsightsSessionContext #{context}>"
|
91
91
|
end
|
92
92
|
|
93
93
|
##
|
94
94
|
# Provide a detailed, user friendly representation
|
95
95
|
def inspect
|
96
96
|
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
97
|
-
"#<Twilio.FlexApi.V1.
|
97
|
+
"#<Twilio.FlexApi.V1.InsightsSessionContext #{context}>"
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
-
class
|
101
|
+
class InsightsSessionInstance < InstanceResource
|
102
102
|
##
|
103
|
-
# Initialize the
|
103
|
+
# Initialize the InsightsSessionInstance
|
104
104
|
# @param [Version] version Version that contains the resource
|
105
105
|
# @param [Hash] payload payload that contains response from Twilio
|
106
|
-
# @return [
|
106
|
+
# @return [InsightsSessionInstance] InsightsSessionInstance
|
107
107
|
def initialize(version, payload)
|
108
108
|
super(version)
|
109
109
|
|
@@ -124,10 +124,10 @@ module Twilio
|
|
124
124
|
##
|
125
125
|
# Generate an instance context for the instance, the context is capable of
|
126
126
|
# performing various actions. All instance actions are proxied to the context
|
127
|
-
# @return [
|
127
|
+
# @return [InsightsSessionContext] InsightsSessionContext for this InsightsSessionInstance
|
128
128
|
def context
|
129
129
|
unless @instance_context
|
130
|
-
@instance_context =
|
130
|
+
@instance_context = InsightsSessionContext.new(@version, )
|
131
131
|
end
|
132
132
|
@instance_context
|
133
133
|
end
|
@@ -163,9 +163,9 @@ module Twilio
|
|
163
163
|
end
|
164
164
|
|
165
165
|
##
|
166
|
-
# Create the
|
166
|
+
# Create the InsightsSessionInstance
|
167
167
|
# @param [String] token The Token HTTP request header
|
168
|
-
# @return [
|
168
|
+
# @return [InsightsSessionInstance] Created InsightsSessionInstance
|
169
169
|
def create(token: :unset)
|
170
170
|
context.create(token: token, )
|
171
171
|
end
|
@@ -174,14 +174,14 @@ module Twilio
|
|
174
174
|
# Provide a user friendly representation
|
175
175
|
def to_s
|
176
176
|
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
177
|
-
"<Twilio.FlexApi.V1.
|
177
|
+
"<Twilio.FlexApi.V1.InsightsSessionInstance #{values}>"
|
178
178
|
end
|
179
179
|
|
180
180
|
##
|
181
181
|
# Provide a detailed, user friendly representation
|
182
182
|
def inspect
|
183
183
|
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
184
|
-
"<Twilio.FlexApi.V1.
|
184
|
+
"<Twilio.FlexApi.V1.InsightsSessionInstance #{values}>"
|
185
185
|
end
|
186
186
|
end
|
187
187
|
end
|
@@ -0,0 +1,144 @@
|
|
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 InsightsSettingsAnswerSetsList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the InsightsSettingsAnswerSetsList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [InsightsSettingsAnswerSetsList] InsightsSettingsAnswerSetsList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/Insights/QM/Settings/AnswerSets"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Fetch the InsightsSettingsAnswerSetsInstance
|
30
|
+
# @param [String] token The Token HTTP request header
|
31
|
+
# @return [InsightsSettingsAnswerSetsInstance] Fetched InsightsSettingsAnswerSetsInstance
|
32
|
+
def fetch(token: :unset)
|
33
|
+
headers = Twilio::Values.of({'Token' => token, })
|
34
|
+
|
35
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
36
|
+
|
37
|
+
InsightsSettingsAnswerSetsInstance.new(@version, payload, )
|
38
|
+
end
|
39
|
+
|
40
|
+
##
|
41
|
+
# Provide a user friendly representation
|
42
|
+
def to_s
|
43
|
+
'#<Twilio.FlexApi.V1.InsightsSettingsAnswerSetsList>'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
##
|
48
|
+
# 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.
|
49
|
+
class InsightsSettingsAnswerSetsPage < Page
|
50
|
+
##
|
51
|
+
# Initialize the InsightsSettingsAnswerSetsPage
|
52
|
+
# @param [Version] version Version that contains the resource
|
53
|
+
# @param [Response] response Response from the API
|
54
|
+
# @param [Hash] solution Path solution for the resource
|
55
|
+
# @return [InsightsSettingsAnswerSetsPage] InsightsSettingsAnswerSetsPage
|
56
|
+
def initialize(version, response, solution)
|
57
|
+
super(version, response)
|
58
|
+
|
59
|
+
# Path Solution
|
60
|
+
@solution = solution
|
61
|
+
end
|
62
|
+
|
63
|
+
##
|
64
|
+
# Build an instance of InsightsSettingsAnswerSetsInstance
|
65
|
+
# @param [Hash] payload Payload response from the API
|
66
|
+
# @return [InsightsSettingsAnswerSetsInstance] InsightsSettingsAnswerSetsInstance
|
67
|
+
def get_instance(payload)
|
68
|
+
InsightsSettingsAnswerSetsInstance.new(@version, payload, )
|
69
|
+
end
|
70
|
+
|
71
|
+
##
|
72
|
+
# Provide a user friendly representation
|
73
|
+
def to_s
|
74
|
+
'<Twilio.FlexApi.V1.InsightsSettingsAnswerSetsPage>'
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
##
|
79
|
+
# 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.
|
80
|
+
class InsightsSettingsAnswerSetsInstance < InstanceResource
|
81
|
+
##
|
82
|
+
# Initialize the InsightsSettingsAnswerSetsInstance
|
83
|
+
# @param [Version] version Version that contains the resource
|
84
|
+
# @param [Hash] payload payload that contains response from Twilio
|
85
|
+
# @return [InsightsSettingsAnswerSetsInstance] InsightsSettingsAnswerSetsInstance
|
86
|
+
def initialize(version, payload)
|
87
|
+
super(version)
|
88
|
+
|
89
|
+
# Marshaled Properties
|
90
|
+
@properties = {
|
91
|
+
'account_sid' => payload['account_sid'],
|
92
|
+
'answer_sets' => payload['answer_sets'],
|
93
|
+
'answer_set_categories' => payload['answer_set_categories'],
|
94
|
+
'not_applicable' => payload['not_applicable'],
|
95
|
+
'url' => payload['url'],
|
96
|
+
}
|
97
|
+
end
|
98
|
+
|
99
|
+
##
|
100
|
+
# @return [String] The SID of the Account that created the resource and owns this Flex Insights
|
101
|
+
def account_sid
|
102
|
+
@properties['account_sid']
|
103
|
+
end
|
104
|
+
|
105
|
+
##
|
106
|
+
# @return [Hash] Answer Set list
|
107
|
+
def answer_sets
|
108
|
+
@properties['answer_sets']
|
109
|
+
end
|
110
|
+
|
111
|
+
##
|
112
|
+
# @return [Hash] Categories of Answer Set
|
113
|
+
def answer_set_categories
|
114
|
+
@properties['answer_set_categories']
|
115
|
+
end
|
116
|
+
|
117
|
+
##
|
118
|
+
# @return [Hash] NA answer set
|
119
|
+
def not_applicable
|
120
|
+
@properties['not_applicable']
|
121
|
+
end
|
122
|
+
|
123
|
+
##
|
124
|
+
# @return [String] The url
|
125
|
+
def url
|
126
|
+
@properties['url']
|
127
|
+
end
|
128
|
+
|
129
|
+
##
|
130
|
+
# Provide a user friendly representation
|
131
|
+
def to_s
|
132
|
+
"<Twilio.FlexApi.V1.InsightsSettingsAnswerSetsInstance>"
|
133
|
+
end
|
134
|
+
|
135
|
+
##
|
136
|
+
# Provide a detailed, user friendly representation
|
137
|
+
def inspect
|
138
|
+
"<Twilio.FlexApi.V1.InsightsSettingsAnswerSetsInstance>"
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|