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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9bbd41ca4504892004e3c4b39dd1688529cc02ca50dafbeb62b33f7f1bff14e4
4
- data.tar.gz: 11c2cf0ee91d07eec4e08fa3ed2c5c0f4756cb2ef3e2cccacb605ee1d1f8dc74
3
+ metadata.gz: 4e535e8a59bea282ee76d1fe01b99f738d19061abf29d1745e40bdcce792337e
4
+ data.tar.gz: 75d5f6d07e1fd88e1f30c46418c674059b582aca33a884b16830be441d39a708
5
5
  SHA512:
6
- metadata.gz: cb76a600bbefb62da8c9e066b9dec324c85506ebb7d616c2e3b6a857eff8f89133a08b0369f700e4441250e8342c093adbc4547951baf3a0da5b5b4f83347fca
7
- data.tar.gz: 57eee50b741eb981483c6952aface01438f00bbd8fc7e7fae64819669997059009a72d3aafdcb4fb14c06466e18efc5dae6172497953eaffa6668cd39fc18c10
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 rma_type
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 rp_location
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
- rp_location = @shipment.get_rma_rp_location if @shipment.get_rma_rp_location
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
@@ -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.1'
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.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-03 00:00:00.000000000 Z
12
+ date: 2022-11-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty