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\Order; |
13
|
|
|
|
14
|
|
|
use Slince\Shopify\Common\Model\Model; |
15
|
|
|
|
16
|
|
|
class DiscountApplication extends Model |
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* @var string |
20
|
|
|
*/ |
21
|
|
|
protected $type; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @var string |
25
|
|
|
*/ |
26
|
|
|
protected $value; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @var string |
30
|
|
|
*/ |
31
|
|
|
protected $valueType; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var string |
35
|
|
|
*/ |
36
|
|
|
protected $allocationMethod; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var string |
40
|
|
|
*/ |
41
|
|
|
protected $targetSelection; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var string |
45
|
|
|
*/ |
46
|
|
|
protected $targetType; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @var string |
50
|
|
|
*/ |
51
|
|
|
protected $code; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @return string |
55
|
|
|
*/ |
56
|
|
|
public function getType() |
57
|
|
|
{ |
58
|
|
|
return $this->type; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @param string $type |
63
|
|
|
* |
64
|
|
|
* @return DiscountApplication |
65
|
|
|
*/ |
66
|
|
|
public function setType($type) |
67
|
|
|
{ |
68
|
|
|
$this->type = $type; |
69
|
|
|
|
70
|
|
|
return $this; |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
/** |
74
|
|
|
* @return string |
75
|
|
|
*/ |
76
|
|
|
public function getValue() |
77
|
|
|
{ |
78
|
|
|
return $this->value; |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* @param string $value |
83
|
|
|
* |
84
|
|
|
* @return DiscountApplication |
85
|
|
|
*/ |
86
|
|
|
public function setValue($value) |
87
|
|
|
{ |
88
|
|
|
$this->value = $value; |
89
|
|
|
|
90
|
|
|
return $this; |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* @return string |
95
|
|
|
*/ |
96
|
|
|
public function getValueType() |
97
|
|
|
{ |
98
|
|
|
return $this->valueType; |
99
|
|
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* @param string $valueType |
103
|
|
|
* |
104
|
|
|
* @return DiscountApplication |
105
|
|
|
*/ |
106
|
|
|
public function setValueType($valueType) |
107
|
|
|
{ |
108
|
|
|
$this->valueType = $valueType; |
109
|
|
|
|
110
|
|
|
return $this; |
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* @return string |
115
|
|
|
*/ |
116
|
|
|
public function getAllocationMethod() |
117
|
|
|
{ |
118
|
|
|
return $this->allocationMethod; |
119
|
|
|
} |
120
|
|
|
|
121
|
|
|
/** |
122
|
|
|
* @param string $allocationMethod |
123
|
|
|
* |
124
|
|
|
* @return DiscountApplication |
125
|
|
|
*/ |
126
|
|
|
public function setAllocationMethod($allocationMethod) |
127
|
|
|
{ |
128
|
|
|
$this->allocationMethod = $allocationMethod; |
129
|
|
|
|
130
|
|
|
return $this; |
131
|
|
|
} |
132
|
|
|
|
133
|
|
|
/** |
134
|
|
|
* @return string |
135
|
|
|
*/ |
136
|
|
|
public function getTargetSelection() |
137
|
|
|
{ |
138
|
|
|
return $this->targetSelection; |
139
|
|
|
} |
140
|
|
|
|
141
|
|
|
/** |
142
|
|
|
* @param string $targetSelection |
143
|
|
|
* |
144
|
|
|
* @return DiscountApplication |
145
|
|
|
*/ |
146
|
|
|
public function setTargetSelection($targetSelection) |
147
|
|
|
{ |
148
|
|
|
$this->targetSelection = $targetSelection; |
149
|
|
|
|
150
|
|
|
return $this; |
151
|
|
|
} |
152
|
|
|
|
153
|
|
|
/** |
154
|
|
|
* @return string |
155
|
|
|
*/ |
156
|
|
|
public function getTargetType() |
157
|
|
|
{ |
158
|
|
|
return $this->targetType; |
159
|
|
|
} |
160
|
|
|
|
161
|
|
|
/** |
162
|
|
|
* @param string $targetType |
163
|
|
|
* |
164
|
|
|
* @return DiscountApplication |
165
|
|
|
*/ |
166
|
|
|
public function setTargetType($targetType) |
167
|
|
|
{ |
168
|
|
|
$this->targetType = $targetType; |
169
|
|
|
|
170
|
|
|
return $this; |
171
|
|
|
} |
172
|
|
|
|
173
|
|
|
/** |
174
|
|
|
* @return string |
175
|
|
|
*/ |
176
|
|
|
public function getCode() |
177
|
|
|
{ |
178
|
|
|
return $this->code; |
179
|
|
|
} |
180
|
|
|
|
181
|
|
|
/** |
182
|
|
|
* @param string $code |
183
|
|
|
* |
184
|
|
|
* @return DiscountApplication |
185
|
|
|
*/ |
186
|
|
|
public function setCode($code) |
187
|
|
|
{ |
188
|
|
|
$this->code = $code; |
189
|
|
|
|
190
|
|
|
return $this; |
191
|
|
|
} |
192
|
|
|
} |