rbedi 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/edi +897 -0
- data/lib/rbedi/codes/aaa.rb +437 -0
- data/lib/rbedi/codes/ak1.rb +278 -0
- data/lib/rbedi/codes/ak2.rb +336 -0
- data/lib/rbedi/codes/ak9.rb +55 -0
- data/lib/rbedi/codes/bht.rb +706 -0
- data/lib/rbedi/codes/codeset.rb +27 -0
- data/lib/rbedi/codes/dmg.rb +1583 -0
- data/lib/rbedi/codes/dtp.rb +1342 -0
- data/lib/rbedi/codes/eb.rb +1511 -0
- data/lib/rbedi/codes/eq.rb +286 -0
- data/lib/rbedi/codes/ge.rb +14 -0
- data/lib/rbedi/codes/gs.rb +287 -0
- data/lib/rbedi/codes/hl.rb +273 -0
- data/lib/rbedi/codes/iea.rb +14 -0
- data/lib/rbedi/codes/ik3.rb +32 -0
- data/lib/rbedi/codes/ik4.rb +37 -0
- data/lib/rbedi/codes/ik5.rb +56 -0
- data/lib/rbedi/codes/isa.rb +137 -0
- data/lib/rbedi/codes/le.rb +13 -0
- data/lib/rbedi/codes/ls.rb +13 -0
- data/lib/rbedi/codes/msg.rb +25 -0
- data/lib/rbedi/codes/n3.rb +14 -0
- data/lib/rbedi/codes/n4.rb +706 -0
- data/lib/rbedi/codes/nm1.rb +1916 -0
- data/lib/rbedi/codes/per.rb +308 -0
- data/lib/rbedi/codes/ref.rb +1749 -0
- data/lib/rbedi/codes/se.rb +14 -0
- data/lib/rbedi/codes/segment_names.rb +44 -0
- data/lib/rbedi/codes/st.rb +336 -0
- data/lib/rbedi/codes/trn.rb +22 -0
- data/lib/rbedi/codes.rb +8 -0
- data/lib/rbedi/edi_date_time.rb +69 -0
- data/lib/rbedi/functional_group.rb +52 -0
- data/lib/rbedi/non_existent_element_error.rb +4 -0
- data/lib/rbedi/parser.rb +102 -0
- data/lib/rbedi/segment.rb +114 -0
- data/lib/rbedi/transaction_envelope.rb +77 -0
- data/lib/rbedi/transaction_set.rb +40 -0
- data/lib/rbedi.rb +20 -4
- metadata +79 -10
@@ -0,0 +1,55 @@
|
|
1
|
+
module RBEDI
|
2
|
+
module Codes
|
3
|
+
module AK9
|
4
|
+
extend CodeSet
|
5
|
+
|
6
|
+
SEGMENT_POSITIONS = {
|
7
|
+
1 => :functional_group_acknowledgement_code,
|
8
|
+
2 => :included_transaction_sets_count,
|
9
|
+
3 => :received_transaction_sets_count,
|
10
|
+
4 => :accepted_transaction_sets_count,
|
11
|
+
5 => :functional_group_syntax_error_code_1,
|
12
|
+
6 => :functional_group_syntax_error_code_2,
|
13
|
+
7 => :functional_group_syntax_error_code_3,
|
14
|
+
8 => :functional_group_syntax_error_code_4,
|
15
|
+
9 => :functional_group_syntax_error_code_5,
|
16
|
+
}
|
17
|
+
|
18
|
+
CODES = {
|
19
|
+
1 => {
|
20
|
+
"a" => :accepted,
|
21
|
+
"e" => :accepted_but_errors_were_noted,
|
22
|
+
"m" => :rejected_message_authentication_code_mac_failed,
|
23
|
+
"p" => :partially_accepted_at_least_one_transaction_set_was_rejected,
|
24
|
+
"r" => :rejected,
|
25
|
+
"w" => :rejected_assurance_failed_validity_tests,
|
26
|
+
"x" => :rejected_content_after_decryption_could_not_be_analyzed,
|
27
|
+
},
|
28
|
+
5 => {
|
29
|
+
"1" => :functional_group_not_supported,
|
30
|
+
"2" => :functional_group_version_not_supported,
|
31
|
+
"3" => :functional_group_trailer_missing,
|
32
|
+
"4" => :group_control_number_in_the_functional_group_header_and_trailer_do_not_agree,
|
33
|
+
"5" => :number_of_included_transaction_sets_does_not_match_actual_count,
|
34
|
+
"6" => :group_control_number_violates_syntax,
|
35
|
+
"10" => :authentication_key_name_unknown,
|
36
|
+
"11" => :encryption_key_name_unknown,
|
37
|
+
"12" => :requested_service_authentication_or_encryption_not_available,
|
38
|
+
"13" => :unknown_security_recipient,
|
39
|
+
"14" => :unknown_security_originator,
|
40
|
+
"15" => :syntax_error_in_decrypted_text,
|
41
|
+
"16" => :security_not_supported,
|
42
|
+
"17" => :incorrect_message_length_encryption_only,
|
43
|
+
"18" => :message_authentication_code_failed,
|
44
|
+
"19" => :functional_group_control_number_not_unique_within_interchange,
|
45
|
+
"23" => :s3e_security_end_segment_missing_for_s3s_security_start_segment,
|
46
|
+
"24" => :s3s_security_start_segment_missing_for_s3e_end_segment,
|
47
|
+
"25" => :s4e_security_end_segment_missing_for_s4s_security_start_segment,
|
48
|
+
"26" => :s4s_security_start_segment_missing_for_s4e_security_end_segment,
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
CODES[6], CODES[7], CODES[8], CODES[9] = [CODES[5]]*4
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|