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.



132
133
134
135
136
137
138
139
140
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 132

def initialize(version, sid)
    super(version)

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

    
end

Instance Method Details

#fetchEndUserTypeInstance

Fetch the EndUserTypeInstance

Returns:



144
145
146
147
148
149
150
151
152
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 144

def fetch

    payload = @version.fetch('GET', @uri)
    EndUserTypeInstance.new(
        @version,
        payload,
        sid: @solution[:sid],
    )
end

#inspectObject

Provide a detailed, user friendly representation



164
165
166
167
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 164

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

#to_sObject

Provide a user friendly representation



157
158
159
160
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 157

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