@@ -115,7 +115,7 @@ public function fieldDefinitions()
115115 {
116116 return [
117117 'id ' => [static ::TYPE => 'string ' ],
118- 'key ' => [static ::TYPE => 'string ' ],
118+ 'key ' => [static ::TYPE => 'string ' , static :: OPTIONAL => true ],
119119 'version ' => [static ::TYPE => 'int ' ],
120120 'createdAt ' => [
121121 static ::TYPE => DateTime::class,
@@ -125,35 +125,35 @@ public function fieldDefinitions()
125125 static ::TYPE => DateTime::class,
126126 static ::DECORATOR => DateTimeDecorator::class
127127 ],
128- 'customerId ' => [static ::TYPE => 'string ' ],
129- 'customerEmail ' => [static ::TYPE => 'string ' ],
128+ 'customerId ' => [static ::TYPE => 'string ' , static :: OPTIONAL => true ],
129+ 'customerEmail ' => [static ::TYPE => 'string ' , static :: OPTIONAL => true ],
130130 'lineItems ' => [static ::TYPE => LineItemCollection::class],
131131 'customLineItems ' => [static ::TYPE => CustomLineItemCollection::class],
132132 'totalPrice ' => [static ::TYPE => Money::class],
133- 'taxedPrice ' => [static ::TYPE => TaxedPrice::class],
133+ 'taxedPrice ' => [static ::TYPE => TaxedPrice::class, static :: OPTIONAL => true ],
134134 'cartState ' => [static ::TYPE => 'string ' ],
135- 'shippingAddress ' => [static ::TYPE => Address::class],
136- 'billingAddress ' => [static ::TYPE => Address::class],
137- 'inventoryMode ' => [static ::TYPE => 'string ' ],
138- 'customerGroup ' => [static ::TYPE => CustomerGroupReference::class],
139- 'country ' => [static ::TYPE => 'string ' ],
140- 'shippingInfo ' => [static ::TYPE => ShippingInfo::class],
141- 'discountCodes ' => [static ::TYPE => DiscountCodeInfoCollection::class],
142- 'custom ' => [static ::TYPE => CustomFieldObject::class],
143- 'paymentInfo ' => [static ::TYPE => PaymentInfo::class],
135+ 'shippingAddress ' => [static ::TYPE => Address::class, static :: OPTIONAL => true ],
136+ 'billingAddress ' => [static ::TYPE => Address::class, static :: OPTIONAL => true ],
137+ 'inventoryMode ' => [static ::TYPE => 'string ' , static :: OPTIONAL => true ],
138+ 'customerGroup ' => [static ::TYPE => CustomerGroupReference::class, static :: OPTIONAL => true ],
139+ 'country ' => [static ::TYPE => 'string ' , static :: OPTIONAL => true ],
140+ 'shippingInfo ' => [static ::TYPE => ShippingInfo::class, static :: OPTIONAL => true ],
141+ 'discountCodes ' => [static ::TYPE => DiscountCodeInfoCollection::class, static :: OPTIONAL => true ],
142+ 'custom ' => [static ::TYPE => CustomFieldObject::class, static :: OPTIONAL => true ],
143+ 'paymentInfo ' => [static ::TYPE => PaymentInfo::class, static :: OPTIONAL => true ],
144144 'taxMode ' => [static ::TYPE => 'string ' ],
145- 'anonymousId ' => [static ::TYPE => 'string ' ],
146- 'locale ' => [static ::TYPE => 'string ' ],
145+ 'anonymousId ' => [static ::TYPE => 'string ' , static :: OPTIONAL => true ],
146+ 'locale ' => [static ::TYPE => 'string ' , static :: OPTIONAL => true ],
147147 'taxRoundingMode ' => [static ::TYPE => 'string ' ],
148- 'deleteDaysAfterLastModification ' => [static ::TYPE => 'int ' ],
148+ 'deleteDaysAfterLastModification ' => [static ::TYPE => 'int ' , static :: OPTIONAL => true ],
149149 'refusedGifts ' => [static ::TYPE => CartDiscountReferenceCollection::class],
150150 'origin ' => [static ::TYPE => 'string ' ],
151151 'taxCalculationMode ' => [static ::TYPE => 'string ' ],
152- 'shippingRateInput ' => [static ::TYPE => ShippingRateInput::class],
153- 'itemShippingAddresses ' => [static ::TYPE => AddressCollection::class],
154- 'store ' => [static ::TYPE => StoreReference::class],
155- 'createdBy ' => [static ::TYPE => CreatedBy::class],
156- 'lastModifiedBy ' => [static ::TYPE => LastModifiedBy::class],
152+ 'shippingRateInput ' => [static ::TYPE => ShippingRateInput::class, static :: OPTIONAL => true ],
153+ 'itemShippingAddresses ' => [static ::TYPE => AddressCollection::class, static :: OPTIONAL => true ],
154+ 'store ' => [static ::TYPE => StoreReference::class, static :: OPTIONAL => true ],
155+ 'createdBy ' => [static ::TYPE => CreatedBy::class, static :: OPTIONAL => true ],
156+ 'lastModifiedBy ' => [static ::TYPE => LastModifiedBy::class, static :: OPTIONAL => true ],
157157 ];
158158 }
159159
0 commit comments