twilio-ruby 5.34.0 → 5.38.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +126 -0
- data/README.md +24 -3
- data/lib/twilio-ruby.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +87 -87
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +47 -9
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +71 -71
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +29 -29
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +38 -3
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +12 -12
- data/lib/twilio-ruby/rest/autopilot.rb +6 -0
- data/lib/twilio-ruby/rest/autopilot/v1.rb +7 -0
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -16
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +12 -3
- data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +198 -0
- data/lib/twilio-ruby/rest/client.rb +35 -15
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +28 -3
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +27 -4
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +2 -1
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +6 -3
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +8 -8
- data/lib/twilio-ruby/rest/notify/v1/service.rb +20 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +26 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +324 -0
- data/lib/twilio-ruby/rest/preview.rb +6 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +7 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb +193 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +26 -0
- data/lib/twilio-ruby/rest/{autopilot/v1/assistant/export_assistant.rb → preview/trusted_comms/business/brand.rb} +88 -71
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +266 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +194 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +7 -0
- data/lib/twilio-ruby/rest/supersim.rb +18 -0
- data/lib/twilio-ruby/rest/supersim/v1.rb +30 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +63 -16
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +315 -0
- data/lib/twilio-ruby/rest/{authy/v1/service.rb → supersim/v1/network_access_profile.rb} +95 -121
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +352 -0
- data/lib/twilio-ruby/rest/verify.rb +9 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +16 -0
- data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/form.rb +8 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +74 -3
- data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity.rb +32 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb +141 -0
- data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor.rb +8 -8
- data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor/challenge.rb +8 -8
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +425 -0
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +8 -4
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +8 -4
- data/lib/twilio-ruby/rest/voice.rb +36 -0
- data/lib/twilio-ruby/rest/voice/v1.rb +64 -0
- data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +513 -0
- data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +379 -0
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +458 -0
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +366 -0
- data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +346 -0
- data/lib/twilio-ruby/util/configuration.rb +9 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call_spec.rb +5 -5
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +177 -0
- data/spec/integration/api/v2010/account/conference_spec.rb +42 -14
- data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +8 -14
- data/spec/integration/api/v2010/account/sip/domain_spec.rb +12 -4
- data/spec/integration/api/v2010/account/token_spec.rb +23 -11
- data/spec/integration/api/v2010/account/validation_request_spec.rb +1 -1
- data/spec/integration/autopilot/v1/assistant/query_spec.rb +4 -4
- data/spec/integration/autopilot/v1/assistant_spec.rb +4 -8
- data/spec/integration/autopilot/v1/restore_assistant_spec.rb +53 -0
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +7 -0
- data/spec/integration/conversations/v1/conversation_spec.rb +16 -0
- data/spec/integration/flex_api/v1/configuration_spec.rb +3 -0
- data/spec/integration/numbers/v2/regulatory_compliance/bundle/evaluation_spec.rb +623 -0
- data/spec/integration/numbers/v2/regulatory_compliance/bundle_spec.rb +4 -0
- data/spec/integration/preview/trusted_comms/brands_information_spec.rb +44 -0
- data/spec/integration/preview/trusted_comms/business/brand/branded_channel/channel_spec.rb +54 -0
- data/spec/integration/preview/trusted_comms/business/brand/branded_channel_spec.rb +52 -0
- data/spec/integration/preview/trusted_comms/business/brand_spec.rb +49 -0
- data/spec/integration/preview/trusted_comms/business_spec.rb +1 -0
- data/spec/integration/serverless/v1/service/environment/log_spec.rb +1 -0
- data/spec/integration/supersim/v1/fleet_spec.rb +16 -7
- data/spec/integration/supersim/v1/network_access_profile/network_access_profile_network_spec.rb +179 -0
- data/spec/integration/supersim/v1/network_access_profile_spec.rb +223 -0
- data/spec/integration/supersim/v1/network_spec.rb +139 -0
- data/spec/integration/supersim/v1/sim_spec.rb +78 -6
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +13 -13
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +23 -23
- data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +28 -28
- data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +17 -17
- data/spec/integration/trunking/v1/trunk_spec.rb +33 -33
- data/spec/integration/{authy/v1 → verify/v2}/form_spec.rb +4 -4
- data/spec/integration/verify/v2/service/entity/access_token_spec.rb +46 -0
- data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor/challenge_spec.rb +73 -73
- data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor_spec.rb +54 -54
- data/spec/integration/verify/v2/service/entity_spec.rb +204 -0
- data/spec/integration/verify/v2/service/webhook_spec.rb +262 -0
- data/spec/integration/verify/v2/service_spec.rb +32 -4
- data/spec/integration/voice/v1/byoc_trunk_spec.rb +250 -0
- data/spec/integration/voice/v1/connection_policy/connection_policy_target_spec.rb +246 -0
- data/spec/integration/voice/v1/connection_policy_spec.rb +226 -0
- data/spec/integration/voice/v1/ip_record_spec.rb +223 -0
- data/spec/integration/voice/v1/source_ip_mapping_spec.rb +219 -0
- data/spec/rest/client_spec.rb +168 -58
- data/spec/util/configuration_spec.rb +12 -0
- data/twilio-ruby.gemspec +1 -1
- metadata +63 -23
- data/lib/twilio-ruby/rest/authy.rb +0 -55
- data/lib/twilio-ruby/rest/authy/v1.rb +0 -59
- data/spec/integration/authy/v1/service/entity_spec.rb +0 -201
- data/spec/integration/authy/v1/service_spec.rb +0 -231
- data/spec/integration/autopilot/v1/assistant/export_assistant_spec.rb +0 -49
@@ -0,0 +1,223 @@
|
|
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 'NetworkAccessProfile' do
|
12
|
+
it "can create" do
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
+
|
15
|
+
expect {
|
16
|
+
@client.supersim.v1.network_access_profiles.create()
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
18
|
+
|
19
|
+
values = {}
|
20
|
+
expect(
|
21
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
22
|
+
method: 'post',
|
23
|
+
url: 'https://supersim.twilio.com/v1/NetworkAccessProfiles',
|
24
|
+
))).to eq(true)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "receives create_minimal responses" do
|
28
|
+
@holodeck.mock(Twilio::Response.new(
|
29
|
+
201,
|
30
|
+
%q[
|
31
|
+
{
|
32
|
+
"unique_name": null,
|
33
|
+
"sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
34
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
35
|
+
"date_created": "2020-05-01T20:00:00Z",
|
36
|
+
"date_updated": "2020-05-01T20:00:00Z",
|
37
|
+
"url": "https://supersim.twilio.com/v1/NetworkAccessProfiles/HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
38
|
+
"links": {
|
39
|
+
"networks": "https://supersim.twilio.com/v1/NetworkAccessProfiles/HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Networks"
|
40
|
+
}
|
41
|
+
}
|
42
|
+
]
|
43
|
+
))
|
44
|
+
|
45
|
+
actual = @client.supersim.v1.network_access_profiles.create()
|
46
|
+
|
47
|
+
expect(actual).to_not eq(nil)
|
48
|
+
end
|
49
|
+
|
50
|
+
it "receives create_with_name_and_networks responses" do
|
51
|
+
@holodeck.mock(Twilio::Response.new(
|
52
|
+
201,
|
53
|
+
%q[
|
54
|
+
{
|
55
|
+
"unique_name": "My Network Access Profile",
|
56
|
+
"sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
57
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
58
|
+
"date_created": "2020-05-01T20:00:00Z",
|
59
|
+
"date_updated": "2020-05-01T20:00:00Z",
|
60
|
+
"url": "https://supersim.twilio.com/v1/NetworkAccessProfiles/HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
61
|
+
"links": {
|
62
|
+
"networks": "https://supersim.twilio.com/v1/NetworkAccessProfiles/HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Networks"
|
63
|
+
}
|
64
|
+
}
|
65
|
+
]
|
66
|
+
))
|
67
|
+
|
68
|
+
actual = @client.supersim.v1.network_access_profiles.create()
|
69
|
+
|
70
|
+
expect(actual).to_not eq(nil)
|
71
|
+
end
|
72
|
+
|
73
|
+
it "can fetch" do
|
74
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
75
|
+
|
76
|
+
expect {
|
77
|
+
@client.supersim.v1.network_access_profiles('HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
78
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
79
|
+
|
80
|
+
values = {}
|
81
|
+
expect(
|
82
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
83
|
+
method: 'get',
|
84
|
+
url: 'https://supersim.twilio.com/v1/NetworkAccessProfiles/HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
85
|
+
))).to eq(true)
|
86
|
+
end
|
87
|
+
|
88
|
+
it "receives fetch responses" do
|
89
|
+
@holodeck.mock(Twilio::Response.new(
|
90
|
+
200,
|
91
|
+
%q[
|
92
|
+
{
|
93
|
+
"unique_name": "My Network Access Profile",
|
94
|
+
"sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
95
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
96
|
+
"date_created": "2020-05-01T20:00:00Z",
|
97
|
+
"date_updated": "2020-05-01T20:00:00Z",
|
98
|
+
"url": "https://supersim.twilio.com/v1/NetworkAccessProfiles/HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
99
|
+
"links": {
|
100
|
+
"networks": "https://supersim.twilio.com/v1/NetworkAccessProfiles/HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Networks"
|
101
|
+
}
|
102
|
+
}
|
103
|
+
]
|
104
|
+
))
|
105
|
+
|
106
|
+
actual = @client.supersim.v1.network_access_profiles('HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
107
|
+
|
108
|
+
expect(actual).to_not eq(nil)
|
109
|
+
end
|
110
|
+
|
111
|
+
it "can update" do
|
112
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
113
|
+
|
114
|
+
expect {
|
115
|
+
@client.supersim.v1.network_access_profiles('HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
116
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
117
|
+
|
118
|
+
values = {}
|
119
|
+
expect(
|
120
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
121
|
+
method: 'post',
|
122
|
+
url: 'https://supersim.twilio.com/v1/NetworkAccessProfiles/HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
123
|
+
))).to eq(true)
|
124
|
+
end
|
125
|
+
|
126
|
+
it "receives update_unique_name responses" do
|
127
|
+
@holodeck.mock(Twilio::Response.new(
|
128
|
+
200,
|
129
|
+
%q[
|
130
|
+
{
|
131
|
+
"unique_name": "My Network Access Profile",
|
132
|
+
"sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
133
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
134
|
+
"date_created": "2020-05-01T20:00:00Z",
|
135
|
+
"date_updated": "2020-05-01T20:00:00Z",
|
136
|
+
"url": "https://supersim.twilio.com/v1/NetworkAccessProfiles/HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
137
|
+
"links": {
|
138
|
+
"networks": "https://supersim.twilio.com/v1/NetworkAccessProfiles/HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Networks"
|
139
|
+
}
|
140
|
+
}
|
141
|
+
]
|
142
|
+
))
|
143
|
+
|
144
|
+
actual = @client.supersim.v1.network_access_profiles('HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
145
|
+
|
146
|
+
expect(actual).to_not eq(nil)
|
147
|
+
end
|
148
|
+
|
149
|
+
it "can read" do
|
150
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
151
|
+
|
152
|
+
expect {
|
153
|
+
@client.supersim.v1.network_access_profiles.list()
|
154
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
155
|
+
|
156
|
+
values = {}
|
157
|
+
expect(
|
158
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
159
|
+
method: 'get',
|
160
|
+
url: 'https://supersim.twilio.com/v1/NetworkAccessProfiles',
|
161
|
+
))).to eq(true)
|
162
|
+
end
|
163
|
+
|
164
|
+
it "receives read_empty responses" do
|
165
|
+
@holodeck.mock(Twilio::Response.new(
|
166
|
+
200,
|
167
|
+
%q[
|
168
|
+
{
|
169
|
+
"network_access_profiles": [],
|
170
|
+
"meta": {
|
171
|
+
"first_page_url": "https://supersim.twilio.com/v1/NetworkAccessProfiles?PageSize=50&Page=0",
|
172
|
+
"key": "network_access_profiles",
|
173
|
+
"next_page_url": null,
|
174
|
+
"page": 0,
|
175
|
+
"page_size": 50,
|
176
|
+
"previous_page_url": null,
|
177
|
+
"url": "https://supersim.twilio.com/v1/NetworkAccessProfiles?PageSize=50&Page=0"
|
178
|
+
}
|
179
|
+
}
|
180
|
+
]
|
181
|
+
))
|
182
|
+
|
183
|
+
actual = @client.supersim.v1.network_access_profiles.list()
|
184
|
+
|
185
|
+
expect(actual).to_not eq(nil)
|
186
|
+
end
|
187
|
+
|
188
|
+
it "receives read_full responses" do
|
189
|
+
@holodeck.mock(Twilio::Response.new(
|
190
|
+
200,
|
191
|
+
%q[
|
192
|
+
{
|
193
|
+
"meta": {
|
194
|
+
"first_page_url": "https://supersim.twilio.com/v1/NetworkAccessProfiles?PageSize=50&Page=0",
|
195
|
+
"key": "network_access_profiles",
|
196
|
+
"next_page_url": null,
|
197
|
+
"page": 0,
|
198
|
+
"page_size": 50,
|
199
|
+
"previous_page_url": null,
|
200
|
+
"url": "https://supersim.twilio.com/v1/NetworkAccessProfiles?PageSize=50&Page=0"
|
201
|
+
},
|
202
|
+
"network_access_profiles": [
|
203
|
+
{
|
204
|
+
"unique_name": "My Network Access Profile",
|
205
|
+
"sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
206
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
207
|
+
"date_created": "2020-05-01T20:00:00Z",
|
208
|
+
"date_updated": "2020-05-01T20:00:00Z",
|
209
|
+
"url": "https://supersim.twilio.com/v1/NetworkAccessProfiles/HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
210
|
+
"links": {
|
211
|
+
"networks": "https://supersim.twilio.com/v1/NetworkAccessProfiles/HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Networks"
|
212
|
+
}
|
213
|
+
}
|
214
|
+
]
|
215
|
+
}
|
216
|
+
]
|
217
|
+
))
|
218
|
+
|
219
|
+
actual = @client.supersim.v1.network_access_profiles.list()
|
220
|
+
|
221
|
+
expect(actual).to_not eq(nil)
|
222
|
+
end
|
223
|
+
end
|
@@ -0,0 +1,139 @@
|
|
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 'Network' do
|
12
|
+
it "can fetch" do
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
+
|
15
|
+
expect {
|
16
|
+
@client.supersim.v1.networks('HWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
18
|
+
|
19
|
+
values = {}
|
20
|
+
expect(
|
21
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
22
|
+
method: 'get',
|
23
|
+
url: 'https://supersim.twilio.com/v1/Networks/HWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
24
|
+
))).to eq(true)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "receives fetch responses" do
|
28
|
+
@holodeck.mock(Twilio::Response.new(
|
29
|
+
200,
|
30
|
+
%q[
|
31
|
+
{
|
32
|
+
"friendly_name": "AT&T",
|
33
|
+
"iso_country": "US",
|
34
|
+
"identifiers": [
|
35
|
+
{
|
36
|
+
"mcc": "310",
|
37
|
+
"mnc": "410"
|
38
|
+
}
|
39
|
+
],
|
40
|
+
"sid": "HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
41
|
+
"url": "https://supersim.twilio.com/v1/Networks/HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
42
|
+
}
|
43
|
+
]
|
44
|
+
))
|
45
|
+
|
46
|
+
actual = @client.supersim.v1.networks('HWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
47
|
+
|
48
|
+
expect(actual).to_not eq(nil)
|
49
|
+
end
|
50
|
+
|
51
|
+
it "can read" do
|
52
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
53
|
+
|
54
|
+
expect {
|
55
|
+
@client.supersim.v1.networks.list()
|
56
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
57
|
+
|
58
|
+
values = {}
|
59
|
+
expect(
|
60
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
61
|
+
method: 'get',
|
62
|
+
url: 'https://supersim.twilio.com/v1/Networks',
|
63
|
+
))).to eq(true)
|
64
|
+
end
|
65
|
+
|
66
|
+
it "receives read responses" do
|
67
|
+
@holodeck.mock(Twilio::Response.new(
|
68
|
+
200,
|
69
|
+
%q[
|
70
|
+
{
|
71
|
+
"meta": {
|
72
|
+
"first_page_url": "https://supersim.twilio.com/v1/Networks?PageSize=50&Page=0",
|
73
|
+
"key": "networks",
|
74
|
+
"next_page_url": null,
|
75
|
+
"page": 0,
|
76
|
+
"page_size": 50,
|
77
|
+
"previous_page_url": null,
|
78
|
+
"url": "https://supersim.twilio.com/v1/Networks?PageSize=50&Page=0"
|
79
|
+
},
|
80
|
+
"networks": [
|
81
|
+
{
|
82
|
+
"friendly_name": "AT&T",
|
83
|
+
"iso_country": "US",
|
84
|
+
"identifiers": [
|
85
|
+
{
|
86
|
+
"mcc": "310",
|
87
|
+
"mnc": "410"
|
88
|
+
}
|
89
|
+
],
|
90
|
+
"sid": "HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
91
|
+
"url": "https://supersim.twilio.com/v1/Networks/HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
92
|
+
}
|
93
|
+
]
|
94
|
+
}
|
95
|
+
]
|
96
|
+
))
|
97
|
+
|
98
|
+
actual = @client.supersim.v1.networks.list()
|
99
|
+
|
100
|
+
expect(actual).to_not eq(nil)
|
101
|
+
end
|
102
|
+
|
103
|
+
it "receives read_with_filters responses" do
|
104
|
+
@holodeck.mock(Twilio::Response.new(
|
105
|
+
200,
|
106
|
+
%q[
|
107
|
+
{
|
108
|
+
"meta": {
|
109
|
+
"first_page_url": "https://supersim.twilio.com/v1/Networks?IsoCountry=US&Mnc=410&Mcc=310&PageSize=50&Page=0",
|
110
|
+
"key": "networks",
|
111
|
+
"next_page_url": null,
|
112
|
+
"page": 0,
|
113
|
+
"page_size": 50,
|
114
|
+
"previous_page_url": null,
|
115
|
+
"url": "https://supersim.twilio.com/v1/Networks?IsoCountry=US&Mnc=410&Mcc=310&PageSize=50&Page=0"
|
116
|
+
},
|
117
|
+
"networks": [
|
118
|
+
{
|
119
|
+
"friendly_name": "AT&T",
|
120
|
+
"iso_country": "US",
|
121
|
+
"identifiers": [
|
122
|
+
{
|
123
|
+
"mcc": "310",
|
124
|
+
"mnc": "410"
|
125
|
+
}
|
126
|
+
],
|
127
|
+
"sid": "HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
128
|
+
"url": "https://supersim.twilio.com/v1/Networks/HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
129
|
+
}
|
130
|
+
]
|
131
|
+
}
|
132
|
+
]
|
133
|
+
))
|
134
|
+
|
135
|
+
actual = @client.supersim.v1.networks.list()
|
136
|
+
|
137
|
+
expect(actual).to_not eq(nil)
|
138
|
+
end
|
139
|
+
end
|
@@ -176,13 +176,13 @@ describe 'Sim' do
|
|
176
176
|
{
|
177
177
|
"sims": [],
|
178
178
|
"meta": {
|
179
|
-
"first_page_url": "https://supersim.twilio.com/v1/Sims?Status=new&Fleet=HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&
|
179
|
+
"first_page_url": "https://supersim.twilio.com/v1/Sims?Status=new&Fleet=HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
|
180
180
|
"key": "sims",
|
181
181
|
"next_page_url": null,
|
182
182
|
"page": 0,
|
183
183
|
"page_size": 50,
|
184
184
|
"previous_page_url": null,
|
185
|
-
"url": "https://supersim.twilio.com/v1/Sims?Status=new&Fleet=HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&
|
185
|
+
"url": "https://supersim.twilio.com/v1/Sims?Status=new&Fleet=HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0"
|
186
186
|
}
|
187
187
|
}
|
188
188
|
]
|
@@ -193,19 +193,19 @@ describe 'Sim' do
|
|
193
193
|
expect(actual).to_not eq(nil)
|
194
194
|
end
|
195
195
|
|
196
|
-
it "receives
|
196
|
+
it "receives read_full_by_fleet_sid responses" do
|
197
197
|
@holodeck.mock(Twilio::Response.new(
|
198
198
|
200,
|
199
199
|
%q[
|
200
200
|
{
|
201
201
|
"meta": {
|
202
|
-
"first_page_url": "https://supersim.twilio.com/v1/Sims?Status=new&Fleet=
|
202
|
+
"first_page_url": "https://supersim.twilio.com/v1/Sims?Status=new&Fleet=HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
|
203
203
|
"key": "sims",
|
204
204
|
"next_page_url": null,
|
205
205
|
"page": 0,
|
206
206
|
"page_size": 50,
|
207
207
|
"previous_page_url": null,
|
208
|
-
"url": "https://supersim.twilio.com/v1/Sims?Status=new&Fleet=
|
208
|
+
"url": "https://supersim.twilio.com/v1/Sims?Status=new&Fleet=HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0"
|
209
209
|
},
|
210
210
|
"sims": [
|
211
211
|
{
|
@@ -213,7 +213,43 @@ describe 'Sim' do
|
|
213
213
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
214
214
|
"unique_name": "My SIM",
|
215
215
|
"status": "new",
|
216
|
-
"fleet_sid":
|
216
|
+
"fleet_sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
217
|
+
"iccid": "iccid",
|
218
|
+
"date_created": "2015-07-30T20:00:00Z",
|
219
|
+
"date_updated": "2015-07-30T20:00:00Z",
|
220
|
+
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
221
|
+
}
|
222
|
+
]
|
223
|
+
}
|
224
|
+
]
|
225
|
+
))
|
226
|
+
|
227
|
+
actual = @client.supersim.v1.sims.list()
|
228
|
+
|
229
|
+
expect(actual).to_not eq(nil)
|
230
|
+
end
|
231
|
+
|
232
|
+
it "receives read_full_by_fleet_name responses" do
|
233
|
+
@holodeck.mock(Twilio::Response.new(
|
234
|
+
200,
|
235
|
+
%q[
|
236
|
+
{
|
237
|
+
"meta": {
|
238
|
+
"first_page_url": "https://supersim.twilio.com/v1/Sims?Status=new&Fleet=MyFleet&PageSize=50&Page=0",
|
239
|
+
"key": "sims",
|
240
|
+
"next_page_url": null,
|
241
|
+
"page": 0,
|
242
|
+
"page_size": 50,
|
243
|
+
"previous_page_url": null,
|
244
|
+
"url": "https://supersim.twilio.com/v1/Sims?Status=new&Fleet=MyFleet&PageSize=50&Page=0"
|
245
|
+
},
|
246
|
+
"sims": [
|
247
|
+
{
|
248
|
+
"sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
249
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
250
|
+
"unique_name": "My SIM",
|
251
|
+
"status": "new",
|
252
|
+
"fleet_sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
217
253
|
"iccid": "iccid",
|
218
254
|
"date_created": "2015-07-30T20:00:00Z",
|
219
255
|
"date_updated": "2015-07-30T20:00:00Z",
|
@@ -228,4 +264,40 @@ describe 'Sim' do
|
|
228
264
|
|
229
265
|
expect(actual).to_not eq(nil)
|
230
266
|
end
|
267
|
+
|
268
|
+
it "receives read_by_iccid responses" do
|
269
|
+
@holodeck.mock(Twilio::Response.new(
|
270
|
+
200,
|
271
|
+
%q[
|
272
|
+
{
|
273
|
+
"meta": {
|
274
|
+
"first_page_url": "https://supersim.twilio.com/v1/Sims?Iccid=11111111111111111111&PageSize=50&Page=0",
|
275
|
+
"key": "sims",
|
276
|
+
"next_page_url": null,
|
277
|
+
"page": 0,
|
278
|
+
"page_size": 50,
|
279
|
+
"previous_page_url": null,
|
280
|
+
"url": "https://supersim.twilio.com/v1/Sims?Iccid=11111111111111111111&PageSize=50&Page=0"
|
281
|
+
},
|
282
|
+
"sims": [
|
283
|
+
{
|
284
|
+
"sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
285
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
286
|
+
"unique_name": "My SIM",
|
287
|
+
"status": "new",
|
288
|
+
"fleet_sid": null,
|
289
|
+
"iccid": "11111111111111111111",
|
290
|
+
"date_created": "2015-07-30T20:00:00Z",
|
291
|
+
"date_updated": "2015-07-30T20:00:00Z",
|
292
|
+
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
293
|
+
}
|
294
|
+
]
|
295
|
+
}
|
296
|
+
]
|
297
|
+
))
|
298
|
+
|
299
|
+
actual = @client.supersim.v1.sims.list()
|
300
|
+
|
301
|
+
expect(actual).to_not eq(nil)
|
302
|
+
end
|
231
303
|
end
|