twilio-ruby 5.74.0 → 5.74.2
Sign up to get free protection for your applications and to get access to all the features.
- 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,130 @@
|
|
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 InsightsSettingsCommentList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the InsightsSettingsCommentList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [InsightsSettingsCommentList] InsightsSettingsCommentList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/Insights/QM/Settings/CommentTags"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Fetch the InsightsSettingsCommentInstance
|
30
|
+
# @param [String] token The Token HTTP request header
|
31
|
+
# @return [InsightsSettingsCommentInstance] Fetched InsightsSettingsCommentInstance
|
32
|
+
def fetch(token: :unset)
|
33
|
+
headers = Twilio::Values.of({'Token' => token, })
|
34
|
+
|
35
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
36
|
+
|
37
|
+
InsightsSettingsCommentInstance.new(@version, payload, )
|
38
|
+
end
|
39
|
+
|
40
|
+
##
|
41
|
+
# Provide a user friendly representation
|
42
|
+
def to_s
|
43
|
+
'#<Twilio.FlexApi.V1.InsightsSettingsCommentList>'
|
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 InsightsSettingsCommentPage < Page
|
50
|
+
##
|
51
|
+
# Initialize the InsightsSettingsCommentPage
|
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 [InsightsSettingsCommentPage] InsightsSettingsCommentPage
|
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 InsightsSettingsCommentInstance
|
65
|
+
# @param [Hash] payload Payload response from the API
|
66
|
+
# @return [InsightsSettingsCommentInstance] InsightsSettingsCommentInstance
|
67
|
+
def get_instance(payload)
|
68
|
+
InsightsSettingsCommentInstance.new(@version, payload, )
|
69
|
+
end
|
70
|
+
|
71
|
+
##
|
72
|
+
# Provide a user friendly representation
|
73
|
+
def to_s
|
74
|
+
'<Twilio.FlexApi.V1.InsightsSettingsCommentPage>'
|
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 InsightsSettingsCommentInstance < InstanceResource
|
81
|
+
##
|
82
|
+
# Initialize the InsightsSettingsCommentInstance
|
83
|
+
# @param [Version] version Version that contains the resource
|
84
|
+
# @param [Hash] payload payload that contains response from Twilio
|
85
|
+
# @return [InsightsSettingsCommentInstance] InsightsSettingsCommentInstance
|
86
|
+
def initialize(version, payload)
|
87
|
+
super(version)
|
88
|
+
|
89
|
+
# Marshaled Properties
|
90
|
+
@properties = {
|
91
|
+
'account_sid' => payload['account_sid'],
|
92
|
+
'comments' => payload['comments'],
|
93
|
+
'url' => payload['url'],
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
97
|
+
##
|
98
|
+
# @return [String] The SID of the Account that created the resource and owns this Flex Insights
|
99
|
+
def account_sid
|
100
|
+
@properties['account_sid']
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# @return [Hash] The comments
|
105
|
+
def comments
|
106
|
+
@properties['comments']
|
107
|
+
end
|
108
|
+
|
109
|
+
##
|
110
|
+
# @return [String] The url
|
111
|
+
def url
|
112
|
+
@properties['url']
|
113
|
+
end
|
114
|
+
|
115
|
+
##
|
116
|
+
# Provide a user friendly representation
|
117
|
+
def to_s
|
118
|
+
"<Twilio.FlexApi.V1.InsightsSettingsCommentInstance>"
|
119
|
+
end
|
120
|
+
|
121
|
+
##
|
122
|
+
# Provide a detailed, user friendly representation
|
123
|
+
def inspect
|
124
|
+
"<Twilio.FlexApi.V1.InsightsSettingsCommentInstance>"
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
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 InsightsUserRolesList < ListResource
|
14
14
|
##
|
15
|
-
# Initialize the
|
15
|
+
# Initialize the InsightsUserRolesList
|
16
16
|
# @param [Version] version Version that contains the resource
|
17
|
-
# @return [
|
17
|
+
# @return [InsightsUserRolesList] InsightsUserRolesList
|
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.InsightsUserRolesList>'
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
class
|
32
|
+
class InsightsUserRolesPage < Page
|
33
33
|
##
|
34
|
-
# Initialize the
|
34
|
+
# Initialize the InsightsUserRolesPage
|
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 [InsightsUserRolesPage] InsightsUserRolesPage
|
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 InsightsUserRolesInstance
|
48
48
|
# @param [Hash] payload Payload response from the API
|
49
|
-
# @return [
|
49
|
+
# @return [InsightsUserRolesInstance] InsightsUserRolesInstance
|
50
50
|
def get_instance(payload)
|
51
|
-
|
51
|
+
InsightsUserRolesInstance.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.InsightsUserRolesPage>'
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
class
|
61
|
+
class InsightsUserRolesContext < InstanceContext
|
62
62
|
##
|
63
|
-
# Initialize the
|
63
|
+
# Initialize the InsightsUserRolesContext
|
64
64
|
# @param [Version] version Version that contains the resource
|
65
|
-
# @return [
|
65
|
+
# @return [InsightsUserRolesContext] InsightsUserRolesContext
|
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
|
-
# Fetch the
|
75
|
+
# Fetch the InsightsUserRolesInstance
|
76
76
|
# @param [String] token The Token HTTP request header
|
77
|
-
# @return [
|
77
|
+
# @return [InsightsUserRolesInstance] Fetched InsightsUserRolesInstance
|
78
78
|
def fetch(token: :unset)
|
79
79
|
headers = Twilio::Values.of({'Token' => token, })
|
80
80
|
|
81
81
|
payload = @version.fetch('GET', @uri, headers: headers)
|
82
82
|
|
83
|
-
|
83
|
+
InsightsUserRolesInstance.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.InsightsUserRolesContext #{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.InsightsUserRolesContext #{context}>"
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
-
class
|
101
|
+
class InsightsUserRolesInstance < InstanceResource
|
102
102
|
##
|
103
|
-
# Initialize the
|
103
|
+
# Initialize the InsightsUserRolesInstance
|
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 [InsightsUserRolesInstance] InsightsUserRolesInstance
|
107
107
|
def initialize(version, payload)
|
108
108
|
super(version)
|
109
109
|
|
@@ -118,10 +118,10 @@ module Twilio
|
|
118
118
|
##
|
119
119
|
# Generate an instance context for the instance, the context is capable of
|
120
120
|
# performing various actions. All instance actions are proxied to the context
|
121
|
-
# @return [
|
121
|
+
# @return [InsightsUserRolesContext] InsightsUserRolesContext for this InsightsUserRolesInstance
|
122
122
|
def context
|
123
123
|
unless @instance_context
|
124
|
-
@instance_context =
|
124
|
+
@instance_context = InsightsUserRolesContext.new(@version, )
|
125
125
|
end
|
126
126
|
@instance_context
|
127
127
|
end
|
@@ -139,9 +139,9 @@ module Twilio
|
|
139
139
|
end
|
140
140
|
|
141
141
|
##
|
142
|
-
# Fetch the
|
142
|
+
# Fetch the InsightsUserRolesInstance
|
143
143
|
# @param [String] token The Token HTTP request header
|
144
|
-
# @return [
|
144
|
+
# @return [InsightsUserRolesInstance] Fetched InsightsUserRolesInstance
|
145
145
|
def fetch(token: :unset)
|
146
146
|
context.fetch(token: token, )
|
147
147
|
end
|
@@ -150,14 +150,14 @@ module Twilio
|
|
150
150
|
# Provide a user friendly representation
|
151
151
|
def to_s
|
152
152
|
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
153
|
-
"<Twilio.FlexApi.V1.
|
153
|
+
"<Twilio.FlexApi.V1.InsightsUserRolesInstance #{values}>"
|
154
154
|
end
|
155
155
|
|
156
156
|
##
|
157
157
|
# Provide a detailed, user friendly representation
|
158
158
|
def inspect
|
159
159
|
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
160
|
-
"<Twilio.FlexApi.V1.
|
160
|
+
"<Twilio.FlexApi.V1.InsightsUserRolesInstance #{values}>"
|
161
161
|
end
|
162
162
|
end
|
163
163
|
end
|
@@ -15,22 +15,20 @@ module Twilio
|
|
15
15
|
def initialize(domain)
|
16
16
|
super
|
17
17
|
@version = 'v1'
|
18
|
-
@assessments = nil
|
19
18
|
@channel = nil
|
20
19
|
@configuration = nil
|
21
20
|
@flex_flow = nil
|
22
|
-
@
|
21
|
+
@assessments = nil
|
22
|
+
@insights_questionnaires_category = nil
|
23
|
+
@insights_questionnaires_question = nil
|
24
|
+
@insights_session = nil
|
25
|
+
@insights_settings_answer_sets = nil
|
26
|
+
@insights_settings_comment = nil
|
27
|
+
@insights_user_roles = nil
|
23
28
|
@interaction = nil
|
24
|
-
@user_roles = nil
|
25
29
|
@web_channel = nil
|
26
30
|
end
|
27
31
|
|
28
|
-
##
|
29
|
-
# @return [Twilio::REST::Flex_api::V1::AssessmentsContext]
|
30
|
-
def assessments
|
31
|
-
@assessments ||= AssessmentsContext.new self
|
32
|
-
end
|
33
|
-
|
34
32
|
##
|
35
33
|
# @param [String] sid The SID of the Flex chat channel resource to fetch.
|
36
34
|
# @return [Twilio::REST::Flex_api::V1::ChannelContext] if sid was passed.
|
@@ -68,9 +66,63 @@ module Twilio
|
|
68
66
|
end
|
69
67
|
|
70
68
|
##
|
71
|
-
# @return [Twilio::REST::Flex_api::V1::
|
72
|
-
def
|
73
|
-
@
|
69
|
+
# @return [Twilio::REST::Flex_api::V1::AssessmentsContext]
|
70
|
+
def assessments
|
71
|
+
@assessments ||= AssessmentsContext.new self
|
72
|
+
end
|
73
|
+
|
74
|
+
##
|
75
|
+
# @param [String] category_id The ID of the category to be update
|
76
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesCategoryContext] if category_id was passed.
|
77
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesCategoryList]
|
78
|
+
def insights_questionnaires_category(category_id=:unset)
|
79
|
+
if category_id.nil?
|
80
|
+
raise ArgumentError, 'category_id cannot be nil'
|
81
|
+
end
|
82
|
+
if category_id == :unset
|
83
|
+
@insights_questionnaires_category ||= InsightsQuestionnairesCategoryList.new self
|
84
|
+
else
|
85
|
+
InsightsQuestionnairesCategoryContext.new(self, category_id)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
##
|
90
|
+
# @param [String] question_id The unique ID of the question
|
91
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesQuestionContext] if question_id was passed.
|
92
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesQuestionList]
|
93
|
+
def insights_questionnaires_question(question_id=:unset)
|
94
|
+
if question_id.nil?
|
95
|
+
raise ArgumentError, 'question_id cannot be nil'
|
96
|
+
end
|
97
|
+
if question_id == :unset
|
98
|
+
@insights_questionnaires_question ||= InsightsQuestionnairesQuestionList.new self
|
99
|
+
else
|
100
|
+
InsightsQuestionnairesQuestionContext.new(self, question_id)
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
##
|
105
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsSessionContext]
|
106
|
+
def insights_session
|
107
|
+
@insights_session ||= InsightsSessionContext.new self
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsSettingsAnswerSetsContext]
|
112
|
+
def insights_settings_answer_sets
|
113
|
+
@insights_settings_answer_sets ||= InsightsSettingsAnswerSetsList.new self
|
114
|
+
end
|
115
|
+
|
116
|
+
##
|
117
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsSettingsCommentContext]
|
118
|
+
def insights_settings_comment
|
119
|
+
@insights_settings_comment ||= InsightsSettingsCommentList.new self
|
120
|
+
end
|
121
|
+
|
122
|
+
##
|
123
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsUserRolesContext]
|
124
|
+
def insights_user_roles
|
125
|
+
@insights_user_roles ||= InsightsUserRolesContext.new self
|
74
126
|
end
|
75
127
|
|
76
128
|
##
|
@@ -88,12 +140,6 @@ module Twilio
|
|
88
140
|
end
|
89
141
|
end
|
90
142
|
|
91
|
-
##
|
92
|
-
# @return [Twilio::REST::Flex_api::V1::UserRolesContext]
|
93
|
-
def user_roles
|
94
|
-
@user_roles ||= UserRolesContext.new self
|
95
|
-
end
|
96
|
-
|
97
143
|
##
|
98
144
|
# @param [String] sid The SID of the WebChannel resource to fetch.
|
99
145
|
# @return [Twilio::REST::Flex_api::V1::WebChannelContext] if sid was passed.
|
@@ -35,12 +35,6 @@ module Twilio
|
|
35
35
|
@v2 ||= V2.new self
|
36
36
|
end
|
37
37
|
|
38
|
-
##
|
39
|
-
# @return [Twilio::REST::Flex_api::V1::AssessmentsInstance]
|
40
|
-
def assessments
|
41
|
-
self.v1.assessments()
|
42
|
-
end
|
43
|
-
|
44
38
|
##
|
45
39
|
# @param [String] sid The unique string that we created to identify the Channel
|
46
40
|
# resource.
|
@@ -66,9 +60,49 @@ module Twilio
|
|
66
60
|
end
|
67
61
|
|
68
62
|
##
|
69
|
-
# @return [Twilio::REST::Flex_api::V1::
|
70
|
-
def
|
71
|
-
self.v1.
|
63
|
+
# @return [Twilio::REST::Flex_api::V1::AssessmentsInstance]
|
64
|
+
def assessments
|
65
|
+
self.v1.assessments()
|
66
|
+
end
|
67
|
+
|
68
|
+
##
|
69
|
+
# @param [String] category_id The unique ID for the category
|
70
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesCategoryInstance] if category_id was passed.
|
71
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesCategoryList]
|
72
|
+
def insights_questionnaires_category(category_id=:unset)
|
73
|
+
self.v1.insights_questionnaires_category(category_id)
|
74
|
+
end
|
75
|
+
|
76
|
+
##
|
77
|
+
# @param [String] question_id The unique ID of the question
|
78
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesQuestionInstance] if question_id was passed.
|
79
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesQuestionList]
|
80
|
+
def insights_questionnaires_question(question_id=:unset)
|
81
|
+
self.v1.insights_questionnaires_question(question_id)
|
82
|
+
end
|
83
|
+
|
84
|
+
##
|
85
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsSessionInstance]
|
86
|
+
def insights_session
|
87
|
+
self.v1.insights_session()
|
88
|
+
end
|
89
|
+
|
90
|
+
##
|
91
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsSettingsAnswerSetsInstance]
|
92
|
+
def insights_settings_answer_sets
|
93
|
+
self.v1.insights_settings_answer_sets()
|
94
|
+
end
|
95
|
+
|
96
|
+
##
|
97
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsSettingsCommentInstance]
|
98
|
+
def insights_settings_comment
|
99
|
+
self.v1.insights_settings_comment()
|
100
|
+
end
|
101
|
+
|
102
|
+
##
|
103
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsUserRolesInstance]
|
104
|
+
def insights_user_roles
|
105
|
+
self.v1.insights_user_roles()
|
72
106
|
end
|
73
107
|
|
74
108
|
##
|
@@ -80,12 +114,6 @@ module Twilio
|
|
80
114
|
self.v1.interaction(sid)
|
81
115
|
end
|
82
116
|
|
83
|
-
##
|
84
|
-
# @return [Twilio::REST::Flex_api::V1::UserRolesInstance]
|
85
|
-
def user_roles
|
86
|
-
self.v1.user_roles()
|
87
|
-
end
|
88
|
-
|
89
117
|
##
|
90
118
|
# @param [String] sid The unique string that we created to identify the WebChannel
|
91
119
|
# resource.
|
@@ -173,8 +173,10 @@ module Twilio
|
|
173
173
|
# business or organization using the Tollfree number.
|
174
174
|
# @param [String] business_contact_phone The phone number of the contact for the
|
175
175
|
# business or organization using the Tollfree number.
|
176
|
+
# @param [String] external_reference_id An optional external reference ID supplied
|
177
|
+
# by customer and echoed back on status retrieval.
|
176
178
|
# @return [TollfreeVerificationInstance] Created TollfreeVerificationInstance
|
177
|
-
def create(business_name: nil, business_website: nil, notification_email: nil, use_case_categories: nil, use_case_summary: nil, production_message_sample: nil, opt_in_image_urls: nil, opt_in_type: nil, message_volume: nil, tollfree_phone_number_sid: nil, customer_profile_sid: :unset, business_street_address: :unset, business_street_address2: :unset, business_city: :unset, business_state_province_region: :unset, business_postal_code: :unset, business_country: :unset, additional_information: :unset, business_contact_first_name: :unset, business_contact_last_name: :unset, business_contact_email: :unset, business_contact_phone: :unset)
|
179
|
+
def create(business_name: nil, business_website: nil, notification_email: nil, use_case_categories: nil, use_case_summary: nil, production_message_sample: nil, opt_in_image_urls: nil, opt_in_type: nil, message_volume: nil, tollfree_phone_number_sid: nil, customer_profile_sid: :unset, business_street_address: :unset, business_street_address2: :unset, business_city: :unset, business_state_province_region: :unset, business_postal_code: :unset, business_country: :unset, additional_information: :unset, business_contact_first_name: :unset, business_contact_last_name: :unset, business_contact_email: :unset, business_contact_phone: :unset, external_reference_id: :unset)
|
178
180
|
data = Twilio::Values.of({
|
179
181
|
'BusinessName' => business_name,
|
180
182
|
'BusinessWebsite' => business_website,
|
@@ -198,6 +200,7 @@ module Twilio
|
|
198
200
|
'BusinessContactLastName' => business_contact_last_name,
|
199
201
|
'BusinessContactEmail' => business_contact_email,
|
200
202
|
'BusinessContactPhone' => business_contact_phone,
|
203
|
+
'ExternalReferenceId' => external_reference_id,
|
201
204
|
})
|
202
205
|
|
203
206
|
payload = @version.create('POST', @uri, data: data)
|
@@ -268,6 +271,78 @@ module Twilio
|
|
268
271
|
TollfreeVerificationInstance.new(@version, payload, sid: @solution[:sid], )
|
269
272
|
end
|
270
273
|
|
274
|
+
##
|
275
|
+
# Update the TollfreeVerificationInstance
|
276
|
+
# @param [String] business_name The name of the business or organization using the
|
277
|
+
# Tollfree number.
|
278
|
+
# @param [String] business_website The website of the business or organization
|
279
|
+
# using the Tollfree number.
|
280
|
+
# @param [String] notification_email The email address to receive the notification
|
281
|
+
# about the verification result. .
|
282
|
+
# @param [Array[String]] use_case_categories The category of the use case for the
|
283
|
+
# Tollfree Number. List as many are applicable..
|
284
|
+
# @param [String] use_case_summary Use this to further explain how messaging is
|
285
|
+
# used by the business or organization.
|
286
|
+
# @param [String] production_message_sample An example of message content, i.e. a
|
287
|
+
# sample message.
|
288
|
+
# @param [Array[String]] opt_in_image_urls Link to an image that shows the opt-in
|
289
|
+
# workflow. Multiple images allowed and must be a publicly hosted URL.
|
290
|
+
# @param [tollfree_verification.OptInType] opt_in_type Describe how a user opts-in
|
291
|
+
# to text messages.
|
292
|
+
# @param [String] message_volume Estimate monthly volume of messages from the
|
293
|
+
# Tollfree Number.
|
294
|
+
# @param [String] business_street_address The address of the business or
|
295
|
+
# organization using the Tollfree number.
|
296
|
+
# @param [String] business_street_address2 The address of the business or
|
297
|
+
# organization using the Tollfree number.
|
298
|
+
# @param [String] business_city The city of the business or organization using the
|
299
|
+
# Tollfree number.
|
300
|
+
# @param [String] business_state_province_region The state/province/region of the
|
301
|
+
# business or organization using the Tollfree number.
|
302
|
+
# @param [String] business_postal_code The postal code of the business or
|
303
|
+
# organization using the Tollfree number.
|
304
|
+
# @param [String] business_country The country of the business or organization
|
305
|
+
# using the Tollfree number.
|
306
|
+
# @param [String] additional_information Additional information to be provided for
|
307
|
+
# verification.
|
308
|
+
# @param [String] business_contact_first_name The first name of the contact for
|
309
|
+
# the business or organization using the Tollfree number.
|
310
|
+
# @param [String] business_contact_last_name The last name of the contact for the
|
311
|
+
# business or organization using the Tollfree number.
|
312
|
+
# @param [String] business_contact_email The email address of the contact for the
|
313
|
+
# business or organization using the Tollfree number.
|
314
|
+
# @param [String] business_contact_phone The phone number of the contact for the
|
315
|
+
# business or organization using the Tollfree number.
|
316
|
+
# @return [TollfreeVerificationInstance] Updated TollfreeVerificationInstance
|
317
|
+
def update(business_name: :unset, business_website: :unset, notification_email: :unset, use_case_categories: :unset, use_case_summary: :unset, production_message_sample: :unset, opt_in_image_urls: :unset, opt_in_type: :unset, message_volume: :unset, business_street_address: :unset, business_street_address2: :unset, business_city: :unset, business_state_province_region: :unset, business_postal_code: :unset, business_country: :unset, additional_information: :unset, business_contact_first_name: :unset, business_contact_last_name: :unset, business_contact_email: :unset, business_contact_phone: :unset)
|
318
|
+
data = Twilio::Values.of({
|
319
|
+
'BusinessName' => business_name,
|
320
|
+
'BusinessWebsite' => business_website,
|
321
|
+
'NotificationEmail' => notification_email,
|
322
|
+
'UseCaseCategories' => Twilio.serialize_list(use_case_categories) { |e| e },
|
323
|
+
'UseCaseSummary' => use_case_summary,
|
324
|
+
'ProductionMessageSample' => production_message_sample,
|
325
|
+
'OptInImageUrls' => Twilio.serialize_list(opt_in_image_urls) { |e| e },
|
326
|
+
'OptInType' => opt_in_type,
|
327
|
+
'MessageVolume' => message_volume,
|
328
|
+
'BusinessStreetAddress' => business_street_address,
|
329
|
+
'BusinessStreetAddress2' => business_street_address2,
|
330
|
+
'BusinessCity' => business_city,
|
331
|
+
'BusinessStateProvinceRegion' => business_state_province_region,
|
332
|
+
'BusinessPostalCode' => business_postal_code,
|
333
|
+
'BusinessCountry' => business_country,
|
334
|
+
'AdditionalInformation' => additional_information,
|
335
|
+
'BusinessContactFirstName' => business_contact_first_name,
|
336
|
+
'BusinessContactLastName' => business_contact_last_name,
|
337
|
+
'BusinessContactEmail' => business_contact_email,
|
338
|
+
'BusinessContactPhone' => business_contact_phone,
|
339
|
+
})
|
340
|
+
|
341
|
+
payload = @version.update('POST', @uri, data: data)
|
342
|
+
|
343
|
+
TollfreeVerificationInstance.new(@version, payload, sid: @solution[:sid], )
|
344
|
+
end
|
345
|
+
|
271
346
|
##
|
272
347
|
# Provide a user friendly representation
|
273
348
|
def to_s
|
@@ -328,6 +403,7 @@ module Twilio
|
|
328
403
|
'status' => payload['status'],
|
329
404
|
'url' => payload['url'],
|
330
405
|
'resource_links' => payload['resource_links'],
|
406
|
+
'external_reference_id' => payload['external_reference_id'],
|
331
407
|
}
|
332
408
|
|
333
409
|
# Context
|
@@ -532,6 +608,12 @@ module Twilio
|
|
532
608
|
@properties['resource_links']
|
533
609
|
end
|
534
610
|
|
611
|
+
##
|
612
|
+
# @return [String] An optional external reference ID supplied by customer and echoed back on status retrieval
|
613
|
+
def external_reference_id
|
614
|
+
@properties['external_reference_id']
|
615
|
+
end
|
616
|
+
|
535
617
|
##
|
536
618
|
# Fetch the TollfreeVerificationInstance
|
537
619
|
# @return [TollfreeVerificationInstance] Fetched TollfreeVerificationInstance
|
@@ -539,6 +621,74 @@ module Twilio
|
|
539
621
|
context.fetch
|
540
622
|
end
|
541
623
|
|
624
|
+
##
|
625
|
+
# Update the TollfreeVerificationInstance
|
626
|
+
# @param [String] business_name The name of the business or organization using the
|
627
|
+
# Tollfree number.
|
628
|
+
# @param [String] business_website The website of the business or organization
|
629
|
+
# using the Tollfree number.
|
630
|
+
# @param [String] notification_email The email address to receive the notification
|
631
|
+
# about the verification result. .
|
632
|
+
# @param [Array[String]] use_case_categories The category of the use case for the
|
633
|
+
# Tollfree Number. List as many are applicable..
|
634
|
+
# @param [String] use_case_summary Use this to further explain how messaging is
|
635
|
+
# used by the business or organization.
|
636
|
+
# @param [String] production_message_sample An example of message content, i.e. a
|
637
|
+
# sample message.
|
638
|
+
# @param [Array[String]] opt_in_image_urls Link to an image that shows the opt-in
|
639
|
+
# workflow. Multiple images allowed and must be a publicly hosted URL.
|
640
|
+
# @param [tollfree_verification.OptInType] opt_in_type Describe how a user opts-in
|
641
|
+
# to text messages.
|
642
|
+
# @param [String] message_volume Estimate monthly volume of messages from the
|
643
|
+
# Tollfree Number.
|
644
|
+
# @param [String] business_street_address The address of the business or
|
645
|
+
# organization using the Tollfree number.
|
646
|
+
# @param [String] business_street_address2 The address of the business or
|
647
|
+
# organization using the Tollfree number.
|
648
|
+
# @param [String] business_city The city of the business or organization using the
|
649
|
+
# Tollfree number.
|
650
|
+
# @param [String] business_state_province_region The state/province/region of the
|
651
|
+
# business or organization using the Tollfree number.
|
652
|
+
# @param [String] business_postal_code The postal code of the business or
|
653
|
+
# organization using the Tollfree number.
|
654
|
+
# @param [String] business_country The country of the business or organization
|
655
|
+
# using the Tollfree number.
|
656
|
+
# @param [String] additional_information Additional information to be provided for
|
657
|
+
# verification.
|
658
|
+
# @param [String] business_contact_first_name The first name of the contact for
|
659
|
+
# the business or organization using the Tollfree number.
|
660
|
+
# @param [String] business_contact_last_name The last name of the contact for the
|
661
|
+
# business or organization using the Tollfree number.
|
662
|
+
# @param [String] business_contact_email The email address of the contact for the
|
663
|
+
# business or organization using the Tollfree number.
|
664
|
+
# @param [String] business_contact_phone The phone number of the contact for the
|
665
|
+
# business or organization using the Tollfree number.
|
666
|
+
# @return [TollfreeVerificationInstance] Updated TollfreeVerificationInstance
|
667
|
+
def update(business_name: :unset, business_website: :unset, notification_email: :unset, use_case_categories: :unset, use_case_summary: :unset, production_message_sample: :unset, opt_in_image_urls: :unset, opt_in_type: :unset, message_volume: :unset, business_street_address: :unset, business_street_address2: :unset, business_city: :unset, business_state_province_region: :unset, business_postal_code: :unset, business_country: :unset, additional_information: :unset, business_contact_first_name: :unset, business_contact_last_name: :unset, business_contact_email: :unset, business_contact_phone: :unset)
|
668
|
+
context.update(
|
669
|
+
business_name: business_name,
|
670
|
+
business_website: business_website,
|
671
|
+
notification_email: notification_email,
|
672
|
+
use_case_categories: use_case_categories,
|
673
|
+
use_case_summary: use_case_summary,
|
674
|
+
production_message_sample: production_message_sample,
|
675
|
+
opt_in_image_urls: opt_in_image_urls,
|
676
|
+
opt_in_type: opt_in_type,
|
677
|
+
message_volume: message_volume,
|
678
|
+
business_street_address: business_street_address,
|
679
|
+
business_street_address2: business_street_address2,
|
680
|
+
business_city: business_city,
|
681
|
+
business_state_province_region: business_state_province_region,
|
682
|
+
business_postal_code: business_postal_code,
|
683
|
+
business_country: business_country,
|
684
|
+
additional_information: additional_information,
|
685
|
+
business_contact_first_name: business_contact_first_name,
|
686
|
+
business_contact_last_name: business_contact_last_name,
|
687
|
+
business_contact_email: business_contact_email,
|
688
|
+
business_contact_phone: business_contact_phone,
|
689
|
+
)
|
690
|
+
end
|
691
|
+
|
542
692
|
##
|
543
693
|
# Provide a user friendly representation
|
544
694
|
def to_s
|