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\Inventory; |
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
|
|
|
* @return InventoryItem |
59
|
|
|
*/ |
60
|
|
|
public function setSku($sku) |
61
|
|
|
{ |
62
|
|
|
$this->sku = $sku; |
63
|
|
|
return $this; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @return float |
68
|
|
|
*/ |
69
|
|
|
public function getCost() |
70
|
|
|
{ |
71
|
|
|
return $this->cost; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @param float $cost |
76
|
|
|
* @return InventoryItem |
77
|
|
|
*/ |
78
|
|
|
public function setCost($cost) |
79
|
|
|
{ |
80
|
|
|
$this->cost = $cost; |
81
|
|
|
return $this; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @return bool |
86
|
|
|
*/ |
87
|
|
|
public function isTracked() |
88
|
|
|
{ |
89
|
|
|
return $this->tracked; |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* @param bool $tracked |
94
|
|
|
* @return InventoryItem |
95
|
|
|
*/ |
96
|
|
|
public function setTracked($tracked) |
97
|
|
|
{ |
98
|
|
|
$this->tracked = $tracked; |
99
|
|
|
return $this; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @return string |
104
|
|
|
*/ |
105
|
|
|
public function getAdminGraphqlApiId() |
106
|
|
|
{ |
107
|
|
|
return $this->adminGraphqlApiId; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @param string $adminGraphqlApiId |
112
|
|
|
* @return InventoryItem |
113
|
|
|
*/ |
114
|
|
|
public function setAdminGraphqlApiId($adminGraphqlApiId) |
115
|
|
|
{ |
116
|
|
|
$this->adminGraphqlApiId = $adminGraphqlApiId; |
117
|
|
|
return $this; |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* @return \DateTimeInterface |
122
|
|
|
*/ |
123
|
|
|
public function getCreatedAt() |
124
|
|
|
{ |
125
|
|
|
return $this->createdAt; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* @param \DateTimeInterface $createdAt |
130
|
|
|
* @return InventoryItem |
131
|
|
|
*/ |
132
|
|
|
public function setCreatedAt($createdAt) |
133
|
|
|
{ |
134
|
|
|
$this->createdAt = $createdAt; |
135
|
|
|
return $this; |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* @return \DateTimeInterface |
140
|
|
|
*/ |
141
|
|
|
public function getUpdatedAt() |
142
|
|
|
{ |
143
|
|
|
return $this->updatedAt; |
144
|
|
|
} |
145
|
|
|
|
146
|
|
|
/** |
147
|
|
|
* @param \DateTimeInterface $updatedAt |
148
|
|
|
* @return InventoryItem |
149
|
|
|
*/ |
150
|
|
|
public function setUpdatedAt($updatedAt) |
151
|
|
|
{ |
152
|
|
|
$this->updatedAt = $updatedAt; |
153
|
|
|
return $this; |
154
|
|
|
} |
155
|
|
|
} |