solidus_bactracs 3.4.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9bbd41ca4504892004e3c4b39dd1688529cc02ca50dafbeb62b33f7f1bff14e4
4
- data.tar.gz: 11c2cf0ee91d07eec4e08fa3ed2c5c0f4756cb2ef3e2cccacb605ee1d1f8dc74
3
+ metadata.gz: 68d5604c3c0c9d1adc9f28adcbad8ada220a5298b6da3bd95e3191d9312c3f83
4
+ data.tar.gz: 68afe48eca765056b7ee4911a7adc678c0d9b3a9ec80a5f837a28abe162fdb8c
5
5
  SHA512:
6
- metadata.gz: cb76a600bbefb62da8c9e066b9dec324c85506ebb7d616c2e3b6a857eff8f89133a08b0369f700e4441250e8342c093adbc4547951baf3a0da5b5b4f83347fca
7
- data.tar.gz: 57eee50b741eb981483c6952aface01438f00bbd8fc7e7fae64819669997059009a72d3aafdcb4fb14c06466e18efc5dae6172497953eaffa6668cd39fc18c10
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusBactracs
4
- VERSION = '3.4.0'
4
+ VERSION = '3.5.0'
5
5
  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.0
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-03 00:00:00.000000000 Z
12
+ date: 2022-11-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty