salesforce_connect 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -3
- data/lib/salesforce_connect/user.rb +19 -0
- data/lib/salesforce_connect/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6857c6fd6ac38e82f71cb7f4663ceb0a77e336bd
|
4
|
+
data.tar.gz: b3966aee94aebef5d00ec6941737115fef244844
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ca9f0c5a48e8b9d53a90e7ea5d669876c1c1366f05e932e32a5f297477f0d20d95f368bbbf9c2c062a7915705bce99fd31b2c476f10524e445b34bd23fa5a2a
|
7
|
+
data.tar.gz: 2253fdc0f47eae7a91d81f1078eed2ffab65eb778dccbef79b431c61b196859603e29dc48f6a0893a7273fa62738b23442c8f352154310947daf3bc35ce72a14
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
This gem makes easier to connect to sales force API for simple CRUD operations. It allows multiple configuration and easy integration with existing code.
|
4
4
|
|
5
|
-
It uses the
|
5
|
+
It uses the RestForce Gem (https://github.com/ejholmes/restforce). Please check Rest Force documentation for further funcionality.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -37,15 +37,17 @@ Create a new user object:
|
|
37
37
|
user = SalesforceConnect::User.new
|
38
38
|
|
39
39
|
Find:
|
40
|
-
|
40
|
+
|
41
41
|
user.find(:Id, '005o0000000VmeA')
|
42
42
|
|
43
43
|
Select:
|
44
|
+
|
44
45
|
user.select(:Id, '005o0000000VmeA')
|
45
46
|
|
46
47
|
Create:
|
47
|
-
|
48
|
+
|
48
49
|
user = SalesforceConnect::User.new
|
50
|
+
user.create(name: 'Test', last_name: 'test', email: 'test@test.com')
|
49
51
|
|
50
52
|
|
51
53
|
## Known limitations
|
@@ -1,5 +1,24 @@
|
|
1
1
|
module SalesforceConnect
|
2
2
|
class User
|
3
|
+
|
4
|
+
def all
|
5
|
+
users = []
|
6
|
+
result = SalesforceConnect.client.query('select FirstName, LastName, Email, CompanyName, Title, Phone from User').to_a
|
7
|
+
|
8
|
+
result.each do |user|
|
9
|
+
users << {
|
10
|
+
name: user[:FirstName],
|
11
|
+
last_name: user[:LastName],
|
12
|
+
email: user[:Email],
|
13
|
+
company: user[:CompanyName],
|
14
|
+
job_title: user[:Title],
|
15
|
+
phone: user[:Phone]
|
16
|
+
}
|
17
|
+
end
|
18
|
+
|
19
|
+
users
|
20
|
+
end
|
21
|
+
|
3
22
|
def find(field, value)
|
4
23
|
SalesforceConnect.client.find('User', value, field)
|
5
24
|
end
|