salesforcebulk 4.0.2 → 4.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42ac9c846c52bca60cea6a59ef20772e9f73752f4a6033767b7686ab5db36c79
4
- data.tar.gz: 730c25ca9264445f4493740f294c09427e56f58236f2b12ea044c8fdc855b26f
3
+ metadata.gz: feee7d358115c96eb774b47069c64da810117c95ddc9f13a049b44a0eddfd421
4
+ data.tar.gz: 0ab01c716e02dc9d07f6fc57f829ad1b336e409b6ee95287ce30f037bb243d5d
5
5
  SHA512:
6
- metadata.gz: 7aa5f86d57dfeb8eb463e0f7a444d5f757622ba5e26a73013c3e58b3de20c0464de541c3edef878b72a8d081ec9acac7cf99f0353f03d58942b4b583e17fc485
7
- data.tar.gz: ae2bc3c0bd319fd7f3dbde38f34233e4aadfb06af0dfba06bd53be88be477401259d22b3690c956da23c6c74940c72238f85fbf5f25398e067ee4bfef735716f
6
+ metadata.gz: 60643e38faab3e6b909a33ab19053f3a8e8804911921e0244d3297ee9865031e5944f87d15e8965df1c208dde1cb811a8cb1c886c792782a9a09dc2f70652c65
7
+ data.tar.gz: bd9313ffdb0c608059e120a68ee2e85784e8d35b0c43945b519da4915e8cece9c15e1cb2fced9cb2e1546bc669872e26829f9b1e9516d675aed908abb3fea449
@@ -18,17 +18,19 @@ module SalesforceBulk
18
18
  attr_accessor :version
19
19
 
20
20
  # The ID for authenticated session
21
- attr_reader :session_id
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,13 +5,15 @@ module SalesforceBulk
5
5
  attr_accessor :response
6
6
  # The status code from the server response body.
7
7
  attr_accessor :error_code
8
+ # The exception code from Salesforce's response
9
+ attr_accessor :exception_code
8
10
 
9
11
  def initialize(response)
10
12
  self.response = response
11
13
  self.error_code = response.code
12
14
 
13
15
  if (300..308).cover?(error_code.to_i)
14
- message = "Moved to #{response.header['location']}"
16
+ message = "Moved to #{response['location']}"
15
17
  else
16
18
  data = XmlSimple.xml_in(response.body, 'ForceArray' => false)
17
19
 
@@ -20,9 +22,11 @@ module SalesforceBulk
20
22
  # (use invalid_error.xml for reference)
21
23
  if !data['exceptionMessage'].nil?
22
24
  message = data['exceptionMessage']
25
+ self.exception_code = data['exceptionCode']
23
26
  else
24
27
  # SOAP error response
25
28
  message = data['Body']['Fault']['faultstring']
29
+ self.exception_code = data['Body']['Fault']['faultcode']
26
30
  end
27
31
  end
28
32
  end
@@ -30,4 +34,4 @@ module SalesforceBulk
30
34
  super(message)
31
35
  end
32
36
  end
33
- end
37
+ end
@@ -1,3 +1,3 @@
1
1
  module SalesforceBulk
2
- VERSION = "4.0.2"
2
+ VERSION = "4.0.4"
3
3
  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.2
4
+ version: 4.0.4
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: 2022-09-21 00:00:00.000000000 Z
11
+ date: 2023-02-23 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.3.6
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: []