commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
OrderBuilder.php
1<?php
2
3declare(strict_types=1);
10
61use DateTimeImmutable;
62use stdClass;
63
67final class OrderBuilder implements Builder
68{
73 private $id;
74
79 private $version;
80
85 private $createdAt;
86
91 private $lastModifiedAt;
92
97 private $orderNumber;
98
103 private $purchaseOrderNumber;
104
109 private $customerId;
110
115 private $customerEmail;
116
121 private $customerGroup;
122
127 private $anonymousId;
128
133 private $businessUnit;
134
139 private $store;
140
145 private $lineItems;
146
151 private $customLineItems;
152
157 private $totalPrice;
158
163 private $taxedPrice;
164
169 private $taxedShippingPrice;
170
175 private $discountOnTotalPrice;
176
181 private $priceRoundingMode;
182
187 private $taxMode;
188
193 private $taxRoundingMode;
194
199 private $taxCalculationMode;
200
205 private $inventoryMode;
206
211 private $billingAddress;
212
217 private $shippingAddress;
218
223 private $shippingMode;
224
229 private $shippingKey;
230
235 private $shippingInfo;
236
241 private $shippingRateInput;
242
247 private $shippingCustomFields;
248
253 private $shipping;
254
259 private $itemShippingAddresses;
260
265 private $discountCodes;
266
271 private $directDiscounts;
272
277 private $refusedGifts;
278
283 private $paymentInfo;
284
289 private $country;
290
295 private $locale;
296
301 private $origin;
302
307 private $cart;
308
313 private $quote;
314
319 private $recurringOrder;
320
325 private $orderState;
326
331 private $shipmentState;
332
337 private $paymentState;
338
343 private $state;
344
349 private $syncInfo;
350
355 private $returnInfo;
356
361 private $discountTypeCombination;
362
367 private $lastMessageSequenceNumber;
368
373 private $custom;
374
379 private $completedAt;
380
385 private $lastModifiedBy;
386
391 private $createdBy;
392
399 public function getId()
400 {
401 return $this->id;
402 }
403
410 public function getVersion()
411 {
412 return $this->version;
413 }
414
421 public function getCreatedAt()
422 {
423 return $this->createdAt;
424 }
425
432 public function getLastModifiedAt()
433 {
434 return $this->lastModifiedAt;
435 }
436
443 public function getOrderNumber()
444 {
445 return $this->orderNumber;
446 }
447
455 public function getPurchaseOrderNumber()
456 {
457 return $this->purchaseOrderNumber;
458 }
459
466 public function getCustomerId()
467 {
468 return $this->customerId;
469 }
470
477 public function getCustomerEmail()
478 {
479 return $this->customerEmail;
480 }
481
489 public function getCustomerGroup()
490 {
491 return $this->customerGroup instanceof CustomerGroupReferenceBuilder ? $this->customerGroup->build() : $this->customerGroup;
492 }
493
500 public function getAnonymousId()
501 {
502 return $this->anonymousId;
503 }
504
511 public function getBusinessUnit()
512 {
513 return $this->businessUnit instanceof BusinessUnitKeyReferenceBuilder ? $this->businessUnit->build() : $this->businessUnit;
514 }
515
522 public function getStore()
523 {
524 return $this->store instanceof StoreKeyReferenceBuilder ? $this->store->build() : $this->store;
525 }
526
533 public function getLineItems()
534 {
535 return $this->lineItems;
536 }
537
544 public function getCustomLineItems()
545 {
546 return $this->customLineItems;
547 }
548
557 public function getTotalPrice()
558 {
559 return $this->totalPrice instanceof CentPrecisionMoneyBuilder ? $this->totalPrice->build() : $this->totalPrice;
560 }
561
572 public function getTaxedPrice()
573 {
574 return $this->taxedPrice instanceof TaxedPriceBuilder ? $this->taxedPrice->build() : $this->taxedPrice;
575 }
576
584 public function getTaxedShippingPrice()
585 {
586 return $this->taxedShippingPrice instanceof TaxedPriceBuilder ? $this->taxedShippingPrice->build() : $this->taxedShippingPrice;
587 }
588
595 public function getDiscountOnTotalPrice()
596 {
597 return $this->discountOnTotalPrice instanceof DiscountOnTotalPriceBuilder ? $this->discountOnTotalPrice->build() : $this->discountOnTotalPrice;
598 }
599
606 public function getPriceRoundingMode()
607 {
608 return $this->priceRoundingMode;
609 }
610
617 public function getTaxMode()
618 {
619 return $this->taxMode;
620 }
621
628 public function getTaxRoundingMode()
629 {
630 return $this->taxRoundingMode;
631 }
632
639 public function getTaxCalculationMode()
640 {
641 return $this->taxCalculationMode;
642 }
643
650 public function getInventoryMode()
651 {
652 return $this->inventoryMode;
653 }
654
661 public function getBillingAddress()
662 {
663 return $this->billingAddress instanceof AddressBuilder ? $this->billingAddress->build() : $this->billingAddress;
664 }
665
673 public function getShippingAddress()
674 {
675 return $this->shippingAddress instanceof AddressBuilder ? $this->shippingAddress->build() : $this->shippingAddress;
676 }
677
684 public function getShippingMode()
685 {
686 return $this->shippingMode;
687 }
688
695 public function getShippingKey()
696 {
697 return $this->shippingKey;
698 }
699
707 public function getShippingInfo()
708 {
709 return $this->shippingInfo instanceof ShippingInfoBuilder ? $this->shippingInfo->build() : $this->shippingInfo;
710 }
711
724 public function getShippingRateInput()
725 {
726 return $this->shippingRateInput instanceof ShippingRateInputBuilder ? $this->shippingRateInput->build() : $this->shippingRateInput;
727 }
728
735 public function getShippingCustomFields()
736 {
737 return $this->shippingCustomFields instanceof CustomFieldsBuilder ? $this->shippingCustomFields->build() : $this->shippingCustomFields;
738 }
739
747 public function getShipping()
748 {
749 return $this->shipping;
750 }
751
759 public function getItemShippingAddresses()
760 {
761 return $this->itemShippingAddresses;
762 }
763
771 public function getDiscountCodes()
772 {
773 return $this->discountCodes;
774 }
775
783 public function getDirectDiscounts()
784 {
785 return $this->directDiscounts;
786 }
787
794 public function getRefusedGifts()
795 {
796 return $this->refusedGifts;
797 }
798
805 public function getPaymentInfo()
806 {
807 return $this->paymentInfo instanceof PaymentInfoBuilder ? $this->paymentInfo->build() : $this->paymentInfo;
808 }
809
816 public function getCountry()
817 {
818 return $this->country;
819 }
820
828 public function getLocale()
829 {
830 return $this->locale;
831 }
832
839 public function getOrigin()
840 {
841 return $this->origin;
842 }
843
851 public function getCart()
852 {
853 return $this->cart instanceof CartReferenceBuilder ? $this->cart->build() : $this->cart;
854 }
855
862 public function getQuote()
863 {
864 return $this->quote instanceof QuoteReferenceBuilder ? $this->quote->build() : $this->quote;
865 }
866
873 public function getRecurringOrder()
874 {
875 return $this->recurringOrder instanceof RecurringOrderReferenceBuilder ? $this->recurringOrder->build() : $this->recurringOrder;
876 }
877
884 public function getOrderState()
885 {
886 return $this->orderState;
887 }
888
895 public function getShipmentState()
896 {
897 return $this->shipmentState;
898 }
899
906 public function getPaymentState()
907 {
908 return $this->paymentState;
909 }
910
918 public function getState()
919 {
920 return $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state;
921 }
922
930 public function getSyncInfo()
931 {
932 return $this->syncInfo;
933 }
934
941 public function getReturnInfo()
942 {
943 return $this->returnInfo;
944 }
945
953 {
954 return $this->discountTypeCombination instanceof DiscountTypeCombinationBuilder ? $this->discountTypeCombination->build() : $this->discountTypeCombination;
955 }
956
964 {
965 return $this->lastMessageSequenceNumber;
966 }
967
974 public function getCustom()
975 {
976 return $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom;
977 }
978
986 public function getCompletedAt()
987 {
988 return $this->completedAt;
989 }
990
997 public function getLastModifiedBy()
998 {
999 return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy;
1000 }
1001
1008 public function getCreatedBy()
1009 {
1010 return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;
1011 }
1012
1017 public function withId(?string $id)
1018 {
1019 $this->id = $id;
1020
1021 return $this;
1022 }
1023
1028 public function withVersion(?int $version)
1029 {
1030 $this->version = $version;
1031
1032 return $this;
1033 }
1034
1039 public function withCreatedAt(?DateTimeImmutable $createdAt)
1040 {
1041 $this->createdAt = $createdAt;
1042
1043 return $this;
1044 }
1045
1050 public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
1051 {
1052 $this->lastModifiedAt = $lastModifiedAt;
1053
1054 return $this;
1055 }
1056
1061 public function withOrderNumber(?string $orderNumber)
1062 {
1063 $this->orderNumber = $orderNumber;
1064
1065 return $this;
1066 }
1067
1072 public function withPurchaseOrderNumber(?string $purchaseOrderNumber)
1073 {
1074 $this->purchaseOrderNumber = $purchaseOrderNumber;
1075
1076 return $this;
1077 }
1078
1083 public function withCustomerId(?string $customerId)
1084 {
1085 $this->customerId = $customerId;
1086
1087 return $this;
1088 }
1089
1094 public function withCustomerEmail(?string $customerEmail)
1095 {
1096 $this->customerEmail = $customerEmail;
1097
1098 return $this;
1099 }
1100
1105 public function withCustomerGroup(?CustomerGroupReference $customerGroup)
1106 {
1107 $this->customerGroup = $customerGroup;
1108
1109 return $this;
1110 }
1111
1116 public function withAnonymousId(?string $anonymousId)
1117 {
1118 $this->anonymousId = $anonymousId;
1119
1120 return $this;
1121 }
1122
1127 public function withBusinessUnit(?BusinessUnitKeyReference $businessUnit)
1128 {
1129 $this->businessUnit = $businessUnit;
1130
1131 return $this;
1132 }
1133
1138 public function withStore(?StoreKeyReference $store)
1139 {
1140 $this->store = $store;
1141
1142 return $this;
1143 }
1144
1149 public function withLineItems(?LineItemCollection $lineItems)
1150 {
1151 $this->lineItems = $lineItems;
1152
1153 return $this;
1154 }
1155
1160 public function withCustomLineItems(?CustomLineItemCollection $customLineItems)
1161 {
1162 $this->customLineItems = $customLineItems;
1163
1164 return $this;
1165 }
1166
1171 public function withTotalPrice(?CentPrecisionMoney $totalPrice)
1172 {
1173 $this->totalPrice = $totalPrice;
1174
1175 return $this;
1176 }
1177
1182 public function withTaxedPrice(?TaxedPrice $taxedPrice)
1183 {
1184 $this->taxedPrice = $taxedPrice;
1185
1186 return $this;
1187 }
1188
1193 public function withTaxedShippingPrice(?TaxedPrice $taxedShippingPrice)
1194 {
1195 $this->taxedShippingPrice = $taxedShippingPrice;
1196
1197 return $this;
1198 }
1199
1204 public function withDiscountOnTotalPrice(?DiscountOnTotalPrice $discountOnTotalPrice)
1205 {
1206 $this->discountOnTotalPrice = $discountOnTotalPrice;
1207
1208 return $this;
1209 }
1210
1215 public function withPriceRoundingMode(?string $priceRoundingMode)
1216 {
1217 $this->priceRoundingMode = $priceRoundingMode;
1218
1219 return $this;
1220 }
1221
1226 public function withTaxMode(?string $taxMode)
1227 {
1228 $this->taxMode = $taxMode;
1229
1230 return $this;
1231 }
1232
1237 public function withTaxRoundingMode(?string $taxRoundingMode)
1238 {
1239 $this->taxRoundingMode = $taxRoundingMode;
1240
1241 return $this;
1242 }
1243
1248 public function withTaxCalculationMode(?string $taxCalculationMode)
1249 {
1250 $this->taxCalculationMode = $taxCalculationMode;
1251
1252 return $this;
1253 }
1254
1259 public function withInventoryMode(?string $inventoryMode)
1260 {
1261 $this->inventoryMode = $inventoryMode;
1262
1263 return $this;
1264 }
1265
1270 public function withBillingAddress(?Address $billingAddress)
1271 {
1272 $this->billingAddress = $billingAddress;
1273
1274 return $this;
1275 }
1276
1281 public function withShippingAddress(?Address $shippingAddress)
1282 {
1283 $this->shippingAddress = $shippingAddress;
1284
1285 return $this;
1286 }
1287
1292 public function withShippingMode(?string $shippingMode)
1293 {
1294 $this->shippingMode = $shippingMode;
1295
1296 return $this;
1297 }
1298
1303 public function withShippingKey(?string $shippingKey)
1304 {
1305 $this->shippingKey = $shippingKey;
1306
1307 return $this;
1308 }
1309
1314 public function withShippingInfo(?ShippingInfo $shippingInfo)
1315 {
1316 $this->shippingInfo = $shippingInfo;
1317
1318 return $this;
1319 }
1320
1325 public function withShippingRateInput(?ShippingRateInput $shippingRateInput)
1326 {
1327 $this->shippingRateInput = $shippingRateInput;
1328
1329 return $this;
1330 }
1331
1336 public function withShippingCustomFields(?CustomFields $shippingCustomFields)
1337 {
1338 $this->shippingCustomFields = $shippingCustomFields;
1339
1340 return $this;
1341 }
1342
1347 public function withShipping(?ShippingCollection $shipping)
1348 {
1349 $this->shipping = $shipping;
1350
1351 return $this;
1352 }
1353
1358 public function withItemShippingAddresses(?AddressCollection $itemShippingAddresses)
1359 {
1360 $this->itemShippingAddresses = $itemShippingAddresses;
1361
1362 return $this;
1363 }
1364
1369 public function withDiscountCodes(?DiscountCodeInfoCollection $discountCodes)
1370 {
1371 $this->discountCodes = $discountCodes;
1372
1373 return $this;
1374 }
1375
1380 public function withDirectDiscounts(?DirectDiscountCollection $directDiscounts)
1381 {
1382 $this->directDiscounts = $directDiscounts;
1383
1384 return $this;
1385 }
1386
1392 {
1393 $this->refusedGifts = $refusedGifts;
1394
1395 return $this;
1396 }
1397
1402 public function withPaymentInfo(?PaymentInfo $paymentInfo)
1403 {
1404 $this->paymentInfo = $paymentInfo;
1405
1406 return $this;
1407 }
1408
1413 public function withCountry(?string $country)
1414 {
1415 $this->country = $country;
1416
1417 return $this;
1418 }
1419
1424 public function withLocale(?string $locale)
1425 {
1426 $this->locale = $locale;
1427
1428 return $this;
1429 }
1430
1435 public function withOrigin(?string $origin)
1436 {
1437 $this->origin = $origin;
1438
1439 return $this;
1440 }
1441
1446 public function withCart(?CartReference $cart)
1447 {
1448 $this->cart = $cart;
1449
1450 return $this;
1451 }
1452
1457 public function withQuote(?QuoteReference $quote)
1458 {
1459 $this->quote = $quote;
1460
1461 return $this;
1462 }
1463
1468 public function withRecurringOrder(?RecurringOrderReference $recurringOrder)
1469 {
1470 $this->recurringOrder = $recurringOrder;
1471
1472 return $this;
1473 }
1474
1479 public function withOrderState(?string $orderState)
1480 {
1481 $this->orderState = $orderState;
1482
1483 return $this;
1484 }
1485
1490 public function withShipmentState(?string $shipmentState)
1491 {
1492 $this->shipmentState = $shipmentState;
1493
1494 return $this;
1495 }
1496
1501 public function withPaymentState(?string $paymentState)
1502 {
1503 $this->paymentState = $paymentState;
1504
1505 return $this;
1506 }
1507
1512 public function withState(?StateReference $state)
1513 {
1514 $this->state = $state;
1515
1516 return $this;
1517 }
1518
1523 public function withSyncInfo(?SyncInfoCollection $syncInfo)
1524 {
1525 $this->syncInfo = $syncInfo;
1526
1527 return $this;
1528 }
1529
1534 public function withReturnInfo(?ReturnInfoCollection $returnInfo)
1535 {
1536 $this->returnInfo = $returnInfo;
1537
1538 return $this;
1539 }
1540
1545 public function withDiscountTypeCombination(?DiscountTypeCombination $discountTypeCombination)
1546 {
1547 $this->discountTypeCombination = $discountTypeCombination;
1548
1549 return $this;
1550 }
1551
1556 public function withLastMessageSequenceNumber(?int $lastMessageSequenceNumber)
1557 {
1558 $this->lastMessageSequenceNumber = $lastMessageSequenceNumber;
1559
1560 return $this;
1561 }
1562
1567 public function withCustom(?CustomFields $custom)
1568 {
1569 $this->custom = $custom;
1570
1571 return $this;
1572 }
1573
1578 public function withCompletedAt(?DateTimeImmutable $completedAt)
1579 {
1580 $this->completedAt = $completedAt;
1581
1582 return $this;
1583 }
1584
1589 public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
1590 {
1591 $this->lastModifiedBy = $lastModifiedBy;
1592
1593 return $this;
1594 }
1595
1600 public function withCreatedBy(?CreatedBy $createdBy)
1601 {
1602 $this->createdBy = $createdBy;
1603
1604 return $this;
1605 }
1606
1612 {
1613 $this->customerGroup = $customerGroup;
1614
1615 return $this;
1616 }
1617
1623 {
1624 $this->businessUnit = $businessUnit;
1625
1626 return $this;
1627 }
1628
1634 {
1635 $this->store = $store;
1636
1637 return $this;
1638 }
1639
1645 {
1646 $this->totalPrice = $totalPrice;
1647
1648 return $this;
1649 }
1650
1655 public function withTaxedPriceBuilder(?TaxedPriceBuilder $taxedPrice)
1656 {
1657 $this->taxedPrice = $taxedPrice;
1658
1659 return $this;
1660 }
1661
1666 public function withTaxedShippingPriceBuilder(?TaxedPriceBuilder $taxedShippingPrice)
1667 {
1668 $this->taxedShippingPrice = $taxedShippingPrice;
1669
1670 return $this;
1671 }
1672
1677 public function withDiscountOnTotalPriceBuilder(?DiscountOnTotalPriceBuilder $discountOnTotalPrice)
1678 {
1679 $this->discountOnTotalPrice = $discountOnTotalPrice;
1680
1681 return $this;
1682 }
1683
1688 public function withBillingAddressBuilder(?AddressBuilder $billingAddress)
1689 {
1690 $this->billingAddress = $billingAddress;
1691
1692 return $this;
1693 }
1694
1699 public function withShippingAddressBuilder(?AddressBuilder $shippingAddress)
1700 {
1701 $this->shippingAddress = $shippingAddress;
1702
1703 return $this;
1704 }
1705
1710 public function withShippingInfoBuilder(?ShippingInfoBuilder $shippingInfo)
1711 {
1712 $this->shippingInfo = $shippingInfo;
1713
1714 return $this;
1715 }
1716
1721 public function withShippingRateInputBuilder(?ShippingRateInputBuilder $shippingRateInput)
1722 {
1723 $this->shippingRateInput = $shippingRateInput;
1724
1725 return $this;
1726 }
1727
1732 public function withShippingCustomFieldsBuilder(?CustomFieldsBuilder $shippingCustomFields)
1733 {
1734 $this->shippingCustomFields = $shippingCustomFields;
1735
1736 return $this;
1737 }
1738
1743 public function withPaymentInfoBuilder(?PaymentInfoBuilder $paymentInfo)
1744 {
1745 $this->paymentInfo = $paymentInfo;
1746
1747 return $this;
1748 }
1749
1755 {
1756 $this->cart = $cart;
1757
1758 return $this;
1759 }
1760
1766 {
1767 $this->quote = $quote;
1768
1769 return $this;
1770 }
1771
1777 {
1778 $this->recurringOrder = $recurringOrder;
1779
1780 return $this;
1781 }
1782
1788 {
1789 $this->state = $state;
1790
1791 return $this;
1792 }
1793
1799 {
1800 $this->discountTypeCombination = $discountTypeCombination;
1801
1802 return $this;
1803 }
1804
1809 public function withCustomBuilder(?CustomFieldsBuilder $custom)
1810 {
1811 $this->custom = $custom;
1812
1813 return $this;
1814 }
1815
1820 public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
1821 {
1822 $this->lastModifiedBy = $lastModifiedBy;
1823
1824 return $this;
1825 }
1826
1831 public function withCreatedByBuilder(?CreatedByBuilder $createdBy)
1832 {
1833 $this->createdBy = $createdBy;
1834
1835 return $this;
1836 }
1837
1838 public function build(): Order
1839 {
1840 return new OrderModel(
1841 $this->id,
1842 $this->version,
1843 $this->createdAt,
1844 $this->lastModifiedAt,
1845 $this->orderNumber,
1846 $this->purchaseOrderNumber,
1847 $this->customerId,
1848 $this->customerEmail,
1849 $this->customerGroup instanceof CustomerGroupReferenceBuilder ? $this->customerGroup->build() : $this->customerGroup,
1850 $this->anonymousId,
1851 $this->businessUnit instanceof BusinessUnitKeyReferenceBuilder ? $this->businessUnit->build() : $this->businessUnit,
1852 $this->store instanceof StoreKeyReferenceBuilder ? $this->store->build() : $this->store,
1853 $this->lineItems,
1854 $this->customLineItems,
1855 $this->totalPrice instanceof CentPrecisionMoneyBuilder ? $this->totalPrice->build() : $this->totalPrice,
1856 $this->taxedPrice instanceof TaxedPriceBuilder ? $this->taxedPrice->build() : $this->taxedPrice,
1857 $this->taxedShippingPrice instanceof TaxedPriceBuilder ? $this->taxedShippingPrice->build() : $this->taxedShippingPrice,
1858 $this->discountOnTotalPrice instanceof DiscountOnTotalPriceBuilder ? $this->discountOnTotalPrice->build() : $this->discountOnTotalPrice,
1859 $this->priceRoundingMode,
1860 $this->taxMode,
1861 $this->taxRoundingMode,
1862 $this->taxCalculationMode,
1863 $this->inventoryMode,
1864 $this->billingAddress instanceof AddressBuilder ? $this->billingAddress->build() : $this->billingAddress,
1865 $this->shippingAddress instanceof AddressBuilder ? $this->shippingAddress->build() : $this->shippingAddress,
1866 $this->shippingMode,
1867 $this->shippingKey,
1868 $this->shippingInfo instanceof ShippingInfoBuilder ? $this->shippingInfo->build() : $this->shippingInfo,
1869 $this->shippingRateInput instanceof ShippingRateInputBuilder ? $this->shippingRateInput->build() : $this->shippingRateInput,
1870 $this->shippingCustomFields instanceof CustomFieldsBuilder ? $this->shippingCustomFields->build() : $this->shippingCustomFields,
1871 $this->shipping,
1872 $this->itemShippingAddresses,
1873 $this->discountCodes,
1874 $this->directDiscounts,
1875 $this->refusedGifts,
1876 $this->paymentInfo instanceof PaymentInfoBuilder ? $this->paymentInfo->build() : $this->paymentInfo,
1877 $this->country,
1878 $this->locale,
1879 $this->origin,
1880 $this->cart instanceof CartReferenceBuilder ? $this->cart->build() : $this->cart,
1881 $this->quote instanceof QuoteReferenceBuilder ? $this->quote->build() : $this->quote,
1882 $this->recurringOrder instanceof RecurringOrderReferenceBuilder ? $this->recurringOrder->build() : $this->recurringOrder,
1883 $this->orderState,
1884 $this->shipmentState,
1885 $this->paymentState,
1886 $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state,
1887 $this->syncInfo,
1888 $this->returnInfo,
1889 $this->discountTypeCombination instanceof DiscountTypeCombinationBuilder ? $this->discountTypeCombination->build() : $this->discountTypeCombination,
1890 $this->lastMessageSequenceNumber,
1891 $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom,
1892 $this->completedAt,
1893 $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy,
1894 $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy
1895 );
1896 }
1897
1898 public static function of(): OrderBuilder
1899 {
1900 return new self();
1901 }
1902}
withReturnInfo(?ReturnInfoCollection $returnInfo)
withDirectDiscounts(?DirectDiscountCollection $directDiscounts)
withTotalPriceBuilder(?CentPrecisionMoneyBuilder $totalPrice)
withStoreBuilder(?StoreKeyReferenceBuilder $store)
withCompletedAt(?DateTimeImmutable $completedAt)
withLastMessageSequenceNumber(?int $lastMessageSequenceNumber)
withDiscountCodes(?DiscountCodeInfoCollection $discountCodes)
withDiscountTypeCombinationBuilder(?DiscountTypeCombinationBuilder $discountTypeCombination)
withShippingInfoBuilder(?ShippingInfoBuilder $shippingInfo)
withBusinessUnit(?BusinessUnitKeyReference $businessUnit)
withShippingCustomFieldsBuilder(?CustomFieldsBuilder $shippingCustomFields)
withShippingCustomFields(?CustomFields $shippingCustomFields)
withRecurringOrderBuilder(?RecurringOrderReferenceBuilder $recurringOrder)
withItemShippingAddresses(?AddressCollection $itemShippingAddresses)
withDiscountOnTotalPriceBuilder(?DiscountOnTotalPriceBuilder $discountOnTotalPrice)
withCustomerGroup(?CustomerGroupReference $customerGroup)
withShippingAddress(?Address $shippingAddress)
withTotalPrice(?CentPrecisionMoney $totalPrice)
withShipping(?ShippingCollection $shipping)
withSyncInfo(?SyncInfoCollection $syncInfo)
withTaxedShippingPrice(?TaxedPrice $taxedShippingPrice)
withShippingRateInputBuilder(?ShippingRateInputBuilder $shippingRateInput)
withDiscountTypeCombination(?DiscountTypeCombination $discountTypeCombination)
withStateBuilder(?StateReferenceBuilder $state)
withLineItems(?LineItemCollection $lineItems)
withPaymentInfoBuilder(?PaymentInfoBuilder $paymentInfo)
withRefusedGifts(?CartDiscountReferenceCollection $refusedGifts)
withCustomerGroupBuilder(?CustomerGroupReferenceBuilder $customerGroup)
withCreatedAt(?DateTimeImmutable $createdAt)
withCreatedByBuilder(?CreatedByBuilder $createdBy)
withPurchaseOrderNumber(?string $purchaseOrderNumber)
withCustomBuilder(?CustomFieldsBuilder $custom)
withTaxedShippingPriceBuilder(?TaxedPriceBuilder $taxedShippingPrice)
withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
withQuoteBuilder(?QuoteReferenceBuilder $quote)
withTaxRoundingMode(?string $taxRoundingMode)
withPriceRoundingMode(?string $priceRoundingMode)
withDiscountOnTotalPrice(?DiscountOnTotalPrice $discountOnTotalPrice)
withTaxedPriceBuilder(?TaxedPriceBuilder $taxedPrice)
withBillingAddressBuilder(?AddressBuilder $billingAddress)
withCartBuilder(?CartReferenceBuilder $cart)
withRecurringOrder(?RecurringOrderReference $recurringOrder)
withCustomLineItems(?CustomLineItemCollection $customLineItems)
withShippingRateInput(?ShippingRateInput $shippingRateInput)
withBusinessUnitBuilder(?BusinessUnitKeyReferenceBuilder $businessUnit)
withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
withShippingInfo(?ShippingInfo $shippingInfo)
withShippingAddressBuilder(?AddressBuilder $shippingAddress)
withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
withTaxCalculationMode(?string $taxCalculationMode)