twilio-ruby 5.34.0 → 5.38.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 +126 -0
- data/README.md +24 -3
- data/lib/twilio-ruby.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +87 -87
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +47 -9
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +71 -71
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +29 -29
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +38 -3
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +12 -12
- data/lib/twilio-ruby/rest/autopilot.rb +6 -0
- data/lib/twilio-ruby/rest/autopilot/v1.rb +7 -0
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -16
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +12 -3
- data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +198 -0
- data/lib/twilio-ruby/rest/client.rb +35 -15
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +28 -3
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +27 -4
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +2 -1
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +6 -3
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +8 -8
- data/lib/twilio-ruby/rest/notify/v1/service.rb +20 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +26 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +324 -0
- data/lib/twilio-ruby/rest/preview.rb +6 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +7 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb +193 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +26 -0
- data/lib/twilio-ruby/rest/{autopilot/v1/assistant/export_assistant.rb → preview/trusted_comms/business/brand.rb} +88 -71
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +266 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +194 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +7 -0
- data/lib/twilio-ruby/rest/supersim.rb +18 -0
- data/lib/twilio-ruby/rest/supersim/v1.rb +30 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +63 -16
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +315 -0
- data/lib/twilio-ruby/rest/{authy/v1/service.rb → supersim/v1/network_access_profile.rb} +95 -121
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +352 -0
- data/lib/twilio-ruby/rest/verify.rb +9 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +16 -0
- data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/form.rb +8 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +74 -3
- data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity.rb +32 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb +141 -0
- data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor.rb +8 -8
- data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor/challenge.rb +8 -8
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +425 -0
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +8 -4
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +8 -4
- data/lib/twilio-ruby/rest/voice.rb +36 -0
- data/lib/twilio-ruby/rest/voice/v1.rb +64 -0
- data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +513 -0
- data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +379 -0
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +458 -0
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +366 -0
- data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +346 -0
- data/lib/twilio-ruby/util/configuration.rb +9 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call_spec.rb +5 -5
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +177 -0
- data/spec/integration/api/v2010/account/conference_spec.rb +42 -14
- data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +8 -14
- data/spec/integration/api/v2010/account/sip/domain_spec.rb +12 -4
- data/spec/integration/api/v2010/account/token_spec.rb +23 -11
- data/spec/integration/api/v2010/account/validation_request_spec.rb +1 -1
- data/spec/integration/autopilot/v1/assistant/query_spec.rb +4 -4
- data/spec/integration/autopilot/v1/assistant_spec.rb +4 -8
- data/spec/integration/autopilot/v1/restore_assistant_spec.rb +53 -0
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +7 -0
- data/spec/integration/conversations/v1/conversation_spec.rb +16 -0
- data/spec/integration/flex_api/v1/configuration_spec.rb +3 -0
- data/spec/integration/numbers/v2/regulatory_compliance/bundle/evaluation_spec.rb +623 -0
- data/spec/integration/numbers/v2/regulatory_compliance/bundle_spec.rb +4 -0
- data/spec/integration/preview/trusted_comms/brands_information_spec.rb +44 -0
- data/spec/integration/preview/trusted_comms/business/brand/branded_channel/channel_spec.rb +54 -0
- data/spec/integration/preview/trusted_comms/business/brand/branded_channel_spec.rb +52 -0
- data/spec/integration/preview/trusted_comms/business/brand_spec.rb +49 -0
- data/spec/integration/preview/trusted_comms/business_spec.rb +1 -0
- data/spec/integration/serverless/v1/service/environment/log_spec.rb +1 -0
- data/spec/integration/supersim/v1/fleet_spec.rb +16 -7
- data/spec/integration/supersim/v1/network_access_profile/network_access_profile_network_spec.rb +179 -0
- data/spec/integration/supersim/v1/network_access_profile_spec.rb +223 -0
- data/spec/integration/supersim/v1/network_spec.rb +139 -0
- data/spec/integration/supersim/v1/sim_spec.rb +78 -6
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +13 -13
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +23 -23
- data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +28 -28
- data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +17 -17
- data/spec/integration/trunking/v1/trunk_spec.rb +33 -33
- data/spec/integration/{authy/v1 → verify/v2}/form_spec.rb +4 -4
- data/spec/integration/verify/v2/service/entity/access_token_spec.rb +46 -0
- data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor/challenge_spec.rb +73 -73
- data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor_spec.rb +54 -54
- data/spec/integration/verify/v2/service/entity_spec.rb +204 -0
- data/spec/integration/verify/v2/service/webhook_spec.rb +262 -0
- data/spec/integration/verify/v2/service_spec.rb +32 -4
- data/spec/integration/voice/v1/byoc_trunk_spec.rb +250 -0
- data/spec/integration/voice/v1/connection_policy/connection_policy_target_spec.rb +246 -0
- data/spec/integration/voice/v1/connection_policy_spec.rb +226 -0
- data/spec/integration/voice/v1/ip_record_spec.rb +223 -0
- data/spec/integration/voice/v1/source_ip_mapping_spec.rb +219 -0
- data/spec/rest/client_spec.rb +168 -58
- data/spec/util/configuration_spec.rb +12 -0
- data/twilio-ruby.gemspec +1 -1
- metadata +63 -23
- data/lib/twilio-ruby/rest/authy.rb +0 -55
- data/lib/twilio-ruby/rest/authy/v1.rb +0 -59
- data/spec/integration/authy/v1/service/entity_spec.rb +0 -201
- data/spec/integration/authy/v1/service_spec.rb +0 -231
- data/spec/integration/autopilot/v1/assistant/export_assistant_spec.rb +0 -49
@@ -0,0 +1,324 @@
|
|
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 Numbers < Domain
|
12
|
+
class V2 < Version
|
13
|
+
class RegulatoryComplianceList < ListResource
|
14
|
+
class BundleContext < InstanceContext
|
15
|
+
class EvaluationList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the EvaluationList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @param [String] bundle_sid The unique string that we created to identify the
|
20
|
+
# Bundle resource.
|
21
|
+
# @return [EvaluationList] EvaluationList
|
22
|
+
def initialize(version, bundle_sid: nil)
|
23
|
+
super(version)
|
24
|
+
|
25
|
+
# Path Solution
|
26
|
+
@solution = {bundle_sid: bundle_sid}
|
27
|
+
@uri = "/RegulatoryCompliance/Bundles/#{@solution[:bundle_sid]}/Evaluations"
|
28
|
+
end
|
29
|
+
|
30
|
+
##
|
31
|
+
# Retrieve a single page of EvaluationInstance records from the API.
|
32
|
+
# Request is executed immediately.
|
33
|
+
# @return [EvaluationInstance] Newly created EvaluationInstance
|
34
|
+
def create
|
35
|
+
data = Twilio::Values.of({})
|
36
|
+
|
37
|
+
payload = @version.create(
|
38
|
+
'POST',
|
39
|
+
@uri,
|
40
|
+
data: data
|
41
|
+
)
|
42
|
+
|
43
|
+
EvaluationInstance.new(@version, payload, bundle_sid: @solution[:bundle_sid], )
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Lists EvaluationInstance records from the API as a list.
|
48
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
49
|
+
# memory before returning.
|
50
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
51
|
+
# guarantees to never return more than limit. Default is no limit
|
52
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
53
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
54
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
55
|
+
# efficient page size, i.e. min(limit, 1000)
|
56
|
+
# @return [Array] Array of up to limit results
|
57
|
+
def list(limit: nil, page_size: nil)
|
58
|
+
self.stream(limit: limit, page_size: page_size).entries
|
59
|
+
end
|
60
|
+
|
61
|
+
##
|
62
|
+
# Streams EvaluationInstance records from the API as an Enumerable.
|
63
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
64
|
+
# is reached.
|
65
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
66
|
+
# guarantees to never return more than limit. Default is no limit.
|
67
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
68
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
69
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
70
|
+
# efficient page size, i.e. min(limit, 1000)
|
71
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
72
|
+
def stream(limit: nil, page_size: nil)
|
73
|
+
limits = @version.read_limits(limit, page_size)
|
74
|
+
|
75
|
+
page = self.page(page_size: limits[:page_size], )
|
76
|
+
|
77
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
78
|
+
end
|
79
|
+
|
80
|
+
##
|
81
|
+
# When passed a block, yields EvaluationInstance records from the API.
|
82
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
83
|
+
# is reached.
|
84
|
+
def each
|
85
|
+
limits = @version.read_limits
|
86
|
+
|
87
|
+
page = self.page(page_size: limits[:page_size], )
|
88
|
+
|
89
|
+
@version.stream(page,
|
90
|
+
limit: limits[:limit],
|
91
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
92
|
+
end
|
93
|
+
|
94
|
+
##
|
95
|
+
# Retrieve a single page of EvaluationInstance records from the API.
|
96
|
+
# Request is executed immediately.
|
97
|
+
# @param [String] page_token PageToken provided by the API
|
98
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
99
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
100
|
+
# @return [Page] Page of EvaluationInstance
|
101
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
102
|
+
params = Twilio::Values.of({
|
103
|
+
'PageToken' => page_token,
|
104
|
+
'Page' => page_number,
|
105
|
+
'PageSize' => page_size,
|
106
|
+
})
|
107
|
+
response = @version.page(
|
108
|
+
'GET',
|
109
|
+
@uri,
|
110
|
+
params
|
111
|
+
)
|
112
|
+
EvaluationPage.new(@version, response, @solution)
|
113
|
+
end
|
114
|
+
|
115
|
+
##
|
116
|
+
# Retrieve a single page of EvaluationInstance records from the API.
|
117
|
+
# Request is executed immediately.
|
118
|
+
# @param [String] target_url API-generated URL for the requested results page
|
119
|
+
# @return [Page] Page of EvaluationInstance
|
120
|
+
def get_page(target_url)
|
121
|
+
response = @version.domain.request(
|
122
|
+
'GET',
|
123
|
+
target_url
|
124
|
+
)
|
125
|
+
EvaluationPage.new(@version, response, @solution)
|
126
|
+
end
|
127
|
+
|
128
|
+
##
|
129
|
+
# Provide a user friendly representation
|
130
|
+
def to_s
|
131
|
+
'#<Twilio.Numbers.V2.EvaluationList>'
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
class EvaluationPage < Page
|
136
|
+
##
|
137
|
+
# Initialize the EvaluationPage
|
138
|
+
# @param [Version] version Version that contains the resource
|
139
|
+
# @param [Response] response Response from the API
|
140
|
+
# @param [Hash] solution Path solution for the resource
|
141
|
+
# @return [EvaluationPage] EvaluationPage
|
142
|
+
def initialize(version, response, solution)
|
143
|
+
super(version, response)
|
144
|
+
|
145
|
+
# Path Solution
|
146
|
+
@solution = solution
|
147
|
+
end
|
148
|
+
|
149
|
+
##
|
150
|
+
# Build an instance of EvaluationInstance
|
151
|
+
# @param [Hash] payload Payload response from the API
|
152
|
+
# @return [EvaluationInstance] EvaluationInstance
|
153
|
+
def get_instance(payload)
|
154
|
+
EvaluationInstance.new(@version, payload, bundle_sid: @solution[:bundle_sid], )
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# Provide a user friendly representation
|
159
|
+
def to_s
|
160
|
+
'<Twilio.Numbers.V2.EvaluationPage>'
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
class EvaluationContext < InstanceContext
|
165
|
+
##
|
166
|
+
# Initialize the EvaluationContext
|
167
|
+
# @param [Version] version Version that contains the resource
|
168
|
+
# @param [String] bundle_sid The unique string that we created to identify the
|
169
|
+
# Bundle resource.
|
170
|
+
# @param [String] sid The unique string that identifies the Evaluation resource.
|
171
|
+
# @return [EvaluationContext] EvaluationContext
|
172
|
+
def initialize(version, bundle_sid, sid)
|
173
|
+
super(version)
|
174
|
+
|
175
|
+
# Path Solution
|
176
|
+
@solution = {bundle_sid: bundle_sid, sid: sid, }
|
177
|
+
@uri = "/RegulatoryCompliance/Bundles/#{@solution[:bundle_sid]}/Evaluations/#{@solution[:sid]}"
|
178
|
+
end
|
179
|
+
|
180
|
+
##
|
181
|
+
# Fetch a EvaluationInstance
|
182
|
+
# @return [EvaluationInstance] Fetched EvaluationInstance
|
183
|
+
def fetch
|
184
|
+
params = Twilio::Values.of({})
|
185
|
+
|
186
|
+
payload = @version.fetch(
|
187
|
+
'GET',
|
188
|
+
@uri,
|
189
|
+
params,
|
190
|
+
)
|
191
|
+
|
192
|
+
EvaluationInstance.new(@version, payload, bundle_sid: @solution[:bundle_sid], sid: @solution[:sid], )
|
193
|
+
end
|
194
|
+
|
195
|
+
##
|
196
|
+
# Provide a user friendly representation
|
197
|
+
def to_s
|
198
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
199
|
+
"#<Twilio.Numbers.V2.EvaluationContext #{context}>"
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# Provide a detailed, user friendly representation
|
204
|
+
def inspect
|
205
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
206
|
+
"#<Twilio.Numbers.V2.EvaluationContext #{context}>"
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
class EvaluationInstance < InstanceResource
|
211
|
+
##
|
212
|
+
# Initialize the EvaluationInstance
|
213
|
+
# @param [Version] version Version that contains the resource
|
214
|
+
# @param [Hash] payload payload that contains response from Twilio
|
215
|
+
# @param [String] bundle_sid The unique string that we created to identify the
|
216
|
+
# Bundle resource.
|
217
|
+
# @param [String] sid The unique string that identifies the Evaluation resource.
|
218
|
+
# @return [EvaluationInstance] EvaluationInstance
|
219
|
+
def initialize(version, payload, bundle_sid: nil, sid: nil)
|
220
|
+
super(version)
|
221
|
+
|
222
|
+
# Marshaled Properties
|
223
|
+
@properties = {
|
224
|
+
'sid' => payload['sid'],
|
225
|
+
'account_sid' => payload['account_sid'],
|
226
|
+
'regulation_sid' => payload['regulation_sid'],
|
227
|
+
'bundle_sid' => payload['bundle_sid'],
|
228
|
+
'status' => payload['status'],
|
229
|
+
'results' => payload['results'],
|
230
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
231
|
+
'url' => payload['url'],
|
232
|
+
}
|
233
|
+
|
234
|
+
# Context
|
235
|
+
@instance_context = nil
|
236
|
+
@params = {'bundle_sid' => bundle_sid, 'sid' => sid || @properties['sid'], }
|
237
|
+
end
|
238
|
+
|
239
|
+
##
|
240
|
+
# Generate an instance context for the instance, the context is capable of
|
241
|
+
# performing various actions. All instance actions are proxied to the context
|
242
|
+
# @return [EvaluationContext] EvaluationContext for this EvaluationInstance
|
243
|
+
def context
|
244
|
+
unless @instance_context
|
245
|
+
@instance_context = EvaluationContext.new(@version, @params['bundle_sid'], @params['sid'], )
|
246
|
+
end
|
247
|
+
@instance_context
|
248
|
+
end
|
249
|
+
|
250
|
+
##
|
251
|
+
# @return [String] The unique string that identifies the Evaluation resource
|
252
|
+
def sid
|
253
|
+
@properties['sid']
|
254
|
+
end
|
255
|
+
|
256
|
+
##
|
257
|
+
# @return [String] The SID of the Account that created the resource
|
258
|
+
def account_sid
|
259
|
+
@properties['account_sid']
|
260
|
+
end
|
261
|
+
|
262
|
+
##
|
263
|
+
# @return [String] The unique string of a regulation
|
264
|
+
def regulation_sid
|
265
|
+
@properties['regulation_sid']
|
266
|
+
end
|
267
|
+
|
268
|
+
##
|
269
|
+
# @return [String] The unique string that identifies the resource
|
270
|
+
def bundle_sid
|
271
|
+
@properties['bundle_sid']
|
272
|
+
end
|
273
|
+
|
274
|
+
##
|
275
|
+
# @return [evaluation.Status] The compliance status of the Evaluation resource
|
276
|
+
def status
|
277
|
+
@properties['status']
|
278
|
+
end
|
279
|
+
|
280
|
+
##
|
281
|
+
# @return [Hash] The results of the Evaluation resource
|
282
|
+
def results
|
283
|
+
@properties['results']
|
284
|
+
end
|
285
|
+
|
286
|
+
##
|
287
|
+
# @return [Time] The date_created
|
288
|
+
def date_created
|
289
|
+
@properties['date_created']
|
290
|
+
end
|
291
|
+
|
292
|
+
##
|
293
|
+
# @return [String] The url
|
294
|
+
def url
|
295
|
+
@properties['url']
|
296
|
+
end
|
297
|
+
|
298
|
+
##
|
299
|
+
# Fetch a EvaluationInstance
|
300
|
+
# @return [EvaluationInstance] Fetched EvaluationInstance
|
301
|
+
def fetch
|
302
|
+
context.fetch
|
303
|
+
end
|
304
|
+
|
305
|
+
##
|
306
|
+
# Provide a user friendly representation
|
307
|
+
def to_s
|
308
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
309
|
+
"<Twilio.Numbers.V2.EvaluationInstance #{values}>"
|
310
|
+
end
|
311
|
+
|
312
|
+
##
|
313
|
+
# Provide a detailed, user friendly representation
|
314
|
+
def inspect
|
315
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
316
|
+
"<Twilio.Numbers.V2.EvaluationInstance #{values}>"
|
317
|
+
end
|
318
|
+
end
|
319
|
+
end
|
320
|
+
end
|
321
|
+
end
|
322
|
+
end
|
323
|
+
end
|
324
|
+
end
|
@@ -186,6 +186,12 @@ module Twilio
|
|
186
186
|
self.trusted_comms.branded_calls()
|
187
187
|
end
|
188
188
|
|
189
|
+
##
|
190
|
+
# @return [Twilio::REST::Preview::TrustedComms::BrandsInformationInstance]
|
191
|
+
def brands_information
|
192
|
+
self.trusted_comms.brands_information()
|
193
|
+
end
|
194
|
+
|
189
195
|
##
|
190
196
|
# @param [String] sid A 34 character string that uniquely identifies this
|
191
197
|
# Business.
|
@@ -16,6 +16,7 @@ module Twilio
|
|
16
16
|
super
|
17
17
|
@version = 'TrustedComms'
|
18
18
|
@branded_calls = nil
|
19
|
+
@brands_information = nil
|
19
20
|
@businesses = nil
|
20
21
|
@cps = nil
|
21
22
|
@current_calls = nil
|
@@ -28,6 +29,12 @@ module Twilio
|
|
28
29
|
@branded_calls ||= BrandedCallList.new self
|
29
30
|
end
|
30
31
|
|
32
|
+
##
|
33
|
+
# @return [Twilio::REST::Preview::TrustedComms::BrandsInformationContext]
|
34
|
+
def brands_information
|
35
|
+
@brands_information ||= BrandsInformationContext.new self
|
36
|
+
end
|
37
|
+
|
31
38
|
##
|
32
39
|
# @param [String] sid A 34 character string that uniquely identifies this
|
33
40
|
# Business.
|
@@ -0,0 +1,193 @@
|
|
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 Preview < Domain
|
12
|
+
class TrustedComms < 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 BrandsInformationList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the BrandsInformationList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [BrandsInformationList] BrandsInformationList
|
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.Preview.TrustedComms.BrandsInformationList>'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# 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.
|
36
|
+
class BrandsInformationPage < Page
|
37
|
+
##
|
38
|
+
# Initialize the BrandsInformationPage
|
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 [BrandsInformationPage] BrandsInformationPage
|
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 BrandsInformationInstance
|
52
|
+
# @param [Hash] payload Payload response from the API
|
53
|
+
# @return [BrandsInformationInstance] BrandsInformationInstance
|
54
|
+
def get_instance(payload)
|
55
|
+
BrandsInformationInstance.new(@version, payload, )
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# Provide a user friendly representation
|
60
|
+
def to_s
|
61
|
+
'<Twilio.Preview.TrustedComms.BrandsInformationPage>'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# 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.
|
67
|
+
class BrandsInformationContext < InstanceContext
|
68
|
+
##
|
69
|
+
# Initialize the BrandsInformationContext
|
70
|
+
# @param [Version] version Version that contains the resource
|
71
|
+
# @return [BrandsInformationContext] BrandsInformationContext
|
72
|
+
def initialize(version)
|
73
|
+
super(version)
|
74
|
+
|
75
|
+
# Path Solution
|
76
|
+
@solution = {}
|
77
|
+
@uri = "/BrandsInformation"
|
78
|
+
end
|
79
|
+
|
80
|
+
##
|
81
|
+
# Fetch a BrandsInformationInstance
|
82
|
+
# @return [BrandsInformationInstance] Fetched BrandsInformationInstance
|
83
|
+
def fetch
|
84
|
+
params = Twilio::Values.of({})
|
85
|
+
|
86
|
+
payload = @version.fetch(
|
87
|
+
'GET',
|
88
|
+
@uri,
|
89
|
+
params,
|
90
|
+
)
|
91
|
+
|
92
|
+
BrandsInformationInstance.new(@version, payload, )
|
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.Preview.TrustedComms.BrandsInformationContext #{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.Preview.TrustedComms.BrandsInformationContext #{context}>"
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# 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.
|
112
|
+
class BrandsInformationInstance < InstanceResource
|
113
|
+
##
|
114
|
+
# Initialize the BrandsInformationInstance
|
115
|
+
# @param [Version] version Version that contains the resource
|
116
|
+
# @param [Hash] payload payload that contains response from Twilio
|
117
|
+
# @return [BrandsInformationInstance] BrandsInformationInstance
|
118
|
+
def initialize(version, payload)
|
119
|
+
super(version)
|
120
|
+
|
121
|
+
# Marshaled Properties
|
122
|
+
@properties = {
|
123
|
+
'update_time' => Twilio.deserialize_iso8601_datetime(payload['update_time']),
|
124
|
+
'file_link' => payload['file_link'],
|
125
|
+
'file_link_ttl_in_seconds' => payload['file_link_ttl_in_seconds'],
|
126
|
+
'url' => payload['url'],
|
127
|
+
}
|
128
|
+
|
129
|
+
# Context
|
130
|
+
@instance_context = nil
|
131
|
+
@params = {}
|
132
|
+
end
|
133
|
+
|
134
|
+
##
|
135
|
+
# Generate an instance context for the instance, the context is capable of
|
136
|
+
# performing various actions. All instance actions are proxied to the context
|
137
|
+
# @return [BrandsInformationContext] BrandsInformationContext for this BrandsInformationInstance
|
138
|
+
def context
|
139
|
+
unless @instance_context
|
140
|
+
@instance_context = BrandsInformationContext.new(@version, )
|
141
|
+
end
|
142
|
+
@instance_context
|
143
|
+
end
|
144
|
+
|
145
|
+
##
|
146
|
+
# @return [Time] Creation time of the information retrieved
|
147
|
+
def update_time
|
148
|
+
@properties['update_time']
|
149
|
+
end
|
150
|
+
|
151
|
+
##
|
152
|
+
# @return [String] The URL to the brands information
|
153
|
+
def file_link
|
154
|
+
@properties['file_link']
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# @return [String] How long will be the `file_link` valid
|
159
|
+
def file_link_ttl_in_seconds
|
160
|
+
@properties['file_link_ttl_in_seconds']
|
161
|
+
end
|
162
|
+
|
163
|
+
##
|
164
|
+
# @return [String] The URL of this resource
|
165
|
+
def url
|
166
|
+
@properties['url']
|
167
|
+
end
|
168
|
+
|
169
|
+
##
|
170
|
+
# Fetch a BrandsInformationInstance
|
171
|
+
# @return [BrandsInformationInstance] Fetched BrandsInformationInstance
|
172
|
+
def fetch
|
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.Preview.TrustedComms.BrandsInformationInstance #{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.Preview.TrustedComms.BrandsInformationInstance #{values}>"
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|