lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb in twilio-ruby-6.9.1 vs lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb in twilio-ruby-6.11.0

- old
+ new

@@ -19,10 +19,11 @@ class V1 < Version class ServiceContext < InstanceContext class ConversationContext < InstanceContext class ParticipantList < ListResource + ## # Initialize the ParticipantList # @param [Version] version Version that contains the resource # @return [ParticipantList] ParticipantList def initialize(version, chat_service_sid: nil, conversation_sid: nil) @@ -65,10 +66,11 @@ 'Attributes' => attributes, 'MessagingBinding.ProjectedAddress' => messaging_binding_projected_address, 'RoleSid' => role_sid, }) + headers = Twilio::Values.of({ 'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, }) payload = @version.create('POST', @uri, data: data, headers: headers) ParticipantInstance.new( @version, payload, @@ -194,19 +196,21 @@ # @return [Boolean] True if delete succeeds, false otherwise def delete( x_twilio_webhook_enabled: :unset ) + headers = Twilio::Values.of({ 'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, }) @version.delete('DELETE', @uri, headers: headers) end ## # Fetch the ParticipantInstance # @return [ParticipantInstance] Fetched ParticipantInstance def fetch + payload = @version.fetch('GET', @uri) ParticipantInstance.new( @version, payload, chat_service_sid: @solution[:chat_service_sid], @@ -251,9 +255,10 @@ 'MessagingBinding.ProjectedAddress' => messaging_binding_projected_address, 'LastReadMessageIndex' => last_read_message_index, 'LastReadTimestamp' => last_read_timestamp, }) + headers = Twilio::Values.of({ 'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, }) payload = @version.update('POST', @uri, data: data, headers: headers) ParticipantInstance.new( @version, payload,