commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
CustomerResetPasswordModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
21 {
26  protected $tokenValue;
27 
32  protected $newPassword;
33 
38  protected $version;
39 
40 
44  public function __construct(
45  ?string $tokenValue = null,
46  ?string $newPassword = null,
47  ?int $version = null
48  ) {
49  $this->tokenValue = $tokenValue;
50  $this->newPassword = $newPassword;
51  $this->version = $version;
52  }
53 
60  public function getTokenValue()
61  {
62  if (is_null($this->tokenValue)) {
64  $data = $this->raw(self::FIELD_TOKEN_VALUE);
65  if (is_null($data)) {
66  return null;
67  }
68  $this->tokenValue = (string) $data;
69  }
70 
71  return $this->tokenValue;
72  }
73 
80  public function getNewPassword()
81  {
82  if (is_null($this->newPassword)) {
84  $data = $this->raw(self::FIELD_NEW_PASSWORD);
85  if (is_null($data)) {
86  return null;
87  }
88  $this->newPassword = (string) $data;
89  }
90 
91  return $this->newPassword;
92  }
93 
100  public function getVersion()
101  {
102  if (is_null($this->version)) {
104  $data = $this->raw(self::FIELD_VERSION);
105  if (is_null($data)) {
106  return null;
107  }
108  $this->version = (int) $data;
109  }
110 
111  return $this->version;
112  }
113 
114 
118  public function setTokenValue(?string $tokenValue): void
119  {
120  $this->tokenValue = $tokenValue;
121  }
122 
126  public function setNewPassword(?string $newPassword): void
127  {
128  $this->newPassword = $newPassword;
129  }
130 
134  public function setVersion(?int $version): void
135  {
136  $this->version = $version;
137  }
138 }
__construct(?string $tokenValue=null, ?string $newPassword=null, ?int $version=null)