예제 #1
0
        /// <summary>
        /// Gets the items by skus.
        /// </summary>
        /// <param name="manager">The manager.</param>
        /// <param name="accountId">The account id.</param>
        /// <param name="skus">The skus.</param>
        /// <returns>List of items matching supplied SKUs.</returns>
        public static IEnumerable <InventoryItemResponse> GetItems(this IChannelAdvisorManager manager, string accountId, string[] skus)
        {
            var itemService = manager.GetItemsServiceByAccountId(accountId);

            return(itemService.GetItems(skus));
        }
예제 #2
0
        /// <summary>
        /// Deletes the item.
        /// </summary>
        /// <param name="manager">The manager.</param>
        /// <param name="accountId">The account id.</param>
        /// <param name="sku">The sku of the item to delete.</param>
        public static void DeleteItem(this IChannelAdvisorManager manager, string accountId, string sku)
        {
            var itemService = manager.GetItemsServiceByAccountId(accountId);

            itemService.DeleteItem(sku);
        }
예제 #3
0
        /// <summary>
        /// Updates the quantity and prices on all supplied items.
        /// </summary>
        /// <param name="manager">The manager.</param>
        /// <param name="accountId">The account id.</param>
        /// <param name="itemQuantityAndPrice">The item quantity and price.</param>
        public static void UpdateQuantityAndPrices(this IChannelAdvisorManager manager, string accountId, List <InventoryItemQuantityAndPrice> itemQuantityAndPrice)
        {
            var itemService = manager.GetItemsServiceByAccountId(accountId);

            itemService.UpdateQuantityAndPrices(itemQuantityAndPrice);
        }
예제 #4
0
        /// <summary>
        /// Creates or update an item.
        /// </summary>
        /// <param name="manager">The manager.</param>
        /// <param name="accountId">The account id.</param>
        /// <param name="item">An item to add / update.</param>
        /// <remarks>If SKU exists, item is updated, otherwise it's created.
        /// <para>For update, populate only properties you want updated. Other properties remain unchanged.</para></remarks>
        /// <seealso href="http://developer.channeladvisor.com/display/cadn/SynchInventoryItemList"/>
        public static void SynchItem(this IChannelAdvisorManager manager, string accountId, InventoryItemSubmit item)
        {
            var itemService = manager.GetItemsServiceByAccountId(accountId);

            itemService.SynchItem(item);
        }
예제 #5
0
        /// <summary>
        /// Gets the additional item quantities.
        /// </summary>
        /// <param name="manager">The manager.</param>
        /// <param name="accountId">The account id.</param>
        /// <param name="sku">The sku.</param>
        /// <returns>Item quantities.</returns>
        /// <remarks>This is required since <see cref="GetItems(IChannelAdvisorManager,string,string[])"/> returns
        /// only available quantity.</remarks>
        /// <see href="http://developer.channeladvisor.com/display/cadn/GetInventoryItemQuantityInfo"/>
        public static QuantityInfoResponse GetItemQuantities(this IChannelAdvisorManager manager, string accountId, string sku)
        {
            var itemsService = manager.GetItemsServiceByAccountId(accountId);

            return(itemsService.GetItemQuantities(sku));
        }
예제 #6
0
        /// <summary>
        /// Gets the item attributes.
        /// </summary>
        /// <param name="manager">The manager.</param>
        /// <param name="accountId">The account id.</param>
        /// <param name="sku">The sku.</param>
        /// <returns>Item attributes collection.</returns>
        public static AttributeInfo[] GetAttributes(this IChannelAdvisorManager manager, string accountId, string sku)
        {
            var itemsService = manager.GetItemsServiceByAccountId(accountId);

            return(itemsService.GetAttributes(sku));
        }