class SalesforceAdapter::Base

Attributes

rforce_binding[R]
webservice[R]

Public Class Methods

new(config) click to toggle source

Initialize with the credentials

# File lib/salesforce_adapter.rb, line 29
def initialize(config)
  @rforce_binding = RforceBinding.new(config[:url], config[:login], config[:password])
end

Public Instance Methods

call_webservice(method_name, arguments, schema_url, service_path) click to toggle source

Queries a salesforce webservice

# File lib/salesforce_adapter.rb, line 66
def call_webservice(method_name, arguments, schema_url, service_path)

  # Perform the call to the webservice and returns the result
  Operations::WebserviceCall.new(@rforce_binding, method_name, arguments, schema_url, service_path).run()

end
create(table_name, attributes) click to toggle source

Creates a salesforce record

# File lib/salesforce_adapter.rb, line 56
def create(table_name, attributes)

  # Perform the creation and returns the id
  Operations::Create.new(@rforce_binding, table_name, attributes).run()

end
query( query_string ) click to toggle source

Runs a query on salesforce and returns the result

# File lib/salesforce_adapter.rb, line 38
def query( query_string )

  # Perform the query
  Operations::Query.new(@rforce_binding, query_string).run()

end
update(table_name, attributes) click to toggle source

Updates a salesforce record

# File lib/salesforce_adapter.rb, line 47
def update(table_name, attributes)

  # Perform the update and returns the id
  Operations::Update.new(@rforce_binding, table_name, attributes).run()

end