//QueryInventory
        public void queryInventoryFailed(string Message)
        {
            GetInventoryResult result = new GetInventoryResult();

            result.Status  = GetInventoryStatus.Failed;
            result.Message = Message;
            RemoveCallback("queryInventorySucceeded");
            ExecuteCallBack("queryInventoryFailed", result);
        }
        public void queryInventorySucceeded(string JsonData)
        {
            GetInventoryResult result = new GetInventoryResult();

            result.Status = GetInventoryStatus.Success;

            JSONNode jsonNode = JSONNode.Parse(JsonData);

            result.Purchases = new List <Purchase>();
            foreach (JSONNode jn in jsonNode["purchases"].AsArray)
            {
                result.Purchases.Add(Purchase.Parse(jn));
            }

            result.Products = new List <Product>();
            foreach (JSONNode jn in jsonNode["skus"].AsArray)
            {
                result.Products.Add(Product.Parse(jn));
            }

            RemoveCallback("queryInventoryFailed");
            ExecuteCallBack("queryInventorySucceeded", result);
        }