Sha256: c39c73d09bd159779e2ff2a8ad6827abbfdcaaff91b490960837b71095d51e05
Contents?: true
Size: 705 Bytes
Versions: 105
Compression:
Stored size: 705 Bytes
Contents
module ForestLiana class IntercomConversationGetter < IntegrationBaseGetter attr_accessor :record def initialize(params) @params = params @access_token = ForestLiana.integrations[:intercom][:access_token] @intercom = ::Intercom::Client.new(token: @access_token) end def perform begin @record = @intercom.conversations.find(id: @params[:conversation_id]) rescue Intercom::ResourceNotFound @record = nil rescue Intercom::UnexpectedError => exception FOREST_REPORTER.report exception FOREST_LOGGER.error "Cannot retrieve the Intercom conversation: #{exception.message}" @record = nil end end end end
Version data entries
105 entries across 105 versions & 1 rubygems