Class: SalesforceAPI
- Inherits:
-
Object
- Object
- SalesforceAPI
- Defined in:
- lib/contactforce/salesforce_api.rb
Instance Method Summary collapse
Instance Method Details
#connect(account) ⇒ Object
8 9 10 11 |
# File 'lib/contactforce/salesforce_api.rb', line 8 def connect(account) @connection = Soapforce::Client.new @connection.authenticate(:username => account.username, :password => account.password) end |
#create_contact(contact) ⇒ Object
4 5 6 |
# File 'lib/contactforce/salesforce_api.rb', line 4 def create_contact(contact) @connection.create('Contact', { FirstName: contact.name, LastName: contact.last_name, Email: contact.email, Title: contact.job_title, Phone: contact.phone, Web_site__c: contact.website }) end |