public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is LoyaltyProgramRewardDefinition other && ((Scope == null && other.Scope == null) || (Scope?.Equals(other.Scope) == true)) && ((DiscountType == null && other.DiscountType == null) || (DiscountType?.Equals(other.DiscountType) == true)) && ((PercentageDiscount == null && other.PercentageDiscount == null) || (PercentageDiscount?.Equals(other.PercentageDiscount) == true)) && ((CatalogObjectIds == null && other.CatalogObjectIds == null) || (CatalogObjectIds?.Equals(other.CatalogObjectIds) == true)) && ((FixedDiscountMoney == null && other.FixedDiscountMoney == null) || (FixedDiscountMoney?.Equals(other.FixedDiscountMoney) == true)) && ((MaxDiscountMoney == null && other.MaxDiscountMoney == null) || (MaxDiscountMoney?.Equals(other.MaxDiscountMoney) == true))); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is CatalogDiscount other && ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) && ((DiscountType == null && other.DiscountType == null) || (DiscountType?.Equals(other.DiscountType) == true)) && ((Percentage == null && other.Percentage == null) || (Percentage?.Equals(other.Percentage) == true)) && ((AmountMoney == null && other.AmountMoney == null) || (AmountMoney?.Equals(other.AmountMoney) == true)) && ((PinRequired == null && other.PinRequired == null) || (PinRequired?.Equals(other.PinRequired) == true)) && ((LabelColor == null && other.LabelColor == null) || (LabelColor?.Equals(other.LabelColor) == true)) && ((ModifyTaxBasis == null && other.ModifyTaxBasis == null) || (ModifyTaxBasis?.Equals(other.ModifyTaxBasis) == true))); }
/// <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) )); }