Here is the documentation for the SugarCRM 5.5 API:
set_relationship
This is the gem which is creating methods for me to access it (line 110):
http://github.com/dennijo/Ruby-Sugar/blob/master/lib/ruby_sugar/client.rb
QUESTION: What is the actual format with an example for me to make a relationship between an Account and a Contact? I am confused in terms of what to pass. It looks like the API requires 5 parameters, but the gem only passes two. The documentation for the gem says to pass a hash as follows:
Assumes:
@client = RubySugar::Client.new(user,pass,url,true)
def set_relationship(mod,id,related,related_id)
data = [
{:module1=>mod,:moudule1_id=>id.to_s,:module2=>related,:module2_id=>related_id.to_s}
]
@client.set_relationship(data)
end