private ReverbProductData CollectProductsById(string endpoint, string id) { ReverbProductData data = null; ActionPolicies.Get.Do(() => { data = this._webRequestServices.GetResponse <ReverbProductData>(ReverbCommand.GetProductsById, new[] { id }, endpoint); //API requirement this.CreateApiDelay().Wait(); }); return(data); }
private async Task <ReverbProductData> CollectProductsByIdAsync(string endpoint, string id) { ReverbProductData data = null; await ActionPolicies.GetAsync.Do(async() => { data = await this._webRequestServices.GetResponseAsync <ReverbProductData>(ReverbCommand.GetProductsById, new[] { id }, endpoint); //API requirement await this.CreateApiDelay(); }); return(data); }