Click or drag to resize

OperationServiceExtensionsAddOrUpdateModifierForPrintedItem Method

Adds order item modifier for product which is already printed. User must have rights to edit orders.

Namespace:  Resto.Front.Api.Extensions
Assembly:  Resto.Front.Api.V8 (in Resto.Front.Api.V8.dll)
Syntax
C#
public static IOrderModifierItem AddOrUpdateModifierForPrintedItem(
	this IOperationService operationService,
	int amount,
	IOrder order,
	IOrderProductItem orderItemProduct,
	IProduct modifier,
	IProductGroup parentGroup,
	ICredentials credentials,
	int? payableAmount = null,
	decimal? predefinedPrice = null
)

Parameters

operationService
Type: Resto.Front.ApiIOperationService
Operation service.
amount
Type: SystemInt32
Amount of the modifier. Can be from 1 to 999. But it must not go beyond the limits set for modifiers.
order
Type: Resto.Front.Api.Data.OrdersIOrder
Order to which modifier will be added.
orderItemProduct
Type: Resto.Front.Api.Data.OrdersIOrderProductItem
Order item to which modifier will be added.
modifier
Type: Resto.Front.Api.Data.AssortmentIProduct
Assortment position for modifier. Must be accessible through IOrderProductItem.AvailableSimpleModifiers collection or one of the IOrderProductItem.AvailableGroupModifiers child collections.
parentGroup
Type: Resto.Front.Api.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 IOrderProductItem.AvailableGroupModifiers
credentials
Type: Resto.Front.Api.Data.SecurityICredentials
Credentials of the user. Required to pass permission and some other checks, as well as execute personalized operations.
payableAmount (Optional)
Type: SystemNullableInt32
Custom payable amount. Leave it null to use default logic or set custom value to override default logic. Payable part of the amount must be between zero (which means that whole modifier is free of charge) and amount (which means that whole modifier is payable).
predefinedPrice (Optional)
Type: SystemNullableDecimal
Predefined fixed price of the modifier, allows to use external quotation instead of default price list. null means default price.

Return Value

Type: IOrderModifierItem

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