Click or drag to resize

OperationServiceExtensionsCreateClient Method

Creates new client. The client must have a card number or at least one phone number.

Namespace:  Resto.Front.Api.Extensions
Assembly:  Resto.Front.Api.V7 (in Resto.Front.Api.V7.dll)
Syntax
C#
public static IClient CreateClient(
	this IOperationService operationService,
	Guid id,
	string name,
	List<PhoneDto> phones,
	string cardNumber,
	DateTime? dateCreated,
	ICredentials credentials
)

Parameters

operationService
Type: Resto.Front.ApiIOperationService
Operation service.
id
Type: SystemGuid
Id of creating client
name
Type: SystemString
Name of client
phones
Type: System.Collections.GenericListPhoneDto
List of client phones. Cannot contain null values and more than one main phone (i.e. with property IsMain = true)
cardNumber
Type: SystemString
Discount card number or null if the client doesn't have discount card. If the discount card doesn't exist, consider creating one using CreateDiscountCard(String, String, IPriceCategory, IDiscountType).
dateCreated
Type: SystemNullableDateTime
Date when client was created. Must be not null, for actual reports by date created of clients.
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.

Return Value

Type: IClient

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