public static RestApi.Portfolios.Stock ToSummaryResponse(this IReadOnlyStock stock, Date date)
        {
            var stockProperties = stock.Properties.ClosestTo(date);

            var result = new RestApi.Portfolios.Stock()
            {
                Id       = stock.Id,
                AsxCode  = stockProperties.AsxCode,
                Name     = stockProperties.Name,
                Category = stockProperties.Category.ToResponse()
            };

            return(result);
        }
Пример #2
0
 public StockViewItem(RestApi.Portfolios.Stock stock)
 {
     Id      = stock.Id;
     AsxCode = stock.AsxCode;
     Name    = stock.Name;
 }