twilio-ruby 5.11.1 → 5.11.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.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +18 -0
  3. data/README.md +3 -3
  4. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +24 -0
  5. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +133 -0
  6. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +161 -0
  7. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +349 -0
  8. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +349 -0
  9. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +135 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +349 -0
  11. data/lib/twilio-ruby/rest/preview.rb +8 -8
  12. data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
  13. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +3 -16
  14. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +42 -2
  15. data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +33 -0
  16. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +27 -19
  17. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb +11 -11
  18. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb +18 -18
  19. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb +17 -15
  20. data/lib/twilio-ruby/rest/video.rb +9 -9
  21. data/lib/twilio-ruby/rest/video/v1.rb +16 -16
  22. data/lib/twilio-ruby/rest/video/v1/room.rb +2 -1
  23. data/lib/twilio-ruby/twiml/voice_response.rb +20 -0
  24. data/lib/twilio-ruby/version.rb +1 -1
  25. data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping_spec.rb +220 -0
  26. data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping_spec.rb +220 -0
  27. data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_calls_mapping_spec.rb +12 -0
  28. data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping_spec.rb +220 -0
  29. data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping_spec.rb +12 -0
  30. data/spec/integration/api/v2010/account/sip/domain/auth_types_spec.rb +12 -0
  31. data/spec/integration/preview/understand/assistant_spec.rb +0 -4
  32. data/spec/integration/proxy/v1/service/phone_number_spec.rb +51 -3
  33. data/spec/integration/proxy/v1/service/short_code_spec.rb +50 -3
  34. metadata +21 -3
@@ -28,6 +28,15 @@ module Twilio
28
28
  @v1 ||= V1.new self
29
29
  end
30
30
 
31
+ ##
32
+ # @param [String] sid `CJxx…xx` A system-generated 34-character string that
33
+ # uniquely identifies this Composition.
34
+ # @return [Twilio::REST::Video::V1::CompositionInstance] if sid was passed.
35
+ # @return [Twilio::REST::Video::V1::CompositionList]
36
+ def compositions(sid=:unset)
37
+ self.v1.compositions(sid)
38
+ end
39
+
31
40
  ##
32
41
  # @return [Twilio::REST::Video::V1::CompositionSettingsInstance]
33
42
  def composition_settings
@@ -49,15 +58,6 @@ module Twilio
49
58
  self.v1.recording_settings()
50
59
  end
51
60
 
52
- ##
53
- # @param [String] sid `CJxx…xx` A system-generated 34-character string that
54
- # uniquely identifies this Composition.
55
- # @return [Twilio::REST::Video::V1::CompositionInstance] if sid was passed.
56
- # @return [Twilio::REST::Video::V1::CompositionList]
57
- def compositions(sid=:unset)
58
- self.v1.compositions(sid)
59
- end
60
-
61
61
  ##
62
62
  # @param [String] sid A system-generated 34-character string that uniquely
63
63
  # identifies this resource.
@@ -15,13 +15,28 @@ module Twilio
15
15
  def initialize(domain)
16
16
  super
17
17
  @version = 'v1'
18
+ @compositions = nil
18
19
  @composition_settings = nil
19
20
  @recordings = nil
20
21
  @recording_settings = nil
21
- @compositions = nil
22
22
  @rooms = nil
23
23
  end
24
24
 
25
+ ##
26
+ # @param [String] sid The Composition Sid that uniquely identifies the Composition
27
+ # to fetch.
28
+ # @return [Twilio::REST::Video::V1::CompositionContext] if sid was passed.
29
+ # @return [Twilio::REST::Video::V1::CompositionList]
30
+ def compositions(sid=:unset)
31
+ if sid.nil?
32
+ raise ArgumentError, 'sid cannot be nil'
33
+ elsif sid == :unset
34
+ @compositions ||= CompositionList.new self
35
+ else
36
+ CompositionContext.new(self, sid)
37
+ end
38
+ end
39
+
25
40
  ##
