Class: Twilio::REST::Events::V1::SinkContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Events::V1::SinkContext
- Defined in:
- lib/twilio-ruby/rest/events/v1/sink.rb,
lib/twilio-ruby/rest/events/v1/sink/sink_test.rb,
lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
Defined Under Namespace
Classes: SinkTestInstance, SinkTestList, SinkTestPage, SinkValidateInstance, SinkValidateList, SinkValidatePage
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the SinkInstance.
-
#fetch ⇒ SinkInstance
Fetch the SinkInstance.
-
#initialize(version, sid) ⇒ SinkContext
constructor
Initialize the SinkContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#sink_test ⇒ SinkTestList, SinkTestContext
Access the sink_test.
-
#sink_validate ⇒ SinkValidateList, SinkValidateContext
Access the sink_validate.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid) ⇒ SinkContext
Initialize the SinkContext
173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/twilio-ruby/rest/events/v1/sink.rb', line 173 def initialize(version, sid) super(version) # Path Solution @solution = {sid: sid, } @uri = "/Sinks/#{@solution[:sid]}" # Dependents @sink_test = nil @sink_validate = nil end |
Instance Method Details
#delete ⇒ Boolean
Delete the SinkInstance
197 198 199 |
# File 'lib/twilio-ruby/rest/events/v1/sink.rb', line 197 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ SinkInstance
Fetch the SinkInstance
188 189 190 191 192 |
# File 'lib/twilio-ruby/rest/events/v1/sink.rb', line 188 def fetch payload = @version.fetch('GET', @uri) SinkInstance.new(@version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
234 235 236 237 |
# File 'lib/twilio-ruby/rest/events/v1/sink.rb', line 234 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Events.V1.SinkContext #{context}>" end |
#sink_test ⇒ SinkTestList, SinkTestContext
Access the sink_test
205 206 207 208 209 210 211 |
# File 'lib/twilio-ruby/rest/events/v1/sink.rb', line 205 def sink_test unless @sink_test @sink_test = SinkTestList.new(@version, sid: @solution[:sid], ) end @sink_test end |
#sink_validate ⇒ SinkValidateList, SinkValidateContext
Access the sink_validate
217 218 219 220 221 222 223 |
# File 'lib/twilio-ruby/rest/events/v1/sink.rb', line 217 def sink_validate unless @sink_validate @sink_validate = SinkValidateList.new(@version, sid: @solution[:sid], ) end @sink_validate end |
#to_s ⇒ Object
Provide a user friendly representation
227 228 229 230 |
# File 'lib/twilio-ruby/rest/events/v1/sink.rb', line 227 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Events.V1.SinkContext #{context}>" end |