Leadsf
A ruby gem for work with the Salesforce Leads using Salesforce REST api with Force Gem.
Installation
Add this line to your application's Gemfile:
gem 'leadsf'
And then execute:
$ bundle
Or install it yourself as:
$ gem install leadsf
Usage
Leadsf is designed to work with a basic structure of Salesforce Leads
{Id, FirstName, LastName, Email, Company, Title, Phone, Website}
Initialization
# Use your Salesforce Data
leadsf = Leadsf.set(username, password, security_token, client_id, client_secret)
List
leads = leadsf.list
Find
lead = leadsf.find('00Qo00002BhCGEA0')
New
lead = leadsf.new
Save (create/update)
lead.FirstName = 'Name'
lead.LastName = 'Last'
lead.Email = 'email@domain.com'
lead.Company = 'Company'
lead.Title = 'President'
lead.Phone = '88 9999 8888'
lead.Website = 'www.domain.com'
leadsf.save(lead)
Destroy
leadsf.destroy(lead)
Contributing
- Fork it ( https://github.com/luigibertaco/leadsf/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request