solidus_bactracs 3.4.0 → 3.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/lib/solidus_bactracs/api/shipment_serializer.rb +14 -0
- 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: 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/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`
|
@@ -15,6 +15,7 @@ module SolidusBactracs
|
|
15
15
|
user = @shipment.user
|
16
16
|
rma_type = safe_rma_type
|
17
17
|
rp_location = get_rp_location
|
18
|
+
df_part = get_df_part
|
18
19
|
|
19
20
|
xml = Builder::XmlMarkup.new
|
20
21
|
xml.instruct!(:xml, :encoding => "UTF-8")
|
@@ -95,6 +96,7 @@ module SolidusBactracs
|
|
95
96
|
xml.RMALineTest
|
96
97
|
xml.InboundShipWeight variant.weight.to_f
|
97
98
|
xml.RPLocation rp_location
|
99
|
+
xml.DFPart df_part
|
98
100
|
}
|
99
101
|
end
|
100
102
|
|
@@ -104,6 +106,9 @@ module SolidusBactracs
|
|
104
106
|
end
|
105
107
|
|
106
108
|
def get_rp_location
|
109
|
+
#Double verifing
|
110
|
+
return nil if rma_type == "4"
|
111
|
+
|
107
112
|
rp_location = @shipment.get_rma_rp_location if @shipment.get_rma_rp_location
|
108
113
|
@config.default_rp_location.call(@shipment)
|
109
114
|
end
|
@@ -111,6 +116,15 @@ module SolidusBactracs
|
|
111
116
|
def find_sku_variant(variant)
|
112
117
|
@config.sku_map[variant.sku].present? ? @config.sku_map[variant.sku] : variant.sku
|
113
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
|
114
128
|
end
|
115
129
|
end
|
116
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-11-
|
12
|
+
date: 2022-11-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|