3 declare(strict_types=1);
22 use DateTimeImmutable;
116 ?
string $code =
null,
150 if (is_null($this->key)) {
152 $data = $this->
raw(self::FIELD_KEY);
153 if (is_null($data)) {
156 $this->key = (string) $data;
170 if (is_null($this->name)) {
172 $data = $this->
raw(self::FIELD_NAME);
173 if (is_null($data)) {
191 if (is_null($this->description)) {
193 $data = $this->
raw(self::FIELD_DESCRIPTION);
194 if (is_null($data)) {
213 if (is_null($this->code)) {
215 $data = $this->
raw(self::FIELD_CODE);
216 if (is_null($data)) {
219 $this->code = (string) $data;
233 if (is_null($this->cartDiscounts)) {
235 $data = $this->
raw(self::FIELD_CART_DISCOUNTS);
236 if (is_null($data)) {
253 if (is_null($this->cartPredicate)) {
255 $data = $this->
raw(self::FIELD_CART_PREDICATE);
256 if (is_null($data)) {
259 $this->cartPredicate = (string) $data;
273 if (is_null($this->isActive)) {
275 $data = $this->
raw(self::FIELD_IS_ACTIVE);
276 if (is_null($data)) {
279 $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;
313 if (is_null($this->maxApplicationsPerCustomer)) {
315 $data = $this->
raw(self::FIELD_MAX_APPLICATIONS_PER_CUSTOMER);
316 if (is_null($data)) {
319 $this->maxApplicationsPerCustomer = (int) $data;
333 if (is_null($this->groups)) {
335 $data = $this->
raw(self::FIELD_GROUPS);
336 if (is_null($data)) {
339 $this->groups = $data;
353 if (is_null($this->validFrom)) {
355 $data = $this->
raw(self::FIELD_VALID_FROM);
356 if (is_null($data)) {
360 if (
false === $data) {
363 $this->validFrom = $data;
377 if (is_null($this->validUntil)) {
379 $data = $this->
raw(self::FIELD_VALID_UNTIL);
380 if (is_null($data)) {
384 if (
false === $data) {
387 $this->validUntil = $data;
401 if (is_null($this->custom)) {
403 $data = $this->
raw(self::FIELD_CUSTOM);
404 if (is_null($data)) {
520 #[\ReturnTypeWillChange]
531 return (
object) $data;