sf_connect 0.2.2 → 0.2.4
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: 65588d4e1da204c609c305cd8f5b4200a6bf2a4fd1743bb66de88673f4631d2b
|
4
|
+
data.tar.gz: 6c341435a6e38ff30c6d588b48bf1d348f7424598139b9960c4a56cc903a6c4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bae46cd083be9b30eba9eec6c5a5ee98229b558202bcfe3ca440028a54c51d2462ad4015fcee5aae9c83584ff80db086ed863a45c8bfb1430fa58f0469965ed
|
7
|
+
data.tar.gz: 4aeac60e2b89afc22d9d1345e40a6bd86dcdcfe8e8cebc327a91453d46ec3da36621d0270835dac999619bbd882499ebfcd4c3cdaea9a43cd414866414bc850c
|
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.4
|
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-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: restforce
|