vtiger 0.6.7 → 0.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/vtiger/commands.rb +2 -16
  2. metadata +4 -4
@@ -27,7 +27,7 @@ module Vtiger
27
27
  def add_account(options,accountname,hashv)
28
28
  puts "in addobject"
29
29
  object_map= { 'assigned_user_id'=>"#{self.userid}",'accountname'=>"#{accountname}"}
30
- add_object(object_map,hashv,'Leads')
30
+ add_object(object_map,hashv,'Accounts')
31
31
  end
32
32
  def add_contact(options,ln,email,hashv)
33
33
  puts "in contact"
@@ -133,21 +133,7 @@ module Vtiger
133
133
  puts "in query element by email"
134
134
  field='email'
135
135
  field='email1' if element=='Accounts'
136
- action_string=ERB::Util.url_encode("select id from #{element} where #{field} like '#{email}';")
137
- # puts "action string:" +action_string
138
- res = http_ask_get(self.endpoint_url+"operation=query&sessionName=#{self.session_name}&query="+action_string)
139
- values=res["result"][0] if res["success"]==true #comes back as array
140
- success = false
141
- #puts values.inspect
142
- # return the account id
143
- self.object_id = 'failed'
144
- if values!= nil
145
- self.object_id=values["id"]
146
- success=true
147
- # self.account_name=values["accountname"]
148
- end
149
-
150
- return success,self.object_id
136
+ query_element_by_field(element,field,email)
151
137
  end
152
138
  def query_element_by_field(element,field,name)
153
139
  puts "in query element by field"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vtiger
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 7
10
- version: 0.6.7
9
+ - 8
10
+ version: 0.6.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Scott Sproule
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-19 00:00:00 +08:00
18
+ date: 2011-03-20 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies: []
21
21