class Twilio::REST::Trusthub::V1::EndUserTypeInstance
Public Class Methods
Initialize the EndUserTypeInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] sid The unique string that identifies the End-User Type
resource.
@return [EndUserTypeInstance] EndUserTypeInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb 189 def initialize(version, payload, sid: nil) 190 super(version) 191 192 # Marshaled Properties 193 @properties = { 194 'sid' => payload['sid'], 195 'friendly_name' => payload['friendly_name'], 196 'machine_name' => payload['machine_name'], 197 'fields' => payload['fields'], 198 'url' => payload['url'], 199 } 200 201 # Context 202 @instance_context = nil 203 @params = {'sid' => sid || @properties['sid'], } 204 end
Public Instance Methods
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [EndUserTypeContext] EndUserTypeContext
for this EndUserTypeInstance
# File lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb 210 def context 211 unless @instance_context 212 @instance_context = EndUserTypeContext.new(@version, @params['sid'], ) 213 end 214 @instance_context 215 end
Fetch the EndUserTypeInstance
@return [EndUserTypeInstance] Fetched EndUserTypeInstance
# File lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb 250 def fetch 251 context.fetch 252 end
@return [Array] The required information for creating an End-User.
# File lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb 237 def fields 238 @properties['fields'] 239 end
@return [String] A human-readable description of the End-User Type resource
# File lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb 225 def friendly_name 226 @properties['friendly_name'] 227 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb 263 def inspect 264 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 265 "<Twilio.Trusthub.V1.EndUserTypeInstance #{values}>" 266 end
@return [String] A machine-readable description of the End-User Type resource
# File lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb 231 def machine_name 232 @properties['machine_name'] 233 end
@return [String] The unique string that identifies the End-User Type resource
# File lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb 219 def sid 220 @properties['sid'] 221 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb 256 def to_s 257 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 258 "<Twilio.Trusthub.V1.EndUserTypeInstance #{values}>" 259 end
@return [String] The absolute URL of the End-User Type resource
# File lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb 243 def url 244 @properties['url'] 245 end