Class: Twilio::REST::Trusthub::V1::TrustProductsContext::TrustProductsEvaluationsContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Trusthub::V1::TrustProductsContext::TrustProductsEvaluationsContext
- Defined in:
- lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb
Instance Method Summary collapse
-
#fetch ⇒ TrustProductsEvaluationsInstance
Fetch the TrustProductsEvaluationsInstance.
-
#fetch_with_metadata ⇒ TrustProductsEvaluationsInstance
Fetch the TrustProductsEvaluationsInstanceMetadata.
-
#initialize(version, trust_product_sid, sid) ⇒ TrustProductsEvaluationsContext
constructor
Initialize the TrustProductsEvaluationsContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, trust_product_sid, sid) ⇒ TrustProductsEvaluationsContext
Initialize the TrustProductsEvaluationsContext
220 221 222 223 224 225 226 227 228 229 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 220 def initialize(version, trust_product_sid, sid) super(version) # Path Solution @solution = { trust_product_sid: trust_product_sid, sid: sid, } @uri = "/TrustProducts/#{@solution[:trust_product_sid]}/Evaluations/#{@solution[:sid]}" end |
Instance Method Details
#fetch ⇒ TrustProductsEvaluationsInstance
Fetch the TrustProductsEvaluationsInstance
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 233 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) TrustProductsEvaluationsInstance.new( @version, payload, trust_product_sid: @solution[:trust_product_sid], sid: @solution[:sid], ) end |
#fetch_with_metadata ⇒ TrustProductsEvaluationsInstance
Fetch the TrustProductsEvaluationsInstanceMetadata
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 253 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) trust_products_evaluations_instance = TrustProductsEvaluationsInstance.new( @version, response.body, trust_product_sid: @solution[:trust_product_sid], sid: @solution[:sid], ) TrustProductsEvaluationsInstanceMetadata.new( @version, trust_products_evaluations_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
286 287 288 289 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 286 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trusthub.V1.TrustProductsEvaluationsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
279 280 281 282 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 279 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trusthub.V1.TrustProductsEvaluationsContext #{context}>" end |