Class: Twilio::REST::Intelligence::V2::PrebuiltOperatorContext
- Inherits:
-
Twilio::REST::InstanceContext
- Object
- Twilio::REST::InstanceContext
- Twilio::REST::Intelligence::V2::PrebuiltOperatorContext
- Defined in:
- lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb
Instance Method Summary collapse
-
#fetch ⇒ PrebuiltOperatorInstance
Fetch the PrebuiltOperatorInstance.
-
#initialize(version, sid) ⇒ PrebuiltOperatorContext
constructor
Initialize the PrebuiltOperatorContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid) ⇒ PrebuiltOperatorContext
Initialize the PrebuiltOperatorContext
148 149 150 151 152 153 154 155 156 |
# File 'lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb', line 148 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Operators/PreBuilt/#{@solution[:sid]}" end |
Instance Method Details
#fetch ⇒ PrebuiltOperatorInstance
Fetch the PrebuiltOperatorInstance
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb', line 160 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) PrebuiltOperatorInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
186 187 188 189 |
# File 'lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb', line 186 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Intelligence.V2.PrebuiltOperatorContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
179 180 181 182 |
# File 'lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb', line 179 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Intelligence.V2.PrebuiltOperatorContext #{context}>" end |