Class OrderLineItem
Namespace: Ordering.Domain.Aggregates.OrderAggregate
Assembly: Ordering.Domain.dll
Object that serve as a mapping table between order and product id's whom are stored in it.
Inheritance
object ← Entity ← OrderLineItem
Implements
Inherited Members
Entity.Id, Entity.CreatedAt, Entity.UpdatedAt, Entity.DomainEvents, Entity.EmitDomainEvent\(IDomainEvent\), object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.MemberwiseClone\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)
Constructors
OrderLineItem\(\)
OrderLineItem\(Guid, string, CategoryProductData?, VatRate?, double, int\)
Parameters
productId Guid
name string
categoryProductData CategoryProductData?
vatRate VatRate?
unitPrice double
quantity int
Properties
CategoryProductData
Data of the category of the product from which the line item was formed. Null if the product base is a formula.
Property Value
ExternalPaymentId
Id of the product on stripe catalog.
Property Value
Instructions
The specific instructions for the product.
Property Value
IsAcknowledged
Boolean that says if the line item has been acknowledged.
Property Value
IsCanceled
Boolean that says if the line item is canceled.
Property Value
IsPaid
Boolean that says if the lineItem is paid.
Property Value
IsRefunded
Boolean that says if the lineItem has been refunded by staff.
Property Value
IsServed
Boolean that says if the line item has been served.
Property Value
Name
Name of the line item.
Property Value
OrderId
Guid of the order.
Property Value
PayingCustomerId
Id of the customer who is paying for the line item.
Property Value
Guid?
Personalizations
The personalization for the product.
Property Value
ProductId
Guid of the product.
Property Value
Quantity
Quantity of the product to add on the order.
Property Value
TotalPrice
Total price of the line item.
Property Value
UnitPrice
Unit price of the line item.
Property Value
VatRate
Enum of the VAT for the line item. Null if the product base is a formula.
Property Value
Methods
Acknowledge\(\)
Method that set an order line item acknowledgement.
CanBeServedByCategory\(string\)
Parameters
categoryName string
Returns
CanBeServedByPeriod\(ServingPeriod\)
Parameters
servingPeriod ServingPeriod
Returns
CanBeToggledByCustomerWithId\(Guid\)
Tell if a customer can toggle the line item paying customer id.
Parameters
customerId Guid
Id of the customer who want to toggle the line item paying customer id.
Returns
Cancel\(\)
Method that set an order line item to canceled state.
HasBeenCanceled\(\)
Returns
HasBeenPaid\(\)
Returns
HasBeenServed\(\)
Returns
HasBeenUnbilled\(\)
Returns
IsFinanciallyResolved\(\)
Returns
IsPartOfCategory\(string\)
Parameters
categoryName string
Returns
IsPartOfServingPeriod\(ServingPeriod\)
Parameters
servingPeriod ServingPeriod
Returns
IsUnassignedAndUnpaid\(\)
Tell if the line item is remaining.
Returns
IsWaitingForPayment\(\)
Returns
LinkToCustomer\(Guid\)
Parameters
movingCustomerId Guid
NeedsPayment\(\)
Returns
Pay\(\)
Method that set an order line item to paid state.
RemovePayingCustomer\(\)
Remove the paying customer from item.
Serve\(\)
Method that set an order line item to served state.
TogglePayingCustomerId\(Guid, Guid\)
Method that toggle the paying customer id of the line item.
Parameters
togglingCustomerId Guid
tableId Guid
UpdateQuantity\(int\)
Method that update the quantity of the line item.
Parameters
quantity int
The new quantity of the line item.
WithExternalPaymentId\(string\)
Parameters
externalPaymentId string
Returns
OrderLineItem
WithInstructions\(string?\)
Parameters
instructions string?
Returns
OrderLineItem
WithPayingCustomerId\(Guid\)
Parameters
payingCustomerId Guid
Returns
OrderLineItem
WithPersonalizations\(List<OrderLinePersonalization\>\)
Parameters
personalizations List < OrderLinePersonalization \>
Returns
OrderLineItem