Transaction   A
last analyzed

Complexity

Total Complexity 30

Size/Duplication

Total Lines 379
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 30
lcom 0
cbo 2
dl 0
loc 379
rs 10
c 0
b 0
f 0

30 Methods

Rating   Name   Duplication   Size   Complexity  
A getAmount() 0 4 1
A setAmount() 0 6 1
A getAuthorization() 0 4 1
A setAuthorization() 0 6 1
A getCreatedAt() 0 4 1
A setCreatedAt() 0 6 1
A getDeviceId() 0 4 1
A setDeviceId() 0 6 1
A getGateway() 0 4 1
A setGateway() 0 6 1
A getSourceName() 0 4 1
A setSourceName() 0 6 1
A getPaymentDetails() 0 4 1
A setPaymentDetails() 0 6 1
A getKind() 0 4 1
A setKind() 0 6 1
A getOrderId() 0 4 1
A setOrderId() 0 6 1
A getReceipt() 0 4 1
A setReceipt() 0 6 1
A getErrorCode() 0 4 1
A setErrorCode() 0 6 1
A getStatus() 0 4 1
A setStatus() 0 6 1
A isTest() 0 4 1
A setTest() 0 6 1
A getUserId() 0 4 1
A setUserId() 0 6 1
A getCurrency() 0 4 1
A setCurrency() 0 6 1
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\Transaction;
13
14
use Slince\Shopify\Common\Model\Model;
15
use Slince\Shopify\Common\Model\AdminGraphqlApiId;
16
17
class Transaction extends Model
18
{
19
    use AdminGraphqlApiId;
20
21
    /**
22
     * @var float
23
     */
24
    protected $amount;
25
26
    /**
27
     * @var string
28
     */
29
    protected $authorization;
30
31
    /**
32
     * @var \DateTimeInterface
33
     */
34
    protected $createdAt;
35
36
    /**
37
     * @var string
38
     */
39
    protected $deviceId;
40
41
    /**
42
     * @var string
43
     */
44
    protected $gateway;
45
46
    /**
47
     * @var string
48
     */
49
    protected $sourceName;
50
51
    /**
52
     * @var array
53
     */
54
    protected $paymentDetails;
55
56
    /**
57
     * @var string
58
     */
59
    protected $kind;
60
61
    /**
62
     * @var int
63
     */
64
    protected $orderId;
65
66
    /**
67
     * @var array
68
     */
69
    protected $receipt;
70
71
    /**
72
     * @var string
73
     */
74
    protected $errorCode;
75
76
    /**
77
     * @var string
78
     */
79
    protected $status;
80
81
    /**
82
     * @var bool
83
     */
84
    protected $test;
85
86
    /**
87
     * @var int
88
     */
89
    protected $userId;
90
91
    /**
92
     * @var string
93
     */
94
    protected $currency;
95
96
    /**
97
     * @return float
98
     */
99
    public function getAmount()
100
    {
101
        return $this->amount;
102
    }
103
104
    /**
105
     * @param float $amount
106
     *
107
     * @return Transaction
108
     */
109
    public function setAmount($amount)
110
    {
111
        $this->amount = $amount;
112
113
        return $this;
114
    }
115
116
    /**
117
     * @return string
118
     */
119
    public function getAuthorization()
120
    {
121
        return $this->authorization;
122
    }
123
124
    /**
125
     * @param string $authorization
126
     *
127
     * @return Transaction
128
     */
129
    public function setAuthorization($authorization)
130
    {
131
        $this->authorization = $authorization;
132
133
        return $this;
134
    }
135
136
    /**
137
     * @return \DateTimeInterface
138
     */
139
    public function getCreatedAt()
140
    {
141
        return $this->createdAt;
142
    }
143
144
    /**
145
     * @param \DateTimeInterface $createdAt
146
     *
147
     * @return Transaction
148
     */
149
    public function setCreatedAt($createdAt)
150
    {
151
        $this->createdAt = $createdAt;
152
153
        return $this;
154
    }
155
156
    /**
157
     * @return string
158
     */
159
    public function getDeviceId()
160
    {
161
        return $this->deviceId;
162
    }
163
164
    /**
165
     * @param string $deviceId
166
     *
167
     * @return Transaction
168
     */
169
    public function setDeviceId($deviceId)
170
    {
171
        $this->deviceId = $deviceId;
172
173
        return $this;
174
    }
175
176
    /**
177
     * @return string
178
     */
179
    public function getGateway()
180
    {
181
        return $this->gateway;
182
    }
183
184
    /**
185
     * @param string $gateway
186
     *
187
     * @return Transaction
188
     */
189
    public function setGateway($gateway)
190
    {
191
        $this->gateway = $gateway;
192
193
        return $this;
194
    }
195
196
    /**
197
     * @return string
198
     */
199
    public function getSourceName()
200
    {
201
        return $this->sourceName;
202
    }
203
204
    /**
205
     * @param string $sourceName
206
     *
207
     * @return Transaction
208
     */
209
    public function setSourceName($sourceName)
210
    {
211
        $this->sourceName = $sourceName;
212
213
        return $this;
214
    }
215
216
    /**
217
     * @return array
218
     */
219
    public function getPaymentDetails()
220
    {
221
        return $this->paymentDetails;
222
    }
223
224
    /**
225
     * @param array $paymentDetails
226
     *
227
     * @return Transaction
228
     */
229
    public function setPaymentDetails($paymentDetails)
230
    {
231
        $this->paymentDetails = $paymentDetails;
232
233
        return $this;
234
    }
235
236
    /**
237
     * @return string
238
     */
239
    public function getKind()
240
    {
241
        return $this->kind;
242
    }
243
244
    /**
245
     * @param string $kind
246
     *
247
     * @return Transaction
248
     */
249
    public function setKind($kind)
250
    {
251
        $this->kind = $kind;
252
253
        return $this;
254
    }
255
256
    /**
257
     * @return int
258
     */
259
    public function getOrderId()
260
    {
261
        return $this->orderId;
262
    }
263
264
    /**
265
     * @param int $orderId
266
     *
267
     * @return Transaction
268
     */
269
    public function setOrderId($orderId)
270
    {
271
        $this->orderId = $orderId;
272
273
        return $this;
274
    }
275
276
    /**
277
     * @return array
278
     */
279
    public function getReceipt()
280
    {
281
        return $this->receipt;
282
    }
283
284
    /**
285
     * @param array $receipt
286
     *
287
     * @return Transaction
288
     */
289
    public function setReceipt($receipt)
290
    {
291
        $this->receipt = $receipt;
292
293
        return $this;
294
    }
295
296
    /**
297
     * @return string
298
     */
299
    public function getErrorCode()
300
    {
301
        return $this->errorCode;
302
    }
303
304
    /**
305
     * @param string $errorCode
306
     *
307
     * @return Transaction
308
     */
309
    public function setErrorCode($errorCode)
310
    {
311
        $this->errorCode = $errorCode;
312
313
        return $this;
314
    }
315
316
    /**
317
     * @return string
318
     */
319
    public function getStatus()
320
    {
321
        return $this->status;
322
    }
323
324
    /**
325
     * @param string $status
326
     *
327
     * @return Transaction
328
     */
329
    public function setStatus($status)
330
    {
331
        $this->status = $status;
332
333
        return $this;
334
    }
335
336
    /**
337
     * @return bool
338
     */
339
    public function isTest()
340
    {
341
        return $this->test;
342
    }
343
344
    /**
345
     * @param bool $test
346
     *
347
     * @return Transaction
348
     */
349
    public function setTest($test)
350
    {
351
        $this->test = $test;
352
353
        return $this;
354
    }
355
356
    /**
357
     * @return int
358
     */
359
    public function getUserId()
360
    {
361
        return $this->userId;
362
    }
363
364
    /**
365
     * @param int $userId
366
     *
367
     * @return Transaction
368
     */
369
    public function setUserId($userId)
370
    {
371
        $this->userId = $userId;
372
373
        return $this;
374
    }
375
376
    /**
377
     * @return string
378
     */
379
    public function getCurrency()
380
    {
381
        return $this->currency;
382
    }
383
384
    /**
385
     * @param string $currency
386
     *
387
     * @return Transaction
388
     */
389
    public function setCurrency($currency)
390
    {
391
        $this->currency = $currency;
392
393
        return $this;
394
    }
395
}