public NetSuiteInventoryAdjustmentsBuilder(NetSuiteSoapService service, NetSuiteLocation location, NetSuiteInventoryBinsModeEnum inventoryBinsModeEnum, CancellationToken token, Mark mark) { _service = service; _location = location; _inventoryBinsModeEnum = inventoryBinsModeEnum; _token = token; _mark = mark; InventoryAdjustments = new List <InventoryAdjustmentInventory>(); }
public async Task GetItemBySkuAsync_BinsInventory() { var soapService = new NetSuiteSoapService(this.Config); const string sku = "GUARD528-test1"; var token = CancellationToken.None; var item = await soapService.GetItemBySkuAsync(sku, token); item.binNumberList.binNumber.Any(b => !string.IsNullOrEmpty(b.onHand)).Should().BeTrue(); }
public async Task GetItemInventoryAsync() { var soapService = new NetSuiteSoapService(this.Config); const string sku = "GUARD528-test1"; var token = CancellationToken.None; var item = await soapService.GetItemBySkuAsync(sku, token); var itemInventory = await soapService.GetItemInventoryAsync(item, token, Mark.Blank()); itemInventory.Any(i => Math.Abs(i.quantityAvailable) > 0).Should().BeTrue(); }
public void GivenHugeAmountOfSkus_WhenGetItemBySkuAsyncCalledForEachSku_ThenServerTooBusyExceptionsShouldBeRetried() { var soapService = new NetSuiteSoapService(this.Config); var skus = new List <string>(); var totalSkus = 500; for (int i = 1; i <= totalSkus; i++) { skus.Add("testSku-" + i); } Assert.DoesNotThrowAsync(async() => { foreach (var sku in skus) { await soapService.GetItemBySkuAsync(sku, CancellationToken.None); } }); }
public NetSuiteCustomersService(NetSuiteConfig config) { this._soapService = new NetSuiteSoapService(config); }
public NetSuiteCommonService(NetSuiteConfig config) { _soapService = new NetSuiteSoapService(config); }
public NetSuiteOrdersService(NetSuiteConfig config) { this._customersService = new NetSuiteCustomersService(config); this._commonService = new NetSuiteCommonService(config); this._soapService = new NetSuiteSoapService(config); }