nz_irdIntlIDs

Mock Jutsu HOW-TO | EN

Generating high-quality mock data is essential for developers working on financial and tax-related applications in the Oceania region. Within the mock-jutsu library, the nz_ird function serves as a specialized tool for creating realistic New Zealand Inland Revenue Department (IRD) numbers. These identifiers are crucial for testing payroll systems, accounting software, and government service integrations where valid tax identification is required to pass initial validation logic. By using mock-jutsu, developers can avoid the risks associated with using real PII while ensuring their systems behave correctly under production-like conditions.

The nz_ird function is engineered to adhere strictly to the official specifications provided by New Zealand authorities. Each generated value falls within the established numerical range of 10,000,000 to 150,000,000 and can be either eight or nine digits long. The most critical technical aspect of this function is its implementation of the MOD-11 checksum algorithm. This ensures that every piece of test data produced is mathematically valid, allowing it to bypass front-end masks and back-end validation routines that check for structural integrity. Whether you are validating a user profile update or a complex tax calculation engine, these numbers provide the necessary realism for comprehensive quality assurance.

Integrating the nz_ird generator into your existing workflow is seamless, regardless of your technology stack. For Python developers, a simple call to jutsu.generate('nz_ird') returns a valid string instantly, making it perfect for unit testing. DevOps engineers can leverage the CLI tool by running mockjutsu generate nz_ird for quick script-based data seeding in CI/CD pipelines. Furthermore, performance testers can utilize the JMeter plugin syntax, ${__mockjutsu(nz_ird,)}, to inject dynamic test data directly into high-load scenarios. This versatility reduces the friction of manual data creation and accelerates the development lifecycle by providing a reliable source of truth for international identifiers.

Beyond simple validation, using nz_ird within mock-jutsu is a best practice for maintaining data privacy and security. By populating staging environments with synthetic test data, teams eliminate the possibility of accidental data leaks involving sensitive citizen information. It is an ideal solution for edge-case testing, such as verifying how a system handles the transition between eight-digit and nine-digit formats or ensuring that the MOD-11 check properly rejects corrupted inputs. Ultimately, mock-jutsu empowers software engineering teams to build more robust, compliant, and reliable financial applications with minimal overhead.

CLI Usage
mockjutsu generate nz_irdmockjutsu bulk nz_ird --count 10mockjutsu export nz_ird --count 10 --format jsonmockjutsu export nz_ird --count 10 --format csvmockjutsu export nz_ird --count 10 --format sql# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate nz_ird --maskmockjutsu bulk nz_ird --count 5 --mask
Python API
from mockjutsu import jutsujutsu.generate('nz_ird')jutsu.bulk('nz_ird', count=10)jutsu.template(['nz_ird'], count=5)# mask=True: regulation-compliant outputjutsu.generate('nz_ird', mask=True)jutsu.bulk('nz_ird', count=5, mask=True)
JMeter
${__mockjutsu_intl_ids(nz_ird)}# JMeter Function: __mockjutsu_intl_ids# Parameter 1: nz_ird# Parameter 2: (not required for this function)# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_intl_ids(nz_ird,mask)}
REST API
GET /generate/nz_ird# → {"type":"nz_ird","result":"...","status":"ok"}GET /bulk/nz_ird?count=10POST /template {"types":["nz_ird"],"count":1}# mask=true: regulation-compliant outputGET /generate/nz_ird?mask=trueGET /bulk/nz_ird?count=5&mask=true

Parameters

Parameter Values Description
--mask true | false Return a regulation-compliant masked value (PCI DSS, GDPR, KVKK…)

Other Languages