commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CustomerCreateEmailTokenModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
26 protected $id;
27
32 protected $version;
33
38 protected $ttlMinutes;
39
45
46
50 public function __construct(
51 ?string $id = null,
52 ?int $version = null,
53 ?int $ttlMinutes = null,
54 ?bool $invalidateOlderTokens = null
55 ) {
56 $this->id = $id;
57 $this->version = $version;
58 $this->ttlMinutes = $ttlMinutes;
59 $this->invalidateOlderTokens = $invalidateOlderTokens;
60 }
61
68 public function getId()
69 {
70 if (is_null($this->id)) {
72 $data = $this->raw(self::FIELD_ID);
73 if (is_null($data)) {
74 return null;
75 }
76 $this->id = (string) $data;
77 }
78
79 return $this->id;
80 }
81
88 public function getVersion()
89 {
90 if (is_null($this->version)) {
92 $data = $this->raw(self::FIELD_VERSION);
93 if (is_null($data)) {
94 return null;
95 }
96 $this->version = (int) $data;
97 }
98
99 return $this->version;
100 }
101
108 public function getTtlMinutes()
109 {
110 if (is_null($this->ttlMinutes)) {
112 $data = $this->raw(self::FIELD_TTL_MINUTES);
113 if (is_null($data)) {
114 return null;
115 }
116 $this->ttlMinutes = (int) $data;
117 }
118
119 return $this->ttlMinutes;
120 }
121
128 public function getInvalidateOlderTokens()
129 {
130 if (is_null($this->invalidateOlderTokens)) {
132 $data = $this->raw(self::FIELD_INVALIDATE_OLDER_TOKENS);
133 if (is_null($data)) {
134 return null;
135 }
136 $this->invalidateOlderTokens = (bool) $data;
137 }
138
140 }
141
142
146 public function setId(?string $id): void
147 {
148 $this->id = $id;
149 }
150
154 public function setVersion(?int $version): void
155 {
156 $this->version = $version;
157 }
158
162 public function setTtlMinutes(?int $ttlMinutes): void
163 {
164 $this->ttlMinutes = $ttlMinutes;
165 }
166
171 {
172 $this->invalidateOlderTokens = $invalidateOlderTokens;
173 }
174}
__construct(?string $id=null, ?int $version=null, ?int $ttlMinutes=null, ?bool $invalidateOlderTokens=null)