class Twilio::REST::Events::V1::SinkContext

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

Public Class Methods

new(version, sid) click to toggle source

Initialize the SinkContext @param [Version] version Version that contains the resource @param [String] sid A 34 character string that uniquely identifies this Sink. @return [SinkContext] SinkContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/events/v1/sink.rb
189 def initialize(version, sid)
190   super(version)
191 
192   # Path Solution
193   @solution = {sid: sid, }
194   @uri = "/Sinks/#{@solution[:sid]}"
195 
196   # Dependents
197   @sink_test = nil
198   @sink_validate = nil
199 end

Public Instance Methods

delete() click to toggle source

Delete the SinkInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/events/v1/sink.rb
213 def delete
214    @version.delete('DELETE', @uri)
215 end
fetch() click to toggle source

Fetch the SinkInstance @return [SinkInstance] Fetched SinkInstance

    # File lib/twilio-ruby/rest/events/v1/sink.rb
204 def fetch
205   payload = @version.fetch('GET', @uri)
206 
207   SinkInstance.new(@version, payload, sid: @solution[:sid], )
208 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/events/v1/sink.rb
263 def inspect
264   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
265   "#<Twilio.Events.V1.SinkContext #{context}>"
266 end
sink_test() click to toggle source

Access the sink_test @return [SinkTestList] @return [SinkTestContext]

    # File lib/twilio-ruby/rest/events/v1/sink.rb
234 def sink_test
235   unless @sink_test
236     @sink_test = SinkTestList.new(@version, sid: @solution[:sid], )
237   end
238 
239   @sink_test
240 end
sink_validate() click to toggle source

Access the sink_validate @return [SinkValidateList] @return [SinkValidateContext]

    # File lib/twilio-ruby/rest/events/v1/sink.rb
246 def sink_validate
247   unless @sink_validate
248     @sink_validate = SinkValidateList.new(@version, sid: @solution[:sid], )
249   end
250 
251   @sink_validate
252 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/events/v1/sink.rb
256 def to_s
257   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
258   "#<Twilio.Events.V1.SinkContext #{context}>"
259 end
update(description: nil) click to toggle source

Update the SinkInstance @param [String] description A human readable description for the Sink **This

value should not contain PII.**

@return [SinkInstance] Updated SinkInstance

    # File lib/twilio-ruby/rest/events/v1/sink.rb
222 def update(description: nil)
223   data = Twilio::Values.of({'Description' => description, })
224 
225   payload = @version.update('POST', @uri, data: data)
226 
227   SinkInstance.new(@version, payload, sid: @solution[:sid], )
228 end