示例#1
0
        public override int GetHashCode()
        {
            int hashCode = 699909783;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            return(obj is V1Refund other &&
                   ((Context == null && other.Context == null) || (Context?.Equals(other.Context) == true)) &&
                   ((Type == null && other.Type == null) || (Type?.Equals(other.Type) == true)) &&
                   ((Reason == null && other.Reason == null) || (Reason?.Equals(other.Reason) == true)) &&
                   ((RefundedMoney == null && other.RefundedMoney == null) || (RefundedMoney?.Equals(other.RefundedMoney) == true)) &&
                   ((RefundedProcessingFeeMoney == null && other.RefundedProcessingFeeMoney == null) || (RefundedProcessingFeeMoney?.Equals(other.RefundedProcessingFeeMoney) == true)) &&
                   ((RefundedTaxMoney == null && other.RefundedTaxMoney == null) || (RefundedTaxMoney?.Equals(other.RefundedTaxMoney) == true)) &&
                   ((RefundedAdditiveTaxMoney == null && other.RefundedAdditiveTaxMoney == null) || (RefundedAdditiveTaxMoney?.Equals(other.RefundedAdditiveTaxMoney) == true)) &&
                   ((RefundedAdditiveTax == null && other.RefundedAdditiveTax == null) || (RefundedAdditiveTax?.Equals(other.RefundedAdditiveTax) == true)) &&
                   ((RefundedInclusiveTaxMoney == null && other.RefundedInclusiveTaxMoney == null) || (RefundedInclusiveTaxMoney?.Equals(other.RefundedInclusiveTaxMoney) == true)) &&
                   ((RefundedInclusiveTax == null && other.RefundedInclusiveTax == null) || (RefundedInclusiveTax?.Equals(other.RefundedInclusiveTax) == true)) &&
                   ((RefundedTipMoney == null && other.RefundedTipMoney == null) || (RefundedTipMoney?.Equals(other.RefundedTipMoney) == true)) &&
                   ((RefundedDiscountMoney == null && other.RefundedDiscountMoney == null) || (RefundedDiscountMoney?.Equals(other.RefundedDiscountMoney) == true)) &&
                   ((RefundedSurchargeMoney == null && other.RefundedSurchargeMoney == null) || (RefundedSurchargeMoney?.Equals(other.RefundedSurchargeMoney) == true)) &&
                   ((RefundedSurcharges == null && other.RefundedSurcharges == null) || (RefundedSurcharges?.Equals(other.RefundedSurcharges) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((ProcessedAt == null && other.ProcessedAt == null) || (ProcessedAt?.Equals(other.ProcessedAt) == true)) &&
                   ((PaymentId == null && other.PaymentId == null) || (PaymentId?.Equals(other.PaymentId) == true)) &&
                   ((MerchantId == null && other.MerchantId == null) || (MerchantId?.Equals(other.MerchantId) == true)) &&
                   ((IsExchange == null && other.IsExchange == null) || (IsExchange?.Equals(other.IsExchange) == true)));
        }