1 <?php
2
3 /* --------------------------------------------------------------
4 OrderListItem.inc.php 2015-11-06 gm
5 Gambio GmbH
6 http://www.gambio.de
7 Copyright (c) 2015 Gambio GmbH
8 Released under the GNU General Public License (Version 2)
9 [http://www.gnu.org/licenses/gpl-2.0.html]
10 --------------------------------------------------------------
11 */
12
13 /**
14 * Class OrderListItem
15 *
16 * @category System
17 * @package Order
18 * @subpackage Entities
19 */
20 class OrderListItem
21 {
22 /**
23 * Order ID.
24 * @var int
25 */
26 protected $orderId;
27
28 /**
29 * Customer ID.
30 * @var int
31 */
32 protected $customerId;
33
34 /**
35 * Customer name.
36 * @var string
37 */
38 protected $customerName;
39
40 /**
41 * Total summary.
42 * @var float
43 */
44 protected $totalSum;
45
46 /**
47 * Payment type.
48 * @var string
49 */
50 protected $paymentType;
51
52 /**
53 * Shipping type.
54 * @var string
55 */
56 protected $shippingType;
57
58 /**
59 * Purchase date time.
60 * @var DateTime
61 */
62 protected $purchaseDateTime;
63
64 /**
65 * Order status ID.
66 * @var int
67 */
68 protected $orderStatusId;
69
70 /**
71 * Order status name.
72 * @var string
73 */
74 protected $orderStatusName;
75
76
77 /**
78 * OrderListItem Constructor
79 *
80 * @param IdType $orderId Order ID.
81 * @param IdType $customerId Customer ID.
82 * @param StringType $customerName Customer name.
83 * @param DecimalType $totalSum Total summary.
84 * @param OrderPaymentType $paymentType Payment type.
85 * @param OrderShippingType $shippingType Shipping type.
86 * @param DateTime $purchaseDateTime Purchase date time.
87 * @param IdType $orderStatusId Order status ID.
88 * @param StringType $orderStatusName Order status name.
89 */
90 public function __construct(IdType $orderId,
91 IdType $customerId,
92 StringType $customerName,
93 DecimalType $totalSum,
94 OrderPaymentType $paymentType,
95 OrderShippingType $shippingType,
96 DateTime $purchaseDateTime,
97 IdType $orderStatusId,
98 StringType $orderStatusName)
99 {
100 $this->orderId = $orderId->asInt();
101 $this->customerId = $customerId->asInt();
102 $this->customerName = $customerName->asString();
103 $this->totalSum = $totalSum->asDecimal();
104 $this->paymentType = $paymentType;
105 $this->shippingType = $shippingType;
106 $this->purchaseDateTime = $purchaseDateTime;
107 $this->orderStatusId = $orderStatusId->asInt();
108 $this->orderStatusName = $orderStatusName->asString();
109 }
110
111
112 /**
113 * Returns the order ID.
114 * @return int Order ID.
115 */
116 public function getOrderId()
117 {
118 return $this->orderId;
119 }
120
121
122 /**
123 * Returns the customer ID.
124 * @return int Customer ID.
125 */
126 public function getCustomerId()
127 {
128 return $this->customerId;
129 }
130
131
132 /**
133 * Returns the customer name.
134 * @return string Customer name.
135 */
136 public function getCustomerName()
137 {
138 return $this->customerName;
139 }
140
141
142 /**
143 * Returns the total summary.
144 * @return float Total summary.
145 */
146 public function getTotalSum()
147 {
148 return $this->totalSum;
149 }
150
151
152 /**
153 * Returns the payment type.
154 * @return OrderPaymentType Payment type.
155 */
156 public function getPaymentType()
157 {
158 return $this->paymentType;
159 }
160
161
162 /**
163 * Returns the shipping type.
164 * @return OrderShippingType Shipping type.
165 */
166 public function getShippingType()
167 {
168 return $this->shippingType;
169 }
170
171
172 /**
173 * Purchase date time.
174 * @return DateTime Purchase date time.
175 */
176 public function getPurchaseDateTime()
177 {
178 return $this->purchaseDateTime;
179 }
180
181
182 /**
183 * Returns the order status ID.
184 * @return int Order status ID.
185 */
186 public function getOrderStatusId()
187 {
188 return $this->orderStatusId;
189 }
190
191
192 /**
193 * Returns the order status name.
194 * @return string Order status name.
195 */
196 public function getOrderStatusName()
197 {
198 return $this->orderStatusName;
199 }
200 }