class Twilio::REST::Supersim::V1::CommandContext
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 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/supersim/v1/command.rb 217 def initialize(version, sid) 218 super(version) 219 220 # Path Solution 221 @solution = {sid: sid, } 222 @uri = "/Commands/#{@solution[:sid]}" 223 end
Public Instance Methods
fetch()
click to toggle source
Fetch the CommandInstance
@return [CommandInstance] Fetched CommandInstance
# File lib/twilio-ruby/rest/supersim/v1/command.rb 228 def fetch 229 payload = @version.fetch('GET', @uri) 230 231 CommandInstance.new(@version, payload, sid: @solution[:sid], ) 232 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/supersim/v1/command.rb 243 def inspect 244 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 245 "#<Twilio.Supersim.V1.CommandContext #{context}>" 246 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/supersim/v1/command.rb 236 def to_s 237 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 238 "#<Twilio.Supersim.V1.CommandContext #{context}>" 239 end