twilio-ruby 5.13.0 → 5.14.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 +5 -5
- data/CHANGES.md +18 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +8 -8
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +1 -5
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +8 -8
- data/lib/twilio-ruby/rest/client.rb +7 -0
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/preview.rb +8 -21
- data/lib/twilio-ruby/rest/video/v1/composition.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +626 -0
- data/lib/twilio-ruby/rest/video/v1.rb +32 -16
- data/lib/twilio-ruby/rest/video.rb +18 -9
- data/lib/twilio-ruby/rest/{preview/permissions → voice/v1}/voice_permission/bulk_country_update.rb +12 -11
- data/lib/twilio-ruby/rest/{preview/permissions → voice/v1}/voice_permission/country/highrisk_special_prefix.rb +14 -14
- data/lib/twilio-ruby/rest/{preview/permissions → voice/v1}/voice_permission/country.rb +57 -45
- data/lib/twilio-ruby/rest/{preview/permissions → voice/v1}/voice_permission.rb +6 -6
- data/lib/twilio-ruby/rest/{preview/permissions.rb → voice/v1.rb} +6 -6
- data/lib/twilio-ruby/rest/voice.rb +44 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/video/v1/composition_hook_spec.rb +410 -0
- data/spec/integration/{preview/permissions → voice/v1}/voice_permission/bulk_country_update_spec.rb +5 -5
- data/spec/integration/{preview/permissions → voice/v1}/voice_permission/country/highrisk_special_prefix_spec.rb +9 -9
- data/spec/integration/{preview/permissions → voice/v1}/voice_permission/country_spec.rb +16 -16
- data/spec/integration/{preview/permissions → voice/v1}/voice_permission_spec.rb +0 -0
- metadata +20 -19
- data/lib/twilio-ruby/rest/preview/permissions/voice_permission/settings.rb +0 -197
- data/spec/integration/preview/permissions/voice_permission/settings_spec.rb +0 -77
data/spec/integration/{preview/permissions → voice/v1}/voice_permission/bulk_country_update_spec.rb
RENAMED
@@ -13,15 +13,15 @@ describe 'BulkCountryUpdate' do
|
|
13
13
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
14
|
|
15
15
|
expect {
|
16
|
-
@client.
|
17
|
-
|
16
|
+
@client.voice.v1.voice_permissions \
|
17
|
+
.bulk_country_updates.create(update_request: 'update_request')
|
18
18
|
}.to raise_exception(Twilio::REST::TwilioError)
|
19
19
|
|
20
20
|
values = {'UpdateRequest' => 'update_request', }
|
21
21
|
expect(
|
22
22
|
@holodeck.has_request?(Holodeck::Request.new(
|
23
23
|
method: 'post',
|
24
|
-
url: 'https://
|
24
|
+
url: 'https://voice.twilio.com/v1/DialingPermissions/BulkCountryUpdates',
|
25
25
|
data: values,
|
26
26
|
))).to eq(true)
|
27
27
|
end
|
@@ -37,8 +37,8 @@ describe 'BulkCountryUpdate' do
|
|
37
37
|
]
|
38
38
|
))
|
39
39
|
|
40
|
-
actual = @client.
|
41
|
-
|
40
|
+
actual = @client.voice.v1.voice_permissions \
|
41
|
+
.bulk_country_updates.create(update_request: 'update_request')
|
42
42
|
|
43
43
|
expect(actual).to_not eq(nil)
|
44
44
|
end
|
@@ -13,16 +13,16 @@ describe 'HighriskSpecialPrefix' do
|
|
13
13
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
14
|
|
15
15
|
expect {
|
16
|
-
@client.
|
17
|
-
|
18
|
-
|
16
|
+
@client.voice.v1.voice_permissions \
|
17
|
+
.countries('US') \
|
18
|
+
.highrisk_special_prefixes.list()
|
19
19
|
}.to raise_exception(Twilio::REST::TwilioError)
|
20
20
|
|
21
21
|
values = {}
|
22
22
|
expect(
|
23
23
|
@holodeck.has_request?(Holodeck::Request.new(
|
24
24
|
method: 'get',
|
25
|
-
url: 'https://
|
25
|
+
url: 'https://voice.twilio.com/v1/DialingPermissions/Countries/US/HighRiskSpecialPrefixes',
|
26
26
|
))).to eq(true)
|
27
27
|
end
|
28
28
|
|
@@ -40,21 +40,21 @@ describe 'HighriskSpecialPrefix' do
|
|
40
40
|
}
|
41
41
|
],
|
42
42
|
"meta": {
|
43
|
-
"first_page_url": "https://
|
43
|
+
"first_page_url": "https://voice.twilio.com/v1/DialingPermissions/Countries/LV/HighRiskSpecialPrefixes?PageSize=50&Page=0",
|
44
44
|
"key": "content",
|
45
45
|
"next_page_url": null,
|
46
46
|
"page": 0,
|
47
47
|
"page_size": 50,
|
48
48
|
"previous_page_url": null,
|
49
|
-
"url": "https://
|
49
|
+
"url": "https://voice.twilio.com/v1/DialingPermissions/Countries/LV/HighRiskSpecialPrefixes?PageSize=50&Page=0"
|
50
50
|
}
|
51
51
|
}
|
52
52
|
]
|
53
53
|
))
|
54
54
|
|
55
|
-
actual = @client.
|
56
|
-
|
57
|
-
|
55
|
+
actual = @client.voice.v1.voice_permissions \
|
56
|
+
.countries('US') \
|
57
|
+
.highrisk_special_prefixes.list()
|
58
58
|
|
59
59
|
expect(actual).to_not eq(nil)
|
60
60
|
end
|
@@ -13,15 +13,15 @@ describe 'Country' do
|
|
13
13
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
14
|
|
15
15
|
expect {
|
16
|
-
@client.
|
17
|
-
|
16
|
+
@client.voice.v1.voice_permissions \
|
17
|
+
.countries('US').fetch()
|
18
18
|
}.to raise_exception(Twilio::REST::TwilioError)
|
19
19
|
|
20
20
|
values = {}
|
21
21
|
expect(
|
22
22
|
@holodeck.has_request?(Holodeck::Request.new(
|
23
23
|
method: 'get',
|
24
|
-
url: 'https://
|
24
|
+
url: 'https://voice.twilio.com/v1/DialingPermissions/Countries/US',
|
25
25
|
))).to eq(true)
|
26
26
|
end
|
27
27
|
|
@@ -39,16 +39,16 @@ describe 'Country' do
|
|
39
39
|
"low_risk_numbers_enabled": false,
|
40
40
|
"high_risk_special_numbers_enabled": false,
|
41
41
|
"high_risk_tollfraud_numbers_enabled": false,
|
42
|
-
"url": "https://
|
42
|
+
"url": "https://voice.twilio.com/v1/DialingPermissions/Countries/US",
|
43
43
|
"links": {
|
44
|
-
"highrisk_special_prefixes": "https://
|
44
|
+
"highrisk_special_prefixes": "https://voice.twilio.com/v1/DialingPermissions/Countries/US/HighRiskSpecialPrefixes"
|
45
45
|
}
|
46
46
|
}
|
47
47
|
]
|
48
48
|
))
|
49
49
|
|
50
|
-
actual = @client.
|
51
|
-
|
50
|
+
actual = @client.voice.v1.voice_permissions \
|
51
|
+
.countries('US').fetch()
|
52
52
|
|
53
53
|
expect(actual).to_not eq(nil)
|
54
54
|
end
|
@@ -57,15 +57,15 @@ describe 'Country' do
|
|
57
57
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
58
58
|
|
59
59
|
expect {
|
60
|
-
@client.
|
61
|
-
|
60
|
+
@client.voice.v1.voice_permissions \
|
61
|
+
.countries.list()
|
62
62
|
}.to raise_exception(Twilio::REST::TwilioError)
|
63
63
|
|
64
64
|
values = {}
|
65
65
|
expect(
|
66
66
|
@holodeck.has_request?(Holodeck::Request.new(
|
67
67
|
method: 'get',
|
68
|
-
url: 'https://
|
68
|
+
url: 'https://voice.twilio.com/v1/DialingPermissions/Countries',
|
69
69
|
))).to eq(true)
|
70
70
|
end
|
71
71
|
|
@@ -85,27 +85,27 @@ describe 'Country' do
|
|
85
85
|
"low_risk_numbers_enabled": false,
|
86
86
|
"high_risk_special_numbers_enabled": false,
|
87
87
|
"high_risk_tollfraud_numbers_enabled": false,
|
88
|
-
"url": "https://
|
88
|
+
"url": "https://voice.twilio.com/v1/DialingPermissions/Countries/US",
|
89
89
|
"links": {
|
90
|
-
"highrisk_special_prefixes": "https://
|
90
|
+
"highrisk_special_prefixes": "https://voice.twilio.com/v1/DialingPermissions/Countries/US/HighRiskSpecialPrefixes"
|
91
91
|
}
|
92
92
|
}
|
93
93
|
],
|
94
94
|
"meta": {
|
95
|
-
"first_page_url": "https://
|
95
|
+
"first_page_url": "https://voice.twilio.com/v1/DialingPermissions/Countries?PageSize=50&Page=0",
|
96
96
|
"key": "content",
|
97
97
|
"next_page_url": null,
|
98
98
|
"page": 0,
|
99
99
|
"page_size": 50,
|
100
100
|
"previous_page_url": null,
|
101
|
-
"url": "https://
|
101
|
+
"url": "https://voice.twilio.com/v1/DialingPermissions/Countries?PageSize=50&Page=0"
|
102
102
|
}
|
103
103
|
}
|
104
104
|
]
|
105
105
|
))
|
106
106
|
|
107
|
-
actual = @client.
|
108
|
-
|
107
|
+
actual = @client.voice.v1.voice_permissions \
|
108
|
+
.countries.list()
|
109
109
|
|
110
110
|
expect(actual).to_not eq(nil)
|
111
111
|
end
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -333,12 +333,6 @@ files:
|
|
333
333
|
- lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb
|
334
334
|
- lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
|
335
335
|
- lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb
|
336
|
-
- lib/twilio-ruby/rest/preview/permissions.rb
|
337
|
-
- lib/twilio-ruby/rest/preview/permissions/voice_permission.rb
|
338
|
-
- lib/twilio-ruby/rest/preview/permissions/voice_permission/bulk_country_update.rb
|
339
|
-
- lib/twilio-ruby/rest/preview/permissions/voice_permission/country.rb
|
340
|
-
- lib/twilio-ruby/rest/preview/permissions/voice_permission/country/highrisk_special_prefix.rb
|
341
|
-
- lib/twilio-ruby/rest/preview/permissions/voice_permission/settings.rb
|
342
336
|
- lib/twilio-ruby/rest/preview/sync.rb
|
343
337
|
- lib/twilio-ruby/rest/preview/sync/service.rb
|
344
338
|
- lib/twilio-ruby/rest/preview/sync/service/document.rb
|
@@ -456,6 +450,7 @@ files:
|
|
456
450
|
- lib/twilio-ruby/rest/video.rb
|
457
451
|
- lib/twilio-ruby/rest/video/v1.rb
|
458
452
|
- lib/twilio-ruby/rest/video/v1/composition.rb
|
453
|
+
- lib/twilio-ruby/rest/video/v1/composition_hook.rb
|
459
454
|
- lib/twilio-ruby/rest/video/v1/composition_settings.rb
|
460
455
|
- lib/twilio-ruby/rest/video/v1/recording.rb
|
461
456
|
- lib/twilio-ruby/rest/video/v1/recording_settings.rb
|
@@ -464,6 +459,12 @@ files:
|
|
464
459
|
- lib/twilio-ruby/rest/video/v1/room/room_participant.rb
|
465
460
|
- lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb
|
466
461
|
- lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb
|
462
|
+
- lib/twilio-ruby/rest/voice.rb
|
463
|
+
- lib/twilio-ruby/rest/voice/v1.rb
|
464
|
+
- lib/twilio-ruby/rest/voice/v1/voice_permission.rb
|
465
|
+
- lib/twilio-ruby/rest/voice/v1/voice_permission/bulk_country_update.rb
|
466
|
+
- lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb
|
467
|
+
- lib/twilio-ruby/rest/voice/v1/voice_permission/country/highrisk_special_prefix.rb
|
467
468
|
- lib/twilio-ruby/rest/wireless.rb
|
468
469
|
- lib/twilio-ruby/rest/wireless/v1.rb
|
469
470
|
- lib/twilio-ruby/rest/wireless/v1/command.rb
|
@@ -634,11 +635,6 @@ files:
|
|
634
635
|
- spec/integration/preview/marketplace/available_add_on_spec.rb
|
635
636
|
- spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb
|
636
637
|
- spec/integration/preview/marketplace/installed_add_on_spec.rb
|
637
|
-
- spec/integration/preview/permissions/voice_permission/bulk_country_update_spec.rb
|
638
|
-
- spec/integration/preview/permissions/voice_permission/country/highrisk_special_prefix_spec.rb
|
639
|
-
- spec/integration/preview/permissions/voice_permission/country_spec.rb
|
640
|
-
- spec/integration/preview/permissions/voice_permission/settings_spec.rb
|
641
|
-
- spec/integration/preview/permissions/voice_permission_spec.rb
|
642
638
|
- spec/integration/preview/sync/service/document/document_permission_spec.rb
|
643
639
|
- spec/integration/preview/sync/service/document_spec.rb
|
644
640
|
- spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb
|
@@ -735,6 +731,7 @@ files:
|
|
735
731
|
- spec/integration/verify/v1/service/verification_check_spec.rb
|
736
732
|
- spec/integration/verify/v1/service/verification_spec.rb
|
737
733
|
- spec/integration/verify/v1/service_spec.rb
|
734
|
+
- spec/integration/video/v1/composition_hook_spec.rb
|
738
735
|
- spec/integration/video/v1/composition_settings_spec.rb
|
739
736
|
- spec/integration/video/v1/composition_spec.rb
|
740
737
|
- spec/integration/video/v1/recording_settings_spec.rb
|
@@ -744,6 +741,10 @@ files:
|
|
744
741
|
- spec/integration/video/v1/room/room_participant/room_participant_subscribed_track_spec.rb
|
745
742
|
- spec/integration/video/v1/room/room_participant_spec.rb
|
746
743
|
- spec/integration/video/v1/room_spec.rb
|
744
|
+
- spec/integration/voice/v1/voice_permission/bulk_country_update_spec.rb
|
745
|
+
- spec/integration/voice/v1/voice_permission/country/highrisk_special_prefix_spec.rb
|
746
|
+
- spec/integration/voice/v1/voice_permission/country_spec.rb
|
747
|
+
- spec/integration/voice/v1/voice_permission_spec.rb
|
747
748
|
- spec/integration/wireless/v1/command_spec.rb
|
748
749
|
- spec/integration/wireless/v1/rate_plan_spec.rb
|
749
750
|
- spec/integration/wireless/v1/sim/data_session_spec.rb
|
@@ -790,7 +791,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
790
791
|
version: '0'
|
791
792
|
requirements: []
|
792
793
|
rubyforge_project:
|
793
|
-
rubygems_version: 2.
|
794
|
+
rubygems_version: 2.7.6
|
794
795
|
signing_key:
|
795
796
|
specification_version: 4
|
796
797
|
summary: The official library for communicating with the Twilio REST API, building
|
@@ -951,11 +952,6 @@ test_files:
|
|
951
952
|
- spec/integration/preview/marketplace/available_add_on_spec.rb
|
952
953
|
- spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb
|
953
954
|
- spec/integration/preview/marketplace/installed_add_on_spec.rb
|
954
|
-
- spec/integration/preview/permissions/voice_permission/bulk_country_update_spec.rb
|
955
|
-
- spec/integration/preview/permissions/voice_permission/country/highrisk_special_prefix_spec.rb
|
956
|
-
- spec/integration/preview/permissions/voice_permission/country_spec.rb
|
957
|
-
- spec/integration/preview/permissions/voice_permission/settings_spec.rb
|
958
|
-
- spec/integration/preview/permissions/voice_permission_spec.rb
|
959
955
|
- spec/integration/preview/sync/service/document/document_permission_spec.rb
|
960
956
|
- spec/integration/preview/sync/service/document_spec.rb
|
961
957
|
- spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb
|
@@ -1052,6 +1048,7 @@ test_files:
|
|
1052
1048
|
- spec/integration/verify/v1/service/verification_check_spec.rb
|
1053
1049
|
- spec/integration/verify/v1/service/verification_spec.rb
|
1054
1050
|
- spec/integration/verify/v1/service_spec.rb
|
1051
|
+
- spec/integration/video/v1/composition_hook_spec.rb
|
1055
1052
|
- spec/integration/video/v1/composition_settings_spec.rb
|
1056
1053
|
- spec/integration/video/v1/composition_spec.rb
|
1057
1054
|
- spec/integration/video/v1/recording_settings_spec.rb
|
@@ -1061,6 +1058,10 @@ test_files:
|
|
1061
1058
|
- spec/integration/video/v1/room/room_participant/room_participant_subscribed_track_spec.rb
|
1062
1059
|
- spec/integration/video/v1/room/room_participant_spec.rb
|
1063
1060
|
- spec/integration/video/v1/room_spec.rb
|
1061
|
+
- spec/integration/voice/v1/voice_permission/bulk_country_update_spec.rb
|
1062
|
+
- spec/integration/voice/v1/voice_permission/country/highrisk_special_prefix_spec.rb
|
1063
|
+
- spec/integration/voice/v1/voice_permission/country_spec.rb
|
1064
|
+
- spec/integration/voice/v1/voice_permission_spec.rb
|
1064
1065
|
- spec/integration/wireless/v1/command_spec.rb
|
1065
1066
|
- spec/integration/wireless/v1/rate_plan_spec.rb
|
1066
1067
|
- spec/integration/wireless/v1/sim/data_session_spec.rb
|
@@ -1,197 +0,0 @@
|
|
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 Permissions < Version
|
13
|
-
class VoicePermissionList < ListResource
|
14
|
-
##
|
15
|
-
# 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.
|
16
|
-
class SettingsList < ListResource
|
17
|
-
##
|
18
|
-
# Initialize the SettingsList
|
19
|
-
# @param [Version] version Version that contains the resource
|
20
|
-
# @return [SettingsList] SettingsList
|
21
|
-
def initialize(version)
|
22
|
-
super(version)
|
23
|
-
|
24
|
-
# Path Solution
|
25
|
-
@solution = {}
|
26
|
-
end
|
27
|
-
|
28
|
-
##
|
29
|
-
# Provide a user friendly representation
|
30
|
-
def to_s
|
31
|
-
'#<Twilio.Preview.Permissions.SettingsList>'
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
##
|
36
|
-
# 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.
|
37
|
-
class SettingsPage < Page
|
38
|
-
##
|
39
|
-
# Initialize the SettingsPage
|
40
|
-
# @param [Version] version Version that contains the resource
|
41
|
-
# @param [Response] response Response from the API
|
42
|
-
# @param [Hash] solution Path solution for the resource
|
43
|
-
# @return [SettingsPage] SettingsPage
|
44
|
-
def initialize(version, response, solution)
|
45
|
-
super(version, response)
|
46
|
-
|
47
|
-
# Path Solution
|
48
|
-
@solution = solution
|
49
|
-
end
|
50
|
-
|
51
|
-
##
|
52
|
-
# Build an instance of SettingsInstance
|
53
|
-
# @param [Hash] payload Payload response from the API
|
54
|
-
# @return [SettingsInstance] SettingsInstance
|
55
|
-
def get_instance(payload)
|
56
|
-
SettingsInstance.new(@version, payload, )
|
57
|
-
end
|
58
|
-
|
59
|
-
##
|
60
|
-
# Provide a user friendly representation
|
61
|
-
def to_s
|
62
|
-
'<Twilio.Preview.Permissions.SettingsPage>'
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
##
|
67
|
-
# 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.
|
68
|
-
class SettingsContext < InstanceContext
|
69
|
-
##
|
70
|
-
# Initialize the SettingsContext
|
71
|
-
# @param [Version] version Version that contains the resource
|
72
|
-
# @return [SettingsContext] SettingsContext
|
73
|
-
def initialize(version)
|
74
|
-
super(version)
|
75
|
-
|
76
|
-
# Path Solution
|
77
|
-
@solution = {}
|
78
|
-
@uri = "/VoicePermissions/Settings"
|
79
|
-
end
|
80
|
-
|
81
|
-
##
|
82
|
-
# Fetch a SettingsInstance
|
83
|
-
# @return [SettingsInstance] Fetched SettingsInstance
|
84
|
-
def fetch
|
85
|
-
params = Twilio::Values.of({})
|
86
|
-
|
87
|
-
payload = @version.fetch(
|
88
|
-
'GET',
|
89
|
-
@uri,
|
90
|
-
params,
|
91
|
-
)
|
92
|
-
|
93
|
-
SettingsInstance.new(@version, payload, )
|
94
|
-
end
|
95
|
-
|
96
|
-
##
|
97
|
-
# Update the SettingsInstance
|
98
|
-
# @param [Boolean] inheritance Set true to enable inheritance of outbound voice
|
99
|
-
# permissions and blocklist, false to disable
|
100
|
-
# @return [SettingsInstance] Updated SettingsInstance
|
101
|
-
def update(inheritance: :unset)
|
102
|
-
data = Twilio::Values.of({'Inheritance' => inheritance, })
|
103
|
-
|
104
|
-
payload = @version.update(
|
105
|
-
'POST',
|
106
|
-
@uri,
|
107
|
-
data: data,
|
108
|
-
)
|
109
|
-
|
110
|
-
SettingsInstance.new(@version, payload, )
|
111
|
-
end
|
112
|
-
|
113
|
-
##
|
114
|
-
# Provide a user friendly representation
|
115
|
-
def to_s
|
116
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
117
|
-
"#<Twilio.Preview.Permissions.SettingsContext #{context}>"
|
118
|
-
end
|
119
|
-
end
|
120
|
-
|
121
|
-
##
|
122
|
-
# 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.
|
123
|
-
class SettingsInstance < InstanceResource
|
124
|
-
##
|
125
|
-
# Initialize the SettingsInstance
|
126
|
-
# @param [Version] version Version that contains the resource
|
127
|
-
# @param [Hash] payload payload that contains response from Twilio
|
128
|
-
# @return [SettingsInstance] SettingsInstance
|
129
|
-
def initialize(version, payload)
|
130
|
-
super(version)
|
131
|
-
|
132
|
-
# Marshaled Properties
|
133
|
-
@properties = {'inheritance' => payload['inheritance'], 'url' => payload['url'], }
|
134
|
-
|
135
|
-
# Context
|
136
|
-
@instance_context = nil
|
137
|
-
@params = {}
|
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 [SettingsContext] SettingsContext for this SettingsInstance
|
144
|
-
def context
|
145
|
-
unless @instance_context
|
146
|
-
@instance_context = SettingsContext.new(@version, )
|
147
|
-
end
|
148
|
-
@instance_context
|
149
|
-
end
|
150
|
-
|
151
|
-
##
|
152
|
-
# @return [Boolean] The status of inheritance of outbound voice permissions and blocklist
|
153
|
-
def inheritance
|
154
|
-
@properties['inheritance']
|
155
|
-
end
|
156
|
-
|
157
|
-
##
|
158
|
-
# @return [String] The url
|
159
|
-
def url
|
160
|
-
@properties['url']
|
161
|
-
end
|
162
|
-
|
163
|
-
##
|
164
|
-
# Fetch a SettingsInstance
|
165
|
-
# @return [SettingsInstance] Fetched SettingsInstance
|
166
|
-
def fetch
|
167
|
-
context.fetch
|
168
|
-
end
|
169
|
-
|
170
|
-
##
|
171
|
-
# Update the SettingsInstance
|
172
|
-
# @param [Boolean] inheritance Set true to enable inheritance of outbound voice
|
173
|
-
# permissions and blocklist, false to disable
|
174
|
-
# @return [SettingsInstance] Updated SettingsInstance
|
175
|
-
def update(inheritance: :unset)
|
176
|
-
context.update(inheritance: inheritance, )
|
177
|
-
end
|
178
|
-
|
179
|
-
##
|
180
|
-
# Provide a user friendly representation
|
181
|
-
def to_s
|
182
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
183
|
-
"<Twilio.Preview.Permissions.SettingsInstance #{values}>"
|
184
|
-
end
|
185
|
-
|
186
|
-
##
|
187
|
-
# Provide a detailed, user friendly representation
|
188
|
-
def inspect
|
189
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
190
|
-
"<Twilio.Preview.Permissions.SettingsInstance #{values}>"
|
191
|
-
end
|
192
|
-
end
|
193
|
-
end
|
194
|
-
end
|
195
|
-
end
|
196
|
-
end
|
197
|
-
end
|