void CreateOutputSpec(ExtGetVehicleInventory inv, SearchInventoryCriteria criteria) { //minimal required outputspecifications var o = inv.ExtGetVehicleInventoryDataArea.ExtGet.OutputSpecification = new OutputSpecification(); o.IncludeModelInfo = "true"; o.IncludePricing = "true"; o.IncludeOptions = "true"; o.IncludeStatus = "true"; o.IncludeVendorAssigned = "true"; o.IncludeVendorDetail = "true"; o.OptionDescriptionType = "DEFAULT"; }
ExtGetVehicleInventory Create(SearchInventoryCriteria criteria) { ExtGetVehicleInventory inv = new ExtGetVehicleInventory(); inv.ExtApplicationArea = new ExtApplicationArea(); inv.ExtApplicationArea.CreationDateAndTime = DateTime.UtcNow.ToString("o"); CreateCredentials(inv,criteria); if(criteria.Vehicle.HasValue) CreateVehicleSpec(inv, criteria); CreateOutputSpec(inv, criteria); return inv; }
void CreateCredentials(ExtGetVehicleInventory inv, SearchInventoryCriteria criteria) { var d = inv.ExtApplicationArea.Destination = new Destination(); d.DestinationNameCode = implementer.DestinationNameCode; d.DestinationSoftwareCode = implementer.DestinationSoftwareCode; var e = inv.ExtApplicationArea.ExtSender = new ExtSender(); e.CreatorNameCode = implementer.CreatorNameCode; e.SenderNameCode = implementer.SenderNameCode; e.DealerNumberID = implementer.DealerNumberID; e.ExtDealerCountryCode = implementer.ExtDealerCountryCode; e.TaskID = implementer.TaskID; e.ComponentID = implementer.ComponentID; e.ExtLanguageCode = implementer.ExtLanguageCode; inv.ExtGetVehicleInventoryDataArea = new ExtGetVehicleInventoryDataArea(); var g = inv.ExtGetVehicleInventoryDataArea.ExtGet = new ExtGet(); g.SearchCriteria = new SearchCriteria(); //var f = g.FilterCriteria = new FilterCriteria(); //f.EarliestEventCode = "3000"; //10/20/30/40/50 g.ExtMaxItems = criteria.MaxItems.ToString(); g.Expression = " "; }
void CreateVehicleSpec(ExtGetVehicleInventory inv, SearchInventoryCriteria criteria) { var vs = inv.ExtGetVehicleInventoryDataArea.ExtGet.VehicleSpecification = new VehicleSpecification(); vs.MakeCode = criteria.Vehicle.Value.MakeCode; //vs.MerchandisingModelDesignator = "12P43"; //vs.SellingSourceCode = "13"; vs.Year = criteria.Vehicle.Value.Year; }