Guest User

Untitled

a guest
Sep 24th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. # lib/Salesforce.rb
  2. class Salesforce
  3. def initialize
  4. client = Databasedotcom::Client.new :client_id => SFDC_CONFIG["client_id"],
  5. :client_secret => SFDC_CONFIG["client_secret"]
  6. client.authenticate :username => SFDC_CONFIG["username"],
  7. :password => SFDC_CONFIG["password"] + SFDC_CONFIG["security_token"]
  8. client.sobject_module = Salesforce
  9.  
  10. # materialize objects
  11. SFDC_CONFIG["objects"].each do |sobject|
  12. client.materialize(sobject)
  13. end
  14. end
  15. end
Add Comment
Please, Sign In to add comment