public async Task InitializeAsync() { var policy = new SmartRetryExecutionPolicy(); DiscountCodeService.SetExecutionPolicy(policy); PriceRuleService.SetExecutionPolicy(policy); // Create one for count, list, get, etc. orders. await Create(Code); }
private async Task <PriceRule> CreatePriceRule(PriceRule rule, bool skipAddToCreatedList) { var obj = await PriceRuleService.CreateAsync(rule); if (!skipAddToCreatedList) { CreatedPriceRules.Add(obj); } return(obj); }
private async Task DeletePriceRules() { foreach (var obj in CreatedPriceRules) { try { await PriceRuleService.DeleteAsync(obj.Id.Value); } catch (ShopifyException ex) { if (ex.HttpStatusCode != HttpStatusCode.NotFound) { Console.WriteLine($"Failed to delete created PriceRule with id {obj.Id.Value}. {ex.Message}"); } } } }
public AppTest() { var priceRuleSvc = new PriceRuleService(); co = new Checkout(priceRuleSvc.GetPricingRules()); }