class Twilio::REST::Trusthub::V1::TrustProductsContext::TrustProductsEvaluationsInstance

Public Class Methods

new(version, payload, trust_product_sid: nil, sid: nil) click to toggle source

Initialize the TrustProductsEvaluationsInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] trust_product_sid The unique string that we created to identify

the trust_product resource.

@param [String] sid The unique string that identifies the Evaluation resource. @return [TrustProductsEvaluationsInstance] TrustProductsEvaluationsInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb
220 def initialize(version, payload, trust_product_sid: nil, sid: nil)
221   super(version)
222 
223   # Marshaled Properties
224   @properties = {
225       'sid' => payload['sid'],
226       'account_sid' => payload['account_sid'],
227       'policy_sid' => payload['policy_sid'],
228       'trust_product_sid' => payload['trust_product_sid'],
229       'status' => payload['status'],
230       'results' => payload['results'],
231       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
232       'url' => payload['url'],
233   }
234 
235   # Context
236   @instance_context = nil
237   @params = {'trust_product_sid' => trust_product_sid, 'sid' => sid || @properties['sid'], }
238 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb
263 def account_sid
264   @properties['account_sid']
265 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [TrustProductsEvaluationsContext] TrustProductsEvaluationsContext for this TrustProductsEvaluationsInstance

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb
244 def context
245   unless @instance_context
246     @instance_context = TrustProductsEvaluationsContext.new(
247         @version,
248         @params['trust_product_sid'],
249         @params['sid'],
250     )
251   end
252   @instance_context
253 end
date_created() click to toggle source

@return [Time] The date_created

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb
293 def date_created
294   @properties['date_created']
295 end
fetch() click to toggle source

Fetch the TrustProductsEvaluationsInstance @return [TrustProductsEvaluationsInstance] Fetched TrustProductsEvaluationsInstance

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb
306 def fetch
307   context.fetch
308 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb
319 def inspect
320   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
321   "<Twilio.Trusthub.V1.TrustProductsEvaluationsInstance #{values}>"
322 end
policy_sid() click to toggle source

@return [String] The unique string of a policy

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb
269 def policy_sid
270   @properties['policy_sid']
271 end
results() click to toggle source

@return [Array] The results of the Evaluation resource

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb
287 def results
288   @properties['results']
289 end
sid() click to toggle source

@return [String] The unique string that identifies the Evaluation resource

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb
257 def sid
258   @properties['sid']
259 end
status() click to toggle source

@return [trust_products_evaluations.Status] The compliance status of the Evaluation resource

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb
281 def status
282   @properties['status']
283 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb
312 def to_s
313   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
314   "<Twilio.Trusthub.V1.TrustProductsEvaluationsInstance #{values}>"
315 end
trust_product_sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb
275 def trust_product_sid
276   @properties['trust_product_sid']
277 end
url() click to toggle source

@return [String] The url

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb
299 def url
300   @properties['url']
301 end