solidus_tec_estimator 1.0.4 → 1.0.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c28036d5ed36a833efc6236adc4f6967c365643108de215570f47b8f8956308e
|
4
|
+
data.tar.gz: f432013f0bbbcae40151b2460053c145dfc4802d06a5ee6a076714a5bb860c9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7aeeccbf3a3de41cfa2e47ac1eeb60bb0eaffb8172b91ec04fbdf8a42fa830268647f693d73e441f62102b92e3c6ea40aad15b46baafb7a9272e9fd439e856e2
|
7
|
+
data.tar.gz: e4ab018f35f80f41f201f401cb98f778a6fe00abf44105201b8829c87d384c56fd52621aad9834ad405c46d3ea4de30e1c6c5683370ccfc58bc8d8fb2df20e96
|
@@ -22,7 +22,7 @@ module SolidusTecEstimator
|
|
22
22
|
|
23
23
|
def shipping_rates
|
24
24
|
shipping_rates = []
|
25
|
-
if
|
25
|
+
if cep_de_sjbv? && tem_estoque_na_f1? && package.weight <= 10000
|
26
26
|
shipping_rates << build_shipping_rate(package)
|
27
27
|
end
|
28
28
|
shipping_rates.select { |rate| shipping_methods.include?(rate.shipping_method) }
|
@@ -62,8 +62,11 @@ module SolidusTecEstimator
|
|
62
62
|
)
|
63
63
|
end
|
64
64
|
|
65
|
-
def
|
66
|
-
Cep.
|
65
|
+
def cep_de_sjbv?
|
66
|
+
sjbv_ceps = Cep.where(localidade: "São João da Boa Vista").pluck(:codigo_postal).map(&:to_i)
|
67
|
+
return false if sjbv_ceps.empty?
|
68
|
+
zipcode = package.order.ship_address.zipcode.gsub(/\D/, "").to_i
|
69
|
+
zipcode >= sjbv_ceps.min && zipcode <= sjbv_ceps.max
|
67
70
|
end
|
68
71
|
|
69
72
|
def self.calculate_delivery_time rate
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_tec_estimator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ulysses
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_core
|
@@ -110,7 +110,7 @@ metadata:
|
|
110
110
|
homepage_uri: https://github.com/todasessascoisas/solidus_tec_estimator#readme
|
111
111
|
source_code_uri: https://github.com/todasessascoisas/solidus_tec_estimator
|
112
112
|
changelog_uri: https://github.com/todasessascoisas/solidus_tec_estimator/blob/main/CHANGELOG.md
|
113
|
-
post_install_message:
|
113
|
+
post_install_message:
|
114
114
|
rdoc_options: []
|
115
115
|
require_paths:
|
116
116
|
- lib
|
@@ -128,8 +128,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
|
-
rubygems_version: 3.5.
|
132
|
-
signing_key:
|
131
|
+
rubygems_version: 3.5.10
|
132
|
+
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: ''
|
135
135
|
test_files:
|