Class: Twilio::REST::Intelligence::V2::OperatorContext
- Inherits:
-
Twilio::REST::InstanceContext
- Object
- Twilio::REST::InstanceContext
- Twilio::REST::Intelligence::V2::OperatorContext
- Defined in:
- lib/twilio-ruby/rest/intelligence/v2/operator.rb
Instance Method Summary collapse
-
#fetch ⇒ OperatorInstance
Fetch the OperatorInstance.
-
#initialize(version, sid) ⇒ OperatorContext
constructor
Initialize the OperatorContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid) ⇒ OperatorContext
Initialize the OperatorContext
145 146 147 148 149 150 151 152 153 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator.rb', line 145 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Operators/#{@solution[:sid]}" end |
Instance Method Details
#fetch ⇒ OperatorInstance
Fetch the OperatorInstance
157 158 159 160 161 162 163 164 165 166 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator.rb', line 157 def fetch payload = @version.fetch('GET', @uri) OperatorInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
178 179 180 181 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator.rb', line 178 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Intelligence.V2.OperatorContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
171 172 173 174 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator.rb', line 171 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Intelligence.V2.OperatorContext #{context}>" end |