Class: Twilio::REST::Events::V1::SinkContext::SinkValidateList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Events::V1::SinkContext::SinkValidateList
- Defined in:
- lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb
Instance Method Summary collapse
-
#create(test_id: nil) ⇒ SinkValidateInstance
Create the SinkValidateInstance.
-
#initialize(version, sid: nil) ⇒ SinkValidateList
constructor
Initialize the SinkValidateList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid: nil) ⇒ SinkValidateList
Initialize the SinkValidateList
28 29 30 31 32 33 34 |
# File 'lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb', line 28 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
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb', line 39 def create( test_id: nil ) data = Twilio::Values.of({ 'TestId' => test_id, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.create('POST', @uri, data: data, headers: headers) SinkValidateInstance.new( @version, payload, sid: @solution[:sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
65 66 67 |
# File 'lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb', line 65 def to_s '#<Twilio.Events.V1.SinkValidateList>' end |