1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* PHP version 5.4 and 7 |
5
|
|
|
* |
6
|
|
|
* @category MessageEntity |
7
|
|
|
* @package Payever\Payments |
8
|
|
|
* @author payever GmbH <[email protected]> |
9
|
|
|
* @copyright 2017-2021 payever GmbH |
10
|
|
|
* @license MIT <https://opensource.org/licenses/MIT> |
11
|
|
|
* @link https://docs.payever.org/shopsystems/api/getting-started |
12
|
|
|
*/ |
13
|
|
|
|
14
|
|
|
namespace Payever\ExternalIntegration\Payments\Http\MessageEntity; |
15
|
|
|
|
16
|
|
|
use Payever\ExternalIntegration\Core\Http\MessageEntity\ChannelSetEntity; |
17
|
|
|
use Payever\ExternalIntegration\Core\Http\MessageEntity\ResultEntity; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* This class represents Retrieve Payment Result Entity |
21
|
|
|
* |
22
|
|
|
* @method string getId() |
23
|
|
|
* @method string getStatus() |
24
|
|
|
* @method string getColorState() |
25
|
|
|
* @method string getMerchantName() |
26
|
|
|
* @method string getCustomerName() |
27
|
|
|
* @method string getCustomerEmail() |
28
|
|
|
* @method string getPaymentType() |
29
|
|
|
* @method string getLastAction() |
30
|
|
|
* @method \DateTime|false getCreatedAt() |
31
|
|
|
* @method \DateTime|false getUpdatedAt() |
32
|
|
|
* @method string getChannel() |
33
|
|
|
* @method string getReference() |
34
|
|
|
* @method float getAmount() |
35
|
|
|
* @method string getCurrency() |
36
|
|
|
* @method float getFee() |
37
|
|
|
* @method float getTotal() |
38
|
|
|
* @method AddressEntity getAddress() |
39
|
|
|
* @method PaymentDetailsEntity getPaymentDetails() |
40
|
|
|
* @method array getPaymentDetailsArray() |
41
|
|
|
* @method ChannelSetEntity getChannelSet() |
42
|
|
|
* @method float getDownPayment() |
43
|
|
|
* @method self setId(string $id) |
44
|
|
|
* @method self setStatus(string $status) |
45
|
|
|
* @method self setColorState(string $colorState) |
46
|
|
|
* @method self setMerchantName(string $merchantName) |
47
|
|
|
* @method self setCustomerName(string $customerName) |
48
|
|
|
* @method self setCustomerEmail(string $customerEmail) |
49
|
|
|
* @method self setPaymentType(string $paymentType) |
50
|
|
|
* @method self setLastAction(string $lastAction) |
51
|
|
|
* @method self setChannel(string $channel) |
52
|
|
|
* @method self setReference(string $reference) |
53
|
|
|
* @method self setAmount(float $amount) |
54
|
|
|
* @method self setDownPayment(float $downPayment) |
55
|
|
|
* @method self setCurrency(string $currency) |
56
|
|
|
* @method self setFee(float $fee) |
57
|
|
|
* @method self setTotal(float $total) |
58
|
|
|
* |
59
|
|
|
* @SuppressWarnings(PHPMD.ShortVariable) |
60
|
|
|
* @SuppressWarnings(PHPMD.TooManyFields) |
61
|
|
|
*/ |
62
|
|
|
class RetrievePaymentResultEntity extends ResultEntity |
63
|
|
|
{ |
64
|
|
|
/** @var string $id */ |
65
|
|
|
protected $id; |
66
|
|
|
|
67
|
|
|
/** @var string $status */ |
68
|
|
|
protected $status; |
69
|
|
|
|
70
|
|
|
/** @var string $colorState */ |
71
|
|
|
protected $colorState; |
72
|
|
|
|
73
|
|
|
/** @var string $merchantName */ |
74
|
|
|
protected $merchantName; |
75
|
|
|
|
76
|
|
|
/** @var string $customerName */ |
77
|
|
|
protected $customerName; |
78
|
|
|
|
79
|
|
|
/** @var string $customerName */ |
80
|
|
|
protected $customerEmail; |
81
|
|
|
|
82
|
|
|
/** @var string $paymentType */ |
83
|
|
|
protected $paymentType; |
84
|
|
|
|
85
|
|
|
/** @var string $lastAction */ |
86
|
|
|
protected $lastAction; |
87
|
|
|
|
88
|
|
|
/** @var \DateTime|bool $createdAt */ |
89
|
|
|
protected $createdAt; |
90
|
|
|
|
91
|
|
|
/** @var \DateTime|bool $updatedAt */ |
92
|
|
|
protected $updatedAt; |
93
|
|
|
|
94
|
|
|
/** @var string $channel */ |
95
|
|
|
protected $channel; |
96
|
|
|
|
97
|
|
|
/** @var string $reference */ |
98
|
|
|
protected $reference; |
99
|
|
|
|
100
|
|
|
/** @var float $amount */ |
101
|
|
|
protected $amount; |
102
|
|
|
|
103
|
|
|
/** @var float $amount */ |
104
|
|
|
protected $downPayment; |
105
|
|
|
|
106
|
|
|
/** @var string $currency */ |
107
|
|
|
protected $currency; |
108
|
|
|
|
109
|
|
|
/** @var float $fee */ |
110
|
|
|
protected $fee; |
111
|
|
|
|
112
|
|
|
/** @var float $total */ |
113
|
|
|
protected $total; |
114
|
|
|
|
115
|
|
|
/** @var AddressEntity $address */ |
116
|
|
|
protected $address; |
117
|
|
|
|
118
|
|
|
/** @var PaymentDetailsEntity $paymentDetails */ |
119
|
|
|
protected $paymentDetails; |
120
|
|
|
|
121
|
|
|
/** @var array $paymentDetailsArray */ |
122
|
|
|
protected $paymentDetailsArray; |
123
|
|
|
|
124
|
|
|
/** @var ChannelSetEntity */ |
125
|
|
|
protected $channelSet; |
126
|
|
|
|
127
|
|
|
/** |
128
|
|
|
* Sets Created At |
129
|
|
|
* |
130
|
|
|
* @param string $createdAt |
131
|
|
|
*/ |
132
|
|
|
public function setCreatedAt($createdAt) |
133
|
|
|
{ |
134
|
|
|
$this->createdAt = date_create($createdAt); |
135
|
|
|
} |
136
|
|
|
|
137
|
|
|
/** |
138
|
|
|
* Sets Updated At |
139
|
|
|
* |
140
|
|
|
* @param string $updatedAt |
141
|
|
|
*/ |
142
|
|
|
public function setUpdatedAt($updatedAt) |
143
|
|
|
{ |
144
|
|
|
$this->updatedAt = date_create($updatedAt); |
145
|
|
|
} |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* Sets Address |
149
|
|
|
* |
150
|
|
|
* @param array $address |
151
|
|
|
*/ |
152
|
|
|
public function setAddress($address) |
153
|
|
|
{ |
154
|
|
|
$this->address = new AddressEntity($address); |
155
|
|
|
} |
156
|
|
|
|
157
|
|
|
/** |
158
|
|
|
* Sets Channel Set |
159
|
|
|
* |
160
|
|
|
* @param array $channelSet |
161
|
|
|
*/ |
162
|
|
|
public function setChannelSet($channelSet) |
163
|
|
|
{ |
164
|
|
|
$this->channelSet = new ChannelSetEntity($channelSet); |
165
|
|
|
} |
166
|
|
|
|
167
|
|
|
/** |
168
|
|
|
* Sets Payment Details |
169
|
|
|
* |
170
|
|
|
* @param array $paymentDetails |
171
|
|
|
*/ |
172
|
|
|
public function setPaymentDetails($paymentDetails) |
173
|
|
|
{ |
174
|
|
|
$this->paymentDetails = new PaymentDetailsEntity($paymentDetails); |
175
|
|
|
} |
176
|
|
|
|
177
|
|
|
/** |
178
|
|
|
* @param \stdClass|array $details |
179
|
|
|
*/ |
180
|
|
|
public function setPaymentDetailsArray($details) |
181
|
|
|
{ |
182
|
|
|
if ($details instanceof \stdClass) { |
183
|
|
|
$details = (array) $details; |
184
|
|
|
} |
185
|
|
|
$this->paymentDetailsArray = $details; |
186
|
|
|
} |
187
|
|
|
} |
188
|
|
|
|