Class: Twilio::REST::Trusthub::V1::TrustProductsContext::TrustProductsEvaluationsInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, trust_product_sid: nil, sid: nil) ⇒ TrustProductsEvaluationsInstance

Initialize the TrustProductsEvaluationsInstance

Parameters:

  • Version that contains the resource

  • payload that contains response from Twilio

  • The SID of the Account that created this TrustProductsEvaluations resource.

  • (defaults to: nil)

    The SID of the Call resource to fetch.



438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 438

def initialize(version, payload , trust_product_sid: nil, sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'account_sid' => payload['account_sid'],
        'policy_sid' => payload['policy_sid'],
        'trust_product_sid' => payload['trust_product_sid'],
        'status' => payload['status'],
        'results' => payload['results'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'url' => payload['url'],
    }

    # Context
    @instance_context = nil
    @params = { 'trust_product_sid' => trust_product_sid  || @properties['trust_product_sid']  ,'sid' => sid  || @properties['sid']  , }
end

Instance Method Details

#account_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the trust_product resource.

Returns:



478
479
480
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 478

def 
    @properties['account_sid']
end

#contextTrustProductsEvaluationsContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:

  • CallContext for this CallInstance



463
464
465
466
467
468
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 463

def context
    unless @instance_context
        @instance_context = TrustProductsEvaluationsContext.new(@version , @params['trust_product_sid'], @params['sid'])
    end
    @instance_context
end

#date_createdTime

Returns:



508
509
510
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 508

def date_created
    @properties['date_created']
end

#fetchTrustProductsEvaluationsInstance

Fetch the TrustProductsEvaluationsInstance

Returns:

  • Fetched TrustProductsEvaluationsInstance



521
522
523
524
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 521

def fetch

    context.fetch
end

#inspectObject

Provide a detailed, user friendly representation



535
536
537
538
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 535

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Trusthub.V1.TrustProductsEvaluationsInstance #{values}>"
end

#policy_sidString

Returns The unique string of a policy that is associated to the trust_product resource.

Returns:

  • The unique string of a policy that is associated to the trust_product resource.



484
485
486
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 484

def policy_sid
    @properties['policy_sid']
end

#resultsArray<Hash>

Returns The results of the Evaluation which includes the valid and invalid attributes.

Returns:

  • The results of the Evaluation which includes the valid and invalid attributes.



502
503
504
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 502

def results
    @properties['results']
end

#sidString

Returns The unique string that identifies the Evaluation resource.

Returns:

  • The unique string that identifies the Evaluation resource.



472
473
474
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 472

def sid
    @properties['sid']
end

#statusStatus

Returns:



496
497
498
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 496

def status
    @properties['status']
end

#to_sObject

Provide a user friendly representation



528
529
530
531
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 528

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Trusthub.V1.TrustProductsEvaluationsInstance #{values}>"
end

#trust_product_sidString

Returns The unique string that we created to identify the trust_product resource.

Returns:

  • The unique string that we created to identify the trust_product resource.



490
491
492
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 490

def trust_product_sid
    @properties['trust_product_sid']
end

#urlString

Returns:



514
515
516
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 514

def url
    @properties['url']
end