commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ValidFromAndUntilValueModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
22
23
28 protected $validFrom;
29
34 protected $validUntil;
35
36
40 public function __construct(
41 ?string $validFrom = null,
42 ?string $validUntil = null
43 ) {
44 $this->validFrom = $validFrom;
45 $this->validUntil = $validUntil;
46
47 }
48
55 public function getValidFrom()
56 {
57 if (is_null($this->validFrom)) {
59 $data = $this->raw(self::FIELD_VALID_FROM);
60 if (is_null($data)) {
61 return null;
62 }
63 $this->validFrom = (string) $data;
64 }
65
66 return $this->validFrom;
67 }
68
75 public function getValidUntil()
76 {
77 if (is_null($this->validUntil)) {
79 $data = $this->raw(self::FIELD_VALID_UNTIL);
80 if (is_null($data)) {
81 return null;
82 }
83 $this->validUntil = (string) $data;
84 }
85
86 return $this->validUntil;
87 }
88
89
93 public function setValidFrom(?string $validFrom): void
94 {
95 $this->validFrom = $validFrom;
96 }
97
101 public function setValidUntil(?string $validUntil): void
102 {
103 $this->validUntil = $validUntil;
104 }
105
106
107
108}