3declare(strict_types=1);
109 if (is_null($this->key)) {
111 $data = $this->
raw(self::FIELD_KEY);
112 if (is_null($data)) {
115 $this->key = (string) $data;
129 if (is_null($this->sku)) {
131 $data = $this->
raw(self::FIELD_SKU);
132 if (is_null($data)) {
135 $this->sku = (string) $data;
149 if (is_null($this->quantityOnStock)) {
151 $data = $this->
raw(self::FIELD_QUANTITY_ON_STOCK);
152 if (is_null($data)) {
155 $this->quantityOnStock = (int) $data;
169 if (is_null($this->restockableInDays)) {
171 $data = $this->
raw(self::FIELD_RESTOCKABLE_IN_DAYS);
172 if (is_null($data)) {
175 $this->restockableInDays = (int) $data;
189 if (is_null($this->expectedDelivery)) {
191 $data = $this->
raw(self::FIELD_EXPECTED_DELIVERY);
192 if (is_null($data)) {
195 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
196 if (
false === $data) {
199 $this->expectedDelivery = $data;
213 if (is_null($this->reservationExpirationInMinutes)) {
215 $data = $this->
raw(self::FIELD_RESERVATION_EXPIRATION_IN_MINUTES);
216 if (is_null($data)) {
219 $this->reservationExpirationInMinutes = (int) $data;
233 if (is_null($this->supplyChannel)) {
235 $data = $this->
raw(self::FIELD_SUPPLY_CHANNEL);
236 if (is_null($data)) {
254 if (is_null($this->custom)) {
256 $data = $this->
raw(self::FIELD_CUSTOM);
257 if (is_null($data)) {
261 $this->custom = CustomModel::of($data);
333 #[\ReturnTypeWillChange]
340 return (
object) $data;