|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* @author @jayS-de <[email protected]> |
|
4
|
|
|
*/ |
|
5
|
|
|
|
|
6
|
|
|
namespace Commercetools\Core\Model\Payment; |
|
7
|
|
|
|
|
8
|
|
|
use Commercetools\Core\Model\Common\Resource; |
|
9
|
|
|
use Commercetools\Core\Model\Common\DateTimeDecorator; |
|
10
|
|
|
use Commercetools\Core\Model\Customer\CustomerReference; |
|
11
|
|
|
use Commercetools\Core\Model\Common\Money; |
|
12
|
|
|
use Commercetools\Core\Model\CustomField\CustomFieldObject; |
|
13
|
|
|
use Commercetools\Core\Model\CustomField\CustomFieldObjectCollection; |
|
14
|
|
|
|
|
15
|
|
|
/** |
|
16
|
|
|
* @package Commercetools\Core\Model\Payment |
|
17
|
|
|
* @link https://dev.commercetools.com/http-api-projects-payments.html#payment |
|
18
|
|
|
* @method string getId() |
|
19
|
|
|
* @method Payment setId(string $id = null) |
|
20
|
|
|
* @method int getVersion() |
|
21
|
|
|
* @method Payment setVersion(int $version = null) |
|
22
|
|
|
* @method DateTimeDecorator getCreatedAt() |
|
23
|
|
|
* @method Payment setCreatedAt(\DateTime $createdAt = null) |
|
24
|
|
|
* @method DateTimeDecorator getLastModifiedAt() |
|
25
|
|
|
* @method Payment setLastModifiedAt(\DateTime $lastModifiedAt = null) |
|
26
|
|
|
* @method CustomerReference getCustomer() |
|
27
|
|
|
* @method Payment setCustomer(CustomerReference $customer = null) |
|
28
|
|
|
* @method string getExternalId() |
|
29
|
|
|
* @method Payment setExternalId(string $externalId = null) |
|
30
|
|
|
* @method string getInterfaceId() |
|
31
|
|
|
* @method Payment setInterfaceId(string $interfaceId = null) |
|
32
|
|
|
* @method Money getAmountPlanned() |
|
33
|
|
|
* @method Payment setAmountPlanned(Money $amountPlanned = null) |
|
34
|
|
|
* @method Money getAmountAuthorized() |
|
35
|
|
|
* @method Payment setAmountAuthorized(Money $amountAuthorized = null) |
|
36
|
|
|
* @method DateTimeDecorator getAuthorizedUntil() |
|
37
|
|
|
* @method Payment setAuthorizedUntil(\DateTime $authorizedUntil = null) |
|
38
|
|
|
* @method Money getAmountPaid() |
|
39
|
|
|
* @method Payment setAmountPaid(Money $amountPaid = null) |
|
40
|
|
|
* @method Money getAmountRefunded() |
|
41
|
|
|
* @method Payment setAmountRefunded(Money $amountRefunded = null) |
|
42
|
|
|
* @method PaymentMethodInfo getPaymentMethodInfo() |
|
43
|
|
|
* @method Payment setPaymentMethodInfo(PaymentMethodInfo $paymentMethodInfo = null) |
|
44
|
|
|
* @method CustomFieldObject getCustom() |
|
45
|
|
|
* @method Payment setCustom(CustomFieldObject $custom = null) |
|
46
|
|
|
* @method PaymentStatus getPaymentStatus() |
|
47
|
|
|
* @method Payment setPaymentStatus(PaymentStatus $paymentStatus = null) |
|
48
|
|
|
* @method TransactionCollection getTransactions() |
|
49
|
|
|
* @method Payment setTransactions(TransactionCollection $transactions = null) |
|
50
|
|
|
* @method CustomFieldObjectCollection getInterfaceInteractions() |
|
51
|
|
|
* @method Payment setInterfaceInteractions(CustomFieldObjectCollection $interfaceInteractions = null) |
|
52
|
|
|
*/ |
|
53
|
|
|
class Payment extends Resource |
|
54
|
|
|
{ |
|
55
|
2 |
|
public function fieldDefinitions() |
|
56
|
|
|
{ |
|
57
|
|
|
return [ |
|
58
|
2 |
|
'id' => [static::TYPE => 'string'], |
|
59
|
2 |
|
'version' => [static::TYPE => 'int'], |
|
60
|
|
|
'createdAt' => [ |
|
61
|
2 |
|
static::TYPE => '\DateTime', |
|
62
|
2 |
|
static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
|
63
|
2 |
|
], |
|
64
|
|
|
'lastModifiedAt' => [ |
|
65
|
2 |
|
static::TYPE => '\DateTime', |
|
66
|
2 |
|
static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
|
67
|
2 |
|
], |
|
68
|
2 |
|
'customer' => [static::TYPE => '\Commercetools\Core\Model\Customer\CustomerReference'], |
|
69
|
2 |
|
'externalId' => [static::TYPE => 'string'], |
|
70
|
2 |
|
'interfaceId' => [static::TYPE => 'string'], |
|
71
|
2 |
|
'amountPlanned' => [static::TYPE => '\Commercetools\Core\Model\Common\Money'], |
|
72
|
2 |
|
'amountAuthorized' => [static::TYPE => '\Commercetools\Core\Model\Common\Money'], |
|
73
|
|
|
'authorizedUntil' => [ |
|
74
|
2 |
|
static::TYPE => '\DateTime', |
|
75
|
2 |
|
static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
|
76
|
2 |
|
], |
|
77
|
2 |
|
'amountPaid' => [static::TYPE => '\Commercetools\Core\Model\Common\Money'], |
|
78
|
2 |
|
'amountRefunded' => [static::TYPE => '\Commercetools\Core\Model\Common\Money'], |
|
79
|
2 |
|
'paymentMethodInfo' => [static::TYPE => '\Commercetools\Core\Model\Payment\PaymentMethodInfo'], |
|
80
|
2 |
|
'custom' => [static::TYPE => '\Commercetools\Core\Model\CustomField\CustomFieldObject'], |
|
81
|
2 |
|
'paymentStatus' => [static::TYPE => '\Commercetools\Core\Model\Payment\PaymentStatus'], |
|
82
|
2 |
|
'transactions' => [static::TYPE => '\Commercetools\Core\Model\Payment\TransactionCollection'], |
|
83
|
|
|
'interfaceInteractions' => [ |
|
84
|
2 |
|
static::TYPE => '\Commercetools\Core\Model\CustomField\CustomFieldObjectCollection' |
|
85
|
2 |
|
], |
|
86
|
2 |
|
]; |
|
87
|
|
|
} |
|
88
|
|
|
} |
|
89
|
|
|
|