Class: Twilio::REST::Supersim::V1::NetworkAccessProfileContext::NetworkAccessProfileNetworkContext

Inherits:
InstanceContext
  • Object
show all
Defined in:
lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, network_access_profile_sid, sid) ⇒ NetworkAccessProfileNetworkContext

Initialize the NetworkAccessProfileNetworkContext



220
221
222
223
224
225
226
227
228
229
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb', line 220

def initialize(version, network_access_profile_sid, sid)
    super(version)
    

    # Path Solution
    @solution = { network_access_profile_sid: network_access_profile_sid, sid: sid,  }
    @uri = "/NetworkAccessProfiles/#{@solution[:network_access_profile_sid]}/Networks/#{@solution[:sid]}"

    
end

Instance Method Details

#deleteBoolean

Delete the NetworkAccessProfileNetworkInstance



233
234
235
236
237
238
239
240
241
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb', line 233

def delete

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    

    @version.delete('DELETE', @uri, headers: headers)
end

#delete_with_metadataBoolean

Delete the NetworkAccessProfileNetworkInstanceMetadata



246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb', line 246

def 

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
      response = @version.('DELETE', @uri, headers: headers)
      networkAccessProfileNetwork_instance = NetworkAccessProfileNetworkInstance.new(
          @version,
          response.body,
          account_sid: @solution[:account_sid],
          sid: @solution[:sid],
      )
      .new(@version, networkAccessProfileNetwork_instance, response.headers, response.status_code)
end

#fetchNetworkAccessProfileNetworkInstance

Fetch the NetworkAccessProfileNetworkInstance



265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb', line 265

def fetch

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.fetch('GET', @uri, headers: headers)
    NetworkAccessProfileNetworkInstance.new(
        @version,
        payload,
        network_access_profile_sid: @solution[:network_access_profile_sid],
        sid: @solution[:sid],
    )
end

#fetch_with_metadataNetworkAccessProfileNetworkInstance

Fetch the NetworkAccessProfileNetworkInstanceMetadata



285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb', line 285

def 

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    response = @version.('GET', @uri, headers: headers)
    network_access_profile_network_instance = NetworkAccessProfileNetworkInstance.new(
        @version,
        response.body,
        network_access_profile_sid: @solution[:network_access_profile_sid],
        sid: @solution[:sid],
    )
    .new(
        @version,
        network_access_profile_network_instance,
        response.headers,
        response.status_code
    )
end

#inspectObject

Provide a detailed, user friendly representation



318
319
320
321
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb', line 318

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Supersim.V1.NetworkAccessProfileNetworkContext #{context}>"
end

#to_sObject

Provide a user friendly representation



311
312
313
314
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb', line 311

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Supersim.V1.NetworkAccessProfileNetworkContext #{context}>"
end