commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
VariantBulkUpdateItemModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
26 protected $id;
27
32 protected $key;
33
38 protected $version;
39
40
44 public function __construct(
45 ?string $id = null,
46 ?string $key = null,
47 ?int $version = null
48 ) {
49 $this->id = $id;
50 $this->key = $key;
51 $this->version = $version;
52 }
53
60 public function getId()
61 {
62 if (is_null($this->id)) {
64 $data = $this->raw(self::FIELD_ID);
65 if (is_null($data)) {
66 return null;
67 }
68 $this->id = (string) $data;
69 }
70
71 return $this->id;
72 }
73
80 public function getKey()
81 {
82 if (is_null($this->key)) {
84 $data = $this->raw(self::FIELD_KEY);
85 if (is_null($data)) {
86 return null;
87 }
88 $this->key = (string) $data;
89 }
90
91 return $this->key;
92 }
93
102 public function getVersion()
103 {
104 if (is_null($this->version)) {
106 $data = $this->raw(self::FIELD_VERSION);
107 if (is_null($data)) {
108 return null;
109 }
110 $this->version = (int) $data;
111 }
112
113 return $this->version;
114 }
115
116
120 public function setId(?string $id): void
121 {
122 $this->id = $id;
123 }
124
128 public function setKey(?string $key): void
129 {
130 $this->key = $key;
131 }
132
136 public function setVersion(?int $version): void
137 {
138 $this->version = $version;
139 }
140}
__construct(?string $id=null, ?string $key=null, ?int $version=null)