/// <summary> /// Initializes a new instance of the <see cref="PriceablePayment"/> class. /// </summary> /// <param name="id">The identifier.</param> /// <param name="payerPartyReference">The payer.</param> /// <param name="receiverPartyReference">The receiver.</param> /// <param name="payerIsBase">The payer is base flag.</param> /// <param name="amount">The amount.</param> /// <param name="paymentDate">The payment date.</param> /// <param name="paymentCalendar">Type paymentCalendar.</param> public PriceablePayment ( string id , string payerPartyReference , string receiverPartyReference , bool payerIsBase , Money amount , AdjustableOrAdjustedDate paymentDate , IBusinessCalendar paymentCalendar) : base(id, "DiscountedCashflow", payerIsBase, amount, paymentDate, PaymentTypeHelper.Create("Certain"), CashflowTypeHelper.Create(CashflowTypeEnum.PrincipalExchange.ToString()), false, paymentCalendar) { PayerPartyReference = PartyReferenceFactory.Create(payerPartyReference); ReceiverPartyReference = PartyReferenceFactory.Create(receiverPartyReference); OrderedPartyNames.Add(PayerPartyReference.href); OrderedPartyNames.Add(ReceiverPartyReference.href); }
/// <summary> /// Initializes a new instance of the <see cref="PriceableFxOptionPremium"/> class. /// </summary> /// <param name="id">The identifier.</param> /// <param name="receiverPartyReference">The receiver.</param> /// <param name="payerIsBase">The flag determining if the payer is the base party.</param> /// <param name="amount">The amount.</param> /// <param name="settlementDate">The adjusted payment date.</param> /// <param name="payerPartyReference">The payer.</param> /// <param name="premiumQuote">The premium quote </param> /// <param name="settlementInformation">The settlement information. </param> /// <param name="paymentCalendar">Type paymentCalendar.</param> public PriceableFxOptionPremium ( string id , string payerPartyReference , string receiverPartyReference , bool payerIsBase , Money amount , DateTime settlementDate , PremiumQuote premiumQuote , SettlementInformation settlementInformation , IBusinessCalendar paymentCalendar) : base(id, "DiscountedCashflow", payerIsBase, amount, AdjustableOrAdjustedDateHelper.CreateAdjustedDate(settlementDate), PaymentTypeHelper.Create("Certain"), CashflowTypeHelper.Create(CashflowTypeEnum.Premium.ToString()), false, paymentCalendar) { PayerPartyReference = PartyReferenceFactory.Create(payerPartyReference); ReceiverPartyReference = PartyReferenceFactory.Create(receiverPartyReference); OrderedPartyNames.Add(PayerPartyReference.href); OrderedPartyNames.Add(ReceiverPartyReference.href); if (premiumQuote != null) { PremiumQuote = new PremiumQuote { quoteBasis = premiumQuote.quoteBasis, quoteBasisSpecified = true, value = premiumQuote.value, valueSpecified = true }; } if (settlementInformation == null) { return; } SettlementInformation = new SettlementInformation(); var item = BinarySerializerHelper.Clone(settlementInformation.Item); SettlementInformation.Item = item; }