TipsTrade.Dvla.Model 1.0.0.2

dotnet add package TipsTrade.Dvla.Model --version 1.0.0.2
                    
NuGet\Install-Package TipsTrade.Dvla.Model -Version 1.0.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TipsTrade.Dvla.Model" Version="1.0.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TipsTrade.Dvla.Model" Version="1.0.0.2" />
                    
Directory.Packages.props
<PackageReference Include="TipsTrade.Dvla.Model" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TipsTrade.Dvla.Model --version 1.0.0.2
                    
#r "nuget: TipsTrade.Dvla.Model, 1.0.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TipsTrade.Dvla.Model@1.0.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TipsTrade.Dvla.Model&version=1.0.0.2
                    
Install as a Cake Addin
#tool nuget:?package=TipsTrade.Dvla.Model&version=1.0.0.2
                    
Install as a Cake Tool

TipsTrade.Dvla

Provides access to the DVLA APIs:

This package replaces TipsTrade.DVLA, and resets the version to 1.x

Breaking changes

Version 1 contains breaking changes:

  • Uses the new MOT History API (confusingly v.1)
  • Rename namespaces to TipsTrade.Dvla
  • Deprecate TipsTrade.DVLA.MOTHistory.Model
  • Remove TipsTrade.DVLA.MOTHistory.MOTClient
  • Add DvlaClient which is usable with dependency injection and provides access to both the MOT History APIs and Vehicle Enquiry APIs

MOT API usage

API keys are required

using TipsTrade.Dvla;

// Configure services

services.AddHttpClient(); // If not already done
// Add DvlaClient with a singleton MotMemoryAuthStateProvider (You can implement your own provider which could be scoped).
services.AddDvlaClient<CredentialProvider, MotMemoryAuthStateProvider>(true, options => {
    options.IsSandbox = true; // Configurable sandbox for the Vehicle Enquiry
});
services.AddDvlaClientCache<MyCacheProvider>(); // Optional provider to support lookup caching
services.AddDvlaClientTenants<MyTenantProvider>(); // Optional provider to support multiple tenants

internal class CredentialProvider : ICredentialProvider {
    private readonly IConfiguration configuration;

    public CredentialProvider(IConfiguration configuration) {
        this.configuration = configuration;
    }

    public Task<TCredential> GetCredentialAsync<TCredential>((string TenantId, Provider Provider) key, CancellationToken cancellationToken = default) {
        var (_, provider) = key;
        var credential = Activator.CreateInstance<TCredential>();

        if (provider == Provider.VehicleEnquiry && credential is ApiKeyCredential veCredential) {
            veCredential.ApiKey = configuration["VehicleEnquiry:ApiKey"] ?? throw new InvalidOperationException("No API key is available.");

            return Task.FromResult(credential);
        } else if (provider == Provider.MotHistory && credential is MotHistoryCredential motCredential) {
            var config = configuration.GetSection("MotHistory").Get<MotHistoryCredential>() ?? throw new InvalidOperationException("No API key is available.");

            motCredential.ApiKey = config.ApiKey;
            motCredential.ClientId = config.ClientId;
            motCredential.ClientSecret = config.ClientSecret;
            motCredential.Email = config.Email;
            motCredential.OAuthTenantId = config.OAuthTenantId;

            return Task.FromResult(credential);
        }

        throw new NotImplementedException();
    }
}


Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Framework net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on TipsTrade.Dvla.Model:

Package Downloads
TipsTrade.Dvla

Provides access to the DVLA APIs.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0.2 114 7/30/2025