class Twilio::REST::Conversations::V1::ServiceContext::ConversationContext::MessageContext::DeliveryReceiptContext
Public Class Methods
new(version, chat_service_sid, conversation_sid, message_sid, sid)
click to toggle source
Initialize the DeliveryReceiptContext
@param [Version] version Version
that contains the resource @param [String] chat_service_sid The SID of the {Conversation
Service}[https://www.twilio.com/docs/conversations/api/service-resource] the Message resource is associated with.
@param [String] conversation_sid The unique ID of the
{Conversation}[https://www.twilio.com/docs/conversations/api/conversation-resource] for this message.
@param [String] message_sid The SID of the message within a
{Conversation}[https://www.twilio.com/docs/conversations/api/conversation-resource] the delivery receipt belongs to.
@param [String] sid A 34 character string that uniquely identifies this
resource.
@return [DeliveryReceiptContext] DeliveryReceiptContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb 180 def initialize(version, chat_service_sid, conversation_sid, message_sid, sid) 181 super(version) 182 183 # Path Solution 184 @solution = { 185 chat_service_sid: chat_service_sid, 186 conversation_sid: conversation_sid, 187 message_sid: message_sid, 188 sid: sid, 189 } 190 @uri = "/Services/#{@solution[:chat_service_sid]}/Conversations/#{@solution[:conversation_sid]}/Messages/#{@solution[:message_sid]}/Receipts/#{@solution[:sid]}" 191 end
Public Instance Methods
fetch()
click to toggle source
Fetch the DeliveryReceiptInstance
@return [DeliveryReceiptInstance] Fetched DeliveryReceiptInstance
# File lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb 196 def fetch 197 payload = @version.fetch('GET', @uri) 198 199 DeliveryReceiptInstance.new( 200 @version, 201 payload, 202 chat_service_sid: @solution[:chat_service_sid], 203 conversation_sid: @solution[:conversation_sid], 204 message_sid: @solution[:message_sid], 205 sid: @solution[:sid], 206 ) 207 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb 218 def inspect 219 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 220 "#<Twilio.Conversations.V1.DeliveryReceiptContext #{context}>" 221 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb 211 def to_s 212 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 213 "#<Twilio.Conversations.V1.DeliveryReceiptContext #{context}>" 214 end