ratespecial / equifax-insight-file
Library to write fixed length files specific to Equifax insight file guide
1.3.0
2025-05-22 17:22 UTC
Requires
- php: ^8.3
- gugglegum/clv-rw: ^1.0
- nesbot/carbon: ^3.6
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^11.2
- squizlabs/php_codesniffer: ^3.7
- swisnl/phpstan-bitbucket: ^0.3.0
README
Provides a class for creating Equifax Consumer Insight data files. Based on File Layout Guide v16.
Each file will have a batch date that represents the month and year of the data contained in the file.
Date format
Empty dDates in an InsightRow
object should be set to 0. This will cause the date to be written as 00000000
in the output.
Example Usage
use RateSpecial\EquifaxInsightFile\InsightFile;
use RateSpecial\EquifaxInsightFile\InsightRow;
use RateSpecial\EquifaxInsightFile\Enums\AccountType;
use RateSpecial\EquifaxInsightFile\Enums\CompanyType;
use RateSpecial\EquifaxInsightFile\Enums\CurrentStatus;
use RateSpecial\EquifaxInsightFile\Enums\CurrentBalanceSign;
use RateSpecial\EquifaxInsightFile\Enums\Flags;
use RateSpecial\EquifaxInsightFile\Enums\RepaymentFrequency;
use RateSpecial\EquifaxInsightFile\Enums\SpecialIndicator;
...
$file = new InsightFile();
$file->portfolioNumber = 99999999;
$file->companyType = CompanyType::BANK_FINANCE;
$file->batchDate = Carbon::now();
$row = new InsightRow();
//$row->portfolioNumber = 99999999; // OPTIONAL, WILL PULL VALUE FROM $file->portfolioNumber IF NOT SET
//$row->companyType = CompanyType::BANK_FINANCE; // OPTIONAL, WILL PULL VALUE FROM $file->companyType IF NOT SET
$row->accountType = AccountType::PROPERTY_RENTAL;
$row->accountNumber = '1234abc';
$row->startDate = 20230418;
$row->endDate = '02/24/2019';
$row->defaultDate = 0;
$row->birthDate = Carbon::now();
$row->creditLimit = 333888;
$row->flags = Flags::DEBT_MANAGEMENT;
$row->spare1 = '';
$row->transientAssociation = 'T';
$row->spare2 = '';
$row->specialIndicator = SpecialIndicator::ADDRESS_CHANGE;
$row->currentBalance = 234324;
$row->currentBalanceSign = CurrentBalanceSign::CREDIT;
$row->defaultBalance = 12;
$row->startBalance = 99;
$row->repaymentValue = 13221;
$row->repaymentPeriod = 322;
$row->repaymentFrequency = RepaymentFrequency::WEEKLY;
$row->currentStatus = CurrentStatus::SETTLED;
$row->nameDetails = 'JOHN DOE';
$row->address1 = '123 fake street';
$row->address2 = 'Test Town';
$row->address3 = 'Test County';
$row->address4 = '';
$row->postcode = 'TT145TF';
$row->spare3 = '';
$row->newAccountNumber = 'abc999';
$row->usersOwnData = 'foobar';
$file->addRow($row);
$content = $file->create(); // returns created file contents as a string