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
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#fetch ⇒ CommandInstance
Fetch a CommandInstance.
-
#initialize(version, sid) ⇒ CommandContext
constructor
Initialize the CommandContext.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid) ⇒ CommandContext
Initialize the CommandContext
201 202 203 204 205 206 207 |
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 201 def initialize(version, sid) super(version) # Path Solution @solution = {sid: sid, } @uri = "/Commands/#{@solution[:sid]}" end |
Instance Method Details
#fetch ⇒ CommandInstance
Fetch a CommandInstance
212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 212 def fetch params = Twilio::Values.of({}) payload = @version.fetch( 'GET', @uri, params, ) CommandInstance.new(@version, payload, sid: @solution[:sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
226 227 228 229 |
# File 'lib/twilio-ruby/rest/wireless/v1/command.rb', line 226 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Wireless.V1.CommandContext #{context}>" end |