Class: Twilio::REST::Events::V1::SinkContext::SinkTestList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/events/v1/sink/sink_test.rb

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(version, sid: nil) ⇒ SinkTestList

Initialize the SinkTestList

Parameters:

  • version (Version)

    Version that contains the resource

  • sid (String) (defaults to: nil)

    A 34 character string that uniquely identifies this Sink.


22
23
24
25
26
27
28
# File 'lib/twilio-ruby/rest/events/v1/sink/sink_test.rb', line 22

def initialize(version, sid: nil)
  super(version)

  # Path Solution
  @solution = {sid: sid}
  @uri = "/Sinks/#{@solution[:sid]}/Test"
end

Instance Method Details

#createSinkTestInstance

Create the SinkTestInstance

Returns:


33
34
35
36
37
# File 'lib/twilio-ruby/rest/events/v1/sink/sink_test.rb', line 33

def create
  payload = @version.create('POST', @uri)

  SinkTestInstance.new(@version, payload, sid: @solution[:sid], )
end

#to_sObject

Provide a user friendly representation


41
42
43
# File 'lib/twilio-ruby/rest/events/v1/sink/sink_test.rb', line 41

def to_s
  '#<Twilio.Events.V1.SinkTestList>'
end