public Payment(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");

            if (payerPartyReferenceNode != null)
            {
                if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null)
                {
                    if (payerPartyReferenceNode.Attributes["id"] != null)
                    {
                        payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(payerPartyReferenceNode);
                        IDManager.SetID(payerPartyReferenceIDRef_, ob);
                    }
                    else if (payerPartyReferenceNode.Attributes["href"] != null)
                    {
                        payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
                    }
                }
                else
                {
                    payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
                }
            }


            XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");

            if (payerAccountReferenceNode != null)
            {
                if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null)
                {
                    if (payerAccountReferenceNode.Attributes["id"] != null)
                    {
                        payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value;
                        AccountReference ob = new AccountReference(payerAccountReferenceNode);
                        IDManager.SetID(payerAccountReferenceIDRef_, ob);
                    }
                    else if (payerAccountReferenceNode.Attributes["href"] != null)
                    {
                        payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
                    }
                }
                else
                {
                    payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
                }
            }


            XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");

            if (receiverPartyReferenceNode != null)
            {
                if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null)
                {
                    if (receiverPartyReferenceNode.Attributes["id"] != null)
                    {
                        receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(receiverPartyReferenceNode);
                        IDManager.SetID(receiverPartyReferenceIDRef_, ob);
                    }
                    else if (receiverPartyReferenceNode.Attributes["href"] != null)
                    {
                        receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
                    }
                }
                else
                {
                    receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
                }
            }


            XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");

            if (receiverAccountReferenceNode != null)
            {
                if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null)
                {
                    if (receiverAccountReferenceNode.Attributes["id"] != null)
                    {
                        receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value;
                        AccountReference ob = new AccountReference(receiverAccountReferenceNode);
                        IDManager.SetID(receiverAccountReferenceIDRef_, ob);
                    }
                    else if (receiverAccountReferenceNode.Attributes["href"] != null)
                    {
                        receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
                    }
                }
                else
                {
                    receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
                }
            }


            XmlNode paymentAmountNode = xmlNode.SelectSingleNode("paymentAmount");

            if (paymentAmountNode != null)
            {
                if (paymentAmountNode.Attributes["href"] != null || paymentAmountNode.Attributes["id"] != null)
                {
                    if (paymentAmountNode.Attributes["id"] != null)
                    {
                        paymentAmountIDRef_ = paymentAmountNode.Attributes["id"].Value;
                        NonNegativeMoney ob = new NonNegativeMoney(paymentAmountNode);
                        IDManager.SetID(paymentAmountIDRef_, ob);
                    }
                    else if (paymentAmountNode.Attributes["href"] != null)
                    {
                        paymentAmountIDRef_ = paymentAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentAmount_ = new NonNegativeMoney(paymentAmountNode);
                    }
                }
                else
                {
                    paymentAmount_ = new NonNegativeMoney(paymentAmountNode);
                }
            }


            XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");

            if (paymentDateNode != null)
            {
                if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null)
                {
                    if (paymentDateNode.Attributes["id"] != null)
                    {
                        paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value;
                        AdjustableOrAdjustedDate ob = new AdjustableOrAdjustedDate(paymentDateNode);
                        IDManager.SetID(paymentDateIDRef_, ob);
                    }
                    else if (paymentDateNode.Attributes["href"] != null)
                    {
                        paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentDate_ = new AdjustableOrAdjustedDate(paymentDateNode);
                    }
                }
                else
                {
                    paymentDate_ = new AdjustableOrAdjustedDate(paymentDateNode);
                }
            }


            XmlNode paymentTypeNode = xmlNode.SelectSingleNode("paymentType");

            if (paymentTypeNode != null)
            {
                if (paymentTypeNode.Attributes["href"] != null || paymentTypeNode.Attributes["id"] != null)
                {
                    if (paymentTypeNode.Attributes["id"] != null)
                    {
                        paymentTypeIDRef_ = paymentTypeNode.Attributes["id"].Value;
                        PaymentType ob = new PaymentType(paymentTypeNode);
                        IDManager.SetID(paymentTypeIDRef_, ob);
                    }
                    else if (paymentTypeNode.Attributes["href"] != null)
                    {
                        paymentTypeIDRef_ = paymentTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentType_ = new PaymentType(paymentTypeNode);
                    }
                }
                else
                {
                    paymentType_ = new PaymentType(paymentTypeNode);
                }
            }


            XmlNode settlementInformationNode = xmlNode.SelectSingleNode("settlementInformation");

            if (settlementInformationNode != null)
            {
                if (settlementInformationNode.Attributes["href"] != null || settlementInformationNode.Attributes["id"] != null)
                {
                    if (settlementInformationNode.Attributes["id"] != null)
                    {
                        settlementInformationIDRef_ = settlementInformationNode.Attributes["id"].Value;
                        SettlementInformation ob = new SettlementInformation(settlementInformationNode);
                        IDManager.SetID(settlementInformationIDRef_, ob);
                    }
                    else if (settlementInformationNode.Attributes["href"] != null)
                    {
                        settlementInformationIDRef_ = settlementInformationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        settlementInformation_ = new SettlementInformation(settlementInformationNode);
                    }
                }
                else
                {
                    settlementInformation_ = new SettlementInformation(settlementInformationNode);
                }
            }


            XmlNode discountFactorNode = xmlNode.SelectSingleNode("discountFactor");

            if (discountFactorNode != null)
            {
                if (discountFactorNode.Attributes["href"] != null || discountFactorNode.Attributes["id"] != null)
                {
                    if (discountFactorNode.Attributes["id"] != null)
                    {
                        discountFactorIDRef_ = discountFactorNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(discountFactorNode);
                        IDManager.SetID(discountFactorIDRef_, ob);
                    }
                    else if (discountFactorNode.Attributes["href"] != null)
                    {
                        discountFactorIDRef_ = discountFactorNode.Attributes["href"].Value;
                    }
                    else
                    {
                        discountFactor_ = new XsdTypeDecimal(discountFactorNode);
                    }
                }
                else
                {
                    discountFactor_ = new XsdTypeDecimal(discountFactorNode);
                }
            }


            XmlNode presentValueAmountNode = xmlNode.SelectSingleNode("presentValueAmount");

            if (presentValueAmountNode != null)
            {
                if (presentValueAmountNode.Attributes["href"] != null || presentValueAmountNode.Attributes["id"] != null)
                {
                    if (presentValueAmountNode.Attributes["id"] != null)
                    {
                        presentValueAmountIDRef_ = presentValueAmountNode.Attributes["id"].Value;
                        Money ob = new Money(presentValueAmountNode);
                        IDManager.SetID(presentValueAmountIDRef_, ob);
                    }
                    else if (presentValueAmountNode.Attributes["href"] != null)
                    {
                        presentValueAmountIDRef_ = presentValueAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        presentValueAmount_ = new Money(presentValueAmountNode);
                    }
                }
                else
                {
                    presentValueAmount_ = new Money(presentValueAmountNode);
                }
            }
        }
 public ReturnSwapAdditionalPayment(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");
     
     if (payerPartyReferenceNode != null)
     {
         if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (payerPartyReferenceNode.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(payerPartyReferenceNode);
                 IDManager.SetID(payerPartyReferenceIDRef_, ob);
             }
             else if (payerPartyReferenceNode.Attributes["href"] != null)
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
             }
         }
         else
         {
             payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
         }
     }
     
 
     XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");
     
     if (payerAccountReferenceNode != null)
     {
         if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (payerAccountReferenceNode.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(payerAccountReferenceNode);
                 IDManager.SetID(payerAccountReferenceIDRef_, ob);
             }
             else if (payerAccountReferenceNode.Attributes["href"] != null)
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
             }
         }
         else
         {
             payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
         }
     }
     
 
     XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");
     
     if (receiverPartyReferenceNode != null)
     {
         if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null) 
         {
             if (receiverPartyReferenceNode.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(receiverPartyReferenceNode);
                 IDManager.SetID(receiverPartyReferenceIDRef_, ob);
             }
             else if (receiverPartyReferenceNode.Attributes["href"] != null)
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
             }
         }
         else
         {
             receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
         }
     }
     
 
     XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");
     
     if (receiverAccountReferenceNode != null)
     {
         if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null) 
         {
             if (receiverAccountReferenceNode.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(receiverAccountReferenceNode);
                 IDManager.SetID(receiverAccountReferenceIDRef_, ob);
             }
             else if (receiverAccountReferenceNode.Attributes["href"] != null)
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
             }
         }
         else
         {
             receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
         }
     }
     
 
     XmlNode additionalPaymentAmountNode = xmlNode.SelectSingleNode("additionalPaymentAmount");
     
     if (additionalPaymentAmountNode != null)
     {
         if (additionalPaymentAmountNode.Attributes["href"] != null || additionalPaymentAmountNode.Attributes["id"] != null) 
         {
             if (additionalPaymentAmountNode.Attributes["id"] != null) 
             {
                 additionalPaymentAmountIDRef_ = additionalPaymentAmountNode.Attributes["id"].Value;
                 AdditionalPaymentAmount ob = new AdditionalPaymentAmount(additionalPaymentAmountNode);
                 IDManager.SetID(additionalPaymentAmountIDRef_, ob);
             }
             else if (additionalPaymentAmountNode.Attributes["href"] != null)
             {
                 additionalPaymentAmountIDRef_ = additionalPaymentAmountNode.Attributes["href"].Value;
             }
             else
             {
                 additionalPaymentAmount_ = new AdditionalPaymentAmount(additionalPaymentAmountNode);
             }
         }
         else
         {
             additionalPaymentAmount_ = new AdditionalPaymentAmount(additionalPaymentAmountNode);
         }
     }
     
 
     XmlNode additionalPaymentDateNode = xmlNode.SelectSingleNode("additionalPaymentDate");
     
     if (additionalPaymentDateNode != null)
     {
         if (additionalPaymentDateNode.Attributes["href"] != null || additionalPaymentDateNode.Attributes["id"] != null) 
         {
             if (additionalPaymentDateNode.Attributes["id"] != null) 
             {
                 additionalPaymentDateIDRef_ = additionalPaymentDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(additionalPaymentDateNode);
                 IDManager.SetID(additionalPaymentDateIDRef_, ob);
             }
             else if (additionalPaymentDateNode.Attributes["href"] != null)
             {
                 additionalPaymentDateIDRef_ = additionalPaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 additionalPaymentDate_ = new AdjustableOrRelativeDate(additionalPaymentDateNode);
             }
         }
         else
         {
             additionalPaymentDate_ = new AdjustableOrRelativeDate(additionalPaymentDateNode);
         }
     }
     
 
     XmlNode paymentTypeNode = xmlNode.SelectSingleNode("paymentType");
     
     if (paymentTypeNode != null)
     {
         if (paymentTypeNode.Attributes["href"] != null || paymentTypeNode.Attributes["id"] != null) 
         {
             if (paymentTypeNode.Attributes["id"] != null) 
             {
                 paymentTypeIDRef_ = paymentTypeNode.Attributes["id"].Value;
                 PaymentType ob = new PaymentType(paymentTypeNode);
                 IDManager.SetID(paymentTypeIDRef_, ob);
             }
             else if (paymentTypeNode.Attributes["href"] != null)
             {
                 paymentTypeIDRef_ = paymentTypeNode.Attributes["href"].Value;
             }
             else
             {
                 paymentType_ = new PaymentType(paymentTypeNode);
             }
         }
         else
         {
             paymentType_ = new PaymentType(paymentTypeNode);
         }
     }
     
 
 }
 public Payment(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");
     
     if (payerPartyReferenceNode != null)
     {
         if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (payerPartyReferenceNode.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(payerPartyReferenceNode);
                 IDManager.SetID(payerPartyReferenceIDRef_, ob);
             }
             else if (payerPartyReferenceNode.Attributes["href"] != null)
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
             }
         }
         else
         {
             payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
         }
     }
     
 
     XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");
     
     if (payerAccountReferenceNode != null)
     {
         if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (payerAccountReferenceNode.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(payerAccountReferenceNode);
                 IDManager.SetID(payerAccountReferenceIDRef_, ob);
             }
             else if (payerAccountReferenceNode.Attributes["href"] != null)
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
             }
         }
         else
         {
             payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
         }
     }
     
 
     XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");
     
     if (receiverPartyReferenceNode != null)
     {
         if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null) 
         {
             if (receiverPartyReferenceNode.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(receiverPartyReferenceNode);
                 IDManager.SetID(receiverPartyReferenceIDRef_, ob);
             }
             else if (receiverPartyReferenceNode.Attributes["href"] != null)
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
             }
         }
         else
         {
             receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
         }
     }
     
 
     XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");
     
     if (receiverAccountReferenceNode != null)
     {
         if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null) 
         {
             if (receiverAccountReferenceNode.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(receiverAccountReferenceNode);
                 IDManager.SetID(receiverAccountReferenceIDRef_, ob);
             }
             else if (receiverAccountReferenceNode.Attributes["href"] != null)
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
             }
         }
         else
         {
             receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
         }
     }
     
 
     XmlNode paymentAmountNode = xmlNode.SelectSingleNode("paymentAmount");
     
     if (paymentAmountNode != null)
     {
         if (paymentAmountNode.Attributes["href"] != null || paymentAmountNode.Attributes["id"] != null) 
         {
             if (paymentAmountNode.Attributes["id"] != null) 
             {
                 paymentAmountIDRef_ = paymentAmountNode.Attributes["id"].Value;
                 NonNegativeMoney ob = new NonNegativeMoney(paymentAmountNode);
                 IDManager.SetID(paymentAmountIDRef_, ob);
             }
             else if (paymentAmountNode.Attributes["href"] != null)
             {
                 paymentAmountIDRef_ = paymentAmountNode.Attributes["href"].Value;
             }
             else
             {
                 paymentAmount_ = new NonNegativeMoney(paymentAmountNode);
             }
         }
         else
         {
             paymentAmount_ = new NonNegativeMoney(paymentAmountNode);
         }
     }
     
 
     XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");
     
     if (paymentDateNode != null)
     {
         if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null) 
         {
             if (paymentDateNode.Attributes["id"] != null) 
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value;
                 AdjustableOrAdjustedDate ob = new AdjustableOrAdjustedDate(paymentDateNode);
                 IDManager.SetID(paymentDateIDRef_, ob);
             }
             else if (paymentDateNode.Attributes["href"] != null)
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDate_ = new AdjustableOrAdjustedDate(paymentDateNode);
             }
         }
         else
         {
             paymentDate_ = new AdjustableOrAdjustedDate(paymentDateNode);
         }
     }
     
 
     XmlNode paymentTypeNode = xmlNode.SelectSingleNode("paymentType");
     
     if (paymentTypeNode != null)
     {
         if (paymentTypeNode.Attributes["href"] != null || paymentTypeNode.Attributes["id"] != null) 
         {
             if (paymentTypeNode.Attributes["id"] != null) 
             {
                 paymentTypeIDRef_ = paymentTypeNode.Attributes["id"].Value;
                 PaymentType ob = new PaymentType(paymentTypeNode);
                 IDManager.SetID(paymentTypeIDRef_, ob);
             }
             else if (paymentTypeNode.Attributes["href"] != null)
             {
                 paymentTypeIDRef_ = paymentTypeNode.Attributes["href"].Value;
             }
             else
             {
                 paymentType_ = new PaymentType(paymentTypeNode);
             }
         }
         else
         {
             paymentType_ = new PaymentType(paymentTypeNode);
         }
     }
     
 
     XmlNode settlementInformationNode = xmlNode.SelectSingleNode("settlementInformation");
     
     if (settlementInformationNode != null)
     {
         if (settlementInformationNode.Attributes["href"] != null || settlementInformationNode.Attributes["id"] != null) 
         {
             if (settlementInformationNode.Attributes["id"] != null) 
             {
                 settlementInformationIDRef_ = settlementInformationNode.Attributes["id"].Value;
                 SettlementInformation ob = new SettlementInformation(settlementInformationNode);
                 IDManager.SetID(settlementInformationIDRef_, ob);
             }
             else if (settlementInformationNode.Attributes["href"] != null)
             {
                 settlementInformationIDRef_ = settlementInformationNode.Attributes["href"].Value;
             }
             else
             {
                 settlementInformation_ = new SettlementInformation(settlementInformationNode);
             }
         }
         else
         {
             settlementInformation_ = new SettlementInformation(settlementInformationNode);
         }
     }
     
 
     XmlNode discountFactorNode = xmlNode.SelectSingleNode("discountFactor");
     
     if (discountFactorNode != null)
     {
         if (discountFactorNode.Attributes["href"] != null || discountFactorNode.Attributes["id"] != null) 
         {
             if (discountFactorNode.Attributes["id"] != null) 
             {
                 discountFactorIDRef_ = discountFactorNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(discountFactorNode);
                 IDManager.SetID(discountFactorIDRef_, ob);
             }
             else if (discountFactorNode.Attributes["href"] != null)
             {
                 discountFactorIDRef_ = discountFactorNode.Attributes["href"].Value;
             }
             else
             {
                 discountFactor_ = new XsdTypeDecimal(discountFactorNode);
             }
         }
         else
         {
             discountFactor_ = new XsdTypeDecimal(discountFactorNode);
         }
     }
     
 
     XmlNode presentValueAmountNode = xmlNode.SelectSingleNode("presentValueAmount");
     
     if (presentValueAmountNode != null)
     {
         if (presentValueAmountNode.Attributes["href"] != null || presentValueAmountNode.Attributes["id"] != null) 
         {
             if (presentValueAmountNode.Attributes["id"] != null) 
             {
                 presentValueAmountIDRef_ = presentValueAmountNode.Attributes["id"].Value;
                 Money ob = new Money(presentValueAmountNode);
                 IDManager.SetID(presentValueAmountIDRef_, ob);
             }
             else if (presentValueAmountNode.Attributes["href"] != null)
             {
                 presentValueAmountIDRef_ = presentValueAmountNode.Attributes["href"].Value;
             }
             else
             {
                 presentValueAmount_ = new Money(presentValueAmountNode);
             }
         }
         else
         {
             presentValueAmount_ = new Money(presentValueAmountNode);
         }
     }
     
 
 }
