|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types = 1); |
|
4
|
|
|
|
|
5
|
|
|
namespace Korobovn\CloudPayments\Message\Request\Model; |
|
6
|
|
|
|
|
7
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\IdString; |
|
8
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\PeriodIntNull; |
|
9
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\AmountFloatNull; |
|
10
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\MaxPeriodsIntNull; |
|
11
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\CurrencyStringNull; |
|
12
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\IntervalStringNull; |
|
13
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\StartDateStringNull; |
|
14
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\DescriptionStringNull; |
|
15
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\CustomerReceiptStringNull; |
|
16
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\RequireConfirmationBoolNull; |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* @see https://developers.cloudpayments.ru/#izmenenie-podpiski-na-rekurrentnye-platezhi |
|
20
|
|
|
*/ |
|
21
|
|
|
class UpdateSubscriptionModel extends AbstractModel |
|
22
|
|
|
{ |
|
23
|
|
|
use IdString, |
|
24
|
|
|
DescriptionStringNull, |
|
25
|
|
|
AmountFloatNull, |
|
26
|
|
|
CurrencyStringNull, |
|
27
|
|
|
RequireConfirmationBoolNull, |
|
28
|
|
|
StartDateStringNull, |
|
29
|
|
|
IntervalStringNull, |
|
30
|
|
|
PeriodIntNull, |
|
31
|
|
|
MaxPeriodsIntNull, |
|
32
|
|
|
CustomerReceiptStringNull; |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* {@inheritDoc} |
|
36
|
|
|
*/ |
|
37
|
|
|
public function toArray(): array |
|
38
|
|
|
{ |
|
39
|
|
|
return [ |
|
40
|
|
|
'Id' => $this->getId(), |
|
41
|
|
|
'Description' => $this->getDescription(), |
|
42
|
|
|
'Amount' => $this->getAmount(), |
|
43
|
|
|
'Currency' => $this->getCurrency(), |
|
44
|
|
|
'RequireConfirmation' => $this->isRequireConfirmation(), |
|
45
|
|
|
'StartDate' => $this->getStartDate(), |
|
46
|
|
|
'Interval' => $this->getInterval(), |
|
47
|
|
|
'Period' => $this->getPeriod(), |
|
48
|
|
|
'MaxPeriods' => $this->getMaxPeriods(), |
|
49
|
|
|
'CustomerReceipt' => $this->getCustomerReceipt(), |
|
50
|
|
|
]; |
|
51
|
|
|
} |
|
52
|
|
|
} |
|
53
|
|
|
|