0.0
No commit activity in last 3 years
No release in over 3 years
Create a Lead in Salesforce
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 1.21.0

Runtime

= 0.13.5
 Project Readme

salesforce-lead

Create Leads using Salesforce API

Gem Version

Usage

Constructor


	attributes: {
		last_name: String
		email: String
		company: String
		job_title: String
		phone: String
		website: String
	}
	credentials: {
		token: String
		instance_url: String
	}

Example

Salesforce::Lead.new({
    last_name: 'Doe',
    email: 'john@doe.com',
    company: 'Foo Bar Inc.',
    job_title: 'Developer',
    phone: '55011998012345',
    website: 'http://johndoe.com'
  }, { 
    token: 'Token123ABC', 
    instance_url: 'http://n123.salesforce.com' 
})

Methods


create

Sends the Lead to Salesforce API. Returns false if an error has ocurred or true if the request was succesfull.

success?

Check if the request succeed

Attributes


errors

When the request fails, the errors are stored in this array

Example
[{ message: 'Bad Request', code: 'BAD_REQUEST' }]

Development

Install the dependencies

bundle install

Run the test suite

rake test