Class: Twilio::REST::Trusthub::V1::CustomerProfilesContext::CustomerProfilesEvaluationsInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, customer_profile_sid: nil, sid: nil) ⇒ CustomerProfilesEvaluationsInstance

Initialize the CustomerProfilesEvaluationsInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this CustomerProfilesEvaluations resource.

  • sid (String) (defaults to: nil)

    The SID of the Call resource to fetch.



446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 446

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

    # Context
    @instance_context = nil
    @params = { 'customer_profile_sid' => customer_profile_sid  || @properties['customer_profile_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 customer_profile resource.

Returns:



486
487
488
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 486

def 
    @properties['account_sid']
end

#contextCustomerProfilesEvaluationsContext

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

Returns:



471
472
473
474
475
476
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 471

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

#customer_profile_sidString

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

Returns:

  • (String)

    The unique string that we created to identify the customer_profile resource.



498
499
500
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 498

def customer_profile_sid
    @properties['customer_profile_sid']
end

#date_createdTime

Returns:

  • (Time)


516
517
518
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 516

def date_created
    @properties['date_created']
end

#fetchCustomerProfilesEvaluationsInstance

Fetch the CustomerProfilesEvaluationsInstance

Returns:



529
530
531
532
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 529

def fetch

    context.fetch
end

#inspectObject

Provide a detailed, user friendly representation



543
544
545
546
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 543

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

#policy_sidString

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

Returns:

  • (String)

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



492
493
494
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 492

def policy_sid
    @properties['policy_sid']
end

#resultsArray<Hash>

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

Returns:

  • (Array<Hash>)

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



510
511
512
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 510

def results
    @properties['results']
end

#sidString

Returns The unique string that identifies the Evaluation resource.

Returns:

  • (String)

    The unique string that identifies the Evaluation resource.



480
481
482
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 480

def sid
    @properties['sid']
end

#statusStatus

Returns:

  • (Status)


504
505
506
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 504

def status
    @properties['status']
end

#to_sObject

Provide a user friendly representation



536
537
538
539
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 536

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

#urlString

Returns:

  • (String)


522
523
524
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb', line 522

def url
    @properties['url']
end