sf_connect 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sf_connect/version.rb +1 -1
- data/lib/sf_connect.rb +16 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8db480f58bf437229d4a2514b8c145c870bcff9931be3948c268ececf5ce90e
|
4
|
+
data.tar.gz: cd5cedda64562b26e30887bdf8e622c66268c2c04d5a6510fa520a8c1e7f3bd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9bd2c79639efc91ecb6baea6d2d071e37daaac742804ddb78bacde7cec940e144766db5e71f1cd2d6e6fc98f82dab45269483fc132b5302c7fd00f8567fefa2
|
7
|
+
data.tar.gz: 6facb02db12ddd4056d2199ad7100a3e6f007227ac5dd861357953442fa92b28d354dcf029e23485ac55aa005a0efd3043cbff9a6e1da9035ea3572858c24ea2
|
data/lib/sf_connect/version.rb
CHANGED
data/lib/sf_connect.rb
CHANGED
@@ -17,24 +17,32 @@ module SfConnect
|
|
17
17
|
SfConnect::Define.new(salesforce_object_name, where:, fields:, &).call
|
18
18
|
end
|
19
19
|
|
20
|
+
def connect
|
21
|
+
yield Restforce.new
|
22
|
+
end
|
23
|
+
|
20
24
|
def query(soql)
|
21
|
-
|
25
|
+
connect { |restforce| restforce.query(soql) }
|
22
26
|
end
|
23
27
|
|
24
28
|
def find(salesforce_object_name, id, field)
|
25
|
-
|
29
|
+
connect { |restforce| restforce.find(salesforce_object_name, id, field) }
|
26
30
|
end
|
27
31
|
|
28
32
|
def create!(salesforce_object_name, payload)
|
29
|
-
|
30
|
-
|
31
|
-
|
33
|
+
connect do |restforce|
|
34
|
+
restforce.create!(
|
35
|
+
salesforce_object_name, payload
|
36
|
+
)
|
37
|
+
end
|
32
38
|
end
|
33
39
|
|
34
40
|
def update!(salesforce_object_name, id, payload)
|
35
|
-
|
36
|
-
|
37
|
-
|
41
|
+
connect do |restforce|
|
42
|
+
restforce.update!(
|
43
|
+
salesforce_object_name, { Id: id, **payload }
|
44
|
+
)
|
45
|
+
end
|
38
46
|
end
|
39
47
|
end
|
40
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sf_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masa (Aileron inc)
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: restforce
|