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 bool verified |
26
|
|
|
* @property bool active |
27
|
|
|
* @property string name |
28
|
|
|
* @property string email |
29
|
|
|
* @property string description |
30
|
|
|
* @property string type |
31
|
|
|
* @property string taxId |
32
|
|
|
* @property BankAccount bankAccount |
33
|
|
|
* @property string failureCode |
34
|
|
|
* @property string created |
35
|
|
|
* @property string metadata |
36
|
|
|
*/ |
37
|
|
|
class Recipient extends Model |
38
|
|
|
{ |
39
|
|
|
const EVENT_CREATE = 'charge.create'; |
40
|
|
|
const EVENT_UPDATE = 'charge.update'; |
41
|
|
|
const EVENT_DESTROY = 'charge.destroy'; |
42
|
|
|
const EVENT_ACTIVATE = 'charge.activate'; |
43
|
|
|
const EVENT_DEACTIVATE = 'charge.deactivate'; |
44
|
|
|
const EVENT_VERIFY = 'charge.verify'; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @return array |
48
|
|
|
*/ |
49
|
2 |
|
public function getCreateData() |
50
|
|
|
{ |
51
|
|
|
return [ |
52
|
2 |
|
'name' => $this->name, |
53
|
2 |
|
'email' => $this->email, |
54
|
2 |
|
'description' => $this->description, |
55
|
2 |
|
'type' => $this->type, |
56
|
2 |
|
'tax_id' => $this->taxId, |
57
|
2 |
|
'bank_account' => $this->bankAccount, |
58
|
2 |
|
'metadata' => $this->metadata, |
59
|
|
|
]; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @return array |
64
|
|
|
*/ |
65
|
1 |
|
public function getUpdateData() |
66
|
|
|
{ |
67
|
1 |
|
return $this->getCreateData(); |
68
|
|
|
} |
69
|
|
|
} |
70
|
|
|
|