public void emitter_emitDeleteFromCart(string json)
        {
            string[] args = JSON.JsonHelper.Deserialize <string[]>(json);

            if (args.Length < 4)
            {
                DispathWrongParametersResult();
                return;
            }

            string cartID = args[0];

            var jsonLineItem = JSON.JsonHelper.Deserialize <LineItem>(args[1]);
            var lineItem     = new Radiumone.Connect.EmitterInfo.LineItem()
            {
                ProductID = jsonLineItem.UniversalID, ProductName = jsonLineItem.UniversalName, Currency = jsonLineItem.Currency, ItemCategory = jsonLineItem.ItemCategory, MsrPrice = jsonLineItem.MsrPrice, PricePaid = jsonLineItem.PricePaid, Quantity = jsonLineItem.Quantity, UnitOfMeasure = jsonLineItem.UnitOfMeasure
            };

            var otherInfo = OtherInfoFromJSON(args[2]);

            ExecuteAndWait(() =>
            {
                Emitter.Instance.EmitDeleteFromCart(cartID, lineItem, otherInfo);

                DispathOkResult();
            });
        }
        public void emitter_emitAddToCart(string json)
        {
            string[] args = JSON.JsonHelper.Deserialize<string[]>(json);

            if (args.Length < 4)
            {
                DispathWrongParametersResult();
                return;
            }

            string cartID = args[0];

            var jsonLineItem = JSON.JsonHelper.Deserialize<LineItem>(args[1]);
            var lineItem = new Radiumone.Connect.EmitterInfo.LineItem() { ProductID = jsonLineItem.UniversalID, ProductName = jsonLineItem.UniversalName, Currency = jsonLineItem.Currency, ItemCategory = jsonLineItem.ItemCategory, MsrPrice = jsonLineItem.MsrPrice, PricePaid = jsonLineItem.PricePaid, Quantity = jsonLineItem.Quantity, UnitOfMeasure = jsonLineItem.UnitOfMeasure };

            var otherInfo = OtherInfoFromJSON(args[2]);

            ExecuteAndWait(() =>
            {
                Emitter.Instance.EmitAddToCart(cartID, lineItem, otherInfo);

                DispathOkResult();
            });
        }