-
-
Save robins35/216e8f14a3b3fb0146fb 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
module SFDC_Models | |
module Connection | |
SF_CONFIG = YAML.load_file('config/databasedotcom.yml') rescue nil | |
def self.client | |
@client = Databasedotcom::Client.new("config/databasedotcom.yml") | |
@client.authenticate username: SF_CONFIG['username'], password: SF_CONFIG['password'] | |
@client.materialize("Lead") | |
@client.materialize("Account") | |
@client.materialize("Contact") | |
@client | |
end | |
end | |
def self.add_lead(first_name, last_name, email, phone, lead_src, demo_signup_flag) | |
if SFDC_Models::Connection.instance_variable_get("@client").nil? | |
puts "\n"*10 | |
puts "CALLING CLIENT!" | |
SFDC_Models::Connection.client | |
end | |
# BLAH BLAH | |
end | |
class << self | |
handle_asynchronously :add_lead | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment