public async Task UpdateProductsAsync(ShopVisibleProductsInventory products) { var xml = XmlSerializeHelpers.Serialize(products); await ActionPolicies.GetAsync.Do(async() => { await this._client.SetProductInventoryAsync(this._credentials.ClientName, this._credentials.Guid, "false", xml); }); }
public async Task <List <ShopVisibleProductInventory> > GetInventoryAsync() { var inventory = new ShopVisibleProductsInventory(); await ActionPolicies.GetAsync.Do(async() => { var xmlInventory = await this._client.GetProductInventoryAsync(this._credentials.ClientName, this._credentials.Guid); inventory = XmlSerializeHelpers.Deserialize <ShopVisibleProductsInventory>(xmlInventory.OuterXml); }); return(inventory.Products); }
public List <ShopVisibleProductInventory> GetInventory() { var inventory = new ShopVisibleProductsInventory(); ActionPolicies.Submit.Do(() => { var xmlInventory = this._client.GetProductInventory(this._credentials.ClientName, this._credentials.Guid); inventory = XmlSerializeHelpers.Deserialize <ShopVisibleProductsInventory>(xmlInventory.OuterXml); }); return(inventory.Products); }
public async Task UpdateProductsAsync() { var service = this._factory.CreateProductsService(this._credentials); var products = new ShopVisibleProductsInventory { Products = new List <ShopVisibleProductInventory> { new ShopVisibleProductInventory { Quantity = 0, Sku = "MWW291Z" } } }; await service.UpdateProductsAsync(products); }
public void UpdateProducts() { var service = this._factory.CreateProductsService(this._credentials); var products = new ShopVisibleProductsInventory { Products = new List <ShopVisibleProductInventory> { new ShopVisibleProductInventory { Quantity = 44, Sku = "" } } }; service.UpdateProducts(products); }
public void UpdateProductOptions() { var service = this._factory.CreateProductsService(this._credentials); var products = new ShopVisibleProductsInventory { Products = new List <ShopVisibleProductInventory> { new ShopVisibleProductInventory { Sku = "Yes30", Quantity = 2, OptionGroups = new ShopVisibleProductOptionGroups { Groups = new List <ShopVisibleProductOptionGroup> { new ShopVisibleProductOptionGroup { Id = 105, ProductOptions = new ShopVisibleProductOptions { Options = new List <ShopVisibleProductOption> { new ShopVisibleProductOption { Price = "14.99", Quantity = 11, Sku = "YES30-FU-00", Upc = "812768614296" } } } } } } } } }; service.UpdateProducts(products); }
public void UpdateProducts(ShopVisibleProductsInventory products) { var xml = XmlSerializeHelpers.Serialize(products); ActionPolicies.Submit.Do(() => this._client.SetProductInventory(this._credentials.ClientName, this._credentials.Guid, "false", xml)); }