private PredeliveryFundingSource CreatePredeliveryFundingSource(int quoteId, Order forwardOrderWithContributingLineItem)
 {
     return(FundingSourceFactoryHelper.CreatePredeliveryFundingSource(
                quoteId,
                forwardOrderWithContributingLineItem,
                FundingSourceFactoryHelper.CreateClientRateComponent(quoteMapper.GetLineItemQuote(quoteId))));
 }
Esempio n. 2
0
 private LineItemFundingSource GetUpdatedFundingSource(LineItemFundingSource originatingFundingSource, decimal itemRateValue)
 {
     return
         (FundingSourceFactoryHelper.CreateFxFundingSource(originatingFundingSource.QuoteId,
                                                           FundingSourceFactoryHelper.CreateClientRateComponent(
                                                               quoteMapper.GetRepurchaseLineItemQuote(itemRateValue,
                                                                                                      originatingFundingSource.ClientRateComponent))));
 }
        private LineItemFundingSource GetFundingSource(LineItem mfpLineItem, int relatedLineItemQuoteId)
        {
            var clientRateComponent = FundingSourceFactoryHelper.CreateClientRateComponent(quoteMapper.GetLineItemQuote(relatedLineItemQuoteId));

            var originalFundingSource = FundingSourceFactoryHelper.CreateFxFundingSource(relatedLineItemQuoteId, clientRateComponent);

            return(mfpLineItem.ItemRateValue > 0
                ? GetFundingSourceUpdatedWithItemRate(originalFundingSource, mfpLineItem.ItemRateValue)
                : originalFundingSource);
        }
Esempio n. 4
0
        private LineItemFundingSource GetFundingSourceByRelatedItem(LineItem lineItem)
        {
            var origQuoteId = GetRelatedQuoteId(lineItem);

            if (origQuoteId > 0)
            {
                var clientRateComponent = FundingSourceFactoryHelper.CreateClientRateComponent(quoteMapper.GetLineItemQuote(origQuoteId));

                var originatingFundingSource = FundingSourceFactoryHelper.CreateFxFundingSource(origQuoteId, clientRateComponent);

                return(lineItem.ItemRateValue > 0 ? GetUpdatedFundingSource(originatingFundingSource, lineItem.ItemRateValue) : originatingFundingSource);
            }
            return(new NullLineItemFundingSource());
        }