lib/twilio-ruby/rest/conversations/v1/service/conversation.rb in twilio-ruby-6.9.1 vs lib/twilio-ruby/rest/conversations/v1/service/conversation.rb in twilio-ruby-6.11.0
- old
+ new
@@ -18,10 +18,11 @@
class Conversations < ConversationsBase
class V1 < Version
class ServiceContext < InstanceContext
class ConversationList < ListResource
+
##
# Initialize the ConversationList
# @param [Version] version Version that contains the resource
# @return [ConversationList] ConversationList
def initialize(version, chat_service_sid: nil)
@@ -73,10 +74,11 @@
'Timers.Closed' => timers_closed,
'Bindings.Email.Address' => bindings_email_address,
'Bindings.Email.Name' => bindings_email_name,
})
+
headers = Twilio::Values.of({ 'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, })
payload = @version.create('POST', @uri, data: data, headers: headers)
ConversationInstance.new(
@version,
payload,
@@ -221,19 +223,21 @@
# @return [Boolean] True if delete succeeds, false otherwise
def delete(
x_twilio_webhook_enabled: :unset
)
+
headers = Twilio::Values.of({ 'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, })
@version.delete('DELETE', @uri, headers: headers)
end
##
# Fetch the ConversationInstance
# @return [ConversationInstance] Fetched ConversationInstance
def fetch
+
payload = @version.fetch('GET', @uri)
ConversationInstance.new(
@version,
payload,
chat_service_sid: @solution[:chat_service_sid],
@@ -283,9 +287,10 @@
'UniqueName' => unique_name,
'Bindings.Email.Address' => bindings_email_address,
'Bindings.Email.Name' => bindings_email_name,
})
+
headers = Twilio::Values.of({ 'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, })
payload = @version.update('POST', @uri, data: data, headers: headers)
ConversationInstance.new(
@version,
payload,