iikoFront Api V7Preview7 Code Reference
iikoFront Api V7Preview7 Code Reference
Resto.Front.Api.Editors
IEditSession Interface
IEditSession Methods
AddOrderCompoundItem Method
AddOrderCompoundItem Method (IProduct, IOrderStub, IOrderGuestItemStub, IProductSize, OrderItemCourse)
AddOrderCompoundItem Method (Guid, IProduct, IOrderStub, IOrderGuestItemStub, IProductSize, OrderItemCourse)

# IEditSession AddOrderCompoundItem Method (Guid, IProduct, IOrderStub, IOrderGuestItemStub, IProductSize, OrderItemCourse)

Adds compound item to the guest in existing order. User must have permission to edit orders.

Namespace: Resto.Front.Api.Editors
Assembly: Resto.Front.Api.V7Preview7 (in Resto.Front.Api.V7Preview7.dll) Version: 1ca4876affdd3bc5359a98b321fc115a647d2251
Syntax
C#
Copy

    INewOrderCompoundItemStub AddOrderCompoundItem(
    	Guid id,
    	IProduct product,
    	IOrderStub order,
    	IOrderGuestItemStub guest,
    	IProductSize size,
    	OrderItemCourse course = OrderItemCourse.Default
    )

#### Parameters

id
  Type: System
  Guid
  Unique identifier of the new order item modifier. MUST be unique not only for the order item or order, but for the whole system. Therefore it must be taken from some synchronization operation or generated with Guid.NewGuid()
product
  Type: Resto.Front.Api.Data.Assortment
  IProduct
  Assortment position used to fix modifiers. Must exist in iikoFront assortment.
order
  Type: Resto.Front.Api.Editors.Stubs
  IOrderStub
  Order to which position will be added.
guest
  Type: Resto.Front.Api.Editors.Stubs
  IOrderGuestItemStub
  Guest to which position will be added.
size
  Type: Resto.Front.Api.Data.Assortment
  IProductSize
  Size of the order item if it's template has scale, otherwise null.
course (Optional)
  Type: Resto.Front.Api.Data.Orders
  OrderItemCourse
  Cooking and serving priority of the order item.

#### Return Value

Type: INewOrderCompoundItemStub
Remarks
Compound item should have at least one component, so AddPrimaryComponent(IProduct, IOrderStub, IOrderCompoundItemStub, Nullable
Decimal
) should be called after adding a compound item.
See Also

#### Reference

IEditSession Interface
AddOrderCompoundItem Overload
Resto.Front.Api.Editors Namespace