metro_2 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metro_2.rb +130 -0
- data/lib/metro_2/version.rb +1 -1
- data/spec/records/header_segment_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 284ff0d88cf4e3a878baafd2f405471dbe854524
|
4
|
+
data.tar.gz: 41b9493ad07542925617fea53a1707aa2e63394d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d146a7624d3f3c1c878003173868377013b533321240bb97fff3b0e6c75ca83806cd24a6462671eed9779c8c5c1c2f3fd0462f89ef690b6cad75920047f57e61
|
7
|
+
data.tar.gz: a0a57c10f58ccdbbb35a214fd11092e5e10d1e8e9d48323c5aa0f4535378e9d1cba218369895c075a11c4128e43d750e6a6fb4f14ee12d348c80a87674dfb1e9
|
data/lib/metro_2.rb
CHANGED
@@ -2,6 +2,129 @@ require 'metro_2/version'
|
|
2
2
|
|
3
3
|
module Metro2
|
4
4
|
|
5
|
+
PORTFOLIO_TYPE = {
|
6
|
+
line_of_credit: 'C',
|
7
|
+
installment: 'I',
|
8
|
+
mortgage: 'M',
|
9
|
+
open_account: 'O',
|
10
|
+
revolving: 'R'
|
11
|
+
}.freeze
|
12
|
+
|
13
|
+
ACCOUNT_TYPE = {
|
14
|
+
unsecured: '01',
|
15
|
+
education: '12'
|
16
|
+
# TODO: add other account types
|
17
|
+
}.freeze
|
18
|
+
|
19
|
+
ECOA_CODE = {
|
20
|
+
individual: '1'
|
21
|
+
# TODO: add other ECOA codes
|
22
|
+
}.freeze
|
23
|
+
|
24
|
+
INTEREST_TYPE_INDICATOR = {
|
25
|
+
fixed: 'F',
|
26
|
+
variable: 'V'
|
27
|
+
}.freeze
|
28
|
+
|
29
|
+
TERMS_FREQUENCY = {
|
30
|
+
deferred: 'D',
|
31
|
+
single_payment: 'P',
|
32
|
+
weekly: 'W',
|
33
|
+
biweekly: 'B',
|
34
|
+
semimonthly: 'S',
|
35
|
+
monthly: 'M',
|
36
|
+
bimonthly: 'L',
|
37
|
+
quarterly: 'Q',
|
38
|
+
triannually: 'T',
|
39
|
+
semiannually: 'S',
|
40
|
+
annually: 'Y'
|
41
|
+
}.freeze
|
42
|
+
|
43
|
+
ACCOUNT_STATUS = {
|
44
|
+
account_transferred: '05',
|
45
|
+
current: '11',
|
46
|
+
closed: '13',
|
47
|
+
paid_in_full_voluntary_surrender: '61',
|
48
|
+
paid_in_full_collection_account: '62',
|
49
|
+
paid_in_full_repossession: '63',
|
50
|
+
paid_in_full_charge_off: '64',
|
51
|
+
paid_in_full_foreclosure: '65',
|
52
|
+
past_due_30_59: '71',
|
53
|
+
past_due_60_89: '78',
|
54
|
+
past_due_90_119: '80',
|
55
|
+
past_due_120_149: '82',
|
56
|
+
past_due_150_179: '83',
|
57
|
+
past_due_180_plus: '84',
|
58
|
+
govt_insurance_claim_filed: '88',
|
59
|
+
deed_received: '89',
|
60
|
+
collections: '93',
|
61
|
+
foreclosure_completed: '94',
|
62
|
+
voluntary_surrender: '95',
|
63
|
+
merch_repossessed: '96',
|
64
|
+
charge_off: '97',
|
65
|
+
delete_account: 'DA',
|
66
|
+
delete_account_fraud: 'DF'
|
67
|
+
}.freeze
|
68
|
+
|
69
|
+
PAYMENT_HISTORY_PROFILE = {
|
70
|
+
current: '0',
|
71
|
+
past_due_30_59: '1',
|
72
|
+
past_due_60_89: '2',
|
73
|
+
past_due_90_119: '3',
|
74
|
+
past_due_120_149: '4',
|
75
|
+
past_due_150_179: '5',
|
76
|
+
past_due_180_plus: '6',
|
77
|
+
no_history_prior: 'B',
|
78
|
+
no_history_available: 'D',
|
79
|
+
zero_balance: 'E',
|
80
|
+
collection: 'G',
|
81
|
+
foreclosure_completed: 'H',
|
82
|
+
voluntary_surrender: 'J',
|
83
|
+
repossession: 'K',
|
84
|
+
charge_off: 'L'
|
85
|
+
}.freeze
|
86
|
+
|
87
|
+
CONSUMER_TRANSACTION_TYPE = {
|
88
|
+
new_account_or_new_borrower: '1',
|
89
|
+
name_change: '2',
|
90
|
+
address_change: '3',
|
91
|
+
ssn_change: '5',
|
92
|
+
name_and_address_change: '6',
|
93
|
+
name_and_ssn_change: '8',
|
94
|
+
address_and_ssn_change: '9',
|
95
|
+
name_address_and_ssn_change: 'A'
|
96
|
+
}.freeze
|
97
|
+
|
98
|
+
ADDRESS_INDICATOR = {
|
99
|
+
confirmed: 'C',
|
100
|
+
known: 'Y',
|
101
|
+
not_confirmed: 'N',
|
102
|
+
military: 'M',
|
103
|
+
secondary: 'S',
|
104
|
+
business: 'B',
|
105
|
+
non_deliverable: 'U',
|
106
|
+
data_reporters_default: 'D',
|
107
|
+
bill_payer_service: 'P'
|
108
|
+
}.freeze
|
109
|
+
|
110
|
+
RESIDENCE_CODE = {
|
111
|
+
owns: 'O',
|
112
|
+
rents: 'R'
|
113
|
+
}.freeze
|
114
|
+
|
115
|
+
GENERATION_CODE = {
|
116
|
+
junior: 'J',
|
117
|
+
senior: 'S',
|
118
|
+
ii: '2',
|
119
|
+
iii: '3',
|
120
|
+
iv: '4',
|
121
|
+
v: '5',
|
122
|
+
vi: '6',
|
123
|
+
vii: '7',
|
124
|
+
viii: '8',
|
125
|
+
ix: '9'
|
126
|
+
}.freeze
|
127
|
+
|
5
128
|
ALPHANUMERIC = /\A([[:alnum:]]|\s)+\z/
|
6
129
|
ALPHANUMERIC_PLUS_DASH = /\A([[:alnum:]]|\s|\-)+\z/
|
7
130
|
ALPHANUMERIC_PLUS_DOT_DASH_SLASH = /\A([[:alnum:]]|\s|\-|\.|\\|\/)+\z/
|
@@ -9,6 +132,13 @@ module Metro2
|
|
9
132
|
|
10
133
|
FIXED_LENGTH = 426
|
11
134
|
|
135
|
+
def self.account_status_needs_payment_rating?(account_status)
|
136
|
+
account_status.in?([ACCOUNT_STATUS[:account_transferred], ACCOUNT_STATUS[:closed],
|
137
|
+
ACCOUNT_STATUS[:paid_in_full_foreclosure], ACCOUNT_STATUS[:govt_insurance_claim_filed],
|
138
|
+
ACCOUNT_STATUS[:deed_received], ACCOUNT_STATUS[:foreclosure_completed],
|
139
|
+
ACCOUNT_STATUS[:voluntary_surrender]])
|
140
|
+
end
|
141
|
+
|
12
142
|
def self.alphanumeric_to_metro2(val, required_length, permitted_chars)
|
13
143
|
# Left justified and blank-filled
|
14
144
|
val = val.to_s
|
data/lib/metro_2/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metro_2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Mascarenhas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
98
|
version: '0'
|
99
99
|
requirements: []
|
100
100
|
rubyforge_project:
|
101
|
-
rubygems_version: 2.4.
|
101
|
+
rubygems_version: 2.4.3
|
102
102
|
signing_key:
|
103
103
|
specification_version: 4
|
104
104
|
summary: Create Metro 2 format files for credit reporting
|