commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
CustomerEmailTokenReferenceModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
17 use stdClass;
18 
23 {
24  public const DISCRIMINATOR_VALUE = 'customer-email-token';
29  protected $typeId;
30 
35  protected $id;
36 
37 
41  public function __construct(
42  ?string $id = null,
43  ?string $typeId = null
44  ) {
45  $this->id = $id;
46  $this->typeId = $typeId ?? self::DISCRIMINATOR_VALUE;
47  }
48 
55  public function getTypeId()
56  {
57  if (is_null($this->typeId)) {
59  $data = $this->raw(self::FIELD_TYPE_ID);
60  if (is_null($data)) {
61  return null;
62  }
63  $this->typeId = (string) $data;
64  }
65 
66  return $this->typeId;
67  }
68 
75  public function getId()
76  {
77  if (is_null($this->id)) {
79  $data = $this->raw(self::FIELD_ID);
80  if (is_null($data)) {
81  return null;
82  }
83  $this->id = (string) $data;
84  }
85 
86  return $this->id;
87  }
88 
89 
93  public function setId(?string $id): void
94  {
95  $this->id = $id;
96  }
97 }