Documentation ¶
Index ¶
- Constants
- type BaseSegment
- func (r *BaseSegment) AddApplicableSegment(s Segment) error
- func (r *BaseSegment) BlockSize() int
- func (r *BaseSegment) Bytes() []byte
- func (r *BaseSegment) GetSegments(name string) []Segment
- func (r *BaseSegment) Length() int
- func (r *BaseSegment) MarshalJSON() ([]byte, error)
- func (r *BaseSegment) Name() string
- func (r *BaseSegment) Parse(record []byte) (int, error)
- func (r *BaseSegment) String() string
- func (r *BaseSegment) UnmarshalJSON(data []byte) error
- func (r *BaseSegment) Validate() error
- func (r *BaseSegment) ValidateDateBirth() error
- func (r *BaseSegment) ValidateIdentificationNumber() error
- func (r *BaseSegment) ValidateInterestTypeIndicator() error
- func (r *BaseSegment) ValidatePaymentHistoryProfile() error
- func (r *BaseSegment) ValidatePaymentRating() error
- func (r *BaseSegment) ValidatePortfolioType() error
- func (r *BaseSegment) ValidateSocialSecurityNumber() error
- func (r *BaseSegment) ValidateTelephoneNumber() error
- func (r *BaseSegment) ValidateTermsDuration() error
- func (r *BaseSegment) ValidateTermsFrequency() error
- type HeaderRecord
- func (r *HeaderRecord) AddApplicableSegment(s Segment) error
- func (r *HeaderRecord) BlockSize() int
- func (r *HeaderRecord) Bytes() []byte
- func (r *HeaderRecord) GetSegments(string) []Segment
- func (r *HeaderRecord) Length() int
- func (r *HeaderRecord) Name() string
- func (r *HeaderRecord) Parse(record []byte) (int, error)
- func (r *HeaderRecord) String() string
- func (r *HeaderRecord) Validate() error
- type J1Segment
- func (s *J1Segment) Bytes() []byte
- func (s *J1Segment) Length() int
- func (s *J1Segment) Name() string
- func (s *J1Segment) Parse(record []byte) (int, error)
- func (s *J1Segment) String() string
- func (s *J1Segment) Validate() error
- func (r *J1Segment) ValidateDateBirth() error
- func (s *J1Segment) ValidateGenerationCode() error
- func (r *J1Segment) ValidateSocialSecurityNumber() error
- func (s *J1Segment) ValidateTelephoneNumber() error
- type J2Segment
- func (s *J2Segment) Bytes() []byte
- func (s *J2Segment) Length() int
- func (s *J2Segment) Name() string
- func (s *J2Segment) Parse(record []byte) (int, error)
- func (s *J2Segment) String() string
- func (s *J2Segment) Validate() error
- func (s *J2Segment) ValidateAddressIndicator() error
- func (r *J2Segment) ValidateDateBirth() error
- func (s *J2Segment) ValidateGenerationCode() error
- func (s *J2Segment) ValidateResidenceCode() error
- func (r *J2Segment) ValidateSocialSecurityNumber() error
- func (s *J2Segment) ValidateTelephoneNumber() error
- type K1Segment
- type K2Segment
- func (s *K2Segment) Bytes() []byte
- func (s *K2Segment) Length() int
- func (s *K2Segment) Name() string
- func (s *K2Segment) Parse(record []byte) (int, error)
- func (s *K2Segment) String() string
- func (s *K2Segment) Validate() error
- func (s *K2Segment) ValidatePurchasedIndicator() error
- func (s *K2Segment) ValidatePurchasedName() error
- type K3Segment
- func (s *K3Segment) Bytes() []byte
- func (s *K3Segment) Length() int
- func (s *K3Segment) Name() string
- func (s *K3Segment) Parse(record []byte) (int, error)
- func (s *K3Segment) String() string
- func (s *K3Segment) Validate() error
- func (s *K3Segment) ValidateAccountNumber() error
- func (s *K3Segment) ValidateAgencyIdentifier() error
- type K4Segment
- type L1Segment
- func (s *L1Segment) Bytes() []byte
- func (s *L1Segment) Length() int
- func (s *L1Segment) Name() string
- func (s *L1Segment) Parse(record []byte) (int, error)
- func (s *L1Segment) String() string
- func (s *L1Segment) Validate() error
- func (s *L1Segment) ValidateChangeIndicator() error
- func (s *L1Segment) ValidateNewConsumerAccountNumber() error
- func (s *L1Segment) ValidateNewIdentificationNumber() error
- type N1Segment
- type PackedBaseSegment
- func (r *PackedBaseSegment) AddApplicableSegment(s Segment) error
- func (r *PackedBaseSegment) BlockSize() int
- func (r *PackedBaseSegment) Bytes() []byte
- func (r *PackedBaseSegment) GetSegments(name string) []Segment
- func (r *PackedBaseSegment) Length() int
- func (r *PackedBaseSegment) MarshalJSON() ([]byte, error)
- func (r *PackedBaseSegment) Name() string
- func (r *PackedBaseSegment) Parse(record []byte) (int, error)
- func (r *PackedBaseSegment) String() string
- func (r *PackedBaseSegment) UnmarshalJSON(data []byte) error
- func (r *PackedBaseSegment) Validate() error
- func (r *PackedBaseSegment) ValidateDateBirth() error
- func (r *PackedBaseSegment) ValidateIdentificationNumber() error
- func (r *PackedBaseSegment) ValidateInterestTypeIndicator() error
- func (r *PackedBaseSegment) ValidatePaymentHistoryProfile() error
- func (r *PackedBaseSegment) ValidatePaymentRating() error
- func (r *PackedBaseSegment) ValidatePortfolioType() error
- func (r *PackedBaseSegment) ValidateSocialSecurityNumber() error
- func (r *PackedBaseSegment) ValidateTelephoneNumber() error
- func (r *PackedBaseSegment) ValidateTermsDuration() error
- func (r *PackedBaseSegment) ValidateTermsFrequency() error
- type PackedHeaderRecord
- func (r *PackedHeaderRecord) AddApplicableSegment(s Segment) error
- func (r *PackedHeaderRecord) BlockSize() int
- func (r *PackedHeaderRecord) Bytes() []byte
- func (r *PackedHeaderRecord) GetSegments(string) []Segment
- func (r *PackedHeaderRecord) Length() int
- func (r *PackedHeaderRecord) Name() string
- func (r *PackedHeaderRecord) Parse(record []byte) (int, error)
- func (r *PackedHeaderRecord) String() string
- func (r *PackedHeaderRecord) Validate() error
- type PackedTrailerRecord
- func (r *PackedTrailerRecord) AddApplicableSegment(s Segment) error
- func (r *PackedTrailerRecord) BlockSize() int
- func (r *PackedTrailerRecord) Bytes() []byte
- func (r *PackedTrailerRecord) GetSegments(string) []Segment
- func (r *PackedTrailerRecord) Length() int
- func (r *PackedTrailerRecord) Name() string
- func (r *PackedTrailerRecord) Parse(record []byte) (int, error)
- func (r *PackedTrailerRecord) String() string
- func (r *PackedTrailerRecord) Validate() error
- type Record
- type Segment
- type TrailerInformation
- type TrailerRecord
- func (r *TrailerRecord) AddApplicableSegment(s Segment) error
- func (r *TrailerRecord) BlockSize() int
- func (r *TrailerRecord) Bytes() []byte
- func (r *TrailerRecord) GetSegments(string) []Segment
- func (r *TrailerRecord) Length() int
- func (r *TrailerRecord) Name() string
- func (r *TrailerRecord) Parse(record []byte) (int, error)
- func (r *TrailerRecord) String() string
- func (r *TrailerRecord) Validate() error
Constants ¶
const ( // type of portfolio, Line of Credit PortfolioTypeCredit = "C" // type of portfolio, Installment PortfolioTypeInstallment = "I" // type of portfolio, Mortgage PortfolioTypeMortgage = "M" // type of portfolio, Open PortfolioTypeOpen = "O" // type of portfolio, Revolving PortfolioTypeRevolving = "R" // duration of credit extended, Line of Credit TermsDurationCredit = "LOC" // duration of credit extended, Open TermsDurationOpen = "001" // duration of credit extended, Revolving TermsDurationRevolving = "REV" // frequency for payments due, Deferred (Refer to Note) TermsFrequencyDeferred = "D" // frequency for payments due, Single Payment Loan TermsFrequencyPayment = "P" // frequency for payments due, Weekly TermsFrequencyWeekly = "W" // frequency for payments due, Biweekly TermsFrequencyBiweekly = "B" // frequency for payments due, Semimonthly TermsFrequencySemimonthly = "E" // frequency for payments due, Monthly TermsFrequencyMonthly = "M" // frequency for payments due, Bimonthly TermsFrequencyBimonthly = "L" // frequency for payments due, Quarterly TermsFrequencyQuarterly = "Q" // frequency for payments due, Tri-annually TermsFrequencyTriAnnually = "T" // frequency for payments due, Semiannually TermsFrequencySemiannually = "S" // frequency for payments due, Annually TermsFrequencyAnnually = "Y" // code that properly identifies whether the account was current, past due, in collections or charged off // Current account (0–29 days past the due date) PaymentRatingCurrent = "0" // code that properly identifies whether the account was current, past due, in collections or charged off // 30-59 days past the due date PaymentRatingPast30 = "1" // code that properly identifies whether the account was current, past due, in collections or charged off // 60-89 days past the due date PaymentRatingPast60 = "2" // code that properly identifies whether the account was current, past due, in collections or charged off // 90-119 days past the due date PaymentRatingPast90 = "3" // code that properly identifies whether the account was current, past due, in collections or charged off // 120-149 days past the due date PaymentRatingPast120 = "4" // code that properly identifies whether the account was current, past due, in collections or charged off // 150-179 days past the due date PaymentRatingPast150 = "5" // code that properly identifies whether the account was current, past due, in collections or charged off // 180 or more days past the due date PaymentRatingPast180 = "6" // code that properly identifies whether the account was current, past due, in collections or charged off // Collection PaymentRatingCollection = "G" // code that properly identifies whether the account was current, past due, in collections or charged off // Charge-off PaymentRatingChargeOff = "L" // consecutive payment activity, 0 payments past due (current account) PaymentHistoryPast0 = '0' // consecutive payment activity, 30 - 59 days past due date PaymentHistoryPast30 = '1' // consecutive payment activity, 60 - 89 days past due date PaymentHistoryPast60 = '2' // consecutive payment activity, 90 - 119 days past due date PaymentHistoryPast90 = '3' // consecutive payment activity, 120 - 149 days past due date PaymentHistoryPast120 = '4' // consecutive payment activity, 150 - 179 days past due date PaymentHistoryPast150 = '5' // consecutive payment activity, 180 or more days past due date PaymentHistoryPast180 = '6' // consecutive payment activity, No payment history available prior to this time PaymentHistoryNoPayment = 'B' // consecutive payment activity, No payment history available this month. PaymentHistoryNoPaymentMonth = 'D' // consecutive payment activity, Zero balance and current account PaymentHistoryZero = 'E' // consecutive payment activity, Collection PaymentHistoryCollection = 'G' // consecutive payment activity, Foreclosure Completed PaymentHistoryForeclosureCompleted = 'H' // consecutive payment activity, Voluntary Surrender PaymentHistoryVoluntarySurrender = 'J' // consecutive payment activity, Repossession PaymentHistoryRepossession = 'K' // consecutive payment activity, Charge-off PaymentHistoryChargeOff = 'L' // consecutive payment activity, Too new to rate PaymentHistoryTooNew = 'Z' // consecutive payment activity, No payment history available prior to this time (collections and debt payer) PaymentHistoryNoHistory = ' ' // status code that properly identifies the current condition of the account, "DF" AccountStatusDF = "DF" // status code that properly identifies the current condition of the account, "DA" AccountStatusDA = "DA" // status code that properly identifies the current condition of the account, "11" AccountStatus11 = "11" // status code that properly identifies the current condition of the account, "61" AccountStatus61 = "61" // status code that properly identifies the current condition of the account, "62" AccountStatus62 = "62" // status code that properly identifies the current condition of the account, "63" AccountStatus63 = "63" // status code that properly identifies the current condition of the account, "64" AccountStatus64 = "64" // status code that properly identifies the current condition of the account, "71" AccountStatus71 = "71" // status code that properly identifies the current condition of the account, "78" AccountStatus78 = "78" // status code that properly identifies the current condition of the account, "80" AccountStatus80 = "80" // status code that properly identifies the current condition of the account, "82" AccountStatus82 = "82" // status code that properly identifies the current condition of the account, "83" AccountStatus83 = "83" // status code that properly identifies the current condition of the account, "84" AccountStatus84 = "84" // status code that properly identifies the current condition of the account, "93" AccountStatus93 = "93" // status code that properly identifies the current condition of the account, "96" AccountStatus96 = "96" // status code that properly identifies the current condition of the account, "97" AccountStatus97 = "97" // status code that properly identifies the current condition of the account, "05" AccountStatus05 = "05" // status code that properly identifies the current condition of the account, "13" AccountStatus13 = "13" // status code that properly identifies the current condition of the account, "65" AccountStatus65 = "65" // status code that properly identifies the current condition of the account, "88" AccountStatus88 = "88" // status code that properly identifies the current condition of the account, "89" AccountStatus89 = "89" // status code that properly identifies the current condition of the account, "94" AccountStatus94 = "94" // status code that properly identifies the current condition of the account, "95" AccountStatus95 = "95" // designates the interest type, Fixed InterestIndicatorFixed = "F" // designates the interest type, Variable/Adjustable InterestIndicatorVariable = "V" // Consumer Account Number Change ONLY ChangeIndicatorAccountNumber = 1 // Identification Number Change ONLY ChangeIndicatorIdentificationNumber = 2 // Consumer Account Number AND Identification Number Change ChangeIndicatorBothNumber = 3 // Generation Code Junior GenerationCodeJunior = "J" // Generation Code Senior GenerationCodeSenior = "S" // Generation Code 2 GenerationCode2 = "2" // Generation Code 3 GenerationCode3 = "3" // Generation Code 4 GenerationCode4 = "4" // Generation Code 5 GenerationCode5 = "5" // Generation Code 6 GenerationCode6 = "6" // Generation Code 7 GenerationCode7 = "7" // Generation Code 8 GenerationCode8 = "8" // Generation Code 9 GenerationCode9 = "9" // Confirmed/Verified address AddressIndicatorConfirmed = "C" // Known to be address of associated consumer AddressIndicatorKnown = "Y" // Not confirmed address AddressIndicatorNotConfirmed = "N" // Military address AddressIndicatorMilitary = "M" // Secondary address AddressIndicatorSecondary = "S" // Business address — not consumer's residence AddressIndicatorBusiness = "B" // Non-deliverable address/Returned mail AddressIndicatorNonDeliverable = "U" // Data reporter’s default address AddressIndicatorData = "D" // Bill Payer Service — not consumer’s residence AddressIndicatorBill = "P" // Residence Code Owns ResidenceCodeOwns = "O" // Residence Code Rents ResidenceCodeRents = "R" // Creditor Classification CreditorClassificationRetail = 1 // Creditor Classification Medical/Health Care CreditorClassificationMedical = 2 // Creditor Classification Oil Company CreditorClassificationOil = 3 // Creditor Classification Government CreditorClassificationGovernment = 4 // Creditor Classification Personal Services CreditorClassificationPersonal = 5 // Creditor Classification Insurance CreditorClassificationInsurance = 6 // Creditor Classification Educational CreditorClassificationEducational = 7 // Creditor Classification Banking CreditorClassificationBanking = 8 // Creditor Classification Rental/Leasing CreditorClassificationRental = 9 // Creditor Classification Utilities CreditorClassificationUtilities = 10 // Creditor Classification Cable/Cellular CreditorClassificationCable = 11 // Creditor Classification Financial CreditorClassificationFinancial = 12 // Creditor Classification Credit Union CreditorClassificationCredit = 13 // Creditor Classification Automotive CreditorClassificationAutomotive = 14 // Creditor Classification Check Guarantee CreditorClassificationGuarantee = 15 // Purchased From Name PurchasedIndicatorFromName = 1 // Sold To Name PurchasedIndicatorToName = 2 // Remove Previously Reported K2 Segment Information PurchasedIndicatorRemove = 9 // Agency Identifier not applicable AgencyIdentifierNotApplicable = 0 // Agency Identifier Fannie Mae AgencyIdentifierFannieMae = 1 // Agency Identifier Freddie Mac AgencyIdentifierFreddieMac = 2 // Specialized Payment Indicator Balloon Payment SpecializedBalloonPayment = 1 // Specialized Payment Indicator Deferred Payment SpecializedDeferredPayment = 2 // ECOA Code Z ECOACodeZ = "Z" )
const ( // UnpackedSegmentLength indicates length of unpacked segment UnpackedRecordLength = 426 // PackedSegmentLength indicates length of packed segment PackedRecordLength = 366 // HeaderRecordName indicates name of header record HeaderRecordName = "header" // BaseSegmentName indicates name of base segment BaseSegmentName = "base" // TrailerRecordName indicates name of trailer record TrailerRecordName = "trailer" // PackedHeaderRecordName indicates name of packed header record PackedHeaderRecordName = "headerPacked" // PackedBaseSegmentName indicates length of name base record PackedBaseSegmentName = "basePacked" // PackedTrailerRecordName indicates length of name trailer record PackedTrailerRecordName = "trailerPacked" // TrailerIdentifier indicates record identifier of trailer record TrailerIdentifier = "TRAILER" // HeaderIdentifier indicates record identifier of header record HeaderIdentifier = "HEADER" )
const ( // J1SegmentLength indicates length of J1 segment J1SegmentLength = 100 // J2SegmentLength indicates length of J2 segment J2SegmentLength = 200 // K1SegmentLength indicates length of K1 segment K1SegmentLength = 34 // K2SegmentLength indicates length of K2 segment K2SegmentLength = 34 // K3SegmentLength indicates length of K3 segment K3SegmentLength = 40 // K4SegmentLength indicates length of K4 segment K4SegmentLength = 30 // L1SegmentLength indicates length of L1 segment L1SegmentLength = 54 // N1SegmentLength indicates length of N1 segment N1SegmentLength = 146 // J1SegmentLength indicates name of J1 segment J1SegmentName = "j1" // J2SegmentLength indicates name of J2 segment J2SegmentName = "j2" // K1SegmentLength indicates name of K1 segment K1SegmentName = "k1" // K2SegmentLength indicates name of K2 segment K2SegmentName = "k2" // K3SegmentLength indicates name of K3 segment K3SegmentName = "k3" // K4SegmentLength indicates name of K4 segment K4SegmentName = "k4" // L1SegmentLength indicates name of L1 segment L1SegmentName = "l1" // N1SegmentLength indicates name of N1 segment N1SegmentName = "n1" // J1SegmentIdentifier indicates segment identifier of J1 segment J1SegmentIdentifier = "J1" // J2SegmentIdentifier indicates segment identifier of J2 segment J2SegmentIdentifier = "J2" // K1SegmentIdentifier indicates segment identifier of K1 segment K1SegmentIdentifier = "K1" // K2SegmentIdentifier indicates segment identifier of K2 segment K2SegmentIdentifier = "K2" // K3SegmentIdentifier indicates segment identifier of K3 segment K3SegmentIdentifier = "K3" // K4SegmentIdentifier indicates segment identifier of K4 segment K4SegmentIdentifier = "K4" // L1SegmentIdentifier indicates segment identifier of L1 segment L1SegmentIdentifier = "L1" // N1SegmentIdentifier indicates segment identifier of N1 segment N1SegmentIdentifier = "N1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseSegment ¶
type BaseSegment struct { // Contains a value equal to the length of the block of data and must be reported when using the packed format or // when reporting variable length records. This value includes the four bytes reserved for this field. // Report the standard IBM variable record length conventions. // // This field is not required when reporting fixed length, fixed block records. BlockDescriptorWord int `json:"blockDescriptorWord,omitempty"` // Contains a value equal to the length of the physical record. This value includes the four bytes reserved // for this field. // The length of each segment should be included in the RDW. // // For example: // Base Segment = 426 // J2 Segment = 200 // K1 Segment = 34 // RDW = 0660 // // For fixed block, the RDW will remain the same for each record. // For variable block, the RDW will change depending on the size of each record. RecordDescriptorWord int `json:"recordDescriptorWord" validate:"required"` // Report a constant of 1. ProcessingIndicator int `json:"processingIndicator"` // Contains date and time of actual account information update. // Format for packed date is 0MMDDYYYYHHMMSSs — where s is the sign. // Format is MMDDYYYYHHMMSS for character date. TimeStamp utils.Time `json:"timeStamp"` // Used to uniquely identify a data furnisher. // Report your internal code to identify each branch, office, and/or credit central where information is verified. // For accounts reported by servicers, the Identification Number should refer to the current holder of the note. // // This number must be unique, at least 5 digits long, and should not include embedded blanks or special characters. // Entire field should never be zero, blank or 9 filled. // // This field must be consistent on a month-to-month basis to avoid duplication of information. // Notify consumer reporting agencies before adding, deleting, or changing the identifiers in this field. IdentificationNumber string `json:"identificationNumber" validate:"required"` // Report the internal cycle code for this account. // Field is required if reporting by cycles; otherwise blank fill. CycleIdentifier string `json:"cycleIdentifier,omitempty"` // Report the individual's complete and unique account number as extracted from your file. // Do not include embedded blanks or special characters. // // Do not report the Social Security Number, in whole or in part, within the Consumer Account Number. // // Account number scrambling and encryption methods for security purposes are permitted. // Contact the consumer reporting agencies for information regarding the Metro 2® scrambling techniques. ConsumerAccountNumber string `json:"consumerAccountNumber" validate:"required"` // Contains the one-character abbreviation for type of portfolio. Values available: // // C = Line of Credit // I = Installment // M = Mortgage // O = Open // R = Revolving // // Refer to the Glossary of Terms for definitions of each Portfolio Type. PortfolioType string `json:"portfolioType"` // Report the specific code that identifies the account classification. // Exhibit 1 provides a numeric listing of type codes that specify industry usage, and Exhibit 2 provides an alphabetic listing of type codes within their corresponding Portfolio Types. AccountType string `json:"accountType" validate:"required"` // Report the date the account was originally opened. // Retain the original Date Opened regardless of future activity, such as transfer, refinance, lost or stolen card, etc. // // Valid Dates Opened must be reported – field cannot be zero or blank filled, nor contain a date in the future. // // For companies who report returned checks, such as collection agencies, report the date of the check. // // Format for character date is MMDDYYYY. Format for packed date is 0MMDDYYYYs — where s is the sign. // If the day is not available, use 01. DateOpened utils.Time `json:"dateOpened"` // Report the following values in whole dollars only: // // Line of Credit = Assigned credit limit* // Installment = Zero fill // Mortgage = Zero fill // Open = Assigned credit limit*, if applicable; otherwise, zero fill // Revolving = Assigned credit limit* // // * For closed accounts, continue to report the last assigned credit limit. CreditLimit int `json:"creditLimit,omitempty"` // Report the following values in whole dollars only: // // Line of Credit = Highest amount of credit utilized by the consumer // Installment = Original amount of the loan excluding interest payments // Mortgage = Original amount of the loan excluding interest payments // Open = Highest amount of credit utilized by the consumer, if applicable // Revolving = Highest amount of credit utilized by the consumer // // For companies who report returned checks, such as collection agencies, report the original amount of the check, excluding fees and interest. HighestCredit int `json:"highestCredit,omitempty"` // Contains the duration of credit extended. // // Line of Credit = Constant of LOC // Installment = Number of months // Mortgage = Number of years // Open = Constant of 001, One payment as scheduled // Revolving = Constant of REV // // Exhibit 3 provides the calculations necessary to convert Terms Duration to monthly. TermsDuration string `json:"termsDuration" validate:"required"` // Report the frequency for payments due. Values available: // // D = Deferred (Refer to Note) // P = Single Payment Loan // W = Weekly // B = Biweekly // E = Semimonthly // M = Monthly // L = Bimonthly // Q = Quarterly // T = Tri-annually // S = Semiannually // Y = Annually // // Exhibit 3 provides definitions of the Terms Frequency Codes. // Note: When reporting Deferred loans, report the Deferred Payment Start Date in the K4 Segment. TermsFrequency string `json:"termsFrequency,omitempty"` // Report the dollar amount of the scheduled monthly payment due for this reporting period, whether principal, interest only or a combination of the two. // When a balloon payment is also due during the reporting period, the balloon payment amount should be included to represent the entire monthly payment amount due. // // Report in whole dollars only. // When the account is paid in full, the Scheduled Monthly Payment Amount should be zero filled. // // Line of Credit = Minimum amount due based on balance, not including any amounts past due // Installment = Regular monthly payment // Mortgage = Regular monthly payment, including the principal, interest, and escrow due this month // Open = Zero fill // Revolving = Minimum amount due based on balance, not including any amounts past due // // Exhibit 3 provides the calculations necessary to convert payment amounts to monthly. ScheduledMonthlyPaymentAmount int `json:"scheduledMonthlyPaymentAmount,omitempty"` // Report the dollar amount of the monthly payment actually received for this reporting period in whole dollars only. // If multiple payments are made during the reporting period, the total amount should be reported. ActualPaymentAmount int `json:"actualPaymentAmount,omitempty"` // Contains the status code that properly identifies the current condition of the account as of the Date of Account Information // Exhibit 4 provides a description of these codes. // The Payment Rating (Field 17B) must also be reported when the Account Status Code is 05, 13, 65, 88, 89, 94, or 95. // Special Comments (Field 19) may be used in conjunction with the Account Status to further define the account. // For examples of how Account Statuses, Payment Ratings and Special Comments interact. AccountStatus string `json:"accountStatus" validate:"required"` // When the Account Status (Field 17A) contains 05, 13, 65, 88, 89, 94 or 95, this field must also be reported. The Payment Rating must be blank filled for all other Account Status Codes. // The Payment Rating contains a code that properly identifies whether the account was current, past due, in collections or charged off prior to the status and within the current month’s reporting period. // // Values available: // 0 = Current account (0–29 days past the due date) // 1 = 30-59 days past the due date // 2 = 60-89 days past the due date // 3 = 90-119 days past the due date // 4 = 120-149 days past the due date // 5 = 150-179 days past the due date // 6 = 180 or more days past the due date // G = Collection // L = Charge-off // // For example, if the account was paid on March 22, 2019, but the consumer was 30 days past the due date on March 10, 2019 prior to paying the account, report Account Status Code = 13 and Payment Rating = 1. PaymentRating string `json:"paymentRating,omitempty"` // Contains up to 24 months of consecutive payment activity for the previous 24 reporting periods prior to the Date of Account Information (Field 24) being reported. // Report one month’s payment history in each byte from the left to right in most recent to least recent order. // The first byte should represent the Account Status Code reported in the previous reporting period. Refer to Exhibit 5 for examples of reporting payment history, which includes examples for month-end reporters, as well as examples for reporters who submit data on other days of the month (e.g., 1st, 15th, etc.). Values available: // // 0 = 0 payments past due (current account) // 1 = 30 - 59 days past due date // 2 = 60 - 89 days past due date // 3 = 90 - 119 days past due date // 4 = 120 - 149 days past due date // 5 = 150 - 179 days past due date // 6 = 180 or more days past due date // B = No payment history available prior to this time – either because the account was not open or because the payment history cannot be furnished. A “B” may not be embedded within other values. // D = No payment history available this month. “D” may be embedded in the payment pattern. // E = Zero balance and current account (Applies to Credit Cards and Lines of Credit) // G = Collection // H = Foreclosure Completed // J = Voluntary Surrender // K = Repossession // L = Charge-off // // No other values are acceptable in this field. // If a full 24 months of history are not available for reporting, the ending positions of this field should be B-filled. // The Payment History Profile is intended to be used to report monthly history, regardless of the Terms Frequency. // Reporting of the Payment History Profile provides a method for automated correction of erroneously reported history. // // For important information: // • Paid accounts // • First-time reporters PaymentHistoryProfile string `json:"paymentHistoryProfile" validate:"required"` // Used in conjunction with Account Status and Payment Rating (to further define the account (e.g., closed accounts or adjustments pending). // The Special Comment Code must be reported each month as long as the condition applies. // If more than one Special Comment applies to an account, it is the data furnisher’s decision to report the comment that is deemed most important from a business perspective for the current reporting period. // // If no Special Comment is applicable, blank fill. // // Exhibit 6 provides a list of available comments by category within Portfolio Type and Exhibit 7 provides a list of codes in alphabetical sequence. // Both exhibits include definitions and usage guidelines. // // For examples of how Account Statuses, Payment Ratings and Special Comments interact. SpecialComment string `json:"specialComment,omitempty"` // Allows the reporting of a condition that is required for legal compliance. // This condition may refer to accounts closed at consumer’s request, accounts in dispute under the Fair Credit Reporting Act (FCRA), the Fair Debt Collection Practices Act (FDCPA) or the Fair Credit Billing Act (FCBA). // // The code should be reported one time and will remain on file until another Compliance Condition Code or the XR (Removal code) is reported. As an option, the code may be reported each month as long as the condition applies. // Regardless of the method of reporting, the code will be deleted only when another Compliance Condition Code or the XR (Removal code) is reported. // // Exhibit 8 provides a list of Compliance Condition Codes and examples that demonstrate how to report these codes. // For questions about the use of Compliance Condition Codes or how long to report them, data furnishers should refer to their internal policies and procedures. ComplianceConditionCode string `json:"complianceConditionCode,omitempty"` // Report the outstanding current balance on the account as of the Date of Account Information. // // The Current Balance should contain the principal balance including Balloon Payment Amounts (when applicable), as well as applicable interest, late charges, fees, insurance payments and escrow that are due during the current reporting period. // The Current Balance may exceed the Highest Credit, Original Loan Amount or Credit Limit. // // The Current Balance should not include future interest, escrow, fees or insurance payments. // // This amount, which should be reported in whole dollars only, may increase or decline from month to month. // Credit balances (negative balances) should be reported as zero. CurrentBalance int `json:"currentBalance" validate:"omitempty"` // Report the total amount of payments that are 30 days or more past due in whole dollars only. // This field should include late charges and fees, if applicable. // Do not include current amount due in this field. // // Note: If the Account Status is current (Status Code 11), this field should be zero. AmountPastDue int `json:"amountPastDue,omitempty"` // For Status Codes 64 and 97 (all portfolio types), report the original amount charged to loss, regardless of the declining balance. // Report whole dollars only. // // If payments are received from the consumer, report the outstanding balance in the Current Balance and Amount Past Due fields. OriginalChargeOffAmount int `json:"originalChargeOffAmount,omitempty"` // All account information in the Base Segment, such as Account Status and Current Balance, must be reported as of the date in this field. // // For Account Status Codes 11, 71, 78, 80, 82-84, 88, 89, 93-97, DA and DF, report a date within the current month’s reporting period, as noted below: // // • Cycle Reporters – Report the date of the current month’s billing cycle. This method is preferred to facilitate accurate and timely reporting of account information. // • Monthly Reporters – Report the date within the current month’s reporting period that represents the most recent update to the account, such as mid-month (03/15/2019) or end of month (03/31/2019). The Date of Account Information may represent the consumer’s billing date as long as the date is within the current month’s reporting period. // A historic or future date should not be reported. // // For Account Status Codes 13 and 61–65, report the date paid, unless the account was closed due to inactivity; then report the date within the current reporting period when the account was closed to further charges. // For accounts reported with bankruptcy Consumer Information Indicators, refer to Frequently Asked Questions 27 and 28 for guidelines on reporting the Date of Account Information. // // Format for character date is MMDDYYYY. Format for packed date is 0MMDDYYYYs – where s is the sign. // Notes: This date must not reflect a future date. // For guidelines on reporting paid, closed or inactive accounts, refer to FAQs 39, 40 and 41. DateAccountInformation utils.Time `json:"dateAccountInformation" validate:"required"` // This date is used to ensure compliance with the Fair Credit Reporting Act. // The date in the Date of First Delinquency field must be determined each reporting period based on the following hierarchy: // // 1. For Account Status Codes 61-65, 71, 78, 80, 82-84, 88-89 and 93-97, report the date of the first 30-day delinquency that led to the status being reported. This date should be 30 days after the Due Date. If a delinquent account becomes current, the Date of First Delinquency should be zero filled. Then if the account goes delinquent again, the Date of First Delinquency starts over with the new first delinquency date. // 2. For Account Status Codes 05 and 13, if the Payment Rating is 1, 2, 3, 4, 5, 6, G or L, report the date of the first 30-day delinquency that led to the Payment Rating being reported. This date should be 30 days after the Due Date. // 3. For Consumer Information Indicators A-H and Z (Bankruptcies), 1A (Personal Receivership) and V-Y (Reaffirmation of Debt Rescinded with Bankruptcy Chapters), if the account is current (Account Status Code 11 or Account Status Code 05 or 13 with Payment Rating 0), report the date of the bankruptcy/personal receivership petition or notification. Even though the account is not delinquent, this date is required for purging purposes. // Notes: In hierarchy rule #3, Account Status 13 is included for scenarios when merchandise is redeemed. Refer to FAQ 31 for further guidance. // Consumer Information Indicators W, X & Y are obsolete as of September 2010 and may no longer be reported. // // If none of the conditions listed in the above hierarchy apply, the Date of First Delinquency should be zero filled. // The Date of First Delinquency is used by the consumer reporting agencies for purging purposes. Format for character date is MMDDYYYY. Format for packed date is 0MMDDYYYYs — where s is the sign. // Notes: // • Refer to Exhibit 9 for detailed reporting instructions, examples and excerpts from the Fair Credit Reporting Act. // • First-time reporters should refer to Frequently Asked Question 22 for important information. DateFirstDelinquency utils.Time `json:"dateFirstDelinquency,omitempty"` // For all portfolio types, contains the date the account was closed to further purchases, paid in full, transferred or sold. For Line of Credit, Open or Revolving accounts, there may be a balance due. // // Format for character date is MMDDYYYY. // Format for packed date is 0MMDDYYYYs — where s is the sign. // If not applicable, zero fill. DateClosed utils.Time `json:"dateClosed,omitempty"` // Report the date the most recent payment was received, whether full or partial payment is made. // // Format for character date is MMDDYYYY. // Format for packed date is 0MMDDYYYYs — where s is the sign. // If the day is not available, use 01. DateLastPayment utils.Time `json:"dateLastPayment,omitempty"` // Contains one of the following values that designates the interest type: // // F = Fixed // V = Variable/Adjustable // // If indicator not available or unknown, blank fill. // Note: Report indicator ‘V’ for loans where the interest rate will be variable at some point, even if the interest rate starts as fixed. InterestTypeIndicator string `json:"interestTypeIndicator"` // Report the last name of the primary consumer. // Titles and prefixes should not be reported. // // If the surname contains multiple names, such as Paternal Name-Maternal Name, hyphenate the surnames. // For example, “SMITH-JONES” or “MARTINEZ-REYES” requires the hyphen. // // If the surname contains separate words, the hyphen is not required. // For example, report “VAN DYKE” or “DE LA CRUZ” with a space between each word. // // Other than the hyphen, do not report special characters in any of the Consumer Name fields. // // The Generation Code should be reported in Generation Code. // // Notes: Do not report minors. // The name fields should not contain messages, such as “Parent of”, “Baby”, “Daughter”, “Child”, etc. // Do not report trustee or estate accounts. // In cases where the debt is included in a revocable trust and the consumer retains contractual responsibility, report the consumer’s Full Name, Address, Social Security Number, and Date of Birth within the Base Segment fields. // Do not report the name of the trust. Surname string `json:"surname" validate:"required"` // Report the full first name of the primary consumer. // Names should not be abbreviated. // Examples: Report first name “JUNIOR” (not “JR”); report “ROBERT” (not “ROBT”). // // If reporting multiple first names, hyphenate the first names. // // Note: If a consumer uses only initials for first and middle names (e.g., A.J.), the first name initial should be reported in the First Name field (e.g., A) and the middle initial should be reported in the Middle Name field (e.g., J). FirstName string `json:"firstName" validate:"required"` // Report the middle name or middle initial of the primary consumer, if available. // // If reporting multiple middle names, hyphenate the middle names. MiddleName string `json:"middleName,omitempty"` // Used to distinguish Jr., Sr., II, III, etc. If not applicable, blank fill. // Values available: // J = Junior // 3 = III // 6 = VI // 9 = IX // S = Senior // 4 = IV // 7 = VII // 2 = II // 5 = V // 8 = VIII GenerationCode string `json:"generationCode,omitempty"` // Report the Social Security Number (SSN) of the primary consumer. // Report only valid U.S.-issued SSNs. // // Reporting of this information is required as the Social Security Number greatly enhances accuracy in matching to the correct consumer. // If the consumer does not have a SSN or one is not available for reporting, zero- or 9-fill all positions. // // Notes: // If the Social Security Number is not reported, the Date of Birth is required to be reported. // Do not report Individual Tax Identification Numbers (ITINs) in this field. ITINs do not prove identity outside the tax system and should not be offered or accepted as identification for non-tax purposes, per the Social Security Administration. // Do not report Credit Profile Numbers (CPNs) in this field. The CPN should not be used for credit reporting purposes and does not replace the Social Security Number. SocialSecurityNumber int `json:"socialSecurityNumber,omitempty"` // Report the full Date of Birth of the primary consumer, including the month, day and year. // Reporting of this information is required as the Date of Birth greatly enhances accuracy in matching to the correct consumer. // Format for character date is MMDDYYYY. Format for packed date is 0MMDDYYYYs — where s is the sign. // // Notes: If the Date of Birth is not reported, the Social Security Number is required to be reported. // When reporting Authorized Users (ECOA Code 3), the full Date of Birth (MMDDYYYY) must be reported for all newly-added Authorized Users on all pre-existing and newly-opened accounts, even if the Social Security Number is reported. // Do not report accounts of consumers who are too young to enter into a binding contract. DateBirth utils.Time `json:"dateBirth,omitempty"` // Contains the telephone number of the primary consumer (Area Code + 7 digits). TelephoneNumber int64 `json:"telephoneNumber"` // Defines the relationship of the primary consumer to the account and designates the account as joint, individual, etc., in compliance with the Equal Credit Opportunity Act. // // Exhibit 10 provides a list of ECOA Codes, their definitions and usage. // // For important information: // • Guidelines on reporting consumers who are personally liable for business accounts. // • Usage guidelines on ECOA Codes T (Terminated) and Z (Delete Consumer). // // Note: Codes 0 (Undesignated), 4 (Joint) and 6 (On-Behalf-Of) are obsolete as of September 2003 and may no longer be reported. ECOACode string `json:"ecoaCode" validate:"required"` // Contains a value that indicates a special condition of the account that applies to the primary consumer. // // This special condition may be that a bankruptcy was filed, discharged, dismissed or withdrawn; a debt was reaffirmed; or the consumer cannot be located or is now located. // // The indicator should be reported one time and will remain on file until another Consumer Information Indicator or a Removal value is reported. // As an option, the indicator may be reported each month as long as the condition applies. // // Regardless of the method of reporting, the indicator will be deleted only when another Consumer Information Indicator or a Removal value (Q, S, U) is reported. // // Exhibit 11 provides a list of Consumer Information Indicators and examples that demonstrate how to report these codes. // // For reporting guidelines, refer to Frequently Asked Questions 23 through 32 (bankruptcy) and 61 (personal receivership). ConsumerInformationIndicator string `json:"consumerInformationIndicator,omitempty"` // Contains the standard two-character country abbreviation. // // Exhibit 12 provides a list of the Country Codes. CountryCode string `json:"countryCode"` // Contains billing/mailing address for the primary consumer. // If the consumer has a U.S. address and a foreign address, report the U.S. address. // If the consumer has never used the U.S. address as a billing/mailing address (e.g., a property address), report the foreign address. // // If the billing/mailing address does not belong specifically to the consumer, such as a financial counseling site or bill paying service, report the consumer’s home address. // // The First Line of Address usually includes street number, direction, street name, and type of thoroughfare. // // If the billing/mailing address is a PO Box or Rural Route, include Box or Route followed by the number (e.g., PO Box 100). // Do not report both a street address and a PO Box. // // If the billing/mailing address is a private mailbox (PMB), the street address should be reported in the First Line of Address (e.g., 5678 Main Street). // The PMB number should be reported in the Second Line of Address (e.g., PMB 1234). // As an alternative, the entire address can be reported in the First Line of Address; for example, 5678 Main Street PMB 1234. // // Eliminate internal messages such as: “Do not mail”, “Attorney”, “Charge-off”, “Chapter 13”, “Fraud”, “Trustee”, “Estate of”, “Care of”, “M/R” (Mail Returned), etc. // // Exhibit 13 provides general rules for address reporting. // Do not enter data furnisher's address in this field. FirstLineAddress string `json:"firstLineAddress" validate:"required"` // Contains second line of address, if needed, such as apartment or unit number, or private mailbox number (PMB). // // Eliminate internal messages such as: “Do not mail”, “Attorney”, “Charge-off”, “Chapter 13”, “Fraud”, “Trustee”, or “Estate of”, “Care of”, “M/R” (Mail Returned), etc. SecondLineAddress string `json:"secondLineAddress,omitempty"` // Contains city name for address of primary consumer. // Truncate rightmost positions if city name is greater than 20 characters or use standard 13-character U.S. Postal Service city abbreviations. City string `json:"city" validate:"required"` // Contains the standard U.S. Postal Service state abbreviation for the address of the primary consumer. // // Exhibit 14 provides a list of State Codes. State string `json:"state" validate:"required"` // Report the Zip Code of the primary consumer’s address. // Use entire field if reporting 9-digit zip codes. // Otherwise, leftjustify and blank fill. ZipCode string `json:"zipCode" validate:"required"` // Contains one of the following values for the address reported in fields 40-44: // // C = Confirmed/Verified address Note: Value ‘C’ enables reporting a confirmed or verified address after receiving an address discrepancy notification from a consumer reporting agency. Report ‘C’ one time after the address is confirmed. // Y = Known to be address of primary consumer // N = Not confirmed address // M = Military address // S = Secondary Address // B = Business address — not consumer's residence // U = Non-deliverable address/Returned mail // D = Data reporter’s default address // P = Bill Payer Service — not consumer’s residence // // If indicator not available or unknown, blank fill. AddressIndicator string `json:"addressIndicator"` // Contains the one-character residence code of the address reported in fields 40-44. // // Values available: // O = Owns // R = Rents // // If not available or unknown, blank fill. ResidenceCode string `json:"residenceCode"` // contains filtered or unexported fields }
BaseSegment holds the base segment
func (*BaseSegment) AddApplicableSegment ¶
func (r *BaseSegment) AddApplicableSegment(s Segment) error
AddApplicableSegment will add new applicable segment into record
func (*BaseSegment) BlockSize ¶
func (r *BaseSegment) BlockSize() int
BlockSize returns size of block
func (*BaseSegment) Bytes ¶ added in v0.5.0
func (r *BaseSegment) Bytes() []byte
Bytes return raw byte array
func (*BaseSegment) GetSegments ¶
func (r *BaseSegment) GetSegments(name string) []Segment
GetSegments returns list of applicable segments by segment name
func (*BaseSegment) MarshalJSON ¶
func (r *BaseSegment) MarshalJSON() ([]byte, error)
MarshalJSON returns JSON blob
func (*BaseSegment) Parse ¶
func (r *BaseSegment) Parse(record []byte) (int, error)
Parse takes the input record string and parses the base segment values
func (*BaseSegment) String ¶
func (r *BaseSegment) String() string
String writes the base segment struct to a 426 character string.
func (*BaseSegment) UnmarshalJSON ¶
func (r *BaseSegment) UnmarshalJSON(data []byte) error
UnmarshalJSON parses a JSON blob
func (*BaseSegment) Validate ¶
func (r *BaseSegment) Validate() error
Validate performs some checks on the record and returns an error if not Validated
func (*BaseSegment) ValidateDateBirth ¶ added in v0.7.0
func (r *BaseSegment) ValidateDateBirth() error
validation of date of birth
func (*BaseSegment) ValidateIdentificationNumber ¶
func (r *BaseSegment) ValidateIdentificationNumber() error
validation of identification number
func (*BaseSegment) ValidateInterestTypeIndicator ¶
func (r *BaseSegment) ValidateInterestTypeIndicator() error
validation of interest type indicator
func (*BaseSegment) ValidatePaymentHistoryProfile ¶
func (r *BaseSegment) ValidatePaymentHistoryProfile() error
validation of payment history profile
func (*BaseSegment) ValidatePaymentRating ¶
func (r *BaseSegment) ValidatePaymentRating() error
validation of payment rating
func (*BaseSegment) ValidatePortfolioType ¶
func (r *BaseSegment) ValidatePortfolioType() error
validation of portfolio type
func (*BaseSegment) ValidateSocialSecurityNumber ¶ added in v0.7.0
func (r *BaseSegment) ValidateSocialSecurityNumber() error
validation of social security number
func (*BaseSegment) ValidateTelephoneNumber ¶
func (r *BaseSegment) ValidateTelephoneNumber() error
validation of telephone number
func (*BaseSegment) ValidateTermsDuration ¶
func (r *BaseSegment) ValidateTermsDuration() error
validation of terms duration
func (*BaseSegment) ValidateTermsFrequency ¶
func (r *BaseSegment) ValidateTermsFrequency() error
validation of terms frequency
type HeaderRecord ¶
type HeaderRecord struct { // Contains a value equal to the length of the block of data and must be reported when using the packed format or // when reporting variable length records. This value includes the four bytes reserved for this field. // Report the standard IBM variable record length conventions. // // This field is not required when reporting fixed length, fixed block records. BlockDescriptorWord int `json:"blockDescriptorWord,omitempty"` // Contains a value equal to the length of the physical record. // This value includes the four bytes reserved for this field. // The recording technique is Numeric for the 426 format and Binary for the 366 format. // // • Numeric: The entire four bytes are used. Example: F0F4F2F6. // • Binary: The hexadecimal value should be in the first two bytes of the field and the last two bytes should contain binary zeros. Example: 016E0000. // // If fixed-length records are being reported, the Header Record should be the same length as all the data records. // The Header Record should be padded with blanks to fill the needed number of positions. RecordDescriptorWord int `json:"recordDescriptorWord" validate:"required"` // Contains a constant of HEADER, which is used to identify this record. RecordIdentifier string `json:"recordIdentifier" validate:"required"` // Contains the cycle identifier for the information being reported, if reporting by cycles. // If data contains more than one cycle, report the first cycle identifier found on the data. CycleIdentifier string `json:"cycleIdentifier,omitempty"` // Contains a unique identification number assigned by this consumer reporting agency. InnovisProgramIdentifier string `json:"innovisProgramIdentifier,omitempty"` // Contains a unique identification number assigned by this consumer reporting agency. EquifaxProgramIdentifier string `json:"equifaxProgramIdentifier,omitempty"` // Contains a unique identification number assigned by this consumer reporting agency. ExperianProgramIdentifier string `json:"experianProgramIdentifier,omitempty"` // Contains a unique identification number assigned by this consumer reporting agency. TransUnionProgramIdentifier string `json:"transUnionProgramIdentifier,omitempty"` // Signifies date of most recent update to accounts. // If accounts are updated on different dates, use most recent. // A future date should not be reported. // Format is MMDDYYYY. ActivityDate utils.Time `json:"activityDate" validate:"required"` // Contains the date the media was generated. // A future date should not be reported. // Format is MMDDYYYY. DateCreated utils.Time `json:"dateCreated" validate:"required"` // Contains the date your reporting format was developed. // Format is MMDDYYYY. // If the day is not available, use 01. ProgramDate utils.Time `json:"programDate"` // Contains the last date your reporting format was revised. // Format is MMDDYYYY. // If the day is not available, use 01. ProgramRevisionDate utils.Time `json:"programRevisionDate"` // Contains the name of the processing company sending the data; i.e., data furnisher or processor. // If multiple Header Records are provided, the Reporter Name on the second and subsequent Headers may be repeated or blank filled. ReporterName string `json:"reporterName" validate:"required"` // Contains the complete mailing address of the processing company; i.e., street address, city, state and zip code. ReporterAddress string `json:"reporterAddress" validate:"required"` // Contains the telephone number (Area Code + number) of the company sending the data; i.e., data furnisher or processor. ReporterTelephoneNumber int64 `json:"reporterTelephoneNumber"` // Contains the name of the software vendor that provided the Metro 2® Format software. SoftwareVendorName string `json:"softwareVendorName,omitempty"` // Contains the version number of the Metro 2® Format software. SoftwareVersionNumber string `json:"softwareVersionNumber,omitempty"` // Contains a unique identification number assigned by this consumer reporting agency. PRBCProgramIdentifier string `json:"prbcProgramIdentifier,omitempty"` // contains filtered or unexported fields }
HeaderRecord holds the header record
func (*HeaderRecord) AddApplicableSegment ¶
func (r *HeaderRecord) AddApplicableSegment(s Segment) error
AddApplicableSegment will add new applicable segment into record
func (*HeaderRecord) BlockSize ¶
func (r *HeaderRecord) BlockSize() int
BlockSize returns size of block
func (*HeaderRecord) Bytes ¶ added in v0.5.0
func (r *HeaderRecord) Bytes() []byte
Bytes return raw byte array
func (*HeaderRecord) GetSegments ¶
func (r *HeaderRecord) GetSegments(string) []Segment
GetSegments returns list of applicable segments by segment name
func (*HeaderRecord) Parse ¶
func (r *HeaderRecord) Parse(record []byte) (int, error)
Parse takes the input record string and parses the header record values
func (*HeaderRecord) String ¶
func (r *HeaderRecord) String() string
String writes the header record struct to a 426 character string.
func (*HeaderRecord) Validate ¶
func (r *HeaderRecord) Validate() error
Validate performs some checks on the record and returns an error if not Validated
type J1Segment ¶
type J1Segment struct { // Contains a constant of J1. SegmentIdentifier string `json:"segmentIdentifier" validate:"required"` // Report the last name of the associated consumer. Titles and prefixes should not be reported. // If the surname contains multiple names, such as Paternal Name-Maternal Name, hyphenate the surnames. // For example, “SMITH-JONES” or “MARTINEZ-REYES” requires the hyphen. // If the surname contains separate words, the hyphen is not required. // For example, report “VAN DYKE” or “DE LA CRUZ” with a space between each word. // Other than the hyphen, do not report special characters in any of the Consumer Name fields. // The Generation Code should be reported in Field 6. // Notes: Do not report minors. The name fields should not // contain messages, such as “Parent of”, “Baby”, // “Daughter”, “Child”, etc. // Do not report trustee or estate accounts. In cases // where the debt is included in a revocable trust and // the consumer retains contractual responsibility, // report the consumer’s Full Name, Address, Social // Security Number, and Date of Birth within the J1 // Segment fields. Do not report the name of the // trust. Surname string `json:"surname" validate:"required"` // Report the full first name of the associated consumer. Names should not be abbreviated. // Examples: Report first name “JUNIOR” (not “JR”); report “ROBERT” (not “ROBT”). // If reporting multiple first names, hyphenate the first names. // Note: If a consumer uses only initials for first and // middle names (e.g., A.J.), the first name initial // should be reported in the First Name field // (e.g., A) and the middle initial should be reported // in the Middle Name field (e.g., J). FirstName string `json:"firstName" validate:"required"` // Report the middle name or middle initial of the associated consumer, if available. // If reporting multiple middle names, hyphenate the middle names. MiddleName string `json:"middleName,omitempty"` // Used to distinguish Junior, Senior, II, III, IV, etc. // If not applicable, blank fill. // Values available: // J = Junior 3 = III 6 = VI 9 = IX // S = Senior 4 = IV 7 = VII // 2 = II 5 = V 8 = VIII GenerationCode string `json:"generationCode,omitempty"` // Report the Social Security Number (SSN) of the associated consumer. Report only valid U.S.-issued SSNs. // Reporting of this information is required as the Social Security Number greatly enhances accuracy in matching to the correct consumer. // If the consumer does not have a SSN or one is not available for reporting, zero- or 9-fill all positions. // Notes: // If the Social Security Number is not reported, the Date of Birth is required to be reported. // Do not report Individual Tax Identification Numbers (ITINs) in this field. // ITINs do not prove identity outside the tax system and should not be offered or accepted as identification for non-tax purposes, // per the Social Security Administration. // Do not report Credit Profile Numbers (CPNs) in this field. // The CPN should not be used for credit reporting purposes and does not replace the Social Security Number. SocialSecurityNumber int `json:"socialSecurityNumber,omitempty"` // Report the full Date of Birth of the associated consumer, including the month, day and year. // Reporting of this information is required as the Date of Birth greatly enhances accuracy in matching to the correct consumer. // Format is MMDDYYYY. // Notes: // If the Date of Birth is not reported, the Social Security Number is required to be reported. // When reporting Authorized Users (ECOA Code 3), the full Date of Birth (MMDDYYYY) must be reported for all newly-added // Authorized Users on all pre-existing and newly-opened accounts, even if the Social Security Number is reported. // Do not report accounts of consumers who are too young to enter into a binding contract. DateBirth utils.Time `json:"dateBirth,omitempty"` // Contains the telephone number of the associated consumer (Area Code + 7 digits). TelephoneNumber int64 `json:"telephoneNumber"` // Defines the relationship of the associated consumer to the account and designates the account as joint, individual, etc., // in compliance with the Equal Credit Opportunity Act. // Exhibit 10 provides a list of ECOA Codes, their definitions and usage. // For important information: // • Guidelines on reporting consumers who are personally liable for business accounts // • Usage guidelines on ECOA Codes T (Terminated) and Z (Delete Consumer) // Note: // Codes 0 (Undesignated), 4 (Joint) and 6 (On-Behalf-Of) are obsolete as of September 2003 and may no longer be reported. ECOACode string `json:"ecoaCode" validate:"required"` // Contains a value that indicates a special condition of the account that applies to the associated consumer. // This special condition may be that a bankruptcy was filed, discharged, dismissed or withdrawn; a debt was reaffirmed; or the consumer cannot be located or is now located. // The indicator should be reported one time and will remain on file until another Consumer Information Indicator or a Removal value is reported. // As an option, the indicator may be reported each month as long as the condition applies. // Regardless of the method of reporting, the indicator will be deleted only when another Consumer Information Indicator or a Removal value (Q, S, U) is reported. // Exhibit 11 provides a list of Consumer Information Indicators and examples that demonstrate how to report these codes. ConsumerInformationIndicator string `json:"consumerInformationIndicator,omitempty"` // contains filtered or unexported fields }
J1Segment holds the j1 segment
func (*J1Segment) Validate ¶
Validate performs some checks on the record and returns an error if not Validated
func (*J1Segment) ValidateDateBirth ¶ added in v0.7.0
validation of date of birth
func (*J1Segment) ValidateGenerationCode ¶
validation of generation code
func (*J1Segment) ValidateSocialSecurityNumber ¶ added in v0.7.0
validation of social security number
func (*J1Segment) ValidateTelephoneNumber ¶
validation of telephone number
type J2Segment ¶
type J2Segment struct { // Contains a constant of J2. SegmentIdentifier string `json:"segmentIdentifier" validate:"required"` // Report the last name of the associated consumer. Titles and prefixes should not be reported. // If the surname contains multiple names, such as Paternal Name-Maternal Name, hyphenate the surnames. // For example, “SMITH-JONES” or “MARTINEZ-REYES” requires the hyphen. // If the surname contains separate words, the hyphen is not required. // For example, report “VAN DYKE” or “DE LA CRUZ” with a space between each word. // Other than the hyphen, do not report special characters in any of the Consumer Name fields. // The Generation Code should be reported in Field 6. // Notes: Do not report minors. The name fields should not // contain messages, such as “Parent of”, “Baby”, // “Daughter”, “Child”, etc. // Do not report trustee or estate accounts. In cases // where the debt is included in a revocable trust and // the consumer retains contractual responsibility, // report the consumer’s Full Name, Address, Social // Security Number, and Date of Birth within the J2 // Segment fields. Do not report the name of the // trust. Surname string `json:"surname" validate:"required"` // Report the full first name of the associated consumer. Names should not be abbreviated. // Examples: Report first name “JUNIOR” (not “JR”); report “ROBERT” (not “ROBT”). // If reporting multiple first names, hyphenate the first names. // Note: If a consumer uses only initials for first and // middle names (e.g., A.J.), the first name initial // should be reported in the First Name field // (e.g., A) and the middle initial should be reported // in the Middle Name field (e.g., J). FirstName string `json:"firstName" validate:"required"` // Report the middle name or middle initial of the associated consumer, if available. // If reporting multiple middle names, hyphenate the middle names. MiddleName string `json:"middleName,omitempty"` // Used to distinguish Junior, Senior, II, III, IV, etc. // If not applicable, blank fill. // Values available: // J = Junior 3 = III 6 = VI 9 = IX // S = Senior 4 = IV 7 = VII // 2 = II 5 = V 8 = VIII GenerationCode string `json:"generationCode,omitempty"` // Report the Social Security Number (SSN) of the associated consumer. Report only valid U.S.-issued SSNs. // Reporting of this information is required as the Social Security Number greatly enhances accuracy in matching to the correct consumer. // If the consumer does not have a SSN or one is not available for reporting, zero- or 9-fill all positions. // Notes: // If the Social Security Number is not reported, the Date of Birth is required to be reported. // Do not report Individual Tax Identification Numbers (ITINs) in this field. // ITINs do not prove identity outside the tax system and should not be offered or accepted as identification for non-tax purposes, // per the Social Security Administration. // Do not report Credit Profile Numbers (CPNs) in this field. // The CPN should not be used for credit reporting purposes and does not replace the Social Security Number. SocialSecurityNumber int `json:"socialSecurityNumber,omitempty"` // Report the full Date of Birth of the associated consumer, including the month, day and year. // Reporting of this information is required as the Date of Birth greatly enhances accuracy in matching to the correct consumer. // Format is MMDDYYYY. // Notes: // If the Date of Birth is not reported, the Social Security Number is required to be reported. // When reporting Authorized Users (ECOA Code 3), the full Date of Birth (MMDDYYYY) must be reported for all newly-added // Authorized Users on all pre-existing and newly-opened accounts, even if the Social Security Number is reported. // Do not report accounts of consumers who are too young to enter into a binding contract. DateBirth utils.Time `json:"dateBirth,omitempty"` // Contains the telephone number of the associated consumer (Area Code + 7 digits). TelephoneNumber int64 `json:"telephoneNumber"` // Defines the relationship of the associated consumer to the account and designates the account as joint, individual, etc., // in compliance with the Equal Credit Opportunity Act. // Exhibit 10 provides a list of ECOA Codes, their definitions and usage. // For important information: // • Guidelines on reporting consumers who are personally liable for business accounts // • Usage guidelines on ECOA Codes T (Terminated) and Z (Delete Consumer) // Note: // Codes 0 (Undesignated), 4 (Joint) and 6 (On-Behalf-Of) are obsolete as of September 2003 and may no longer be reported. ECOACode string `json:"ecoaCode" validate:"required"` // Contains a value that indicates a special condition of the account that applies to the associated consumer. // This special condition may be that a bankruptcy was filed, discharged, dismissed or withdrawn; a debt was reaffirmed; or the consumer cannot be located or is now located. // The indicator should be reported one time and will remain on file until another Consumer Information Indicator or a Removal value is reported. // As an option, the indicator may be reported each month as long as the condition applies. // Regardless of the method of reporting, the indicator will be deleted only when another Consumer Information Indicator or a Removal value (Q, S, U) is reported. // Exhibit 11 provides a list of Consumer Information Indicators and examples that demonstrate how to report these codes. ConsumerInformationIndicator string `json:"consumerInformationIndicator,omitempty"` // Contains the standard two-character country abbreviation. CountryCode string `json:"countryCode"` // Contains billing/mailing address for the associated consumer. // If the consumer has a U.S. address and a foreign address, report the U.S. address. If the consumer has never used the U.S. // address as a billing/mailing address (e.g., a property address), report the foreign address. // If the billing/mailing address does not belong specifically to the consumer, such as a financial counseling site or bill paying service, report the consumer’s home address. // The First Line of Address usually includes street number, direction, street name, and type of thoroughfare. // If the billing/mailing address is a PO Box or Rural Route, include Box or Route followed by the number (e.g., PO Box 100). // Do not report both a street address and a PO Box. // If the billing/mailing address is a private mailbox (PMB), the street address should be reported in the First Line of Address (e.g., 5678 Main Street). // The PMB number should be reported in the Second Line of Address (e.g., PMB 1234). // As an alternative, the entire address can be reported in the First Line of Address; for example, 5678 Main Street PMB 1234. // Eliminate internal messages such as: “Do not mail”, “Attorney”, “Charge-off”, “Chapter 13”, “Fraud”, “Trustee”, “Estate of”, “Care of”, “M/R” (Mail Returned), etc. // Do not enter data furnisher's address in this field. FirstLineAddress string `json:"firstLineAddress" validate:"required"` // Contains second line of address, if needed, such as apartment or unit number, or private mailbox number (PMB). // Eliminate internal messages such as: “Do not mail”, “Attorney”, “Charge-off”, “Chapter 13”, “Fraud”, “Trustee”, “Estate of”, “Care of”, “M/R” (Mail Returned), etc. SecondLineAddress string `json:"secondLineAddress,omitempty"` // Contains city name for address of associated consumer. // Truncate rightmost positions if city name is greater than 20 characters or use standard 13-character U.S. Postal Service city abbreviations. City string `json:"city" validate:"required"` // Contains the standard U.S. Postal Service state abbreviation for the address of the associated consumer. State string `json:"state" validate:"required"` // Report the Zip Code of the associated consumer’s address. // Use entire field if reporting 9-digit zip codes. Otherwise, leftjustify and blank fill. ZipCode string `json:"zipCode" validate:"required"` // Contains one of the following values for the address // C = Confirmed/Verified address // Note: // Value ‘C’ enables reporting a confirmed or verified address after receiving an address discrepancy notification from a consumer reporting agency. // Report ‘C’ one time after the address is confirmed. // // Y = Known to be address of associated consumer // N = Not confirmed address // M = Military address // S = Secondary address // B = Business address — not consumer's residence // U = Non-deliverable address/Returned mail // D = Data reporter’s default address // P = Bill Payer Service — not consumer’s residence // //If indicator not available or unknown, blank fill. AddressIndicator string `json:"addressIndicator"` // Contains the one-character residence code of the address reported in fields 13-17. Values available: // O = Owns // R = Rents // If not available or unknown, blank fill. ResidenceCode string `json:"residenceCode"` // contains filtered or unexported fields }
J2Segment holds the j2 segment
func (*J2Segment) Validate ¶
Validate performs some checks on the record and returns an error if not Validated
func (*J2Segment) ValidateAddressIndicator ¶
validation of address indicator
func (*J2Segment) ValidateDateBirth ¶ added in v0.7.0
validation of date of birth
func (*J2Segment) ValidateGenerationCode ¶
validation of generation code
func (*J2Segment) ValidateResidenceCode ¶
validation of residence code
func (*J2Segment) ValidateSocialSecurityNumber ¶ added in v0.7.0
validation of social security number
func (*J2Segment) ValidateTelephoneNumber ¶
validation of telephone number
type K1Segment ¶
type K1Segment struct { // Contains a constant of K1. SegmentIdentifier string `json:"segmentIdentifier" validate:"required"` // This field is required and the content is dependent on the type of reporter. // Collection Agencies: Report the name of the company/creditor, including any partnering affinity name1, that originally opened the account for the consumer, // even if the account had been turned over to multiple collection agencies. // Debt Buyers: Report the name of the company/creditor, including any partnering affinity name1, that originally opened the account for the consumer, // even if the account had been sold multiple times to different debt buyers. // Refer to the K2 Segment for “purchased from” information. // Companies Reporting Returned Checks: Report the name of the payee; i.e., name of company to which the check was written. // Refer to Frequently Asked Question 15 for additional guidelines on reporting returned checks. // Student Loan Guarantors/U.S. Department of Education: Report the name of the original student loan lender. // U.S. Treasury: Report the name of the government agency that is the original creditor. // One of the following three options should be used when reporting a creditor’s name that would reveal sensitive information about the consumer. // 1. Report the name of the institution, but do not include reference to the type of service. // For example, use the hospital name without identifying that it was the psychiatric unit that provided care. If a hospital’s name reveals sensitive information, abbreviate the name. // 2. Use the corporate name if it is different from the commercial name of a mental institution or drug rehabilitation center. // 3. Do not report the account if either of the above two options would not sufficiently protect the consumer’s privacy OriginalCreditorName string `json:"originalCreditorName" validate:"required"` // Contains a code which must be reported to indicate the general type of business for the Original Creditor Name. // Values available: // 01 = Retail // 02 = Medical/Health Care Required when reporting medical debts and returned checks from providers of medical services, products or devices // 03 = Oil Company // 04 = Government // 05 = Personal Services // 06 = Insurance // 07 = Educational // 08 = Banking // 09 = Rental/Leasing // 10 = Utilities // 11 = Cable/Cellular // 12 = Financial (other non-banking financial institutions) // 13 = Credit Union // 14 = Automotive // 15 = Check Guarantee CreditorClassification int `json:"creditorClassification" validate:"required"` // contains filtered or unexported fields }
K1Segment holds the k1 segment
func (*K1Segment) Validate ¶
Validate performs some checks on the record and returns an error if not Validated
func (*K1Segment) ValidateCreditorClassification ¶
validation of creditor classification
type K2Segment ¶
type K2Segment struct { // Contains a constant of K2. SegmentIdentifier string `json:"segmentIdentifier" validate:"required"` // Contains a code representing the type of information being reported. Values available: // 1 = Purchased From Name // 2 = Sold To Name // 9 = Remove Previously Reported K2 Segment Information PurchasedIndicator int `json:"purchasedIndicator" validate:"required"` // Contains the name of the company from which the account was purchased or to which the account was sold. // If field 2 = 9, this field should be blank filled. PurchasedName string `json:"purchasedName" validate:"required"` // contains filtered or unexported fields }
K2Segment holds the k2 segment
func (*K2Segment) Validate ¶
Validate performs some checks on the record and returns an error if not Validated
func (*K2Segment) ValidatePurchasedIndicator ¶
validation of purchased indicator
func (*K2Segment) ValidatePurchasedName ¶
validation of purchased name
type K3Segment ¶
type K3Segment struct { // Contains a constant of K3. SegmentIdentifier string `json:"segmentIdentifier" validate:"required"` // Contains a code indicating which secondary marketing agency has interest in this loan. Values available: // 00 = Agency Identifier not applicable (Used when reporting MIN only) // 01 = Fannie Mae // 02 = Freddie Mac AgencyIdentifier int `json:"agencyIdentifier,omitempty"` // Contains the account number as assigned by the secondary marketing agency. Do not include embedded blanks or special characters. // If field 2 = 00, this field should be blank filled. AccountNumber string `json:"accountNumber,omitempty"` // Contains the Mortgage Identification Number assigned to a mortgage loan. Do not include embedded blanks or special characters. // The MIN indicates that the loan is registered with the Mortgage Electronic Registration Systems, Inc. // (MERS), the electronic registry for tracking the ownership of mortgage rights. // For more information, see http://www.mersinc.org. MortgageIdentificationNumber string `json:"mortgageIdentificationNumber"` // contains filtered or unexported fields }
K3Segment holds the k3 segment
func (*K3Segment) Validate ¶
Validate performs some checks on the record and returns an error if not Validated
func (*K3Segment) ValidateAccountNumber ¶
validation of account number
func (*K3Segment) ValidateAgencyIdentifier ¶
validation of agency identifier
type K4Segment ¶
type K4Segment struct { // Contains a constant of K4. SegmentIdentifier string `json:"segmentIdentifier" validate:"required"` // Contains a code describing the specialized payment arrangements. // Values available: // 01 = Balloon Payment // 02 = Deferred Payment SpecializedPaymentIndicator int `json:"specializedPaymentIndicator" validate:"required"` // Report the date the first payment is due for deferred loans. // Format is MMDDYYYY. If the day is not available, use 01. DeferredPaymentStartDate utils.Time `json:"deferredPaymentStartDate,omitempty"` // Report the date the balloon payment is due, if applicable. // Format is MMDDYYYY. If the day is not available, use 01. BalloonPaymentDueDate utils.Time `json:"balloonPaymentDueDate,omitempty"` // Report the amount of the balloon payment in whole dollars only. BalloonPaymentAmount int `json:"balloonPaymentAmount"` // contains filtered or unexported fields }
K4Segment holds the k4 segment
func (*K4Segment) Validate ¶
Validate performs some checks on the record and returns an error if not Validated
func (*K4Segment) ValidateSpecializedPaymentIndicator ¶
validation of specialized payment indicator
type L1Segment ¶
type L1Segment struct { // Contains a constant of L1. SegmentIdentifier string `json:"segmentIdentifier" validate:"required"` // Contains a code representing the change being reported. // Values available: // 1 = Consumer Account Number Change ONLY // 2 = Identification Number Change ONLY // 3 = Consumer Account Number AND Identification Number Change ChangeIndicator int `json:"changeIndicator" validate:"required"` // Contains the new Account Number assigned to this account. // Do not include embedded blanks or special characters. // If field 2 = 2, this field should be blank filled. NewConsumerAccountNumber string `json:"newConsumerAccountNumber,omitempty"` // Contains the new Identification Number assigned to this account. // Do not include embedded blanks or special characters. // If field 2 = 1, this field should be blank filled. NewIdentificationNumber string `json:"newIdentificationNumber,omitempty"` // contains filtered or unexported fields }
L1Segment holds the l1 segment
func (*L1Segment) Validate ¶
Validate performs some checks on the record and returns an error if not Validated
func (*L1Segment) ValidateChangeIndicator ¶
validation of change indicator
func (*L1Segment) ValidateNewConsumerAccountNumber ¶
validation of new consumer account number
func (*L1Segment) ValidateNewIdentificationNumber ¶
validation of new identification number
type N1Segment ¶
type N1Segment struct { // Contains a constant of N1. SegmentIdentifier string `json:"segmentIdentifier" validate:"required"` // Report the name of the employer for the consumer reported in the Base Segment. EmployerName string `json:"employerName" validate:"required"` // Contains the mailing address for the employer in Field 2 and usually includes street number, direction, street name and type of thoroughfare. FirstLineEmployerAddress string `json:"firstLineEmployerAddress"` // Contains second line of employer’s address, if needed. SecondLineEmployerAddress string `json:"secondLineEmployerAddress"` // Contains city name for employer’s address. // Truncate rightmost positions if city name is greater than 20 characters or use standard 13-character U.S. // Postal Service city abbreviations. EmployerCity string `json:"employerCity"` // Contains the standard U.S. Postal Service state abbreviation for the address of the employer. EmployerState string `json:"employerState"` // Report the zip code of the employer’s address. // Use entire field if reporting 9-digit zip codes. Otherwise, left-justify and blank fill. ZipCode string `json:"zipCode"` // Report title or position for consumer reported in the Base Segment (the employee). Occupation string `json:"occupation"` // contains filtered or unexported fields }
N1Segment holds the n1 segment
type PackedBaseSegment ¶
type PackedBaseSegment BaseSegment
PackedBaseSegment holds the packed base segment
func (*PackedBaseSegment) AddApplicableSegment ¶
func (r *PackedBaseSegment) AddApplicableSegment(s Segment) error
AddApplicableSegment will add new applicable segment into record
func (*PackedBaseSegment) BlockSize ¶
func (r *PackedBaseSegment) BlockSize() int
BlockSize returns size of block
func (*PackedBaseSegment) Bytes ¶ added in v0.5.0
func (r *PackedBaseSegment) Bytes() []byte
Bytes return raw byte array
func (*PackedBaseSegment) GetSegments ¶
func (r *PackedBaseSegment) GetSegments(name string) []Segment
GetSegments returns list of applicable segments by segment name
func (*PackedBaseSegment) Length ¶
func (r *PackedBaseSegment) Length() int
Length returns size of segment
func (*PackedBaseSegment) MarshalJSON ¶
func (r *PackedBaseSegment) MarshalJSON() ([]byte, error)
MarshalJSON returns JSON blob
func (*PackedBaseSegment) Name ¶
func (r *PackedBaseSegment) Name() string
Name returns name of packed base segment
func (*PackedBaseSegment) Parse ¶
func (r *PackedBaseSegment) Parse(record []byte) (int, error)
Parse takes the input record string and parses the packed base segment values
func (*PackedBaseSegment) String ¶
func (r *PackedBaseSegment) String() string
String writes the packed base segment struct to a 426 character string.
func (*PackedBaseSegment) UnmarshalJSON ¶
func (r *PackedBaseSegment) UnmarshalJSON(data []byte) error
UnmarshalJSON parses a JSON blob
func (*PackedBaseSegment) Validate ¶
func (r *PackedBaseSegment) Validate() error
Validate performs some checks on the record and returns an error if not Validated
func (*PackedBaseSegment) ValidateDateBirth ¶ added in v0.7.0
func (r *PackedBaseSegment) ValidateDateBirth() error
validation of date of birth
func (*PackedBaseSegment) ValidateIdentificationNumber ¶
func (r *PackedBaseSegment) ValidateIdentificationNumber() error
validation of identification number
func (*PackedBaseSegment) ValidateInterestTypeIndicator ¶
func (r *PackedBaseSegment) ValidateInterestTypeIndicator() error
validation of interest type indicator
func (*PackedBaseSegment) ValidatePaymentHistoryProfile ¶
func (r *PackedBaseSegment) ValidatePaymentHistoryProfile() error
validation of payment history profile
func (*PackedBaseSegment) ValidatePaymentRating ¶
func (r *PackedBaseSegment) ValidatePaymentRating() error
validation of payment rating
func (*PackedBaseSegment) ValidatePortfolioType ¶
func (r *PackedBaseSegment) ValidatePortfolioType() error
validation of portfolio type
func (*PackedBaseSegment) ValidateSocialSecurityNumber ¶ added in v0.7.0
func (r *PackedBaseSegment) ValidateSocialSecurityNumber() error
validation of social security number
func (*PackedBaseSegment) ValidateTelephoneNumber ¶
func (r *PackedBaseSegment) ValidateTelephoneNumber() error
validation of telephone number
func (*PackedBaseSegment) ValidateTermsDuration ¶
func (r *PackedBaseSegment) ValidateTermsDuration() error
validation of terms duration
func (*PackedBaseSegment) ValidateTermsFrequency ¶
func (r *PackedBaseSegment) ValidateTermsFrequency() error
validation of terms frequency
type PackedHeaderRecord ¶
type PackedHeaderRecord HeaderRecord
PackedHeaderRecord holds the packed header record
func (*PackedHeaderRecord) AddApplicableSegment ¶
func (r *PackedHeaderRecord) AddApplicableSegment(s Segment) error
AddApplicableSegment will add new applicable segment into record
func (*PackedHeaderRecord) BlockSize ¶
func (r *PackedHeaderRecord) BlockSize() int
BlockSize returns size of block
func (*PackedHeaderRecord) Bytes ¶ added in v0.5.0
func (r *PackedHeaderRecord) Bytes() []byte
Bytes return raw byte array
func (*PackedHeaderRecord) GetSegments ¶
func (r *PackedHeaderRecord) GetSegments(string) []Segment
GetSegments returns list of applicable segments by segment name
func (*PackedHeaderRecord) Length ¶
func (r *PackedHeaderRecord) Length() int
Length returns size of segment
func (*PackedHeaderRecord) Name ¶
func (r *PackedHeaderRecord) Name() string
Name returns name of packed header record
func (*PackedHeaderRecord) Parse ¶
func (r *PackedHeaderRecord) Parse(record []byte) (int, error)
Parse takes the input record string and parses the packed header record values
func (*PackedHeaderRecord) String ¶
func (r *PackedHeaderRecord) String() string
String writes the packed header record struct to a 426 character string.
func (*PackedHeaderRecord) Validate ¶
func (r *PackedHeaderRecord) Validate() error
Validate performs some checks on the record and returns an error if not Validated
type PackedTrailerRecord ¶
type PackedTrailerRecord TrailerRecord
PackedTrailerRecord holds the packed trailer record
func (*PackedTrailerRecord) AddApplicableSegment ¶
func (r *PackedTrailerRecord) AddApplicableSegment(s Segment) error
AddApplicableSegment will add new applicable segment into record
func (*PackedTrailerRecord) BlockSize ¶
func (r *PackedTrailerRecord) BlockSize() int
BlockSize returns size of block
func (*PackedTrailerRecord) Bytes ¶ added in v0.5.0
func (r *PackedTrailerRecord) Bytes() []byte
Bytes return raw byte array
func (*PackedTrailerRecord) GetSegments ¶
func (r *PackedTrailerRecord) GetSegments(string) []Segment
GetSegments returns list of applicable segments by segment name
func (*PackedTrailerRecord) Length ¶
func (r *PackedTrailerRecord) Length() int
Length returns size of record
func (*PackedTrailerRecord) Name ¶
func (r *PackedTrailerRecord) Name() string
Name returns name of packed trailer record
func (*PackedTrailerRecord) Parse ¶
func (r *PackedTrailerRecord) Parse(record []byte) (int, error)
Parse takes the input record string and parses the packed trailer record values
func (*PackedTrailerRecord) String ¶
func (r *PackedTrailerRecord) String() string
String writes the trailer record struct to a 426 character string.
func (*PackedTrailerRecord) Validate ¶
func (r *PackedTrailerRecord) Validate() error
Validate performs some checks on the record and returns an error if not Validated
type Record ¶
type Record interface { Name() string Parse([]byte) (int, error) String() string Bytes() []byte Validate() error Length() int BlockSize() int AddApplicableSegment(Segment) error GetSegments(string) []Segment }
General record interface
func NewPackedBaseSegment ¶
func NewPackedBaseSegment() Record
NewPackedBaseSegment returns a new packed base segment
func NewPackedHeaderRecord ¶
func NewPackedHeaderRecord() Record
NewPackedHeaderRecord returns a new packed header record
func NewPackedTrailerRecord ¶
func NewPackedTrailerRecord() Record
NewPackedTrailerRecord returns a new packed trailer record
func NewTrailerRecord ¶
func NewTrailerRecord() Record
NewTrailerRecord returns a new trailer record
type Segment ¶
type Segment interface { Name() string Parse([]byte) (int, error) String() string Bytes() []byte Validate() error Length() int }
General segment interface
type TrailerInformation ¶
type TrailerInformation TrailerRecord
type TrailerRecord ¶
type TrailerRecord struct { // Contains a value equal to the length of the physical record. This value includes the four bytes reserved for this field. // If fixed-length records are being reported, the Trailer Record should be the same length as all the data records. // The Trailer Record should be padded with blanks to fill the needed number of positions. RecordDescriptorWord int `json:"recordDescriptorWord" validate:"required"` // Contains a constant of TRAILER, which is used to identify this record. RecordIdentifier string `json:"recordIdentifier" validate:"required"` // Contains the total number of Base Segments being reported. TotalBaseRecords int `json:"totalBaseRecords" validate:"required"` // Contains the total number of Base Segments with Status Code DF. TotalStatusCodeDF int `json:"totalStatusCodeDF"` // Contains the total number of J1 Segments being reported. Do not count blank- or 9-filled segments. TotalConsumerSegmentsJ1 int `json:"totalConsumerSegmentsJ1,omitempty"` // Contains the total number of J2 Segments being reported. Do not count blank- or 9-filled segments. TotalConsumerSegmentsJ2 int `json:"totalConsumerSegmentsJ2,omitempty"` // Contains the number of blocks on the file, if applicable. BlockCount int `json:"blockCount"` // Contains the total number of Base Segments with Status Code DA. TotalStatusCodeDA int `json:"totalStatusCodeDA"` // Contains the total number of Base Segments with Status Code 05. TotalStatusCode05 int `json:"totalStatusCode05"` // Contains the total number of Base Segments with Status Code 11. TotalStatusCode11 int `json:"totalStatusCode11"` // Contains the total number of Base Segments with Status Code 13. TotalStatusCode13 int `json:"totalStatusCode13"` // Contains the total number of Base Segments with Status Code 61. TotalStatusCode61 int `json:"totalStatusCode61"` // Contains the total number of Base Segments with Status Code 62. TotalStatusCode62 int `json:"totalStatusCode62"` // Contains the total number of Base Segments with Status Code 63. TotalStatusCode63 int `json:"totalStatusCode63"` // Contains the total number of Base Segments with Status Code 64. TotalStatusCode64 int `json:"totalStatusCode64"` // Contains the total number of Base Segments with Status Code 65. TotalStatusCode65 int `json:"totalStatusCode65"` // Contains the total number of Base Segments with Status Code 71. TotalStatusCode71 int `json:"totalStatusCode71"` // Contains the total number of Base Segments with Status Code 78. TotalStatusCode78 int `json:"totalStatusCode78"` // Contains the total number of Base Segments with Status Code 80. TotalStatusCode80 int `json:"totalStatusCode80"` // Contains the total number of Base Segments with Status Code 82. TotalStatusCode82 int `json:"totalStatusCode82"` // Contains the total number of Base Segments with Status Code 83. TotalStatusCode83 int `json:"totalStatusCode83"` // Contains the total number of Base Segments with Status Code 84. TotalStatusCode84 int `json:"totalStatusCode84"` // Contains the total number of Base Segments with Status Code 88. TotalStatusCode88 int `json:"totalStatusCode88"` // Contains the total number of Base Segments with Status Code 89. TotalStatusCode89 int `json:"totalStatusCode89"` // Contains the total number of Base Segments with Status Code 93. TotalStatusCode93 int `json:"totalStatusCode93"` // Contains the total number of Base Segments with Status Code 94. TotalStatusCode94 int `json:"totalStatusCode94"` // Contains the total number of Base Segments with Status Code 95. TotalStatusCode95 int `json:"totalStatusCode95"` // Contains the total number of Base Segments with Status Code 96. TotalStatusCode96 int `json:"totalStatusCode96"` // Contains the total number of Base Segments with Status Code 97. TotalStatusCode97 int `json:"totalStatusCode97"` // Contains the total number of records with ECOA Code Z being reported in the Base Segment, in the J1 Segment and in the J2 Segment. TotalECOACodeZ int `json:"totalECOACodeZ"` // Contains the total number of records with employment being reported in the N1 Segment. TotalEmploymentSegments int `json:"totalEmploymentSegments"` // Contains the total number of records with Original Creditors being reported in the K1 Segment. TotalOriginalCreditorSegments int `json:"totalOriginalCreditorSegments"` // Contains the total number of records with Purchased From/Sold To being reported in the K2 Segment. TotalPurchasedToSegments int `json:"totalPurchasedToSegments"` // Contains the total number of records with Mortgage Information being reported in the K3 Segment. TotalMortgageInformationSegments int `json:"totalMortgageInformationSegments"` // Contains the total number of records with Specialized Payment Information being reported in the K4 Segment. TotalPaymentInformationSegments int `json:"totalPaymentInformationSegments"` // Contains the total number of Consumer Account Number and/or Identification Number changes being reported in the L1 Segment. TotalChangeSegments int `json:"totalChangeSegments"` // Contains the total number of valid Social Security Numbers reported in the Base Segment, in the J1 Segment and in the J2 Segment. // Do not count zero- or 9-filled SSNs. TotalSocialNumbersAllSegments int `json:"totalSocialNumbersAllSegments"` // Contains the total number of valid Social Security Numbers reported in the Base Segment. Do not count zero- or 9-filled SSNs. TotalSocialNumbersBaseSegments int `json:"totalSocialNumbersBaseSegments"` // Contains the total number of valid Social Security Numbers reported in the J1 Segment. Do not count zero- or 9-filled SSNs. TotalSocialNumbersJ1Segments int `json:"totalSocialNumbersJ1Segments"` // Contains the total number of valid Social Security Numbers reported in the J2 Segment. Do not count zero- or 9-filled SSNs. TotalSocialNumbersJ2Segments int `json:"totalSocialNumbersJ2Segments"` // Contains the total number of valid Dates of Birth reported in the Base Segment, in the J1 Segment and in the J2 Segment. // Do not count zero-filled Dates of Birth. TotalDatesBirthAllSegments int `json:"totalDatesBirthAllSegments"` // Contains the total number of valid Dates of Birth reported in the Base Segment. Do not count zero-filled Dates of Birth. TotalDatesBirthBaseSegments int `json:"totalDatesBirthBaseSegments"` // Contains the total number of valid Dates of Birth reported in the J1 Segment. Do not count zero-filled Dates of Birth. TotalDatesBirthJ1Segments int `json:"totalDatesBirthJ1Segments"` // Contains the total number of valid Dates of Birth reported in the J2 Segment. Do not count zero-filled Dates of Birth. TotalDatesBirthJ2Segments int `json:"totalDatesBirthJ2Segments"` // Contains the total number of valid Telephone Numbers reported in the Base Segment, in the J1 Segment and in the J2 Segment. // Do not count zero-filled Telephone Numbers. TotalTelephoneNumbersAllSegments int `json:"totalTelephoneNumbersAllSegments"` // contains filtered or unexported fields }
TrailerRecord holds the trailer record
func (*TrailerRecord) AddApplicableSegment ¶
func (r *TrailerRecord) AddApplicableSegment(s Segment) error
AddApplicableSegment will add new applicable segment into record
func (*TrailerRecord) BlockSize ¶
func (r *TrailerRecord) BlockSize() int
BlockSize returns size of block
func (*TrailerRecord) Bytes ¶ added in v0.5.0
func (r *TrailerRecord) Bytes() []byte
Bytes return raw byte array
func (*TrailerRecord) GetSegments ¶
func (r *TrailerRecord) GetSegments(string) []Segment
GetSegments returns list of applicable segments by segment name
func (*TrailerRecord) Name ¶
func (r *TrailerRecord) Name() string
Name returns name of trailer record
func (*TrailerRecord) Parse ¶
func (r *TrailerRecord) Parse(record []byte) (int, error)
Parse takes the input record string and parses the trailer record values
func (*TrailerRecord) String ¶
func (r *TrailerRecord) String() string
String writes the trailer record struct to a 426 character string.
func (*TrailerRecord) Validate ¶
func (r *TrailerRecord) Validate() error
Validate performs some checks on the record and returns an error if not Validated