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.

Constructors 

global OrderGraph() 

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


Methods 

global Order getOrder() 

Get the Order object.

Returns 

TypeDescription
OrderOrder

global List<OrderDeliveryGroup> getOrderDeliveryGroups() 

Get all the related OrderDeliveryGroup objects.

Returns 

TypeDescription
List<OrderDeliveryGroup>List

global OrderGraph addNode(OrderDeliveryGroup node) 

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

Returns 

TypeDescription
OrderGraphOrderGraph

global List<OrderItem> getOrderItems() 

Get all the related OrderItem objects.

Returns 

TypeDescription
List<OrderItem>List

global OrderGraph addNode(OrderItem node) 

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

Returns 

TypeDescription
OrderGraphOrderGraph

global List<OrderDeliveryMethod> getOrderDeliveryMethods() 

Get all the related OrderDeliveryMethod objects.

Returns 

TypeDescription
List<OrderDeliveryMethod>List

global OrderGraph addNode(OrderDeliveryMethod node) 

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.

Returns 

TypeDescription
OrderGraphOrderGraph

global List<OrderAdjustmentGroup> getOrderAdjustmentGroups() 

Get all the related OrderAdjustmentGroup objects.

Returns 

TypeDescription
List<OrderAdjustmentGroup>List

global OrderGraph addNode(OrderAdjustmentGroup node) 

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

Returns 

TypeDescription
OrderGraphOrderGraph

global List<OrderItemAdjustmentLineItem> getOrderItemAdjustmentLineItems() 

Get all the related OrderItemAdjustmentLineItem objects.

Returns 

TypeDescription
List<OrderItemAdjustmentLineItem>List

global OrderGraph addNode(OrderItemAdjustmentLineItem node) 

Add a OrderItemAdjustmentLineItem object to the graph

Returns 

TypeDescription
OrderGraphOrderGraph

global List<OrderItemTaxLineItem> getOrderItemTaxLineItems() 

Get all the related OrderItemTaxLineItem objects.

Returns 

TypeDescription
List<OrderItemTaxLineItem>List

global OrderGraph addNode(OrderItemTaxLineItem node) 

Add an OrderItemTaxLineItem object to the graph

Returns 

TypeDescription
OrderGraphOrderGraph

global OrderSummaryAdditionalInfo getOrderSummaryAdditionalInfo() 

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

Returns 

TypeDescription
OrderSummaryAdditionalInfoOrderSummaryAdditionalInfo

global OrderGraph addNode(OrderSummaryAdditionalInfo node) 

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

Returns 

TypeDescription
OrderGraphOrderGraph

Newer Version Available

This content describes an older version of this product. View Latest