1 <?php
2
3 /* --------------------------------------------------------------
4 CustomerStatusInformation.inc.php 2016-01-20
5 Gambio GmbH
6 http://www.gambio.de
7 Copyright (c) 2016 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 CustomerStatusInformation
15 *
16 * @category System
17 * @package Order
18 * @subpackage Entities
19 */
20 class CustomerStatusInformation
21 {
22 /**
23 * Customer status ID.
24 * @var int
25 */
26 protected $statusId;
27
28 /**
29 * Status ID.
30 * @var string
31 */
32 protected $statusName;
33
34 /**
35 * Status image.
36 * @var string
37 */
38 protected $statusImage;
39
40 /**
41 * Status discount.
42 * @var double
43 */
44 protected $statusDiscount;
45
46 /**
47 * Is customer a guest?
48 * @var bool
49 */
50 protected $isGuest;
51
52
53 /**
54 * CustomerStatusInformation Constructor
55 *
56 * @param IdType $statusId Status ID.
57 * @param StringType|null $statusName Status name.
58 * @param StringType|null $statusImage Status image.
59 * @param DecimalType|null $statusDiscount Status discount.
60 * @param BoolType|null $isGuest Is customer a guest?
61 */
62 public function __construct(IdType $statusId,
63 StringType $statusName = null,
64 StringType $statusImage = null,
65 DecimalType $statusDiscount = null,
66 BoolType $isGuest = null)
67 {
68 $this->statusId = $statusId->asInt();
69 $this->statusName = ($statusName !== null) ? $statusName->asString() : '';
70 $this->statusImage = ($statusImage !== null) ? $statusImage->asString() : '';
71 $this->statusDiscount = ($statusDiscount !== null) ? $statusDiscount->asDecimal() : 0.0;
72 $this->isGuest = ($isGuest !== null) ? $isGuest->asBool() : true;
73 }
74
75
76 /**
77 * Returns the status ID.
78 *
79 * @return int Status ID.
80 */
81 public function getStatusId()
82 {
83 return $this->statusId;
84 }
85
86
87 /**
88 * Returns the status name.
89 *
90 * @return string Status name.
91 */
92 public function getStatusName()
93 {
94 return $this->statusName;
95 }
96
97
98 /**
99 * Returns the status image.
100 *
101 * @return string Status image.
102 */
103 public function getStatusImage()
104 {
105 return $this->statusImage;
106 }
107
108
109 /**
110 * Returns status discount.
111 *
112 * @return float Status discount.
113 */
114 public function getStatusDiscount()
115 {
116 return $this->statusDiscount;
117 }
118
119
120 /**
121 * Checks if customer is a guest.
122 *
123 * @return bool Is customer a guest?
124 */
125 public function isGuest()
126 {
127 return $this->isGuest;
128 }
129 }