class Twilio::REST::Trusthub::V1::EndUserInstance

Public Class Methods

new(version, payload, sid: nil) click to toggle source

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

Calls superclass method 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

account_sid() click to toggle source

@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
attributes() click to toggle source

@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
context() click to toggle source

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
date_created() click to toggle source

@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
date_updated() click to toggle source

@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() click to toggle source

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() click to toggle source

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
friendly_name() click to toggle source

@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
inspect() click to toggle source

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
sid() click to toggle source

@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
to_s() click to toggle source

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
type() click to toggle source

@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(friendly_name: :unset, attributes: :unset) click to toggle source

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
url() click to toggle source

@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