public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is Card other && ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) && ((CardBrand == null && other.CardBrand == null) || (CardBrand?.Equals(other.CardBrand) == true)) && ((Last4 == null && other.Last4 == null) || (Last4?.Equals(other.Last4) == true)) && ((ExpMonth == null && other.ExpMonth == null) || (ExpMonth?.Equals(other.ExpMonth) == true)) && ((ExpYear == null && other.ExpYear == null) || (ExpYear?.Equals(other.ExpYear) == true)) && ((CardholderName == null && other.CardholderName == null) || (CardholderName?.Equals(other.CardholderName) == true)) && ((BillingAddress == null && other.BillingAddress == null) || (BillingAddress?.Equals(other.BillingAddress) == true)) && ((Fingerprint == null && other.Fingerprint == null) || (Fingerprint?.Equals(other.Fingerprint) == true)) && ((CardType == null && other.CardType == null) || (CardType?.Equals(other.CardType) == true)) && ((PrepaidType == null && other.PrepaidType == null) || (PrepaidType?.Equals(other.PrepaidType) == true)) && ((Bin == null && other.Bin == null) || (Bin?.Equals(other.Bin) == true))); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is ListPaymentsRequest other && ((BeginTime == null && other.BeginTime == null) || (BeginTime?.Equals(other.BeginTime) == true)) && ((EndTime == null && other.EndTime == null) || (EndTime?.Equals(other.EndTime) == true)) && ((SortOrder == null && other.SortOrder == null) || (SortOrder?.Equals(other.SortOrder) == true)) && ((Cursor == null && other.Cursor == null) || (Cursor?.Equals(other.Cursor) == true)) && ((LocationId == null && other.LocationId == null) || (LocationId?.Equals(other.LocationId) == true)) && ((Total == null && other.Total == null) || (Total?.Equals(other.Total) == true)) && ((Last4 == null && other.Last4 == null) || (Last4?.Equals(other.Last4) == true)) && ((CardBrand == null && other.CardBrand == null) || (CardBrand?.Equals(other.CardBrand) == true)) && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true))); }
/// <summary> /// Returns true if Card instances are equal /// </summary> /// <param name="other">Instance of Card to be compared</param> /// <returns>Boolean</returns> public bool Equals(CardSource other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( CustomerId == other.CustomerId || CustomerId != null && CustomerId.Equals(other.CustomerId) ) && ( ExpiryMonth == other.ExpiryMonth || ExpiryMonth != null && ExpiryMonth.Equals(other.ExpiryMonth) ) && ( ExpiryYear == other.ExpiryYear || ExpiryYear != null && ExpiryYear.Equals(other.ExpiryYear) ) && ( BillingDetails == other.BillingDetails || BillingDetails != null && BillingDetails.Equals(other.BillingDetails) ) && ( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( Last4 == other.Last4 || Last4 != null && Last4.Equals(other.Last4) ) && ( PaymentMethod == other.PaymentMethod || PaymentMethod != null && PaymentMethod.Equals(other.PaymentMethod) ) && ( Fingerprint == other.Fingerprint || Fingerprint != null && Fingerprint.Equals(other.Fingerprint) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( CvvCheck == other.CvvCheck || CvvCheck != null && CvvCheck.Equals(other.CvvCheck) ) && ( AvsCheck == other.AvsCheck || AvsCheck != null && AvsCheck.Equals(other.AvsCheck) )); }