Class: Twilio::REST::Wireless::V1::CommandContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Wireless::V1::CommandContext
- Defined in:
- lib/twilio-ruby/rest/wireless/v1/command.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Deletes the CommandInstance.
-
#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
235 236 237 238 239 240 241 |
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 235 def initialize(version, sid) super(version) # Path Solution @solution = {sid: sid, } @uri = "/Commands/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Deletes the CommandInstance
261 262 263 |
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 261 def delete @version.delete('delete', @uri) end |
#fetch ⇒ CommandInstance
Fetch a CommandInstance
246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 246 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
274 275 276 277 |
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 274 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Wireless.V1.CommandContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
267 268 269 270 |
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 267 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Wireless.V1.CommandContext #{context}>" end |