Transfer::getUpdateData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 3
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the PhpMob package.
5
 *
6
 * (c) Ishmael Doss <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace PhpMob\Omise\Domain;
15
16
use PhpMob\Omise\Model;
17
18
/**
19
 * @author Prawit <[email protected]>
20
 *
21
 * @property string object
22
 * @property string id
23
 * @property string livemode
24
 * @property string location
25
 * @property string recipient
26
 * @property BankAccount bankAccount
27
 * @property bool sent
28
 * @property bool paid
29
 * @property int amount
30
 * @property string currency
31
 * @property int fee
32
 * @property string failureCode
33
 * @property string failureMessage
34
 * @property string transaction
35
 * @property string created
36
 * @property string metadata
37
 */
38
class Transfer extends Model
39
{
40
    const EVENT_CREATE = 'charge.create';
41
    const EVENT_UPDATE = 'charge.update';
42
    const EVENT_DESTROY = 'charge.destroy';
43
    const EVENT_SEND = 'charge.send';
44
    const EVENT_PAY = 'charge.pay';
45
46
    /**
47
     * @return array
48
     */
49 2
    public function getCreateData()
50
    {
51
        return [
52 2
            'amount' => $this->amount,
53 2
            'recipient' => $this->recipient,
54 2
            'metadata' => $this->metadata,
55
        ];
56
    }
57
58
    public function getUpdateData()
59
    {
60
        return [
61
            'amount' => $this->amount,
62
            'metadata' => $this->metadata,
63
        ];
64
    }
65
}
66