File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 4
4
5
5
class StatusType
6
6
{
7
+ const ST_IN_TRANSIT = 'I ' ; // In Transit
8
+ const ST_DELIVERED = 'D ' ; // Delivered
9
+ const ST_EXCEPTION = 'X ' ; // Exception
10
+ const ST_PICKUP = 'P ' ; // Pickup
11
+ const ST_MANIFEST_PICKUP = 'M ' ; // Manifest Pickup
12
+
7
13
public $ Code ;
8
14
public $ Description ;
9
15
16
+ private $ statusTypeCodes = array (
17
+ self ::ST_IN_TRANSIT => "In Transit " ,
18
+ self ::ST_DELIVERED => "Delivered " ,
19
+ self ::ST_EXCEPTION => "Exception " ,
20
+ self ::ST_PICKUP => "Pickup " ,
21
+ self ::ST_MANIFEST_PICKUP => "Manifest Pickup "
22
+ );
23
+
10
24
public function __construct ($ response = null )
11
25
{
12
26
if (null != $ response ) {
@@ -18,4 +32,12 @@ public function __construct($response = null)
18
32
$ this ->Description = $ response ->Description ;
19
33
}
20
34
}
35
+
36
+ /**
37
+ * @return string
38
+ */
39
+ public function getCodeName ()
40
+ {
41
+ return $ this ->statusTypeCodes [$ this ->Code ];
42
+ }
21
43
}
You can’t perform that action at this time.
0 commit comments