-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathSugarEmployees.yml
56 lines (50 loc) · 1.69 KB
/
SugarEmployees.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--- &id001 !ruby/object:Source
attributes:
name: SugarEmployees
refreshtime: 2008-12-09 00:40:14
prolog: |
u = @source.login
p = Digest::MD5.hexdigest(@source.password)
ua = {'user_name' => u,'password' => p}
ss = client.login(ua,nil)
if ss.error.number.to_i != 0
p 'failed to login - #{ss.error.description}'
return
else
session_id = ss['id']
uid = client.get_user_id(session_id)
end
updated_at: 2008-12-09 00:48:25.710096 Z
deletecall: name_value_list.push({'name'=>'deleted','value'=>'1'}); result=client.set_entry(session_id,'Employees',name_value_list); p result.inspect.to_s
createcall: result=client.set_entry(session_id,'Employees',name_value_list); p result.inspect.to_s
type:
url: http://rhomobile.com/sugar/soap.php?wsdl
sync: |
result.entry_list.each do |x|
x.name_value_list.each do |y|
p y.name + ":" + y.value
o=ObjectValue.new
o.object=x['id']
o.attrib=y.name
o.value=y.value
o.update_type='pending'
o.save
end
end
method:
id: "3"
updatecall: result=client.set_entry(session_id,'Employees',name_value_list); p result.inspect.to_s
call: |
select_fields = ['first_name','last_name','status','title','phone_mobile','user_name']
result = client.get_entry_list(session_id,'Employees',"(users.status='Active')",'last_name',0,select_fields,'10000',0);
password: password
login: adam
epilog: client.logout(session_id)
created_at: 2008-11-20 23:04:24
attributes_cache: {}
changed_attributes: {}
errors: !ruby/object:ActiveRecord::Errors
base: *id001
errors: {}
new_record_before_save: