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 protected]'
lead.Company = 'Company'
lead.Title = 'President'
lead.Phone = '88 9999 8888'
lead.Website = 'www.domain.com'

leadsf.save(lead)

Destroy

leadsf.destroy(lead)

Contributing

  1. Fork it ( https://github.com/luigibertaco/leadsf/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request