26
41
  # @return [Twilio::REST::Video::V1::CompositionSettingsContext]
27
42
  def composition_settings
@@ -49,21 +64,6 @@ module Twilio
49
64
  @recording_settings ||= RecordingSettingsContext.new self
50
65
  end
51
66
 
52
- ##
53
- # @param [String] sid The Composition Sid that uniquely identifies the Composition
54
- # to fetch.
55
- # @return [Twilio::REST::Video::V1::CompositionContext] if sid was passed.
56
- # @return [Twilio::REST::Video::V1::CompositionList]
57
- def compositions(sid=:unset)
58
- if sid.nil?
59
- raise ArgumentError, 'sid cannot be nil'
60
- elsif sid == :unset
61
- @compositions ||= CompositionList.new self
62
- else
63
- CompositionContext.new(self, sid)
64
- end
65
- end
66
-
67
67
  ##
68
68
  # @param [String] sid The Room Sid or name that uniquely identifies this resource.
69
69
  # @return [Twilio::REST::Video::V1::RoomContext] if sid was passed.
@@ -38,7 +38,8 @@ module Twilio
38
38
  # @param [String] status_callback_method HTTP method Twilio should use when
39
39
  # requesting the above URL. Defaults to `POST`.
40
40
  # @param [String] max_participants Maximum number of Participants in the Room.
41
- # peer-to-peer rooms can have a maximum of 10 Participants.
41
+ # Peer-to-peer rooms can have a maximum of 10 Participants. Small Group rooms can
42
+ # have a max of 4 Participants. Group rooms can have a max of 50 Participants
42
43
  # @param [Boolean] record_participants_on_connect Start Participant recording when
43
44
  # connected. ***This feature is not available in `peer-to-peer` rooms.***
44
45
  # @param [room.VideoCodec] video_codecs An array of video codecs supported when
@@ -235,6 +235,15 @@ module Twilio
235
235
  append(SsmlEmphasis.new(words, level: level, **keyword_args))
236
236
  end
237
237
 
238
+ ##
239
+ # Create a new <Lang> element
240
+ # words:: Words to speak
241
+ # xml:lang:: Specify the language
242
+ # keyword_args:: additional attributes
243
+ def lang(words, xmlLang: nil, **keyword_args)
244
+ append(SsmlLang.new(words, xmlLang: xmlLang, **keyword_args))
245
+ end
246
+
238
247
  ##
239
248
  # Create a new <P> element
240
249
  # words:: Words to speak
@@ -378,6 +387,17 @@ module Twilio
378
387
  end
379
388
  end
380
389
 
390
+ ##
391
+ # Specifying Another Language for Specific Words in <Say>
392
+ class SsmlLang < TwiML
393
+ def initialize(words, **keyword_args)
394
+ super(**keyword_args)
395
+ @name = 'lang'
396
+ @value = words
397
+ yield(self) if block_given?
398
+ end
399
+ end
400
+
381
401
  ##
382
402
  # Emphasizing Words in <Say>
383
403
  class SsmlEmphasis < TwiML
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.11.1'
2
+ VERSION = '5.11.2'
3
3
  end
