/// <summary> /// Validate the Content for this Requested Service /// </summary> /// <param name="path">The path to this object as a string</param> /// <param name="messages">the validation messages, these may be added to within this method</param> public void Validate(string path, List <ValidationMessage> messages) { var vb = new ValidationBuilder(path, messages); if (vb.ArgumentRequiredCheck("RequestedServiceDescription", RequestedServiceDescription)) { RequestedServiceDescription.Validate(vb.Path + "RequestedServiceDescription", vb.Messages); } vb.ArgumentRequiredCheck("ServiceBookingStatus", ServiceBookingStatus); if (vb.ArgumentRequiredCheck("ServiceRequester", ServiceRequester)) { ServiceRequester.Validate(vb.Path + "ServiceRequester", vb.Messages); } vb.ArgumentRequiredCheck("RequestedServiceDateTime", RequestedServiceDateTime); if (vb.ArgumentRequiredCheck("RequestIdentifier", RequestIdentifier)) { RequestIdentifier.Validate(vb.Path + "RequestIdentifier", vb.Messages); } if (vb.ArgumentRequiredCheck("RequestedServiceInstanceIdentifier", RequestedServiceInstanceIdentifier)) { RequestedServiceInstanceIdentifier.Validate(vb.Path + "RequestedServiceInstanceIdentifier", vb.Messages); } if (vb.ArgumentRequiredCheck("DetailedClinicalModelIdentifier", DetailedClinicalModelIdentifier)) { DetailedClinicalModelIdentifier.Validate(vb.Path + "DetailedClinicalModelIdentifier", vb.Messages); } }
/// <summary> /// Validate the SCS Content for the Medicare DVA Funded Service /// </summary> /// <param name="path">The path to this object as a string</param> /// <param name="messages">the validation messages, these may be added to within this method</param> public void Validate(string path, List <ValidationMessage> messages) { var vb = new ValidationBuilder(path, messages); vb.ArgumentRequiredCheck("DateOfService", DateOfService); if (vb.ArgumentRequiredCheck("MedicareMBSDVAItem", MedicareMBSDVAItem)) { MedicareMBSDVAItem.Validate(path + "MedicareMBSDVAItem", messages); } if (ServiceRequester != null) { ServiceRequester.Validate(path + "ServiceRequester", messages); } if (ServiceProvider != null) { ServiceProvider.Validate(path + "ServiceProvider", messages); } vb.ArgumentRequiredCheck("MedicareDVAFundedServicesDocumentProvenance", MedicareDVAFundedServicesDocumentLink); if (MedicareDVAFundedServicesDocumentLink != null) { MedicareDVAFundedServicesDocumentLink.Validate(vb.Path + "MedicareDVAFundedService", vb.Messages); } }
internal static ServiceRequester PRO_ConvenioRemitenteSelecc_ResultToServiceRequester(PRO_ConvenioRemitenteSelecc_Result result) { var output = new ServiceRequester { Name = result.NomRemitente, Code = result.CodRemitente }; return(output); }
public Asset GetAllAssets() { Asset asset = new Asset(); string urlRequest = new Utils().UrlBuild("API_Access:UrlBase", "API_Access:AssetService"); string respApiJson = new ServiceRequester().GetRequest(urlRequest); if (!string.IsNullOrEmpty(respApiJson)) { asset = JsonConvert.DeserializeObject <Asset>(respApiJson); } return(asset); }
private Intraday GetIntraday(int idtAsset) { Intraday intraday = new Intraday(); string urlRequest = new Utils().UrlBuild("API_Access:UrlBase", "API_Access:IntradayService", idtAsset.ToString()); string respApiJson = new ServiceRequester().GetRequest(urlRequest); respApiJson = respApiJson.Replace("uolfinancecallback0(", "").Replace(");", ""); if (!string.IsNullOrEmpty(respApiJson)) { intraday = JsonConvert.DeserializeObject <Intraday>(respApiJson); } return(intraday); }
private Currency GetCurrencies() { Currency currency = new Currency(); var config = new Utils().ReadTokensAppsettings(); string urlRequest = config.GetSection("BCB_Olinda:UrlMoedas").Value; string respApiJson = new ServiceRequester().GetRequest(urlRequest); if (!string.IsNullOrEmpty(respApiJson)) { currency = JsonConvert.DeserializeObject <Currency>(respApiJson); } return(currency); }
public Interday GetInterday(int idtAsset, DateTime begintDate, DateTime endDate) { double beginDateUnix = new Utils().DatetimeToMillis(begintDate); double dtendDateUnix = new Utils().DatetimeToMillis(endDate); string InterdayParameter = $"begin={beginDateUnix}&end={dtendDateUnix}"; Interday interday = new Interday(); string urlRequest = new Utils().UrlBuild("API_Access:UrlBase", "API_Access:InterdayService", idtAsset.ToString()); string respApiJson = new ServiceRequester().GetRequest(urlRequest + InterdayParameter); if (!string.IsNullOrEmpty(respApiJson)) { interday = JsonConvert.DeserializeObject <Interday>(respApiJson); } return(interday); }
private CurrencyRate GetCurrencyRate(string isoCode, DateTime begintDate, DateTime endDate) { CurrencyRate cRate = new CurrencyRate(); var config = new Utils().ReadTokensAppsettings(); string urlRequest = config.GetSection("BCB_Olinda:UrlCotacaoMoeda").Value; string urlParameters = $"@moeda='{isoCode}'&@dataInicial='{string.Format("{0:MM-dd-yyyy}", begintDate.Date)}'&@dataFinalCotacao='{string.Format("{0:MM-dd-yyyy}", endDate.Date)}'&$top=10000&$filter=tipoBoletim%20eq%20'Fechamento'&$format=json"; urlRequest = urlRequest + urlParameters; string respApiJson = new ServiceRequester().GetRequest(urlRequest); if (!string.IsNullOrEmpty(respApiJson)) { cRate = JsonConvert.DeserializeObject <CurrencyRate>(respApiJson); } return(cRate); }