Faker.NewZealand 0.1.1

dotnet add package Faker.NewZealand --version 0.1.1
                    
NuGet\Install-Package Faker.NewZealand -Version 0.1.1
                    
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="Faker.NewZealand" Version="0.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Faker.NewZealand" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Faker.NewZealand" />
                    
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 Faker.NewZealand --version 0.1.1
                    
#r "nuget: Faker.NewZealand, 0.1.1"
                    
#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 Faker.NewZealand@0.1.1
                    
#: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=Faker.NewZealand&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Faker.NewZealand&version=0.1.1
                    
Install as a Cake Tool

Bogus.NewZealand

NZ-specific fake data for Bogus. Generates format- and checksum-valid IRD numbers, NZBNs, bank accounts, phone numbers, and postcodes.

using Bogus;
using Bogus.NewZealand;

var faker = new Faker();

faker.NewZealand().IrdNumber();    // "123-456-789"  (mod-11 valid)
faker.NewZealand().Nzbn();         // "9429012345678" (GS1 mod-10 valid)
faker.NewZealand().BankAccount();  // "12-3107-1234567-001"
faker.NewZealand().BankAccount(bank: "Kiwibank");
faker.NewZealand().MobileNumber(); // "021 234 5678"
faker.NewZealand().LandlineNumber(); // "09 123 4567"
faker.NewZealand().Postcode(NzRegion.Wellington); // "6011"

Also works on a bare Randomizer:

new Randomizer(42).NewZealand().IrdNumber();

Notes

  • Values are not registered to any real person or business.
  • NZ Post postcode ranges are approximate.

License

MIT.

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.1 154 6/25/2026