Class: Twilio::REST::Trusthub::V1::CustomerProfilesContext::CustomerProfilesEntityAssignmentsInstance

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

Instance Method Summary collapse

Constructor Details

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

Initialize the CustomerProfilesEntityAssignmentsInstance



478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb', line 478

def initialize(version, payload , customer_profile_sid: nil, sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'customer_profile_sid' => payload['customer_profile_sid'],
        'account_sid' => payload['account_sid'],
        'object_sid' => payload['object_sid'],
        '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



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

def 
    @properties['account_sid']
end

#contextCustomerProfilesEntityAssignmentsContext

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



501
502
503
504
505
506
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb', line 501

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

#customer_profile_sidString



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

def customer_profile_sid
    @properties['customer_profile_sid']
end

#date_createdTime



534
535
536
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb', line 534

def date_created
    @properties['date_created']
end

#deleteBoolean

Delete the CustomerProfilesEntityAssignmentsInstance



547
548
549
550
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb', line 547

def delete

    context.delete
end

#fetchCustomerProfilesEntityAssignmentsInstance

Fetch the CustomerProfilesEntityAssignmentsInstance



555
556
557
558
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb', line 555

def fetch

    context.fetch
end

#inspectObject

Provide a detailed, user friendly representation



569
570
571
572
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb', line 569

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

#object_sidString



528
529
530
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb', line 528

def object_sid
    @properties['object_sid']
end

#sidString



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

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



562
563
564
565
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb', line 562

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

#urlString



540
541
542
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb', line 540

def url
    @properties['url']
end