Skip to content

Commit 33cb7e9

Browse files
philatcdcraigAtCD
andauthored
feat: added a lot of the missing Experian models and related consts (#3)
* feat: added a lot of the missing Experian models and related consts * fix: update autcomplete docs Co-authored-by: Craig Smith <craig.smith@customd.com>
1 parent 4f82359 commit 33cb7e9

21 files changed

+325
-14
lines changed

src/Consts/ChequeCardHeld.php

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace CustomD\LaravelExperian\Consts;
4+
5+
use MyCLabs\Enum\Enum;
6+
7+
class ChequeCardHeld extends Enum
8+
{
9+
public const OPT_YES = 'Y';
10+
public const OPT_NO = 'S';
11+
public const NOT_ASKED = 'Q';
12+
public const NOT_GIVEN = 'Z';
13+
}

src/Consts/CountryOfBirth.php

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace CustomD\LaravelExperian\Consts;
4+
5+
use MyCLabs\Enum\Enum;
6+
7+
class CountryOfBirth extends Enum
8+
{
9+
10+
/**
11+
* New application or proposal
12+
*/
13+
public const ENGLAND = 'E';
14+
public const WALES = 'W';
15+
public const SCOTLAND = 'S';
16+
public const NORTHERN_IRELAND = 'I';
17+
public const OTHER = 'O';
18+
}

src/Consts/CurrentAccountHeld.php

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace CustomD\LaravelExperian\Consts;
4+
5+
use MyCLabs\Enum\Enum;
6+
7+
class CurrentAccountHeld extends Enum
8+
{
9+
public const OPT_YES = 'Y';
10+
public const OPT_NO = 'S';
11+
public const NOT_ASKED = 'Q';
12+
public const NOT_GIVEN = 'Z';
13+
}

src/Consts/EmploymentStatus.php

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
namespace CustomD\LaravelExperian\Consts;
4+
5+
use MyCLabs\Enum\Enum;
6+
7+
class EmploymentStatus extends Enum
8+
{
9+
public const EMPLOYED = 'E';
10+
public const SELF_EMPLOYED_PROFESSIONAL = 'P';
11+
public const SELF_EMPLOYED_NON_PROFESSIONAL = 'N';
12+
public const STUDENT = 'S';
13+
public const HOUSEWIFE = 'H';
14+
public const RETIRED = 'R';
15+
public const PART_TIME_EMPLOYED = 'L';
16+
public const TEMPORARY_EMPLOYMENT = 'T';
17+
public const UNEMPLOYED = 'U';
18+
public const OTHER = 'X';
19+
public const NOT_GIVEN = 'Z';
20+
}

src/Consts/MaritalStatus.php

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace CustomD\LaravelExperian\Consts;
4+
5+
use MyCLabs\Enum\Enum;
6+
7+
class MaritalStatus extends Enum
8+
{
9+
public const MARRIED = 'M';
10+
public const SINGLE = 'S';
11+
public const DIVORCED = 'D';
12+
public const WIDOWED = 'W';
13+
public const TO_BE_MARRIED = 'E';
14+
public const COHABITING = 'C';
15+
public const SEPARATED = 'X';
16+
public const OTHER = 'O';
17+
public const NOT_ASKED = 'Q';
18+
public const NOT_GIVEN = 'Z';
19+
}

src/Consts/OccupationStatus.php

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace CustomD\LaravelExperian\Consts;
4+
5+
use MyCLabs\Enum\Enum;
6+
7+
class OccupationStatus extends Enum
8+
{
9+
public const SENIOR_MANAGEMENT = 'T';
10+
public const MANAGEMENT_PROFESSIONAL = 'M';
11+
public const SUPERVISOR = 'O';
12+
public const SKILLED = 'S';
13+
public const SEMI_SKILLED = 'P';
14+
public const UNSKILLED = 'N';
15+
public const JUNIOR = 'J';
16+
public const OTHER = 'X';
17+
public const UNEMPLOYED = 'U';
18+
public const NOT_GIVEN = 'Z';
19+
}

src/Consts/ResidentialStatus.php

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace CustomD\LaravelExperian\Consts;
4+
5+
use MyCLabs\Enum\Enum;
6+
7+
class ResidentialStatus extends Enum
8+
{
9+
public const OWNER_OCCUPIER = 'O';
10+
public const LIVING_WITH_PARENTS = 'P';
11+
public const TENANT_FURNISHED = 'F';
12+
public const TENANT_UNFURNISHED = 'U';
13+
public const COUNCIL_TENANT = 'C';
14+
public const OTHER_TENANT = 'T';
15+
public const JOINT_OWNER = 'J';
16+
public const OTHER = 'X';
17+
public const NOT_ASKED = 'Q';
18+
public const NOT_GIVEN = 'Z';
19+
}

src/Consts/STDCode.php

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace CustomD\LaravelExperian\Consts;
4+
5+
use MyCLabs\Enum\Enum;
6+
7+
class STDCode extends Enum
8+
{
9+
public const EX_DIRECTORY = 'X';
10+
public const NOT_ASKED = 'Q';
11+
public const NOT_GIVEN = 'Z';
12+
}

src/ExperianModels/AccountBalance.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use CustomD\LaravelExperian\Consts\AccountBalanceStatus;
66

77
/**
8-
* \CustomD\LaravelExperian\ExperianModels\Response
8+
* \CustomD\LaravelExperian\ExperianModels\AccountBalance
99
*
1010
* @property \CustomD\LaravelExperian\Consts\AccountBalanceStatus $Status
1111
* @property string $AccountBalance

src/ExperianModels/AdditionalData.php

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
namespace CustomD\LaravelExperian\ExperianModels;
4+
5+
/**
6+
* \CustomD\LaravelExperian\ExperianModels\AdditionalData
7+
*
8+
* @property string $DrivingLicenceNumber
9+
* @property string $VehicleRegistration
10+
* @property string $PlaceOfBirth
11+
* @property string $MothersMaidenName
12+
* @property string $BirthSurname
13+
*/
14+
class AdditionalData extends Base
15+
{
16+
protected $fields = [
17+
'DrivingLicenceNumber' => 'string',
18+
'VehicleRegistration' => 'string',
19+
'PlaceOfBirth' => 'string',
20+
'MothersMaidenName' => 'string',
21+
'BirthSurname' => 'string',
22+
];
23+
}

src/ExperianModels/Applicant.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
* The first submitted applicant will be the main applicant.
99
*
1010
* @property string $ApplicantIdentifier
11-
* @property string $Person
12-
* @property string $Alias
13-
* @property string $Association
14-
* @property string $ApplicantData
11+
* @property \CustomD\LaravelExperian\ExperianModels\Person $Person
12+
* @property \CustomD\LaravelExperian\ExperianModels\Aliases $Alias
13+
* @property \CustomD\LaravelExperian\ExperianModels\AssociationItems $Association
14+
* @property \CustomD\LaravelExperian\ExperianModels\ApplicantData $ApplicantData
1515
*/
1616
class Applicant extends Base
1717
{

src/ExperianModels/ApplicantData.php

+15-1
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,27 @@
22

33
namespace CustomD\LaravelExperian\ExperianModels;
44

5+
use CustomD\LaravelExperian\ExperianModels\PersonalDetails;
6+
use CustomD\LaravelExperian\ExperianModels\BankDetails;
7+
use CustomD\LaravelExperian\ExperianModels\Employment;
8+
use CustomD\LaravelExperian\ExperianModels\AdditionalData;
9+
use CustomD\LaravelExperian\ExperianModels\AffordabilityIQ;
10+
11+
/**
12+
* @property \CustomD\LaravelExperian\ExperianModels\PersonalDetails $PersonalDetails
13+
* @property \CustomD\LaravelExperian\ExperianModels\BankDetails $BankDetails
14+
* @property \CustomD\LaravelExperian\ExperianModels\Employment $EmploymentDetails
15+
* @property \CustomD\LaravelExperian\ExperianModels\AdditionalData $AdditionalData
16+
* @property \CustomD\LaravelExperian\ExperianModels\AffordabilityIQ $AffordabilityIQ
17+
*/
18+
519
class ApplicantData extends Base
620
{
721

822
protected $fields = [
923
'PersonalDetails' => PersonalDetails::class,
1024
'BankDetails' => BankDetails::class,
11-
'EmploymentDetails' => EmploymentDetails::class,
25+
'EmploymentDetails' => Employment::class,
1226
'AdditionalData' => AdditionalData::class,
1327
'AffordabilityIQ' => AffordabilityIQ::class
1428
];

src/ExperianModels/BankDetails.php

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace CustomD\LaravelExperian\ExperianModels;
4+
5+
use CustomD\LaravelExperian\Consts\AccountBalanceStatus;
6+
7+
/**
8+
* \CustomD\LaravelExperian\ExperianModels\BankDetails
9+
*
10+
* @property \CustomD\LaravelExperian\ExperianModels\Time $TimeWithBank
11+
* @property string $BankAccountNumber
12+
* @property \CustomD\LaravelExperian\ExperianModels\CurrentAccountHeld $CurrentAccountHeld
13+
* @property \CustomD\LaravelExperian\ExperianModels\ChequeCardHeld $ChequeCardHeld
14+
*/
15+
class BankDetails extends Base
16+
{
17+
18+
protected $fields = [
19+
"TimeWithBank" => Time::class,
20+
"BankAccountNumber" => 'string',
21+
"CurrentAccountHeld" => CurrentAccountHeld::class,
22+
"ChequeCardHeld" => ChequeCardHeld::class
23+
];
24+
}

src/ExperianModels/Employment.php

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
namespace CustomD\LaravelExperian\ExperianModels;
4+
5+
use CustomD\LaravelExperian\ExperianModels\Telephone;
6+
use CustomD\LaravelExperian\ExperianModels\Time;
7+
use CustomD\LaravelExperian\Consts\OccupationStatus;
8+
use CustomD\LaravelExperian\Consts\EmploymentStatus;
9+
10+
/**
11+
* @property string $GrossAnnualIncome Gross Annual Income in GBP. May contain '£'
12+
* @property \CustomD\LaravelExperian\ExperianModels\Telephone $WorkTelephone
13+
* @property \CustomD\LaravelExperian\ExperianModels\Time $TimeWithEmployer
14+
* @property string $EmployerName The company name of the applicant’s current employer
15+
* @property \CustomD\LaravelExperian\Consts\OccupationStatus $OccupationStatus
16+
* @property \CustomD\LaravelExperian\Consts\EmploymentStatus $EmploymentStatus
17+
*/
18+
class Employment extends Base
19+
{
20+
protected $fields = [
21+
'GrossAnnualIncome' => 'string',
22+
'WorkTelephone' => Telephone::class,
23+
'TimeWithEmployer' => Time::class,
24+
'EmployerName' => 'string',
25+
'OccupationStatus' => OccupationStatus::class,
26+
'EmploymentStatus' => EmploymentStatus::class,
27+
];
28+
}
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
namespace CustomD\LaravelExperian\ExperianModels;
4+
5+
use CustomD\LaravelExperian\Consts\MaritalStatus;
6+
use CustomD\LaravelExperian\Consts\CountryOfBirth;
7+
use CustomD\LaravelExperian\ExperianModels\Telephone;
8+
9+
/**
10+
* @property \CustomD\LaravelExperian\Consts\MaritalStatus $MaritalStatus
11+
* @property \CustomD\LaravelExperian\Consts\Telephone $HomeTelephone
12+
* @property string $MobileTelNumber
13+
* @property int $Dependants
14+
* @property \CustomD\LaravelExperian\Consts\ResidentialStatus $ResidentialStatus
15+
* @property string $EmailAddress
16+
* @property string $NatInsuranceNum
17+
* @property string $PassportNumber
18+
* @property \CustomD\LaravelExperian\Consts\CountryOfBirth $CountryOfBirth
19+
*/
20+
class PersonalDetails extends Base
21+
{
22+
protected $fields = [
23+
"MaritalStatus" => MaritalStatus::class,
24+
"HomeTelephone" => Telephone::class,
25+
"MobileTelNumber" => 'string',
26+
"Dependants" => 'integer',
27+
"ResidentialStatus" => ResidentialStatus::class,
28+
"EmailAddress" => 'string',
29+
"NatInsuranceNum" => 'string',
30+
'PassportNumber' => 'string',
31+
'CountryOfBirth' => CountryOfBirth::class,
32+
];
33+
}

src/ExperianModels/Telephone.php

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace CustomD\LaravelExperian\ExperianModels;
4+
5+
use CustomD\LaravelExperian\Consts\STDCode;
6+
use CustomD\LaravelExperian\ExperianModels\YearMonth;
7+
8+
/**
9+
* @property \CustomD\LaravelExperian\Consts\STDCode $STDCode Home Telephone STD Code.
10+
* @property string $Number Telephone Number. Not required if STD code is set to X, N, Q or Z
11+
*/
12+
class Telephone extends Base
13+
{
14+
protected $fields = [
15+
"STDCode" => STDCode::class,
16+
"Number" => 'string',
17+
];
18+
}

src/ExperianModels/ThirdPartyData.php

+17-8
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,29 @@
22

33
namespace CustomD\LaravelExperian\ExperianModels;
44

5+
use CustomD\LaravelExperian\Consts\YesNo;
6+
7+
/**
8+
* @property \CustomD\LaravelExperian\Consts\YesNo $OptOut Include or exclude financial associates data from processing
9+
* @property \CustomD\LaravelExperian\Consts\YesNo $TransientAssociation Transient Associations Flag
10+
* @property \CustomD\LaravelExperian\Consts\YesNo $HHOAllowed Household Override Allowed Flag
11+
* @property string OptOutValidCutOff Opt out score cut off. Can be one of: N - No Opt Out Cut off required OR 5 digit cut off score. Required if OptOut set to Y
12+
* @property-read string $OutcomeCode Output field only. Third Party Data Outcome code for the application
13+
*/
514
class ThirdPartyData extends Base
615
{
716

817
protected $fields = [
9-
"OptOut",
10-
"TransientAssociation",
11-
"HHOAllowed",
12-
"OptOutValidCutOff",
13-
"OutcomeCode",
18+
"OptOut" => YesNo::class,
19+
"TransientAssociation" => YesNo::class,
20+
"HHOAllowed" => YesNo::class,
21+
"OptOutValidCutOff" => 'string',
22+
"OutcomeCode" => 'string',
1423
];
1524

1625
protected $defaults = [
17-
"OptOut" => "Y",
18-
"TransientAssociation" => "Y",
19-
"HHOAllowed" => "Y",
26+
"OptOut" => YesNo::OPT_YES,
27+
"TransientAssociation" => YesNo::OPT_YES,
28+
"HHOAllowed" => YesNo::OPT_YES,
2029
];
2130
}

src/ExperianModels/Time.php

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace CustomD\LaravelExperian\ExperianModels;
4+
5+
/**
6+
* @property string $Years
7+
* @property string $Months
8+
*/
9+
class Time extends Base
10+
{
11+
protected $fields = [
12+
'Years' => 'string',
13+
'Months' => 'string',
14+
];
15+
}

src/ExperianModels/VRConfirmation.php

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88

99
/**
1010
* Output field only.
11+
*
12+
* @property \CustomD\LaravelExperian\Consts\Confirmed $Confirmed
13+
* @property \CustomD\LaravelExperian\Consts\YesNo $Surname
14+
* @property \CustomD\LaravelExperian\Consts\YesNo $Forname
15+
* @property string YrsERSP
16+
* @property string YrsERSF
1117
*/
1218
class VRConfirmation extends Base
1319
{

0 commit comments

Comments
 (0)