solidus_bactracs 3.4.0 → 3.5.1
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/README.md +5 -0
- data/lib/solidus_bactracs/api/shipment_serializer.rb +15 -5
- data/lib/solidus_bactracs/version.rb +1 -1
- 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: 4e535e8a59bea282ee76d1fe01b99f738d19061abf29d1745e40bdcce792337e
|
4
|
+
data.tar.gz: 75d5f6d07e1fd88e1f30c46418c674059b582aca33a884b16830be441d39a708
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39918c8782cd792f3fa091b2762dda89ea07db28a33a0598711fa561010a9eef293e2d7eb94c5f921f23a49a9afef5d995ee242f3a8fb4ce949f41a53d36f038
|
7
|
+
data.tar.gz: b47a72baad881dfe7645addb7caadf4be5529d90d625b73bd32341d992d04ad110d56f7dc8730744a46ba55cb6edb45b1e3a19bbe6efe78a6363fbb2a17822c4
|
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`
|
@@ -13,8 +13,6 @@ module SolidusBactracs
|
|
13
13
|
def call(sguid: nil)
|
14
14
|
order = @shipment.order
|
15
15
|
user = @shipment.user
|
16
|
-
rma_type = safe_rma_type
|
17
|
-
rp_location = get_rp_location
|
18
16
|
|
19
17
|
xml = Builder::XmlMarkup.new
|
20
18
|
xml.instruct!(:xml, :encoding => "UTF-8")
|
@@ -25,7 +23,7 @@ module SolidusBactracs
|
|
25
23
|
xml.sGuid sguid
|
26
24
|
xml.NewRMA {
|
27
25
|
xml.RMANumber @shipment.number
|
28
|
-
xml.RMATypeName
|
26
|
+
xml.RMATypeName safe_rma_type
|
29
27
|
xml.RMASubTypeName
|
30
28
|
xml.CustomerRef
|
31
29
|
xml.InboundShippingPriority
|
@@ -94,7 +92,8 @@ module SolidusBactracs
|
|
94
92
|
xml.WarrantyRepair
|
95
93
|
xml.RMALineTest
|
96
94
|
xml.InboundShipWeight variant.weight.to_f
|
97
|
-
xml.RPLocation
|
95
|
+
xml.RPLocation get_rp_location
|
96
|
+
xml.DFPart get_df_part
|
98
97
|
}
|
99
98
|
end
|
100
99
|
|
@@ -104,13 +103,24 @@ module SolidusBactracs
|
|
104
103
|
end
|
105
104
|
|
106
105
|
def get_rp_location
|
107
|
-
|
106
|
+
#Double verifing
|
107
|
+
return nil if safe_rma_type == "4"
|
108
|
+
|
108
109
|
@config.default_rp_location.call(@shipment)
|
109
110
|
end
|
110
111
|
|
111
112
|
def find_sku_variant(variant)
|
112
113
|
@config.sku_map[variant.sku].present? ? @config.sku_map[variant.sku] : variant.sku
|
113
114
|
end
|
115
|
+
|
116
|
+
def get_df_part
|
117
|
+
df_part =
|
118
|
+
if safe_rma_type == "4"
|
119
|
+
@shipment.number
|
120
|
+
else
|
121
|
+
nil
|
122
|
+
end rescue nil
|
123
|
+
end
|
114
124
|
end
|
115
125
|
end
|
116
126
|
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.1
|
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-11-
|
12
|
+
date: 2022-11-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|