Exemplo n.º 1
0
 public void MergeFrom(PretaxIncidentalReservationNightlyQuote other)
 {
     if (other == null)
     {
         return;
     }
     if (other.incidentalPrice_ != null)
     {
         if (incidentalPrice_ == null)
         {
             incidentalPrice_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         IncidentalPrice.MergeFrom(other.IncidentalPrice);
     }
     if (other.incidentalItem_ != null)
     {
         if (incidentalItem_ == null)
         {
             incidentalItem_ = new global::HOLMS.Types.Supply.IncidentalItems.IncidentalItemIndicator();
         }
         IncidentalItem.MergeFrom(other.IncidentalItem);
     }
     if (other.opsdate_ != null)
     {
         if (opsdate_ == null)
         {
             opsdate_ = new global::HOLMS.Types.Primitive.PbLocalDate();
         }
         Opsdate.MergeFrom(other.Opsdate);
     }
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            if (ChargeCreditType != 0)
            {
                hash ^= ChargeCreditType.GetHashCode();
            }
            if (untaxedAmount_ != null)
            {
                hash ^= UntaxedAmount.GetHashCode();
            }
            if (TaxExempt != false)
            {
                hash ^= TaxExempt.GetHashCode();
            }
            if (incidentalItem_ != null)
            {
                hash ^= IncidentalItem.GetHashCode();
            }
            if (chargeOpsdate_ != null)
            {
                hash ^= ChargeOpsdate.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (amount_ != null)
            {
                hash ^= Amount.GetHashCode();
            }
            if (Narration.Length != 0)
            {
                hash ^= Narration.GetHashCode();
            }
            if (ChargeCreditType != 0)
            {
                hash ^= ChargeCreditType.GetHashCode();
            }
            if (effectiveForOpsdate_ != null)
            {
                hash ^= EffectiveForOpsdate.GetHashCode();
            }
            if (effectiveAtClock_ != null)
            {
                hash ^= EffectiveAtClock.GetHashCode();
            }
            if (incidentalItem_ != null)
            {
                hash ^= IncidentalItem.GetHashCode();
            }
            if (incurredBy_ != null)
            {
                hash ^= IncurredBy.GetHashCode();
            }
            if (IssuanceSchedule != 0)
            {
                hash ^= IssuanceSchedule.GetHashCode();
            }
            if (enteredBy_ != null)
            {
                hash ^= EnteredBy.GetHashCode();
            }
            if (id_ != null)
            {
                hash ^= Id.GetHashCode();
            }
            if (taxes_ != null)
            {
                hash ^= Taxes.GetHashCode();
            }
            if (fees_ != null)
            {
                hash ^= Fees.GetHashCode();
            }
            hash ^= currentTaxAssessments_.GetHashCode();
            return(hash);
        }
Exemplo n.º 4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (incidentalPrice_ != null)
            {
                hash ^= IncidentalPrice.GetHashCode();
            }
            if (incidentalItem_ != null)
            {
                hash ^= IncidentalItem.GetHashCode();
            }
            if (opsdate_ != null)
            {
                hash ^= Opsdate.GetHashCode();
            }
            return(hash);
        }
        public IncidentalItem Build()
        {
            var item = new IncidentalItem {
                EntityId        = _entityId,
                Description     = _itemName ?? string.Empty,
                QuanityOwned    = (uint)_quantityOwned,
                Price           = _price.ToPb,
                IncursTaxes     = _incursTaxes,
                IncursFees      = _incursFees,
                ChargeFrequency = _itemChargeFrequency
            };

            if (_revenueAccount != null)
            {
                item.RevenueAccount = _revenueAccount;
            }

            return(item);
        }
 public void MergeFrom(RequestedChargeCreditPosting other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Description.Length != 0)
     {
         Description = other.Description;
     }
     if (other.ChargeCreditType != 0)
     {
         ChargeCreditType = other.ChargeCreditType;
     }
     if (other.untaxedAmount_ != null)
     {
         if (untaxedAmount_ == null)
         {
             untaxedAmount_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         UntaxedAmount.MergeFrom(other.UntaxedAmount);
     }
     if (other.TaxExempt != false)
     {
         TaxExempt = other.TaxExempt;
     }
     if (other.incidentalItem_ != null)
     {
         if (incidentalItem_ == null)
         {
             incidentalItem_ = new global::HOLMS.Types.Supply.IncidentalItems.IncidentalItemIndicator();
         }
         IncidentalItem.MergeFrom(other.IncidentalItem);
     }
     if (other.chargeOpsdate_ != null)
     {
         if (chargeOpsdate_ == null)
         {
             chargeOpsdate_ = new global::HOLMS.Types.Primitive.PbLocalDate();
         }
         ChargeOpsdate.MergeFrom(other.ChargeOpsdate);
     }
 }
 public void MergeFrom(FolioAtomicCharge other)
 {
     if (other == null)
     {
         return;
     }
     if (other.amount_ != null)
     {
         if (amount_ == null)
         {
             amount_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         Amount.MergeFrom(other.Amount);
     }
     if (other.Narration.Length != 0)
     {
         Narration = other.Narration;
     }
     if (other.ChargeCreditType != 0)
     {
         ChargeCreditType = other.ChargeCreditType;
     }
     if (other.effectiveForOpsdate_ != null)
     {
         if (effectiveForOpsdate_ == null)
         {
             effectiveForOpsdate_ = new global::HOLMS.Types.Primitive.PbLocalDate();
         }
         EffectiveForOpsdate.MergeFrom(other.EffectiveForOpsdate);
     }
     if (other.effectiveAtClock_ != null)
     {
         if (effectiveAtClock_ == null)
         {
             effectiveAtClock_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         EffectiveAtClock.MergeFrom(other.EffectiveAtClock);
     }
     if (other.incidentalItem_ != null)
     {
         if (incidentalItem_ == null)
         {
             incidentalItem_ = new global::HOLMS.Types.Supply.IncidentalItems.IncidentalItemIndicator();
         }
         IncidentalItem.MergeFrom(other.IncidentalItem);
     }
     if (other.incurredBy_ != null)
     {
         if (incurredBy_ == null)
         {
             incurredBy_ = new global::HOLMS.Types.Folio.FolioIndicator();
         }
         IncurredBy.MergeFrom(other.IncurredBy);
     }
     if (other.IssuanceSchedule != 0)
     {
         IssuanceSchedule = other.IssuanceSchedule;
     }
     if (other.enteredBy_ != null)
     {
         if (enteredBy_ == null)
         {
             enteredBy_ = new global::HOLMS.Types.IAM.StaffMemberIndicator();
         }
         EnteredBy.MergeFrom(other.EnteredBy);
     }
     if (other.id_ != null)
     {
         if (id_ == null)
         {
             id_ = new global::HOLMS.Types.Primitive.Uuid();
         }
         Id.MergeFrom(other.Id);
     }
     if (other.taxes_ != null)
     {
         if (taxes_ == null)
         {
             taxes_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         Taxes.MergeFrom(other.Taxes);
     }
     if (other.fees_ != null)
     {
         if (fees_ == null)
         {
             fees_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         Fees.MergeFrom(other.Fees);
     }
     currentTaxAssessments_.Add(other.currentTaxAssessments_);
 }