Exemplo n.º 1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is CatalogTax other &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((CalculationPhase == null && other.CalculationPhase == null) || (CalculationPhase?.Equals(other.CalculationPhase) == true)) &&
                   ((InclusionType == null && other.InclusionType == null) || (InclusionType?.Equals(other.InclusionType) == true)) &&
                   ((Percentage == null && other.Percentage == null) || (Percentage?.Equals(other.Percentage) == true)) &&
                   ((AppliesToCustomAmounts == null && other.AppliesToCustomAmounts == null) || (AppliesToCustomAmounts?.Equals(other.AppliesToCustomAmounts) == true)) &&
                   ((Enabled == null && other.Enabled == null) || (Enabled?.Equals(other.Enabled) == true)));
        }
Exemplo n.º 2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is V1PaymentTax other &&
                   ((Errors == null && other.Errors == null) || (Errors?.Equals(other.Errors) == true)) &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((AppliedMoney == null && other.AppliedMoney == null) || (AppliedMoney?.Equals(other.AppliedMoney) == true)) &&
                   ((Rate == null && other.Rate == null) || (Rate?.Equals(other.Rate) == true)) &&
                   ((InclusionType == null && other.InclusionType == null) || (InclusionType?.Equals(other.InclusionType) == true)) &&
                   ((FeeId == null && other.FeeId == null) || (FeeId?.Equals(other.FeeId) == true)));
        }