/// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (CardholderName != null)
         {
             hashCode = hashCode * 59 + CardholderName.GetHashCode();
         }
         if (Cryptogram != null)
         {
             hashCode = hashCode * 59 + Cryptogram.GetHashCode();
         }
         if (Dpan != null)
         {
             hashCode = hashCode * 59 + Dpan.GetHashCode();
         }
         if (Eci != null)
         {
             hashCode = hashCode * 59 + Eci.GetHashCode();
         }
         if (ExpiryDate != null)
         {
             hashCode = hashCode * 59 + ExpiryDate.GetHashCode();
         }
         return(hashCode);
     }
 }
        /// <summary>
        /// Returns true if DecryptedPaymentData instances are equal
        /// </summary>
        /// <param name="other">Instance of DecryptedPaymentData to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DecryptedPaymentData other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     CardholderName == other.CardholderName ||
                     CardholderName != null &&
                     CardholderName.Equals(other.CardholderName)
                     ) &&
                 (
                     Cryptogram == other.Cryptogram ||
                     Cryptogram != null &&
                     Cryptogram.Equals(other.Cryptogram)
                 ) &&
                 (
                     Dpan == other.Dpan ||
                     Dpan != null &&
                     Dpan.Equals(other.Dpan)
                 ) &&
                 (
                     Eci == other.Eci ||
                     Eci != null &&
                     Eci.Equals(other.Eci)
                 ) &&
                 (
                     ExpiryDate == other.ExpiryDate ||
                     ExpiryDate != null &&
                     ExpiryDate.Equals(other.ExpiryDate)
                 ));
        }
        /// <summary>
        /// Returns true if MobilePaymentData instances are equal
        /// </summary>
        /// <param name="other">Instance of MobilePaymentData to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(MobilePaymentData other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Dpan == other.Dpan ||
                     Dpan != null &&
                     Dpan.Equals(other.Dpan)
                     ) &&
                 (
                     ExpiryDate == other.ExpiryDate ||
                     ExpiryDate != null &&
                     ExpiryDate.Equals(other.ExpiryDate)
                 ));
        }