twilio-ruby 5.40.4 → 5.45.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 +104 -0
- data/{LICENSE.md → LICENSE} +0 -0
- data/PULL_REQUEST_TEMPLATE.md +3 -3
- data/README.md +18 -2
- data/lib/twilio-ruby.rb +1 -1
- data/lib/twilio-ruby/jwt/access_token.rb +7 -2
- data/lib/twilio-ruby/rest/accounts.rb +12 -0
- data/lib/twilio-ruby/rest/accounts/v1.rb +14 -0
- data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +186 -0
- data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +200 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +26 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +201 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +13 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +6 -1
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +5 -22
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +25 -40
- data/lib/twilio-ruby/rest/client.rb +29 -3
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +10 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +13 -3
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +12 -5
- data/lib/twilio-ruby/rest/insights.rb +8 -0
- data/lib/twilio-ruby/rest/insights/v1.rb +15 -0
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/room.rb +487 -0
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +378 -0
- data/lib/twilio-ruby/rest/ip_messaging.rb +8 -10
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +6 -8
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +29 -68
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +198 -313
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +32 -59
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +23 -55
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +28 -71
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +31 -59
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +19 -39
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +29 -51
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +12 -18
- data/lib/twilio-ruby/rest/ip_messaging/v2.rb +6 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +29 -66
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +116 -205
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +23 -50
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +41 -91
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +23 -50
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +42 -118
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +46 -100
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +36 -89
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +19 -41
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +29 -53
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +23 -53
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +27 -56
- data/lib/twilio-ruby/rest/preview.rb +5 -18
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +5 -22
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +21 -39
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +12 -27
- data/lib/twilio-ruby/rest/preview/trusted_comms/{business.rb → branded_channel.rb} +63 -77
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +165 -0
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +5 -5
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +4 -4
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +15 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +15 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +28 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +15 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +28 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +15 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +12 -9
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +16 -16
- data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +21 -24
- data/lib/twilio-ruby/rest/verify/v2/form.rb +4 -4
- data/lib/twilio-ruby/rest/verify/v2/service.rb +54 -33
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +23 -35
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +36 -61
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +59 -57
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +4 -4
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/room.rb +20 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +150 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +7 -4
- data/lib/twilio-ruby/util/configuration.rb +5 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/accounts/v1/auth_token_promotion_spec.rb +44 -0
- data/spec/integration/accounts/v1/secondary_auth_token_spec.rb +69 -0
- data/spec/integration/api/v2010/account/call/event_spec.rb +102 -0
- data/spec/integration/api/v2010/account/call/recording_spec.rb +4 -0
- data/spec/integration/api/v2010/account/call_spec.rb +20 -10
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +30 -0
- data/spec/integration/bulkexports/v1/export/export_custom_job_spec.rb +4 -2
- data/spec/integration/conversations/v1/conversation_spec.rb +1 -1
- data/spec/integration/conversations/v1/service/conversation_spec.rb +1 -1
- data/spec/integration/events/v1/sink/sink_test_spec.rb +1 -1
- data/spec/integration/events/v1/subscription_spec.rb +49 -0
- data/spec/integration/insights/v1/call/summary_spec.rb +1 -0
- data/spec/integration/insights/v1/room/participant_spec.rb +147 -0
- data/spec/integration/insights/v1/room_spec.rb +164 -0
- data/spec/integration/ip_messaging/v1/credential_spec.rb +13 -13
- data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +11 -11
- data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +14 -14
- data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +14 -14
- data/spec/integration/ip_messaging/v1/service/channel_spec.rb +25 -25
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +13 -13
- data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +7 -7
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +17 -17
- data/spec/integration/ip_messaging/v1/service_spec.rb +9 -9
- data/spec/integration/ip_messaging/v2/credential_spec.rb +13 -13
- data/spec/integration/ip_messaging/v2/service/binding_spec.rb +11 -11
- data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +11 -11
- data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +13 -13
- data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +17 -17
- data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +15 -15
- data/spec/integration/ip_messaging/v2/service/channel_spec.rb +29 -29
- data/spec/integration/ip_messaging/v2/service/role_spec.rb +13 -13
- data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +9 -9
- data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +20 -20
- data/spec/integration/ip_messaging/v2/service/user_spec.rb +21 -21
- data/spec/integration/ip_messaging/v2/service_spec.rb +29 -29
- data/spec/integration/lookups/v1/phone_number_spec.rb +7 -7
- data/spec/integration/preview/bulk_exports/export/export_custom_job_spec.rb +4 -2
- data/spec/integration/preview/trusted_comms/{business/brand/branded_channel → branded_channel}/channel_spec.rb +4 -8
- data/spec/integration/preview/trusted_comms/{business/brand/branded_channel_spec.rb → branded_channel_spec.rb} +5 -9
- data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +1 -1
- data/spec/integration/trunking/v1/trunk/recording_spec.rb +2 -6
- data/spec/integration/verify/v2/service/entity/challenge_spec.rb +56 -20
- data/spec/integration/verify/v2/service/entity/factor_spec.rb +11 -26
- data/spec/integration/verify/v2/service/entity_spec.rb +4 -12
- data/spec/integration/verify/v2/service_spec.rb +8 -4
- data/spec/integration/video/v1/room/room_recording_rule_spec.rb +89 -0
- data/spec/integration/video/v1/room_spec.rb +10 -5
- data/spec/jwt/access_token_spec.rb +9 -1
- data/spec/rest/client_spec.rb +24 -2
- data/twilio-ruby.gemspec +2 -1
- metadata +42 -28
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +0 -243
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb +0 -233
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +0 -260
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +0 -189
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +0 -108
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb +0 -260
- data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +0 -342
- data/spec/integration/preview/trusted_comms/branded_call_spec.rb +0 -59
- data/spec/integration/preview/trusted_comms/business/brand_spec.rb +0 -48
- data/spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb +0 -56
- data/spec/integration/preview/trusted_comms/business/insights_spec.rb +0 -12
- data/spec/integration/preview/trusted_comms/business_spec.rb +0 -46
- data/spec/integration/preview/trusted_comms/phone_call_spec.rb +0 -59
|
@@ -12,7 +12,7 @@ module Twilio
|
|
|
12
12
|
class V2 < Version
|
|
13
13
|
class ServiceContext < InstanceContext
|
|
14
14
|
##
|
|
15
|
-
# PLEASE NOTE that this class contains
|
|
15
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
16
16
|
class WebhookList < ListResource
|
|
17
17
|
##
|
|
18
18
|
# Initialize the WebhookList
|
|
@@ -139,7 +139,7 @@ module Twilio
|
|
|
139
139
|
end
|
|
140
140
|
|
|
141
141
|
##
|
|
142
|
-
# PLEASE NOTE that this class contains
|
|
142
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
143
143
|
class WebhookPage < Page
|
|
144
144
|
##
|
|
145
145
|
# Initialize the WebhookPage
|
|
@@ -170,7 +170,7 @@ module Twilio
|
|
|
170
170
|
end
|
|
171
171
|
|
|
172
172
|
##
|
|
173
|
-
# PLEASE NOTE that this class contains
|
|
173
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
174
174
|
class WebhookContext < InstanceContext
|
|
175
175
|
##
|
|
176
176
|
# Initialize the WebhookContext
|
|
@@ -243,7 +243,7 @@ module Twilio
|
|
|
243
243
|
end
|
|
244
244
|
|
|
245
245
|
##
|
|
246
|
-
# PLEASE NOTE that this class contains
|
|
246
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
247
247
|
class WebhookInstance < InstanceResource
|
|
248
248
|
##
|
|
249
249
|
# Initialize the WebhookInstance
|
|
@@ -89,9 +89,9 @@ module Twilio
|
|
|
89
89
|
# encryption.
|
|
90
90
|
# @param [String] aws_s3_url The URL of the AWS S3 bucket where the compositions
|
|
91
91
|
# should be stored. We only support DNS-compliant URLs like
|
|
92
|
-
# `https
|
|
93
|
-
#
|
|
94
|
-
#
|
|
92
|
+
# `https://documentation-example-twilio-bucket/compositions`, where `compositions`
|
|
93
|
+
# is the path in which you want the compositions to be stored. This URL accepts
|
|
94
|
+
# only URI-valid characters, as described in the <a
|
|
95
95
|
# href='https://tools.ietf.org/html/rfc3986#section-2'>RFC 3986</a>.
|
|
96
96
|
# @param [Boolean] aws_storage_enabled Whether all compositions should be written
|
|
97
97
|
# to the `aws_s3_url`. When `false`, all compositions are stored in our cloud.
|
|
@@ -229,9 +229,9 @@ module Twilio
|
|
|
229
229
|
# encryption.
|
|
230
230
|
# @param [String] aws_s3_url The URL of the AWS S3 bucket where the compositions
|
|
231
231
|
# should be stored. We only support DNS-compliant URLs like
|
|
232
|
-
# `https
|
|
233
|
-
#
|
|
234
|
-
#
|
|
232
|
+
# `https://documentation-example-twilio-bucket/compositions`, where `compositions`
|
|
233
|
+
# is the path in which you want the compositions to be stored. This URL accepts
|
|
234
|
+
# only URI-valid characters, as described in the <a
|
|
235
235
|
# href='https://tools.ietf.org/html/rfc3986#section-2'>RFC 3986</a>.
|
|
236
236
|
# @param [Boolean] aws_storage_enabled Whether all compositions should be written
|
|
237
237
|
# to the `aws_s3_url`. When `false`, all compositions are stored in our cloud.
|
|
@@ -89,9 +89,9 @@ module Twilio
|
|
|
89
89
|
# encryption.
|
|
90
90
|
# @param [String] aws_s3_url The URL of the AWS S3 bucket where the recordings
|
|
91
91
|
# should be stored. We only support DNS-compliant URLs like
|
|
92
|
-
# `https
|
|
93
|
-
#
|
|
94
|
-
#
|
|
92
|
+
# `https://documentation-example-twilio-bucket/recordings`, where `recordings` is
|
|
93
|
+
# the path in which you want the recordings to be stored. This URL accepts only
|
|
94
|
+
# URI-valid characters, as described in the <a
|
|
95
95
|
# href='https://tools.ietf.org/html/rfc3986#section-2'>RFC 3986</a>.
|
|
96
96
|
# @param [Boolean] aws_storage_enabled Whether all recordings should be written to
|
|
97
97
|
# the `aws_s3_url`. When `false`, all recordings are stored in our cloud.
|
|
@@ -229,9 +229,9 @@ module Twilio
|
|
|
229
229
|
# encryption.
|
|
230
230
|
# @param [String] aws_s3_url The URL of the AWS S3 bucket where the recordings
|
|
231
231
|
# should be stored. We only support DNS-compliant URLs like
|
|
232
|
-
# `https
|
|
233
|
-
#
|
|
234
|
-
#
|
|
232
|
+
# `https://documentation-example-twilio-bucket/recordings`, where `recordings` is
|
|
233
|
+
# the path in which you want the recordings to be stored. This URL accepts only
|
|
234
|
+
# URI-valid characters, as described in the <a
|
|
235
235
|
# href='https://tools.ietf.org/html/rfc3986#section-2'>RFC 3986</a>.
|
|
236
236
|
# @param [Boolean] aws_storage_enabled Whether all recordings should be written to
|
|
237
237
|
# the `aws_s3_url`. When `false`, all recordings are stored in our cloud.
|
|
@@ -244,6 +244,7 @@ module Twilio
|
|
|
244
244
|
# Dependents
|
|
245
245
|
@recordings = nil
|
|
246
246
|
@participants = nil
|
|
247
|
+
@recording_rules = nil
|
|
247
248
|
end
|
|
248
249
|
|
|
249
250
|
##
|
|
@@ -304,6 +305,18 @@ module Twilio
|
|
|
304
305
|
@participants
|
|
305
306
|
end
|
|
306
307
|
|
|
308
|
+
##
|
|
309
|
+
# Access the recording_rules
|
|
310
|
+
# @return [RecordingRulesList]
|
|
311
|
+
# @return [RecordingRulesContext]
|
|
312
|
+
def recording_rules
|
|
313
|
+
unless @recording_rules
|
|
314
|
+
@recording_rules = RecordingRulesList.new(@version, room_sid: @solution[:sid], )
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
@recording_rules
|
|
318
|
+
end
|
|
319
|
+
|
|
307
320
|
##
|
|
308
321
|
# Provide a user friendly representation
|
|
309
322
|
def to_s
|
|
@@ -505,6 +518,13 @@ module Twilio
|
|
|
505
518
|
context.participants
|
|
506
519
|
end
|
|
507
520
|
|
|
521
|
+
##
|
|
522
|
+
# Access the recording_rules
|
|
523
|
+
# @return [recording_rules] recording_rules
|
|
524
|
+
def recording_rules
|
|
525
|
+
context.recording_rules
|
|
526
|
+
end
|
|
527
|
+
|
|
508
528
|
##
|
|
509
529
|
# Provide a user friendly representation
|
|
510
530
|
def to_s
|
|
@@ -0,0 +1,150 @@
|
|
|
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 Video < Domain
|
|
12
|
+
class V1 < Version
|
|
13
|
+
class RoomContext < InstanceContext
|
|
14
|
+
##
|
|
15
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
16
|
+
class RecordingRulesList < ListResource
|
|
17
|
+
##
|
|
18
|
+
# Initialize the RecordingRulesList
|
|
19
|
+
# @param [Version] version Version that contains the resource
|
|
20
|
+
# @param [String] room_sid The SID of the Room resource for the Recording Rules
|
|
21
|
+
# @return [RecordingRulesList] RecordingRulesList
|
|
22
|
+
def initialize(version, room_sid: nil)
|
|
23
|
+
super(version)
|
|
24
|
+
|
|
25
|
+
# Path Solution
|
|
26
|
+
@solution = {room_sid: room_sid}
|
|
27
|
+
@uri = "/Rooms/#{@solution[:room_sid]}/RecordingRules"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
##
|
|
31
|
+
# Fetch the RecordingRulesInstance
|
|
32
|
+
# @return [RecordingRulesInstance] Fetched RecordingRulesInstance
|
|
33
|
+
def fetch
|
|
34
|
+
payload = @version.fetch('GET', @uri)
|
|
35
|
+
|
|
36
|
+
RecordingRulesInstance.new(@version, payload, room_sid: @solution[:room_sid], )
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
##
|
|
40
|
+
# Update the RecordingRulesInstance
|
|
41
|
+
# @param [Hash] rules A JSON-encoded array of recording rules.
|
|
42
|
+
# @return [RecordingRulesInstance] Updated RecordingRulesInstance
|
|
43
|
+
def update(rules: :unset)
|
|
44
|
+
data = Twilio::Values.of({'Rules' => Twilio.serialize_object(rules), })
|
|
45
|
+
|
|
46
|
+
payload = @version.update('POST', @uri, data: data)
|
|
47
|
+
|
|
48
|
+
RecordingRulesInstance.new(@version, payload, room_sid: @solution[:room_sid], )
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
##
|
|
52
|
+
# Provide a user friendly representation
|
|
53
|
+
def to_s
|
|
54
|
+
'#<Twilio.Video.V1.RecordingRulesList>'
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
##
|
|
59
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
60
|
+
class RecordingRulesPage < Page
|
|
61
|
+
##
|
|
62
|
+
# Initialize the RecordingRulesPage
|
|
63
|
+
# @param [Version] version Version that contains the resource
|
|
64
|
+
# @param [Response] response Response from the API
|
|
65
|
+
# @param [Hash] solution Path solution for the resource
|
|
66
|
+
# @return [RecordingRulesPage] RecordingRulesPage
|
|
67
|
+
def initialize(version, response, solution)
|
|
68
|
+
super(version, response)
|
|
69
|
+
|
|
70
|
+
# Path Solution
|
|
71
|
+
@solution = solution
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
##
|
|
75
|
+
# Build an instance of RecordingRulesInstance
|
|
76
|
+
# @param [Hash] payload Payload response from the API
|
|
77
|
+
# @return [RecordingRulesInstance] RecordingRulesInstance
|
|
78
|
+
def get_instance(payload)
|
|
79
|
+
RecordingRulesInstance.new(@version, payload, room_sid: @solution[:room_sid], )
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
##
|
|
83
|
+
# Provide a user friendly representation
|
|
84
|
+
def to_s
|
|
85
|
+
'<Twilio.Video.V1.RecordingRulesPage>'
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
##
|
|
90
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
91
|
+
class RecordingRulesInstance < InstanceResource
|
|
92
|
+
##
|
|
93
|
+
# Initialize the RecordingRulesInstance
|
|
94
|
+
# @param [Version] version Version that contains the resource
|
|
95
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
96
|
+
# @param [String] room_sid The SID of the Room resource for the Recording Rules
|
|
97
|
+
# @return [RecordingRulesInstance] RecordingRulesInstance
|
|
98
|
+
def initialize(version, payload, room_sid: nil)
|
|
99
|
+
super(version)
|
|
100
|
+
|
|
101
|
+
# Marshaled Properties
|
|
102
|
+
@properties = {
|
|
103
|
+
'room_sid' => payload['room_sid'],
|
|
104
|
+
'rules' => payload['rules'],
|
|
105
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
106
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
107
|
+
}
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
##
|
|
111
|
+
# @return [String] The SID of the Room resource for the Recording Rules
|
|
112
|
+
def room_sid
|
|
113
|
+
@properties['room_sid']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
##
|
|
117
|
+
# @return [String] A collection of recording Rules that describe how to include or exclude matching tracks for recording
|
|
118
|
+
def rules
|
|
119
|
+
@properties['rules']
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
##
|
|
123
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
|
124
|
+
def date_created
|
|
125
|
+
@properties['date_created']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
##
|
|
129
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
|
130
|
+
def date_updated
|
|
131
|
+
@properties['date_updated']
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
##
|
|
135
|
+
# Provide a user friendly representation
|
|
136
|
+
def to_s
|
|
137
|
+
"<Twilio.Video.V1.RecordingRulesInstance>"
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
##
|
|
141
|
+
# Provide a detailed, user friendly representation
|
|
142
|
+
def inspect
|
|
143
|
+
"<Twilio.Video.V1.RecordingRulesInstance>"
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
end
|
|
@@ -46,9 +46,10 @@ module Twilio
|
|
|
46
46
|
# recording_status_callback_event:: Recording status callback events
|
|
47
47
|
# answer_on_bridge:: Preserve the ringing behavior of the inbound call until the Dialed call picks up
|
|
48
48
|
# ring_tone:: Ringtone allows you to override the ringback tone that Twilio will play back to the caller while executing the Dial
|
|
49
|
+
# recording_track:: To indicate which audio track should be recorded
|
|
49
50
|
# keyword_args:: additional attributes
|
|
50
|
-
def dial(number: nil, action: nil, method: nil, timeout: nil, hangup_on_star: nil, time_limit: nil, caller_id: nil, record: nil, trim: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, answer_on_bridge: nil, ring_tone: nil, **keyword_args)
|
|
51
|
-
dial = Dial.new(number: number, action: action, method: method, timeout: timeout, hangup_on_star: hangup_on_star, time_limit: time_limit, caller_id: caller_id, record: record, trim: trim, recording_status_callback: recording_status_callback, recording_status_callback_method: recording_status_callback_method, recording_status_callback_event: recording_status_callback_event, answer_on_bridge: answer_on_bridge, ring_tone: ring_tone, **keyword_args)
|
|
51
|
+
def dial(number: nil, action: nil, method: nil, timeout: nil, hangup_on_star: nil, time_limit: nil, caller_id: nil, record: nil, trim: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, answer_on_bridge: nil, ring_tone: nil, recording_track: nil, **keyword_args)
|
|
52
|
+
dial = Dial.new(number: number, action: action, method: method, timeout: timeout, hangup_on_star: hangup_on_star, time_limit: time_limit, caller_id: caller_id, record: record, trim: trim, recording_status_callback: recording_status_callback, recording_status_callback_method: recording_status_callback_method, recording_status_callback_event: recording_status_callback_event, answer_on_bridge: answer_on_bridge, ring_tone: ring_tone, recording_track: recording_track, **keyword_args)
|
|
52
53
|
|
|
53
54
|
yield(dial) if block_given?
|
|
54
55
|
append(dial)
|
|
@@ -968,9 +969,11 @@ module Twilio
|
|
|
968
969
|
# recording_status_callback_method:: Recording status callback URL method
|
|
969
970
|
# recording_status_callback_event:: Recording status callback events
|
|
970
971
|
# event_callback_url:: Event callback URL
|
|
972
|
+
# jitter_buffer_size:: Size of jitter buffer for participant
|
|
973
|
+
# participant_label:: A label for participant
|
|
971
974
|
# keyword_args:: additional attributes
|
|
972
|
-
def conference(name, muted: nil, beep: nil, start_conference_on_enter: nil, end_conference_on_exit: nil, wait_url: nil, wait_method: nil, max_participants: nil, record: nil, region: nil, coach: nil, trim: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, event_callback_url: nil, **keyword_args)
|
|
973
|
-
append(Conference.new(name, muted: muted, beep: beep, start_conference_on_enter: start_conference_on_enter, end_conference_on_exit: end_conference_on_exit, wait_url: wait_url, wait_method: wait_method, max_participants: max_participants, record: record, region: region, coach: coach, trim: trim, status_callback_event: status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, recording_status_callback: recording_status_callback, recording_status_callback_method: recording_status_callback_method, recording_status_callback_event: recording_status_callback_event, event_callback_url: event_callback_url, **keyword_args))
|
|
975
|
+
def conference(name, muted: nil, beep: nil, start_conference_on_enter: nil, end_conference_on_exit: nil, wait_url: nil, wait_method: nil, max_participants: nil, record: nil, region: nil, coach: nil, trim: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, event_callback_url: nil, jitter_buffer_size: nil, participant_label: nil, **keyword_args)
|
|
976
|
+
append(Conference.new(name, muted: muted, beep: beep, start_conference_on_enter: start_conference_on_enter, end_conference_on_exit: end_conference_on_exit, wait_url: wait_url, wait_method: wait_method, max_participants: max_participants, record: record, region: region, coach: coach, trim: trim, status_callback_event: status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, recording_status_callback: recording_status_callback, recording_status_callback_method: recording_status_callback_method, recording_status_callback_event: recording_status_callback_event, event_callback_url: event_callback_url, jitter_buffer_size: jitter_buffer_size, participant_label: participant_label, **keyword_args))
|
|
974
977
|
end
|
|
975
978
|
|
|
976
979
|
##
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Twilio
|
|
4
4
|
module Util
|
|
5
5
|
class Configuration
|
|
6
|
-
attr_accessor :account_sid, :auth_token, :http_client, :region, :edge
|
|
6
|
+
attr_accessor :account_sid, :auth_token, :http_client, :region, :edge, :logger
|
|
7
7
|
|
|
8
8
|
def account_sid=(value)
|
|
9
9
|
@account_sid = value
|
|
@@ -24,6 +24,10 @@ module Twilio
|
|
|
24
24
|
def edge=(value)
|
|
25
25
|
@edge = value
|
|
26
26
|
end
|
|
27
|
+
|
|
28
|
+
def logger=(value)
|
|
29
|
+
@logger = value
|
|
30
|
+
end
|
|
27
31
|
end
|
|
28
32
|
end
|
|
29
33
|
end
|
data/lib/twilio-ruby/version.rb
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# \ / _ _ _| _ _
|
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
# / /
|
|
6
|
+
#
|
|
7
|
+
# frozen_string_literal: true
|
|
8
|
+
|
|
9
|
+
require 'spec_helper.rb'
|
|
10
|
+
|
|
11
|
+
describe 'AuthTokenPromotion' do
|
|
12
|
+
it "can update" do
|
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
14
|
+
|
|
15
|
+
expect {
|
|
16
|
+
@client.accounts.v1.auth_token_promotion().update()
|
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
|
18
|
+
|
|
19
|
+
expect(
|
|
20
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
21
|
+
method: 'post',
|
|
22
|
+
url: 'https://accounts.twilio.com/v1/AuthTokens/Promote',
|
|
23
|
+
))).to eq(true)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
it "receives update responses" do
|
|
27
|
+
@holodeck.mock(Twilio::Response.new(
|
|
28
|
+
200,
|
|
29
|
+
%q[
|
|
30
|
+
{
|
|
31
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
32
|
+
"auth_token": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
|
|
33
|
+
"date_created": "2015-07-31T04:00:00Z",
|
|
34
|
+
"date_updated": "2015-07-31T04:00:00Z",
|
|
35
|
+
"url": "https://accounts.twilio.com/v1/AuthTokens/Promote"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
))
|
|
39
|
+
|
|
40
|
+
actual = @client.accounts.v1.auth_token_promotion().update()
|
|
41
|
+
|
|
42
|
+
expect(actual).to_not eq(nil)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# \ / _ _ _| _ _
|
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
# / /
|
|
6
|
+
#
|
|
7
|
+
# frozen_string_literal: true
|
|
8
|
+
|
|
9
|
+
require 'spec_helper.rb'
|
|
10
|
+
|
|
11
|
+
describe 'SecondaryAuthToken' do
|
|
12
|
+
it "can create" do
|
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
14
|
+
|
|
15
|
+
expect {
|
|
16
|
+
@client.accounts.v1.secondary_auth_token().create()
|
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
|
18
|
+
|
|
19
|
+
expect(
|
|
20
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
21
|
+
method: 'post',
|
|
22
|
+
url: 'https://accounts.twilio.com/v1/AuthTokens/Secondary',
|
|
23
|
+
))).to eq(true)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
it "receives create responses" do
|
|
27
|
+
@holodeck.mock(Twilio::Response.new(
|
|
28
|
+
201,
|
|
29
|
+
%q[
|
|
30
|
+
{
|
|
31
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
32
|
+
"date_created": "2015-07-31T04:00:00Z",
|
|
33
|
+
"date_updated": "2015-07-31T04:00:00Z",
|
|
34
|
+
"secondary_auth_token": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
|
|
35
|
+
"url": "https://accounts.twilio.com/v1/AuthTokens/Secondary"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
))
|
|
39
|
+
|
|
40
|
+
actual = @client.accounts.v1.secondary_auth_token().create()
|
|
41
|
+
|
|
42
|
+
expect(actual).to_not eq(nil)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
it "can delete" do
|
|
46
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
47
|
+
|
|
48
|
+
expect {
|
|
49
|
+
@client.accounts.v1.secondary_auth_token().delete()
|
|
50
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
|
51
|
+
|
|
52
|
+
expect(
|
|
53
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
54
|
+
method: 'delete',
|
|
55
|
+
url: 'https://accounts.twilio.com/v1/AuthTokens/Secondary',
|
|
56
|
+
))).to eq(true)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
it "receives delete responses" do
|
|
60
|
+
@holodeck.mock(Twilio::Response.new(
|
|
61
|
+
204,
|
|
62
|
+
nil,
|
|
63
|
+
))
|
|
64
|
+
|
|
65
|
+
actual = @client.accounts.v1.secondary_auth_token().delete()
|
|
66
|
+
|
|
67
|
+
expect(actual).to eq(true)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# \ / _ _ _| _ _
|
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
# / /
|
|
6
|
+
#
|
|
7
|
+
# frozen_string_literal: true
|
|
8
|
+
|
|
9
|
+
require 'spec_helper.rb'
|
|
10
|
+
|
|
11
|
+
describe 'Event' do
|
|
12
|
+
it "can read" do
|
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
14
|
+
|
|
15
|
+
expect {
|
|
16
|
+
@client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
17
|
+
.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
18
|
+
.events.list()
|
|
19
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
|
20
|
+
|
|
21
|
+
expect(
|
|
22
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
23
|
+
method: 'get',
|
|
24
|
+
url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events.json',
|
|
25
|
+
))).to eq(true)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
it "receives read_full responses" do
|
|
29
|
+
@holodeck.mock(Twilio::Response.new(
|
|
30
|
+
200,
|
|
31
|
+
%q[
|
|
32
|
+
{
|
|
33
|
+
"events": [
|
|
34
|
+
{
|
|
35
|
+
"request": {
|
|
36
|
+
"method": "POST",
|
|
37
|
+
"url": "https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
|
|
38
|
+
"parameters": {
|
|
39
|
+
"status_callback_method": "POST",
|
|
40
|
+
"twiml": "<Response><Say>Hi!</Say></Response>",
|
|
41
|
+
"trim": "trim-silence",
|
|
42
|
+
"timeout": "55",
|
|
43
|
+
"method": "POST",
|
|
44
|
+
"from": "+987654321",
|
|
45
|
+
"to": "+123456789",
|
|
46
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
47
|
+
"machine_detection_timeout": "0"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"response": {
|
|
51
|
+
"response_code": 201,
|
|
52
|
+
"request_duration": 50,
|
|
53
|
+
"content_type": "application/json",
|
|
54
|
+
"response_body": "{\\"sid\\": \\"CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\"}",
|
|
55
|
+
"date_created": "Tue, 11 Aug 2020 17:44:08 +0000"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"end": 0,
|
|
60
|
+
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events.json?PageSize=50&Page=0",
|
|
61
|
+
"next_page_uri": null,
|
|
62
|
+
"page": 0,
|
|
63
|
+
"page_size": 50,
|
|
64
|
+
"previous_page_uri": null,
|
|
65
|
+
"start": 0,
|
|
66
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events.json?PageSize=50&Page=0"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
))
|
|
70
|
+
|
|
71
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
72
|
+
.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
73
|
+
.events.list()
|
|
74
|
+
|
|
75
|
+
expect(actual).to_not eq(nil)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
it "receives read_empty responses" do
|
|
79
|
+
@holodeck.mock(Twilio::Response.new(
|
|
80
|
+
200,
|
|
81
|
+
%q[
|
|
82
|
+
{
|
|
83
|
+
"events": [],
|
|
84
|
+
"end": 0,
|
|
85
|
+
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events.json?PageSize=50&Page=0",
|
|
86
|
+
"next_page_uri": null,
|
|
87
|
+
"page": 0,
|
|
88
|
+
"page_size": 50,
|
|
89
|
+
"previous_page_uri": null,
|
|
90
|
+
"start": 0,
|
|
91
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events.json?PageSize=50&Page=0"
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
))
|
|
95
|
+
|
|
96
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
97
|
+
.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
98
|
+
.events.list()
|
|
99
|
+
|
|
100
|
+
expect(actual).to_not eq(nil)
|
|
101
|
+
end
|
|
102
|
+
end
|