Exemple #1
0
        public override Listing ToOreListing()
        {
            var listing = new ResidentialListing();

            CopyOverListingData(listing);

            listing.CreatedOn    = SoldOn;
            listing.UpdatedOn    = SoldOn;
            listing.StatusType   = StatusType.Sold;
            listing.SourceStatus = StatusType.Sold.ToString();

            listing.PropertyType = PropertyTypeHelpers.ToPropertyType(PropertyType);

            listing.Pricing = new SalePricing
            {
                SoldOn    = SoldOn,
                SoldPrice = SoldPrice
            };

            var rentalPriceText = SoldPrice > 0
                                      ? $"${SoldPrice:N0}"
                                      : "price undisclosed";

            listing.Title = $"Sold: {rentalPriceText}.";

            return(listing);
        }
Exemple #2
0
        public override Listing ToOreListing()
        {
            var listing = new RentalListing();

            CopyOverListingData(listing);

            listing.CreatedOn    = LeasedOn;
            listing.UpdatedOn    = LeasedOn;
            listing.StatusType   = StatusType.Leased;
            listing.SourceStatus = StatusType.Leased.ToString();

            listing.PropertyType = PropertyTypeHelpers.ToPropertyType(PropertyType);

            listing.Pricing = new RentalPricing
            {
                RentalPrice = RentPrice,
                RentedOn    = LeasedOn
            };

            var rentalPriceText = RentPrice > 0
                                      ? $"${RentPrice:N0}"
                                      : "price undisclosed";

            listing.Title = $"Rented: {rentalPriceText}.";

            return(listing);
        }
        private static PropertyType ExtractResidentialAndRentalPropertyType(XElement document)
        {
            var propertyType = PropertyType.Unknown;

            var category = document.ValueOrDefault("category", "name");

            if (!string.IsNullOrWhiteSpace(category))
            {
                propertyType = PropertyTypeHelpers.ToPropertyType(category);
            }

            return(propertyType);
        }