class SalesforceClient
Public Class Methods
new(username, password, security_token, client_id, client_secret)
click to toggle source
# File lib/rd_person/SalesforceClient.rb, line 6 def initialize(username, password, security_token, client_id, client_secret) @credential = Restforce.new :username => username, :password => password, :security_token => security_token, :client_id => client_id, :client_secret => client_secret end
Public Instance Methods
create(person)
click to toggle source
# File lib/rd_person/SalesforceClient.rb, line 15 def create(person) attributes = { FirstName: person.name, LastName: person.last_name, Email: person.email, Company: person.company, Title: person.job_title, Phone: person.phone, Website: person.website } @credential.create!('Lead', attributes) end