示例#1
0
        /// <summary>
        /// Returns true if RefundPaymentProduct840CustomerAccount instances are equal
        /// </summary>
        /// <param name="other">Instance of RefundPaymentProduct840CustomerAccount to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(RefundPaymentProduct840CustomerAccount other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

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

            return
                ((
                     AccountId == other.AccountId ||
                     AccountId != null &&
                     AccountId.Equals(other.AccountId)
                     ) &&
                 (
                     BillingAgreementId == other.BillingAgreementId ||
                     BillingAgreementId != null &&
                     BillingAgreementId.Equals(other.BillingAgreementId)
                 ) &&
                 (
                     CompanyName == other.CompanyName ||
                     CompanyName != null &&
                     CompanyName.Equals(other.CompanyName)
                 ) &&
                 (
                     CountryCode == other.CountryCode ||
                     CountryCode != null &&
                     CountryCode.Equals(other.CountryCode)
                 ) &&
                 (
                     CustomerAccountStatus == other.CustomerAccountStatus ||
                     CustomerAccountStatus != null &&
                     CustomerAccountStatus.Equals(other.CustomerAccountStatus)
                 ) &&
                 (
                     CustomerAddressStatus == other.CustomerAddressStatus ||
                     CustomerAddressStatus != null &&
                     CustomerAddressStatus.Equals(other.CustomerAddressStatus)
                 ) &&
                 (
                     FirstName == other.FirstName ||
                     FirstName != null &&
                     FirstName.Equals(other.FirstName)
                 ) &&
                 (
                     PayerId == other.PayerId ||
                     PayerId != null &&
                     PayerId.Equals(other.PayerId)
                 ) &&
                 (
                     Surname == other.Surname ||
                     Surname != null &&
                     Surname.Equals(other.Surname)
                 ));
        }
 /// <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 (AccountId != null)
         {
             hashCode = hashCode * 59 + AccountId.GetHashCode();
         }
         if (BillingAgreementId != null)
         {
             hashCode = hashCode * 59 + BillingAgreementId.GetHashCode();
         }
         if (CompanyName != null)
         {
             hashCode = hashCode * 59 + CompanyName.GetHashCode();
         }
         if (CountryCode != null)
         {
             hashCode = hashCode * 59 + CountryCode.GetHashCode();
         }
         if (CustomerAccountStatus != null)
         {
             hashCode = hashCode * 59 + CustomerAccountStatus.GetHashCode();
         }
         if (CustomerAddressStatus != null)
         {
             hashCode = hashCode * 59 + CustomerAddressStatus.GetHashCode();
         }
         if (FirstName != null)
         {
             hashCode = hashCode * 59 + FirstName.GetHashCode();
         }
         if (PayerId != null)
         {
             hashCode = hashCode * 59 + PayerId.GetHashCode();
         }
         if (Surname != null)
         {
             hashCode = hashCode * 59 + Surname.GetHashCode();
         }
         return(hashCode);
     }
 }
示例#4
0
 /// <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 (CustomerAccountStatus != null)
         {
             hashCode = hashCode * 59 + CustomerAccountStatus.GetHashCode();
         }
         if (CustomerAddressStatus != null)
         {
             hashCode = hashCode * 59 + CustomerAddressStatus.GetHashCode();
         }
         if (PayerId != null)
         {
             hashCode = hashCode * 59 + PayerId.GetHashCode();
         }
         return(hashCode);
     }
 }