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.
Type | Description |
---|---|
Order | Order |
Get all the related OrderDeliveryGroup objects.
Type | Description |
---|---|
List<OrderDeliveryGroup> | List |
Add an OrderDeliveryGroup object to the graph. OrderId will be set if it is null.
Type | Description |
---|---|
OrderGraph | OrderGraph |
Get all the related OrderItem objects.
Type | Description |
---|---|
List<OrderItem> | List |
Add a OrderItem object to the graph. OrderId will be set if it null.
Type | Description |
---|---|
OrderGraph | OrderGraph |
Get all the related OrderDeliveryMethod objects.
Type | Description |
---|---|
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.
Type | Description |
---|---|
OrderGraph | OrderGraph |
Get all the related OrderAdjustmentGroup objects.
Type | Description |
---|---|
List<OrderAdjustmentGroup> | List |
Add a OrderAdjustmentGroup object to the graph. OrderId will be set if it is null
Type | Description |
---|---|
OrderGraph | OrderGraph |
Get all the related OrderItemAdjustmentLineItem objects.
Type | Description |
---|---|
List<OrderItemAdjustmentLineItem> | List |
Add a OrderItemAdjustmentLineItem object to the graph
Type | Description |
---|---|
OrderGraph | OrderGraph |
Get all the related OrderItemTaxLineItem objects.
Type | Description |
---|---|
List<OrderItemTaxLineItem> | List |
Add an OrderItemTaxLineItem object to the graph
Type | Description |
---|---|
OrderGraph | OrderGraph |
Get the related OrderSummaryAdditionalInfo object, and it could be null.
Type | Description |
---|---|
OrderSummaryAdditionalInfo | OrderSummaryAdditionalInfo |
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
Type | Description |
---|---|
OrderGraph | OrderGraph |