commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
ChangeValue
ValidFromAndUntilValueModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\ChangeValue
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
ValidFromAndUntilValueModel
extends
JsonObjectModel
implements
ValidFromAndUntilValue
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
}
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition:
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\History\Models\ChangeValue\ValidFromAndUntilValueModel
Definition:
ValidFromAndUntilValueModel.php:21
Commercetools\History\Models\ChangeValue\ValidFromAndUntilValueModel\__construct
__construct(?string $validFrom=null, ?string $validUntil=null)
Definition:
ValidFromAndUntilValueModel.php:40
Commercetools\History\Models\ChangeValue\ValidFromAndUntilValueModel\$validUntil
$validUntil
Definition:
ValidFromAndUntilValueModel.php:34
Commercetools\History\Models\ChangeValue\ValidFromAndUntilValueModel\setValidFrom
setValidFrom(?string $validFrom)
Definition:
ValidFromAndUntilValueModel.php:93
Commercetools\History\Models\ChangeValue\ValidFromAndUntilValueModel\$validFrom
$validFrom
Definition:
ValidFromAndUntilValueModel.php:28
Commercetools\History\Models\ChangeValue\ValidFromAndUntilValueModel\getValidUntil
getValidUntil()
Definition:
ValidFromAndUntilValueModel.php:75
Commercetools\History\Models\ChangeValue\ValidFromAndUntilValueModel\setValidUntil
setValidUntil(?string $validUntil)
Definition:
ValidFromAndUntilValueModel.php:101
Commercetools\History\Models\ChangeValue\ValidFromAndUntilValueModel\getValidFrom
getValidFrom()
Definition:
ValidFromAndUntilValueModel.php:55
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\ChangeValue\ValidFromAndUntilValue
Definition:
ValidFromAndUntilValue.php:15
Commercetools\History\Models\ChangeValue
Definition:
AssetChangeValue.php:9
Generated by
1.9.1