/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (DiscountAmount != null) { hashCode = hashCode * 59 + DiscountAmount.GetHashCode(); } if (GoogleProductCategoryId != null) { hashCode = hashCode * 59 + GoogleProductCategoryId.GetHashCode(); } if (LineAmountTotal != null) { hashCode = hashCode * 59 + LineAmountTotal.GetHashCode(); } if (ProductCategory != null) { hashCode = hashCode * 59 + ProductCategory.GetHashCode(); } if (ProductCode != null) { hashCode = hashCode * 59 + ProductCode.GetHashCode(); } if (ProductName != null) { hashCode = hashCode * 59 + ProductName.GetHashCode(); } if (ProductPrice != null) { hashCode = hashCode * 59 + ProductPrice.GetHashCode(); } if (ProductType != null) { hashCode = hashCode * 59 + ProductType.GetHashCode(); } if (Quantity != null) { hashCode = hashCode * 59 + Quantity.GetHashCode(); } if (TaxAmount != null) { hashCode = hashCode * 59 + TaxAmount.GetHashCode(); } if (Unit != null) { hashCode = hashCode * 59 + Unit.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if LineItemLevel3InterchangeInformation instances are equal /// </summary> /// <param name="other">Instance of LineItemLevel3InterchangeInformation to be compared</param> /// <returns>Boolean</returns> public bool Equals(LineItemLevel3InterchangeInformation other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( DiscountAmount == other.DiscountAmount || DiscountAmount != null && DiscountAmount.Equals(other.DiscountAmount) ) && ( LineAmountTotal == other.LineAmountTotal || LineAmountTotal != null && LineAmountTotal.Equals(other.LineAmountTotal) ) && ( ProductCode == other.ProductCode || ProductCode != null && ProductCode.Equals(other.ProductCode) ) && ( ProductPrice == other.ProductPrice || ProductPrice != null && ProductPrice.Equals(other.ProductPrice) ) && ( ProductType == other.ProductType || ProductType != null && ProductType.Equals(other.ProductType) ) && ( Quantity == other.Quantity || Quantity != null && Quantity.Equals(other.Quantity) ) && ( TaxAmount == other.TaxAmount || TaxAmount != null && TaxAmount.Equals(other.TaxAmount) ) && ( Unit == other.Unit || Unit != null && Unit.Equals(other.Unit) )); }
/// <summary> /// Returns true if OrderLineDetails instances are equal /// </summary> /// <param name="other">Instance of OrderLineDetails to be compared</param> /// <returns>Boolean</returns> public bool Equals(OrderLineDetails other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( DiscountAmount == other.DiscountAmount || DiscountAmount != null && DiscountAmount.Equals(other.DiscountAmount) ) && ( GoogleProductCategoryId == other.GoogleProductCategoryId || GoogleProductCategoryId != null && GoogleProductCategoryId.Equals(other.GoogleProductCategoryId) ) && ( LineAmountTotal == other.LineAmountTotal || LineAmountTotal != null && LineAmountTotal.Equals(other.LineAmountTotal) ) && ( ProductCategory == other.ProductCategory || ProductCategory != null && ProductCategory.Equals(other.ProductCategory) ) && ( ProductCode == other.ProductCode || ProductCode != null && ProductCode.Equals(other.ProductCode) ) && ( ProductName == other.ProductName || ProductName != null && ProductName.Equals(other.ProductName) ) && ( ProductPrice == other.ProductPrice || ProductPrice != null && ProductPrice.Equals(other.ProductPrice) ) && ( ProductType == other.ProductType || ProductType != null && ProductType.Equals(other.ProductType) ) && ( Quantity == other.Quantity || Quantity != null && Quantity.Equals(other.Quantity) ) && ( TaxAmount == other.TaxAmount || TaxAmount != null && TaxAmount.Equals(other.TaxAmount) ) && ( Unit == other.Unit || Unit != null && Unit.Equals(other.Unit) )); }