3 declare(strict_types=1);
51 use DateTimeImmutable;
339 if (is_null($this->
id)) {
341 $data = $this->
raw(self::FIELD_ID);
342 if (is_null($data)) {
345 $this->
id = (string) $data;
359 if (is_null($this->version)) {
361 $data = $this->
raw(self::FIELD_VERSION);
362 if (is_null($data)) {
365 $this->version = (int) $data;
379 if (is_null($this->createdAt)) {
381 $data = $this->
raw(self::FIELD_CREATED_AT);
382 if (is_null($data)) {
386 if (
false === $data) {
389 $this->createdAt = $data;
403 if (is_null($this->lastModifiedAt)) {
405 $data = $this->
raw(self::FIELD_LAST_MODIFIED_AT);
406 if (is_null($data)) {
410 if (
false === $data) {
413 $this->lastModifiedAt = $data;
427 if (is_null($this->key)) {
429 $data = $this->
raw(self::FIELD_KEY);
430 if (is_null($data)) {
433 $this->key = (string) $data;
447 if (is_null($this->lastModifiedBy)) {
449 $data = $this->
raw(self::FIELD_LAST_MODIFIED_BY);
450 if (is_null($data)) {
468 if (is_null($this->createdBy)) {
470 $data = $this->
raw(self::FIELD_CREATED_BY);
471 if (is_null($data)) {
489 if (is_null($this->quoteRequestState)) {
491 $data = $this->
raw(self::FIELD_QUOTE_REQUEST_STATE);
492 if (is_null($data)) {
495 $this->quoteRequestState = (string) $data;
509 if (is_null($this->comment)) {
511 $data = $this->
raw(self::FIELD_COMMENT);
512 if (is_null($data)) {
515 $this->comment = (string) $data;
529 if (is_null($this->customer)) {
531 $data = $this->
raw(self::FIELD_CUSTOMER);
532 if (is_null($data)) {
552 if (is_null($this->customerGroup)) {
554 $data = $this->
raw(self::FIELD_CUSTOMER_GROUP);
555 if (is_null($data)) {
573 if (is_null($this->store)) {
575 $data = $this->
raw(self::FIELD_STORE);
576 if (is_null($data)) {
594 if (is_null($this->lineItems)) {
596 $data = $this->
raw(self::FIELD_LINE_ITEMS);
597 if (is_null($data)) {
614 if (is_null($this->customLineItems)) {
616 $data = $this->
raw(self::FIELD_CUSTOM_LINE_ITEMS);
617 if (is_null($data)) {
635 if (is_null($this->totalPrice)) {
637 $data = $this->
raw(self::FIELD_TOTAL_PRICE);
638 if (is_null($data)) {
642 $this->totalPrice = $className::of($data);
658 if (is_null($this->taxedPrice)) {
660 $data = $this->
raw(self::FIELD_TAXED_PRICE);
661 if (is_null($data)) {
680 if (is_null($this->shippingAddress)) {
682 $data = $this->
raw(self::FIELD_SHIPPING_ADDRESS);
683 if (is_null($data)) {
701 if (is_null($this->billingAddress)) {
703 $data = $this->
raw(self::FIELD_BILLING_ADDRESS);
704 if (is_null($data)) {
722 if (is_null($this->inventoryMode)) {
724 $data = $this->
raw(self::FIELD_INVENTORY_MODE);
725 if (is_null($data)) {
728 $this->inventoryMode = (string) $data;
742 if (is_null($this->taxMode)) {
744 $data = $this->
raw(self::FIELD_TAX_MODE);
745 if (is_null($data)) {
748 $this->taxMode = (string) $data;
762 if (is_null($this->taxRoundingMode)) {
764 $data = $this->
raw(self::FIELD_TAX_ROUNDING_MODE);
765 if (is_null($data)) {
768 $this->taxRoundingMode = (string) $data;
782 if (is_null($this->taxCalculationMode)) {
784 $data = $this->
raw(self::FIELD_TAX_CALCULATION_MODE);
785 if (is_null($data)) {
788 $this->taxCalculationMode = (string) $data;
802 if (is_null($this->country)) {
804 $data = $this->
raw(self::FIELD_COUNTRY);
805 if (is_null($data)) {
808 $this->country = (string) $data;
822 if (is_null($this->shippingInfo)) {
824 $data = $this->
raw(self::FIELD_SHIPPING_INFO);
825 if (is_null($data)) {
843 if (is_null($this->paymentInfo)) {
845 $data = $this->
raw(self::FIELD_PAYMENT_INFO);
846 if (is_null($data)) {
864 if (is_null($this->shippingRateInput)) {
866 $data = $this->
raw(self::FIELD_SHIPPING_RATE_INPUT);
867 if (is_null($data)) {
871 $this->shippingRateInput = $className::of($data);
888 if (is_null($this->itemShippingAddresses)) {
890 $data = $this->
raw(self::FIELD_ITEM_SHIPPING_ADDRESSES);
891 if (is_null($data)) {
908 if (is_null($this->directDiscounts)) {
910 $data = $this->
raw(self::FIELD_DIRECT_DISCOUNTS);
911 if (is_null($data)) {
928 if (is_null($this->custom)) {
930 $data = $this->
raw(self::FIELD_CUSTOM);
931 if (is_null($data)) {
950 if (is_null($this->state)) {
952 $data = $this->
raw(self::FIELD_STATE);
953 if (is_null($data)) {
972 if (is_null($this->purchaseOrderNumber)) {
974 $data = $this->
raw(self::FIELD_PURCHASE_ORDER_NUMBER);
975 if (is_null($data)) {
978 $this->purchaseOrderNumber = (string) $data;
992 if (is_null($this->cart)) {
994 $data = $this->
raw(self::FIELD_CART);
995 if (is_null($data)) {
1013 if (is_null($this->businessUnit)) {
1015 $data = $this->
raw(self::FIELD_BUSINESS_UNIT);
1016 if (is_null($data)) {
1280 $this->cart =
$cart;
1292 #[\ReturnTypeWillChange]
1303 return (
object) $data;