twilio-ruby 5.74.4 → 5.75.0
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 +27 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +3 -3
- data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +240 -0
- data/lib/twilio-ruby/rest/content/v1.rb +7 -0
- data/lib/twilio-ruby/rest/content.rb +6 -0
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +88 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +216 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +3 -3
- data/lib/twilio-ruby/rest/flex_api/v1.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api.rb +6 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +4 -4
- data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +226 -0
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +218 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +41 -0
- data/lib/twilio-ruby/rest/messaging.rb +18 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +192 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app.rb +25 -0
- data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +21 -1
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -2
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +11 -6
@@ -29,18 +29,18 @@ module Twilio
|
|
29
29
|
# Create the InsightsQuestionnairesQuestionInstance
|
30
30
|
# @param [String] category_id The ID of the category
|
31
31
|
# @param [String] question The question.
|
32
|
-
# @param [String] description The description for the question.
|
33
32
|
# @param [String] answer_set_id The answer_set for the question.
|
34
33
|
# @param [Boolean] allow_na The flag to enable for disable NA for answer.
|
34
|
+
# @param [String] description The description for the question.
|
35
35
|
# @param [String] token The Token HTTP request header
|
36
36
|
# @return [InsightsQuestionnairesQuestionInstance] Created InsightsQuestionnairesQuestionInstance
|
37
|
-
def create(category_id: nil, question: nil,
|
37
|
+
def create(category_id: nil, question: nil, answer_set_id: nil, allow_na: nil, description: :unset, token: :unset)
|
38
38
|
data = Twilio::Values.of({
|
39
39
|
'CategoryId' => category_id,
|
40
40
|
'Question' => question,
|
41
|
-
'Description' => description,
|
42
41
|
'AnswerSetId' => answer_set_id,
|
43
42
|
'AllowNa' => allow_na,
|
43
|
+
'Description' => description,
|
44
44
|
})
|
45
45
|
headers = Twilio::Values.of({'Token' => token, })
|
46
46
|
|
@@ -20,6 +20,7 @@ module Twilio
|
|
20
20
|
@flex_flow = nil
|
21
21
|
@assessments = nil
|
22
22
|
@insights_assessments_comment = nil
|
23
|
+
@insights_conversations = nil
|
23
24
|
@insights_questionnaires = nil
|
24
25
|
@insights_questionnaires_category = nil
|
25
26
|
@insights_questionnaires_question = nil
|
@@ -89,6 +90,12 @@ module Twilio
|
|
89
90
|
@insights_assessments_comment ||= InsightsAssessmentsCommentList.new self
|
90
91
|
end
|
91
92
|
|
93
|
+
##
|
94
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsConversationsContext]
|
95
|
+
def insights_conversations
|
96
|
+
@insights_conversations ||= InsightsConversationsList.new self
|
97
|
+
end
|
98
|
+
|
92
99
|
##
|
93
100
|
# @param [String] id The unique ID of the questionnaire
|
94
101
|
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesContext] if id was passed.
|
@@ -73,6 +73,12 @@ module Twilio
|
|
73
73
|
self.v1.insights_assessments_comment()
|
74
74
|
end
|
75
75
|
|
76
|
+
##
|
77
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsConversationsInstance]
|
78
|
+
def insights_conversations
|
79
|
+
self.v1.insights_conversations()
|
80
|
+
end
|
81
|
+
|
76
82
|
##
|
77
83
|
# @param [String] id The unique id of this questionnaire
|
78
84
|
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesInstance] if id was passed.
|
@@ -146,7 +146,7 @@ module Twilio
|
|
146
146
|
'domain_name' => payload['domain_name'],
|
147
147
|
'certificate_sid' => payload['certificate_sid'],
|
148
148
|
'url' => payload['url'],
|
149
|
-
'
|
149
|
+
'cert_in_validation' => payload['cert_in_validation'],
|
150
150
|
}
|
151
151
|
|
152
152
|
# Context
|
@@ -208,9 +208,9 @@ module Twilio
|
|
208
208
|
end
|
209
209
|
|
210
210
|
##
|
211
|
-
# @return [
|
212
|
-
def
|
213
|
-
@properties['
|
211
|
+
# @return [Hash] New certificate in process of validation field
|
212
|
+
def cert_in_validation
|
213
|
+
@properties['cert_in_validation']
|
214
214
|
end
|
215
215
|
|
216
216
|
##
|
@@ -0,0 +1,226 @@
|
|
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 Messaging < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
15
|
+
class DomainConfigMessagingServiceList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the DomainConfigMessagingServiceList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [DomainConfigMessagingServiceList] DomainConfigMessagingServiceList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
end
|
26
|
+
|
27
|
+
##
|
28
|
+
# Provide a user friendly representation
|
29
|
+
def to_s
|
30
|
+
'#<Twilio.Messaging.V1.DomainConfigMessagingServiceList>'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
36
|
+
class DomainConfigMessagingServicePage < Page
|
37
|
+
##
|
38
|
+
# Initialize the DomainConfigMessagingServicePage
|
39
|
+
# @param [Version] version Version that contains the resource
|
40
|
+
# @param [Response] response Response from the API
|
41
|
+
# @param [Hash] solution Path solution for the resource
|
42
|
+
# @return [DomainConfigMessagingServicePage] DomainConfigMessagingServicePage
|
43
|
+
def initialize(version, response, solution)
|
44
|
+
super(version, response)
|
45
|
+
|
46
|
+
# Path Solution
|
47
|
+
@solution = solution
|
48
|
+
end
|
49
|
+
|
50
|
+
##
|
51
|
+
# Build an instance of DomainConfigMessagingServiceInstance
|
52
|
+
# @param [Hash] payload Payload response from the API
|
53
|
+
# @return [DomainConfigMessagingServiceInstance] DomainConfigMessagingServiceInstance
|
54
|
+
def get_instance(payload)
|
55
|
+
DomainConfigMessagingServiceInstance.new(@version, payload, )
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# Provide a user friendly representation
|
60
|
+
def to_s
|
61
|
+
'<Twilio.Messaging.V1.DomainConfigMessagingServicePage>'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
67
|
+
class DomainConfigMessagingServiceContext < InstanceContext
|
68
|
+
##
|
69
|
+
# Initialize the DomainConfigMessagingServiceContext
|
70
|
+
# @param [Version] version Version that contains the resource
|
71
|
+
# @param [String] messaging_service_sid Unique string used to identify the
|
72
|
+
# Messaging service that this domain should be associated with.
|
73
|
+
# @return [DomainConfigMessagingServiceContext] DomainConfigMessagingServiceContext
|
74
|
+
def initialize(version, messaging_service_sid)
|
75
|
+
super(version)
|
76
|
+
|
77
|
+
# Path Solution
|
78
|
+
@solution = {messaging_service_sid: messaging_service_sid, }
|
79
|
+
@uri = "/LinkShortening/MessagingService/#{@solution[:messaging_service_sid]}/DomainConfig"
|
80
|
+
end
|
81
|
+
|
82
|
+
##
|
83
|
+
# Fetch the DomainConfigMessagingServiceInstance
|
84
|
+
# @return [DomainConfigMessagingServiceInstance] Fetched DomainConfigMessagingServiceInstance
|
85
|
+
def fetch
|
86
|
+
payload = @version.fetch('GET', @uri)
|
87
|
+
|
88
|
+
DomainConfigMessagingServiceInstance.new(
|
89
|
+
@version,
|
90
|
+
payload,
|
91
|
+
messaging_service_sid: @solution[:messaging_service_sid],
|
92
|
+
)
|
93
|
+
end
|
94
|
+
|
95
|
+
##
|
96
|
+
# Provide a user friendly representation
|
97
|
+
def to_s
|
98
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
99
|
+
"#<Twilio.Messaging.V1.DomainConfigMessagingServiceContext #{context}>"
|
100
|
+
end
|
101
|
+
|
102
|
+
##
|
103
|
+
# Provide a detailed, user friendly representation
|
104
|
+
def inspect
|
105
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
106
|
+
"#<Twilio.Messaging.V1.DomainConfigMessagingServiceContext #{context}>"
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
112
|
+
class DomainConfigMessagingServiceInstance < InstanceResource
|
113
|
+
##
|
114
|
+
# Initialize the DomainConfigMessagingServiceInstance
|
115
|
+
# @param [Version] version Version that contains the resource
|
116
|
+
# @param [Hash] payload payload that contains response from Twilio
|
117
|
+
# @param [String] messaging_service_sid Unique string used to identify the
|
118
|
+
# Messaging service that this domain should be associated with.
|
119
|
+
# @return [DomainConfigMessagingServiceInstance] DomainConfigMessagingServiceInstance
|
120
|
+
def initialize(version, payload, messaging_service_sid: nil)
|
121
|
+
super(version)
|
122
|
+
|
123
|
+
# Marshaled Properties
|
124
|
+
@properties = {
|
125
|
+
'domain_sid' => payload['domain_sid'],
|
126
|
+
'config_sid' => payload['config_sid'],
|
127
|
+
'messaging_service_sid' => payload['messaging_service_sid'],
|
128
|
+
'fallback_url' => payload['fallback_url'],
|
129
|
+
'callback_url' => payload['callback_url'],
|
130
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
131
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
132
|
+
'url' => payload['url'],
|
133
|
+
}
|
134
|
+
|
135
|
+
# Context
|
136
|
+
@instance_context = nil
|
137
|
+
@params = {'messaging_service_sid' => messaging_service_sid || @properties['messaging_service_sid'], }
|
138
|
+
end
|
139
|
+
|
140
|
+
##
|
141
|
+
# Generate an instance context for the instance, the context is capable of
|
142
|
+
# performing various actions. All instance actions are proxied to the context
|
143
|
+
# @return [DomainConfigMessagingServiceContext] DomainConfigMessagingServiceContext for this DomainConfigMessagingServiceInstance
|
144
|
+
def context
|
145
|
+
unless @instance_context
|
146
|
+
@instance_context = DomainConfigMessagingServiceContext.new(
|
147
|
+
@version,
|
148
|
+
@params['messaging_service_sid'],
|
149
|
+
)
|
150
|
+
end
|
151
|
+
@instance_context
|
152
|
+
end
|
153
|
+
|
154
|
+
##
|
155
|
+
# @return [String] The unique string that we created to identify the Domain resource.
|
156
|
+
def domain_sid
|
157
|
+
@properties['domain_sid']
|
158
|
+
end
|
159
|
+
|
160
|
+
##
|
161
|
+
# @return [String] The unique string that we created to identify the Domain config (prefix ZK).
|
162
|
+
def config_sid
|
163
|
+
@properties['config_sid']
|
164
|
+
end
|
165
|
+
|
166
|
+
##
|
167
|
+
# @return [String] The unique string that identifies the messaging service
|
168
|
+
def messaging_service_sid
|
169
|
+
@properties['messaging_service_sid']
|
170
|
+
end
|
171
|
+
|
172
|
+
##
|
173
|
+
# @return [String] We will redirect requests to urls we are unable to identify to this url.
|
174
|
+
def fallback_url
|
175
|
+
@properties['fallback_url']
|
176
|
+
end
|
177
|
+
|
178
|
+
##
|
179
|
+
# @return [String] URL to receive click events to your webhook whenever the recipients click on the shortened links.
|
180
|
+
def callback_url
|
181
|
+
@properties['callback_url']
|
182
|
+
end
|
183
|
+
|
184
|
+
##
|
185
|
+
# @return [Time] Date this Domain Config was created.
|
186
|
+
def date_created
|
187
|
+
@properties['date_created']
|
188
|
+
end
|
189
|
+
|
190
|
+
##
|
191
|
+
# @return [Time] Date that this Domain Config was last updated.
|
192
|
+
def date_updated
|
193
|
+
@properties['date_updated']
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# @return [String] The url
|
198
|
+
def url
|
199
|
+
@properties['url']
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# Fetch the DomainConfigMessagingServiceInstance
|
204
|
+
# @return [DomainConfigMessagingServiceInstance] Fetched DomainConfigMessagingServiceInstance
|
205
|
+
def fetch
|
206
|
+
context.fetch
|
207
|
+
end
|
208
|
+
|
209
|
+
##
|
210
|
+
# Provide a user friendly representation
|
211
|
+
def to_s
|
212
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
213
|
+
"<Twilio.Messaging.V1.DomainConfigMessagingServiceInstance #{values}>"
|
214
|
+
end
|
215
|
+
|
216
|
+
##
|
217
|
+
# Provide a detailed, user friendly representation
|
218
|
+
def inspect
|
219
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
220
|
+
"<Twilio.Messaging.V1.DomainConfigMessagingServiceInstance #{values}>"
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
@@ -0,0 +1,218 @@
|
|
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 Messaging < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
15
|
+
class LinkshorteningMessagingServiceList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the LinkshorteningMessagingServiceList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [LinkshorteningMessagingServiceList] LinkshorteningMessagingServiceList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
end
|
26
|
+
|
27
|
+
##
|
28
|
+
# Provide a user friendly representation
|
29
|
+
def to_s
|
30
|
+
'#<Twilio.Messaging.V1.LinkshorteningMessagingServiceList>'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
36
|
+
class LinkshorteningMessagingServicePage < Page
|
37
|
+
##
|
38
|
+
# Initialize the LinkshorteningMessagingServicePage
|
39
|
+
# @param [Version] version Version that contains the resource
|
40
|
+
# @param [Response] response Response from the API
|
41
|
+
# @param [Hash] solution Path solution for the resource
|
42
|
+
# @return [LinkshorteningMessagingServicePage] LinkshorteningMessagingServicePage
|
43
|
+
def initialize(version, response, solution)
|
44
|
+
super(version, response)
|
45
|
+
|
46
|
+
# Path Solution
|
47
|
+
@solution = solution
|
48
|
+
end
|
49
|
+
|
50
|
+
##
|
51
|
+
# Build an instance of LinkshorteningMessagingServiceInstance
|
52
|
+
# @param [Hash] payload Payload response from the API
|
53
|
+
# @return [LinkshorteningMessagingServiceInstance] LinkshorteningMessagingServiceInstance
|
54
|
+
def get_instance(payload)
|
55
|
+
LinkshorteningMessagingServiceInstance.new(@version, payload, )
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# Provide a user friendly representation
|
60
|
+
def to_s
|
61
|
+
'<Twilio.Messaging.V1.LinkshorteningMessagingServicePage>'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
67
|
+
class LinkshorteningMessagingServiceContext < InstanceContext
|
68
|
+
##
|
69
|
+
# Initialize the LinkshorteningMessagingServiceContext
|
70
|
+
# @param [Version] version Version that contains the resource
|
71
|
+
# @param [String] domain_sid The domain SID to dissociate from a messaging
|
72
|
+
# service. With URL shortening enabled, links in messages sent with the associated
|
73
|
+
# messaging service will be shortened to the provided domain
|
74
|
+
# @param [String] messaging_service_sid A messaging service SID to dissociate from
|
75
|
+
# a domain. With URL shortening enabled, links in messages sent with the provided
|
76
|
+
# messaging service will be shortened to the associated domain
|
77
|
+
# @return [LinkshorteningMessagingServiceContext] LinkshorteningMessagingServiceContext
|
78
|
+
def initialize(version, domain_sid, messaging_service_sid)
|
79
|
+
super(version)
|
80
|
+
|
81
|
+
# Path Solution
|
82
|
+
@solution = {domain_sid: domain_sid, messaging_service_sid: messaging_service_sid, }
|
83
|
+
@uri = "/LinkShortening/Domains/#{@solution[:domain_sid]}/MessagingServices/#{@solution[:messaging_service_sid]}"
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Create the LinkshorteningMessagingServiceInstance
|
88
|
+
# @return [LinkshorteningMessagingServiceInstance] Created LinkshorteningMessagingServiceInstance
|
89
|
+
def create
|
90
|
+
payload = @version.create('POST', @uri)
|
91
|
+
|
92
|
+
LinkshorteningMessagingServiceInstance.new(
|
93
|
+
@version,
|
94
|
+
payload,
|
95
|
+
domain_sid: @solution[:domain_sid],
|
96
|
+
messaging_service_sid: @solution[:messaging_service_sid],
|
97
|
+
)
|
98
|
+
end
|
99
|
+
|
100
|
+
##
|
101
|
+
# Delete the LinkshorteningMessagingServiceInstance
|
102
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
103
|
+
def delete
|
104
|
+
@version.delete('DELETE', @uri)
|
105
|
+
end
|
106
|
+
|
107
|
+
##
|
108
|
+
# Provide a user friendly representation
|
109
|
+
def to_s
|
110
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
111
|
+
"#<Twilio.Messaging.V1.LinkshorteningMessagingServiceContext #{context}>"
|
112
|
+
end
|
113
|
+
|
114
|
+
##
|
115
|
+
# Provide a detailed, user friendly representation
|
116
|
+
def inspect
|
117
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
118
|
+
"#<Twilio.Messaging.V1.LinkshorteningMessagingServiceContext #{context}>"
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
##
|
123
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
124
|
+
class LinkshorteningMessagingServiceInstance < InstanceResource
|
125
|
+
##
|
126
|
+
# Initialize the LinkshorteningMessagingServiceInstance
|
127
|
+
# @param [Version] version Version that contains the resource
|
128
|
+
# @param [Hash] payload payload that contains response from Twilio
|
129
|
+
# @param [String] domain_sid The domain SID to dissociate from a messaging
|
130
|
+
# service. With URL shortening enabled, links in messages sent with the associated
|
131
|
+
# messaging service will be shortened to the provided domain
|
132
|
+
# @param [String] messaging_service_sid A messaging service SID to dissociate from
|
133
|
+
# a domain. With URL shortening enabled, links in messages sent with the provided
|
134
|
+
# messaging service will be shortened to the associated domain
|
135
|
+
# @return [LinkshorteningMessagingServiceInstance] LinkshorteningMessagingServiceInstance
|
136
|
+
def initialize(version, payload, domain_sid: nil, messaging_service_sid: nil)
|
137
|
+
super(version)
|
138
|
+
|
139
|
+
# Marshaled Properties
|
140
|
+
@properties = {
|
141
|
+
'domain_sid' => payload['domain_sid'],
|
142
|
+
'messaging_service_sid' => payload['messaging_service_sid'],
|
143
|
+
'url' => payload['url'],
|
144
|
+
}
|
145
|
+
|
146
|
+
# Context
|
147
|
+
@instance_context = nil
|
148
|
+
@params = {
|
149
|
+
'domain_sid' => domain_sid || @properties['domain_sid'],
|
150
|
+
'messaging_service_sid' => messaging_service_sid || @properties['messaging_service_sid'],
|
151
|
+
}
|
152
|
+
end
|
153
|
+
|
154
|
+
##
|
155
|
+
# Generate an instance context for the instance, the context is capable of
|
156
|
+
# performing various actions. All instance actions are proxied to the context
|
157
|
+
# @return [LinkshorteningMessagingServiceContext] LinkshorteningMessagingServiceContext for this LinkshorteningMessagingServiceInstance
|
158
|
+
def context
|
159
|
+
unless @instance_context
|
160
|
+
@instance_context = LinkshorteningMessagingServiceContext.new(
|
161
|
+
@version,
|
162
|
+
@params['domain_sid'],
|
163
|
+
@params['messaging_service_sid'],
|
164
|
+
)
|
165
|
+
end
|
166
|
+
@instance_context
|
167
|
+
end
|
168
|
+
|
169
|
+
##
|
170
|
+
# @return [String] The unique string that identifies the domain resource
|
171
|
+
def domain_sid
|
172
|
+
@properties['domain_sid']
|
173
|
+
end
|
174
|
+
|
175
|
+
##
|
176
|
+
# @return [String] The unique string that identifies the messaging service
|
177
|
+
def messaging_service_sid
|
178
|
+
@properties['messaging_service_sid']
|
179
|
+
end
|
180
|
+
|
181
|
+
##
|
182
|
+
# @return [String] The url
|
183
|
+
def url
|
184
|
+
@properties['url']
|
185
|
+
end
|
186
|
+
|
187
|
+
##
|
188
|
+
# Create the LinkshorteningMessagingServiceInstance
|
189
|
+
# @return [LinkshorteningMessagingServiceInstance] Created LinkshorteningMessagingServiceInstance
|
190
|
+
def create
|
191
|
+
context.create
|
192
|
+
end
|
193
|
+
|
194
|
+
##
|
195
|
+
# Delete the LinkshorteningMessagingServiceInstance
|
196
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
197
|
+
def delete
|
198
|
+
context.delete
|
199
|
+
end
|
200
|
+
|
201
|
+
##
|
202
|
+
# Provide a user friendly representation
|
203
|
+
def to_s
|
204
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
205
|
+
"<Twilio.Messaging.V1.LinkshorteningMessagingServiceInstance #{values}>"
|
206
|
+
end
|
207
|
+
|
208
|
+
##
|
209
|
+
# Provide a detailed, user friendly representation
|
210
|
+
def inspect
|
211
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
212
|
+
"<Twilio.Messaging.V1.LinkshorteningMessagingServiceInstance #{values}>"
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
@@ -19,7 +19,9 @@ module Twilio
|
|
19
19
|
@deactivations = nil
|
20
20
|
@domain_certs = nil
|
21
21
|
@domain_config = nil
|
22
|
+
@domain_config_messaging_service = nil
|
22
23
|
@external_campaign = nil
|
24
|
+
@linkshortening_messaging_service = nil
|
23
25
|
@services = nil
|
24
26
|
@tollfree_verifications = nil
|
25
27
|
@usecases = nil
|
@@ -78,12 +80,51 @@ module Twilio
|
|
78
80
|
end
|
79
81
|
end
|
80
82
|
|
83
|
+
##
|
84
|
+
# @param [String] messaging_service_sid Unique string used to identify the
|
85
|
+
# Messaging service that this domain should be associated with.
|
86
|
+
# @return [Twilio::REST::Messaging::V1::DomainConfigMessagingServiceContext] if messaging_service_sid was passed.
|
87
|
+
# @return [Twilio::REST::Messaging::V1::DomainConfigMessagingServiceList]
|
88
|
+
def domain_config_messaging_service(messaging_service_sid=:unset)
|
89
|
+
if messaging_service_sid.nil?
|
90
|
+
raise ArgumentError, 'messaging_service_sid cannot be nil'
|
91
|
+
end
|
92
|
+
if messaging_service_sid == :unset
|
93
|
+
@domain_config_messaging_service ||= DomainConfigMessagingServiceList.new self
|
94
|
+
else
|
95
|
+
DomainConfigMessagingServiceContext.new(self, messaging_service_sid)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
81
99
|
##
|
82
100
|
# @return [Twilio::REST::Messaging::V1::ExternalCampaignContext]
|
83
101
|
def external_campaign
|
84
102
|
@external_campaign ||= ExternalCampaignList.new self
|
85
103
|
end
|
86
104
|
|
105
|
+
##
|
106
|
+
# @param [String] domain_sid The domain SID to dissociate from a messaging
|
107
|
+
# service. With URL shortening enabled, links in messages sent with the associated
|
108
|
+
# messaging service will be shortened to the provided domain
|
109
|
+
# @param [String] messaging_service_sid A messaging service SID to dissociate from
|
110
|
+
# a domain. With URL shortening enabled, links in messages sent with the provided
|
111
|
+
# messaging service will be shortened to the associated domain
|
112
|
+
# @return [Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceContext] if messaging_service_sid was passed.
|
113
|
+
# @return [Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceList]
|
114
|
+
def linkshortening_messaging_service(domain_sid=:unset, messaging_service_sid=:unset)
|
115
|
+
if domain_sid.nil?
|
116
|
+
raise ArgumentError, 'domain_sid cannot be nil'
|
117
|
+
end
|
118
|
+
if messaging_service_sid.nil?
|
119
|
+
raise ArgumentError, 'messaging_service_sid cannot be nil'
|
120
|
+
end
|
121
|
+
if domain_sid == :unset && messaging_service_sid == :unset
|
122
|
+
@linkshortening_messaging_service ||= LinkshorteningMessagingServiceList.new self
|
123
|
+
else
|
124
|
+
LinkshorteningMessagingServiceContext.new(self, domain_sid, messaging_service_sid)
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
87
128
|
##
|
88
129
|
# @param [String] sid The SID of the Service resource to fetch.
|
89
130
|
# @return [Twilio::REST::Messaging::V1::ServiceContext] if sid was passed.
|
@@ -60,12 +60,30 @@ module Twilio
|
|
60
60
|
self.v1.domain_config(domain_sid)
|
61
61
|
end
|
62
62
|
|
63
|
+
##
|
64
|
+
# @param [String] messaging_service_sid The unique string that identifies the
|
65
|
+
# messaging service
|
66
|
+
# @return [Twilio::REST::Messaging::V1::DomainConfigMessagingServiceInstance] if messaging_service_sid was passed.
|
67
|
+
# @return [Twilio::REST::Messaging::V1::DomainConfigMessagingServiceList]
|
68
|
+
def domain_config_messaging_service(messaging_service_sid=:unset)
|
69
|
+
self.v1.domain_config_messaging_service(messaging_service_sid)
|
70
|
+
end
|
71
|
+
|
63
72
|
##
|
64
73
|
# @return [Twilio::REST::Messaging::V1::ExternalCampaignInstance]
|
65
74
|
def external_campaign
|
66
75
|
self.v1.external_campaign()
|
67
76
|
end
|
68
77
|
|
78
|
+
##
|
79
|
+
# @param [String] messaging_service_sid The unique string that identifies the
|
80
|
+
# messaging service
|
81
|
+
# @return [Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceInstance] if messaging_service_sid was passed.
|
82
|
+
# @return [Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceList]
|
83
|
+
def linkshortening_messaging_service(domain_sid=:unset, messaging_service_sid=:unset)
|
84
|
+
self.v1.linkshortening_messaging_service(domain_sid, messaging_service_sid)
|
85
|
+
end
|
86
|
+
|
69
87
|
##
|
70
88
|
# @param [String] sid The unique string that we created to identify the Service
|
71
89
|
# resource.
|