class Twilio::REST::Wireless::V1::CommandContext

Public Class Methods

new(version, sid) click to toggle source

Initialize the CommandContext @param [Version] version Version that contains the resource @param [String] sid The SID of the Command resource to fetch. @return [CommandContext] CommandContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/wireless/v1/command.rb
232 def initialize(version, sid)
233   super(version)
234 
235   # Path Solution
236   @solution = {sid: sid, }
237   @uri = "/Commands/#{@solution[:sid]}"
238 end

Public Instance Methods

delete() click to toggle source

Delete the CommandInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/wireless/v1/command.rb
252 def delete
253    @version.delete('DELETE', @uri)
254 end
fetch() click to toggle source

Fetch the CommandInstance @return [CommandInstance] Fetched CommandInstance

    # File lib/twilio-ruby/rest/wireless/v1/command.rb
243 def fetch
244   payload = @version.fetch('GET', @uri)
245 
246   CommandInstance.new(@version, payload, sid: @solution[:sid], )
247 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/wireless/v1/command.rb
265 def inspect
266   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
267   "#<Twilio.Wireless.V1.CommandContext #{context}>"
268 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/wireless/v1/command.rb
258 def to_s
259   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
260   "#<Twilio.Wireless.V1.CommandContext #{context}>"
261 end