예제 #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is CardPaymentDetails other &&
                   ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) &&
                   ((Card == null && other.Card == null) || (Card?.Equals(other.Card) == true)) &&
                   ((EntryMethod == null && other.EntryMethod == null) || (EntryMethod?.Equals(other.EntryMethod) == true)) &&
                   ((CvvStatus == null && other.CvvStatus == null) || (CvvStatus?.Equals(other.CvvStatus) == true)) &&
                   ((AvsStatus == null && other.AvsStatus == null) || (AvsStatus?.Equals(other.AvsStatus) == true)) &&
                   ((AuthResultCode == null && other.AuthResultCode == null) || (AuthResultCode?.Equals(other.AuthResultCode) == true)) &&
                   ((ApplicationIdentifier == null && other.ApplicationIdentifier == null) || (ApplicationIdentifier?.Equals(other.ApplicationIdentifier) == true)) &&
                   ((ApplicationName == null && other.ApplicationName == null) || (ApplicationName?.Equals(other.ApplicationName) == true)) &&
                   ((ApplicationCryptogram == null && other.ApplicationCryptogram == null) || (ApplicationCryptogram?.Equals(other.ApplicationCryptogram) == true)) &&
                   ((VerificationMethod == null && other.VerificationMethod == null) || (VerificationMethod?.Equals(other.VerificationMethod) == true)) &&
                   ((VerificationResults == null && other.VerificationResults == null) || (VerificationResults?.Equals(other.VerificationResults) == true)) &&
                   ((StatementDescription == null && other.StatementDescription == null) || (StatementDescription?.Equals(other.StatementDescription) == true)) &&
                   ((DeviceDetails == null && other.DeviceDetails == null) || (DeviceDetails?.Equals(other.DeviceDetails) == true)) &&
                   ((CardPaymentTimeline == null && other.CardPaymentTimeline == null) || (CardPaymentTimeline?.Equals(other.CardPaymentTimeline) == true)) &&
                   ((RefundRequiresCardPresence == null && other.RefundRequiresCardPresence == null) || (RefundRequiresCardPresence?.Equals(other.RefundRequiresCardPresence) == true)) &&
                   ((Errors == null && other.Errors == null) || (Errors?.Equals(other.Errors) == true)));
        }
예제 #2
0
 protected void ToString(List <string> toStringOutput)
 {
     toStringOutput.Add($"Status = {(Status == null ? "null" : Status == string.Empty ? "" : Status)}");
     toStringOutput.Add($"Card = {(Card == null ? "null" : Card.ToString())}");
     toStringOutput.Add($"EntryMethod = {(EntryMethod == null ? "null" : EntryMethod == string.Empty ? "" : EntryMethod)}");
     toStringOutput.Add($"CvvStatus = {(CvvStatus == null ? "null" : CvvStatus == string.Empty ? "" : CvvStatus)}");
     toStringOutput.Add($"AvsStatus = {(AvsStatus == null ? "null" : AvsStatus == string.Empty ? "" : AvsStatus)}");
     toStringOutput.Add($"AuthResultCode = {(AuthResultCode == null ? "null" : AuthResultCode == string.Empty ? "" : AuthResultCode)}");
     toStringOutput.Add($"ApplicationIdentifier = {(ApplicationIdentifier == null ? "null" : ApplicationIdentifier == string.Empty ? "" : ApplicationIdentifier)}");
     toStringOutput.Add($"ApplicationName = {(ApplicationName == null ? "null" : ApplicationName == string.Empty ? "" : ApplicationName)}");
     toStringOutput.Add($"ApplicationCryptogram = {(ApplicationCryptogram == null ? "null" : ApplicationCryptogram == string.Empty ? "" : ApplicationCryptogram)}");
     toStringOutput.Add($"VerificationMethod = {(VerificationMethod == null ? "null" : VerificationMethod == string.Empty ? "" : VerificationMethod)}");
     toStringOutput.Add($"VerificationResults = {(VerificationResults == null ? "null" : VerificationResults == string.Empty ? "" : VerificationResults)}");
     toStringOutput.Add($"StatementDescription = {(StatementDescription == null ? "null" : StatementDescription == string.Empty ? "" : StatementDescription)}");
     toStringOutput.Add($"DeviceDetails = {(DeviceDetails == null ? "null" : DeviceDetails.ToString())}");
     toStringOutput.Add($"CardPaymentTimeline = {(CardPaymentTimeline == null ? "null" : CardPaymentTimeline.ToString())}");
     toStringOutput.Add($"RefundRequiresCardPresence = {(RefundRequiresCardPresence == null ? "null" : RefundRequiresCardPresence.ToString())}");
     toStringOutput.Add($"Errors = {(Errors == null ? "null" : $"[{ string.Join(", ", Errors)} ]")}");
 }
예제 #3
0
        public override int GetHashCode()
        {
            int hashCode = 1465447186;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            return(hashCode);
        }