1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* PHP version 5.4 and 7 |
4
|
|
|
* |
5
|
|
|
* @package Payever\ThirdParty |
6
|
|
|
* @author Hennadii.Shymanskyi <[email protected]> |
7
|
|
|
* @copyright 2017-2019 payever GmbH |
8
|
|
|
* @license MIT <https://opensource.org/licenses/MIT> |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace Payever\ExternalIntegration\ThirdParty\Http\RequestEntity; |
12
|
|
|
|
13
|
|
|
use Payever\ExternalIntegration\Core\Http\RequestEntity; |
14
|
|
|
use Payever\ExternalIntegration\ThirdParty\Http\MessageEntity\SubscriptionActionEntity; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* PHP version 5.4 and 7 |
18
|
|
|
* |
19
|
|
|
* @package Payever\ThirdParty |
20
|
|
|
* @author Hennadii.Shymanskyi <[email protected]> |
21
|
|
|
* @copyright 2017-2019 payever GmbH |
22
|
|
|
* @license MIT <https://opensource.org/licenses/MIT> |
23
|
|
|
* |
24
|
|
|
* @method string getExternalId() |
25
|
|
|
* @method string getThirdPartyName() |
26
|
|
|
* @method string getBusinessUuid() |
27
|
|
|
* @method SubscriptionActionEntity[] getActions() |
28
|
|
|
* @method self setExternalId(string $externalId) |
29
|
|
|
* @method self setThirdPartyName(string $name) |
30
|
|
|
* @method self setBusinessUuid(string $businessUuid) |
31
|
|
|
* @method self setActions(SubscriptionActionEntity[] $actions) |
32
|
|
|
*/ |
33
|
|
|
class SubscriptionRequestEntity extends RequestEntity |
34
|
|
|
{ |
35
|
|
|
const UNDERSCORE_ON_SERIALIZATION = false; |
36
|
|
|
|
37
|
|
|
/** @var string */ |
38
|
|
|
protected $businessUuid; |
39
|
|
|
|
40
|
|
|
/** @var string */ |
41
|
|
|
protected $externalId; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @see \Payever\ExternalIntegration\Core\Enum\ChannelSet |
45
|
|
|
* |
46
|
|
|
* @var string |
47
|
|
|
*/ |
48
|
|
|
protected $thirdPartyName; |
49
|
|
|
|
50
|
|
|
/** @var SubscriptionActionEntity[] */ |
51
|
|
|
protected $actions = array(); |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @param SubscriptionActionEntity $actionEntity |
55
|
|
|
* |
56
|
|
|
* @return static |
57
|
|
|
*/ |
58
|
|
|
public function addAction(SubscriptionActionEntity $actionEntity) |
59
|
|
|
{ |
60
|
|
|
$this->actions[] = $actionEntity; |
61
|
|
|
|
62
|
|
|
return $this; |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* @return array |
67
|
|
|
*/ |
68
|
|
|
public function getRequired() |
69
|
|
|
{ |
70
|
|
|
return array( |
71
|
|
|
'businessUuid', |
72
|
|
|
'externalId', |
73
|
|
|
'thirdPartyName', |
74
|
|
|
); |
75
|
|
|
} |
76
|
|
|
} |
77
|
|
|
|