Example #1
0
        public override int GetHashCode()
        {
            int hashCode = -772282082;

            if (Id != null)
            {
                hashCode += Id.GetHashCode();
            }

            if (LocationId != null)
            {
                hashCode += LocationId.GetHashCode();
            }

            if (TransactionId != null)
            {
                hashCode += TransactionId.GetHashCode();
            }

            if (TenderId != null)
            {
                hashCode += TenderId.GetHashCode();
            }

            if (CreatedAt != null)
            {
                hashCode += CreatedAt.GetHashCode();
            }

            if (Reason != null)
            {
                hashCode += Reason.GetHashCode();
            }

            if (AmountMoney != null)
            {
                hashCode += AmountMoney.GetHashCode();
            }

            if (Status != null)
            {
                hashCode += Status.GetHashCode();
            }

            if (ProcessingFeeMoney != null)
            {
                hashCode += ProcessingFeeMoney.GetHashCode();
            }

            if (AdditionalRecipients != null)
            {
                hashCode += AdditionalRecipients.GetHashCode();
            }

            return(hashCode);
        }
Example #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is Refund other &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   ((LocationId == null && other.LocationId == null) || (LocationId?.Equals(other.LocationId) == true)) &&
                   ((TransactionId == null && other.TransactionId == null) || (TransactionId?.Equals(other.TransactionId) == true)) &&
                   ((TenderId == null && other.TenderId == null) || (TenderId?.Equals(other.TenderId) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((Reason == null && other.Reason == null) || (Reason?.Equals(other.Reason) == true)) &&
                   ((AmountMoney == null && other.AmountMoney == null) || (AmountMoney?.Equals(other.AmountMoney) == true)) &&
                   ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) &&
                   ((ProcessingFeeMoney == null && other.ProcessingFeeMoney == null) || (ProcessingFeeMoney?.Equals(other.ProcessingFeeMoney) == true)) &&
                   ((AdditionalRecipients == null && other.AdditionalRecipients == null) || (AdditionalRecipients?.Equals(other.AdditionalRecipients) == true)));
        }