public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (merchantId_ != null)
            {
                hash ^= MerchantId.GetHashCode();
            }
            if (paymentCard_ != null)
            {
                hash ^= PaymentCard.GetHashCode();
            }
            if (authorizedAmount_ != null)
            {
                hash ^= AuthorizedAmount.GetHashCode();
            }
            if (capturedAmount_ != null)
            {
                hash ^= CapturedAmount.GetHashCode();
            }
            if (HostReferenceNumber.Length != 0)
            {
                hash ^= HostReferenceNumber.GetHashCode();
            }
            if (EntryMethod != 0)
            {
                hash ^= EntryMethod.GetHashCode();
            }
            if (authorization_ != null)
            {
                hash ^= Authorization.GetHashCode();
            }
            if (State != 0)
            {
                hash ^= State.GetHashCode();
            }
            hash ^= increases_.GetHashCode();
            hash ^= reversals_.GetHashCode();
            hash ^= captures_.GetHashCode();
            hash ^= voids_.GetHashCode();
            if (FolioBookingNumber.Length != 0)
            {
                hash ^= FolioBookingNumber.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 2
0
 public void MergeFrom(PaymentCardSale other)
 {
     if (other == null)
     {
         return;
     }
     if (other.entityId_ != null)
     {
         if (entityId_ == null)
         {
             entityId_ = new global::HOLMS.Types.Money.Cards.Transactions.PaymentCardSaleIndicator();
         }
         EntityId.MergeFrom(other.EntityId);
     }
     if (other.merchantId_ != null)
     {
         if (merchantId_ == null)
         {
             merchantId_ = new global::HOLMS.Types.Money.Cards.CardMerchantIndicator();
         }
         MerchantId.MergeFrom(other.MerchantId);
     }
     if (other.paymentCard_ != null)
     {
         if (paymentCard_ == null)
         {
             paymentCard_ = new global::HOLMS.Types.Money.Cards.GuestPaymentCard();
         }
         PaymentCard.MergeFrom(other.PaymentCard);
     }
     if (other.authorizedAmount_ != null)
     {
         if (authorizedAmount_ == null)
         {
             authorizedAmount_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         AuthorizedAmount.MergeFrom(other.AuthorizedAmount);
     }
     if (other.capturedAmount_ != null)
     {
         if (capturedAmount_ == null)
         {
             capturedAmount_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         CapturedAmount.MergeFrom(other.CapturedAmount);
     }
     if (other.HostReferenceNumber.Length != 0)
     {
         HostReferenceNumber = other.HostReferenceNumber;
     }
     if (other.EntryMethod != 0)
     {
         EntryMethod = other.EntryMethod;
     }
     if (other.authorization_ != null)
     {
         if (authorization_ == null)
         {
             authorization_ = new global::HOLMS.Types.Money.Cards.Transactions.PaymentCardAuthorization();
         }
         Authorization.MergeFrom(other.Authorization);
     }
     if (other.State != 0)
     {
         State = other.State;
     }
     increases_.Add(other.increases_);
     reversals_.Add(other.reversals_);
     captures_.Add(other.captures_);
     voids_.Add(other.voids_);
 }