public VehicleDescription GetStyleInformationFromStyleId(int styleId) { var mSifsir = new VehicleDescriptionRequest { accountInfo = this.GetAccountInfo(), Items = new object[] { styleId }, ItemsElementName = new ItemsChoiceType[] { ItemsChoiceType.styleId }, @switch = new[] { Switch.DisableSafeStandards, Switch.ShowExtendedDescriptions, Switch.ShowAvailableEquipment, Switch.ShowConsumerInformation, Switch.ShowExtendedTechnicalSpecifications, Switch.IncludeDefinitions, Switch.IncludeRegionalVehicles, } }; var temp = _vinService.describeVehicle(mSifsir); if (temp == null) { return(null); } return(temp.responseStatus.responseCode.Equals(ResponseStatusResponseCode.Successful) ? temp : null); }
public VehicleDescription GetVehicleInformationFromVin(string mVin) { var mSifsir = new VehicleDescriptionRequest { accountInfo = GetAccountInfo(), Items = new object[] { mVin }, ItemsElementName = new[] { ItemsChoiceType.vin }, @switch = new[] { Switch.DisableSafeStandards, Switch.IncludeDefinitions, Switch.IncludeRegionalVehicles, Switch.ShowAvailableEquipment, Switch.ShowConsumerInformation, Switch.ShowExtendedDescriptions, Switch.ShowExtendedTechnicalSpecifications } }; VehicleDescription temp = _vinService.describeVehicle(mSifsir); if (temp == null) { return(null); } if (temp.responseStatus.responseCode.Equals(ResponseStatusResponseCode.Successful) && temp.modelYear > 0) { return(temp); } return(null); }
public bool ValidateVin(string mVin) { var mSifsir = new VehicleDescriptionRequest { accountInfo = this.GetAccountInfo(), Items = new object[] { mVin }, ItemsElementName = new ItemsChoiceType[] { ItemsChoiceType.vin }, @switch = new[] { Switch.DisableSafeStandards, Switch.IncludeDefinitions, Switch.IncludeRegionalVehicles, Switch.ShowAvailableEquipment, Switch.ShowConsumerInformation, Switch.ShowExtendedDescriptions, Switch.ShowExtendedTechnicalSpecifications } }; var temp = _vinService.describeVehicle(mSifsir); if (temp != null) { if (temp.responseStatus.responseCode.Equals(ResponseStatusResponseCode.Successful) || temp.responseStatus.responseCode.Equals(ResponseStatusResponseCode.ConditionallySuccessful)) { return(true); } } return(false); }