class Twilio::REST::Events::V1::SinkInstance

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

Public Class Methods

new(version, payload, sid: nil) click to toggle source

Initialize the SinkInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid A 34 character string that uniquely identifies this Sink. @return [SinkInstance] SinkInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/events/v1/sink.rb
278 def initialize(version, payload, sid: nil)
279   super(version)
280 
281   # Marshaled Properties
282   @properties = {
283       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
284       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
285       'description' => payload['description'],
286       'sid' => payload['sid'],
287       'sink_configuration' => payload['sink_configuration'],
288       'sink_type' => payload['sink_type'],
289       'status' => payload['status'],
290       'url' => payload['url'],
291       'links' => payload['links'],
292   }
293 
294   # Context
295   @instance_context = nil
296   @params = {'sid' => sid || @properties['sid'], }
297 end

Public Instance Methods

context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [SinkContext] SinkContext for this SinkInstance

    # File lib/twilio-ruby/rest/events/v1/sink.rb
303 def context
304   unless @instance_context
305     @instance_context = SinkContext.new(@version, @params['sid'], )
306   end
307   @instance_context
308 end
date_created() click to toggle source

@return [Time] The date this Sink was created

    # File lib/twilio-ruby/rest/events/v1/sink.rb
312 def date_created
313   @properties['date_created']
314 end
date_updated() click to toggle source

@return [Time] The date this Sink was updated

    # File lib/twilio-ruby/rest/events/v1/sink.rb
318 def date_updated
319   @properties['date_updated']
320 end
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
374 def delete
375   context.delete
376 end
description() click to toggle source

@return [String] Sink Description

    # File lib/twilio-ruby/rest/events/v1/sink.rb
324 def description
325   @properties['description']
326 end
fetch() click to toggle source

Fetch the SinkInstance @return [SinkInstance] Fetched SinkInstance

    # File lib/twilio-ruby/rest/events/v1/sink.rb
367 def fetch
368   context.fetch
369 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/events/v1/sink.rb
410 def inspect
411   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
412   "<Twilio.Events.V1.SinkInstance #{values}>"
413 end
sid() click to toggle source

@return [String] A string that uniquely identifies this Sink.

    # File lib/twilio-ruby/rest/events/v1/sink.rb
330 def sid
331   @properties['sid']
332 end
sink_configuration() click to toggle source

@return [Hash] JSON Sink configuration.

    # File lib/twilio-ruby/rest/events/v1/sink.rb
336 def sink_configuration
337   @properties['sink_configuration']
338 end
sink_test() click to toggle source

Access the sink_test @return [sink_test] sink_test

    # File lib/twilio-ruby/rest/events/v1/sink.rb
390 def sink_test
391   context.sink_test
392 end
sink_type() click to toggle source

@return [sink.SinkType] Sink type.

    # File lib/twilio-ruby/rest/events/v1/sink.rb
342 def sink_type
343   @properties['sink_type']
344 end
sink_validate() click to toggle source

Access the sink_validate @return [sink_validate] sink_validate

    # File lib/twilio-ruby/rest/events/v1/sink.rb
397 def sink_validate
398   context.sink_validate
399 end
status() click to toggle source

@return [sink.Status] The Status of this Sink

    # File lib/twilio-ruby/rest/events/v1/sink.rb
348 def status
349   @properties['status']
350 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/events/v1/sink.rb
403 def to_s
404   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
405   "<Twilio.Events.V1.SinkInstance #{values}>"
406 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
383 def update(description: nil)
384   context.update(description: description, )
385 end
url() click to toggle source

@return [String] The URL of this resource.

    # File lib/twilio-ruby/rest/events/v1/sink.rb
354 def url
355   @properties['url']
356 end