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 $directDiscountsIgnoreCartDiscounts;
278
283 private $refusedGifts;
284
289 private $paymentInfo;
290
295 private $country;
296
301 private $locale;
302
307 private $origin;
308
313 private $cart;
314
319 private $quote;
320
325 private $recurringOrder;
326
331 private $orderState;
332
337 private $shipmentState;
338
343 private $paymentState;
344
349 private $state;
350
355 private $syncInfo;
356
361 private $returnInfo;
362
367 private $discountTypeCombination;
368
373 private $lastMessageSequenceNumber;
374
379 private $custom;
380
385 private $completedAt;
386
391 private $lastModifiedBy;
392
397 private $createdBy;
398
405 public function getId()
406 {
407 return $this->id;
408 }
409
416 public function getVersion()
417 {
418 return $this->version;
419 }
420
427 public function getCreatedAt()
428 {
429 return $this->createdAt;
430 }
431
438 public function getLastModifiedAt()
439 {
440 return $this->lastModifiedAt;
441 }
442
449 public function getOrderNumber()
450 {
451 return $this->orderNumber;
452 }
453
461 public function getPurchaseOrderNumber()
462 {
463 return $this->purchaseOrderNumber;
464 }
465
472 public function getCustomerId()
473 {
474 return $this->customerId;
475 }
476
483 public function getCustomerEmail()
484 {
485 return $this->customerEmail;
486 }
487
495 public function getCustomerGroup()
496 {
497 return $this->customerGroup instanceof CustomerGroupReferenceBuilder ? $this->customerGroup->build() : $this->customerGroup;
498 }
499
506 public function getAnonymousId()
507 {
508 return $this->anonymousId;
509 }
510
517 public function getBusinessUnit()
518 {
519 return $this->businessUnit instanceof BusinessUnitKeyReferenceBuilder ? $this->businessUnit->build() : $this->businessUnit;
520 }
521
528 public function getStore()
529 {
530 return $this->store instanceof StoreKeyReferenceBuilder ? $this->store->build() : $this->store;
531 }
532
539 public function getLineItems()
540 {
541 return $this->lineItems;
542 }
543
550 public function getCustomLineItems()
551 {
552 return $this->customLineItems;
553 }
554
563 public function getTotalPrice()
564 {
565 return $this->totalPrice instanceof CentPrecisionMoneyBuilder ? $this->totalPrice->build() : $this->totalPrice;
566 }
567
578 public function getTaxedPrice()
579 {
580 return $this->taxedPrice instanceof TaxedPriceBuilder ? $this->taxedPrice->build() : $this->taxedPrice;
581 }
582
590 public function getTaxedShippingPrice()
591 {
592 return $this->taxedShippingPrice instanceof TaxedPriceBuilder ? $this->taxedShippingPrice->build() : $this->taxedShippingPrice;
593 }
594
601 public function getDiscountOnTotalPrice()
602 {
603 return $this->discountOnTotalPrice instanceof DiscountOnTotalPriceBuilder ? $this->discountOnTotalPrice->build() : $this->discountOnTotalPrice;
604 }
605
612 public function getPriceRoundingMode()
613 {
614 return $this->priceRoundingMode;
615 }
616
623 public function getTaxMode()
624 {
625 return $this->taxMode;
626 }
627
634 public function getTaxRoundingMode()
635 {
636 return $this->taxRoundingMode;
637 }
638
645 public function getTaxCalculationMode()
646 {
647 return $this->taxCalculationMode;
648 }
649
656 public function getInventoryMode()
657 {
658 return $this->inventoryMode;
659 }
660
667 public function getBillingAddress()
668 {
669 return $this->billingAddress instanceof AddressBuilder ? $this->billingAddress->build() : $this->billingAddress;
670 }
671
679 public function getShippingAddress()
680 {
681 return $this->shippingAddress instanceof AddressBuilder ? $this->shippingAddress->build() : $this->shippingAddress;
682 }
683
690 public function getShippingMode()
691 {
692 return $this->shippingMode;
693 }
694
701 public function getShippingKey()
702 {
703 return $this->shippingKey;
704 }
705
713 public function getShippingInfo()
714 {
715 return $this->shippingInfo instanceof ShippingInfoBuilder ? $this->shippingInfo->build() : $this->shippingInfo;
716 }
717
730 public function getShippingRateInput()
731 {
732 return $this->shippingRateInput instanceof ShippingRateInputBuilder ? $this->shippingRateInput->build() : $this->shippingRateInput;
733 }
734
741 public function getShippingCustomFields()
742 {
743 return $this->shippingCustomFields instanceof CustomFieldsBuilder ? $this->shippingCustomFields->build() : $this->shippingCustomFields;
744 }
745
753 public function getShipping()
754 {
755 return $this->shipping;
756 }
757
765 public function getItemShippingAddresses()
766 {
767 return $this->itemShippingAddresses;
768 }
769
777 public function getDiscountCodes()
778 {
779 return $this->discountCodes;
780 }
781
789 public function getDirectDiscounts()
790 {
791 return $this->directDiscounts;
792 }
793
804 {
805 return $this->directDiscountsIgnoreCartDiscounts;
806 }
807
814 public function getRefusedGifts()
815 {
816 return $this->refusedGifts;
817 }
818
825 public function getPaymentInfo()
826 {
827 return $this->paymentInfo instanceof PaymentInfoBuilder ? $this->paymentInfo->build() : $this->paymentInfo;
828 }
829
836 public function getCountry()
837 {
838 return $this->country;
839 }
840
848 public function getLocale()
849 {
850 return $this->locale;
851 }
852
859 public function getOrigin()
860 {
861 return $this->origin;
862 }
863
871 public function getCart()
872 {
873 return $this->cart instanceof CartReferenceBuilder ? $this->cart->build() : $this->cart;
874 }
875
882 public function getQuote()
883 {
884 return $this->quote instanceof QuoteReferenceBuilder ? $this->quote->build() : $this->quote;
885 }
886
893 public function getRecurringOrder()
894 {
895 return $this->recurringOrder instanceof RecurringOrderReferenceBuilder ? $this->recurringOrder->build() : $this->recurringOrder;
896 }
897
904 public function getOrderState()
905 {
906 return $this->orderState;
907 }
908
915 public function getShipmentState()
916 {
917 return $this->shipmentState;
918 }
919
926 public function getPaymentState()
927 {
928 return $this->paymentState;
929 }
930
938 public function getState()
939 {
940 return $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state;
941 }
942
950 public function getSyncInfo()
951 {
952 return $this->syncInfo;
953 }
954
961 public function getReturnInfo()
962 {
963 return $this->returnInfo;
964 }
965
973 {
974 return $this->discountTypeCombination instanceof DiscountTypeCombinationBuilder ? $this->discountTypeCombination->build() : $this->discountTypeCombination;
975 }
976
984 {
985 return $this->lastMessageSequenceNumber;
986 }
987
994 public function getCustom()
995 {
996 return $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom;
997 }
998
1006 public function getCompletedAt()
1007 {
1008 return $this->completedAt;
1009 }
1010
1017 public function getLastModifiedBy()
1018 {
1019 return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy;
1020 }
1021
1028 public function getCreatedBy()
1029 {
1030 return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;
1031 }
1032
1037 public function withId(?string $id)
1038 {
1039 $this->id = $id;
1040
1041 return $this;
1042 }
1043
1048 public function withVersion(?int $version)
1049 {
1050 $this->version = $version;
1051
1052 return $this;
1053 }
1054
1059 public function withCreatedAt(?DateTimeImmutable $createdAt)
1060 {
1061 $this->createdAt = $createdAt;
1062
1063 return $this;
1064 }
1065
1070 public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
1071 {
1072 $this->lastModifiedAt = $lastModifiedAt;
1073
1074 return $this;
1075 }
1076
1081 public function withOrderNumber(?string $orderNumber)
1082 {
1083 $this->orderNumber = $orderNumber;
1084
1085 return $this;
1086 }
1087
1092 public function withPurchaseOrderNumber(?string $purchaseOrderNumber)
1093 {
1094 $this->purchaseOrderNumber = $purchaseOrderNumber;
1095
1096 return $this;
1097 }
1098
1103 public function withCustomerId(?string $customerId)
1104 {
1105 $this->customerId = $customerId;
1106
1107 return $this;
1108 }
1109
1114 public function withCustomerEmail(?string $customerEmail)
1115 {
1116 $this->customerEmail = $customerEmail;
1117
1118 return $this;
1119 }
1120
1125 public function withCustomerGroup(?CustomerGroupReference $customerGroup)
1126 {
1127 $this->customerGroup = $customerGroup;
1128
1129 return $this;
1130 }
1131
1136 public function withAnonymousId(?string $anonymousId)
1137 {
1138 $this->anonymousId = $anonymousId;
1139
1140 return $this;
1141 }
1142
1147 public function withBusinessUnit(?BusinessUnitKeyReference $businessUnit)
1148 {
1149 $this->businessUnit = $businessUnit;
1150
1151 return $this;
1152 }
1153
1158 public function withStore(?StoreKeyReference $store)
1159 {
1160 $this->store = $store;
1161
1162 return $this;
1163 }
1164
1169 public function withLineItems(?LineItemCollection $lineItems)
1170 {
1171 $this->lineItems = $lineItems;
1172
1173 return $this;
1174 }
1175
1180 public function withCustomLineItems(?CustomLineItemCollection $customLineItems)
1181 {
1182 $this->customLineItems = $customLineItems;
1183
1184 return $this;
1185 }
1186
1191 public function withTotalPrice(?CentPrecisionMoney $totalPrice)
1192 {
1193 $this->totalPrice = $totalPrice;
1194
1195 return $this;
1196 }
1197
1202 public function withTaxedPrice(?TaxedPrice $taxedPrice)
1203 {
1204 $this->taxedPrice = $taxedPrice;
1205
1206 return $this;
1207 }
1208
1213 public function withTaxedShippingPrice(?TaxedPrice $taxedShippingPrice)
1214 {
1215 $this->taxedShippingPrice = $taxedShippingPrice;
1216
1217 return $this;
1218 }
1219
1224 public function withDiscountOnTotalPrice(?DiscountOnTotalPrice $discountOnTotalPrice)
1225 {
1226 $this->discountOnTotalPrice = $discountOnTotalPrice;
1227
1228 return $this;
1229 }
1230
1235 public function withPriceRoundingMode(?string $priceRoundingMode)
1236 {
1237 $this->priceRoundingMode = $priceRoundingMode;
1238
1239 return $this;
1240 }
1241
1246 public function withTaxMode(?string $taxMode)
1247 {
1248 $this->taxMode = $taxMode;
1249
1250 return $this;
1251 }
1252
1257 public function withTaxRoundingMode(?string $taxRoundingMode)
1258 {
1259 $this->taxRoundingMode = $taxRoundingMode;
1260
1261 return $this;
1262 }
1263
1268 public function withTaxCalculationMode(?string $taxCalculationMode)
1269 {
1270 $this->taxCalculationMode = $taxCalculationMode;
1271
1272 return $this;
1273 }
1274
1279 public function withInventoryMode(?string $inventoryMode)
1280 {
1281 $this->inventoryMode = $inventoryMode;
1282
1283 return $this;
1284 }
1285
1290 public function withBillingAddress(?Address $billingAddress)
1291 {
1292 $this->billingAddress = $billingAddress;
1293
1294 return $this;
1295 }
1296
1301 public function withShippingAddress(?Address $shippingAddress)
1302 {
1303 $this->shippingAddress = $shippingAddress;
1304
1305 return $this;
1306 }
1307
1312 public function withShippingMode(?string $shippingMode)
1313 {
1314 $this->shippingMode = $shippingMode;
1315
1316 return $this;
1317 }
1318
1323 public function withShippingKey(?string $shippingKey)
1324 {
1325 $this->shippingKey = $shippingKey;
1326
1327 return $this;
1328 }
1329
1334 public function withShippingInfo(?ShippingInfo $shippingInfo)
1335 {
1336 $this->shippingInfo = $shippingInfo;
1337
1338 return $this;
1339 }
1340
1345 public function withShippingRateInput(?ShippingRateInput $shippingRateInput)
1346 {
1347 $this->shippingRateInput = $shippingRateInput;
1348
1349 return $this;
1350 }
1351
1356 public function withShippingCustomFields(?CustomFields $shippingCustomFields)
1357 {
1358 $this->shippingCustomFields = $shippingCustomFields;
1359
1360 return $this;
1361 }
1362
1367 public function withShipping(?ShippingCollection $shipping)
1368 {
1369 $this->shipping = $shipping;
1370
1371 return $this;
1372 }
1373
1378 public function withItemShippingAddresses(?AddressCollection $itemShippingAddresses)
1379 {
1380 $this->itemShippingAddresses = $itemShippingAddresses;
1381
1382 return $this;
1383 }
1384
1389 public function withDiscountCodes(?DiscountCodeInfoCollection $discountCodes)
1390 {
1391 $this->discountCodes = $discountCodes;
1392
1393 return $this;
1394 }
1395
1400 public function withDirectDiscounts(?DirectDiscountCollection $directDiscounts)
1401 {
1402 $this->directDiscounts = $directDiscounts;
1403
1404 return $this;
1405 }
1406
1411 public function withDirectDiscountsIgnoreCartDiscounts(?bool $directDiscountsIgnoreCartDiscounts)
1412 {
1413 $this->directDiscountsIgnoreCartDiscounts = $directDiscountsIgnoreCartDiscounts;
1414
1415 return $this;
1416 }
1417
1423 {
1424 $this->refusedGifts = $refusedGifts;
1425
1426 return $this;
1427 }
1428
1433 public function withPaymentInfo(?PaymentInfo $paymentInfo)
1434 {
1435 $this->paymentInfo = $paymentInfo;
1436
1437 return $this;
1438 }
1439
1444 public function withCountry(?string $country)
1445 {
1446 $this->country = $country;
1447
1448 return $this;
1449 }
1450
1455 public function withLocale(?string $locale)
1456 {
1457 $this->locale = $locale;
1458
1459 return $this;
1460 }
1461
1466 public function withOrigin(?string $origin)
1467 {
1468 $this->origin = $origin;
1469
1470 return $this;
1471 }
1472
1477 public function withCart(?CartReference $cart)
1478 {
1479 $this->cart = $cart;
1480
1481 return $this;
1482 }
1483
1488 public function withQuote(?QuoteReference $quote)
1489 {
1490 $this->quote = $quote;
1491
1492 return $this;
1493 }
1494
1499 public function withRecurringOrder(?RecurringOrderReference $recurringOrder)
1500 {
1501 $this->recurringOrder = $recurringOrder;
1502
1503 return $this;
1504 }
1505
1510 public function withOrderState(?string $orderState)
1511 {
1512 $this->orderState = $orderState;
1513
1514 return $this;
1515 }
1516
1521 public function withShipmentState(?string $shipmentState)
1522 {
1523 $this->shipmentState = $shipmentState;
1524
1525 return $this;
1526 }
1527
1532 public function withPaymentState(?string $paymentState)
1533 {
1534 $this->paymentState = $paymentState;
1535
1536 return $this;
1537 }
1538
1543 public function withState(?StateReference $state)
1544 {
1545 $this->state = $state;
1546
1547 return $this;
1548 }
1549
1554 public function withSyncInfo(?SyncInfoCollection $syncInfo)
1555 {
1556 $this->syncInfo = $syncInfo;
1557
1558 return $this;
1559 }
1560
1565 public function withReturnInfo(?ReturnInfoCollection $returnInfo)
1566 {
1567 $this->returnInfo = $returnInfo;
1568
1569 return $this;
1570 }
1571
1576 public function withDiscountTypeCombination(?DiscountTypeCombination $discountTypeCombination)
1577 {
1578 $this->discountTypeCombination = $discountTypeCombination;
1579
1580 return $this;
1581 }
1582
1587 public function withLastMessageSequenceNumber(?int $lastMessageSequenceNumber)
1588 {
1589 $this->lastMessageSequenceNumber = $lastMessageSequenceNumber;
1590
1591 return $this;
1592 }
1593
1598 public function withCustom(?CustomFields $custom)
1599 {
1600 $this->custom = $custom;
1601
1602 return $this;
1603 }
1604
1609 public function withCompletedAt(?DateTimeImmutable $completedAt)
1610 {
1611 $this->completedAt = $completedAt;
1612
1613 return $this;
1614 }
1615
1620 public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
1621 {
1622 $this->lastModifiedBy = $lastModifiedBy;
1623
1624 return $this;
1625 }
1626
1631 public function withCreatedBy(?CreatedBy $createdBy)
1632 {
1633 $this->createdBy = $createdBy;
1634
1635 return $this;
1636 }
1637
1643 {
1644 $this->customerGroup = $customerGroup;
1645
1646 return $this;
1647 }
1648
1654 {
1655 $this->businessUnit = $businessUnit;
1656
1657 return $this;
1658 }
1659
1665 {
1666 $this->store = $store;
1667
1668 return $this;
1669 }
1670
1676 {
1677 $this->totalPrice = $totalPrice;
1678
1679 return $this;
1680 }
1681
1686 public function withTaxedPriceBuilder(?TaxedPriceBuilder $taxedPrice)
1687 {
1688 $this->taxedPrice = $taxedPrice;
1689
1690 return $this;
1691 }
1692
1697 public function withTaxedShippingPriceBuilder(?TaxedPriceBuilder $taxedShippingPrice)
1698 {
1699 $this->taxedShippingPrice = $taxedShippingPrice;
1700
1701 return $this;
1702 }
1703
1708 public function withDiscountOnTotalPriceBuilder(?DiscountOnTotalPriceBuilder $discountOnTotalPrice)
1709 {
1710 $this->discountOnTotalPrice = $discountOnTotalPrice;
1711
1712 return $this;
1713 }
1714
1719 public function withBillingAddressBuilder(?AddressBuilder $billingAddress)
1720 {
1721 $this->billingAddress = $billingAddress;
1722
1723 return $this;
1724 }
1725
1730 public function withShippingAddressBuilder(?AddressBuilder $shippingAddress)
1731 {
1732 $this->shippingAddress = $shippingAddress;
1733
1734 return $this;
1735 }
1736
1741 public function withShippingInfoBuilder(?ShippingInfoBuilder $shippingInfo)
1742 {
1743 $this->shippingInfo = $shippingInfo;
1744
1745 return $this;
1746 }
1747
1752 public function withShippingRateInputBuilder(?ShippingRateInputBuilder $shippingRateInput)
1753 {
1754 $this->shippingRateInput = $shippingRateInput;
1755
1756 return $this;
1757 }
1758
1763 public function withShippingCustomFieldsBuilder(?CustomFieldsBuilder $shippingCustomFields)
1764 {
1765 $this->shippingCustomFields = $shippingCustomFields;
1766
1767 return $this;
1768 }
1769
1774 public function withPaymentInfoBuilder(?PaymentInfoBuilder $paymentInfo)
1775 {
1776 $this->paymentInfo = $paymentInfo;
1777
1778 return $this;
1779 }
1780
1786 {
1787 $this->cart = $cart;
1788
1789 return $this;
1790 }
1791
1797 {
1798 $this->quote = $quote;
1799
1800 return $this;
1801 }
1802
1808 {
1809 $this->recurringOrder = $recurringOrder;
1810
1811 return $this;
1812 }
1813
1819 {
1820 $this->state = $state;
1821
1822 return $this;
1823 }
1824
1830 {
1831 $this->discountTypeCombination = $discountTypeCombination;
1832
1833 return $this;
1834 }
1835
1840 public function withCustomBuilder(?CustomFieldsBuilder $custom)
1841 {
1842 $this->custom = $custom;
1843
1844 return $this;
1845 }
1846
1851 public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
1852 {
1853 $this->lastModifiedBy = $lastModifiedBy;
1854
1855 return $this;
1856 }
1857
1862 public function withCreatedByBuilder(?CreatedByBuilder $createdBy)
1863 {
1864 $this->createdBy = $createdBy;
1865
1866 return $this;
1867 }
1868
1869 public function build(): Order
1870 {
1871 return new OrderModel(
1872 $this->id,
1873 $this->version,
1874 $this->createdAt,
1875 $this->lastModifiedAt,
1876 $this->orderNumber,
1877 $this->purchaseOrderNumber,
1878 $this->customerId,
1879 $this->customerEmail,
1880 $this->customerGroup instanceof CustomerGroupReferenceBuilder ? $this->customerGroup->build() : $this->customerGroup,
1881 $this->anonymousId,
1882 $this->businessUnit instanceof BusinessUnitKeyReferenceBuilder ? $this->businessUnit->build() : $this->businessUnit,
1883 $this->store instanceof StoreKeyReferenceBuilder ? $this->store->build() : $this->store,
1884 $this->lineItems,
1885 $this->customLineItems,
1886 $this->totalPrice instanceof CentPrecisionMoneyBuilder ? $this->totalPrice->build() : $this->totalPrice,
1887 $this->taxedPrice instanceof TaxedPriceBuilder ? $this->taxedPrice->build() : $this->taxedPrice,
1888 $this->taxedShippingPrice instanceof TaxedPriceBuilder ? $this->taxedShippingPrice->build() : $this->taxedShippingPrice,
1889 $this->discountOnTotalPrice instanceof DiscountOnTotalPriceBuilder ? $this->discountOnTotalPrice->build() : $this->discountOnTotalPrice,
1890 $this->priceRoundingMode,
1891 $this->taxMode,
1892 $this->taxRoundingMode,
1893 $this->taxCalculationMode,
1894 $this->inventoryMode,
1895 $this->billingAddress instanceof AddressBuilder ? $this->billingAddress->build() : $this->billingAddress,
1896 $this->shippingAddress instanceof AddressBuilder ? $this->shippingAddress->build() : $this->shippingAddress,
1897 $this->shippingMode,
1898 $this->shippingKey,
1899 $this->shippingInfo instanceof ShippingInfoBuilder ? $this->shippingInfo->build() : $this->shippingInfo,
1900 $this->shippingRateInput instanceof ShippingRateInputBuilder ? $this->shippingRateInput->build() : $this->shippingRateInput,
1901 $this->shippingCustomFields instanceof CustomFieldsBuilder ? $this->shippingCustomFields->build() : $this->shippingCustomFields,
1902 $this->shipping,
1903 $this->itemShippingAddresses,
1904 $this->discountCodes,
1905 $this->directDiscounts,
1906 $this->directDiscountsIgnoreCartDiscounts,
1907 $this->refusedGifts,
1908 $this->paymentInfo instanceof PaymentInfoBuilder ? $this->paymentInfo->build() : $this->paymentInfo,
1909 $this->country,
1910 $this->locale,
1911 $this->origin,
1912 $this->cart instanceof CartReferenceBuilder ? $this->cart->build() : $this->cart,
1913 $this->quote instanceof QuoteReferenceBuilder ? $this->quote->build() : $this->quote,
1914 $this->recurringOrder instanceof RecurringOrderReferenceBuilder ? $this->recurringOrder->build() : $this->recurringOrder,
1915 $this->orderState,
1916 $this->shipmentState,
1917 $this->paymentState,
1918 $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state,
1919 $this->syncInfo,
1920 $this->returnInfo,
1921 $this->discountTypeCombination instanceof DiscountTypeCombinationBuilder ? $this->discountTypeCombination->build() : $this->discountTypeCombination,
1922 $this->lastMessageSequenceNumber,
1923 $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom,
1924 $this->completedAt,
1925 $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy,
1926 $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy
1927 );
1928 }
1929
1930 public static function of(): OrderBuilder
1931 {
1932 return new self();
1933 }
1934}
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)
withDirectDiscountsIgnoreCartDiscounts(?bool $directDiscountsIgnoreCartDiscounts)
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)