Class: Twilio::REST::Preview::Wireless::CommandContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Preview::Wireless::CommandContext
- Defined in:
- lib/twilio-ruby/rest/preview/wireless/command.rb
Overview
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 [email protected].
Instance Method Summary collapse
-
#fetch ⇒ CommandInstance
Fetch a CommandInstance.
-
#initialize(version, sid) ⇒ CommandContext
constructor
Initialize the CommandContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid) ⇒ CommandContext
Initialize the CommandContext
216 217 218 219 220 221 222 |
# File 'lib/twilio-ruby/rest/preview/wireless/command.rb', line 216 def initialize(version, sid) super(version) # Path Solution @solution = {sid: sid, } @uri = "/Commands/#{@solution[:sid]}" end |
Instance Method Details
#fetch ⇒ CommandInstance
Fetch a CommandInstance
227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/twilio-ruby/rest/preview/wireless/command.rb', line 227 def fetch params = Twilio::Values.of({}) payload = @version.fetch( 'GET', @uri, params, ) CommandInstance.new(@version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
248 249 250 251 |
# File 'lib/twilio-ruby/rest/preview/wireless/command.rb', line 248 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.Wireless.CommandContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
241 242 243 244 |
# File 'lib/twilio-ruby/rest/preview/wireless/command.rb', line 241 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.Wireless.CommandContext #{context}>" end |