class Twilio::REST::Supersim::V1::NetworkInstance

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

Public Class Methods

new(version, payload, sid: nil) click to toggle source

Initialize the NetworkInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid The SID of the Network resource to fetch. @return [NetworkInstance] NetworkInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/supersim/v1/network.rb
225 def initialize(version, payload, sid: nil)
226   super(version)
227 
228   # Marshaled Properties
229   @properties = {
230       'sid' => payload['sid'],
231       'friendly_name' => payload['friendly_name'],
232       'url' => payload['url'],
233       'iso_country' => payload['iso_country'],
234       'identifiers' => payload['identifiers'],
235   }
236 
237   # Context
238   @instance_context = nil
239   @params = {'sid' => sid || @properties['sid'], }
240 end

Public Instance Methods

context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [NetworkContext] NetworkContext for this NetworkInstance

    # File lib/twilio-ruby/rest/supersim/v1/network.rb
246 def context
247   unless @instance_context
248     @instance_context = NetworkContext.new(@version, @params['sid'], )
249   end
250   @instance_context
251 end
fetch() click to toggle source

Fetch the NetworkInstance @return [NetworkInstance] Fetched NetworkInstance

    # File lib/twilio-ruby/rest/supersim/v1/network.rb
286 def fetch
287   context.fetch
288 end
friendly_name() click to toggle source

@return [String] A human readable identifier of this resource

    # File lib/twilio-ruby/rest/supersim/v1/network.rb
261 def friendly_name
262   @properties['friendly_name']
263 end
identifiers() click to toggle source

@return [Array] The MCC/MNCs included in the Network resource

    # File lib/twilio-ruby/rest/supersim/v1/network.rb
279 def identifiers
280   @properties['identifiers']
281 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/supersim/v1/network.rb
299 def inspect
300   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
301   "<Twilio.Supersim.V1.NetworkInstance #{values}>"
302 end
iso_country() click to toggle source

@return [String] The ISO country code of the Network resource

    # File lib/twilio-ruby/rest/supersim/v1/network.rb
273 def iso_country
274   @properties['iso_country']
275 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/supersim/v1/network.rb
255 def sid
256   @properties['sid']
257 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/supersim/v1/network.rb
292 def to_s
293   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
294   "<Twilio.Supersim.V1.NetworkInstance #{values}>"
295 end
url() click to toggle source

@return [String] The absolute URL of the Network resource

    # File lib/twilio-ruby/rest/supersim/v1/network.rb
267 def url
268   @properties['url']
269 end