Class: Twi::ConversationEvent

Inherits:
Event show all
Defined in:
lib/twi/conversation_event.rb

Overview

An event signaling a status change for a conversation.

Class Method Summary collapse

Methods inherited from Event

#code, #content, #conversation_id, #id, #image_urls, #participant, participant_params_for, #status, #target

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Twi::Resource

Class Method Details

.params_for(id:, status:) ⇒ Hash

Returns the shape of the payload send by Twilio to the callback URL.

Returns:

  • (Hash)

    the shape of the payload send by Twilio to the callback URL.



6
7
8
# File 'lib/twi/conversation_event.rb', line 6

def self.params_for(id:, status:)
  { ConversationSid: id, EventType: 'onConversationChanged', State: status.to_s }
end