Completed
Pull Request — master (#74)
by Julien
04:30
created

Cart::getClientPhoneNumber()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Mapado\RestClientSdk\Tests\Model\JsonLd;
4
5
use DateTime;
6
use Mapado\RestClientSdk\Mapping\Annotations as Rest;
7
8
/**
9
 * Class Cart
10
 *
11
 * @author Julien Deniau <[email protected]>
12
 *
13
 * @Rest\Entity(key="cart")
14
 */
15
class Cart
16
{
17
    /**
18
     * id
19
     *
20
     * @var mixed
21
     *
22
     * @Rest\Id
23
     * @Rest\Attribute(name="id", type="string")
24
     */
25
    private $id;
26
27
    /**
28
     * status
29
     *
30
     * @var mixed
31
     *
32
     * @Rest\Attribute(name="status", type="string")
33
     */
34
    private $status;
35
36
    /**
37
     * createdAt
38
     *
39
     * @var mixed
40
     *
41
     * @Rest\Attribute(name="created_at", type="datetime")
42
     */
43
    private $createdAt;
44
45
    /**
46
     * cartItemList
47
     *
48
     * @var mixed
49
     *
50
     * @Rest\OneToMany(name="cart_items", targetEntity="CartItem")
51
     */
52
    private $cartItemList = [];
53
54
    /**
55
     * clientPhoneNumber
56
     *
57
     * @var string
58
     *
59
     * @Rest\Attribute(name="clientPhoneNumber", type="phone_number")
60
     */
61
    private $clientPhoneNumber;
62
63
    /**
64
     * order
65
     *
66
     * @var mixed
67
     *
68
     * @Rest\ManyToOne(name="order", targetEntity="Order")
69
     */
70
    private $order = null;
71
72
    /**
73
     * Getter for id
74
     *
75
     * @return string
76
     */
77
    public function getId()
78
    {
79
        return $this->id;
80
    }
81
82
    /**
83
     * Setter for id
84
     *
85
     * @param string $id
86
     *
87
     * @return Cart
88
     */
89
    public function setId($id)
90
    {
91
        $this->id = $id;
92
93
        return $this;
94
    }
95
96
    /**
97
     * Getter for status
98
     *
99
     * @return string
100
     */
101
    public function getStatus()
102
    {
103
        return $this->status;
104
    }
105
106
    /**
107
     * Setter for status
108
     *
109
     * @param string $status
110
     *
111
     * @return Cart
112
     */
113
    public function setStatus($status)
114
    {
115
        $this->status = $status;
116
117
        return $this;
118
    }
119
120
    /**
121
     * Getter for createdAt
122
     *
123
     * @return DateTime
124
     */
125
    public function getCreatedAt()
126
    {
127
        return $this->createdAt;
128
    }
129
130
    /**
131
     * Setter for createdAt
132
     *
133
     * @param DateTime $createdAt
134
     *
135
     * @return Cart
136
     */
137
    public function setCreatedAt(DateTime $createdAt)
138
    {
139
        $this->createdAt = $createdAt;
140
141
        return $this;
142
    }
143
144
    /**
145
     * Getter for cartItemList
146
     *
147
     * @return array
148
     */
149
    public function getCartItemList()
150
    {
151
        return $this->cartItemList;
152
    }
153
154
    /**
155
     * Setter for cartItemList
156
     *
157
     * @param array $cartItemList
158
     *
159
     * @return Cart
160
     */
161
    public function setCartItemList($cartItemList)
162
    {
163
        $this->cartItemList = $cartItemList;
164
165
        return $this;
166
    }
167
168
    public function addCartItemList($cartItem)
169
    {
170
        $this->cartItemList[] = $cartItem;
171
    }
172
173
    /**
174
     * Getter for clientPhoneNumber
175
     *
176
     * @return string
177
     */
178
    public function getClientPhoneNumber()
179
    {
180
        return $this->clientPhoneNumber;
181
    }
182
183
    /**
184
     * Setter for clientPhoneNumber
185
     *
186
     * @param string $clientPhoneNumber
187
     *
188
     * @return Cart
189
     */
190
    public function setClientPhoneNumber($clientPhoneNumber)
191
    {
192
        $this->clientPhoneNumber = $clientPhoneNumber;
193
194
        return $this;
195
    }
196
197
    /**
198
     * Getter for order
199
     *
200
     * @return string
201
     */
202
    public function getOrder()
203
    {
204
        return $this->order;
205
    }
206
207
    /**
208
     * Setter for order
209
     *
210
     * @param string $order
211
     *
212
     * @return Cart
213
     */
214
    public function setOrder($order)
215
    {
216
        $this->order = $order;
217
218
        return $this;
219
    }
220
}
221