Example #1
0
 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);
     }
 }
Example #2
0
        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);
        }