solidus_bactracs 3.3.2 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.tool-versions +1 -1
- data/README.md +5 -0
- data/lib/solidus_bactracs/api/shipment_serializer.rb +21 -1
- data/lib/solidus_bactracs/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68d5604c3c0c9d1adc9f28adcbad8ada220a5298b6da3bd95e3191d9312c3f83
|
4
|
+
data.tar.gz: 68afe48eca765056b7ee4911a7adc678c0d9b3a9ec80a5f837a28abe162fdb8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4c01a7f12a92561bad95e64c0b47d84dbc56c20680f9ce6a52eb41daff320a0ed73e7dee511fb5b6a3936f2a579199b51cfe167b287fe917dc6f36c60570471
|
7
|
+
data.tar.gz: a24a630d3b523e8a4ee8d8423f3b066bd2d8de9afb7bdcacdd542da437fc8c357d0a4ce082c590737b3b9bf8735c647ecfc0c89b21e9fff2c770c43742c8a8ef
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.2
|
data/.tool-versions
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby
|
1
|
+
ruby 3.1.1
|
data/README.md
CHANGED
@@ -112,6 +112,11 @@ end
|
|
112
112
|
|
113
113
|
You should overwrite this with your own means of determining the RMA type for a given shipment.
|
114
114
|
|
115
|
+
##### DF Part
|
116
|
+
Andlor uses the key "DFPart" to enable the indication of which item was 'defective' and being returned. This only applies to Type 4 RMAs.
|
117
|
+
|
118
|
+
Currently, the DF Part is the `number` on the shipment, and there is not yet an override method.
|
119
|
+
|
115
120
|
#### API integration: Usage
|
116
121
|
|
117
122
|
Once you've configured the integration, you will also need to enqueue the `ScheduleShipmentSyncsJob`
|
@@ -14,6 +14,8 @@ module SolidusBactracs
|
|
14
14
|
order = @shipment.order
|
15
15
|
user = @shipment.user
|
16
16
|
rma_type = safe_rma_type
|
17
|
+
rp_location = get_rp_location
|
18
|
+
df_part = get_df_part
|
17
19
|
|
18
20
|
xml = Builder::XmlMarkup.new
|
19
21
|
xml.instruct!(:xml, :encoding => "UTF-8")
|
@@ -93,7 +95,8 @@ module SolidusBactracs
|
|
93
95
|
xml.WarrantyRepair
|
94
96
|
xml.RMALineTest
|
95
97
|
xml.InboundShipWeight variant.weight.to_f
|
96
|
-
xml.RPLocation
|
98
|
+
xml.RPLocation rp_location
|
99
|
+
xml.DFPart df_part
|
97
100
|
}
|
98
101
|
end
|
99
102
|
|
@@ -102,9 +105,26 @@ module SolidusBactracs
|
|
102
105
|
rma_type ||= @config.evaluate_rma_type.call(@shipment)
|
103
106
|
end
|
104
107
|
|
108
|
+
def get_rp_location
|
109
|
+
#Double verifing
|
110
|
+
return nil if rma_type == "4"
|
111
|
+
|
112
|
+
rp_location = @shipment.get_rma_rp_location if @shipment.get_rma_rp_location
|
113
|
+
@config.default_rp_location.call(@shipment)
|
114
|
+
end
|
115
|
+
|
105
116
|
def find_sku_variant(variant)
|
106
117
|
@config.sku_map[variant.sku].present? ? @config.sku_map[variant.sku] : variant.sku
|
107
118
|
end
|
119
|
+
|
120
|
+
def get_df_part
|
121
|
+
df_part =
|
122
|
+
if rma_type == "4"
|
123
|
+
@shipment.number
|
124
|
+
else
|
125
|
+
nil
|
126
|
+
end rescue nil
|
127
|
+
end
|
108
128
|
end
|
109
129
|
end
|
110
130
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_bactracs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zeryab Ali
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-11-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
233
|
- !ruby/object:Gem::Version
|
234
234
|
version: '0'
|
235
235
|
requirements: []
|
236
|
-
rubygems_version: 3.
|
236
|
+
rubygems_version: 3.3.7
|
237
237
|
signing_key:
|
238
238
|
specification_version: 4
|
239
239
|
summary: A Solidus extension for integrating the Bactracs API.
|