lib/twilio-ruby/rest/conversations/v1/service/conversation.rb in twilio-ruby-7.3.4 vs lib/twilio-ruby/rest/conversations/v1/service/conversation.rb in twilio-ruby-7.3.5
- old
+ new
@@ -212,12 +212,12 @@
@solution = { chat_service_sid: chat_service_sid, sid: sid, }
@uri = "/Services/#{@solution[:chat_service_sid]}/Conversations/#{@solution[:sid]}"
# Dependents
@participants = nil
- @messages = nil
@webhooks = nil
+ @messages = nil
end
##
# Delete the ConversationInstance
# @param [ServiceConversationEnumWebhookEnabledType] x_twilio_webhook_enabled The X-Twilio-Webhook-Enabled HTTP request header
# @return [Boolean] True if delete succeeds, false otherwise
@@ -319,46 +319,46 @@
end
@participants
end
##
- # Access the messages
- # @return [MessageList]
- # @return [MessageContext] if sid was passed.
- def messages(sid=:unset)
+ # Access the webhooks
+ # @return [WebhookList]
+ # @return [WebhookContext] if sid was passed.
+ def webhooks(sid=:unset)
raise ArgumentError, 'sid cannot be nil' if sid.nil?
if sid != :unset
- return MessageContext.new(@version, @solution[:chat_service_sid], @solution[:sid],sid )
+ return WebhookContext.new(@version, @solution[:chat_service_sid], @solution[:sid],sid )
end
- unless @messages
- @messages = MessageList.new(
+ unless @webhooks
+ @webhooks = WebhookList.new(
@version, chat_service_sid: @solution[:chat_service_sid], conversation_sid: @solution[:sid], )
end
- @messages
+ @webhooks
end
##
- # Access the webhooks
- # @return [WebhookList]
- # @return [WebhookContext] if sid was passed.
- def webhooks(sid=:unset)
+ # Access the messages
+ # @return [MessageList]
+ # @return [MessageContext] if sid was passed.
+ def messages(sid=:unset)
raise ArgumentError, 'sid cannot be nil' if sid.nil?
if sid != :unset
- return WebhookContext.new(@version, @solution[:chat_service_sid], @solution[:sid],sid )
+ return MessageContext.new(@version, @solution[:chat_service_sid], @solution[:sid],sid )
end
- unless @webhooks
- @webhooks = WebhookList.new(
+ unless @messages
+ @messages = MessageList.new(
@version, chat_service_sid: @solution[:chat_service_sid], conversation_sid: @solution[:sid], )
end
- @webhooks
+ @messages
end
##
# Provide a user friendly representation
def to_s
@@ -606,20 +606,20 @@
def participants
context.participants
end
##
- # Access the messages
- # @return [messages] messages
- def messages
- context.messages
- end
-
- ##
# Access the webhooks
# @return [webhooks] webhooks
def webhooks
context.webhooks
+ end
+
+ ##
+ # Access the messages
+ # @return [messages] messages
+ def messages
+ context.messages
end
##
# Provide a user friendly representation
def to_s