Class: Twilio::REST::Trusthub::V1::EndUserTypeInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Trusthub::V1::EndUserTypeInstance
- Defined in:
- lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb
Instance Method Summary collapse
-
#context ⇒ EndUserTypeContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ EndUserTypeInstance
Fetch the EndUserTypeInstance.
-
#fields ⇒ Array<Hash>
The required information for creating an End-User.
-
#friendly_name ⇒ String
A human-readable description that is assigned to describe the End-User Type resource.
-
#initialize(version, payload, sid: nil) ⇒ EndUserTypeInstance
constructor
Initialize the EndUserTypeInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#machine_name ⇒ String
A machine-readable description of the End-User Type resource.
-
#sid ⇒ String
The unique string that identifies the End-User Type resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the End-User Type resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ EndUserTypeInstance
Initialize the EndUserTypeInstance
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 375 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'friendly_name' => payload['friendly_name'], 'machine_name' => payload['machine_name'], 'fields' => payload['fields'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#context ⇒ EndUserTypeContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
397 398 399 400 401 402 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 397 def context unless @instance_context @instance_context = EndUserTypeContext.new(@version , @params['sid']) end @instance_context end |
#fetch ⇒ EndUserTypeInstance
Fetch the EndUserTypeInstance
437 438 439 440 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 437 def fetch context.fetch end |
#fields ⇒ Array<Hash>
424 425 426 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 424 def fields @properties['fields'] end |
#friendly_name ⇒ String
412 413 414 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 412 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
451 452 453 454 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 451 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trusthub.V1.EndUserTypeInstance #{values}>" end |
#machine_name ⇒ String
418 419 420 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 418 def machine_name @properties['machine_name'] end |
#sid ⇒ String
406 407 408 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 406 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
444 445 446 447 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 444 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trusthub.V1.EndUserTypeInstance #{values}>" end |
#url ⇒ String
430 431 432 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 430 def url @properties['url'] end |