class Twilio::REST::Trusthub::V1::EndUserInstance
Public Class Methods
Initialize the EndUserInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] sid The unique string created by Twilio
to identify the End User
resource.
@return [EndUserInstance] EndUserInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 235 def initialize(version, payload, sid: nil) 236 super(version) 237 238 # Marshaled Properties 239 @properties = { 240 'sid' => payload['sid'], 241 'account_sid' => payload['account_sid'], 242 'friendly_name' => payload['friendly_name'], 243 'type' => payload['type'], 244 'attributes' => payload['attributes'], 245 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 246 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 247 'url' => payload['url'], 248 } 249 250 # Context 251 @instance_context = nil 252 @params = {'sid' => sid || @properties['sid'], } 253 end
Public Instance Methods
@return [String] The SID of the Account that created the resource
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 274 def account_sid 275 @properties['account_sid'] 276 end
@return [Hash] The set of parameters that compose the End Users resource
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 292 def attributes 293 @properties['attributes'] 294 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 [EndUserContext] EndUserContext
for this EndUserInstance
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 259 def context 260 unless @instance_context 261 @instance_context = EndUserContext.new(@version, @params['sid'], ) 262 end 263 @instance_context 264 end
@return [Time] The ISO 8601 date and time in GMT when the resource was created
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 298 def date_created 299 @properties['date_created'] 300 end
@return [Time] The ISO 8601 date and time in GMT when the resource was last updated
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 304 def date_updated 305 @properties['date_updated'] 306 end
Delete the EndUserInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 335 def delete 336 context.delete 337 end
Fetch the EndUserInstance
@return [EndUserInstance] Fetched EndUserInstance
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 317 def fetch 318 context.fetch 319 end
@return [String] The string that you assigned to describe the resource
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 280 def friendly_name 281 @properties['friendly_name'] 282 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 348 def inspect 349 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 350 "<Twilio.Trusthub.V1.EndUserInstance #{values}>" 351 end
@return [String] The unique string that identifies the resource
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 268 def sid 269 @properties['sid'] 270 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 341 def to_s 342 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 343 "<Twilio.Trusthub.V1.EndUserInstance #{values}>" 344 end
@return [String] The type of end user of the Bundle resource
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 286 def type 287 @properties['type'] 288 end
Update the EndUserInstance
@param [String] friendly_name
The string that you assigned to describe the
resource.
@param [Hash] attributes The set of parameters that are the attributes of the
End User resource which are derived End User Types.
@return [EndUserInstance] Updated EndUserInstance
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 328 def update(friendly_name: :unset, attributes: :unset) 329 context.update(friendly_name: friendly_name, attributes: attributes, ) 330 end
@return [String] The absolute URL of the End User resource
# File lib/twilio-ruby/rest/trusthub/v1/end_user.rb 310 def url 311 @properties['url'] 312 end