public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is CardPaymentTimeline other && ((AuthorizedAt == null && other.AuthorizedAt == null) || (AuthorizedAt?.Equals(other.AuthorizedAt) == true)) && ((CapturedAt == null && other.CapturedAt == null) || (CapturedAt?.Equals(other.CapturedAt) == true)) && ((VoidedAt == null && other.VoidedAt == null) || (VoidedAt?.Equals(other.VoidedAt) == true))); }
public override int GetHashCode() { int hashCode = -1762221342; if (AuthorizedAt != null) { hashCode += AuthorizedAt.GetHashCode(); } if (CapturedAt != null) { hashCode += CapturedAt.GetHashCode(); } if (VoidedAt != null) { hashCode += VoidedAt.GetHashCode(); } return(hashCode); }
public void MergeFrom(FolioCardSale other) { if (other == null) { return; } if (other.sale_ != null) { if (sale_ == null) { sale_ = new global::HOLMS.Types.Money.Cards.Transactions.PaymentCardSaleIndicator(); } Sale.MergeFrom(other.Sale); } if (other.card_ != null) { if (card_ == null) { card_ = new global::HOLMS.Types.Folio.FolioGuestPaymentCard(); } Card.MergeFrom(other.Card); } if (other.Purpose != 0) { Purpose = other.Purpose; } if (other.SaleState != 0) { SaleState = other.SaleState; } if (other.openAuthorized_ != null) { if (openAuthorized_ == null) { openAuthorized_ = new global::HOLMS.Types.Primitive.MonetaryAmount(); } OpenAuthorized.MergeFrom(other.OpenAuthorized); } if (other.captured_ != null) { if (captured_ == null) { captured_ = new global::HOLMS.Types.Primitive.MonetaryAmount(); } Captured.MergeFrom(other.Captured); } if (other.EntryMethod != 0) { EntryMethod = other.EntryMethod; } if (other.authorizedAt_ != null) { if (authorizedAt_ == null) { authorizedAt_ = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } AuthorizedAt.MergeFrom(other.AuthorizedAt); } if (other.capturedAt_ != null) { if (capturedAt_ == null) { capturedAt_ = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } CapturedAt.MergeFrom(other.CapturedAt); } if (other.ApplicationLabel.Length != 0) { ApplicationLabel = other.ApplicationLabel; } if (other.AID.Length != 0) { AID = other.AID; } if (other.ApplicationCrypto.Length != 0) { ApplicationCrypto = other.ApplicationCrypto; } if (other.ApprovalCode.Length != 0) { ApprovalCode = other.ApprovalCode; } if (other.receivedBy_ != null) { if (receivedBy_ == null) { receivedBy_ = new global::HOLMS.Types.IAM.StaffMemberIndicator(); } ReceivedBy.MergeFrom(other.ReceivedBy); } if (other.finalAuthorizedAmount_ != null) { if (finalAuthorizedAmount_ == null) { finalAuthorizedAmount_ = new global::HOLMS.Types.Primitive.MonetaryAmount(); } FinalAuthorizedAmount.MergeFrom(other.FinalAuthorizedAmount); } }
public override int GetHashCode() { int hash = 1; if (sale_ != null) { hash ^= Sale.GetHashCode(); } if (card_ != null) { hash ^= Card.GetHashCode(); } if (Purpose != 0) { hash ^= Purpose.GetHashCode(); } if (SaleState != 0) { hash ^= SaleState.GetHashCode(); } if (openAuthorized_ != null) { hash ^= OpenAuthorized.GetHashCode(); } if (captured_ != null) { hash ^= Captured.GetHashCode(); } if (EntryMethod != 0) { hash ^= EntryMethod.GetHashCode(); } if (authorizedAt_ != null) { hash ^= AuthorizedAt.GetHashCode(); } if (capturedAt_ != null) { hash ^= CapturedAt.GetHashCode(); } if (ApplicationLabel.Length != 0) { hash ^= ApplicationLabel.GetHashCode(); } if (AID.Length != 0) { hash ^= AID.GetHashCode(); } if (ApplicationCrypto.Length != 0) { hash ^= ApplicationCrypto.GetHashCode(); } if (ApprovalCode.Length != 0) { hash ^= ApprovalCode.GetHashCode(); } if (receivedBy_ != null) { hash ^= ReceivedBy.GetHashCode(); } if (finalAuthorizedAmount_ != null) { hash ^= FinalAuthorizedAmount.GetHashCode(); } return(hash); }