restforce 7.2.0 → 7.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile +2 -2
- data/README.md +1 -2
- data/lib/restforce/concerns/composite_api.rb +8 -0
- data/lib/restforce/version.rb +1 -1
- data/spec/unit/concerns/composite_api_spec.rb +17 -0
- 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: 6654e481c857ecb9ac254b03727287038371662899d1ef0a136c49c1cd5e86d6
|
4
|
+
data.tar.gz: 5a78a982b7bc65c3332320682d44bc7f2a46a234b9afc5360bca79fa0c8eddeb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62fdf7157d265d3d8af5b37ecec52a98f1462a1dcc62e72471b2ddb29380821a90b0e38cb5cd111dc4b925182af169bda56f131e0798277e1f2c55f1132ec5d8
|
7
|
+
data.tar.gz: a62df632fca2528e5dd991dbf4ab95f5cb7cc201819dbfeed5dfb4d021bdf47b567a10eda7ed9cc2e7436acbf89951cd7f85e0d57bd421438a7b9870aa2ed8fb
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -13,10 +13,10 @@ gem 'guard-rspec'
|
|
13
13
|
gem 'guard-rubocop'
|
14
14
|
gem 'jruby-openssl', platforms: :jruby
|
15
15
|
gem 'rake'
|
16
|
-
gem 'rspec', '~> 3.
|
16
|
+
gem 'rspec', '~> 3.13.0'
|
17
17
|
gem 'rspec-collection_matchers', '~> 1.2.0'
|
18
18
|
gem 'rspec-its', '~> 1.3.0'
|
19
19
|
gem 'rspec_junit_formatter', '~> 0.6.0'
|
20
20
|
gem 'rubocop', '~> 1.60.1'
|
21
21
|
gem 'simplecov', '~> 0.22.0'
|
22
|
-
gem 'webmock', '~> 3.
|
22
|
+
gem 'webmock', '~> 3.20.0'
|
data/README.md
CHANGED
@@ -27,7 +27,7 @@ Features include:
|
|
27
27
|
|
28
28
|
Add this line to your application's Gemfile:
|
29
29
|
|
30
|
-
gem 'restforce', '~> 7.
|
30
|
+
gem 'restforce', '~> 7.3.0'
|
31
31
|
|
32
32
|
And then execute:
|
33
33
|
|
@@ -600,7 +600,6 @@ This feature permits the user to send a composite object—that is, a complex
|
|
600
600
|
object with nested children—in a single API call. Up to 25 requests may be
|
601
601
|
included in a single composite.
|
602
602
|
|
603
|
-
Note that `GET` is not yet implemented for this API.
|
604
603
|
|
605
604
|
```ruby
|
606
605
|
# build up an array of requests:
|
@@ -93,6 +93,14 @@ module Restforce
|
|
93
93
|
}
|
94
94
|
end
|
95
95
|
|
96
|
+
def find(sobject, reference_id, id)
|
97
|
+
requests << {
|
98
|
+
method: 'GET',
|
99
|
+
url: composite_api_path("#{sobject}/#{id}"),
|
100
|
+
referenceId: reference_id
|
101
|
+
}
|
102
|
+
end
|
103
|
+
|
96
104
|
private
|
97
105
|
|
98
106
|
def composite_api_path(path)
|
data/lib/restforce/version.rb
CHANGED
@@ -82,6 +82,23 @@ describe Restforce::Concerns::CompositeAPI do
|
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
85
|
+
it '#find' do
|
86
|
+
client.
|
87
|
+
should_receive(:api_post).
|
88
|
+
with(endpoint, { compositeRequest: [
|
89
|
+
{
|
90
|
+
method: 'GET',
|
91
|
+
url: "/services/data/v38.0/sobjects/Object/00312345",
|
92
|
+
referenceId: 'find_ref'
|
93
|
+
}
|
94
|
+
], allOrNone: all_or_none, collateSubrequests: false }.to_json).
|
95
|
+
and_return(response)
|
96
|
+
|
97
|
+
client.send(method) do |subrequests|
|
98
|
+
subrequests.find('Object', 'find_ref', '00312345')
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
85
102
|
it 'multiple subrequests' do
|
86
103
|
client.
|
87
104
|
should_receive(:api_post).
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restforce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Rogers
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-02-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|