1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Audiens\DoubleclickClient\entity; |
4
|
|
|
|
5
|
|
|
class UserListClient |
6
|
|
|
{ |
7
|
|
|
use HydratableTrait; |
8
|
|
|
|
9
|
|
|
public const STATUS_ACTIVE = 'ACTIVE'; |
10
|
|
|
public const STATUS_INACTIVE = 'INACTIVE'; |
11
|
|
|
public const STATUS_UNKNOWN = 'UNKNOWN'; |
12
|
|
|
|
13
|
|
|
/** @var string @required */ |
14
|
|
|
protected $userlistid; |
15
|
|
|
|
16
|
|
|
/** @var string|null */ |
17
|
|
|
protected $clientcustomername; |
18
|
|
|
|
19
|
|
|
/** @var string @required */ |
20
|
|
|
protected $status; |
21
|
|
|
|
22
|
|
|
/** @var string|null */ |
23
|
|
|
protected $userlistname; |
24
|
|
|
|
25
|
|
|
/** @var UserListPricing|null */ |
26
|
|
|
protected $pricingInfo; |
27
|
|
|
|
28
|
|
|
/** @var string @required */ |
29
|
|
|
protected $clientproduct; |
30
|
|
|
|
31
|
|
|
/** @var string @required */ |
32
|
|
|
protected $clientid; |
33
|
|
|
|
34
|
|
|
public function setUserlistid(string $userlistid): void |
35
|
|
|
{ |
36
|
|
|
$this->userlistid = $userlistid; |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
public function setStatus(string $status): void |
40
|
|
|
{ |
41
|
|
|
$this->status = $status; |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
public function getStatus(): string |
45
|
|
|
{ |
46
|
|
|
return $this->status; |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
public function setUserlistname(string $userlistname): void |
50
|
|
|
{ |
51
|
|
|
$this->userlistname = $userlistname; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
public function setPricingInfo(UserListPricing $pricingInfo): void |
55
|
|
|
{ |
56
|
|
|
$this->pricingInfo = $pricingInfo; |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
public function setClientproduct(string $clientproduct): void |
60
|
|
|
{ |
61
|
|
|
$this->clientproduct = $clientproduct; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
public function setClientid(string $clientid): void |
65
|
|
|
{ |
66
|
|
|
$this->clientid = $clientid; |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
public function getUserlistid(): string |
70
|
|
|
{ |
71
|
|
|
return $this->userlistid; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
public function getClientcustomername(): ?string |
75
|
|
|
{ |
76
|
|
|
return $this->clientcustomername; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
public function getUserlistname(): ?string |
80
|
|
|
{ |
81
|
|
|
return $this->userlistname; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
public function getPricingInfo(): ?UserListPricing |
85
|
|
|
{ |
86
|
|
|
return $this->pricingInfo; |
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
public function getClientproduct(): string |
90
|
|
|
{ |
91
|
|
|
return $this->clientproduct; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
public function getClientid(): string |
95
|
|
|
{ |
96
|
|
|
return $this->clientid; |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
public static function preProcess(array $objectArray): array |
100
|
|
|
{ |
101
|
|
|
if (isset($objectArray['clientcustomername']) && \is_array($objectArray['clientcustomername'])) { |
102
|
|
|
$objectArray['clientcustomername'] = implode(',', $objectArray['clientcustomername']) ?? ''; |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
if (array_key_exists('pricinginfo', $objectArray)) { |
106
|
|
|
$objectArray['pricingInfo'] = UserListPricing::fromArray($objectArray['pricinginfo']); |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
return $objectArray; |
110
|
|
|
} |
111
|
|
|
} |
112
|
|
|
|