Ejemplo n.º 1
0
        private void ParseFromJson()
        {
            if (string.IsNullOrEmpty(Json))
            {
                return;
            }

            var json = new JSON(Json);

            PriceValue   = (json.ToFloat("price_amount_micros") / 1000000).ToString();
            CurrencyCode = json.ToString("price_currency_code");

            SubscriptionPeriod = json.ToString("subscriptionPeriod");
            FreeTrialPeriod    = json.ToString("freeTrialPeriod");

            IntroductoryPriceValue  = (json.ToFloat("introductoryPriceAmountMicros") / 1000000).ToString();
            IntroductoryPrice       = json.ToString("introductoryPrice");
            IntroductoryPricePeriod = json.ToString("introductoryPricePeriod");
            IntroductoryPriceCycles = json.ToString("introductoryPriceCycles");

            Sku = json.ToString("productId");
        }
Ejemplo n.º 2
0
        private void ParseFromJson()
        {
            if (string.IsNullOrEmpty(Json))
            {
                return;
            }
            var json = new JSON(Json);

            if (string.IsNullOrEmpty(PriceValue))
            {
                float val = json.ToFloat("price_amount_micros");
                val       /= 1000000;
                PriceValue = val.ToString();
            }
            if (string.IsNullOrEmpty(CurrencyCode))
            {
                CurrencyCode = json.ToString("price_currency_code");
            }
        }