class Twilio::REST::Events::V1::EventTypeContext

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Public Class Methods

new(version, type) click to toggle source

Initialize the EventTypeContext @param [Version] version Version that contains the resource @param [String] type A string that uniquely identifies this Event Type. @return [EventTypeContext] EventTypeContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/events/v1/event_type.rb
161 def initialize(version, type)
162   super(version)
163 
164   # Path Solution
165   @solution = {type: type, }
166   @uri = "/Types/#{@solution[:type]}"
167 end

Public Instance Methods

fetch() click to toggle source

Fetch the EventTypeInstance @return [EventTypeInstance] Fetched EventTypeInstance

    # File lib/twilio-ruby/rest/events/v1/event_type.rb
172 def fetch
173   payload = @version.fetch('GET', @uri)
174 
175   EventTypeInstance.new(@version, payload, type: @solution[:type], )
176 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/events/v1/event_type.rb
187 def inspect
188   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
189   "#<Twilio.Events.V1.EventTypeContext #{context}>"
190 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/events/v1/event_type.rb
180 def to_s
181   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
182   "#<Twilio.Events.V1.EventTypeContext #{context}>"
183 end