Class Customer
Namespace: Ordering.Domain.Aggregates.Customer
Assembly: Ordering.Domain.dll
Inheritance
object ← Entity ← Customer
Implements
Inherited Members
Entity.Id, Entity.CreatedAt, Entity.UpdatedAt, Entity.DomainEvents, object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)
Constructors
Customer\(\)
Properties
HasToPay
Property Value
Identifier
Property Value
IsFinished
Property Value
IsPaymentFirst
Property Value
OneSignalId
Property Value
Guid?
Orders
Property Value
IEnumerable < Order \>
RestaurantId
Property Value
TableId
Property Value
Methods
AcknowledgeCategory\(string\)
Method that marks all the order line items of the customer as acknowledged by the category.
Parameters
categoryName string
AcknowledgeServingPeriod\(ServingPeriod\)
Method that marks all the order line items of the customer as acknowledged by the serving period.
Parameters
servingPeriod ServingPeriod
AlreadyPlacedAnOrder\(\)
Returns
AreAllOrdersFinished\(\)
Gets a customer out of the system.
Returns
Create\(string, Guid, Guid, bool, bool, Guid?\)
Method that create a Ordering.Domain.Aggregates.Customer.Customer.
Parameters
identifier string
Ordering.Domain.Aggregates.Customer.Customer.Identifier of the Ordering.Domain.Aggregates.Customer.Customer
tableId Guid
Ordering.Domain.Aggregates.Customer.Customer.TableId of the Ordering.Domain.Aggregates.Customer.Customer
restaurantId Guid
Ordering.Domain.Aggregates.Customer.Customer.RestaurantId of the Ordering.Domain.Aggregates.Customer.Customer
isPaymentFirst bool
Boolean that says if the restaurant needs payment before serving.
hasToPay bool
Boolean that says if the customer has to pay.
oneSignalId Guid?
NotificationId from OneSignal.
Returns
Customer
The created Ordering.Domain.Aggregates.Customer.Customer.
DoesNotHaveToPay\(\)
Method that returns if the customer needs to pay for his orders.
Returns
FinalizeTransferToTheTableWithId\(Guid\)
Method that move the Ordering.Domain.Aggregates.Customer.Customer to a new table.
Parameters
newTableId Guid
PlaceAnOrder\(List<OrderLineItem\>\)
Method that add an Ordering.Domain.Aggregates.OrderAggregate.Order to the Ordering.Domain.Aggregates.Customer.Customer.Orders list of the Ordering.Domain.Aggregates.Customer.Customer.
Parameters
lineItems List < OrderLineItem \>
The ordered line items to compose the order.
Returns
ProcessUnbilledProducts\(Guid\)
Do treatment due to payment on customer.
Parameters
payingCustomerId Guid
Quit\(\)
Gets a customer out of the system.
RemoveOrder\(Order\)
Method that remove an Ordering.Domain.Aggregates.OrderAggregate.Order from the Ordering.Domain.Aggregates.Customer.Customer.Orders list of the Ordering.Domain.Aggregates.Customer.Customer.
Parameters
order Order
The Ordering.Domain.Aggregates.OrderAggregate.Order to remove.
RetrievePaidItems\(\)
Retrieve the items that has been paid by the customer.
Returns
List < OrderLineItem \>
SendCustomerCreationEvent\(\)
Method that send the customer created domain event.
ServeCategory\(string\)
Method that validate all the order line items of the customer by the category.
Parameters
categoryName string
ServeServingPeriod\(ServingPeriod\)
Method that validate all the order line items of the customer by the serving period.
Parameters
servingPeriod ServingPeriod
UnlinkEveryPaidItemsFromTheCustomerWithId\(Guid\)
Parameters
customerToRemoveGuid Guid
ValidatePaymentMadeByCustomerWithId\(Guid\)
Do treatment due to payment on customer.
Parameters
payingCustomerId Guid