valken-shipping 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 836864919e7e6f3dcb1762f14ea620afd0c56429040ad133fa7b01bf032cc6a3
4
- data.tar.gz: 1f0addf9f86025e5f59232cbce1cdefd9dd7b56709969823264c3e50578251b8
3
+ metadata.gz: fa9324cff477a6c9ab22438c530c614b020f66e209ae5e50ac88f0ced04b7a49
4
+ data.tar.gz: 0dc95eabe9d8fcfe12cd667288f9b0a84548b3e2ecf631d0a0b04189c1b20724
5
5
  SHA512:
6
- metadata.gz: 465f4ab7305bc7c8efa1e8de744ff6a058f05f0afe389d91e8a0f79a126d12c9a2ba5109869fc39bdda63a4027c78742f6711c37a8e7aa57b2c283735ce4b9c6
7
- data.tar.gz: ba70cb673db53d2c44ec47ffec89785538e9fbe1e78acca8599bcecf7d0233ca1849f979c811b17348631918a953e6f6f3ab34595eb35cda55aa43506c479c37
6
+ metadata.gz: 5e8b065cc02c8af0d8ecee5a34ea80fcb7f6d86fe3e22ed6d2824513c956637404f8bc4973bcbfe3afa5851fa6e58423bf2e8de2227ee26a0c336bbf4078eae0
7
+ data.tar.gz: 34f59bb3e5fdb30bdf227120aca4b1d71016b5af15b79a094d9c5d9c3d8a02f4ac47d5a7ef0e1aa1303c0a4489b40bde4de86a425a75dd40e02fa40dfe37be94
@@ -15,7 +15,7 @@ module Workarea
15
15
  carrier_data = collect_carrier_data(selected_carrier)
16
16
  if Workarea.config.gateways.ups_carrier.class != ActiveShipping::Workarea
17
17
  carrier_data.push(get_ltl_shipping)
18
- carrier_data.push(get_free_shipping)
18
+ carrier_data.push(get_free_shipping) if Workarea.config.show_free_shipping
19
19
  end
20
20
  carrier_data
21
21
  end
@@ -27,11 +27,11 @@ module Workarea
27
27
  def selected_carrier
28
28
  product_ids = order.items.to_a.map(&:product_id)
29
29
  product_details = Catalog::Product.in(id: product_ids).pluck(:details)
30
- is_hazmat = product_details.any? {|item| item["en"]["Type"] && item["en"]["Type"].first == "Hazmat"}
31
- is_gun = product_details.any? {|item| item["en"]["Type"] && item["en"]["Type"].first == "Gun"}
32
- return "UPS" if is_hazmat
33
- return "FedEx" if is_gun
34
- return "none" unless is_hazmat && is_gun
30
+ is_ups = product_details.any? {|item| item["en"]["Type"] && item["en"]["Type"].first == "UPS"}
31
+ is_fedex = product_details.any? {|item| item["en"]["Type"] && item["en"]["Type"].first == "FEDEX"}
32
+ return "UPS" if is_ups
33
+ return "FedEx" if is_fedex
34
+ return "none" unless is_ups && is_fedex
35
35
  end
36
36
 
37
37
  # If the carrier is ups then it will print ups data...or if carrier is fedex then prinnt fedex data...
@@ -1,5 +1,5 @@
1
1
  module Valken
2
2
  module Shipping
3
- VERSION = '1.1.3'
3
+ VERSION = '1.1.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valken-shipping
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - sushmitha02
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-03 00:00:00.000000000 Z
11
+ date: 2020-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails