This gem is a partial connector between site RDStation Desafio 2 and site salesforce.com. Your function is simplify the using of the gem RestForce according the site RDStation Desafio 2 needs.
The authentication with salesforce.com is not done inside gem, it happen on site RDStation Desafio 2. To init gem, is used
client = SalesforceDesafio::Client.new(provider, uid, name, oauth_token, refresh_token, instance_url, client_id, client_secret)
The first five parameters is comes from the User class. Other 2 parameter is comes from app salesforce that allows connect to salesforce site.
To get list of Leads, is used
leads = client.select_pessoas
The data are Id, FirstName, LastName, Email, Company, Title, Phone and Website.
For add a pessoa or (Lead) in salesforce.com, is used
id = client.add_pessoa({ first_name: "name", last_name: "last name", email: "email", company: "company", title: "job title", phone: "phone", website: "website" })
The last_name and company cannot nil, because salesforce.com not accepted. The email can be a format email.
Copyright © 2014 Jairo Tuboi. See LICENSE.txt for further details.