class Twilio::REST::Conversations::V1::ConversationContext::MessageContext::DeliveryReceiptContext
Public Class Methods
new(version, conversation_sid, message_sid, sid)
click to toggle source
Initialize the DeliveryReceiptContext
@param [Version] version Version
that contains the resource @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/conversation/message/delivery_receipt.rb 168 def initialize(version, conversation_sid, message_sid, sid) 169 super(version) 170 171 # Path Solution 172 @solution = {conversation_sid: conversation_sid, message_sid: message_sid, sid: sid, } 173 @uri = "/Conversations/#{@solution[:conversation_sid]}/Messages/#{@solution[:message_sid]}/Receipts/#{@solution[:sid]}" 174 end
Public Instance Methods
fetch()
click to toggle source
Fetch the DeliveryReceiptInstance
@return [DeliveryReceiptInstance] Fetched DeliveryReceiptInstance
# File lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb 179 def fetch 180 payload = @version.fetch('GET', @uri) 181 182 DeliveryReceiptInstance.new( 183 @version, 184 payload, 185 conversation_sid: @solution[:conversation_sid], 186 message_sid: @solution[:message_sid], 187 sid: @solution[:sid], 188 ) 189 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb 200 def inspect 201 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 202 "#<Twilio.Conversations.V1.DeliveryReceiptContext #{context}>" 203 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb 193 def to_s 194 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 195 "#<Twilio.Conversations.V1.DeliveryReceiptContext #{context}>" 196 end