Exemplo n.º 4
0
        public Payment(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference");

            if (payerPartyReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in payerPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        payerPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(payerPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        payerPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        payerPartyReference = new PartyReference(item);
                    }
                }
            }


            XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference");

            if (payerAccountReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in payerAccountReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        payerAccountReferenceIDRef = item.Attributes["id"].Name;
                        AccountReference ob = AccountReference();
                        IDManager.SetID(payerAccountReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        payerAccountReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        payerAccountReference = new AccountReference(item);
                    }
                }
            }


            XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference");

            if (receiverPartyReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in receiverPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        receiverPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(receiverPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        receiverPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        receiverPartyReference = new PartyReference(item);
                    }
                }
            }


            XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference");

            if (receiverAccountReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in receiverAccountReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        receiverAccountReferenceIDRef = item.Attributes["id"].Name;
                        AccountReference ob = AccountReference();
                        IDManager.SetID(receiverAccountReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        receiverAccountReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        receiverAccountReference = new AccountReference(item);
                    }
                }
            }


            XmlNodeList paymentAmountNodeList = xmlNode.SelectNodes("paymentAmount");

            if (paymentAmountNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in paymentAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentAmountIDRef = item.Attributes["id"].Name;
                        NonNegativeMoney ob = NonNegativeMoney();
                        IDManager.SetID(paymentAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentAmount = new NonNegativeMoney(item);
                    }
                }
            }


            XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate");

            if (paymentDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in paymentDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentDateIDRef = item.Attributes["id"].Name;
                        AdjustableOrAdjustedDate ob = AdjustableOrAdjustedDate();
                        IDManager.SetID(paymentDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentDate = new AdjustableOrAdjustedDate(item);
                    }
                }
            }


            XmlNodeList paymentTypeNodeList = xmlNode.SelectNodes("paymentType");

            if (paymentTypeNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in paymentTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentTypeIDRef = item.Attributes["id"].Name;
                        PaymentType ob = PaymentType();
                        IDManager.SetID(paymentTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentType = new PaymentType(item);
                    }
                }
            }


            XmlNodeList settlementInformationNodeList = xmlNode.SelectNodes("settlementInformation");

            if (settlementInformationNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in settlementInformationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        settlementInformationIDRef = item.Attributes["id"].Name;
                        SettlementInformation ob = SettlementInformation();
                        IDManager.SetID(settlementInformationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        settlementInformationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        settlementInformation = new SettlementInformation(item);
                    }
                }
            }


            XmlNodeList discountFactorNodeList = xmlNode.SelectNodes("discountFactor");

            if (discountFactorNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in discountFactorNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        discountFactorIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(discountFactorIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        discountFactorIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        discountFactor = new XsdTypeDecimal(item);
                    }
                }
            }


            XmlNodeList presentValueAmountNodeList = xmlNode.SelectNodes("presentValueAmount");

            if (presentValueAmountNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in presentValueAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        presentValueAmountIDRef = item.Attributes["id"].Name;
                        Money ob = Money();
                        IDManager.SetID(presentValueAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        presentValueAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        presentValueAmount = new Money(item);
                    }
                }
            }
        }
 public Payment(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference");
     if (payerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(payerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference");
     if (payerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(payerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference");
     if (receiverPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(receiverPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference");
     if (receiverAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(receiverAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList paymentAmountNodeList = xmlNode.SelectNodes("paymentAmount");
     if (paymentAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentAmountIDRef = item.Attributes["id"].Name;
                 NonNegativeMoney ob = NonNegativeMoney();
                 IDManager.SetID(paymentAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentAmount = new NonNegativeMoney(item);
             }
         }
     }
     
 
     XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate");
     if (paymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrAdjustedDate ob = AdjustableOrAdjustedDate();
                 IDManager.SetID(paymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDate = new AdjustableOrAdjustedDate(item);
             }
         }
     }
     
 
     XmlNodeList paymentTypeNodeList = xmlNode.SelectNodes("paymentType");
     if (paymentTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentTypeIDRef = item.Attributes["id"].Name;
                 PaymentType ob = PaymentType();
                 IDManager.SetID(paymentTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentType = new PaymentType(item);
             }
         }
     }
     
 
     XmlNodeList settlementInformationNodeList = xmlNode.SelectNodes("settlementInformation");
     if (settlementInformationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementInformationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementInformationIDRef = item.Attributes["id"].Name;
                 SettlementInformation ob = SettlementInformation();
                 IDManager.SetID(settlementInformationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementInformationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlementInformation = new SettlementInformation(item);
             }
         }
     }
     
 
     XmlNodeList discountFactorNodeList = xmlNode.SelectNodes("discountFactor");
     if (discountFactorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in discountFactorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 discountFactorIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(discountFactorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 discountFactorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 discountFactor = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList presentValueAmountNodeList = xmlNode.SelectNodes("presentValueAmount");
     if (presentValueAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in presentValueAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 presentValueAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(presentValueAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 presentValueAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 presentValueAmount = new Money(item);
             }
         }
     }
     
 
 }
Exemplo n.º 6
0
        public ReturnSwapAdditionalPayment(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference");

            if (payerPartyReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in payerPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        payerPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(payerPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        payerPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        payerPartyReference = new PartyReference(item);
                    }
                }
            }


            XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference");

            if (payerAccountReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in payerAccountReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        payerAccountReferenceIDRef = item.Attributes["id"].Name;
                        AccountReference ob = AccountReference();
                        IDManager.SetID(payerAccountReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        payerAccountReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        payerAccountReference = new AccountReference(item);
                    }
                }
            }


            XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference");

            if (receiverPartyReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in receiverPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        receiverPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(receiverPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        receiverPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        receiverPartyReference = new PartyReference(item);
                    }
                }
            }


            XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference");

            if (receiverAccountReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in receiverAccountReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        receiverAccountReferenceIDRef = item.Attributes["id"].Name;
                        AccountReference ob = AccountReference();
                        IDManager.SetID(receiverAccountReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        receiverAccountReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        receiverAccountReference = new AccountReference(item);
                    }
                }
            }


            XmlNodeList additionalPaymentAmountNodeList = xmlNode.SelectNodes("additionalPaymentAmount");

            if (additionalPaymentAmountNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in additionalPaymentAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        additionalPaymentAmountIDRef = item.Attributes["id"].Name;
                        AdditionalPaymentAmount ob = AdditionalPaymentAmount();
                        IDManager.SetID(additionalPaymentAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        additionalPaymentAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        additionalPaymentAmount = new AdditionalPaymentAmount(item);
                    }
                }
            }


            XmlNodeList additionalPaymentDateNodeList = xmlNode.SelectNodes("additionalPaymentDate");

            if (additionalPaymentDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in additionalPaymentDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        additionalPaymentDateIDRef = item.Attributes["id"].Name;
                        AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                        IDManager.SetID(additionalPaymentDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        additionalPaymentDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        additionalPaymentDate = new AdjustableOrRelativeDate(item);
                    }
                }
            }


            XmlNodeList paymentTypeNodeList = xmlNode.SelectNodes("paymentType");

            if (paymentTypeNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in paymentTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentTypeIDRef = item.Attributes["id"].Name;
                        PaymentType ob = PaymentType();
                        IDManager.SetID(paymentTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentType = new PaymentType(item);
                    }
                }
            }
        }
 public ReturnSwapAdditionalPayment(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference");
     if (payerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(payerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference");
     if (payerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(payerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference");
     if (receiverPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(receiverPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference");
     if (receiverAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(receiverAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList additionalPaymentAmountNodeList = xmlNode.SelectNodes("additionalPaymentAmount");
     if (additionalPaymentAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in additionalPaymentAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 additionalPaymentAmountIDRef = item.Attributes["id"].Name;
                 AdditionalPaymentAmount ob = AdditionalPaymentAmount();
                 IDManager.SetID(additionalPaymentAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 additionalPaymentAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 additionalPaymentAmount = new AdditionalPaymentAmount(item);
             }
         }
     }
     
 
     XmlNodeList additionalPaymentDateNodeList = xmlNode.SelectNodes("additionalPaymentDate");
     if (additionalPaymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in additionalPaymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 additionalPaymentDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(additionalPaymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 additionalPaymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 additionalPaymentDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList paymentTypeNodeList = xmlNode.SelectNodes("paymentType");
     if (paymentTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentTypeIDRef = item.Attributes["id"].Name;
                 PaymentType ob = PaymentType();
                 IDManager.SetID(paymentTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentType = new PaymentType(item);
             }
         }
     }
     
 
 }