solidus_tec_estimator 1.0.0 → 1.0.1
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: e5e7cd13f4896e9a372dd9f05843b4740b416130570780457e1ee61bebde2c1a
|
4
|
+
data.tar.gz: 3194224d288d40fd74bf0f9ce1558f84219c92739ed506840b75c93be07334a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fa22eb8ecc2a66ee4431e6ad34db0adbe12b7e9ceea0d528f73800ca6a3dda880dd1379e1df1840e420afa3bc5e9a40f43479586b81a23029843592acc64956
|
7
|
+
data.tar.gz: 3b7ad8dd88b055ff69d5c643cf47fb54feda8ec98769f651a3414e842e1fd662f529e55f1e7e9726289fd1996d0cbf167b74a7ed0bd8aa85f299a72f09e01c7c
|
@@ -38,15 +38,16 @@ module SolidusTecEstimator
|
|
38
38
|
shipping_method.provider_id = SolidusTecEstimator::Provider.find_by(class_name: self.class.to_s).id
|
39
39
|
end
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
41
|
+
time_now = Time.now.in_time_zone('America/Sao_Paulo')
|
42
|
+
if time_now < time_now.change({hour: 16}) && time_now.on_weekday?
|
43
|
+
min_delivery_time = (time_now + 30.minutes)
|
44
|
+
max_delivery_time = (time_now + 2.hours)
|
45
|
+
elsif time_now > time_now.change({hour: 16}) && time_now.next_day.on_weekday?
|
46
|
+
min_delivery_time = time_now.next_day.change({hour: 8})
|
47
|
+
max_delivery_time = time_now.next_day.change({hour: 10})
|
47
48
|
else
|
48
|
-
min_delivery_time =
|
49
|
-
max_delivery_time =
|
49
|
+
min_delivery_time = time_now.next_weekday.change({hour: 8})
|
50
|
+
max_delivery_time = time_now.next_weekday.change({hour: 10})
|
50
51
|
end
|
51
52
|
|
52
53
|
Spree::ShippingRate.new(
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ulysses
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_core
|