CartExtension.OrderGraph

The CartExtension.OrderGraph is a collection of order related SObjects which will be used to create an order in the database.
You should set the SObject fields first, then call the 'addNode' method to add the SObject to the CartExtension.OrderGraph. When a SObject is added to the OrderGraph, the Id field is automatically populated with a temporary referenceId only if the value is null. The referenceId will be replaced with database Id when the CartExtension.OrderGraph is returned in the CartExtension.CreateOrderResponse and saved in the database. As the referenceId is not a real database Id, you cannot invoke the ID class method with it, but you can use it to set the foreign key value in related entities, for example: orderItem.OrderId = order.Id.
Do not try to modify the referenceId value; otherwise the CartExtension.OrderGraph cannot be saved in the database.

Constructor for CartExtension.OrderGraph An empty order object is created in the graph. Id field is populated with a referenceId value


Get the Order object.

TypeDescription
OrderOrder

Get all the related OrderDeliveryGroup objects.

TypeDescription
List<OrderDeliveryGroup>List

Add an OrderDeliveryGroup object to the graph. OrderId will be set if it is null.

TypeDescription
OrderGraphOrderGraph

Get all the related OrderItem objects.

TypeDescription
List<OrderItem>List

Add a OrderItem object to the graph. OrderId will be set if it null.

TypeDescription
OrderGraphOrderGraph

Get all the related OrderDeliveryMethod objects.

TypeDescription
List<OrderDeliveryMethod>List

Add an OrderDeliveryMethod object to the graph If the Id value of the OrderDeliveryMethod node is not null, the Id value will be kept; otherwise, the id field will be populated with a referenceId.

TypeDescription
OrderGraphOrderGraph

Get all the related OrderAdjustmentGroup objects.

TypeDescription
List<OrderAdjustmentGroup>List

Add a OrderAdjustmentGroup object to the graph. OrderId will be set if it is null

TypeDescription
OrderGraphOrderGraph

Get all the related OrderItemAdjustmentLineItem objects.

TypeDescription
List<OrderItemAdjustmentLineItem>List

Add a OrderItemAdjustmentLineItem object to the graph

TypeDescription
OrderGraphOrderGraph

Get all the related OrderItemTaxLineItem objects.

TypeDescription
List<OrderItemTaxLineItem>List

Add an OrderItemTaxLineItem object to the graph

TypeDescription
OrderGraphOrderGraph

Get the related OrderSummaryAdditionalInfo object, and it could be null.

TypeDescription
OrderSummaryAdditionalInfoOrderSummaryAdditionalInfo

Add an OrderSummaryAdditionalInfo object to the graph. The existing OrderSummaryAdditionalInfo object will be replaced, as only one OrderSummaryAdditionalInfo object can be associated with a CartExtension.OrderGraph

TypeDescription
OrderGraphOrderGraph