twilio-ruby 5.25.1 → 5.25.2
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 +12 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/authy.rb +8 -8
- data/lib/twilio-ruby/rest/authy/v1.rb +15 -15
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +6 -6
- data/lib/twilio-ruby/rest/flex_api.rb +6 -6
- data/lib/twilio-ruby/rest/flex_api/v1.rb +7 -7
- data/lib/twilio-ruby/rest/insights/v1/summary.rb +7 -0
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +6 -6
- data/lib/twilio-ruby/rest/messaging.rb +8 -8
- data/lib/twilio-ruby/rest/messaging/v1.rb +14 -14
- data/lib/twilio-ruby/rest/preview.rb +23 -17
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +18 -11
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +205 -0
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +14 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +14 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +0 -33
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +14 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +14 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +14 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +0 -33
- data/lib/twilio-ruby/rest/verify/v2/service.rb +6 -3
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +1 -1
- data/lib/twilio-ruby/rest/video.rb +9 -9
- data/lib/twilio-ruby/rest/video/v1.rb +16 -16
- data/lib/twilio-ruby/rest/wireless.rb +6 -6
- data/lib/twilio-ruby/rest/wireless/v1.rb +7 -7
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +1 -1
- data/spec/integration/insights/v1/summary_spec.rb +1 -0
- data/spec/integration/preview/trusted_comms/branded_call_spec.rb +53 -0
- data/spec/integration/serverless/v1/service/asset/asset_version_spec.rb +0 -49
- data/spec/integration/serverless/v1/service/asset_spec.rb +28 -0
- data/spec/integration/serverless/v1/service/environment/variable_spec.rb +30 -0
- data/spec/integration/serverless/v1/service/environment_spec.rb +28 -0
- data/spec/integration/serverless/v1/service/function/function_version_spec.rb +0 -49
- data/spec/integration/serverless/v1/service/function_spec.rb +28 -0
- data/spec/integration/serverless/v1/service_spec.rb +26 -0
- metadata +5 -2
@@ -15,22 +15,23 @@ module Twilio
|
|
15
15
|
def initialize(domain)
|
16
16
|
super
|
17
17
|
@version = 'TrustedComms'
|
18
|
+
@branded_calls = nil
|
19
|
+
@cps = nil
|
20
|
+
@current_calls = nil
|
18
21
|
@devices = nil
|
19
22
|
@phone_calls = nil
|
20
|
-
@current_calls = nil
|
21
|
-
@cps = nil
|
22
23
|
end
|
23
24
|
|
24
25
|
##
|
25
|
-
# @return [Twilio::REST::Preview::TrustedComms::
|
26
|
-
def
|
27
|
-
@
|
26
|
+
# @return [Twilio::REST::Preview::TrustedComms::BrandedCallContext]
|
27
|
+
def branded_calls
|
28
|
+
@branded_calls ||= BrandedCallList.new self
|
28
29
|
end
|
29
30
|
|
30
31
|
##
|
31
|
-
# @return [Twilio::REST::Preview::TrustedComms::
|
32
|
-
def
|
33
|
-
@
|
32
|
+
# @return [Twilio::REST::Preview::TrustedComms::CpsContext]
|
33
|
+
def cps
|
34
|
+
@cps ||= CpsContext.new self
|
34
35
|
end
|
35
36
|
|
36
37
|
##
|
@@ -40,9 +41,15 @@ module Twilio
|
|
40
41
|
end
|
41
42
|
|
42
43
|
##
|
43
|
-
# @return [Twilio::REST::Preview::TrustedComms::
|
44
|
-
def
|
45
|
-
@
|
44
|
+
# @return [Twilio::REST::Preview::TrustedComms::DeviceContext]
|
45
|
+
def devices
|
46
|
+
@devices ||= DeviceList.new self
|
47
|
+
end
|
48
|
+
|
49
|
+
##
|
50
|
+
# @return [Twilio::REST::Preview::TrustedComms::PhoneCallContext]
|
51
|
+
def phone_calls
|
52
|
+
@phone_calls ||= PhoneCallList.new self
|
46
53
|
end
|
47
54
|
|
48
55
|
##
|
@@ -0,0 +1,205 @@
|
|
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 BrandedCallList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the BrandedCallList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [BrandedCallList] BrandedCallList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/Business/BrandedCalls"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Retrieve a single page of BrandedCallInstance records from the API.
|
30
|
+
# Request is executed immediately.
|
31
|
+
# @param [String] from The phone number to use as the caller id, given in E.164
|
32
|
+
# format (https://en.wikipedia.org/wiki/E.164). It must be a Twilio number that
|
33
|
+
# has been set up as a Branded Number in the Business Profile section for your
|
34
|
+
# account.
|
35
|
+
# @param [String] to The terminating Phone Number, given in E.164 format
|
36
|
+
# (https://en.wikipedia.org/wiki/E.164).
|
37
|
+
# @param [String] reason The business reason for this phone call that will appear
|
38
|
+
# in the terminating device's screen.
|
39
|
+
# @return [BrandedCallInstance] Newly created BrandedCallInstance
|
40
|
+
def create(from: nil, to: nil, reason: nil)
|
41
|
+
data = Twilio::Values.of({'From' => from, 'To' => to, 'Reason' => reason, })
|
42
|
+
|
43
|
+
payload = @version.create(
|
44
|
+
'POST',
|
45
|
+
@uri,
|
46
|
+
data: data
|
47
|
+
)
|
48
|
+
|
49
|
+
BrandedCallInstance.new(@version, payload, )
|
50
|
+
end
|
51
|
+
|
52
|
+
##
|
53
|
+
# Provide a user friendly representation
|
54
|
+
def to_s
|
55
|
+
'#<Twilio.Preview.TrustedComms.BrandedCallList>'
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
##
|
60
|
+
# 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.
|
61
|
+
class BrandedCallPage < Page
|
62
|
+
##
|
63
|
+
# Initialize the BrandedCallPage
|
64
|
+
# @param [Version] version Version that contains the resource
|
65
|
+
# @param [Response] response Response from the API
|
66
|
+
# @param [Hash] solution Path solution for the resource
|
67
|
+
# @return [BrandedCallPage] BrandedCallPage
|
68
|
+
def initialize(version, response, solution)
|
69
|
+
super(version, response)
|
70
|
+
|
71
|
+
# Path Solution
|
72
|
+
@solution = solution
|
73
|
+
end
|
74
|
+
|
75
|
+
##
|
76
|
+
# Build an instance of BrandedCallInstance
|
77
|
+
# @param [Hash] payload Payload response from the API
|
78
|
+
# @return [BrandedCallInstance] BrandedCallInstance
|
79
|
+
def get_instance(payload)
|
80
|
+
BrandedCallInstance.new(@version, payload, )
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# Provide a user friendly representation
|
85
|
+
def to_s
|
86
|
+
'<Twilio.Preview.TrustedComms.BrandedCallPage>'
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
##
|
91
|
+
# 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.
|
92
|
+
class BrandedCallInstance < InstanceResource
|
93
|
+
##
|
94
|
+
# Initialize the BrandedCallInstance
|
95
|
+
# @param [Version] version Version that contains the resource
|
96
|
+
# @param [Hash] payload payload that contains response from Twilio
|
97
|
+
# @return [BrandedCallInstance] BrandedCallInstance
|
98
|
+
def initialize(version, payload)
|
99
|
+
super(version)
|
100
|
+
|
101
|
+
# Marshaled Properties
|
102
|
+
@properties = {
|
103
|
+
'account_sid' => payload['account_sid'],
|
104
|
+
'bg_color' => payload['bg_color'],
|
105
|
+
'caller' => payload['caller'],
|
106
|
+
'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']),
|
107
|
+
'font_color' => payload['font_color'],
|
108
|
+
'from' => payload['from'],
|
109
|
+
'logo' => payload['logo'],
|
110
|
+
'reason' => payload['reason'],
|
111
|
+
'status' => payload['status'],
|
112
|
+
'to' => payload['to'],
|
113
|
+
'url' => payload['url'],
|
114
|
+
'use_case' => payload['use_case'],
|
115
|
+
}
|
116
|
+
end
|
117
|
+
|
118
|
+
##
|
119
|
+
# @return [String] Account Sid.
|
120
|
+
def account_sid
|
121
|
+
@properties['account_sid']
|
122
|
+
end
|
123
|
+
|
124
|
+
##
|
125
|
+
# @return [String] Background color of the current phone call
|
126
|
+
def bg_color
|
127
|
+
@properties['bg_color']
|
128
|
+
end
|
129
|
+
|
130
|
+
##
|
131
|
+
# @return [String] Caller name of the current phone call
|
132
|
+
def caller
|
133
|
+
@properties['caller']
|
134
|
+
end
|
135
|
+
|
136
|
+
##
|
137
|
+
# @return [Time] The date this current phone call was created
|
138
|
+
def created_at
|
139
|
+
@properties['created_at']
|
140
|
+
end
|
141
|
+
|
142
|
+
##
|
143
|
+
# @return [String] Font color of the current phone call
|
144
|
+
def font_color
|
145
|
+
@properties['font_color']
|
146
|
+
end
|
147
|
+
|
148
|
+
##
|
149
|
+
# @return [String] The originating phone number
|
150
|
+
def from
|
151
|
+
@properties['from']
|
152
|
+
end
|
153
|
+
|
154
|
+
##
|
155
|
+
# @return [String] Logo URL of the caller
|
156
|
+
def logo
|
157
|
+
@properties['logo']
|
158
|
+
end
|
159
|
+
|
160
|
+
##
|
161
|
+
# @return [String] The business reason for this current phone call
|
162
|
+
def reason
|
163
|
+
@properties['reason']
|
164
|
+
end
|
165
|
+
|
166
|
+
##
|
167
|
+
# @return [String] The status of the current phone call
|
168
|
+
def status
|
169
|
+
@properties['status']
|
170
|
+
end
|
171
|
+
|
172
|
+
##
|
173
|
+
# @return [String] The terminating phone number
|
174
|
+
def to
|
175
|
+
@properties['to']
|
176
|
+
end
|
177
|
+
|
178
|
+
##
|
179
|
+
# @return [String] The URL of this resource.
|
180
|
+
def url
|
181
|
+
@properties['url']
|
182
|
+
end
|
183
|
+
|
184
|
+
##
|
185
|
+
# @return [String] The use case for the current phone call
|
186
|
+
def use_case
|
187
|
+
@properties['use_case']
|
188
|
+
end
|
189
|
+
|
190
|
+
##
|
191
|
+
# Provide a user friendly representation
|
192
|
+
def to_s
|
193
|
+
"<Twilio.Preview.TrustedComms.BrandedCallInstance>"
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# Provide a detailed, user friendly representation
|
198
|
+
def inspect
|
199
|
+
"<Twilio.Preview.TrustedComms.BrandedCallInstance>"
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
@@ -210,6 +210,13 @@ module Twilio
|
|
210
210
|
ServiceInstance.new(@version, payload, sid: @solution[:sid], )
|
211
211
|
end
|
212
212
|
|
213
|
+
##
|
214
|
+
# Deletes the ServiceInstance
|
215
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
216
|
+
def delete
|
217
|
+
@version.delete('delete', @uri)
|
218
|
+
end
|
219
|
+
|
213
220
|
##
|
214
221
|
# Update the ServiceInstance
|
215
222
|
# @param [Boolean] include_credentials A boolean value that indicates whether to
|
@@ -422,6 +429,13 @@ module Twilio
|
|
422
429
|
context.fetch
|
423
430
|
end
|
424
431
|
|
432
|
+
##
|
433
|
+
# Deletes the ServiceInstance
|
434
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
435
|
+
def delete
|
436
|
+
context.delete
|
437
|
+
end
|
438
|
+
|
425
439
|
##
|
426
440
|
# Update the ServiceInstance
|
427
441
|
# @param [Boolean] include_credentials A boolean value that indicates whether to
|
@@ -202,6 +202,13 @@ module Twilio
|
|
202
202
|
AssetInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid], )
|
203
203
|
end
|
204
204
|
|
205
|
+
##
|
206
|
+
# Deletes the AssetInstance
|
207
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
208
|
+
def delete
|
209
|
+
@version.delete('delete', @uri)
|
210
|
+
end
|
211
|
+
|
205
212
|
##
|
206
213
|
# Update the AssetInstance
|
207
214
|
# @param [String] friendly_name A human-readable description of this Asset, fewer
|
@@ -353,6 +360,13 @@ module Twilio
|
|
353
360
|
context.fetch
|
354
361
|
end
|
355
362
|
|
363
|
+
##
|
364
|
+
# Deletes the AssetInstance
|
365
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
366
|
+
def delete
|
367
|
+
context.delete
|
368
|
+
end
|
369
|
+
|
356
370
|
##
|
357
371
|
# Update the AssetInstance
|
358
372
|
# @param [String] friendly_name A human-readable description of this Asset, fewer
|
@@ -113,32 +113,6 @@ module Twilio
|
|
113
113
|
AssetVersionPage.new(@version, response, @solution)
|
114
114
|
end
|
115
115
|
|
116
|
-
##
|
117
|
-
# Retrieve a single page of AssetVersionInstance records from the API.
|
118
|
-
# Request is executed immediately.
|
119
|
-
# @param [String] path The URL-friendly string by which this Asset Version can be
|
120
|
-
# referenced. (Example: `/assets/example`) Required.
|
121
|
-
# @param [asset_version.Visibility] visibility The access control which determines
|
122
|
-
# how the Asset Version can be accessed. One of `public`, `protected`, or
|
123
|
-
# `private`. Required.
|
124
|
-
# @return [AssetVersionInstance] Newly created AssetVersionInstance
|
125
|
-
def create(path: nil, visibility: nil)
|
126
|
-
data = Twilio::Values.of({'Path' => path, 'Visibility' => visibility, })
|
127
|
-
|
128
|
-
payload = @version.create(
|
129
|
-
'POST',
|
130
|
-
@uri,
|
131
|
-
data: data
|
132
|
-
)
|
133
|
-
|
134
|
-
AssetVersionInstance.new(
|
135
|
-
@version,
|
136
|
-
payload,
|
137
|
-
service_sid: @solution[:service_sid],
|
138
|
-
asset_sid: @solution[:asset_sid],
|
139
|
-
)
|
140
|
-
end
|
141
|
-
|
142
116
|
##
|
143
117
|
# Provide a user friendly representation
|
144
118
|
def to_s
|
@@ -262,7 +236,6 @@ module Twilio
|
|
262
236
|
'asset_sid' => payload['asset_sid'],
|
263
237
|
'path' => payload['path'],
|
264
238
|
'visibility' => payload['visibility'],
|
265
|
-
'pre_signed_upload_url' => payload['pre_signed_upload_url'],
|
266
239
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
267
240
|
'url' => payload['url'],
|
268
241
|
}
|
@@ -328,12 +301,6 @@ module Twilio
|
|
328
301
|
@properties['visibility']
|
329
302
|
end
|
330
303
|
|
331
|
-
##
|
332
|
-
# @return [Hash] The object which provides the details required for uploading this Asset Version.
|
333
|
-
def pre_signed_upload_url
|
334
|
-
@properties['pre_signed_upload_url']
|
335
|
-
end
|
336
|
-
|
337
304
|
##
|
338
305
|
# @return [Time] The date that this Asset Version was created.
|
339
306
|
def date_created
|
@@ -211,6 +211,13 @@ module Twilio
|
|
211
211
|
)
|
212
212
|
end
|
213
213
|
|
214
|
+
##
|
215
|
+
# Deletes the EnvironmentInstance
|
216
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
217
|
+
def delete
|
218
|
+
@version.delete('delete', @uri)
|
219
|
+
end
|
220
|
+
|
214
221
|
##
|
215
222
|
# Access the variables
|
216
223
|
# @return [VariableList]
|
@@ -388,6 +395,13 @@ module Twilio
|
|
388
395
|
context.fetch
|
389
396
|
end
|
390
397
|
|
398
|
+
##
|
399
|
+
# Deletes the EnvironmentInstance
|
400
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
401
|
+
def delete
|
402
|
+
context.delete
|
403
|
+
end
|
404
|
+
|
391
405
|
##
|
392
406
|
# Access the variables
|
393
407
|
# @return [variables] variables
|
@@ -247,6 +247,13 @@ module Twilio
|
|
247
247
|
)
|
248
248
|
end
|
249
249
|
|
250
|
+
##
|
251
|
+
# Deletes the VariableInstance
|
252
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
253
|
+
def delete
|
254
|
+
@version.delete('delete', @uri)
|
255
|
+
end
|
256
|
+
|
250
257
|
##
|
251
258
|
# Provide a user friendly representation
|
252
259
|
def to_s
|
@@ -388,6 +395,13 @@ module Twilio
|
|
388
395
|
context.update(key: key, value: value, )
|
389
396
|
end
|
390
397
|
|
398
|
+
##
|
399
|
+
# Deletes the VariableInstance
|
400
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
401
|
+
def delete
|
402
|
+
context.delete
|
403
|
+
end
|
404
|
+
|
391
405
|
##
|
392
406
|
# Provide a user friendly representation
|
393
407
|
def to_s
|
@@ -202,6 +202,13 @@ module Twilio
|
|
202
202
|
FunctionInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid], )
|
203
203
|
end
|
204
204
|
|
205
|
+
##
|
206
|
+
# Deletes the FunctionInstance
|
207
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
208
|
+
def delete
|
209
|
+
@version.delete('delete', @uri)
|
210
|
+
end
|
211
|
+
|
205
212
|
##
|
206
213
|
# Update the FunctionInstance
|
207
214
|
# @param [String] friendly_name A human-readable description of this Function,
|
@@ -353,6 +360,13 @@ module Twilio
|
|
353
360
|
context.fetch
|
354
361
|
end
|
355
362
|
|
363
|
+
##
|
364
|
+
# Deletes the FunctionInstance
|
365
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
366
|
+
def delete
|
367
|
+
context.delete
|
368
|
+
end
|
369
|
+
|
356
370
|
##
|
357
371
|
# Update the FunctionInstance
|
358
372
|
# @param [String] friendly_name A human-readable description of this Function,
|