Class: Twilio::REST::Trusthub::V1::EndUserTypeContext

Inherits:
InstanceContext show all
Defined in:
lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, sid) ⇒ EndUserTypeContext

Initialize the EndUserTypeContext

Parameters:

  • version (Version)

    Version that contains the resource

  • sid (String)

    The unique string that identifies the End-User Type resource.


149
150
151
152
153
154
155
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 149

def initialize(version, sid)
  super(version)

  # Path Solution
  @solution = {sid: sid, }
  @uri = "/EndUserTypes/#{@solution[:sid]}"
end

Instance Method Details

#fetchEndUserTypeInstance

Fetch the EndUserTypeInstance

Returns:


160
161
162
163
164
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 160

def fetch
  payload = @version.fetch('GET', @uri)

  EndUserTypeInstance.new(@version, payload, sid: @solution[:sid], )
end

#inspectObject

Provide a detailed, user friendly representation


175
176
177
178
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 175

def inspect
  context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
  "#<Twilio.Trusthub.V1.EndUserTypeContext #{context}>"
end

#to_sObject

Provide a user friendly representation


168
169
170
171
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 168

def to_s
  context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
  "#<Twilio.Trusthub.V1.EndUserTypeContext #{context}>"
end