3declare(strict_types=1);
175 if (is_null($this->
id)) {
177 $data = $this->
raw(self::FIELD_ID);
178 if (is_null($data)) {
181 $this->
id = (string) $data;
195 if (is_null($this->version)) {
197 $data = $this->
raw(self::FIELD_VERSION);
198 if (is_null($data)) {
201 $this->version = (int) $data;
215 if (is_null($this->createdAt)) {
217 $data = $this->
raw(self::FIELD_CREATED_AT);
218 if (is_null($data)) {
221 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
222 if (
false === $data) {
225 $this->createdAt = $data;
239 if (is_null($this->lastModifiedAt)) {
241 $data = $this->
raw(self::FIELD_LAST_MODIFIED_AT);
242 if (is_null($data)) {
245 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
246 if (
false === $data) {
249 $this->lastModifiedAt = $data;
263 if (is_null($this->lastModifiedBy)) {
265 $data = $this->
raw(self::FIELD_LAST_MODIFIED_BY);
266 if (is_null($data)) {
270 $this->lastModifiedBy = LastModifiedByModel::of($data);
284 if (is_null($this->createdBy)) {
286 $data = $this->
raw(self::FIELD_CREATED_BY);
287 if (is_null($data)) {
291 $this->createdBy = CreatedByModel::of($data);
306 if (is_null($this->sequenceNumber)) {
308 $data = $this->
raw(self::FIELD_SEQUENCE_NUMBER);
309 if (is_null($data)) {
312 $this->sequenceNumber = (int) $data;
326 if (is_null($this->resource)) {
328 $data = $this->
raw(self::FIELD_RESOURCE);
329 if (is_null($data)) {
332 $className = ReferenceModel::resolveDiscriminatorClass($data);
333 $this->resource = $className::of($data);
347 if (is_null($this->resourceVersion)) {
349 $data = $this->
raw(self::FIELD_RESOURCE_VERSION);
350 if (is_null($data)) {
353 $this->resourceVersion = (int) $data;
367 if (is_null($this->type)) {
369 $data = $this->
raw(self::FIELD_TYPE);
370 if (is_null($data)) {
373 $this->type = (string) $data;
387 if (is_null($this->resourceUserProvidedIdentifiers)) {
389 $data = $this->
raw(self::FIELD_RESOURCE_USER_PROVIDED_IDENTIFIERS);
390 if (is_null($data)) {
408 if (is_null($this->cartId)) {
410 $data = $this->
raw(self::FIELD_CART_ID);
411 if (is_null($data)) {
414 $this->cartId = (string) $data;
428 if (is_null($this->failedAt)) {
430 $data = $this->
raw(self::FIELD_FAILED_AT);
431 if (is_null($data)) {
434 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
435 if (
false === $data) {
438 $this->failedAt = $data;
452 if (is_null($this->failureReason)) {
454 $data = $this->
raw(self::FIELD_FAILURE_REASON);
455 if (is_null($data)) {
458 $this->failureReason = (string) $data;
472 if (is_null($this->orderScheduledAt)) {
474 $data = $this->
raw(self::FIELD_ORDER_SCHEDULED_AT);
475 if (is_null($data)) {
478 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
479 if (
false === $data) {
482 $this->orderScheduledAt = $data;
496 if (is_null($this->errors)) {
498 $data = $this->
raw(self::FIELD_ERRORS);
499 if (is_null($data)) {
502 $this->errors = RecurringOrderFailureErrorCollection::fromArray($data);
630 #[\ReturnTypeWillChange]
649 return (
object) $data;