/// <summary> /// Gets the hash code for this object. /// </summary> /// <returns> /// The hash code for this object. /// </returns> /// <remarks> /// * CA2218: /// * If two objects are equal in value based on the Equals override, they must both return the same value for calls /// to GetHashCode. /// * GetHashCode must be overridden whenever Equals is overridden. /// * It is fine if the value overflows. /// </remarks> public override int GetHashCode() { int result = Id.GetHashCode() + GlobalUserId.GetHashCode() + Expiration.GetHashCode() + CardBrand.GetHashCode() + RewardPrograms.GetHashCode(); if (NameOnCard != null) { result += NameOnCard.GetHashCode(); } if (LastFourDigits != null) { result += LastFourDigits.GetHashCode(); } if (PanToken != null) { result += PanToken.GetHashCode(); } return(result); }
public override int GetHashCode() { int hashCode = 805936600; if (BeginTime != null) { hashCode += BeginTime.GetHashCode(); } if (EndTime != null) { hashCode += EndTime.GetHashCode(); } if (SortOrder != null) { hashCode += SortOrder.GetHashCode(); } if (Cursor != null) { hashCode += Cursor.GetHashCode(); } if (LocationId != null) { hashCode += LocationId.GetHashCode(); } if (Total != null) { hashCode += Total.GetHashCode(); } if (Last4 != null) { hashCode += Last4.GetHashCode(); } if (CardBrand != null) { hashCode += CardBrand.GetHashCode(); } if (Limit != null) { hashCode += Limit.GetHashCode(); } return(hashCode); }
public override int GetHashCode() { unchecked { var hashCode = (BillingAddress != null ? BillingAddress.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CardBrand != null ? CardBrand.GetHashCode() : 0); hashCode = (hashCode * 397) ^ CardExpMonth.GetHashCode(); hashCode = (hashCode * 397) ^ CardExpYear.GetHashCode(); hashCode = (hashCode * 397) ^ (CardLast4 != null ? CardLast4.GetHashCode() : 0); hashCode = (hashCode * 397) ^ CustomerId.GetHashCode(); hashCode = (hashCode * 397) ^ HasCardErrorInDunning.GetHashCode(); hashCode = (hashCode * 397) ^ (PaymentType != null ? PaymentType.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ProcessorName != null ? ProcessorName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (StatusReason != null ? StatusReason.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { int hashCode = 1370361237; if (Id != null) { hashCode += Id.GetHashCode(); } if (CardBrand != null) { hashCode += CardBrand.GetHashCode(); } if (Last4 != null) { hashCode += Last4.GetHashCode(); } if (ExpMonth != null) { hashCode += ExpMonth.GetHashCode(); } if (ExpYear != null) { hashCode += ExpYear.GetHashCode(); } if (CardholderName != null) { hashCode += CardholderName.GetHashCode(); } if (BillingAddress != null) { hashCode += BillingAddress.GetHashCode(); } if (Fingerprint != null) { hashCode += Fingerprint.GetHashCode(); } if (CardType != null) { hashCode += CardType.GetHashCode(); } if (PrepaidType != null) { hashCode += PrepaidType.GetHashCode(); } if (Bin != null) { hashCode += Bin.GetHashCode(); } return(hashCode); }
public override int GetHashCode() { int hashCode = 1002014939; if (Id != null) { hashCode += Id.GetHashCode(); } if (Type != null) { hashCode += Type.GetHashCode(); } if (Name != null) { hashCode += Name.GetHashCode(); } if (EmployeeId != null) { hashCode += EmployeeId.GetHashCode(); } if (ReceiptUrl != null) { hashCode += ReceiptUrl.GetHashCode(); } if (CardBrand != null) { hashCode += CardBrand.GetHashCode(); } if (PanSuffix != null) { hashCode += PanSuffix.GetHashCode(); } if (EntryMethod != null) { hashCode += EntryMethod.GetHashCode(); } if (PaymentNote != null) { hashCode += PaymentNote.GetHashCode(); } if (TotalMoney != null) { hashCode += TotalMoney.GetHashCode(); } if (TenderedMoney != null) { hashCode += TenderedMoney.GetHashCode(); } if (TenderedAt != null) { hashCode += TenderedAt.GetHashCode(); } if (SettledAt != null) { hashCode += SettledAt.GetHashCode(); } if (ChangeBackMoney != null) { hashCode += ChangeBackMoney.GetHashCode(); } if (RefundedMoney != null) { hashCode += RefundedMoney.GetHashCode(); } if (IsExchange != null) { hashCode += IsExchange.GetHashCode(); } return(hashCode); }
public override int GetHashCode() { int hashCode = 1993475725; if (DisputeId != null) { hashCode += DisputeId.GetHashCode(); } if (AmountMoney != null) { hashCode += AmountMoney.GetHashCode(); } if (Reason != null) { hashCode += Reason.GetHashCode(); } if (State != null) { hashCode += State.GetHashCode(); } if (DueAt != null) { hashCode += DueAt.GetHashCode(); } if (DisputedPayment != null) { hashCode += DisputedPayment.GetHashCode(); } if (EvidenceIds != null) { hashCode += EvidenceIds.GetHashCode(); } if (CardBrand != null) { hashCode += CardBrand.GetHashCode(); } if (CreatedAt != null) { hashCode += CreatedAt.GetHashCode(); } if (UpdatedAt != null) { hashCode += UpdatedAt.GetHashCode(); } if (BrandDisputeId != null) { hashCode += BrandDisputeId.GetHashCode(); } if (ReportedDate != null) { hashCode += ReportedDate.GetHashCode(); } if (Version != null) { hashCode += Version.GetHashCode(); } if (LocationId != null) { hashCode += LocationId.GetHashCode(); } return(hashCode); }