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\OrderRisk; |
13
|
|
|
|
14
|
|
|
use Slince\Shopify\Common\Model\Model; |
15
|
|
|
|
16
|
|
|
class Risk extends Model |
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* @var int |
20
|
|
|
*/ |
21
|
|
|
protected $orderId; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @var int |
25
|
|
|
*/ |
26
|
|
|
protected $checkoutId; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @var string |
30
|
|
|
*/ |
31
|
|
|
protected $source; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var float |
35
|
|
|
*/ |
36
|
|
|
protected $score; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var string |
40
|
|
|
*/ |
41
|
|
|
protected $recommendation; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var bool |
45
|
|
|
*/ |
46
|
|
|
protected $display; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @var bool |
50
|
|
|
*/ |
51
|
|
|
protected $causeCancel; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @var string |
55
|
|
|
*/ |
56
|
|
|
protected $message; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @var string |
60
|
|
|
*/ |
61
|
|
|
protected $merchantMessage; |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @return int |
65
|
|
|
*/ |
66
|
|
|
public function getOrderId() |
67
|
|
|
{ |
68
|
|
|
return $this->orderId; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @param int $orderId |
73
|
|
|
* |
74
|
|
|
* @return Risk |
75
|
|
|
*/ |
76
|
|
|
public function setOrderId($orderId) |
77
|
|
|
{ |
78
|
|
|
$this->orderId = $orderId; |
79
|
|
|
|
80
|
|
|
return $this; |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* @return int |
85
|
|
|
*/ |
86
|
|
|
public function getCheckoutId() |
87
|
|
|
{ |
88
|
|
|
return $this->checkoutId; |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @param int $checkoutId |
93
|
|
|
* |
94
|
|
|
* @return Risk |
95
|
|
|
*/ |
96
|
|
|
public function setCheckoutId($checkoutId) |
97
|
|
|
{ |
98
|
|
|
$this->checkoutId = $checkoutId; |
99
|
|
|
|
100
|
|
|
return $this; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* @return string |
105
|
|
|
*/ |
106
|
|
|
public function getSource() |
107
|
|
|
{ |
108
|
|
|
return $this->source; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* @param string $source |
113
|
|
|
* |
114
|
|
|
* @return Risk |
115
|
|
|
*/ |
116
|
|
|
public function setSource($source) |
117
|
|
|
{ |
118
|
|
|
$this->source = $source; |
119
|
|
|
|
120
|
|
|
return $this; |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* @return float |
125
|
|
|
*/ |
126
|
|
|
public function getScore() |
127
|
|
|
{ |
128
|
|
|
return $this->score; |
129
|
|
|
} |
130
|
|
|
|
131
|
|
|
/** |
132
|
|
|
* @param float $score |
133
|
|
|
* |
134
|
|
|
* @return Risk |
135
|
|
|
*/ |
136
|
|
|
public function setScore($score) |
137
|
|
|
{ |
138
|
|
|
$this->score = $score; |
139
|
|
|
|
140
|
|
|
return $this; |
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
/** |
144
|
|
|
* @return string |
145
|
|
|
*/ |
146
|
|
|
public function getRecommendation() |
147
|
|
|
{ |
148
|
|
|
return $this->recommendation; |
149
|
|
|
} |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* @param string $recommendation |
153
|
|
|
* |
154
|
|
|
* @return Risk |
155
|
|
|
*/ |
156
|
|
|
public function setRecommendation($recommendation) |
157
|
|
|
{ |
158
|
|
|
$this->recommendation = $recommendation; |
159
|
|
|
|
160
|
|
|
return $this; |
161
|
|
|
} |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* @return bool |
165
|
|
|
*/ |
166
|
|
|
public function isDisplay() |
167
|
|
|
{ |
168
|
|
|
return $this->display; |
169
|
|
|
} |
170
|
|
|
|
171
|
|
|
/** |
172
|
|
|
* @param bool $display |
173
|
|
|
* |
174
|
|
|
* @return Risk |
175
|
|
|
*/ |
176
|
|
|
public function setDisplay($display) |
177
|
|
|
{ |
178
|
|
|
$this->display = $display; |
179
|
|
|
|
180
|
|
|
return $this; |
181
|
|
|
} |
182
|
|
|
|
183
|
|
|
/** |
184
|
|
|
* @return bool |
185
|
|
|
*/ |
186
|
|
|
public function isCauseCancel() |
187
|
|
|
{ |
188
|
|
|
return $this->causeCancel; |
189
|
|
|
} |
190
|
|
|
|
191
|
|
|
/** |
192
|
|
|
* @param bool $causeCancel |
193
|
|
|
* |
194
|
|
|
* @return Risk |
195
|
|
|
*/ |
196
|
|
|
public function setCauseCancel($causeCancel) |
197
|
|
|
{ |
198
|
|
|
$this->causeCancel = $causeCancel; |
199
|
|
|
|
200
|
|
|
return $this; |
201
|
|
|
} |
202
|
|
|
|
203
|
|
|
/** |
204
|
|
|
* @return string |
205
|
|
|
*/ |
206
|
|
|
public function getMessage() |
207
|
|
|
{ |
208
|
|
|
return $this->message; |
209
|
|
|
} |
210
|
|
|
|
211
|
|
|
/** |
212
|
|
|
* @param string $message |
213
|
|
|
* |
214
|
|
|
* @return Risk |
215
|
|
|
*/ |
216
|
|
|
public function setMessage($message) |
217
|
|
|
{ |
218
|
|
|
$this->message = $message; |
219
|
|
|
|
220
|
|
|
return $this; |
221
|
|
|
} |
222
|
|
|
|
223
|
|
|
/** |
224
|
|
|
* @return string |
225
|
|
|
*/ |
226
|
|
|
public function getMerchantMessage() |
227
|
|
|
{ |
228
|
|
|
return $this->merchantMessage; |
229
|
|
|
} |
230
|
|
|
|
231
|
|
|
/** |
232
|
|
|
* @param string $merchantMessage |
233
|
|
|
* |
234
|
|
|
* @return Risk |
235
|
|
|
*/ |
236
|
|
|
public function setMerchantMessage($merchantMessage) |
237
|
|
|
{ |
238
|
|
|
$this->merchantMessage = $merchantMessage; |
239
|
|
|
|
240
|
|
|
return $this; |
241
|
|
|
} |
242
|
|
|
} |