1 <?php
2 /* --------------------------------------------------------------
3 OrderStatusHistoryListItem.php 2015-12-17
4 Gambio GmbH
5 http://www.gambio.de
6 Copyright (c) 2015 Gambio GmbH
7 Released under the GNU General Public License (Version 2)
8 [http://www.gnu.org/licenses/gpl-2.0.html]
9 --------------------------------------------------------------
10 */
11
12
13 /**
14 * Class OrderStatusHistoryListItem
15 *
16 * @category System
17 * @package Order
18 * @subpackage Entities
19 */
20 class OrderStatusHistoryListItem
21 {
22 /**
23 * ID of the order status history item.
24 *
25 * @var int
26 */
27 protected $orderStatusHistoryId = 0;
28
29 /**
30 * ID of the order status.
31 *
32 * @var int
33 */
34 protected $orderStatusId = 0;
35
36 /**
37 * Order status history item creation date time.
38 *
39 * @var DateTime
40 */
41 protected $dateAdded;
42
43 /**
44 * Optional comment of the order status history item.
45 *
46 * @var string
47 */
48 protected $comment = '';
49
50 /**
51 * Customer notified flag.
52 *
53 * @var bool
54 */
55 protected $customerNotified = false;
56
57
58 /**
59 * OrderStatusHistoryListItem constructor.
60 *
61 * @param IdType $orderStatusHistoryId Order status history ID.
62 * @param IdType $orderStatusId Order status ID.
63 * @param DateTime $dateAdded Order status history item creation date time.
64 * @param StringType $comment Optional comment of the order status history item.
65 * @param BoolType $customerNotified Customer notified flag.
66 */
67 public function __construct(IdType $orderStatusHistoryId,
68 IdType $orderStatusId,
69 DateTime $dateAdded,
70 StringType $comment,
71 BoolType $customerNotified)
72 {
73 $this->orderStatusHistoryId = $orderStatusHistoryId->asInt();
74 $this->orderStatusId = $orderStatusId->asInt();
75 $this->dateAdded = $dateAdded;
76 $this->comment = $comment->asString();
77 $this->customerNotified = $customerNotified->asBool();
78 }
79
80
81 /**
82 * Returns the ID of the order status history item.
83 * @return int Order status history item ID.
84 */
85 public function getOrderStatusHistoryId()
86 {
87 return $this->orderStatusHistoryId;
88 }
89
90
91 /**
92 * Returns the ID of the order status.
93 * @return int Order status ID.
94 */
95 public function getOrderStatusId()
96 {
97 return $this->orderStatusId;
98 }
99
100
101 /**
102 * Returns the order status history item creation date time.
103 * @return DateTime Order status history item creation date time.
104 */
105 public function getDateAdded()
106 {
107 return $this->dateAdded;
108 }
109
110
111 /**
112 * Returns the comment of the order status history item.
113 * @return string Comment of the order status history item.
114 */
115 public function getComment()
116 {
117 return $this->comment;
118 }
119
120
121 /**
122 * Returns the value of customer notified flag.
123 * @return boolean Customer is notified?
124 */
125 public function isCustomerNotified()
126 {
127 return $this->customerNotified;
128 }
129 }