Class: Twilio::REST::Events::V1::SinkContext::SinkTestList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Events::V1::SinkContext::SinkTestList
- Defined in:
- lib/twilio-ruby/rest/events/v1/sink/sink_test.rb
Instance Method Summary collapse
-
#create ⇒ SinkTestInstance
Create the SinkTestInstance.
-
#initialize(version, sid: nil) ⇒ SinkTestList
constructor
Initialize the SinkTestList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid: nil) ⇒ SinkTestList
Initialize the SinkTestList
28 29 30 31 32 33 34 |
# File 'lib/twilio-ruby/rest/events/v1/sink/sink_test.rb', line 28 def initialize(version, sid: nil) super(version) # Path Solution @solution = { sid: sid } @uri = "/Sinks/#{@solution[:sid]}/Test" end |
Instance Method Details
#create ⇒ SinkTestInstance
Create the SinkTestInstance
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/twilio-ruby/rest/events/v1/sink/sink_test.rb', line 38 def create headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.create('POST', @uri, headers: headers) SinkTestInstance.new( @version, payload, sid: @solution[:sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
58 59 60 |
# File 'lib/twilio-ruby/rest/events/v1/sink/sink_test.rb', line 58 def to_s '#<Twilio.Events.V1.SinkTestList>' end |