Skip to content

Commit bcfed48

Browse files
committed
gonna get squashed
1 parent d61acf4 commit bcfed48

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/Entity/StatusType.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class StatusType
66
{
7-
const ST_IN_TRANST = 'I'; // In Transit
7+
const ST_IN_TRANSIT = 'I'; // In Transit
88
const ST_DELIVERED = 'D'; // Delivered
99
const ST_EXCEPTION = 'E'; // Exception
1010
const ST_PICKUP = 'P'; // Pickup
@@ -13,6 +13,14 @@ class StatusType
1313
public $Code;
1414
public $Description;
1515

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+
1624
public function __construct($response = null)
1725
{
1826
if (null != $response) {
@@ -24,4 +32,12 @@ public function __construct($response = null)
2432
$this->Description = $response->Description;
2533
}
2634
}
35+
36+
/**
37+
* @return string
38+
*/
39+
public function getCodeName()
40+
{
41+
return $this->statusTypeCodes[$this->Code];
42+
}
2743
}

0 commit comments

Comments
 (0)