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



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 275

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'],
    }

    # 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



319
320
321
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 319

def 
    @properties['account_sid']
end

#channel_endpoint_sidString



331
332
333
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 331

def channel_endpoint_sid
    @properties['channel_endpoint_sid']
end

#channel_endpoint_typeString



325
326
327
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 325

def channel_endpoint_type
    @properties['channel_endpoint_type']
end

#contextCustomerProfilesChannelEndpointAssignmentContext

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



298
299
300
301
302
303
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 298

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

#customer_profile_sidString



313
314
315
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 313

def customer_profile_sid
    @properties['customer_profile_sid']
end

#date_createdTime



337
338
339
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 337

def date_created
    @properties['date_created']
end

#deleteBoolean

Delete the CustomerProfilesChannelEndpointAssignmentInstance



350
351
352
353
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 350

def delete

    context.delete
end

#fetchCustomerProfilesChannelEndpointAssignmentInstance

Fetch the CustomerProfilesChannelEndpointAssignmentInstance



358
359
360
361
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 358

def fetch

    context.fetch
end

#inspectObject

Provide a detailed, user friendly representation



372
373
374
375
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 372

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

#sidString



307
308
309
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 307

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



365
366
367
368
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 365

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

#urlString



343
344
345
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb', line 343

def url
    @properties['url']
end