Class: Twilio::REST::Events::V1::EventTypeContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Events::V1::EventTypeContext
- Defined in:
- lib/twilio-ruby/rest/events/v1/event_type.rb
Instance Method Summary collapse
-
#fetch ⇒ EventTypeInstance
Fetch the EventTypeInstance.
-
#initialize(version, type) ⇒ EventTypeContext
constructor
Initialize the EventTypeContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, type) ⇒ EventTypeContext
Initialize the EventTypeContext
142 143 144 145 146 147 148 149 150 |
# File 'lib/twilio-ruby/rest/events/v1/event_type.rb', line 142 def initialize(version, type) super(version) # Path Solution @solution = { type: type, } @uri = "/Types/#{@solution[:type]}" end |
Instance Method Details
#fetch ⇒ EventTypeInstance
Fetch the EventTypeInstance
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/twilio-ruby/rest/events/v1/event_type.rb', line 154 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) EventTypeInstance.new( @version, payload, type: @solution[:type], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
180 181 182 183 |
# File 'lib/twilio-ruby/rest/events/v1/event_type.rb', line 180 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Events.V1.EventTypeContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
173 174 175 176 |
# File 'lib/twilio-ruby/rest/events/v1/event_type.rb', line 173 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Events.V1.EventTypeContext #{context}>" end |