class Twilio::REST::Preview::Wireless::CommandContext
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
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 @return [CommandContext] CommandContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/preview/wireless/command.rb 209 def initialize(version, sid) 210 super(version) 211 212 # Path Solution 213 @solution = {sid: sid, } 214 @uri = "/Commands/#{@solution[:sid]}" 215 end
Public Instance Methods
fetch()
click to toggle source
Fetch the CommandInstance
@return [CommandInstance] Fetched CommandInstance
# File lib/twilio-ruby/rest/preview/wireless/command.rb 220 def fetch 221 payload = @version.fetch('GET', @uri) 222 223 CommandInstance.new(@version, payload, sid: @solution[:sid], ) 224 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/preview/wireless/command.rb 235 def inspect 236 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 237 "#<Twilio.Preview.Wireless.CommandContext #{context}>" 238 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/preview/wireless/command.rb 228 def to_s 229 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 230 "#<Twilio.Preview.Wireless.CommandContext #{context}>" 231 end