cargowise-ts 1.0.2 → 1.0.3
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 +4 -4
- data/lib/cargowise-ts/shipment_search.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc6d43a8533e653020045d3951dd3467b99a9808
|
|
4
|
+
data.tar.gz: 3ff728d10de5af5a50ad9e5db253e903278f2e63
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 43097e3611172967963f53a3901d51b91e3d73259652a32368ee70df3750829da4a9a87c431bb1a587452d65991b5fbf9c8225f7c65f9cae87b55e14a87aa157
|
|
7
|
+
data.tar.gz: b7183feb9a510420e5689cc52123d1cb56efa021c960418d71b64c411e5d71cf4ea45f5f9ea098139eb7ba75f1df07948026efd7a0605ae50b6298d9302d21fa
|
|
@@ -38,13 +38,13 @@ module CargowiseTS
|
|
|
38
38
|
# find all shipments that had some activity in the past fourteen days. This could
|
|
39
39
|
# include leaving port, being delivered or passing a milestone.
|
|
40
40
|
#
|
|
41
|
-
def with_recent_activity
|
|
41
|
+
def with_recent_activity(range = 14)
|
|
42
42
|
filter_hash = {
|
|
43
43
|
"tns:Filter" => {
|
|
44
44
|
"tns:Date" => {
|
|
45
45
|
"tns:DateSearchField" => "ALL",
|
|
46
|
-
"tns:FromDate" => (Date.today -
|
|
47
|
-
"tns:ToDate" => (Date.today +
|
|
46
|
+
"tns:FromDate" => (Date.today - range).strftime("%Y-%m-%d"),
|
|
47
|
+
"tns:ToDate" => (Date.today + range).strftime("%Y-%m-%d")
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|