Class: Twilio::REST::Events::V1::SinkContext::SinkValidateList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/events/v1/sink/sink_validate.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) ⇒ SinkValidateList

Initialize the SinkValidateList

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_validate.rb', line 22

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

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

Instance Method Details

#create(test_id: nil) ⇒ SinkValidateInstance

Create the SinkValidateInstance

Parameters:

  • test_id (String) (defaults to: nil)

    A 34 character string that uniquely identifies the test event for a Sink being validated.

Returns:


35
36
37
38
39
40
41
# File 'lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb', line 35

def create(test_id: nil)
  data = Twilio::Values.of({'TestId' => test_id, })

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

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

#to_sObject

Provide a user friendly representation


45
46
47
# File 'lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb', line 45

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