twilio-ruby 7.2.1 → 7.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +74 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +5 -599
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb +200 -0
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +22 -1
- data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +303 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +626 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb +229 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +593 -0
- data/lib/twilio-ruby/rest/assistants/v1/policy.rb +264 -0
- data/lib/twilio-ruby/rest/assistants/v1/session/message.rb +264 -0
- data/lib/twilio-ruby/rest/assistants/v1/session.rb +328 -0
- data/lib/twilio-ruby/rest/assistants/v1/tool.rb +549 -0
- data/lib/twilio-ruby/rest/assistants/v1.rb +100 -0
- data/lib/twilio-ruby/rest/{preview_iam.rb → assistants.rb} +1 -1
- data/lib/twilio-ruby/rest/assistants_base.rb +38 -0
- data/lib/twilio-ruby/rest/client.rb +8 -3
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +11 -11
- data/lib/twilio-ruby/rest/content/v1/content.rb +167 -4
- data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +81 -1
- data/lib/twilio-ruby/rest/iam/v1/api_key.rb +270 -0
- data/lib/twilio-ruby/rest/iam/v1/get_api_keys.rb +223 -0
- data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +177 -0
- data/lib/twilio-ruby/rest/iam/v1.rb +61 -0
- data/lib/twilio-ruby/rest/iam.rb +6 -0
- data/lib/twilio-ruby/rest/{preview_iam_base.rb → iam_base.rb} +10 -5
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +60 -12
- data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +1 -1
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/sentence.rb +16 -3
- data/lib/twilio-ruby/rest/intelligence/v2.rb +1 -1
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +16 -29
- data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +46 -20
- data/lib/twilio-ruby/rest/marketplace/v1/referral_conversion.rb +199 -0
- data/lib/twilio-ruby/rest/marketplace/v1.rb +7 -1
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +4 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +40 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +10 -10
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +24 -17
- data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +7 -7
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +3 -3
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_fetch.rb +3 -3
- data/lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb +96 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +2 -2
- data/lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb +277 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +8 -5
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
- data/lib/twilio-ruby/rest/numbers/v2.rb +15 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb +12 -3
- data/lib/twilio-ruby/rest/verify/v2/service.rb +4 -4
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +2 -1
- metadata +23 -4
@@ -0,0 +1,200 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Api
|
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 Api < ApiBase
|
19
|
+
class V2010 < Version
|
20
|
+
class AccountContext < InstanceContext
|
21
|
+
class RecordingContext < InstanceContext
|
22
|
+
class AddOnResultContext < InstanceContext
|
23
|
+
class PayloadContext < InstanceContext
|
24
|
+
|
25
|
+
class DataList < ListResource
|
26
|
+
|
27
|
+
##
|
28
|
+
# Initialize the DataList
|
29
|
+
# @param [Version] version Version that contains the resource
|
30
|
+
# @return [DataList] DataList
|
31
|
+
def initialize(version, account_sid: nil, reference_sid: nil, add_on_result_sid: nil, payload_sid: nil)
|
32
|
+
super(version)
|
33
|
+
# Path Solution
|
34
|
+
@solution = { account_sid: account_sid, reference_sid: reference_sid, add_on_result_sid: add_on_result_sid, payload_sid: payload_sid }
|
35
|
+
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
# Provide a user friendly representation
|
42
|
+
def to_s
|
43
|
+
'#<Twilio.Api.V2010.DataList>'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
class DataContext < InstanceContext
|
49
|
+
##
|
50
|
+
# Initialize the DataContext
|
51
|
+
# @param [Version] version Version that contains the resource
|
52
|
+
# @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resource to fetch.
|
53
|
+
# @param [String] reference_sid The SID of the recording to which the AddOnResult resource that contains the payload to fetch belongs.
|
54
|
+
# @param [String] add_on_result_sid The SID of the AddOnResult to which the payload to fetch belongs.
|
55
|
+
# @param [String] payload_sid The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to fetch.
|
56
|
+
# @return [DataContext] DataContext
|
57
|
+
def initialize(version, account_sid, reference_sid, add_on_result_sid, payload_sid)
|
58
|
+
super(version)
|
59
|
+
|
60
|
+
# Path Solution
|
61
|
+
@solution = { account_sid: account_sid, reference_sid: reference_sid, add_on_result_sid: add_on_result_sid, payload_sid: payload_sid, }
|
62
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/Recordings/#{@solution[:reference_sid]}/AddOnResults/#{@solution[:add_on_result_sid]}/Payloads/#{@solution[:payload_sid]}/Data.json"
|
63
|
+
|
64
|
+
|
65
|
+
end
|
66
|
+
##
|
67
|
+
# Fetch the DataInstance
|
68
|
+
# @return [DataInstance] Fetched DataInstance
|
69
|
+
def fetch
|
70
|
+
|
71
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
72
|
+
|
73
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
74
|
+
DataInstance.new(
|
75
|
+
@version,
|
76
|
+
payload,
|
77
|
+
account_sid: @solution[:account_sid],
|
78
|
+
reference_sid: @solution[:reference_sid],
|
79
|
+
add_on_result_sid: @solution[:add_on_result_sid],
|
80
|
+
payload_sid: @solution[:payload_sid],
|
81
|
+
)
|
82
|
+
end
|
83
|
+
|
84
|
+
|
85
|
+
##
|
86
|
+
# Provide a user friendly representation
|
87
|
+
def to_s
|
88
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
89
|
+
"#<Twilio.Api.V2010.DataContext #{context}>"
|
90
|
+
end
|
91
|
+
|
92
|
+
##
|
93
|
+
# Provide a detailed, user friendly representation
|
94
|
+
def inspect
|
95
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
96
|
+
"#<Twilio.Api.V2010.DataContext #{context}>"
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
class DataPage < Page
|
101
|
+
##
|
102
|
+
# Initialize the DataPage
|
103
|
+
# @param [Version] version Version that contains the resource
|
104
|
+
# @param [Response] response Response from the API
|
105
|
+
# @param [Hash] solution Path solution for the resource
|
106
|
+
# @return [DataPage] DataPage
|
107
|
+
def initialize(version, response, solution)
|
108
|
+
super(version, response)
|
109
|
+
|
110
|
+
# Path Solution
|
111
|
+
@solution = solution
|
112
|
+
end
|
113
|
+
|
114
|
+
##
|
115
|
+
# Build an instance of DataInstance
|
116
|
+
# @param [Hash] payload Payload response from the API
|
117
|
+
# @return [DataInstance] DataInstance
|
118
|
+
def get_instance(payload)
|
119
|
+
DataInstance.new(@version, payload, account_sid: @solution[:account_sid], reference_sid: @solution[:reference_sid], add_on_result_sid: @solution[:add_on_result_sid], payload_sid: @solution[:payload_sid])
|
120
|
+
end
|
121
|
+
|
122
|
+
##
|
123
|
+
# Provide a user friendly representation
|
124
|
+
def to_s
|
125
|
+
'<Twilio.Api.V2010.DataPage>'
|
126
|
+
end
|
127
|
+
end
|
128
|
+
class DataInstance < InstanceResource
|
129
|
+
##
|
130
|
+
# Initialize the DataInstance
|
131
|
+
# @param [Version] version Version that contains the resource
|
132
|
+
# @param [Hash] payload payload that contains response from Twilio
|
133
|
+
# @param [String] account_sid The SID of the
|
134
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Data
|
135
|
+
# resource.
|
136
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
137
|
+
# @return [DataInstance] DataInstance
|
138
|
+
def initialize(version, payload , account_sid: nil, reference_sid: nil, add_on_result_sid: nil, payload_sid: nil)
|
139
|
+
super(version)
|
140
|
+
|
141
|
+
# Marshaled Properties
|
142
|
+
@properties = {
|
143
|
+
'redirect_to' => payload['redirect_to'],
|
144
|
+
}
|
145
|
+
|
146
|
+
# Context
|
147
|
+
@instance_context = nil
|
148
|
+
@params = { 'account_sid' => account_sid ,'reference_sid' => reference_sid || @properties['reference_sid'] ,'add_on_result_sid' => add_on_result_sid || @properties['add_on_result_sid'] ,'payload_sid' => payload_sid || @properties['payload_sid'] , }
|
149
|
+
end
|
150
|
+
|
151
|
+
##
|
152
|
+
# Generate an instance context for the instance, the context is capable of
|
153
|
+
# performing various actions. All instance actions are proxied to the context
|
154
|
+
# @return [DataContext] CallContext for this CallInstance
|
155
|
+
def context
|
156
|
+
unless @instance_context
|
157
|
+
@instance_context = DataContext.new(@version , @params['account_sid'], @params['reference_sid'], @params['add_on_result_sid'], @params['payload_sid'])
|
158
|
+
end
|
159
|
+
@instance_context
|
160
|
+
end
|
161
|
+
|
162
|
+
##
|
163
|
+
# @return [String] The URL to redirect to to get the data returned by the AddOn that was previously stored.
|
164
|
+
def redirect_to
|
165
|
+
@properties['redirect_to']
|
166
|
+
end
|
167
|
+
|
168
|
+
##
|
169
|
+
# Fetch the DataInstance
|
170
|
+
# @return [DataInstance] Fetched DataInstance
|
171
|
+
def fetch
|
172
|
+
|
173
|
+
context.fetch
|
174
|
+
end
|
175
|
+
|
176
|
+
##
|
177
|
+
# Provide a user friendly representation
|
178
|
+
def to_s
|
179
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
180
|
+
"<Twilio.Api.V2010.DataInstance #{values}>"
|
181
|
+
end
|
182
|
+
|
183
|
+
##
|
184
|
+
# Provide a detailed, user friendly representation
|
185
|
+
def inspect
|
186
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
187
|
+
"<Twilio.Api.V2010.DataInstance #{values}>"
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
|
@@ -144,7 +144,8 @@ module Twilio
|
|
144
144
|
@solution = { account_sid: account_sid, reference_sid: reference_sid, add_on_result_sid: add_on_result_sid, sid: sid, }
|
145
145
|
@uri = "/Accounts/#{@solution[:account_sid]}/Recordings/#{@solution[:reference_sid]}/AddOnResults/#{@solution[:add_on_result_sid]}/Payloads/#{@solution[:sid]}.json"
|
146
146
|
|
147
|
-
|
147
|
+
# Dependents
|
148
|
+
@data = nil
|
148
149
|
end
|
149
150
|
##
|
150
151
|
# Delete the PayloadInstance
|
@@ -174,6 +175,19 @@ module Twilio
|
|
174
175
|
)
|
175
176
|
end
|
176
177
|
|
178
|
+
##
|
179
|
+
# Access the data
|
180
|
+
# @return [DataList]
|
181
|
+
# @return [DataContext]
|
182
|
+
def data
|
183
|
+
DataContext.new(
|
184
|
+
@version,
|
185
|
+
@solution[:account_sid],
|
186
|
+
@solution[:reference_sid],
|
187
|
+
@solution[:add_on_result_sid],
|
188
|
+
@solution[:sid]
|
189
|
+
)
|
190
|
+
end
|
177
191
|
|
178
192
|
##
|
179
193
|
# Provide a user friendly representation
|
@@ -344,6 +358,13 @@ module Twilio
|
|
344
358
|
context.fetch
|
345
359
|
end
|
346
360
|
|
361
|
+
##
|
362
|
+
# Access the data
|
363
|
+
# @return [data] data
|
364
|
+
def data
|
365
|
+
context.data
|
366
|
+
end
|
367
|
+
|
347
368
|
##
|
348
369
|
# Provide a user friendly representation
|
349
370
|
def to_s
|
@@ -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
|
+
|