public static TickerDayParameter Create(string ticker, IDailyPeriod period)
 {
     JpTickerValidator.Validate(ticker);
     if (period is LatestDayPeriod)
     {
         return(new TickerDayParameter(ticker, ApiRequestParamConfig.ValueLatest, period));
     }
     else if (period is DayPeriod)
     {
         return(new TickerDayParameter(ticker, period.ToString(), period));
     }
     else
     {
         throw new ArgumentException($"{period} is not supported.");
     }
 }
 private TickerDayParameter(string ticker, string dateParam, IDailyPeriod period)
 {
     this.ticker    = ticker;
     this.dateParam = dateParam;
     this.period    = period;
 }