lib/twilio-ruby/rest/studio/v1/flow/engagement.rb in twilio-ruby-6.9.1 vs lib/twilio-ruby/rest/studio/v1/flow/engagement.rb in twilio-ruby-6.11.0

- old
+ new

@@ -18,10 +18,11 @@ class Studio < StudioBase class V1 < Version class FlowContext < InstanceContext class EngagementList < ListResource + ## # Initialize the EngagementList # @param [Version] version Version that contains the resource # @return [EngagementList] EngagementList def initialize(version, flow_sid: nil) @@ -47,10 +48,11 @@ 'To' => to, 'From' => from, 'Parameters' => Twilio.serialize_object(parameters), }) + payload = @version.create('POST', @uri, data: data) EngagementInstance.new( @version, payload, flow_sid: @solution[:flow_sid], @@ -172,17 +174,19 @@ ## # Delete the EngagementInstance # @return [Boolean] True if delete succeeds, false otherwise def delete + @version.delete('DELETE', @uri) end ## # Fetch the EngagementInstance # @return [EngagementInstance] Fetched EngagementInstance def fetch + payload = @version.fetch('GET', @uri) EngagementInstance.new( @version, payload, flow_sid: @solution[:flow_sid],