twilio-ruby 5.35.0 → 5.36.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 +28 -0
- data/README.md +2 -2
- 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/message.rb +71 -71
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +29 -29
- 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/preview/trusted_comms/business.rb +26 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb +239 -0
- 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 +197 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +7 -0
- data/lib/twilio-ruby/rest/supersim.rb +11 -1
- data/lib/twilio-ruby/rest/supersim/v1.rb +16 -1
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +10 -1
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +315 -0
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +53 -12
- 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/verify/v2/form.rb +197 -0
- data/lib/twilio-ruby/rest/verify/v2/service.rb +26 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +379 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +500 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor/challenge.rb +494 -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/version.rb +1 -1
- data/spec/integration/api/v2010/account/call_spec.rb +5 -5
- data/spec/integration/api/v2010/account/conference_spec.rb +42 -14
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +7 -0
- data/spec/integration/flex_api/v1/configuration_spec.rb +3 -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 +4 -0
- 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 +20 -5
- data/spec/integration/supersim/v1/network_spec.rb +139 -0
- 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/verify/v2/form_spec.rb +48 -0
- data/spec/integration/verify/v2/service/entity/factor/challenge_spec.rb +353 -0
- data/spec/integration/verify/v2/service/entity/factor_spec.rb +298 -0
- data/spec/integration/verify/v2/service/entity_spec.rb +201 -0
- data/spec/integration/verify/v2/service_spec.rb +24 -4
- metadata +29 -2
@@ -266,6 +266,7 @@ module Twilio
|
|
266
266
|
'account_sid' => payload['account_sid'],
|
267
267
|
'service_sid' => payload['service_sid'],
|
268
268
|
'environment_sid' => payload['environment_sid'],
|
269
|
+
'build_sid' => payload['build_sid'],
|
269
270
|
'deployment_sid' => payload['deployment_sid'],
|
270
271
|
'function_sid' => payload['function_sid'],
|
271
272
|
'request_sid' => payload['request_sid'],
|
@@ -324,6 +325,12 @@ module Twilio
|
|
324
325
|
@properties['environment_sid']
|
325
326
|
end
|
326
327
|
|
328
|
+
##
|
329
|
+
# @return [String] The SID of the build that corresponds to the log
|
330
|
+
def build_sid
|
331
|
+
@properties['build_sid']
|
332
|
+
end
|
333
|
+
|
327
334
|
##
|
328
335
|
# @return [String] The SID of the deployment that corresponds to the log
|
329
336
|
def deployment_sid
|
@@ -47,7 +47,17 @@ module Twilio
|
|
47
47
|
end
|
48
48
|
|
49
49
|
##
|
50
|
-
# @param [String] sid The
|
50
|
+
# @param [String] sid The unique string that we created to identify the Network
|
51
|
+
# resource.
|
52
|
+
# @return [Twilio::REST::Supersim::V1::NetworkInstance] if sid was passed.
|
53
|
+
# @return [Twilio::REST::Supersim::V1::NetworkList]
|
54
|
+
def networks(sid=:unset)
|
55
|
+
self.v1.networks(sid)
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# @param [String] sid The unique string that identifies the Network Access Profile
|
60
|
+
# resource.
|
51
61
|
# @return [Twilio::REST::Supersim::V1::NetworkAccessProfileInstance] if sid was passed.
|
52
62
|
# @return [Twilio::REST::Supersim::V1::NetworkAccessProfileList]
|
53
63
|
def network_access_profiles(sid=:unset)
|
@@ -17,6 +17,7 @@ module Twilio
|
|
17
17
|
@version = 'v1'
|
18
18
|
@commands = nil
|
19
19
|
@fleets = nil
|
20
|
+
@networks = nil
|
20
21
|
@network_access_profiles = nil
|
21
22
|
@sims = nil
|
22
23
|
@usage_records = nil
|
@@ -51,7 +52,21 @@ module Twilio
|
|
51
52
|
end
|
52
53
|
|
53
54
|
##
|
54
|
-
# @param [String] sid The
|
55
|
+
# @param [String] sid The SID of the Network resource to fetch.
|
56
|
+
# @return [Twilio::REST::Supersim::V1::NetworkContext] if sid was passed.
|
57
|
+
# @return [Twilio::REST::Supersim::V1::NetworkList]
|
58
|
+
def networks(sid=:unset)
|
59
|
+
if sid.nil?
|
60
|
+
raise ArgumentError, 'sid cannot be nil'
|
61
|
+
elsif sid == :unset
|
62
|
+
@networks ||= NetworkList.new self
|
63
|
+
else
|
64
|
+
NetworkContext.new(self, sid)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
##
|
69
|
+
# @param [String] sid The SID of the Network Access Profile resource to fetch.
|
55
70
|
# @return [Twilio::REST::Supersim::V1::NetworkAccessProfileContext] if sid was passed.
|
56
71
|
# @return [Twilio::REST::Supersim::V1::NetworkAccessProfileList]
|
57
72
|
def network_access_profiles(sid=:unset)
|
@@ -33,6 +33,7 @@ module Twilio
|
|
33
33
|
# URL to address the resource.
|
34
34
|
# @param [Boolean] data_enabled Defines whether SIMs in the Fleet are capable of
|
35
35
|
# using 2G/3G/4G/LTE/CAT-M/NB-IoT data connectivity
|
36
|
+
# @param [String] data_limit The data_limit
|
36
37
|
# @param [Boolean] commands_enabled Defines whether SIMs in the Fleet are capable
|
37
38
|
# of sending and receiving Commands via SMS.
|
38
39
|
# @param [String] commands_url The URL that will receive a webhook when a SIM in
|
@@ -45,10 +46,11 @@ module Twilio
|
|
45
46
|
# Access Profile that will control which cellular network operators the Fleet's
|
46
47
|
# SIMs can connect to
|
47
48
|
# @return [FleetInstance] Newly created FleetInstance
|
48
|
-
def create(unique_name: :unset, data_enabled: :unset, commands_enabled: :unset, commands_url: :unset, commands_method: :unset, network_access_profile: :unset)
|
49
|
+
def create(unique_name: :unset, data_enabled: :unset, data_limit: :unset, commands_enabled: :unset, commands_url: :unset, commands_method: :unset, network_access_profile: :unset)
|
49
50
|
data = Twilio::Values.of({
|
50
51
|
'UniqueName' => unique_name,
|
51
52
|
'DataEnabled' => data_enabled,
|
53
|
+
'DataLimit' => data_limit,
|
52
54
|
'CommandsEnabled' => commands_enabled,
|
53
55
|
'CommandsUrl' => commands_url,
|
54
56
|
'CommandsMethod' => commands_method,
|
@@ -289,6 +291,7 @@ module Twilio
|
|
289
291
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
290
292
|
'url' => payload['url'],
|
291
293
|
'data_enabled' => payload['data_enabled'],
|
294
|
+
'data_limit' => payload['data_limit'].to_i,
|
292
295
|
'data_metering' => payload['data_metering'],
|
293
296
|
'commands_enabled' => payload['commands_enabled'],
|
294
297
|
'commands_url' => payload['commands_url'],
|
@@ -354,6 +357,12 @@ module Twilio
|
|
354
357
|
@properties['data_enabled']
|
355
358
|
end
|
356
359
|
|
360
|
+
##
|
361
|
+
# @return [String] The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume
|
362
|
+
def data_limit
|
363
|
+
@properties['data_limit']
|
364
|
+
end
|
365
|
+
|
357
366
|
##
|
358
367
|
# @return [fleet.DataMetering] The model by which a SIM is metered and billed
|
359
368
|
def data_metering
|
@@ -0,0 +1,315 @@
|
|
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 Supersim < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
15
|
+
class NetworkList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the NetworkList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [NetworkList] NetworkList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/Networks"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Lists NetworkInstance records from the API as a list.
|
30
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
|
+
# memory before returning.
|
32
|
+
# @param [String] iso_country The [ISO country
|
33
|
+
# code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resources
|
34
|
+
# to read.
|
35
|
+
# @param [String] mcc The 'mobile country code' of a country. Network resources
|
36
|
+
# with this `mcc` in their `identifiers` will be read.
|
37
|
+
# @param [String] mnc The 'mobile network code' of a mobile operator network.
|
38
|
+
# Network resources with this `mnc` in their `identifiers` will be read.
|
39
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
40
|
+
# guarantees to never return more than limit. Default is no limit
|
41
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
42
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
43
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
44
|
+
# efficient page size, i.e. min(limit, 1000)
|
45
|
+
# @return [Array] Array of up to limit results
|
46
|
+
def list(iso_country: :unset, mcc: :unset, mnc: :unset, limit: nil, page_size: nil)
|
47
|
+
self.stream(
|
48
|
+
iso_country: iso_country,
|
49
|
+
mcc: mcc,
|
50
|
+
mnc: mnc,
|
51
|
+
limit: limit,
|
52
|
+
page_size: page_size
|
53
|
+
).entries
|
54
|
+
end
|
55
|
+
|
56
|
+
##
|
57
|
+
# Streams NetworkInstance records from the API as an Enumerable.
|
58
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
59
|
+
# is reached.
|
60
|
+
# @param [String] iso_country The [ISO country
|
61
|
+
# code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resources
|
62
|
+
# to read.
|
63
|
+
# @param [String] mcc The 'mobile country code' of a country. Network resources
|
64
|
+
# with this `mcc` in their `identifiers` will be read.
|
65
|
+
# @param [String] mnc The 'mobile network code' of a mobile operator network.
|
66
|
+
# Network resources with this `mnc` in their `identifiers` will be read.
|
67
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
68
|
+
# guarantees to never return more than limit. Default is no limit.
|
69
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
70
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
71
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
72
|
+
# efficient page size, i.e. min(limit, 1000)
|
73
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
74
|
+
def stream(iso_country: :unset, mcc: :unset, mnc: :unset, limit: nil, page_size: nil)
|
75
|
+
limits = @version.read_limits(limit, page_size)
|
76
|
+
|
77
|
+
page = self.page(iso_country: iso_country, mcc: mcc, mnc: mnc, page_size: limits[:page_size], )
|
78
|
+
|
79
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
80
|
+
end
|
81
|
+
|
82
|
+
##
|
83
|
+
# When passed a block, yields NetworkInstance records from the API.
|
84
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
85
|
+
# is reached.
|
86
|
+
def each
|
87
|
+
limits = @version.read_limits
|
88
|
+
|
89
|
+
page = self.page(page_size: limits[:page_size], )
|
90
|
+
|
91
|
+
@version.stream(page,
|
92
|
+
limit: limits[:limit],
|
93
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
94
|
+
end
|
95
|
+
|
96
|
+
##
|
97
|
+
# Retrieve a single page of NetworkInstance records from the API.
|
98
|
+
# Request is executed immediately.
|
99
|
+
# @param [String] iso_country The [ISO country
|
100
|
+
# code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resources
|
101
|
+
# to read.
|
102
|
+
# @param [String] mcc The 'mobile country code' of a country. Network resources
|
103
|
+
# with this `mcc` in their `identifiers` will be read.
|
104
|
+
# @param [String] mnc The 'mobile network code' of a mobile operator network.
|
105
|
+
# Network resources with this `mnc` in their `identifiers` will be read.
|
106
|
+
# @param [String] page_token PageToken provided by the API
|
107
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
108
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
109
|
+
# @return [Page] Page of NetworkInstance
|
110
|
+
def page(iso_country: :unset, mcc: :unset, mnc: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
111
|
+
params = Twilio::Values.of({
|
112
|
+
'IsoCountry' => iso_country,
|
113
|
+
'Mcc' => mcc,
|
114
|
+
'Mnc' => mnc,
|
115
|
+
'PageToken' => page_token,
|
116
|
+
'Page' => page_number,
|
117
|
+
'PageSize' => page_size,
|
118
|
+
})
|
119
|
+
response = @version.page(
|
120
|
+
'GET',
|
121
|
+
@uri,
|
122
|
+
params
|
123
|
+
)
|
124
|
+
NetworkPage.new(@version, response, @solution)
|
125
|
+
end
|
126
|
+
|
127
|
+
##
|
128
|
+
# Retrieve a single page of NetworkInstance records from the API.
|
129
|
+
# Request is executed immediately.
|
130
|
+
# @param [String] target_url API-generated URL for the requested results page
|
131
|
+
# @return [Page] Page of NetworkInstance
|
132
|
+
def get_page(target_url)
|
133
|
+
response = @version.domain.request(
|
134
|
+
'GET',
|
135
|
+
target_url
|
136
|
+
)
|
137
|
+
NetworkPage.new(@version, response, @solution)
|
138
|
+
end
|
139
|
+
|
140
|
+
##
|
141
|
+
# Provide a user friendly representation
|
142
|
+
def to_s
|
143
|
+
'#<Twilio.Supersim.V1.NetworkList>'
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
##
|
148
|
+
# 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.
|
149
|
+
class NetworkPage < Page
|
150
|
+
##
|
151
|
+
# Initialize the NetworkPage
|
152
|
+
# @param [Version] version Version that contains the resource
|
153
|
+
# @param [Response] response Response from the API
|
154
|
+
# @param [Hash] solution Path solution for the resource
|
155
|
+
# @return [NetworkPage] NetworkPage
|
156
|
+
def initialize(version, response, solution)
|
157
|
+
super(version, response)
|
158
|
+
|
159
|
+
# Path Solution
|
160
|
+
@solution = solution
|
161
|
+
end
|
162
|
+
|
163
|
+
##
|
164
|
+
# Build an instance of NetworkInstance
|
165
|
+
# @param [Hash] payload Payload response from the API
|
166
|
+
# @return [NetworkInstance] NetworkInstance
|
167
|
+
def get_instance(payload)
|
168
|
+
NetworkInstance.new(@version, payload, )
|
169
|
+
end
|
170
|
+
|
171
|
+
##
|
172
|
+
# Provide a user friendly representation
|
173
|
+
def to_s
|
174
|
+
'<Twilio.Supersim.V1.NetworkPage>'
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
##
|
179
|
+
# 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.
|
180
|
+
class NetworkContext < InstanceContext
|
181
|
+
##
|
182
|
+
# Initialize the NetworkContext
|
183
|
+
# @param [Version] version Version that contains the resource
|
184
|
+
# @param [String] sid The SID of the Network resource to fetch.
|
185
|
+
# @return [NetworkContext] NetworkContext
|
186
|
+
def initialize(version, sid)
|
187
|
+
super(version)
|
188
|
+
|
189
|
+
# Path Solution
|
190
|
+
@solution = {sid: sid, }
|
191
|
+
@uri = "/Networks/#{@solution[:sid]}"
|
192
|
+
end
|
193
|
+
|
194
|
+
##
|
195
|
+
# Fetch a NetworkInstance
|
196
|
+
# @return [NetworkInstance] Fetched NetworkInstance
|
197
|
+
def fetch
|
198
|
+
params = Twilio::Values.of({})
|
199
|
+
|
200
|
+
payload = @version.fetch(
|
201
|
+
'GET',
|
202
|
+
@uri,
|
203
|
+
params,
|
204
|
+
)
|
205
|
+
|
206
|
+
NetworkInstance.new(@version, payload, sid: @solution[:sid], )
|
207
|
+
end
|
208
|
+
|
209
|
+
##
|
210
|
+
# Provide a user friendly representation
|
211
|
+
def to_s
|
212
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
213
|
+
"#<Twilio.Supersim.V1.NetworkContext #{context}>"
|
214
|
+
end
|
215
|
+
|
216
|
+
##
|
217
|
+
# Provide a detailed, user friendly representation
|
218
|
+
def inspect
|
219
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
220
|
+
"#<Twilio.Supersim.V1.NetworkContext #{context}>"
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
##
|
225
|
+
# 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.
|
226
|
+
class NetworkInstance < InstanceResource
|
227
|
+
##
|
228
|
+
# Initialize the NetworkInstance
|
229
|
+
# @param [Version] version Version that contains the resource
|
230
|
+
# @param [Hash] payload payload that contains response from Twilio
|
231
|
+
# @param [String] sid The SID of the Network resource to fetch.
|
232
|
+
# @return [NetworkInstance] NetworkInstance
|
233
|
+
def initialize(version, payload, sid: nil)
|
234
|
+
super(version)
|
235
|
+
|
236
|
+
# Marshaled Properties
|
237
|
+
@properties = {
|
238
|
+
'sid' => payload['sid'],
|
239
|
+
'friendly_name' => payload['friendly_name'],
|
240
|
+
'url' => payload['url'],
|
241
|
+
'iso_country' => payload['iso_country'],
|
242
|
+
'identifiers' => payload['identifiers'],
|
243
|
+
}
|
244
|
+
|
245
|
+
# Context
|
246
|
+
@instance_context = nil
|
247
|
+
@params = {'sid' => sid || @properties['sid'], }
|
248
|
+
end
|
249
|
+
|
250
|
+
##
|
251
|
+
# Generate an instance context for the instance, the context is capable of
|
252
|
+
# performing various actions. All instance actions are proxied to the context
|
253
|
+
# @return [NetworkContext] NetworkContext for this NetworkInstance
|
254
|
+
def context
|
255
|
+
unless @instance_context
|
256
|
+
@instance_context = NetworkContext.new(@version, @params['sid'], )
|
257
|
+
end
|
258
|
+
@instance_context
|
259
|
+
end
|
260
|
+
|
261
|
+
##
|
262
|
+
# @return [String] The unique string that identifies the resource
|
263
|
+
def sid
|
264
|
+
@properties['sid']
|
265
|
+
end
|
266
|
+
|
267
|
+
##
|
268
|
+
# @return [String] A human readable identifier of this resource
|
269
|
+
def friendly_name
|
270
|
+
@properties['friendly_name']
|
271
|
+
end
|
272
|
+
|
273
|
+
##
|
274
|
+
# @return [String] The absolute URL of the Network resource
|
275
|
+
def url
|
276
|
+
@properties['url']
|
277
|
+
end
|
278
|
+
|
279
|
+
##
|
280
|
+
# @return [String] The ISO country code of the Network resource
|
281
|
+
def iso_country
|
282
|
+
@properties['iso_country']
|
283
|
+
end
|
284
|
+
|
285
|
+
##
|
286
|
+
# @return [Hash] The MCC/MNCs included in the Network resource
|
287
|
+
def identifiers
|
288
|
+
@properties['identifiers']
|
289
|
+
end
|
290
|
+
|
291
|
+
##
|
292
|
+
# Fetch a NetworkInstance
|
293
|
+
# @return [NetworkInstance] Fetched NetworkInstance
|
294
|
+
def fetch
|
295
|
+
context.fetch
|
296
|
+
end
|
297
|
+
|
298
|
+
##
|
299
|
+
# Provide a user friendly representation
|
300
|
+
def to_s
|
301
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
302
|
+
"<Twilio.Supersim.V1.NetworkInstance #{values}>"
|
303
|
+
end
|
304
|
+
|
305
|
+
##
|
306
|
+
# Provide a detailed, user friendly representation
|
307
|
+
def inspect
|
308
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
309
|
+
"<Twilio.Supersim.V1.NetworkInstance #{values}>"
|
310
|
+
end
|
311
|
+
end
|
312
|
+
end
|
313
|
+
end
|
314
|
+
end
|
315
|
+
end
|
@@ -28,8 +28,11 @@ module Twilio
|
|
28
28
|
##
|
29
29
|
# Retrieve a single page of NetworkAccessProfileInstance records from the API.
|
30
30
|
# Request is executed immediately.
|
31
|
-
# @param [String] unique_name
|
32
|
-
#
|
31
|
+
# @param [String] unique_name An application-defined string that uniquely
|
32
|
+
# identifies the resource. It can be used in place of the resource's `sid` in the
|
33
|
+
# URL to address the resource.
|
34
|
+
# @param [String] networks List of Network SIDs that this Network Access Profile
|
35
|
+
# will allow connections to.
|
33
36
|
# @return [NetworkAccessProfileInstance] Newly created NetworkAccessProfileInstance
|
34
37
|
def create(unique_name: :unset, networks: :unset)
|
35
38
|
data = Twilio::Values.of({
|
@@ -172,7 +175,7 @@ module Twilio
|
|
172
175
|
##
|
173
176
|
# Initialize the NetworkAccessProfileContext
|
174
177
|
# @param [Version] version Version that contains the resource
|
175
|
-
# @param [String] sid The
|
178
|
+
# @param [String] sid The SID of the Network Access Profile resource to fetch.
|
176
179
|
# @return [NetworkAccessProfileContext] NetworkAccessProfileContext
|
177
180
|
def initialize(version, sid)
|
178
181
|
super(version)
|
@@ -180,6 +183,9 @@ module Twilio
|
|
180
183
|
# Path Solution
|
181
184
|
@solution = {sid: sid, }
|
182
185
|
@uri = "/NetworkAccessProfiles/#{@solution[:sid]}"
|
186
|
+
|
187
|
+
# Dependents
|
188
|
+
@networks = nil
|
183
189
|
end
|
184
190
|
|
185
191
|
##
|
@@ -199,7 +205,7 @@ module Twilio
|
|
199
205
|
|
200
206
|
##
|
201
207
|
# Update the NetworkAccessProfileInstance
|
202
|
-
# @param [String] unique_name The
|
208
|
+
# @param [String] unique_name The new unique name of the Network Access Profile.
|
203
209
|
# @return [NetworkAccessProfileInstance] Updated NetworkAccessProfileInstance
|
204
210
|
def update(unique_name: :unset)
|
205
211
|
data = Twilio::Values.of({'UniqueName' => unique_name, })
|
@@ -213,6 +219,27 @@ module Twilio
|
|
213
219
|
NetworkAccessProfileInstance.new(@version, payload, sid: @solution[:sid], )
|
214
220
|
end
|
215
221
|
|
222
|
+
##
|
223
|
+
# Access the networks
|
224
|
+
# @return [NetworkAccessProfileNetworkList]
|
225
|
+
# @return [NetworkAccessProfileNetworkContext] if sid was passed.
|
226
|
+
def networks(sid=:unset)
|
227
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
228
|
+
|
229
|
+
if sid != :unset
|
230
|
+
return NetworkAccessProfileNetworkContext.new(@version, @solution[:sid], sid, )
|
231
|
+
end
|
232
|
+
|
233
|
+
unless @networks
|
234
|
+
@networks = NetworkAccessProfileNetworkList.new(
|
235
|
+
@version,
|
236
|
+
network_access_profile_sid: @solution[:sid],
|
237
|
+
)
|
238
|
+
end
|
239
|
+
|
240
|
+
@networks
|
241
|
+
end
|
242
|
+
|
216
243
|
##
|
217
244
|
# Provide a user friendly representation
|
218
245
|
def to_s
|
@@ -235,7 +262,7 @@ module Twilio
|
|
235
262
|
# Initialize the NetworkAccessProfileInstance
|
236
263
|
# @param [Version] version Version that contains the resource
|
237
264
|
# @param [Hash] payload payload that contains response from Twilio
|
238
|
-
# @param [String] sid The
|
265
|
+
# @param [String] sid The SID of the Network Access Profile resource to fetch.
|
239
266
|
# @return [NetworkAccessProfileInstance] NetworkAccessProfileInstance
|
240
267
|
def initialize(version, payload, sid: nil)
|
241
268
|
super(version)
|
@@ -248,6 +275,7 @@ module Twilio
|
|
248
275
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
249
276
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
250
277
|
'url' => payload['url'],
|
278
|
+
'links' => payload['links'],
|
251
279
|
}
|
252
280
|
|
253
281
|
# Context
|
@@ -267,41 +295,47 @@ module Twilio
|
|
267
295
|
end
|
268
296
|
|
269
297
|
##
|
270
|
-
# @return [String] The
|
298
|
+
# @return [String] The unique string that identifies the resource
|
271
299
|
def sid
|
272
300
|
@properties['sid']
|
273
301
|
end
|
274
302
|
|
275
303
|
##
|
276
|
-
# @return [String]
|
304
|
+
# @return [String] An application-defined string that uniquely identifies the resource
|
277
305
|
def unique_name
|
278
306
|
@properties['unique_name']
|
279
307
|
end
|
280
308
|
|
281
309
|
##
|
282
|
-
# @return [String] The
|
310
|
+
# @return [String] The SID of the Account that the Network Access Profile belongs to
|
283
311
|
def account_sid
|
284
312
|
@properties['account_sid']
|
285
313
|
end
|
286
314
|
|
287
315
|
##
|
288
|
-
# @return [Time] The
|
316
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
289
317
|
def date_created
|
290
318
|
@properties['date_created']
|
291
319
|
end
|
292
320
|
|
293
321
|
##
|
294
|
-
# @return [Time] The
|
322
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
295
323
|
def date_updated
|
296
324
|
@properties['date_updated']
|
297
325
|
end
|
298
326
|
|
299
327
|
##
|
300
|
-
# @return [String] The
|
328
|
+
# @return [String] The absolute URL of the resource
|
301
329
|
def url
|
302
330
|
@properties['url']
|
303
331
|
end
|
304
332
|
|
333
|
+
##
|
334
|
+
# @return [String] The links
|
335
|
+
def links
|
336
|
+
@properties['links']
|
337
|
+
end
|
338
|
+
|
305
339
|
##
|
306
340
|
# Fetch a NetworkAccessProfileInstance
|
307
341
|
# @return [NetworkAccessProfileInstance] Fetched NetworkAccessProfileInstance
|
@@ -311,12 +345,19 @@ module Twilio
|
|
311
345
|
|
312
346
|
##
|
313
347
|
# Update the NetworkAccessProfileInstance
|
314
|
-
# @param [String] unique_name The
|
348
|
+
# @param [String] unique_name The new unique name of the Network Access Profile.
|
315
349
|
# @return [NetworkAccessProfileInstance] Updated NetworkAccessProfileInstance
|
316
350
|
def update(unique_name: :unset)
|
317
351
|
context.update(unique_name: unique_name, )
|
318
352
|
end
|
319
353
|
|
354
|
+
##
|
355
|
+
# Access the networks
|
356
|
+
# @return [networks] networks
|
357
|
+
def networks
|
358
|
+
context.networks
|
359
|
+
end
|
360
|
+
|
320
361
|
##
|
321
362
|
# Provide a user friendly representation
|
322
363
|
def to_s
|