class Twilio::REST::Supersim::V1::NetworkAccessProfileContext

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Public Class Methods

new(version, sid) click to toggle source

Initialize the NetworkAccessProfileContext @param [Version] version Version that contains the resource @param [String] sid The SID of the Network Access Profile resource to fetch. @return [NetworkAccessProfileContext] NetworkAccessProfileContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb
173 def initialize(version, sid)
174   super(version)
175 
176   # Path Solution
177   @solution = {sid: sid, }
178   @uri = "/NetworkAccessProfiles/#{@solution[:sid]}"
179 
180   # Dependents
181   @networks = nil
182 end

Public Instance Methods

fetch() click to toggle source

Fetch the NetworkAccessProfileInstance @return [NetworkAccessProfileInstance] Fetched NetworkAccessProfileInstance

    # File lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb
187 def fetch
188   payload = @version.fetch('GET', @uri)
189 
190   NetworkAccessProfileInstance.new(@version, payload, sid: @solution[:sid], )
191 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb
235 def inspect
236   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
237   "#<Twilio.Supersim.V1.NetworkAccessProfileContext #{context}>"
238 end
networks(sid=:unset) click to toggle source

Access the networks @return [NetworkAccessProfileNetworkList] @return [NetworkAccessProfileNetworkContext] if sid was passed.

    # File lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb
209 def networks(sid=:unset)
210   raise ArgumentError, 'sid cannot be nil' if sid.nil?
211 
212   if sid != :unset
213     return NetworkAccessProfileNetworkContext.new(@version, @solution[:sid], sid, )
214   end
215 
216   unless @networks
217     @networks = NetworkAccessProfileNetworkList.new(
218         @version,
219         network_access_profile_sid: @solution[:sid],
220     )
221   end
222 
223   @networks
224 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb
228 def to_s
229   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
230   "#<Twilio.Supersim.V1.NetworkAccessProfileContext #{context}>"
231 end
update(unique_name: :unset) click to toggle source

Update the NetworkAccessProfileInstance @param [String] unique_name The new unique name of the Network Access Profile. @return [NetworkAccessProfileInstance] Updated NetworkAccessProfileInstance

    # File lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb
197 def update(unique_name: :unset)
198   data = Twilio::Values.of({'UniqueName' => unique_name, })
199 
200   payload = @version.update('POST', @uri, data: data)
201 
202   NetworkAccessProfileInstance.new(@version, payload, sid: @solution[:sid], )
203 end