Class: Twi::DeliveryEvent
- Defined in:
- lib/twi/delivery_event.rb
Overview
An event signaling the delivery of a message in a conversation.
Class Method Summary collapse
-
.params_for(id:, participant_id:, message_id:, status:, code: nil) ⇒ 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:, participant_id:, message_id:, status:, code: nil) ⇒ Hash
Returns the shape of the payload send by Twilio to the callback URL.
6 7 8 9 10 11 |
# File 'lib/twi/delivery_event.rb', line 6 def self.params_for(id:, participant_id:, message_id:, status:, code: nil) { ConversationSid: id, EventType: 'onDeliveryChanged', ParticipantSid: participant_id.to_s, MessageSid: , Status: status.to_s, ErrorCode: code }.compact end |