salesforcebulk 4.0.1 → 4.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/salesforce_bulk/client.rb +4 -2
- data/lib/salesforce_bulk/salesforce_error.rb +18 -15
- data/lib/salesforce_bulk/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23924cf7343edb50354ce417301d08a3bf4065f7f07c9f166d525ebc26df1b91
|
4
|
+
data.tar.gz: b18a09f9695b629081da7f09e00edc5ca5c1cb9424512c42ae5ee55f83a1689f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a28b8252b9263b01fa3e5c0ce793c0cc0130fd0d1691c546fff6fb7848bf2069103dc7b1a5d489c8f426cf5af82320a747c97cd38707e6111054c0dfa9252c0
|
7
|
+
data.tar.gz: 6e01558a369c92fe96102797fcf1c70589c693dff038ac5d3ca259a244824a2fcf19a9479d31007924f87e859d9618b79309f2b7d63501b3ab59175ea811848a
|
@@ -18,17 +18,19 @@ module SalesforceBulk
|
|
18
18
|
attr_accessor :version
|
19
19
|
|
20
20
|
# The ID for authenticated session
|
21
|
-
|
21
|
+
attr_accessor :session_id
|
22
22
|
|
23
23
|
def initialize(options={})
|
24
24
|
options = {:login_host => 'login.salesforce.com', :version => 24.0}.merge(options)
|
25
25
|
|
26
|
-
assert_valid_keys(options, :username, :password, :login_host, :version)
|
26
|
+
assert_valid_keys(options, :username, :password, :login_host, :version, :instance_host, :session_id)
|
27
27
|
|
28
28
|
self.username = options[:username]
|
29
29
|
self.password = "#{options[:password]}"
|
30
30
|
self.login_host = options[:login_host]
|
31
31
|
self.version = options[:version]
|
32
|
+
self.instance_host = options[:instance_host]
|
33
|
+
self.session_id = options[:session_id]
|
32
34
|
|
33
35
|
@api_path_prefix = "/services/async/#{version}/"
|
34
36
|
@valid_operations = [:delete, :insert, :update, :upsert, :query]
|
@@ -5,25 +5,28 @@ module SalesforceBulk
|
|
5
5
|
attr_accessor :response
|
6
6
|
# The status code from the server response body.
|
7
7
|
attr_accessor :error_code
|
8
|
-
|
8
|
+
|
9
9
|
def initialize(response)
|
10
10
|
self.response = response
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
#
|
21
|
-
|
11
|
+
self.error_code = response.code
|
12
|
+
|
13
|
+
if (300..308).cover?(error_code.to_i)
|
14
|
+
message = "Moved to #{response['location']}"
|
15
|
+
else
|
16
|
+
data = XmlSimple.xml_in(response.body, 'ForceArray' => false)
|
17
|
+
|
18
|
+
if data
|
19
|
+
# seems responses for CSV requests use a different XML return format
|
20
|
+
# (use invalid_error.xml for reference)
|
21
|
+
if !data['exceptionMessage'].nil?
|
22
|
+
message = data['exceptionMessage']
|
23
|
+
else
|
24
|
+
# SOAP error response
|
25
|
+
message = data['Body']['Fault']['faultstring']
|
26
|
+
end
|
22
27
|
end
|
23
|
-
|
24
|
-
self.error_code = response.code
|
25
28
|
end
|
26
|
-
|
29
|
+
|
27
30
|
super(message)
|
28
31
|
end
|
29
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: salesforcebulk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Julio
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xml-simple
|
@@ -115,7 +115,7 @@ files:
|
|
115
115
|
homepage: https://github.com/javierjulio/salesforce_bulk
|
116
116
|
licenses: []
|
117
117
|
metadata: {}
|
118
|
-
post_install_message:
|
118
|
+
post_install_message:
|
119
119
|
rdoc_options: []
|
120
120
|
require_paths:
|
121
121
|
- lib
|
@@ -130,8 +130,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
requirements: []
|
133
|
-
rubygems_version: 3.
|
134
|
-
signing_key:
|
133
|
+
rubygems_version: 3.4.5
|
134
|
+
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: Full capability support for the Salesforce Bulk API.
|
137
137
|
test_files: []
|