1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the slince/shopify-api-php |
5
|
|
|
* |
6
|
|
|
* (c) Slince <[email protected]> |
7
|
|
|
* |
8
|
|
|
* This source file is subject to the MIT license that is bundled |
9
|
|
|
* with this source code in the file LICENSE. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace Slince\Shopify\Manager\InventoryItem; |
13
|
|
|
|
14
|
|
|
use Slince\Shopify\Common\Model\Model; |
15
|
|
|
|
16
|
|
|
class InventoryItem extends Model |
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* @var string |
20
|
|
|
*/ |
21
|
|
|
protected $sku; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @var float |
25
|
|
|
*/ |
26
|
|
|
protected $cost; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @var boolean |
30
|
|
|
*/ |
31
|
|
|
protected $tracked; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var string |
35
|
|
|
*/ |
36
|
|
|
protected $adminGraphqlApiId; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var \DateTimeInterface |
40
|
|
|
*/ |
41
|
|
|
protected $createdAt; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var \DateTimeInterface |
45
|
|
|
*/ |
46
|
|
|
protected $updatedAt; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @return string |
50
|
|
|
*/ |
51
|
|
|
public function getSku() |
52
|
|
|
{ |
53
|
|
|
return $this->sku; |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @param string $sku |
58
|
|
|
* |
59
|
|
|
* @return InventoryItem |
60
|
|
|
*/ |
61
|
|
|
public function setSku($sku) |
62
|
|
|
{ |
63
|
|
|
$this->sku = $sku; |
64
|
|
|
|
65
|
|
|
return $this; |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @return float |
70
|
|
|
*/ |
71
|
|
|
public function getCost() |
72
|
|
|
{ |
73
|
|
|
return $this->cost; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @param float $cost |
78
|
|
|
* |
79
|
|
|
* @return InventoryItem |
80
|
|
|
*/ |
81
|
|
|
public function setCost($cost) |
82
|
|
|
{ |
83
|
|
|
$this->cost = $cost; |
84
|
|
|
|
85
|
|
|
return $this; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* @return bool |
90
|
|
|
*/ |
91
|
|
|
public function isTracked() |
92
|
|
|
{ |
93
|
|
|
return $this->tracked; |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* @param bool $tracked |
98
|
|
|
* |
99
|
|
|
* @return InventoryItem |
100
|
|
|
*/ |
101
|
|
|
public function setTracked($tracked) |
102
|
|
|
{ |
103
|
|
|
$this->tracked = $tracked; |
104
|
|
|
|
105
|
|
|
return $this; |
106
|
|
|
} |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* @return string |
110
|
|
|
*/ |
111
|
|
|
public function getAdminGraphqlApiId() |
112
|
|
|
{ |
113
|
|
|
return $this->adminGraphqlApiId; |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* @param string $adminGraphqlApiId |
118
|
|
|
* |
119
|
|
|
* @return InventoryItem |
120
|
|
|
*/ |
121
|
|
|
public function setAdminGraphqlApiId($adminGraphqlApiId) |
122
|
|
|
{ |
123
|
|
|
$this->adminGraphqlApiId = $adminGraphqlApiId; |
124
|
|
|
|
125
|
|
|
return $this; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* @return \DateTimeInterface |
130
|
|
|
*/ |
131
|
|
|
public function getCreatedAt() |
132
|
|
|
{ |
133
|
|
|
return $this->createdAt; |
134
|
|
|
} |
135
|
|
|
|
136
|
|
|
/** |
137
|
|
|
* @param \DateTimeInterface $createdAt |
138
|
|
|
* |
139
|
|
|
* @return InventoryItem |
140
|
|
|
*/ |
141
|
|
|
public function setCreatedAt($createdAt) |
142
|
|
|
{ |
143
|
|
|
$this->createdAt = $createdAt; |
144
|
|
|
|
145
|
|
|
return $this; |
146
|
|
|
} |
147
|
|
|
|
148
|
|
|
/** |
149
|
|
|
* @return \DateTimeInterface |
150
|
|
|
*/ |
151
|
|
|
public function getUpdatedAt() |
152
|
|
|
{ |
153
|
|
|
return $this->updatedAt; |
154
|
|
|
} |
155
|
|
|
|
156
|
|
|
/** |
157
|
|
|
* @param \DateTimeInterface $updatedAt |
158
|
|
|
* |
159
|
|
|
* @return InventoryItem |
160
|
|
|
*/ |
161
|
|
|
public function setUpdatedAt($updatedAt) |
162
|
|
|
{ |
163
|
|
|
$this->updatedAt = $updatedAt; |
164
|
|
|
|
165
|
|
|
return $this; |
166
|
|
|
} |
167
|
|
|
} |