rforce
DESCRIPTION:
RForce is a simple, usable binding to the SalesForce API.
FEATURES/PROBLEMS:
Rather than enforcing adherence to the sforce.com schema, RForce assumes you are familiar with the API. Ruby method names become SOAP method names. Nested Ruby hashes become nested XML elements.
SYNOPSIS:
binding = RForce::Binding.new \
'https://www.salesforce.com/services/Soap/u/10.0'
binding.login \
'email', 'password_with_token'
answer = binding.search \
:searchString =>
'find {McFakerson Co} in name fields returning account(id)'
account = answer.searchResponse.result.searchRecords.record
account = account.first if account.is_a? Array
account_id = account.Id
account_id = account_id.first if account_id.is_a? Array
opportunity = [
:type, 'Opportunity',
:accountId, account_id,
:amount, '10.00',
:name, 'Fakey McFakerson',
:closeDate, '2008-07-04',
:stageName, 'Closed Won'
]
binding.create :sObject => opportunity
REQUIREMENTS:
-
Builder gem
-
A SalesForce Enterprise or Developer account
INSTALL:
-
sudo gem install rforce