예제 #1
0
        protected static string GetPrice(AllStockOffer offer)
        {
            double priceWithMargin = offer.price_usd_with_delivery_to_usa_and_minus_vat + MARGIN_USD;
            double priceWithFeeMinusBonanzaDelivery = (priceWithMargin * 1.18) - 29;

            priceWithFeeMinusBonanzaDelivery = Math.Round(priceWithFeeMinusBonanzaDelivery, 2);
            var price = priceWithFeeMinusBonanzaDelivery.ToString("F", System.Globalization.CultureInfo.CreateSpecificCulture("en-US"));

            return(price);
        }
예제 #2
0
        private static AllStockOffer CreateOffer(Listing listing, RootParsingObject market, Shop jsonMarket)
        {
            if (listing.sku == "852628-001")
            {
                bool test = true;
            }

            var offer = new AllStockOffer();

            offer.url       = listing.url;
            offer.price     = listing.price;
            offer.old_price = listing.old_price;
            offer.currency  = jsonMarket.currency;
            //offer.currency = market.market_info.currency;
            offer.stock_name = market.market_info.name;
            offer.price_usd_with_delivery_to_usa_and_minus_vat = AllStockExporter.GetAllStockPrice(offer.price, offer.currency, jsonMarket.delivery_to_usa, jsonMarket.vat_value);
            return(offer);
        }