Class: Twilio::REST::Trusthub::V1::CustomerProfilesInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, sid: nil) ⇒ CustomerProfilesInstance

Initialize the CustomerProfilesInstance



641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 641

def initialize(version, payload , sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'account_sid' => payload['account_sid'],
        'policy_sid' => payload['policy_sid'],
        'friendly_name' => payload['friendly_name'],
        'status' => payload['status'],
        'valid_until' => Twilio.deserialize_iso8601_datetime(payload['valid_until']),
        'email' => payload['email'],
        'status_callback' => payload['status_callback'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
        'url' => payload['url'],
        'links' => payload['links'],
        'errors' => payload['errors'],
    }

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

Instance Method Details

#account_sidString



686
687
688
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 686

def 
    @properties['account_sid']
end

#contextCustomerProfilesContext

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



671
672
673
674
675
676
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 671

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

#customer_profiles_channel_endpoint_assignmentcustomer_profiles_channel_endpoint_assignment

Access the customer_profiles_channel_endpoint_assignment



797
798
799
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 797

def customer_profiles_channel_endpoint_assignment
    context.customer_profiles_channel_endpoint_assignment
end

#customer_profiles_entity_assignmentscustomer_profiles_entity_assignments

Access the customer_profiles_entity_assignments



804
805
806
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 804

def customer_profiles_entity_assignments
    context.customer_profiles_entity_assignments
end

#customer_profiles_evaluationscustomer_profiles_evaluations

Access the customer_profiles_evaluations



811
812
813
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 811

def customer_profiles_evaluations
    context.customer_profiles_evaluations
end

#date_createdTime



728
729
730
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 728

def date_created
    @properties['date_created']
end

#date_updatedTime



734
735
736
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 734

def date_updated
    @properties['date_updated']
end

#deleteBoolean

Delete the CustomerProfilesInstance



759
760
761
762
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 759

def delete

    context.delete
end

#emailString



716
717
718
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 716

def email
    @properties['email']
end

#errorsArray<Hash>



752
753
754
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 752

def errors
    @properties['errors']
end

#fetchCustomerProfilesInstance

Fetch the CustomerProfilesInstance



767
768
769
770
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 767

def fetch

    context.fetch
end

#friendly_nameString



698
699
700
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 698

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



824
825
826
827
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 824

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


746
747
748
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 746

def links
    @properties['links']
end

#policy_sidString



692
693
694
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 692

def policy_sid
    @properties['policy_sid']
end

#sidString



680
681
682
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 680

def sid
    @properties['sid']
end

#statusStatus



704
705
706
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 704

def status
    @properties['status']
end

#status_callbackString



722
723
724
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 722

def status_callback
    @properties['status_callback']
end

#to_sObject

Provide a user friendly representation



817
818
819
820
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 817

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

#update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) ⇒ CustomerProfilesInstance

Update the CustomerProfilesInstance



779
780
781
782
783
784
785
786
787
788
789
790
791
792
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 779

def update(
    status: :unset, 
    status_callback: :unset, 
    friendly_name: :unset, 
    email: :unset
)

    context.update(
        status: status, 
        status_callback: status_callback, 
        friendly_name: friendly_name, 
        email: email, 
    )
end

#urlString



740
741
742
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 740

def url
    @properties['url']
end

#valid_untilTime



710
711
712
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb', line 710

def valid_until
    @properties['valid_until']
end