class Twilio::REST::Trusthub::V1::CustomerProfilesContext::CustomerProfilesEntityAssignmentsInstance
Public Class Methods
Initialize the CustomerProfilesEntityAssignmentsInstance
@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 Identity
resource.
@return [CustomerProfilesEntityAssignmentsInstance] CustomerProfilesEntityAssignmentsInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb 229 def initialize(version, payload, customer_profile_sid: nil, sid: nil) 230 super(version) 231 232 # Marshaled Properties 233 @properties = { 234 'sid' => payload['sid'], 235 'customer_profile_sid' => payload['customer_profile_sid'], 236 'account_sid' => payload['account_sid'], 237 'object_sid' => payload['object_sid'], 238 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 239 'url' => payload['url'], 240 } 241 242 # Context 243 @instance_context = nil 244 @params = {'customer_profile_sid' => customer_profile_sid, 'sid' => sid || @properties['sid'], } 245 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_entity_assignments.rb 276 def account_sid 277 @properties['account_sid'] 278 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 [CustomerProfilesEntityAssignmentsContext] CustomerProfilesEntityAssignmentsContext
for this CustomerProfilesEntityAssignmentsInstance
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb 251 def context 252 unless @instance_context 253 @instance_context = CustomerProfilesEntityAssignmentsContext.new( 254 @version, 255 @params['customer_profile_sid'], 256 @params['sid'], 257 ) 258 end 259 @instance_context 260 end
@return [String] The unique string that identifies the CustomerProfile resource.
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb 270 def customer_profile_sid 271 @properties['customer_profile_sid'] 272 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_entity_assignments.rb 288 def date_created 289 @properties['date_created'] 290 end
Delete the CustomerProfilesEntityAssignmentsInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb 308 def delete 309 context.delete 310 end
Fetch the CustomerProfilesEntityAssignmentsInstance
@return [CustomerProfilesEntityAssignmentsInstance] Fetched CustomerProfilesEntityAssignmentsInstance
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb 301 def fetch 302 context.fetch 303 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb 321 def inspect 322 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 323 "<Twilio.Trusthub.V1.CustomerProfilesEntityAssignmentsInstance #{values}>" 324 end
@return [String] The sid of an object bag
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb 282 def object_sid 283 @properties['object_sid'] 284 end
@return [String] The unique string that identifies the resource
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb 264 def sid 265 @properties['sid'] 266 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb 314 def to_s 315 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 316 "<Twilio.Trusthub.V1.CustomerProfilesEntityAssignmentsInstance #{values}>" 317 end
@return [String] The absolute URL of the Identity resource
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb 294 def url 295 @properties['url'] 296 end