public Demand(string buyerReference, Category category, float quantity, ICollection <DemandAttributes> demandAttributes)
 {
     BuyerReference   = buyerReference;
     Category         = category;
     Quantity         = quantity;
     Status           = DemandStatusEnum.Created; // Initially is on 'Created' status
     DemandAttributes = demandAttributes.IsNull() ? new List <DemandAttributes>() : demandAttributes;
 }
 public Demand(string buyerReference, Category category, float quantity)
 {
     BuyerReference   = buyerReference;
     Category         = category;
     Quantity         = quantity;
     Status           = DemandStatusEnum.Created; // Initially is on 'Created' status
     DemandAttributes = new List <DemandAttributes>();
 }
 /// <summary>
 /// Creates a new demand from the parameters given.
 /// </summary>
 /// <param name="id">Id of the demand</param>
 /// <param name="buyerId">Id of the buyer that makes the demand</param>
 /// <param name="productType">Product type of the demand</param>
 /// <param name="quantity">Quantity of the product demanded</param>
 /// <param name="status">State of the demand</param>
 /// <param name="attributes">Attributes to get more detail about the demand</param>
 public Demand(Guid id, Guid buyerId, Guid productTypeId, float quantity, DemandStatusEnum status, ICollection <AttributeValue> attributes)
 {
     SetId(id);
     SetBuyerId(buyerId);
     SetProductTypeId(productTypeId);
     SetQuantity(quantity);
     SetStatus(status);
     SetAttributes(attributes);
 }
 public void SetStatus(DemandStatusEnum status)
 {
     Status = status;
 }