The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

SEE ALSO

See UK::Vehicle for usage information.

METHODS

result()

Whether the query against the VES API for information on the vehicle was successful. If it wasn't, more information is available using the method message().

Returns 1 if successful, 0 otherwise. Successful means a record for the vehicle was found and returned.

message()

More information on the success of the query that returned this result. For information on possible responses see here

co2Emissions()

The registered CO2 emissions in grammes per km.

Returns an integer.

colour()

The registered colour of the vehicle.

Returns a string.

dateOfLastV5CIssued()

The date the most recent V5 was issued, to the day. This can be helpful in determining when it was most revently registered to a new keeper, and whether the V5 you have in front of you is the current one.

Returns a DateTime object. The time portion of this object will be set to to 00:00:00, and the timezone "Europe/London."

engineCapacity()

The engine capacity of any combustion engine fitted in cc. Should be undef for electric vehicles.

Returns an integer.

euroStatus()

The relevant european emissions standard with which the vehicle complies.

Returns a string.

fuelType()

The type of fuel the vehicle uses. he API documentation doesn't list this as an enumerated value, so presumably they don't know what's coming over the next ten years and are leaving flexible. Plan for anything! If you've seen other values let me know and I'll add it to the list. Some values currently in use are:

- "PETROL" - "DIESEL" - "HYBRID ELECTRIC" - "ELECTRICITY"

Returns a string containing god knows what.

make()
manufacturer()

The registered manufacturer name of the vehicle.

Returns a string.

markedForExport()

Whether or not this vehicle has been marked for export - this means someone has notified the DVLA of their intention to export it. The vehicle is no longer registered in the UK and cannot be taxed, nor can a V5 be issued for it. It can be MOT tested.

No information is available as to whether the vehicle has actually been exported.

Returns 1 if marked for export, 0 otherwise.

monthOfFirstRegistration()

The month in which the vehicle was first registered with the DVLA. This is not likely to be the month in which it was manufactured.

Returns a DateTime object. The day portion of this object will be set to the first day of the month, the time portion of this object will be set to to 00:00:00, and the timezone "Europe/London."

motExpiryDate()

The date the current MoT expires, to the day.

Returns a DateTime object. The time portion of this object will be set to to 00:00:00, and the timezone "Europe/London." Returns undef if no MoT has been done.

motStatus()

A string representing the vehicle's mot test status.

Returns a string with one of these values: - "No details held by DVLA" - "No results returned" (don't know the difference) - "Not valid" (last MoT pass has expired) - "Valid" (last MoT pass has not expired)

registrationNumber
vrm

The VRM of the vehicle for which the status information was returned. This ought to match the VRM you asked for, with any spaces removed.

Returns a string.

revenueWeight()

The registered "plated gross weight" for the vehicle in kg. See The Vehicle Excise and Registration Act 1994 for more.

Returns an integer.

taxDueDate()

The date the road tax is next due to be paid; this does not take into account the payment method. Even if the keeper signed up to pay monthly by direct debit it will show a date up to 12 months in the future when compared to now().

Returns a DateTime object. The time portion of this object will be set to to 00:00:00, and the timezone "Europe/London."

taxStatus()

A string representing the vehicle's tax status.

Returns a string with one of these value: - "Not Taxed for on Road Use" (farm vehicle etc.?) - "SORN" - "Taxed" (last MoT pass has expired) - "Untaxed"

typeApproval()

The registered type approval category for the vehicle. You can infer some things about the type of vehicle from this; see the Vehicle Certification Agency's website for a list of the categories.

Returns a 2-character string.

wheelplan() =item wheelPlan()

A description of the number of axles and sometimes the nature of the body of the vehicle.

Returns a string containing god knows what.

yearOfManufacture()

The month in which the vehicle was manufactured.

Returns a DateTime object. The month portion of this object will be set to the first month of the year, the day portion of this object will be set to the first day of the month, the time portion of this object will be set to to 00:00:00, and the timezone "Europe/London."

BUGS AND REQUESTS

Please report to the GitHub repository

AUTHOR

Ian Gibbs, <igibbs@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2022 by Ian Gibbs

This library is free software; you can redistribute it and/or modify it under the terms of the GNU GPL version 3.