private LineItem GetRelatedLineItem(LinkedOrder repurchase, LineItem lineItem) { if (repurchase == null) { throw new ArgumentException("Repurchase is not a valid linked order."); } return(repurchase.GetRelatedLineItem(lineItem)); }
private void SetWindowStartAndLengthFromRelatedLineItem(LinkedOrder repurchase, LineItem lineItem) { if (repurchase.RelatedOrder == null) { return; } var relatedLineItem = GetRelatedLineItem(repurchase, lineItem); lineItem.WindowStartDate = GetWindowStartDate(relatedLineItem.WindowStartDate, relatedLineItem.Id); lineItem.WindowLength = relatedLineItem.WindowLength; }
private DateTime GetValueDateFromRelatedLineItem(LinkedOrder repurchase, LineItem lineItem) { var relatedLineItem = GetRelatedLineItem(repurchase, lineItem); return(GetValueDate(relatedLineItem.ValueDate, relatedLineItem.Id)); }
private bool IsReissuedMatureFuturePaymentsOrder(LinkedOrder order) { return(order != null && order.IsReissue && order.RelatedOrder != null && order.RelatedOrder.OrderType == OrderType.MatureFuturePaymentsOrder); }