@@ -0,0 +1,220 @@
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 'AuthCallsCredentialListMapping' do
12
+ it "can create" do
13
+ @holodeck.mock(Twilio::Response.new(500, ''))
14
+
15
+ expect {
16
+ @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
17
+ .sip \
18
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
19
+ .auth \
20
+ .calls \
21
+ .credential_list_mappings.create(credential_list_sid: 'CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
22
+ }.to raise_exception(Twilio::REST::TwilioError)
23
+
24
+ values = {'CredentialListSid' => 'CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', }
25
+ expect(
26
+ @holodeck.has_request?(Holodeck::Request.new(
27
+ method: 'post',
28
+ url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Auth/Calls/CredentialListMappings.json',
29
+ data: values,
30
+ ))).to eq(true)
31
+ end
32
+
33
+ it "receives create responses" do
34
+ @holodeck.mock(Twilio::Response.new(
35
+ 201,
36
+ %q[
37
+ {
38
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
39
+ "date_created": "Thu, 30 Jul 2015 20:00:00 +0000",
40
+ "date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",
41
+ "friendly_name": "friendly_name",
42
+ "sid": "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
43
+ }
44
+ ]
45
+ ))
46
+
47
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
48
+ .sip \
49
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
50
+ .auth \
51
+ .calls \
52
+ .credential_list_mappings.create(credential_list_sid: 'CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
53
+
54
+ expect(actual).to_not eq(nil)
55
+ end
56
+
57
+ it "can read" do
58
+ @holodeck.mock(Twilio::Response.new(500, ''))
59
+
60
+ expect {
61
+ @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
62
+ .sip \
63
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
64
+ .auth \
65
+ .calls \
66
+ .credential_list_mappings.list()
67
+ }.to raise_exception(Twilio::REST::TwilioError)
68
+
69
+ values = {}
70
+ expect(
71
+ @holodeck.has_request?(Holodeck::Request.new(
72
+ method: 'get',
73
+ url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Auth/Calls/CredentialListMappings.json',
74
+ ))).to eq(true)
75
+ end
76
+
77
+ it "receives read_empty responses" do
78
+ @holodeck.mock(Twilio::Response.new(
79
+ 200,
80
+ %q[
81
+ {
82
+ "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Auth/Calls/CredentialListMappings.json?PageSize=50&Page=0",
83
+ "end": 0,
84
+ "previous_page_uri": null,
85
+ "contents": [],
86
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Auth/Calls/CredentialListMappings.json?PageSize=50&Page=0",
87
+ "page_size": 50,
88
+ "start": 0,
89
+ "next_page_uri": null,
90
+ "page": 0
91
+ }
92
+ ]
93
+ ))
94
+
95
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
96
+ .sip \
97
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
98
+ .auth \
99
+ .calls \
100
+ .credential_list_mappings.list()
101
+
102
+ expect(actual).to_not eq(nil)
103
+ end
104
+
105
+ it "receives read_full responses" do
106
+ @holodeck.mock(Twilio::Response.new(
107
+ 200,
108
+ %q[
109
+ {
110
+ "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Auth/Calls/CredentialListMappings.json?PageSize=50&Page=0",
111
+ "end": 0,
112
+ "previous_page_uri": null,
113
+ "contents": [
114
+ {
115
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
116
+ "date_created": "Thu, 30 Jul 2015 20:00:00 +0000",
117
+ "date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",
118
+ "friendly_name": "friendly_name",
119
+ "sid": "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
120
+ }
121
+ ],
122
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Auth/Calls/CredentialListMappings.json?PageSize=50&Page=0",
123
+ "page_size": 50,
124
+ "start": 0,
125
+ "next_page_uri": null,
126
+ "page": 0
127
+ }
128
+ ]
129
+ ))
130
+
131
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
132
+ .sip \
133
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
134
+ .auth \
135
+ .calls \
136
+ .credential_list_mappings.list()
137
+
138
+ expect(actual).to_not eq(nil)
139
+ end
140
+
141
+ it "can fetch" do
142
+ @holodeck.mock(Twilio::Response.new(500, ''))
143
+
144
+ expect {
145
+ @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
146
+ .sip \
147
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
148
+ .auth \
149
+ .calls \
150
+ .credential_list_mappings('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
151
+ }.to raise_exception(Twilio::REST::TwilioError)
152
+
153
+ values = {}
154
+ expect(
155
+ @holodeck.has_request?(Holodeck::Request.new(
156
+ method: 'get',
157
+ url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Auth/Calls/CredentialListMappings/CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json',
158
+ ))).to eq(true)
159
+ end
160
+
161
+ it "receives fetch responses" do
162
+ @holodeck.mock(Twilio::Response.new(
163
+ 200,
164
+ %q[
165
+ {
166
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
167
+ "date_created": "Thu, 30 Jul 2015 20:00:00 +0000",
168
+ "date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",
169
+ "friendly_name": "friendly_name",
170
+ "sid": "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
171
+ }
172
+ ]
173
+ ))
174
+
175
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
176
+ .sip \
177
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
178
+ .auth \
179
+ .calls \
180
+ .credential_list_mappings('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
181
+
182
+ expect(actual).to_not eq(nil)
183
+ end
184
+
185
+ it "can delete" do
186
+ @holodeck.mock(Twilio::Response.new(500, ''))
187
+
188
+ expect {
189
+ @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
190
+ .sip \
191
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
192
+ .auth \
193
+ .calls \
194
+ .credential_list_mappings('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
195
+ }.to raise_exception(Twilio::REST::TwilioError)
196
+
197
+ values = {}
198
+ expect(
199
+ @holodeck.has_request?(Holodeck::Request.new(
200
+ method: 'delete',
201
+ url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Auth/Calls/CredentialListMappings/CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json',
202
+ ))).to eq(true)
203
+ end
204
+
205
+ it "receives delete responses" do
206
+ @holodeck.mock(Twilio::Response.new(
207
+ 204,
208
+ nil,
209
+ ))
210
+
211
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
212
+ .sip \
213
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
214
+ .auth \
215
+ .calls \
216
+ .credential_list_mappings('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
217
+
218
+ expect(actual).to eq(true)
219
+ end
220
+ end
@@ -0,0 +1,220 @@
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 'AuthCallsIpAccessControlListMapping' do
12
+ it "can create" do
13
+ @holodeck.mock(Twilio::Response.new(500, ''))
14
+
15
+ expect {
16
+ @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
17
+ .sip \
18
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
19
+ .auth \
20
+ .calls \
21
+ .ip_access_control_list_mappings.create(ip_access_control_list_sid: 'ALXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
22
+ }.to raise_exception(Twilio::REST::TwilioError)
23
+
24
+ values = {'IpAccessControlListSid' => 'ALXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', }
25
+ expect(
26
+ @holodeck.has_request?(Holodeck::Request.new(
27
+ method: 'post',
28
+ url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Auth/Calls/IpAccessControlListMappings.json',
29
+ data: values,
30
+ ))).to eq(true)
31
+ end
32
+
33
+ it "receives create responses" do
34
+ @holodeck.mock(Twilio::Response.new(
35
+ 201,
36
+ %q[
37
+ {
38
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
39
+ "date_created": "Thu, 30 Jul 2015 20:00:00 +0000",
40
+ "date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",
41
+ "friendly_name": "friendly_name",
42
+ "sid": "ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
43
+ }
44
+ ]
45
+ ))
46
+
47
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
48
+ .sip \
49
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
50
+ .auth \
51
+ .calls \
52
+ .ip_access_control_list_mappings.create(ip_access_control_list_sid: 'ALXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
53
+
54
+ expect(actual).to_not eq(nil)
55
+ end
56
+
57
+ it "can read" do
58
+ @holodeck.mock(Twilio::Response.new(500, ''))
59
+
60
+ expect {
61
+ @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
62
+ .sip \
63
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
64
+ .auth \
65
+ .calls \
66
+ .ip_access_control_list_mappings.list()
67
+ }.to raise_exception(Twilio::REST::TwilioError)
68
+
69
+ values = {}
70
+ expect(
71
+ @holodeck.has_request?(Holodeck::Request.new(
72
+ method: 'get',
73
+ url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Auth/Calls/IpAccessControlListMappings.json',
74
+ ))).to eq(true)
75
+ end
76
+
77
+ it "receives read_empty responses" do
78
+ @holodeck.mock(Twilio::Response.new(
79
+ 200,
80
+ %q[
81
+ {
82
+ "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Auth/Calls/IpAccessControlListMappings.json?PageSize=50&Page=0",
83
+ "end": 0,
84
+ "previous_page_uri": null,
85
+ "contents": [],
86
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Auth/Calls/IpAccessControlListMappings.json?PageSize=50&Page=0",
87
+ "page_size": 50,
88
+ "start": 0,
89
+ "next_page_uri": null,
90
+ "page": 0
91
+ }
92
+ ]
93
+ ))
94
+
95
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
96
+ .sip \
97
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
98
+ .auth \
99
+ .calls \
100
+ .ip_access_control_list_mappings.list()
101
+
102
+ expect(actual).to_not eq(nil)
103
+ end
104
+
105
+ it "receives read_full responses" do
106
+ @holodeck.mock(Twilio::Response.new(
107
+ 200,
108
+ %q[
109
+ {
110
+ "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Auth/Calls/IpAccessControlListMappings.json?PageSize=50&Page=0",
111
+ "end": 0,
112
+ "previous_page_uri": null,
113
+ "contents": [
114
+ {
115
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
116
+ "date_created": "Thu, 30 Jul 2015 20:00:00 +0000",
117
+ "date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",
118
+ "friendly_name": "friendly_name",
119
+ "sid": "ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
120
+ }
121
+ ],
122
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Auth/Calls/IpAccessControlListMappings.json?PageSize=50&Page=0",
123
+ "page_size": 50,
124
+ "start": 0,
125
+ "next_page_uri": null,
126
+ "page": 0
127
+ }
128
+ ]
129
+ ))
130
+
131
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
132
+ .sip \
133
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
134
+ .auth \
135
+ .calls \
136
+ .ip_access_control_list_mappings.list()
137
+
138
+ expect(actual).to_not eq(nil)
139
+ end
140
+
141
+ it "can fetch" do
142
+ @holodeck.mock(Twilio::Response.new(500, ''))
143
+
144
+ expect {
145
+ @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
146
+ .sip \
147
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
148
+ .auth \
149
+ .calls \
150
+ .ip_access_control_list_mappings('ALXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
151
+ }.to raise_exception(Twilio::REST::TwilioError)
152
+
153
+ values = {}
154
+ expect(
155
+ @holodeck.has_request?(Holodeck::Request.new(
156
+ method: 'get',
157
+ url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Auth/Calls/IpAccessControlListMappings/ALXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json',
158
+ ))).to eq(true)
159
+ end
160
+
161
+ it "receives fetch responses" do
162
+ @holodeck.mock(Twilio::Response.new(
163
+ 200,
164
+ %q[
165
+ {
166
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
167
+ "date_created": "Thu, 30 Jul 2015 20:00:00 +0000",
168
+ "date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",
169
+ "friendly_name": "friendly_name",
170
+ "sid": "ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
171
+ }
172
+ ]
173
+ ))
174
+
175
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
176
+ .sip \
177
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
178
+ .auth \
179
+ .calls \
180
+ .ip_access_control_list_mappings('ALXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
181
+
182
+ expect(actual).to_not eq(nil)
183
+ end
184
+
185
+ it "can delete" do
186
+ @holodeck.mock(Twilio::Response.new(500, ''))
187
+
188
+ expect {
189
+ @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
190
+ .sip \
191
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
192
+ .auth \
193
+ .calls \
194
+ .ip_access_control_list_mappings('ALXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
195
+ }.to raise_exception(Twilio::REST::TwilioError)
196
+
197
+ values = {}
198
+ expect(
199
+ @holodeck.has_request?(Holodeck::Request.new(
200
+ method: 'delete',
201
+ url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Auth/Calls/IpAccessControlListMappings/ALXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json',
202
+ ))).to eq(true)
203
+ end
204
+
205
+ it "receives delete responses" do
206
+ @holodeck.mock(Twilio::Response.new(
207
+ 204,
208
+ nil,
209
+ ))
210
+
211
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
212
+ .sip \
213
+ .domains('SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
214
+ .auth \
215
+ .calls \
216
+ .ip_access_control_list_mappings('ALXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
217
+
218
+ expect(actual).to eq(true)
219
+ end
220
+ end