class Twilio::REST::Trusthub::V1::CustomerProfilesInstance

Public Class Methods

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

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

Customer-Profile resource.

@return [CustomerProfilesInstance] CustomerProfilesInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
344 def initialize(version, payload, sid: nil)
345   super(version)
346 
347   # Marshaled Properties
348   @properties = {
349       'sid' => payload['sid'],
350       'account_sid' => payload['account_sid'],
351       'policy_sid' => payload['policy_sid'],
352       'friendly_name' => payload['friendly_name'],
353       'status' => payload['status'],
354       'valid_until' => Twilio.deserialize_iso8601_datetime(payload['valid_until']),
355       'email' => payload['email'],
356       'status_callback' => payload['status_callback'],
357       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
358       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
359       'url' => payload['url'],
360       'links' => payload['links'],
361   }
362 
363   # Context
364   @instance_context = nil
365   @params = {'sid' => sid || @properties['sid'], }
366 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/customer_profiles.rb
387 def account_sid
388   @properties['account_sid']
389 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 [CustomerProfilesContext] CustomerProfilesContext for this CustomerProfilesInstance

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
372 def context
373   unless @instance_context
374     @instance_context = CustomerProfilesContext.new(@version, @params['sid'], )
375   end
376   @instance_context
377 end
customer_profiles_channel_endpoint_assignment() click to toggle source

Access the customer_profiles_channel_endpoint_assignment @return [customer_profiles_channel_endpoint_assignment] customer_profiles_channel_endpoint_assignment

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
502 def customer_profiles_channel_endpoint_assignment
503   context.customer_profiles_channel_endpoint_assignment
504 end
customer_profiles_entity_assignments() click to toggle source

Access the customer_profiles_entity_assignments @return [customer_profiles_entity_assignments] customer_profiles_entity_assignments

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
488 def customer_profiles_entity_assignments
489   context.customer_profiles_entity_assignments
490 end
customer_profiles_evaluations() click to toggle source

Access the customer_profiles_evaluations @return [customer_profiles_evaluations] customer_profiles_evaluations

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
495 def customer_profiles_evaluations
496   context.customer_profiles_evaluations
497 end
date_created() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was created

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
429 def date_created
430   @properties['date_created']
431 end
date_updated() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was last updated

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
435 def date_updated
436   @properties['date_updated']
437 end
delete() click to toggle source

Delete the CustomerProfilesInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
481 def delete
482   context.delete
483 end
email() click to toggle source

@return [String] The email address

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
417 def email
418   @properties['email']
419 end
fetch() click to toggle source

Fetch the CustomerProfilesInstance @return [CustomerProfilesInstance] Fetched CustomerProfilesInstance

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
454 def fetch
455   context.fetch
456 end
friendly_name() click to toggle source

@return [String] The string that you assigned to describe the resource

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
399 def friendly_name
400   @properties['friendly_name']
401 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
515 def inspect
516   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
517   "<Twilio.Trusthub.V1.CustomerProfilesInstance #{values}>"
518 end
policy_sid() click to toggle source

@return [String] The unique string of a policy.

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
393 def policy_sid
394   @properties['policy_sid']
395 end
sid() click to toggle source

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

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
381 def sid
382   @properties['sid']
383 end
status() click to toggle source

@return [customer_profiles.Status] The verification status of the Customer-Profile resource

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
405 def status
406   @properties['status']
407 end
status_callback() click to toggle source

@return [String] The URL we call to inform your application of status changes.

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
423 def status_callback
424   @properties['status_callback']
425 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
508 def to_s
509   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
510   "<Twilio.Trusthub.V1.CustomerProfilesInstance #{values}>"
511 end
update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) click to toggle source

Update the CustomerProfilesInstance @param [customer_profiles.Status] status The verification status of the

Customer-Profile resource.

@param [String] status_callback The URL we call to inform your application of

status changes.

@param [String] friendly_name The string that you assigned to describe the

resource.

@param [String] email The email address that will receive updates when the

Customer-Profile resource changes status.

@return [CustomerProfilesInstance] Updated CustomerProfilesInstance

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
469 def update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset)
470   context.update(
471       status: status,
472       status_callback: status_callback,
473       friendly_name: friendly_name,
474       email: email,
475   )
476 end
url() click to toggle source

@return [String] The absolute URL of the Customer-Profile resource

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
441 def url
442   @properties['url']
443 end
valid_until() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource will be valid until.

    # File lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb
411 def valid_until
412   @properties['valid_until']
413 end