Class: Twilio::REST::Trusthub::V1::CustomerProfilesContext::CustomerProfilesChannelEndpointAssignmentInstance

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

Instance Method Summary collapse

Constructor Details

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

Initialize the CustomerProfilesChannelEndpointAssignmentInstance

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 CustomerProfilesChannelEndpointAssignment resource.

  • sid (String) (defaults to: nil) —

    The SID of the Call resource to fetch.



500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 500

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'],
        'channel_endpoint_type' => payload['channel_endpoint_type'],
        'channel_endpoint_sid' => payload['channel_endpoint_sid'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'url' => payload['url'],
        'code' => payload['code'],
        'message' => payload['message'],
        'more_info' => payload['more_info'],
        'status' => payload['status'],
    }

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

Instance Method Details

#account_sid ⇒ String

Returns The SID of the Account that created the Item Assignment resource.

Returns:

  • (String) —

    The SID of the Account that created the Item Assignment resource.



549
550
551
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 549

def 
    @properties['account_sid']
end

#channel_endpoint_sid ⇒ String

Returns The SID of an channel endpoint.

Returns:

  • (String) —

    The SID of an channel endpoint



561
562
563
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 561

def channel_endpoint_sid
    @properties['channel_endpoint_sid']
end

#channel_endpoint_type ⇒ String

Returns The type of channel endpoint. eg: phone-number.

Returns:

  • (String) —

    The type of channel endpoint. eg: phone-number



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

def channel_endpoint_type
    @properties['channel_endpoint_type']
end

#code ⇒ String

Returns Twilio-specific error code.

Returns:

  • (String) —

    Twilio-specific error code



579
580
581
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 579

def code
    @properties['code']
end

#context ⇒ CustomerProfilesChannelEndpointAssignmentContext

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

Returns:



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

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

#customer_profile_sid ⇒ String

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

Returns:

  • (String) —

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



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

def customer_profile_sid
    @properties['customer_profile_sid']
end

#date_created ⇒ Time

Returns The date and time in GMT when the resource was created specified in ISO 8601 format.

Returns:

  • (Time) —

    The date and time in GMT when the resource was created specified in ISO 8601 format.



567
568
569
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 567

def date_created
    @properties['date_created']
end

#delete ⇒ Boolean

Delete the CustomerProfilesChannelEndpointAssignmentInstance

Returns:

  • (Boolean) —

    True if delete succeeds, false otherwise



604
605
606
607
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 604

def delete

    context.delete
end

#fetch ⇒ CustomerProfilesChannelEndpointAssignmentInstance

Fetch the CustomerProfilesChannelEndpointAssignmentInstance

Returns:



612
613
614
615
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 612

def fetch

    context.fetch
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



626
627
628
629
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 626

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

#message ⇒ String

Returns Error message.

Returns:

  • (String) —

    Error message



585
586
587
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 585

def message
    @properties['message']
end

#more_info ⇒ String

Returns Link to Error Code References.

Returns:

  • (String) —

    Link to Error Code References



591
592
593
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 591

def more_info
    @properties['more_info']
end

#sid ⇒ String

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

Returns:

  • (String) —

    The unique string that we created to identify the Item Assignment resource.



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

def sid
    @properties['sid']
end

#status ⇒ String

Returns HTTP response status code.

Returns:

  • (String) —

    HTTP response status code



597
598
599
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 597

def status
    @properties['status']
end

#to_s ⇒ Object

Provide a user friendly representation



619
620
621
622
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 619

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

#url ⇒ String

Returns The absolute URL of the Identity resource.

Returns:

  • (String) —

    The absolute URL of the Identity resource.



573
574
575
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 573

def url
    @properties['url']
end