Equifax Credit Parser (Canada)
=========================

Parses Equifax Canada's FFF credit reports.


Install with `npm` or `yarn`

```
npm install equifax-credit-parser-ca
yarn add equifax-credit-parser-ca
```

Usage 

```js
import EquifaxCreditParser from 'equifax-credit-parser'

const report = EquifaxCreditParser.parse(fffReport);
```

# Data returned

```
export type EquifaxCreditReport = {
  errorString?: string
  errors?: string[]
  header?: {
    customersReferenceNumber: string
    memberNumber: string
    consumerReferralNumber: number
    hitDesignator: number
    hitStatus: 'not_found' | 'found' | 'contact_equifax'
    lastName: string
    firstName: string
    middleName: string
    suffix: string
    sin: string
    dateOfBirth: string
    totalInquiries: number
    warningMessage: string
  }
  bureauScores: {
    productScore: number
    reasonCode1: string
    reasonCode2: string
    reasonCode3: string
    reasonCode4: string
  }[]
  humanReadable: string
  currentEmployment?: {
    occupation: string
    employer: string
  }
  inquiries: {
    date: string
    memberName: string
    telephoneAreaCode: string
    telephoneNumber: string
    telephoneExtension: string
    memberNumber: string
  }[]
  tradeChecks: {
    accountDesignatorCode: 'I' | 'J' | 'U'
    memberName: string
    telephoneAreaCode: string
    telephoneNumber: string
    telephoneExtension: string
    memberNumber: string
    dateReported: string
    dateOpened: string
    highCredit: number
    terms: number
    balance: number
    pastDue: number
    typeCode: 'I' | 'R' | 'O' | 'M'
    rateCode: string
    dayCounter30: number
    dayCounter60: number
    dayCounter90: number
    monthsReviewed: number
    lastActivityDate: string
    accountNumber: string
    previousHighRate1: number
    previousHighDate1: string
    previousHighRate2: number
    previousHighDate2: string
    previousHighRate3: number
    previousHighDate3: string
    narrativeCode1: string
    narrativeCode2: string
  }[]
}
```

## Things that can go wrong

- If there are any `errors` that indicates a request problem, or wrong member code
- If there is no `bureauScore.productScore` it likley means there was something wrong with the data of your request. e.g. wrong address, wrong DOB, wrong name
- If the `headers.hitStatus` property is anything other than `found` it indicates a problem finding credit for the customer
