3 declare(strict_types=1);
56 use DateTimeImmutable;
488 if (is_null($this->
id)) {
490 $data = $this->
raw(self::FIELD_ID);
491 if (is_null($data)) {
494 $this->
id = (string) $data;
508 if (is_null($this->version)) {
510 $data = $this->
raw(self::FIELD_VERSION);
511 if (is_null($data)) {
514 $this->version = (int) $data;
528 if (is_null($this->createdAt)) {
530 $data = $this->
raw(self::FIELD_CREATED_AT);
531 if (is_null($data)) {
535 if (
false === $data) {
538 $this->createdAt = $data;
552 if (is_null($this->lastModifiedAt)) {
554 $data = $this->
raw(self::FIELD_LAST_MODIFIED_AT);
555 if (is_null($data)) {
559 if (
false === $data) {
562 $this->lastModifiedAt = $data;
576 if (is_null($this->orderNumber)) {
578 $data = $this->
raw(self::FIELD_ORDER_NUMBER);
579 if (is_null($data)) {
582 $this->orderNumber = (string) $data;
597 if (is_null($this->purchaseOrderNumber)) {
599 $data = $this->
raw(self::FIELD_PURCHASE_ORDER_NUMBER);
600 if (is_null($data)) {
603 $this->purchaseOrderNumber = (string) $data;
617 if (is_null($this->customerId)) {
619 $data = $this->
raw(self::FIELD_CUSTOMER_ID);
620 if (is_null($data)) {
623 $this->customerId = (string) $data;
637 if (is_null($this->customerEmail)) {
639 $data = $this->
raw(self::FIELD_CUSTOMER_EMAIL);
640 if (is_null($data)) {
643 $this->customerEmail = (string) $data;
658 if (is_null($this->customerGroup)) {
660 $data = $this->
raw(self::FIELD_CUSTOMER_GROUP);
661 if (is_null($data)) {
679 if (is_null($this->anonymousId)) {
681 $data = $this->
raw(self::FIELD_ANONYMOUS_ID);
682 if (is_null($data)) {
685 $this->anonymousId = (string) $data;
699 if (is_null($this->businessUnit)) {
701 $data = $this->
raw(self::FIELD_BUSINESS_UNIT);
702 if (is_null($data)) {
720 if (is_null($this->store)) {
722 $data = $this->
raw(self::FIELD_STORE);
723 if (is_null($data)) {
741 if (is_null($this->lineItems)) {
743 $data = $this->
raw(self::FIELD_LINE_ITEMS);
744 if (is_null($data)) {
761 if (is_null($this->customLineItems)) {
763 $data = $this->
raw(self::FIELD_CUSTOM_LINE_ITEMS);
764 if (is_null($data)) {
783 if (is_null($this->totalPrice)) {
785 $data = $this->
raw(self::FIELD_TOTAL_PRICE);
786 if (is_null($data)) {
790 $this->totalPrice = $className::of($data);
808 if (is_null($this->taxedPrice)) {
810 $data = $this->
raw(self::FIELD_TAXED_PRICE);
811 if (is_null($data)) {
829 if (is_null($this->taxedShippingPrice)) {
831 $data = $this->
raw(self::FIELD_TAXED_SHIPPING_PRICE);
832 if (is_null($data)) {
850 if (is_null($this->discountOnTotalPrice)) {
852 $data = $this->
raw(self::FIELD_DISCOUNT_ON_TOTAL_PRICE);
853 if (is_null($data)) {
871 if (is_null($this->taxMode)) {
873 $data = $this->
raw(self::FIELD_TAX_MODE);
874 if (is_null($data)) {
877 $this->taxMode = (string) $data;
891 if (is_null($this->taxRoundingMode)) {
893 $data = $this->
raw(self::FIELD_TAX_ROUNDING_MODE);
894 if (is_null($data)) {
897 $this->taxRoundingMode = (string) $data;
911 if (is_null($this->taxCalculationMode)) {
913 $data = $this->
raw(self::FIELD_TAX_CALCULATION_MODE);
914 if (is_null($data)) {
917 $this->taxCalculationMode = (string) $data;
931 if (is_null($this->inventoryMode)) {
933 $data = $this->
raw(self::FIELD_INVENTORY_MODE);
934 if (is_null($data)) {
937 $this->inventoryMode = (string) $data;
951 if (is_null($this->billingAddress)) {
953 $data = $this->
raw(self::FIELD_BILLING_ADDRESS);
954 if (is_null($data)) {
973 if (is_null($this->shippingAddress)) {
975 $data = $this->
raw(self::FIELD_SHIPPING_ADDRESS);
976 if (is_null($data)) {
994 if (is_null($this->shippingMode)) {
996 $data = $this->
raw(self::FIELD_SHIPPING_MODE);
997 if (is_null($data)) {
1000 $this->shippingMode = (string) $data;
1014 if (is_null($this->shippingKey)) {
1016 $data = $this->
raw(self::FIELD_SHIPPING_KEY);
1017 if (is_null($data)) {
1020 $this->shippingKey = (string) $data;
1035 if (is_null($this->shippingInfo)) {
1037 $data = $this->
raw(self::FIELD_SHIPPING_INFO);
1038 if (is_null($data)) {
1062 if (is_null($this->shippingRateInput)) {
1064 $data = $this->
raw(self::FIELD_SHIPPING_RATE_INPUT);
1065 if (is_null($data)) {
1069 $this->shippingRateInput = $className::of($data);
1083 if (is_null($this->shippingCustomFields)) {
1085 $data = $this->
raw(self::FIELD_SHIPPING_CUSTOM_FIELDS);
1086 if (is_null($data)) {
1105 if (is_null($this->shipping)) {
1107 $data = $this->
raw(self::FIELD_SHIPPING);
1108 if (is_null($data)) {
1126 if (is_null($this->itemShippingAddresses)) {
1128 $data = $this->
raw(self::FIELD_ITEM_SHIPPING_ADDRESSES);
1129 if (is_null($data)) {
1147 if (is_null($this->discountCodes)) {
1149 $data = $this->
raw(self::FIELD_DISCOUNT_CODES);
1150 if (is_null($data)) {
1168 if (is_null($this->directDiscounts)) {
1170 $data = $this->
raw(self::FIELD_DIRECT_DISCOUNTS);
1171 if (is_null($data)) {
1188 if (is_null($this->refusedGifts)) {
1190 $data = $this->
raw(self::FIELD_REFUSED_GIFTS);
1191 if (is_null($data)) {
1208 if (is_null($this->paymentInfo)) {
1210 $data = $this->
raw(self::FIELD_PAYMENT_INFO);
1211 if (is_null($data)) {
1229 if (is_null($this->country)) {
1231 $data = $this->
raw(self::FIELD_COUNTRY);
1232 if (is_null($data)) {
1235 $this->country = (string) $data;
1250 if (is_null($this->locale)) {
1252 $data = $this->
raw(self::FIELD_LOCALE);
1253 if (is_null($data)) {
1256 $this->locale = (string) $data;
1270 if (is_null($this->origin)) {
1272 $data = $this->
raw(self::FIELD_ORIGIN);
1273 if (is_null($data)) {
1276 $this->origin = (string) $data;
1291 if (is_null($this->cart)) {
1293 $data = $this->
raw(self::FIELD_CART);
1294 if (is_null($data)) {
1312 if (is_null($this->quote)) {
1314 $data = $this->
raw(self::FIELD_QUOTE);
1315 if (is_null($data)) {
1333 if (is_null($this->orderState)) {
1335 $data = $this->
raw(self::FIELD_ORDER_STATE);
1336 if (is_null($data)) {
1339 $this->orderState = (string) $data;
1353 if (is_null($this->shipmentState)) {
1355 $data = $this->
raw(self::FIELD_SHIPMENT_STATE);
1356 if (is_null($data)) {
1359 $this->shipmentState = (string) $data;
1373 if (is_null($this->paymentState)) {
1375 $data = $this->
raw(self::FIELD_PAYMENT_STATE);
1376 if (is_null($data)) {
1379 $this->paymentState = (string) $data;
1394 if (is_null($this->state)) {
1396 $data = $this->
raw(self::FIELD_STATE);
1397 if (is_null($data)) {
1416 if (is_null($this->syncInfo)) {
1418 $data = $this->
raw(self::FIELD_SYNC_INFO);
1419 if (is_null($data)) {
1436 if (is_null($this->returnInfo)) {
1438 $data = $this->
raw(self::FIELD_RETURN_INFO);
1439 if (is_null($data)) {
1456 if (is_null($this->lastMessageSequenceNumber)) {
1458 $data = $this->
raw(self::FIELD_LAST_MESSAGE_SEQUENCE_NUMBER);
1459 if (is_null($data)) {
1462 $this->lastMessageSequenceNumber = (int) $data;
1476 if (is_null($this->custom)) {
1478 $data = $this->
raw(self::FIELD_CUSTOM);
1479 if (is_null($data)) {
1498 if (is_null($this->completedAt)) {
1500 $data = $this->
raw(self::FIELD_COMPLETED_AT);
1501 if (is_null($data)) {
1505 if (
false === $data) {
1508 $this->completedAt = $data;
1522 if (is_null($this->lastModifiedBy)) {
1524 $data = $this->
raw(self::FIELD_LAST_MODIFIED_BY);
1525 if (is_null($data)) {
1543 if (is_null($this->createdBy)) {
1545 $data = $this->
raw(self::FIELD_CREATED_BY);
1546 if (is_null($data)) {
1866 $this->cart =
$cart;
1966 #[\ReturnTypeWillChange]
1981 return (
object) $data;
__construct(?string $id=null, ?int $version=null, ?DateTimeImmutable $createdAt=null, ?DateTimeImmutable $lastModifiedAt=null, ?string $orderNumber=null, ?string $purchaseOrderNumber=null, ?string $customerId=null, ?string $customerEmail=null, ?CustomerGroupReference $customerGroup=null, ?string $anonymousId=null, ?BusinessUnitKeyReference $businessUnit=null, ?StoreKeyReference $store=null, ?LineItemCollection $lineItems=null, ?CustomLineItemCollection $customLineItems=null, ?TypedMoney $totalPrice=null, ?TaxedPrice $taxedPrice=null, ?TaxedPrice $taxedShippingPrice=null, ?DiscountOnTotalPrice $discountOnTotalPrice=null, ?string $taxMode=null, ?string $taxRoundingMode=null, ?string $taxCalculationMode=null, ?string $inventoryMode=null, ?Address $billingAddress=null, ?Address $shippingAddress=null, ?string $shippingMode=null, ?string $shippingKey=null, ?ShippingInfo $shippingInfo=null, ?ShippingRateInput $shippingRateInput=null, ?CustomFields $shippingCustomFields=null, ?ShippingCollection $shipping=null, ?AddressCollection $itemShippingAddresses=null, ?DiscountCodeInfoCollection $discountCodes=null, ?DirectDiscountCollection $directDiscounts=null, ?CartDiscountReferenceCollection $refusedGifts=null, ?PaymentInfo $paymentInfo=null, ?string $country=null, ?string $locale=null, ?string $origin=null, ?CartReference $cart=null, ?QuoteReference $quote=null, ?string $orderState=null, ?string $shipmentState=null, ?string $paymentState=null, ?StateReference $state=null, ?SyncInfoCollection $syncInfo=null, ?ReturnInfoCollection $returnInfo=null, ?int $lastMessageSequenceNumber=null, ?CustomFields $custom=null, ?DateTimeImmutable $completedAt=null, ?LastModifiedBy $lastModifiedBy=null, ?CreatedBy $createdBy=null)