Created
May 23, 2020 07:53
-
-
Save SahSantoshh/38e71613ea658854a318baa0cb77f820 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Restforce uses faye as the underlying implementation for CometD. | |
require 'restforce' | |
require 'faye' | |
class SalesforceSubscriber | |
attr_reader :client | |
LOG_PATH = "#{Rails.root}/log/#{Rails.env}_salesforce.log" | |
# Initialize a client with your username/password/oauth token/etc. | |
def initialize | |
@client = Restforce.new(username: ENV['SF_USERNAME'], | |
password: ENV['SF_PASSWORD'], | |
security_token: ENV['SF_SECURITY_TOKEN'], | |
client_id: ENV['SF_CLIENT_ID'], | |
client_secret: ENV['SF_SECRET_ID']) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment