shopify_transporter 2.4.0 → 2.4.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 823030a7648b9b678e18cb921609e0edb03030bd
|
4
|
+
data.tar.gz: 79dfaf0eba75e19ec062f07587595512e46fd877
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab3dc89742dacbeb311125ea2b01d9560f16b2a268b715b12e870fb937d61ee62f7c7077c8b8e574fafc0e0fc305ebe9633b5a2265ff5bc564cf6dc585dd9785
|
7
|
+
data.tar.gz: 22e0a658fcc3e7848152d7e377d123daf2c5afb4e5a1c86cd9ea9a9e3205a723d838bd5cb6a272ca9a59c8e1ed751f6f56d9a311c4ea9d8c905444c8cc3fdca5
|
@@ -7,6 +7,13 @@ module ShopifyTransporter
|
|
7
7
|
module Exporters
|
8
8
|
module Magento
|
9
9
|
class Soap
|
10
|
+
class FailedLoginError < Exporters::ExportError
|
11
|
+
def initialize(error_message)
|
12
|
+
sep = $INPUT_RECORD_SEPARATOR
|
13
|
+
super("Unable to obtain SOAP session ID from server.#{sep + sep}Details:#{sep + error_message}")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
10
17
|
RETRY_SLEEP_TIME = 0.1
|
11
18
|
MAX_RETRIES = 4
|
12
19
|
|
@@ -74,13 +81,20 @@ module ShopifyTransporter
|
|
74
81
|
end
|
75
82
|
|
76
83
|
def soap_session_id
|
77
|
-
@soap_session_id
|
84
|
+
return @soap_session_id if @soap_session_id.present?
|
85
|
+
|
86
|
+
result = soap_client.call(
|
78
87
|
:login,
|
79
88
|
message: {
|
80
89
|
username: @username,
|
81
90
|
api_key: @api_key,
|
82
91
|
}
|
83
|
-
).body
|
92
|
+
).body
|
93
|
+
|
94
|
+
session_id = result&.dig(:login_response, :login_return)
|
95
|
+
raise FailedLoginError, result.to_s unless session_id.present?
|
96
|
+
|
97
|
+
@soap_session_id ||= session_id
|
84
98
|
end
|
85
99
|
|
86
100
|
def batching_filter(starting_id, ending_id, batch_index_column)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify_transporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|