tufy 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/tufy/build_account_segment.rb +30 -56
- data/lib/tufy/build_address_segment.rb +7 -10
- data/lib/tufy/build_contact_number_segment.rb +6 -7
- data/lib/tufy/build_email_address_segment.rb +3 -4
- data/lib/tufy/build_field.rb +18 -0
- data/lib/tufy/build_header_segment.rb +1 -1
- data/lib/tufy/build_id_segment.rb +6 -7
- data/lib/tufy/build_name_segment.rb +10 -19
- data/lib/tufy/build_segment.rb +1 -11
- data/lib/tufy/fields/account/build_account_number_field.rb +26 -0
- data/lib/tufy/fields/account/build_account_status_field.rb +26 -0
- data/lib/tufy/fields/account/build_account_type_field.rb +25 -0
- data/lib/tufy/fields/account/build_cash_advance_balance_field.rb +26 -0
- data/lib/tufy/fields/account/build_closed_date_field.rb +26 -0
- data/lib/tufy/fields/account/build_consumer_or_commercial_field.rb +26 -0
- data/lib/tufy/fields/account/build_credit_limit_or_loan_amount_field.rb +26 -0
- data/lib/tufy/fields/account/build_currency_code_field.rb +25 -0
- data/lib/tufy/fields/account/build_expiry_date_field.rb +26 -0
- data/lib/tufy/fields/account/build_fresh_cash_advance_field.rb +26 -0
- data/lib/tufy/fields/account/build_installment_amount_field.rb +26 -0
- data/lib/tufy/fields/account/build_interest_and_fees_field.rb +26 -0
- data/lib/tufy/fields/account/build_legal_action_field.rb +26 -0
- data/lib/tufy/fields/account/build_number_of_days_past_due_field.rb +26 -0
- data/lib/tufy/fields/account/build_number_of_installments_field.rb +26 -0
- data/lib/tufy/fields/account/build_opened_date_field.rb +26 -0
- data/lib/tufy/fields/account/build_outstanding_balance_field.rb +26 -0
- data/lib/tufy/fields/account/build_partial_payment_field.rb +26 -0
- data/lib/tufy/fields/account/build_past_due_amount_field.rb +26 -0
- data/lib/tufy/fields/account/build_payment_amount_field.rb +26 -0
- data/lib/tufy/fields/account/build_payment_frequency_field.rb +26 -0
- data/lib/tufy/fields/account/build_reported_date_field.rb +26 -0
- data/lib/tufy/fields/account/build_restructured_account_number_field.rb +26 -0
- data/lib/tufy/fields/account/build_shared_by_field.rb +26 -0
- data/lib/tufy/fields/account/build_unbilled_balance_field.rb +26 -0
- data/lib/tufy/fields/account/build_user_id_field.rb +26 -0
- data/lib/tufy/fields/address/build_address_1_field.rb +26 -0
- data/lib/tufy/fields/address/build_address_2_field.rb +26 -0
- data/lib/tufy/fields/address/build_address_type_field.rb +26 -0
- data/lib/tufy/fields/contact_number/build_contact_number_field.rb +26 -0
- data/lib/tufy/fields/contact_number/build_contact_number_format_field.rb +26 -0
- data/lib/tufy/fields/email_address/build_email_address_field.rb +26 -0
- data/lib/tufy/fields/id/build_id_number_field.rb +26 -0
- data/lib/tufy/fields/id/build_id_type_field.rb +26 -0
- data/lib/tufy/fields/name/build_ac_holder_type_field.rb +26 -0
- data/lib/tufy/fields/name/build_civil_status_field.rb +26 -0
- data/lib/tufy/fields/name/build_date_of_birth_field.rb +26 -0
- data/lib/tufy/fields/name/build_first_name_field.rb +26 -0
- data/lib/tufy/fields/name/build_gender_field.rb +26 -0
- data/lib/tufy/fields/name/build_last_name_field.rb +26 -0
- data/lib/tufy/version.rb +1 -1
- data/lib/tufy.rb +41 -2
- metadata +43 -2
@@ -0,0 +1,26 @@
|
|
1
|
+
module Tufy
|
2
|
+
module Fields
|
3
|
+
module Name
|
4
|
+
class BuildGenderField < BuildField
|
5
|
+
expects :raw_data
|
6
|
+
promises :transformed_data
|
7
|
+
|
8
|
+
executed do |ctx|
|
9
|
+
ctx.transformed_data =
|
10
|
+
ctx.transformed_data +
|
11
|
+
transform(ctx).upcase
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def self.transform(ctx)
|
17
|
+
raw_data = ctx.raw_data
|
18
|
+
|
19
|
+
BuildNameSegment::Constants::GENDER_TAG +
|
20
|
+
FormatStrings::F2TS % raw_data[:gender].size +
|
21
|
+
raw_data[:gender]
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Tufy
|
2
|
+
module Fields
|
3
|
+
module Name
|
4
|
+
class BuildLastNameField < BuildField
|
5
|
+
expects :raw_data
|
6
|
+
promises :transformed_data
|
7
|
+
|
8
|
+
executed do |ctx|
|
9
|
+
ctx.transformed_data =
|
10
|
+
ctx.transformed_data +
|
11
|
+
transform(ctx).upcase
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def self.transform(ctx)
|
17
|
+
raw_data = ctx.raw_data
|
18
|
+
|
19
|
+
BuildNameSegment::Constants::LAST_NAME_TAG +
|
20
|
+
FormatStrings::F2TS % raw_data[:last_name].size +
|
21
|
+
raw_data[:last_name]
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/tufy/version.rb
CHANGED
data/lib/tufy.rb
CHANGED
@@ -16,8 +16,47 @@ require "tufy/build_records"
|
|
16
16
|
require "tufy/build_record"
|
17
17
|
require "tufy/transform_raw_data"
|
18
18
|
require "tufy/transform_raw_data_array"
|
19
|
-
|
20
|
-
|
19
|
+
require "tufy/build_field.rb"
|
20
|
+
require "tufy/fields/account/build_account_number_field.rb"
|
21
|
+
require "tufy/fields/account/build_account_status_field.rb"
|
22
|
+
require "tufy/fields/account/build_account_type_field.rb"
|
23
|
+
require "tufy/fields/account/build_cash_advance_balance_field.rb"
|
24
|
+
require "tufy/fields/account/build_closed_date_field.rb"
|
25
|
+
require "tufy/fields/account/build_consumer_or_commercial_field.rb"
|
26
|
+
require "tufy/fields/account/build_credit_limit_or_loan_amount_field.rb"
|
27
|
+
require "tufy/fields/account/build_currency_code_field.rb"
|
28
|
+
require "tufy/fields/account/build_expiry_date_field.rb"
|
29
|
+
require "tufy/fields/account/build_fresh_cash_advance_field.rb"
|
30
|
+
require "tufy/fields/account/build_interest_and_fees_field.rb"
|
31
|
+
require "tufy/fields/account/build_installment_amount_field.rb"
|
32
|
+
require "tufy/fields/account/build_legal_action_field.rb"
|
33
|
+
require "tufy/fields/account/build_number_of_days_past_due_field.rb"
|
34
|
+
require "tufy/fields/account/build_number_of_installments_field.rb"
|
35
|
+
require "tufy/fields/account/build_opened_date_field.rb"
|
36
|
+
require "tufy/fields/account/build_outstanding_balance_field.rb"
|
37
|
+
require "tufy/fields/account/build_partial_payment_field.rb"
|
38
|
+
require "tufy/fields/account/build_payment_frequency_field.rb"
|
39
|
+
require "tufy/fields/account/build_payment_amount_field.rb"
|
40
|
+
require "tufy/fields/account/build_past_due_amount_field.rb"
|
41
|
+
require "tufy/fields/account/build_reported_date_field.rb"
|
42
|
+
require "tufy/fields/account/build_restructured_account_number_field.rb"
|
43
|
+
require "tufy/fields/account/build_shared_by_field.rb"
|
44
|
+
require "tufy/fields/account/build_unbilled_balance_field.rb"
|
45
|
+
require "tufy/fields/account/build_user_id_field.rb"
|
46
|
+
require "tufy/fields/address/build_address_1_field.rb"
|
47
|
+
require "tufy/fields/address/build_address_2_field.rb"
|
48
|
+
require "tufy/fields/address/build_address_type_field.rb"
|
49
|
+
require "tufy/fields/contact_number/build_contact_number_field.rb"
|
50
|
+
require "tufy/fields/contact_number/build_contact_number_format_field.rb"
|
51
|
+
require "tufy/fields/email_address/build_email_address_field.rb"
|
52
|
+
require "tufy/fields/id/build_id_number_field.rb"
|
53
|
+
require "tufy/fields/id/build_id_type_field.rb"
|
54
|
+
require "tufy/fields/name/build_ac_holder_type_field.rb"
|
55
|
+
require "tufy/fields/name/build_civil_status_field.rb"
|
56
|
+
require "tufy/fields/name/build_date_of_birth_field.rb"
|
57
|
+
require "tufy/fields/name/build_first_name_field.rb"
|
58
|
+
require "tufy/fields/name/build_gender_field.rb"
|
59
|
+
require "tufy/fields/name/build_last_name_field.rb"
|
21
60
|
|
22
61
|
module Tufy
|
23
62
|
def self.transform_raw_data(raw_data)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tufy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neil Marion dela Cruz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: light-service
|
@@ -104,6 +104,7 @@ files:
|
|
104
104
|
- lib/tufy/build_contact_number_segment.rb
|
105
105
|
- lib/tufy/build_email_address_segment.rb
|
106
106
|
- lib/tufy/build_end_of_subject_segment.rb
|
107
|
+
- lib/tufy/build_field.rb
|
107
108
|
- lib/tufy/build_header_segment.rb
|
108
109
|
- lib/tufy/build_id_segment.rb
|
109
110
|
- lib/tufy/build_name_segment.rb
|
@@ -111,6 +112,46 @@ files:
|
|
111
112
|
- lib/tufy/build_records.rb
|
112
113
|
- lib/tufy/build_segment.rb
|
113
114
|
- lib/tufy/errors/required_data_missing_error.rb
|
115
|
+
- lib/tufy/fields/account/build_account_number_field.rb
|
116
|
+
- lib/tufy/fields/account/build_account_status_field.rb
|
117
|
+
- lib/tufy/fields/account/build_account_type_field.rb
|
118
|
+
- lib/tufy/fields/account/build_cash_advance_balance_field.rb
|
119
|
+
- lib/tufy/fields/account/build_closed_date_field.rb
|
120
|
+
- lib/tufy/fields/account/build_consumer_or_commercial_field.rb
|
121
|
+
- lib/tufy/fields/account/build_credit_limit_or_loan_amount_field.rb
|
122
|
+
- lib/tufy/fields/account/build_currency_code_field.rb
|
123
|
+
- lib/tufy/fields/account/build_expiry_date_field.rb
|
124
|
+
- lib/tufy/fields/account/build_fresh_cash_advance_field.rb
|
125
|
+
- lib/tufy/fields/account/build_installment_amount_field.rb
|
126
|
+
- lib/tufy/fields/account/build_interest_and_fees_field.rb
|
127
|
+
- lib/tufy/fields/account/build_legal_action_field.rb
|
128
|
+
- lib/tufy/fields/account/build_number_of_days_past_due_field.rb
|
129
|
+
- lib/tufy/fields/account/build_number_of_installments_field.rb
|
130
|
+
- lib/tufy/fields/account/build_opened_date_field.rb
|
131
|
+
- lib/tufy/fields/account/build_outstanding_balance_field.rb
|
132
|
+
- lib/tufy/fields/account/build_partial_payment_field.rb
|
133
|
+
- lib/tufy/fields/account/build_past_due_amount_field.rb
|
134
|
+
- lib/tufy/fields/account/build_payment_amount_field.rb
|
135
|
+
- lib/tufy/fields/account/build_payment_frequency_field.rb
|
136
|
+
- lib/tufy/fields/account/build_reported_date_field.rb
|
137
|
+
- lib/tufy/fields/account/build_restructured_account_number_field.rb
|
138
|
+
- lib/tufy/fields/account/build_shared_by_field.rb
|
139
|
+
- lib/tufy/fields/account/build_unbilled_balance_field.rb
|
140
|
+
- lib/tufy/fields/account/build_user_id_field.rb
|
141
|
+
- lib/tufy/fields/address/build_address_1_field.rb
|
142
|
+
- lib/tufy/fields/address/build_address_2_field.rb
|
143
|
+
- lib/tufy/fields/address/build_address_type_field.rb
|
144
|
+
- lib/tufy/fields/contact_number/build_contact_number_field.rb
|
145
|
+
- lib/tufy/fields/contact_number/build_contact_number_format_field.rb
|
146
|
+
- lib/tufy/fields/email_address/build_email_address_field.rb
|
147
|
+
- lib/tufy/fields/id/build_id_number_field.rb
|
148
|
+
- lib/tufy/fields/id/build_id_type_field.rb
|
149
|
+
- lib/tufy/fields/name/build_ac_holder_type_field.rb
|
150
|
+
- lib/tufy/fields/name/build_civil_status_field.rb
|
151
|
+
- lib/tufy/fields/name/build_date_of_birth_field.rb
|
152
|
+
- lib/tufy/fields/name/build_first_name_field.rb
|
153
|
+
- lib/tufy/fields/name/build_gender_field.rb
|
154
|
+
- lib/tufy/fields/name/build_last_name_field.rb
|
114
155
|
- lib/tufy/format_strings.rb
|
115
156
|
- lib/tufy/transform_raw_data.rb
|
116
157
|
- lib/tufy/transform_raw_data_array.rb
|