Click or drag to resize

OperationServiceExtensionsAddOrderItemModifier Method (IOperationService, Guid, Int32, IProduct, IProductGroup, IOrder, IOrderItemProduct, ICredentials)

Adds order item modifier to the order item in existing order. User must have rights to edit orders.

Namespace:  Resto.Front.Api.V4.Extensions
Assembly:  Resto.Front.Api.V4 (in Resto.Front.Api.V4.dll)
Syntax
C#
public static IOrderItemModifier AddOrderItemModifier(
	this IOperationService operationService,
	Guid id,
	int amount,
	IProduct modifier,
	IProductGroup parentGroup,
	IOrder order,
	IOrderItemProduct orderItemProduct,
	ICredentials credentials
)

Parameters

operationService
Type: Resto.Front.Api.V4IOperationService
Operation service.
id
Type: SystemGuid
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()
amount
Type: SystemInt32
Amount of the modifier. Can be from 1 to 999.
modifier
Type: Resto.Front.Api.V4.Data.AssortmentIProduct
Assortment position for modifier. Must be accessible through IOrderItemProduct.AvailableSimpleModifiers collection or one of the IOrderItemProduct.AvailableGroupModifiers child collections.
parentGroup
Type: Resto.Front.Api.V4.Data.AssortmentIProductGroup
Assortment position group for modifier. Must be specified if new modifier will be part of the group modifier. Otherwise null. Group modifier must be chosen from IOrderItemProduct.AvailableGroupModifiers
order
Type: Resto.Front.Api.V4.Data.OrdersIOrder
Order to which modifier will be added
orderItemProduct
Type: Resto.Front.Api.V4.Data.OrdersIOrderItemProduct
Order item to which modifier will be added.
credentials
Type: Resto.Front.Api.V4.Data.SecurityICredentials
Credentials of the user. Required to pass permission and some other checks, as well as execute personalized operations.

Return Value

Type: IOrderItemModifier

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IOperationService. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also