cargowise 0.7 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/lib/cargowise/shipment_search.rb +18 -1
- metadata +4 -3
data/CHANGELOG
CHANGED
@@ -33,7 +33,7 @@ module Cargowise
|
|
33
33
|
ShipmentsClient.get_shipments_list(ep.code, ep.user, ep.password, filter_hash)
|
34
34
|
end
|
35
35
|
|
36
|
-
# find all shipments that had some activity in the past
|
36
|
+
# find all shipments that had some activity in the past fourteen days. This could
|
37
37
|
# include leaving port, being delivered or passing a milestone.
|
38
38
|
#
|
39
39
|
def with_recent_activity
|
@@ -50,6 +50,23 @@ module Cargowise
|
|
50
50
|
ShipmentsClient.get_shipments_list(ep.code, ep.user, ep.password, filter_hash)
|
51
51
|
end
|
52
52
|
|
53
|
+
# find all shipments that had were shipped in the past 14 days or will ship in
|
54
|
+
# the next 14 days
|
55
|
+
#
|
56
|
+
def recently_shipped
|
57
|
+
filter_hash = {
|
58
|
+
"tns:Filter" => {
|
59
|
+
"tns:Date" => {
|
60
|
+
"tns:DateSearchField" => "ETD",
|
61
|
+
"tns:FromDate" => (Date.today - 14).strftime("%Y-%m-%d"),
|
62
|
+
"tns:ToDate" => (Date.today + 14).strftime("%Y-%m-%d")
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
ShipmentsClient.endpoint(endpoint_hash) # probably not threadsafe. oops.
|
67
|
+
ShipmentsClient.get_shipments_list(ep.code, ep.user, ep.password, filter_hash)
|
68
|
+
end
|
69
|
+
|
53
70
|
|
54
71
|
end
|
55
72
|
end
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cargowise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
|
9
|
+
- 1
|
10
|
+
version: 0.7.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- James Healy
|
@@ -14,7 +15,7 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
18
|
+
date: 2010-09-01 00:00:00 +10:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|