|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* @author SignpostMarv |
|
4
|
|
|
*/ |
|
5
|
|
|
declare(strict_types=1); |
|
6
|
|
|
|
|
7
|
|
|
namespace SignpostMarv\DaftObject\SchemaOrg\DaftObjectTraits; |
|
8
|
|
|
|
|
9
|
|
|
use SignpostMarv\DaftObject\SchemaOrg\GeoShape; |
|
10
|
|
|
use SignpostMarv\DaftObject\SchemaOrg\Intangible\Enumeration\BusinessEntityType; |
|
11
|
|
|
use SignpostMarv\DaftObject\SchemaOrg\Intangible\StructuredValue\PriceSpecification; |
|
12
|
|
|
use SignpostMarv\DaftObject\SchemaOrg\Intangible\StructuredValue\QuantitativeValue; |
|
13
|
|
|
use SignpostMarv\DaftObject\SchemaOrg\Place; |
|
14
|
|
|
use SignpostMarv\DaftObject\SchemaOrg\Thing; |
|
15
|
|
|
use SignpostMarv\DaftObject\SchemaOrg\TypeUtilities; |
|
16
|
|
|
|
|
17
|
|
|
trait EligibleCustomerTypeAndDurationAndQuantityAndRegionAndTransactionVolumeAndIneligibleRegion |
|
18
|
|
|
{ |
|
19
|
|
|
use DaftObjectTrait; |
|
20
|
|
|
|
|
21
|
|
|
/** |
|
22
|
|
|
* @return array<int, BusinessEntityType> |
|
23
|
|
|
*/ |
|
24
|
48 |
|
public function GetEligibleCustomerType() : array |
|
25
|
|
|
{ |
|
26
|
|
|
/** |
|
27
|
|
|
* @var array<int, BusinessEntityType> |
|
28
|
|
|
*/ |
|
29
|
48 |
|
$out = TypeUtilities::ExpectRetrievedValueIsArray( |
|
30
|
48 |
|
'eligibleCustomerType', |
|
31
|
48 |
|
$this->RetrievePropertyValueFromData('eligibleCustomerType'), |
|
32
|
48 |
|
static::class |
|
33
|
|
|
); |
|
34
|
|
|
|
|
35
|
48 |
|
return $out; |
|
36
|
|
|
} |
|
37
|
|
|
|
|
38
|
|
|
/** |
|
39
|
|
|
* @param array<int, BusinessEntityType> $value |
|
40
|
|
|
*/ |
|
41
|
2 |
|
public function SetEligibleCustomerType(array $value) : void |
|
42
|
|
|
{ |
|
43
|
2 |
|
$this->NudgePropertyValue( |
|
44
|
2 |
|
'eligibleCustomerType', |
|
45
|
2 |
|
$value |
|
46
|
|
|
); |
|
47
|
2 |
|
} |
|
48
|
|
|
|
|
49
|
|
|
/** |
|
50
|
|
|
* @return array<int, QuantitativeValue> |
|
51
|
|
|
*/ |
|
52
|
48 |
|
public function GetEligibleDuration() : array |
|
53
|
|
|
{ |
|
54
|
|
|
/** |
|
55
|
|
|
* @var array<int, QuantitativeValue> |
|
56
|
|
|
*/ |
|
57
|
48 |
|
$out = TypeUtilities::ExpectRetrievedValueIsArray( |
|
58
|
48 |
|
'eligibleDuration', |
|
59
|
48 |
|
$this->RetrievePropertyValueFromData('eligibleDuration'), |
|
60
|
48 |
|
static::class |
|
61
|
|
|
); |
|
62
|
|
|
|
|
63
|
48 |
|
return $out; |
|
64
|
|
|
} |
|
65
|
|
|
|
|
66
|
|
|
/** |
|
67
|
|
|
* @param array<int, QuantitativeValue> $value |
|
68
|
|
|
*/ |
|
69
|
2 |
|
public function SetEligibleDuration(array $value) : void |
|
70
|
|
|
{ |
|
71
|
2 |
|
$this->NudgePropertyValue( |
|
72
|
2 |
|
'eligibleDuration', |
|
73
|
2 |
|
$value |
|
74
|
|
|
); |
|
75
|
2 |
|
} |
|
76
|
|
|
|
|
77
|
|
|
/** |
|
78
|
|
|
* @return array<int, QuantitativeValue> |
|
79
|
|
|
*/ |
|
80
|
48 |
|
public function GetEligibleQuantity() : array |
|
81
|
|
|
{ |
|
82
|
|
|
/** |
|
83
|
|
|
* @var array<int, QuantitativeValue> |
|
84
|
|
|
*/ |
|
85
|
48 |
|
$out = TypeUtilities::ExpectRetrievedValueIsArray( |
|
86
|
48 |
|
'eligibleQuantity', |
|
87
|
48 |
|
$this->RetrievePropertyValueFromData('eligibleQuantity'), |
|
88
|
48 |
|
static::class |
|
89
|
|
|
); |
|
90
|
|
|
|
|
91
|
48 |
|
return $out; |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* @param array<int, QuantitativeValue> $value |
|
96
|
|
|
*/ |
|
97
|
2 |
|
public function SetEligibleQuantity(array $value) : void |
|
98
|
|
|
{ |
|
99
|
2 |
|
$this->NudgePropertyValue( |
|
100
|
2 |
|
'eligibleQuantity', |
|
101
|
2 |
|
$value |
|
102
|
|
|
); |
|
103
|
2 |
|
} |
|
104
|
|
|
|
|
105
|
|
|
/** |
|
106
|
|
|
* @return array<int, string|GeoShape|Place> |
|
107
|
|
|
*/ |
|
108
|
48 |
|
public function GetEligibleRegion() : array |
|
109
|
|
|
{ |
|
110
|
|
|
/** |
|
111
|
|
|
* @var array<int, string|GeoShape|Place> |
|
112
|
|
|
*/ |
|
113
|
48 |
|
$out = TypeUtilities::ExpectRetrievedValueIsArray( |
|
114
|
48 |
|
'eligibleRegion', |
|
115
|
48 |
|
$this->RetrievePropertyValueFromData('eligibleRegion'), |
|
116
|
48 |
|
static::class |
|
117
|
|
|
); |
|
118
|
|
|
|
|
119
|
48 |
|
return $out; |
|
120
|
|
|
} |
|
121
|
|
|
|
|
122
|
|
|
/** |
|
123
|
|
|
* @param array<int, string|GeoShape|Place> $value |
|
124
|
|
|
*/ |
|
125
|
2 |
|
public function SetEligibleRegion(array $value) : void |
|
126
|
|
|
{ |
|
127
|
2 |
|
$this->NudgePropertyValue( |
|
128
|
2 |
|
'eligibleRegion', |
|
129
|
2 |
|
$value, |
|
130
|
2 |
|
Thing::BOOL_DEFAULT_AUTOTRIMSTRINGS |
|
131
|
|
|
); |
|
132
|
2 |
|
} |
|
133
|
|
|
|
|
134
|
|
|
/** |
|
135
|
|
|
* @return array<int, PriceSpecification> |
|
136
|
|
|
*/ |
|
137
|
48 |
|
public function GetEligibleTransactionVolume() : array |
|
138
|
|
|
{ |
|
139
|
|
|
/** |
|
140
|
|
|
* @var array<int, PriceSpecification> |
|
141
|
|
|
*/ |
|
142
|
48 |
|
$out = TypeUtilities::ExpectRetrievedValueIsArray( |
|
143
|
48 |
|
'eligibleTransactionVolume', |
|
144
|
48 |
|
$this->RetrievePropertyValueFromData('eligibleTransactionVolume'), |
|
145
|
48 |
|
static::class |
|
146
|
|
|
); |
|
147
|
|
|
|
|
148
|
48 |
|
return $out; |
|
149
|
|
|
} |
|
150
|
|
|
|
|
151
|
|
|
/** |
|
152
|
|
|
* @param array<int, PriceSpecification> $value |
|
153
|
|
|
*/ |
|
154
|
2 |
|
public function SetEligibleTransactionVolume(array $value) : void |
|
155
|
|
|
{ |
|
156
|
2 |
|
$this->NudgePropertyValue( |
|
157
|
2 |
|
'eligibleTransactionVolume', |
|
158
|
2 |
|
$value |
|
159
|
|
|
); |
|
160
|
2 |
|
} |
|
161
|
|
|
|
|
162
|
|
|
/** |
|
163
|
|
|
* @return array<int, string|GeoShape|Place> |
|
164
|
|
|
*/ |
|
165
|
48 |
|
public function GetIneligibleRegion() : array |
|
166
|
|
|
{ |
|
167
|
|
|
/** |
|
168
|
|
|
* @var array<int, string|GeoShape|Place> |
|
169
|
|
|
*/ |
|
170
|
48 |
|
$out = TypeUtilities::ExpectRetrievedValueIsArray( |
|
171
|
48 |
|
'ineligibleRegion', |
|
172
|
48 |
|
$this->RetrievePropertyValueFromData('ineligibleRegion'), |
|
173
|
48 |
|
static::class |
|
174
|
|
|
); |
|
175
|
|
|
|
|
176
|
48 |
|
return $out; |
|
177
|
|
|
} |
|
178
|
|
|
|
|
179
|
|
|
/** |
|
180
|
|
|
* @param array<int, string|GeoShape|Place> $value |
|
181
|
|
|
*/ |
|
182
|
2 |
|
public function SetIneligibleRegion(array $value) : void |
|
183
|
|
|
{ |
|
184
|
2 |
|
$this->NudgePropertyValue( |
|
185
|
2 |
|
'ineligibleRegion', |
|
186
|
2 |
|
$value, |
|
187
|
2 |
|
Thing::BOOL_DEFAULT_AUTOTRIMSTRINGS |
|
188
|
|
|
); |
|
189
|
2 |
|
} |
|
190
|
|
|
} |
|
191
|
|
|
|