class Twilio::REST::Trusthub::V1::CustomerProfilesContext::CustomerProfilesChannelEndpointAssignmentInstance
Public Class Methods
Initialize the CustomerProfilesChannelEndpointAssignmentInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] customer_profile_sid
The unique string that we created to
identify the CustomerProfile resource.
@param [String] sid The unique string that we created to identify the resource. @return [CustomerProfilesChannelEndpointAssignmentInstance] CustomerProfilesChannelEndpointAssignmentInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb 251 def initialize(version, payload, customer_profile_sid: nil, sid: nil) 252 super(version) 253 254 # Marshaled Properties 255 @properties = { 256 'sid' => payload['sid'], 257 'customer_profile_sid' => payload['customer_profile_sid'], 258 'account_sid' => payload['account_sid'], 259 'channel_endpoint_type' => payload['channel_endpoint_type'], 260 'channel_endpoint_sid' => payload['channel_endpoint_sid'], 261 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 262 'url' => payload['url'], 263 } 264 265 # Context 266 @instance_context = nil 267 @params = {'customer_profile_sid' => customer_profile_sid, 'sid' => sid || @properties['sid'], } 268 end
Public Instance Methods
@return [String] The SID of the Account that created the resource
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb 299 def account_sid 300 @properties['account_sid'] 301 end
@return [String] The sid of an channel endpoint
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb 311 def channel_endpoint_sid 312 @properties['channel_endpoint_sid'] 313 end
@return [String] The type of channel endpoint
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb 305 def channel_endpoint_type 306 @properties['channel_endpoint_type'] 307 end
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [CustomerProfilesChannelEndpointAssignmentContext] CustomerProfilesChannelEndpointAssignmentContext
for this CustomerProfilesChannelEndpointAssignmentInstance
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb 274 def context 275 unless @instance_context 276 @instance_context = CustomerProfilesChannelEndpointAssignmentContext.new( 277 @version, 278 @params['customer_profile_sid'], 279 @params['sid'], 280 ) 281 end 282 @instance_context 283 end
@return [String] The unique string that identifies the CustomerProfile resource.
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb 293 def customer_profile_sid 294 @properties['customer_profile_sid'] 295 end
@return [Time] The ISO 8601 date and time in GMT when the resource was created
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb 317 def date_created 318 @properties['date_created'] 319 end
Delete the CustomerProfilesChannelEndpointAssignmentInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb 337 def delete 338 context.delete 339 end
Fetch the CustomerProfilesChannelEndpointAssignmentInstance
@return [CustomerProfilesChannelEndpointAssignmentInstance] Fetched CustomerProfilesChannelEndpointAssignmentInstance
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb 330 def fetch 331 context.fetch 332 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb 350 def inspect 351 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 352 "<Twilio.Trusthub.V1.CustomerProfilesChannelEndpointAssignmentInstance #{values}>" 353 end
@return [String] The unique string that identifies the resource
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb 287 def sid 288 @properties['sid'] 289 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb 343 def to_s 344 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 345 "<Twilio.Trusthub.V1.CustomerProfilesChannelEndpointAssignmentInstance #{values}>" 346 end
@return [String] The absolute URL of the Identity resource
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb 323 def url 324 @properties['url'] 325 end