Class: Twilio::REST::Numbers::V2::RegulatoryComplianceList::EndUserTypeContext

Inherits:
InstanceContext
  • Object
show all
Defined in:
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/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.



134
135
136
137
138
139
140
141
142
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb', line 134

def initialize(version, sid)
    super(version)

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

    
end

Instance Method Details

#fetchEndUserTypeInstance

Fetch the EndUserTypeInstance

Returns:



146
147
148
149
150
151
152
153
154
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb', line 146

def fetch

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

#inspectObject

Provide a detailed, user friendly representation



166
167
168
169
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb', line 166

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

#to_sObject

Provide a user friendly representation



159
160
161
162
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb', line 159

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