Class: Twi::ConversationEvent
- Defined in:
- lib/twi/conversation_event.rb
Overview
An event signaling a status change for a conversation.
Class Method Summary collapse
-
.params_for(id:, status:) ⇒ Hash
The shape of the payload send by Twilio to the callback URL.
Methods inherited from Event
#code, #content, #conversation_id, #id, #image_urls, #participant, participant_params_for, #status, #target
Methods inherited from Resource
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.
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 |