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