3 declare(strict_types=1);
20 use DateTimeImmutable;
114 ?
string $code =
null,
149 if (is_null($this->key)) {
151 $data = $this->
raw(self::FIELD_KEY);
152 if (is_null($data)) {
155 $this->key = (string) $data;
169 if (is_null($this->name)) {
171 $data = $this->
raw(self::FIELD_NAME);
172 if (is_null($data)) {
190 if (is_null($this->description)) {
192 $data = $this->
raw(self::FIELD_DESCRIPTION);
193 if (is_null($data)) {
212 if (is_null($this->code)) {
214 $data = $this->
raw(self::FIELD_CODE);
215 if (is_null($data)) {
218 $this->code = (string) $data;
232 if (is_null($this->cartDiscounts)) {
234 $data = $this->
raw(self::FIELD_CART_DISCOUNTS);
235 if (is_null($data)) {
252 if (is_null($this->cartPredicate)) {
254 $data = $this->
raw(self::FIELD_CART_PREDICATE);
255 if (is_null($data)) {
258 $this->cartPredicate = (string) $data;
272 if (is_null($this->isActive)) {
274 $data = $this->
raw(self::FIELD_IS_ACTIVE);
275 if (is_null($data)) {
278 $this->isActive = (bool) $data;
293 if (is_null($this->maxApplications)) {
295 $data = $this->
raw(self::FIELD_MAX_APPLICATIONS);
296 if (is_null($data)) {
299 $this->maxApplications = (int) $data;
314 if (is_null($this->maxApplicationsPerCustomer)) {
316 $data = $this->
raw(self::FIELD_MAX_APPLICATIONS_PER_CUSTOMER);
317 if (is_null($data)) {
320 $this->maxApplicationsPerCustomer = (int) $data;
334 if (is_null($this->custom)) {
336 $data = $this->
raw(self::FIELD_CUSTOM);
337 if (is_null($data)) {
355 if (is_null($this->groups)) {
357 $data = $this->
raw(self::FIELD_GROUPS);
358 if (is_null($data)) {
361 $this->groups = $data;
375 if (is_null($this->validFrom)) {
377 $data = $this->
raw(self::FIELD_VALID_FROM);
378 if (is_null($data)) {
382 if (
false === $data) {
385 $this->validFrom = $data;
399 if (is_null($this->validUntil)) {
401 $data = $this->
raw(self::FIELD_VALID_UNTIL);
402 if (is_null($data)) {
406 if (
false === $data) {
409 $this->validUntil = $data;
521 #[\ReturnTypeWillChange]
532 return (
object) $data;