twilio-ruby 6.0.0.pre.rc.3 → 6.0.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 +103 -47
- data/CONTRIBUTING.md +10 -8
- data/README.md +128 -46
- data/UPGRADE.md +7 -4
- data/advanced-examples/custom-http-client.md +170 -0
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +1 -6
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb +7 -42
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +8 -42
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +2 -10
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +1 -6
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +1 -5
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -11
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +1 -5
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +1 -6
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +2 -10
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +1 -5
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +3 -16
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +1 -5
- data/lib/twilio-ruby/rest/api/v2010/account.rb +24 -103
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +1 -5
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +2 -10
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +6 -24
- data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +2 -9
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +3 -15
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -6
- data/lib/twilio-ruby/rest/chat/v1/service.rb +3 -12
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +4 -20
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +2 -10
- data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -16
- data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +11 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -5
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +3 -12
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -6
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +3 -15
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +1 -5
- data/lib/twilio-ruby/rest/conversations/v1/service.rb +5 -21
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +1 -4
- data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -4
- data/lib/twilio-ruby/rest/events/v1/sink.rb +2 -10
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +1 -4
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +38 -44
- data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +17 -23
- data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +9 -9
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +53 -53
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +37 -37
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +52 -52
- data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +19 -92
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +4 -4
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +4 -4
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +2 -11
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +1 -4
- data/lib/twilio-ruby/rest/flex_api/v1.rb +30 -39
- data/lib/twilio-ruby/rest/insights/v1/call.rb +2 -10
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +31 -3
- data/lib/twilio-ruby/rest/insights/v1/conference.rb +1 -4
- data/lib/twilio-ruby/rest/insights/v1/room.rb +1 -4
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +3 -15
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -6
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +3 -12
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +4 -20
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +2 -10
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -16
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +2 -9
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +28 -2
- data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +7 -0
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +196 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +31 -47
- data/lib/twilio-ruby/rest/messaging/v1.rb +15 -15
- data/lib/twilio-ruby/rest/messaging.rb +1 -1
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +2 -8
- data/lib/twilio-ruby/rest/microvisor.rb +2 -1
- data/lib/twilio-ruby/rest/notify/v1/service.rb +2 -9
- data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +224 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +49 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +4 -18
- data/lib/twilio-ruby/rest/oauth.rb +1 -1
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +4 -16
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +1 -5
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +1 -4
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +1 -4
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -5
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +2 -10
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +2 -10
- data/lib/twilio-ruby/rest/preview/sync/service.rb +3 -12
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +1 -5
- data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +2 -10
- data/lib/twilio-ruby/rest/preview/understand/assistant.rb +5 -20
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -6
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +2 -10
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +3 -12
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +1 -5
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +3 -15
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +1 -5
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +4 -16
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +1 -5
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -5
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +2 -8
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -5
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +2 -8
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +1 -4
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +2 -10
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +2 -10
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +2 -10
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -6
- data/lib/twilio-ruby/rest/sync/v1/service.rb +4 -16
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +1 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +2 -10
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +7 -28
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +4 -16
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +3 -12
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +3 -12
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +1 -7
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +3 -16
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +1 -5
- data/lib/twilio-ruby/rest/verify/v2/service.rb +7 -29
- data/lib/twilio-ruby/rest/video/v1/room/participant.rb +3 -16
- data/lib/twilio-ruby/rest/video/v1/room.rb +3 -13
- data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +1 -4
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +1 -5
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +2 -10
- data/lib/twilio-ruby/rest.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +12 -9
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +0 -744
@@ -26,7 +26,7 @@ module Twilio
|
|
26
26
|
super(version)
|
27
27
|
# Path Solution
|
28
28
|
@solution = { }
|
29
|
-
@uri = "/Insights/
|
29
|
+
@uri = "/Insights/QualityManagement/Assessments/Comments"
|
30
30
|
|
31
31
|
end
|
32
32
|
##
|
@@ -35,22 +35,18 @@ module Twilio
|
|
35
35
|
# @param [String] category_name The name of the category
|
36
36
|
# @param [String] comment The Assessment comment.
|
37
37
|
# @param [String] segment_id The id of the segment.
|
38
|
-
# @param [String] user_name The name of the user.
|
39
|
-
# @param [String] user_email The email id of the user.
|
40
38
|
# @param [String] agent_id The id of the agent.
|
41
39
|
# @param [Float] offset The offset
|
42
|
-
# @param [String]
|
40
|
+
# @param [String] authorization The Authorization HTTP request header
|
43
41
|
# @return [InsightsAssessmentsCommentInstance] Created InsightsAssessmentsCommentInstance
|
44
42
|
def create(
|
45
43
|
category_id: nil,
|
46
44
|
category_name: nil,
|
47
45
|
comment: nil,
|
48
46
|
segment_id: nil,
|
49
|
-
user_name: nil,
|
50
|
-
user_email: nil,
|
51
47
|
agent_id: nil,
|
52
48
|
offset: nil,
|
53
|
-
|
49
|
+
authorization: :unset
|
54
50
|
)
|
55
51
|
|
56
52
|
data = Twilio::Values.of({
|
@@ -58,13 +54,11 @@ module Twilio
|
|
58
54
|
'CategoryName' => category_name,
|
59
55
|
'Comment' => comment,
|
60
56
|
'SegmentId' => segment_id,
|
61
|
-
'UserName' => user_name,
|
62
|
-
'UserEmail' => user_email,
|
63
57
|
'AgentId' => agent_id,
|
64
58
|
'Offset' => offset,
|
65
59
|
})
|
66
60
|
|
67
|
-
headers = Twilio::Values.of({ '
|
61
|
+
headers = Twilio::Values.of({ 'Authorization' => authorization, })
|
68
62
|
payload = @version.create('POST', @uri, data: data, headers: headers)
|
69
63
|
InsightsAssessmentsCommentInstance.new(
|
70
64
|
@version,
|
@@ -77,7 +71,7 @@ module Twilio
|
|
77
71
|
# Lists InsightsAssessmentsCommentInstance records from the API as a list.
|
78
72
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
79
73
|
# memory before returning.
|
80
|
-
# @param [String]
|
74
|
+
# @param [String] authorization The Authorization HTTP request header
|
81
75
|
# @param [String] segment_id The id of the segment.
|
82
76
|
# @param [String] agent_id The id of the agent.
|
83
77
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
@@ -87,9 +81,9 @@ module Twilio
|
|
87
81
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
88
82
|
# efficient page size, i.e. min(limit, 1000)
|
89
83
|
# @return [Array] Array of up to limit results
|
90
|
-
def list(
|
84
|
+
def list(authorization: :unset, segment_id: :unset, agent_id: :unset, limit: nil, page_size: nil)
|
91
85
|
self.stream(
|
92
|
-
|
86
|
+
authorization: authorization,
|
93
87
|
segment_id: segment_id,
|
94
88
|
agent_id: agent_id,
|
95
89
|
limit: limit,
|
@@ -101,7 +95,7 @@ module Twilio
|
|
101
95
|
# Streams Instance records from the API as an Enumerable.
|
102
96
|
# This operation lazily loads records as efficiently as possible until the limit
|
103
97
|
# is reached.
|
104
|
-
# @param [String]
|
98
|
+
# @param [String] authorization The Authorization HTTP request header
|
105
99
|
# @param [String] segment_id The id of the segment.
|
106
100
|
# @param [String] agent_id The id of the agent.
|
107
101
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
@@ -111,11 +105,11 @@ module Twilio
|
|
111
105
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
112
106
|
# efficient page size, i.e. min(limit, 1000)
|
113
107
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
114
|
-
def stream(
|
108
|
+
def stream(authorization: :unset, segment_id: :unset, agent_id: :unset, limit: nil, page_size: nil)
|
115
109
|
limits = @version.read_limits(limit, page_size)
|
116
110
|
|
117
111
|
page = self.page(
|
118
|
-
|
112
|
+
authorization: authorization,
|
119
113
|
segment_id: segment_id,
|
120
114
|
agent_id: agent_id,
|
121
115
|
page_size: limits[:page_size], )
|
@@ -140,17 +134,17 @@ module Twilio
|
|
140
134
|
##
|
141
135
|
# Retrieve a single page of InsightsAssessmentsCommentInstance records from the API.
|
142
136
|
# Request is executed immediately.
|
143
|
-
# @param [String]
|
137
|
+
# @param [String] authorization The Authorization HTTP request header
|
144
138
|
# @param [String] segment_id The id of the segment.
|
145
139
|
# @param [String] agent_id The id of the agent.
|
146
140
|
# @param [String] page_token PageToken provided by the API
|
147
141
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
148
142
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
149
143
|
# @return [Page] Page of InsightsAssessmentsCommentInstance
|
150
|
-
def page(
|
144
|
+
def page(authorization: :unset, segment_id: :unset, agent_id: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
151
145
|
params = Twilio::Values.of({
|
152
146
|
|
153
|
-
'
|
147
|
+
'Authorization' => authorization,
|
154
148
|
|
155
149
|
'SegmentId' => segment_id,
|
156
150
|
|
@@ -231,7 +225,7 @@ module Twilio
|
|
231
225
|
# Marshaled Properties
|
232
226
|
@properties = {
|
233
227
|
'account_sid' => payload['account_sid'],
|
234
|
-
'
|
228
|
+
'assessment_sid' => payload['assessment_sid'],
|
235
229
|
'comment' => payload['comment'],
|
236
230
|
'offset' => payload['offset'],
|
237
231
|
'report' => payload['report'],
|
@@ -253,9 +247,9 @@ module Twilio
|
|
253
247
|
end
|
254
248
|
|
255
249
|
##
|
256
|
-
# @return [String] The
|
257
|
-
def
|
258
|
-
@properties['
|
250
|
+
# @return [String] The SID of the assessment.
|
251
|
+
def assessment_sid
|
252
|
+
@properties['assessment_sid']
|
259
253
|
end
|
260
254
|
|
261
255
|
##
|
@@ -34,7 +34,7 @@ module Twilio
|
|
34
34
|
# Lists InsightsConversationsInstance records from the API as a list.
|
35
35
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
36
36
|
# memory before returning.
|
37
|
-
# @param [String]
|
37
|
+
# @param [String] authorization The Authorization HTTP request header
|
38
38
|
# @param [String] segment_id Unique Id of the segment for which conversation details needs to be fetched
|
39
39
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
40
40
|
# guarantees to never return more than limit. Default is no limit
|
@@ -43,9 +43,9 @@ module Twilio
|
|
43
43
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
44
44
|
# efficient page size, i.e. min(limit, 1000)
|
45
45
|
# @return [Array] Array of up to limit results
|
46
|
-
def list(
|
46
|
+
def list(authorization: :unset, segment_id: :unset, limit: nil, page_size: nil)
|
47
47
|
self.stream(
|
48
|
-
|
48
|
+
authorization: authorization,
|
49
49
|
segment_id: segment_id,
|
50
50
|
limit: limit,
|
51
51
|
page_size: page_size
|
@@ -56,7 +56,7 @@ module Twilio
|
|
56
56
|
# Streams Instance records from the API as an Enumerable.
|
57
57
|
# This operation lazily loads records as efficiently as possible until the limit
|
58
58
|
# is reached.
|
59
|
-
# @param [String]
|
59
|
+
# @param [String] authorization The Authorization HTTP request header
|
60
60
|
# @param [String] segment_id Unique Id of the segment for which conversation details needs to be fetched
|
61
61
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
62
62
|
# guarantees to never return more than limit. Default is no limit
|
@@ -65,11 +65,11 @@ module Twilio
|
|
65
65
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
66
66
|
# efficient page size, i.e. min(limit, 1000)
|
67
67
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
68
|
-
def stream(
|
68
|
+
def stream(authorization: :unset, segment_id: :unset, limit: nil, page_size: nil)
|
69
69
|
limits = @version.read_limits(limit, page_size)
|
70
70
|
|
71
71
|
page = self.page(
|
72
|
-
|
72
|
+
authorization: authorization,
|
73
73
|
segment_id: segment_id,
|
74
74
|
page_size: limits[:page_size], )
|
75
75
|
|
@@ -93,16 +93,16 @@ module Twilio
|
|
93
93
|
##
|
94
94
|
# Retrieve a single page of InsightsConversationsInstance records from the API.
|
95
95
|
# Request is executed immediately.
|
96
|
-
# @param [String]
|
96
|
+
# @param [String] authorization The Authorization HTTP request header
|
97
97
|
# @param [String] segment_id Unique Id of the segment for which conversation details needs to be fetched
|
98
98
|
# @param [String] page_token PageToken provided by the API
|
99
99
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
100
100
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
101
101
|
# @return [Page] Page of InsightsConversationsInstance
|
102
|
-
def page(
|
102
|
+
def page(authorization: :unset, segment_id: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
103
103
|
params = Twilio::Values.of({
|
104
104
|
|
105
|
-
'
|
105
|
+
'Authorization' => authorization,
|
106
106
|
|
107
107
|
'SegmentId' => segment_id,
|
108
108
|
|
@@ -26,7 +26,7 @@ module Twilio
|
|
26
26
|
super(version)
|
27
27
|
# Path Solution
|
28
28
|
@solution = { }
|
29
|
-
@uri = "/Insights/
|
29
|
+
@uri = "/Insights/QualityManagement/Questionnaires"
|
30
30
|
|
31
31
|
end
|
32
32
|
##
|
@@ -34,25 +34,25 @@ module Twilio
|
|
34
34
|
# @param [String] name The name of this questionnaire
|
35
35
|
# @param [String] description The description of this questionnaire
|
36
36
|
# @param [Boolean] active The flag to enable or disable questionnaire
|
37
|
-
# @param [Array[String]]
|
38
|
-
# @param [String]
|
37
|
+
# @param [Array[String]] question_sids The list of questions sids under a questionnaire
|
38
|
+
# @param [String] authorization The Authorization HTTP request header
|
39
39
|
# @return [InsightsQuestionnairesInstance] Created InsightsQuestionnairesInstance
|
40
40
|
def create(
|
41
41
|
name: nil,
|
42
42
|
description: :unset,
|
43
43
|
active: :unset,
|
44
|
-
|
45
|
-
|
44
|
+
question_sids: :unset,
|
45
|
+
authorization: :unset
|
46
46
|
)
|
47
47
|
|
48
48
|
data = Twilio::Values.of({
|
49
49
|
'Name' => name,
|
50
50
|
'Description' => description,
|
51
51
|
'Active' => active,
|
52
|
-
'
|
52
|
+
'QuestionSids' => Twilio.serialize_list(question_sids) { |e| e },
|
53
53
|
})
|
54
54
|
|
55
|
-
headers = Twilio::Values.of({ '
|
55
|
+
headers = Twilio::Values.of({ 'Authorization' => authorization, })
|
56
56
|
payload = @version.create('POST', @uri, data: data, headers: headers)
|
57
57
|
InsightsQuestionnairesInstance.new(
|
58
58
|
@version,
|
@@ -65,7 +65,7 @@ module Twilio
|
|
65
65
|
# Lists InsightsQuestionnairesInstance records from the API as a list.
|
66
66
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
67
67
|
# memory before returning.
|
68
|
-
# @param [String]
|
68
|
+
# @param [String] authorization The Authorization HTTP request header
|
69
69
|
# @param [Boolean] include_inactive Flag indicating whether to include inactive questionnaires or not
|
70
70
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
71
71
|
# guarantees to never return more than limit. Default is no limit
|
@@ -74,9 +74,9 @@ module Twilio
|
|
74
74
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
75
75
|
# efficient page size, i.e. min(limit, 1000)
|
76
76
|
# @return [Array] Array of up to limit results
|
77
|
-
def list(
|
77
|
+
def list(authorization: :unset, include_inactive: :unset, limit: nil, page_size: nil)
|
78
78
|
self.stream(
|
79
|
-
|
79
|
+
authorization: authorization,
|
80
80
|
include_inactive: include_inactive,
|
81
81
|
limit: limit,
|
82
82
|
page_size: page_size
|
@@ -87,7 +87,7 @@ module Twilio
|
|
87
87
|
# Streams Instance records from the API as an Enumerable.
|
88
88
|
# This operation lazily loads records as efficiently as possible until the limit
|
89
89
|
# is reached.
|
90
|
-
# @param [String]
|
90
|
+
# @param [String] authorization The Authorization HTTP request header
|
91
91
|
# @param [Boolean] include_inactive Flag indicating whether to include inactive questionnaires or not
|
92
92
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
93
93
|
# guarantees to never return more than limit. Default is no limit
|
@@ -96,11 +96,11 @@ module Twilio
|
|
96
96
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
97
97
|
# efficient page size, i.e. min(limit, 1000)
|
98
98
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
99
|
-
def stream(
|
99
|
+
def stream(authorization: :unset, include_inactive: :unset, limit: nil, page_size: nil)
|
100
100
|
limits = @version.read_limits(limit, page_size)
|
101
101
|
|
102
102
|
page = self.page(
|
103
|
-
|
103
|
+
authorization: authorization,
|
104
104
|
include_inactive: include_inactive,
|
105
105
|
page_size: limits[:page_size], )
|
106
106
|
|
@@ -124,16 +124,16 @@ module Twilio
|
|
124
124
|
##
|
125
125
|
# Retrieve a single page of InsightsQuestionnairesInstance records from the API.
|
126
126
|
# Request is executed immediately.
|
127
|
-
# @param [String]
|
127
|
+
# @param [String] authorization The Authorization HTTP request header
|
128
128
|
# @param [Boolean] include_inactive Flag indicating whether to include inactive questionnaires or not
|
129
129
|
# @param [String] page_token PageToken provided by the API
|
130
130
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
131
131
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
132
132
|
# @return [Page] Page of InsightsQuestionnairesInstance
|
133
|
-
def page(
|
133
|
+
def page(authorization: :unset, include_inactive: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
134
134
|
params = Twilio::Values.of({
|
135
135
|
|
136
|
-
'
|
136
|
+
'Authorization' => authorization,
|
137
137
|
|
138
138
|
'IncludeInactive' => include_inactive,
|
139
139
|
|
@@ -175,43 +175,43 @@ module Twilio
|
|
175
175
|
##
|
176
176
|
# Initialize the InsightsQuestionnairesContext
|
177
177
|
# @param [Version] version Version that contains the resource
|
178
|
-
# @param [String]
|
178
|
+
# @param [String] questionnaire_sid The SID of the questionnaire
|
179
179
|
# @return [InsightsQuestionnairesContext] InsightsQuestionnairesContext
|
180
|
-
def initialize(version,
|
180
|
+
def initialize(version, questionnaire_sid)
|
181
181
|
super(version)
|
182
182
|
|
183
183
|
# Path Solution
|
184
|
-
@solution = {
|
185
|
-
@uri = "/Insights/
|
184
|
+
@solution = { questionnaire_sid: questionnaire_sid, }
|
185
|
+
@uri = "/Insights/QualityManagement/Questionnaires/#{@solution[:questionnaire_sid]}"
|
186
186
|
|
187
187
|
|
188
188
|
end
|
189
189
|
##
|
190
190
|
# Delete the InsightsQuestionnairesInstance
|
191
|
-
# @param [String]
|
191
|
+
# @param [String] authorization The Authorization HTTP request header
|
192
192
|
# @return [Boolean] True if delete succeeds, false otherwise
|
193
193
|
def delete(
|
194
|
-
|
194
|
+
authorization: :unset
|
195
195
|
)
|
196
196
|
|
197
|
-
headers = Twilio::Values.of({ '
|
197
|
+
headers = Twilio::Values.of({ 'Authorization' => authorization, })
|
198
198
|
@version.delete('DELETE', @uri, headers: headers)
|
199
199
|
end
|
200
200
|
|
201
201
|
##
|
202
202
|
# Fetch the InsightsQuestionnairesInstance
|
203
|
-
# @param [String]
|
203
|
+
# @param [String] authorization The Authorization HTTP request header
|
204
204
|
# @return [InsightsQuestionnairesInstance] Fetched InsightsQuestionnairesInstance
|
205
205
|
def fetch(
|
206
|
-
|
206
|
+
authorization: :unset
|
207
207
|
)
|
208
208
|
|
209
|
-
headers = Twilio::Values.of({ '
|
209
|
+
headers = Twilio::Values.of({ 'Authorization' => authorization, })
|
210
210
|
payload = @version.fetch('GET', @uri, headers: headers)
|
211
211
|
InsightsQuestionnairesInstance.new(
|
212
212
|
@version,
|
213
213
|
payload,
|
214
|
-
|
214
|
+
questionnaire_sid: @solution[:questionnaire_sid],
|
215
215
|
)
|
216
216
|
end
|
217
217
|
|
@@ -220,30 +220,30 @@ module Twilio
|
|
220
220
|
# @param [Boolean] active The flag to enable or disable questionnaire
|
221
221
|
# @param [String] name The name of this questionnaire
|
222
222
|
# @param [String] description The description of this questionnaire
|
223
|
-
# @param [Array[String]]
|
224
|
-
# @param [String]
|
223
|
+
# @param [Array[String]] question_sids The list of questions sids under a questionnaire
|
224
|
+
# @param [String] authorization The Authorization HTTP request header
|
225
225
|
# @return [InsightsQuestionnairesInstance] Updated InsightsQuestionnairesInstance
|
226
226
|
def update(
|
227
227
|
active: nil,
|
228
228
|
name: :unset,
|
229
229
|
description: :unset,
|
230
|
-
|
231
|
-
|
230
|
+
question_sids: :unset,
|
231
|
+
authorization: :unset
|
232
232
|
)
|
233
233
|
|
234
234
|
data = Twilio::Values.of({
|
235
235
|
'Active' => active,
|
236
236
|
'Name' => name,
|
237
237
|
'Description' => description,
|
238
|
-
'
|
238
|
+
'QuestionSids' => Twilio.serialize_list(question_sids) { |e| e },
|
239
239
|
})
|
240
240
|
|
241
|
-
headers = Twilio::Values.of({ '
|
241
|
+
headers = Twilio::Values.of({ 'Authorization' => authorization, })
|
242
242
|
payload = @version.update('POST', @uri, data: data, headers: headers)
|
243
243
|
InsightsQuestionnairesInstance.new(
|
244
244
|
@version,
|
245
245
|
payload,
|
246
|
-
|
246
|
+
questionnaire_sid: @solution[:questionnaire_sid],
|
247
247
|
)
|
248
248
|
end
|
249
249
|
|
@@ -301,13 +301,13 @@ module Twilio
|
|
301
301
|
# resource.
|
302
302
|
# @param [String] sid The SID of the Call resource to fetch.
|
303
303
|
# @return [InsightsQuestionnairesInstance] InsightsQuestionnairesInstance
|
304
|
-
def initialize(version, payload ,
|
304
|
+
def initialize(version, payload , questionnaire_sid: nil)
|
305
305
|
super(version)
|
306
306
|
|
307
307
|
# Marshaled Properties
|
308
308
|
@properties = {
|
309
309
|
'account_sid' => payload['account_sid'],
|
310
|
-
'
|
310
|
+
'questionnaire_sid' => payload['questionnaire_sid'],
|
311
311
|
'name' => payload['name'],
|
312
312
|
'description' => payload['description'],
|
313
313
|
'active' => payload['active'],
|
@@ -317,7 +317,7 @@ module Twilio
|
|
317
317
|
|
318
318
|
# Context
|
319
319
|
@instance_context = nil
|
320
|
-
@params = { '
|
320
|
+
@params = { 'questionnaire_sid' => questionnaire_sid || @properties['questionnaire_sid'] , }
|
321
321
|
end
|
322
322
|
|
323
323
|
##
|
@@ -326,7 +326,7 @@ module Twilio
|
|
326
326
|
# @return [InsightsQuestionnairesContext] CallContext for this CallInstance
|
327
327
|
def context
|
328
328
|
unless @instance_context
|
329
|
-
@instance_context = InsightsQuestionnairesContext.new(@version , @params['
|
329
|
+
@instance_context = InsightsQuestionnairesContext.new(@version , @params['questionnaire_sid'])
|
330
330
|
end
|
331
331
|
@instance_context
|
332
332
|
end
|
@@ -338,9 +338,9 @@ module Twilio
|
|
338
338
|
end
|
339
339
|
|
340
340
|
##
|
341
|
-
# @return [String] The
|
342
|
-
def
|
343
|
-
@properties['
|
341
|
+
# @return [String] The sid of this questionnaire
|
342
|
+
def questionnaire_sid
|
343
|
+
@properties['questionnaire_sid']
|
344
344
|
end
|
345
345
|
|
346
346
|
##
|
@@ -375,27 +375,27 @@ module Twilio
|
|
375
375
|
|
376
376
|
##
|
377
377
|
# Delete the InsightsQuestionnairesInstance
|
378
|
-
# @param [String]
|
378
|
+
# @param [String] authorization The Authorization HTTP request header
|
379
379
|
# @return [Boolean] True if delete succeeds, false otherwise
|
380
380
|
def delete(
|
381
|
-
|
381
|
+
authorization: :unset
|
382
382
|
)
|
383
383
|
|
384
384
|
context.delete(
|
385
|
-
|
385
|
+
authorization: authorization,
|
386
386
|
)
|
387
387
|
end
|
388
388
|
|
389
389
|
##
|
390
390
|
# Fetch the InsightsQuestionnairesInstance
|
391
|
-
# @param [String]
|
391
|
+
# @param [String] authorization The Authorization HTTP request header
|
392
392
|
# @return [InsightsQuestionnairesInstance] Fetched InsightsQuestionnairesInstance
|
393
393
|
def fetch(
|
394
|
-
|
394
|
+
authorization: :unset
|
395
395
|
)
|
396
396
|
|
397
397
|
context.fetch(
|
398
|
-
|
398
|
+
authorization: authorization,
|
399
399
|
)
|
400
400
|
end
|
401
401
|
|
@@ -404,23 +404,23 @@ module Twilio
|
|
404
404
|
# @param [Boolean] active The flag to enable or disable questionnaire
|
405
405
|
# @param [String] name The name of this questionnaire
|
406
406
|
# @param [String] description The description of this questionnaire
|
407
|
-
# @param [Array[String]]
|
408
|
-
# @param [String]
|
407
|
+
# @param [Array[String]] question_sids The list of questions sids under a questionnaire
|
408
|
+
# @param [String] authorization The Authorization HTTP request header
|
409
409
|
# @return [InsightsQuestionnairesInstance] Updated InsightsQuestionnairesInstance
|
410
410
|
def update(
|
411
411
|
active: nil,
|
412
412
|
name: :unset,
|
413
413
|
description: :unset,
|
414
|
-
|
415
|
-
|
414
|
+
question_sids: :unset,
|
415
|
+
authorization: :unset
|
416
416
|
)
|
417
417
|
|
418
418
|
context.update(
|
419
419
|
active: active,
|
420
420
|
name: name,
|
421
421
|
description: description,
|
422
|
-
|
423
|
-
|
422
|
+
question_sids: question_sids,
|
423
|
+
authorization: authorization,
|
424
424
|
)
|
425
425
|
end
|
426
426
|
|