/// <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 (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (FeeType != null) { hashCode = hashCode * 59 + FeeType.GetHashCode(); } if (Amount != null) { hashCode = hashCode * 59 + Amount.GetHashCode(); } if (BalanceRate != null) { hashCode = hashCode * 59 + BalanceRate.GetHashCode(); } if (TransactionRate != null) { hashCode = hashCode * 59 + TransactionRate.GetHashCode(); } if (AccruedRate != null) { hashCode = hashCode * 59 + AccruedRate.GetHashCode(); } if (AccrualFrequency != null) { hashCode = hashCode * 59 + AccrualFrequency.GetHashCode(); } if (Currency != null) { hashCode = hashCode * 59 + Currency.GetHashCode(); } if (AdditionalValue != null) { hashCode = hashCode * 59 + AdditionalValue.GetHashCode(); } if (AdditionalInfo != null) { hashCode = hashCode * 59 + AdditionalInfo.GetHashCode(); } if (AdditionalInfoUri != null) { hashCode = hashCode * 59 + AdditionalInfoUri.GetHashCode(); } if (Discounts != null) { hashCode = hashCode * 59 + Discounts.GetHashCode(); } return(hashCode); } }
/// <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 (Description != null) { hashCode = hashCode * 59 + Description.GetHashCode(); } if (DiscountType != null) { hashCode = hashCode * 59 + DiscountType.GetHashCode(); } if (Amount != null) { hashCode = hashCode * 59 + Amount.GetHashCode(); } if (BalanceRate != null) { hashCode = hashCode * 59 + BalanceRate.GetHashCode(); } if (TransactionRate != null) { hashCode = hashCode * 59 + TransactionRate.GetHashCode(); } if (AccruedRate != null) { hashCode = hashCode * 59 + AccruedRate.GetHashCode(); } if (AdditionalValue != null) { hashCode = hashCode * 59 + AdditionalValue.GetHashCode(); } if (Eligibility != null) { hashCode = hashCode * 59 + Eligibility.GetHashCode(); } if (AdditionalInfo != null) { hashCode = hashCode * 59 + AdditionalInfo.GetHashCode(); } if (AdditionalInfoUri != null) { hashCode = hashCode * 59 + AdditionalInfoUri.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if BankingProductFee instances are equal /// </summary> /// <param name="other">Instance of BankingProductFee to be compared</param> /// <returns>Boolean</returns> public bool Equals(BankingProductFee other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( FeeType == other.FeeType || FeeType != null && FeeType.Equals(other.FeeType) ) && ( Amount == other.Amount || Amount != null && Amount.Equals(other.Amount) ) && ( BalanceRate == other.BalanceRate || BalanceRate != null && BalanceRate.Equals(other.BalanceRate) ) && ( TransactionRate == other.TransactionRate || TransactionRate != null && TransactionRate.Equals(other.TransactionRate) ) && ( AccruedRate == other.AccruedRate || AccruedRate != null && AccruedRate.Equals(other.AccruedRate) ) && ( AccrualFrequency == other.AccrualFrequency || AccrualFrequency != null && AccrualFrequency.Equals(other.AccrualFrequency) ) && ( Currency == other.Currency || Currency != null && Currency.Equals(other.Currency) ) && ( AdditionalValue == other.AdditionalValue || AdditionalValue != null && AdditionalValue.Equals(other.AdditionalValue) ) && ( AdditionalInfo == other.AdditionalInfo || AdditionalInfo != null && AdditionalInfo.Equals(other.AdditionalInfo) ) && ( AdditionalInfoUri == other.AdditionalInfoUri || AdditionalInfoUri != null && AdditionalInfoUri.Equals(other.AdditionalInfoUri) ) && ( Discounts == other.Discounts || Discounts != null && Discounts.SequenceEqual(other.Discounts) )); }
/// <summary> /// Returns true if BankingAccountDiscount instances are equal /// </summary> /// <param name="other">Instance of BankingAccountDiscount to be compared</param> /// <returns>Boolean</returns> public bool Equals(BankingAccountDiscount other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Description == other.Description || Description != null && Description.Equals(other.Description) ) && ( DiscountType == other.DiscountType || DiscountType != null && DiscountType.Equals(other.DiscountType) ) && ( Amount == other.Amount || Amount != null && Amount.Equals(other.Amount) ) && ( BalanceRate == other.BalanceRate || BalanceRate != null && BalanceRate.Equals(other.BalanceRate) ) && ( TransactionRate == other.TransactionRate || TransactionRate != null && TransactionRate.Equals(other.TransactionRate) ) && ( AccruedRate == other.AccruedRate || AccruedRate != null && AccruedRate.Equals(other.AccruedRate) ) && ( AdditionalValue == other.AdditionalValue || AdditionalValue != null && AdditionalValue.Equals(other.AdditionalValue) ) && ( Eligibility == other.Eligibility || Eligibility != null && Eligibility.SequenceEqual(other.Eligibility) ) && ( AdditionalInfo == other.AdditionalInfo || AdditionalInfo != null && AdditionalInfo.Equals(other.AdditionalInfo) ) && ( AdditionalInfoUri == other.AdditionalInfoUri || AdditionalInfoUri != null && AdditionalInfoUri.Equals(other.AdditionalInfoUri) )); }