edi4r-tdid 0.6.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (200) hide show
  1. data/AuthorCopyright +10 -0
  2. data/COPYING +56 -0
  3. data/ChangeLog +43 -0
  4. data/FileDescription +278 -0
  5. data/LICENAGR.UNTDID +58 -0
  6. data/MSG_ISSUES +46 -0
  7. data/README +48 -0
  8. data/TO-DO +27 -0
  9. data/VERSION +1 -0
  10. data/data/edifact/untdid/EDCD.1901.csv +82 -0
  11. data/data/edifact/untdid/EDCD.1902.csv +82 -0
  12. data/data/edifact/untdid/EDCD.1911.csv +104 -0
  13. data/data/edifact/untdid/EDCD.1921.csv +121 -0
  14. data/data/edifact/untdid/EDCD.2932.csv +102 -0
  15. data/data/edifact/untdid/EDCD.d00a.csv +200 -0
  16. data/data/edifact/untdid/EDCD.d00b.csv +200 -0
  17. data/data/edifact/untdid/EDCD.d01a.csv +200 -0
  18. data/data/edifact/untdid/EDCD.d01b.csv +200 -0
  19. data/data/edifact/untdid/EDCD.d01c.csv +200 -0
  20. data/data/edifact/untdid/EDCD.d02a.csv +200 -0
  21. data/data/edifact/untdid/EDCD.d02b.csv +198 -0
  22. data/data/edifact/untdid/EDCD.d03a.csv +198 -0
  23. data/data/edifact/untdid/EDCD.d03b.csv +198 -0
  24. data/data/edifact/untdid/EDCD.d04a.csv +198 -0
  25. data/data/edifact/untdid/EDCD.d04b.csv +198 -0
  26. data/data/edifact/untdid/EDCD.d05a.csv +198 -0
  27. data/data/edifact/untdid/EDCD.d05b.csv +197 -0
  28. data/data/edifact/untdid/EDCD.d93a.csv +121 -0
  29. data/data/edifact/untdid/EDCD.d94a.csv +124 -0
  30. data/data/edifact/untdid/EDCD.d94b.csv +125 -0
  31. data/data/edifact/untdid/EDCD.d95a.csv +145 -0
  32. data/data/edifact/untdid/EDCD.d95b.csv +160 -0
  33. data/data/edifact/untdid/EDCD.d96a.csv +161 -0
  34. data/data/edifact/untdid/EDCD.d96b.csv +174 -0
  35. data/data/edifact/untdid/EDCD.d97a.csv +174 -0
  36. data/data/edifact/untdid/EDCD.d97b.csv +176 -0
  37. data/data/edifact/untdid/EDCD.d98a.csv +179 -0
  38. data/data/edifact/untdid/EDCD.d98b.csv +186 -0
  39. data/data/edifact/untdid/EDCD.d99a.csv +187 -0
  40. data/data/edifact/untdid/EDCD.d99b.csv +194 -0
  41. data/data/edifact/untdid/EDCD.s93a.csv +121 -0
  42. data/data/edifact/untdid/EDED.1901.csv +220 -0
  43. data/data/edifact/untdid/EDED.1902.csv +220 -0
  44. data/data/edifact/untdid/EDED.1911.csv +299 -0
  45. data/data/edifact/untdid/EDED.1921.csv +344 -0
  46. data/data/edifact/untdid/EDED.2932.csv +291 -0
  47. data/data/edifact/untdid/EDED.d00a.csv +640 -0
  48. data/data/edifact/untdid/EDED.d00b.csv +644 -0
  49. data/data/edifact/untdid/EDED.d01a.csv +644 -0
  50. data/data/edifact/untdid/EDED.d01b.csv +641 -0
  51. data/data/edifact/untdid/EDED.d01c.csv +643 -0
  52. data/data/edifact/untdid/EDED.d02a.csv +643 -0
  53. data/data/edifact/untdid/EDED.d02b.csv +643 -0
  54. data/data/edifact/untdid/EDED.d03a.csv +648 -0
  55. data/data/edifact/untdid/EDED.d03b.csv +648 -0
  56. data/data/edifact/untdid/EDED.d04a.csv +650 -0
  57. data/data/edifact/untdid/EDED.d04b.csv +650 -0
  58. data/data/edifact/untdid/EDED.d05a.csv +650 -0
  59. data/data/edifact/untdid/EDED.d05b.csv +649 -0
  60. data/data/edifact/untdid/EDED.d93a.csv +344 -0
  61. data/data/edifact/untdid/EDED.d94a.csv +356 -0
  62. data/data/edifact/untdid/EDED.d94b.csv +362 -0
  63. data/data/edifact/untdid/EDED.d95a.csv +405 -0
  64. data/data/edifact/untdid/EDED.d95b.csv +459 -0
  65. data/data/edifact/untdid/EDED.d96a.csv +462 -0
  66. data/data/edifact/untdid/EDED.d96b.csv +496 -0
  67. data/data/edifact/untdid/EDED.d97a.csv +535 -0
  68. data/data/edifact/untdid/EDED.d97b.csv +547 -0
  69. data/data/edifact/untdid/EDED.d98a.csv +553 -0
  70. data/data/edifact/untdid/EDED.d98b.csv +582 -0
  71. data/data/edifact/untdid/EDED.d99a.csv +593 -0
  72. data/data/edifact/untdid/EDED.d99b.csv +622 -0
  73. data/data/edifact/untdid/EDED.s93a.csv +344 -0
  74. data/data/edifact/untdid/EDMD.1901.csv +276 -0
  75. data/data/edifact/untdid/EDMD.1902.csv +276 -0
  76. data/data/edifact/untdid/EDMD.1911.csv +905 -0
  77. data/data/edifact/untdid/EDMD.1921.csv +1239 -0
  78. data/data/edifact/untdid/EDMD.2932.csv +626 -0
  79. data/data/edifact/untdid/EDMD.d00a.csv +3259 -0
  80. data/data/edifact/untdid/EDMD.d00b.csv +3357 -0
  81. data/data/edifact/untdid/EDMD.d01a.csv +3417 -0
  82. data/data/edifact/untdid/EDMD.d01b.csv +3419 -0
  83. data/data/edifact/untdid/EDMD.d01c.csv +3428 -0
  84. data/data/edifact/untdid/EDMD.d02a.csv +3428 -0
  85. data/data/edifact/untdid/EDMD.d02b.csv +3429 -0
  86. data/data/edifact/untdid/EDMD.d03a.csv +3420 -0
  87. data/data/edifact/untdid/EDMD.d03b.csv +3421 -0
  88. data/data/edifact/untdid/EDMD.d04a.csv +3423 -0
  89. data/data/edifact/untdid/EDMD.d04b.csv +3423 -0
  90. data/data/edifact/untdid/EDMD.d05a.csv +3446 -0
  91. data/data/edifact/untdid/EDMD.d05b.csv +3447 -0
  92. data/data/edifact/untdid/EDMD.d93a.csv +1302 -0
  93. data/data/edifact/untdid/EDMD.d94a.csv +1419 -0
  94. data/data/edifact/untdid/EDMD.d94b.csv +1511 -0
  95. data/data/edifact/untdid/EDMD.d95a.csv +1752 -0
  96. data/data/edifact/untdid/EDMD.d95b.csv +1956 -0
  97. data/data/edifact/untdid/EDMD.d96a.csv +2144 -0
  98. data/data/edifact/untdid/EDMD.d96b.csv +2342 -0
  99. data/data/edifact/untdid/EDMD.d97a.csv +2417 -0
  100. data/data/edifact/untdid/EDMD.d97b.csv +2565 -0
  101. data/data/edifact/untdid/EDMD.d98a.csv +2671 -0
  102. data/data/edifact/untdid/EDMD.d98b.csv +2803 -0
  103. data/data/edifact/untdid/EDMD.d99a.csv +2896 -0
  104. data/data/edifact/untdid/EDMD.d99b.csv +3150 -0
  105. data/data/edifact/untdid/EDMD.s93a.csv +1054 -0
  106. data/data/edifact/untdid/EDSD.1901.csv +59 -0
  107. data/data/edifact/untdid/EDSD.1902.csv +59 -0
  108. data/data/edifact/untdid/EDSD.1911.csv +78 -0
  109. data/data/edifact/untdid/EDSD.1921.csv +89 -0
  110. data/data/edifact/untdid/EDSD.2932.csv +75 -0
  111. data/data/edifact/untdid/EDSD.d00a.csv +157 -0
  112. data/data/edifact/untdid/EDSD.d00b.csv +158 -0
  113. data/data/edifact/untdid/EDSD.d01a.csv +158 -0
  114. data/data/edifact/untdid/EDSD.d01b.csv +158 -0
  115. data/data/edifact/untdid/EDSD.d01c.csv +158 -0
  116. data/data/edifact/untdid/EDSD.d02a.csv +158 -0
  117. data/data/edifact/untdid/EDSD.d02b.csv +155 -0
  118. data/data/edifact/untdid/EDSD.d03a.csv +155 -0
  119. data/data/edifact/untdid/EDSD.d03b.csv +155 -0
  120. data/data/edifact/untdid/EDSD.d04a.csv +156 -0
  121. data/data/edifact/untdid/EDSD.d04b.csv +156 -0
  122. data/data/edifact/untdid/EDSD.d05a.csv +156 -0
  123. data/data/edifact/untdid/EDSD.d05b.csv +156 -0
  124. data/data/edifact/untdid/EDSD.d93a.csv +89 -0
  125. data/data/edifact/untdid/EDSD.d94a.csv +93 -0
  126. data/data/edifact/untdid/EDSD.d94b.csv +95 -0
  127. data/data/edifact/untdid/EDSD.d95a.csv +109 -0
  128. data/data/edifact/untdid/EDSD.d95b.csv +126 -0
  129. data/data/edifact/untdid/EDSD.d96a.csv +127 -0
  130. data/data/edifact/untdid/EDSD.d96b.csv +136 -0
  131. data/data/edifact/untdid/EDSD.d97a.csv +136 -0
  132. data/data/edifact/untdid/EDSD.d97b.csv +138 -0
  133. data/data/edifact/untdid/EDSD.d98a.csv +138 -0
  134. data/data/edifact/untdid/EDSD.d98b.csv +146 -0
  135. data/data/edifact/untdid/EDSD.d99a.csv +148 -0
  136. data/data/edifact/untdid/EDSD.d99b.csv +152 -0
  137. data/data/edifact/untdid/EDSD.s93a.csv +89 -0
  138. data/data/edifact/untdid/IDCD.d00a.csv +93 -0
  139. data/data/edifact/untdid/IDCD.d00b.csv +96 -0
  140. data/data/edifact/untdid/IDCD.d01a.csv +95 -0
  141. data/data/edifact/untdid/IDCD.d01b.csv +95 -0
  142. data/data/edifact/untdid/IDCD.d01c.csv +96 -0
  143. data/data/edifact/untdid/IDCD.d02a.csv +96 -0
  144. data/data/edifact/untdid/IDCD.d02b.csv +96 -0
  145. data/data/edifact/untdid/IDCD.d03a.csv +96 -0
  146. data/data/edifact/untdid/IDCD.d03b.csv +96 -0
  147. data/data/edifact/untdid/IDCD.d04a.csv +96 -0
  148. data/data/edifact/untdid/IDCD.d04b.csv +96 -0
  149. data/data/edifact/untdid/IDCD.d05a.csv +96 -0
  150. data/data/edifact/untdid/IDCD.d05b.csv +96 -0
  151. data/data/edifact/untdid/IDCD.d97a.csv +57 -0
  152. data/data/edifact/untdid/IDCD.d97b.csv +64 -0
  153. data/data/edifact/untdid/IDCD.d98a.csv +65 -0
  154. data/data/edifact/untdid/IDCD.d98b.csv +67 -0
  155. data/data/edifact/untdid/IDCD.d99a.csv +73 -0
  156. data/data/edifact/untdid/IDCD.d99b.csv +87 -0
  157. data/data/edifact/untdid/IDMD.d00a.csv +132 -0
  158. data/data/edifact/untdid/IDMD.d00b.csv +236 -0
  159. data/data/edifact/untdid/IDMD.d01a.csv +237 -0
  160. data/data/edifact/untdid/IDMD.d01b.csv +238 -0
  161. data/data/edifact/untdid/IDMD.d01c.csv +243 -0
  162. data/data/edifact/untdid/IDMD.d02a.csv +243 -0
  163. data/data/edifact/untdid/IDMD.d02b.csv +243 -0
  164. data/data/edifact/untdid/IDMD.d03a.csv +243 -0
  165. data/data/edifact/untdid/IDMD.d03b.csv +243 -0
  166. data/data/edifact/untdid/IDMD.d04a.csv +243 -0
  167. data/data/edifact/untdid/IDMD.d04b.csv +243 -0
  168. data/data/edifact/untdid/IDMD.d05a.csv +243 -0
  169. data/data/edifact/untdid/IDMD.d05b.csv +243 -0
  170. data/data/edifact/untdid/IDMD.d97a.csv +41 -0
  171. data/data/edifact/untdid/IDMD.d97b.csv +70 -0
  172. data/data/edifact/untdid/IDMD.d98a.csv +70 -0
  173. data/data/edifact/untdid/IDMD.d98b.csv +70 -0
  174. data/data/edifact/untdid/IDMD.d99a.csv +112 -0
  175. data/data/edifact/untdid/IDMD.d99b.csv +122 -0
  176. data/data/edifact/untdid/IDSD.d00a.csv +72 -0
  177. data/data/edifact/untdid/IDSD.d00b.csv +76 -0
  178. data/data/edifact/untdid/IDSD.d01a.csv +75 -0
  179. data/data/edifact/untdid/IDSD.d01b.csv +75 -0
  180. data/data/edifact/untdid/IDSD.d01c.csv +77 -0
  181. data/data/edifact/untdid/IDSD.d02a.csv +77 -0
  182. data/data/edifact/untdid/IDSD.d02b.csv +77 -0
  183. data/data/edifact/untdid/IDSD.d03a.csv +77 -0
  184. data/data/edifact/untdid/IDSD.d03b.csv +77 -0
  185. data/data/edifact/untdid/IDSD.d04a.csv +77 -0
  186. data/data/edifact/untdid/IDSD.d04b.csv +77 -0
  187. data/data/edifact/untdid/IDSD.d05a.csv +77 -0
  188. data/data/edifact/untdid/IDSD.d05b.csv +77 -0
  189. data/data/edifact/untdid/IDSD.d97a.csv +33 -0
  190. data/data/edifact/untdid/IDSD.d97b.csv +42 -0
  191. data/data/edifact/untdid/IDSD.d98a.csv +43 -0
  192. data/data/edifact/untdid/IDSD.d98b.csv +44 -0
  193. data/data/edifact/untdid/IDSD.d99a.csv +52 -0
  194. data/data/edifact/untdid/IDSD.d99b.csv +63 -0
  195. data/lib/edi4r-tdid.rb +52 -0
  196. data/test/dirlist +32 -0
  197. data/test/dirlist_iedi +19 -0
  198. data/test/test_diags.rb +160 -0
  199. data/test/test_segments.rb +109 -0
  200. metadata +249 -0
@@ -0,0 +1,52 @@
1
+ AAI;ACCOMMODATION ALLOCATION INFORMATION;010;E997;M;20;
2
+ ADS;ADDRESS;010;E817;C;1;020;E001;C;1;030;3164;C;1;040;3251;C;1;050;3207;C;1;060;E819;C;1;070;E517;C;1;
3
+ ALS;ADDITIONAL LOCATION INFORMATION;010;3227;M;1;020;E975;M;99;
4
+ APD;ADDITIONAL TRANSPORT DETAILS;010;E961;C;1;020;E962;C;2;030;E963;C;1;040;E964;C;1;050;E965;C;10;
5
+ ASD;SERVICE DETAILS;010;E959;M;9;
6
+ ATI;TOUR INFORMATION;010;E993;C;1;020;E994;C;99;
7
+ ATR;ATTRIBUTE;010;9017;M;1;020;E003;M;1;
8
+ CLT;CLEAR TERMINATE INFORMATION;010;1229;M;1;020;1225;C;2;030;4440;C;1;
9
+ CMN;COMMISSION INFORMATION;010;E002;M;9;
10
+ CNX;CONNECTION DETAILS;010;E999;C;9;
11
+ CON;CONTACT INFORMATION;010;E966;C;20;
12
+ CRI;CONSUMER REFERENCE INFORMATION;010;E967;M;20;
13
+ CUR;CURRENCIES;010;E504;C;1;020;E504;C;1;030;5402;C;1;040;6341;C;1;
14
+ DAV;DAILY AVAILABILITY;010;7037;M;1;020;E009;M;31;
15
+ DIS;DISCOUNT INFORMATION;010;E998;M;20;
16
+ DTI;DATE AND TIME INFORMATION;010;E013;M;9;020;E014;C;99;
17
+ ERI;APPLICATION ERROR INFORMATION;010;E901;M;1;
18
+ FTI;FREQUENT TRAVELLER INFORMATION;010;E970;M;9;
19
+ HDI;HARDWARE DEVICE INFORMATION;010;3148;C;1;020;3413;C;1;030;1511;C;1;040;E003;C;9;
20
+ ICI;INSURANCE COVER INFORMATION;010;E016;M;1;020;E017;C;5;
21
+ IFT;INTERACTIVE FREE TEXT;010;E971;C;1;020;4440;C;99;
22
+ ITD;INFORMATION TYPE DATA;010;9601;C;1;020;3453;C;1;030;9603;C;10;040;1503;C;1;
23
+ ITM;ITEM NUMBER;010;E212;M;99;
24
+ LKP;LEVEL INDICATION;010;E778;M;1;
25
+ MOV;CAR DELIVERY INSTRUCTION;010;E995;C;1;020;6350;C;1;030;3453;C;1;
26
+ MSD;MESSAGE ACTION DETAILS;010;E972;C;1;020;4343;C;5;
27
+ NAM;PARTY NAME;010;3035;M;1;020;E206;C;1;030;E082;C;1;040;3403;C;1;050;3397;C;1;060;E816;C;5;
28
+ NME;NAME;010;E012;M;9;
29
+ NUN;NUMBER OF UNITS;010;E523;M;9;
30
+ ODI;ORIGIN AND DESTINATION DETAILS;010;3225;C;2;
31
+ ODS;ADDITIONAL PRODUCT DETAILS;010;9605;M;1;020;E015;M;999;
32
+ ORG;ORIGINATOR OF REQUEST DETAILS;010;E973;C;1;020;E974;C;1;030;E975;C;1;040;3036;C;1;050;3457;C;1;060;E976;C;1;070;3503;C;1;
33
+ PDT;PRODUCT INFORMATION;010;7133;C;1;020;E996;C;26;
34
+ PLI;PRODUCT LOCATION INFORMATION;010;E008;M;99;
35
+ PMT;PAYMENT INFORMATION;010;E977;C;99;020;E978;C;10;
36
+ PRD;PRODUCT IDENTIFICATION;010;E989;C;9;020;3036;C;6;
37
+ PRE;PRICE DETAILS;010;E018;C;20;020;5213;C;1;
38
+ PRO;PROMOTIONS;010;E019;M;20;
39
+ RCI;RESERVATION CONTROL INFORMATION;010;E979;C;99;
40
+ RPI;QUANTITY AND ACTION DETAILS;010;E958;M;9;
41
+ RTC;RATE TYPES;010;5263;M;99;
42
+ RTI;RATE DETAILS;010;E011;M;99;
43
+ RUL;RULE INFORMATION;010;E004;C;99;020;E005;C;9;030;E006;C;9;
44
+ SDT;SELECTION DETAILS;010;E010;M;99;
45
+ SSR;SPECIAL REQUIREMENT DETAILS;010;E980;M;1;020;E981;C;999;
46
+ TDI;TRAVELLER DOCUMENT INFORMATION;010;E968;M;1;020;E969;C;1;030;3500;C;1;040;3460;C;99;
47
+ TFF;TARIFF INFORMATION;010;E982;C;99;020;E983;C;1;030;E984;C;99;
48
+ TIF;TRAVELLER INFORMATION;010;E985;M;1;020;E986;C;99;
49
+ TRF;TRAFFIC RESTRICTION DETAILS;010;E007;M;5;
50
+ TVL;TRAVEL PRODUCT INFORMATION;010;E987;C;1;020;E975;C;2;030;E988;C;1;040;E989;C;1;050;E990;C;1;060;1082;C;1;070;7365;C;1;
51
+ TXS;TAXES;010;E020;M;99;
52
+ VEH;VEHICLE;010;8053;C;1;020;E991;C;1;030;E211;C;1;040;6314;C;1;050;E992;C;1;060;1145;C;1;
@@ -0,0 +1,63 @@
1
+ AAI;ACCOMMODATION ALLOCATION INFORMATION;010;E997;M;20;
2
+ ADI;HEALTH CARE CLAIM ADJUDICATION INFORMATION;010;E206;M;3;020;E021;C;3;030;1229;C;1;040;E017;C;15;050;6060;C;3;060;E030;C;15;070;9620;C;4;080;5389;C;1;090;E507;C;1;100;9639;C;1;110;5482;C;1;
3
+ ADS;ADDRESS;010;E817;C;1;020;E001;C;1;030;3164;C;1;040;3251;C;1;050;3207;C;1;060;E819;C;1;070;E517;C;1;
4
+ ALS;ADDITIONAL LOCATION INFORMATION;010;3227;M;1;020;E975;M;99;
5
+ APD;ADDITIONAL TRANSPORT DETAILS;010;E961;C;1;020;E962;C;2;030;E963;C;1;040;E964;C;1;050;E965;C;10;
6
+ ASD;SERVICE DETAILS;010;E959;M;9;
7
+ ATI;TOUR INFORMATION;010;E993;C;1;020;E994;C;99;
8
+ ATR;ATTRIBUTE;010;9017;M;1;020;E003;M;1;
9
+ BLI;BILLABLE INFORMATION;010;5004;C;3;020;E029;C;9;030;E507;C;9;040;7402;C;5;050;9607;C;3;060;E028;C;9;
10
+ CLT;CLEAR TERMINATE INFORMATION;010;1229;M;1;020;1225;C;2;030;4440;C;1;
11
+ CMN;COMMISSION INFORMATION;010;E002;M;9;
12
+ CNX;CONNECTION DETAILS;010;E999;C;9;
13
+ CON;CONTACT INFORMATION;010;E966;C;20;
14
+ CRI;CONSUMER REFERENCE INFORMATION;010;E967;M;20;
15
+ CUR;CURRENCIES;010;E504;C;1;020;E504;C;1;030;5402;C;1;040;6341;C;1;
16
+ DAV;DAILY AVAILABILITY;010;7037;M;1;020;E009;M;31;
17
+ DIS;DISCOUNT INFORMATION;010;E998;M;20;
18
+ DNT;DENTAL INFORMATION;010;7402;C;1;020;7383;C;5;030;9647;C;5;040;6060;C;6;050;4405;C;1;
19
+ DTI;DATE AND TIME INFORMATION;010;E013;M;9;020;E014;C;99;
20
+ ERI;APPLICATION ERROR INFORMATION;010;E901;M;1;
21
+ FRM;FOLLOW-UP ACTION;010;7402;M;1;020;9013;M;7;030;1229;C;1;
22
+ FTI;FREQUENT TRAVELLER INFORMATION;010;E970;M;9;
23
+ HDI;HARDWARE DEVICE INFORMATION;010;3148;C;1;020;3413;C;1;030;1511;C;1;040;E003;C;9;
24
+ ICI;INSURANCE COVER INFORMATION;010;E016;M;1;020;E017;C;5;
25
+ IFT;INTERACTIVE FREE TEXT;010;E971;C;1;020;4440;C;99;
26
+ ITC;INSTITUTIONAL CLAIM;010;E027;M;1;020;6060;M;4;030;E026;M;1;040;9447;M;1;050;E025;C;9;
27
+ ITD;INFORMATION TYPE DATA;010;9601;C;1;020;3453;C;1;030;9603;C;10;040;1503;C;1;
28
+ ITM;ITEM NUMBER;010;E212;M;99;
29
+ LKP;LEVEL INDICATION;010;E778;M;1;
30
+ MAP;MESSAGE APPLICATION PRODUCT INFORMATION;010;E022;C;1;020;3036;C;1;030;E031;C;1;
31
+ MOV;CAR DELIVERY INSTRUCTION;010;E995;C;1;020;6350;C;1;030;3453;C;1;
32
+ MSD;MESSAGE ACTION DETAILS;010;E972;C;1;020;4343;C;5;030;E206;C;5;
33
+ NAA;NAME AND ADDRESS;010;3035;M;1;020;E082;C;1;030;3124;C;5;040;E080;C;1;050;3042;C;1;060;3164;C;1;070;3229;C;1;080;3251;C;1;090;3207;C;1;
34
+ NAM;PARTY NAME;010;3035;M;1;020;E206;C;1;030;E082;C;1;040;3403;C;1;050;3397;C;1;060;E816;C;5;
35
+ NME;NAME;010;E012;M;9;
36
+ NUN;NUMBER OF UNITS;010;E523;M;9;
37
+ ODI;ORIGIN AND DESTINATION DETAILS;010;3225;C;2;
38
+ ODS;ADDITIONAL PRODUCT DETAILS;010;9605;M;1;020;E015;M;999;
39
+ ORG;ORIGINATOR OF REQUEST DETAILS;010;E973;C;1;020;E974;C;1;030;E975;C;1;040;3036;C;1;050;3457;C;1;060;E976;C;1;070;3503;C;1;
40
+ OTI;OTHER INSURANCE;010;E206;M;5;020;9645;M;1;030;E507;C;2;040;5267;C;10;050;5004;C;4;060;E030;C;15;070;4497;C;1;080;9143;C;1;090;9607;C;1;
41
+ PDT;PRODUCT INFORMATION;010;7133;C;1;020;E996;C;26;
42
+ PLI;PRODUCT LOCATION INFORMATION;010;E008;M;99;
43
+ PMT;PAYMENT INFORMATION;010;E977;C;99;020;E978;C;10;
44
+ POS;POINT OF SALE INFORMATION;010;E032;C;999;020;E975;C;999;
45
+ PRD;PRODUCT IDENTIFICATION;010;E989;C;9;020;3036;C;6;
46
+ PRE;PRICE DETAILS;010;E018;C;20;020;5213;C;1;
47
+ PRO;PROMOTIONS;010;E019;M;20;
48
+ PRT;PARTY INFORMATION;010;3035;M;1;020;E206;C;9;030;2000;C;3;040;E023;C;1;
49
+ PSI;SERVICE INFORMATION;010;7402;M;4;020;E507;C;5;030;E021;C;1;040;6060;C;2;050;5004;C;5;060;5030;C;4;070;9039;C;1;080;5267;C;1;090;4183;C;9;100;E024;C;1;
50
+ RCI;RESERVATION CONTROL INFORMATION;010;E979;C;99;
51
+ RPI;QUANTITY AND ACTION DETAILS;010;E958;M;9;
52
+ RTC;RATE TYPES;010;5263;M;99;
53
+ RTI;RATE DETAILS;010;E011;M;99;
54
+ RUL;RULE INFORMATION;010;E004;C;99;020;E005;C;9;030;E006;C;9;
55
+ SDT;SELECTION DETAILS;010;E010;M;99;
56
+ SSR;SPECIAL REQUIREMENT DETAILS;010;E980;M;1;020;E981;C;999;
57
+ TDI;TRAVELLER DOCUMENT INFORMATION;010;E968;M;1;020;E969;C;1;030;3500;C;1;040;3460;C;99;
58
+ TFF;TARIFF INFORMATION;010;E982;C;99;020;E983;C;1;030;E984;C;99;
59
+ TIF;TRAVELLER INFORMATION;010;E985;M;1;020;E986;C;99;
60
+ TRF;TRAFFIC RESTRICTION DETAILS;010;E007;M;5;
61
+ TVL;TRAVEL PRODUCT INFORMATION;010;E987;C;1;020;E975;C;2;030;E988;C;1;040;E989;C;1;050;E990;C;1;060;1082;C;1;070;7365;C;1;
62
+ TXS;TAXES;010;E020;M;99;
63
+ VEH;VEHICLE;010;8053;C;1;020;E991;C;1;030;E211;C;1;040;6314;C;1;050;E992;C;1;060;1145;C;1;
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # :main:README
4
+ # :title:edi4r-tdid
5
+ #
6
+ # UN/EDIFACT add-on module: UN/TDIDs - UN Trade Data Interchange directories
7
+ #
8
+ # == Synopsis
9
+ #
10
+ # Prepend this gem's data directory to the global
11
+ # searchpath for "normdatabases" in EDI_NDB_PATH
12
+ #
13
+ # == Usage
14
+ #
15
+ # require_gem 'edi4r-tdid'
16
+ #
17
+ #
18
+ # == Description
19
+ #
20
+ # The edi4r base gem comes with only a few samples of UN/EDIFACT
21
+ # normdata. This add-on provides the full collection of
22
+ # UN Trade Data Interchange Directories (TDIDs), including those
23
+ # distributed with the base gem.
24
+ #
25
+ # We put this gem's data directory in front of the searchpath,
26
+ # because it is usually the most frequently used one.
27
+ #
28
+ # == Environment
29
+ #
30
+ # EDI_NDB_PATH
31
+ #
32
+ # :include:../AuthorCopyright
33
+ #--
34
+ # $Id: edi4r-tdid.rb,v 1.1 2006/08/01 10:56:04 werntges Exp $
35
+ #
36
+
37
+ BEGIN {
38
+
39
+ require 'pathname'
40
+
41
+ # 'realpath' fails on Windows platforms!
42
+ # path_to_add = Pathname.new(__FILE__).dirname.parent.realpath + 'data'
43
+ pdir = Pathname.new(__FILE__).dirname.parent
44
+ path_to_add = File.expand_path(pdir) + File::Separator + 'data'
45
+
46
+ paths = (ENV['EDI_NDB_PATH'] or '').split /#{File::PATH_SEPARATOR}/
47
+ unless paths.include? path_to_add
48
+ paths.unshift path_to_add
49
+ ENV['EDI_NDB_PATH'] = paths.join File::PATH_SEPARATOR
50
+ end
51
+
52
+ }
@@ -0,0 +1,32 @@
1
+ 1:901:UN
2
+ 1:902:UN
3
+ 1:911:UN
4
+ 1:921:UN
5
+ 2:932:UN
6
+ S:93A:UN
7
+ D:93A:UN
8
+ D:94A:UN
9
+ D:94B:UN
10
+ D:95A:UN
11
+ D:95B:UN
12
+ D:96A:UN
13
+ D:96B:UN
14
+ D:97A:UN
15
+ D:97B:UN
16
+ D:98A:UN
17
+ D:98B:UN
18
+ D:99A:UN
19
+ D:99B:UN
20
+ D:00A:UN
21
+ D:00B:UN
22
+ D:01A:UN
23
+ D:01B:UN
24
+ D:01C:UN
25
+ D:02A:UN
26
+ D:02B:UN
27
+ D:03A:UN
28
+ D:03B:UN
29
+ D:04A:UN
30
+ D:04B:UN
31
+ D:05A:UN
32
+ D:05B:UN
@@ -0,0 +1,19 @@
1
+ D:97A:UN
2
+ D:97B:UN
3
+ D:98A:UN
4
+ D:98B:UN
5
+ D:99A:UN
6
+ D:99B:UN
7
+ D:00A:UN
8
+ D:00B:UN
9
+ D:01A:UN
10
+ D:01B:UN
11
+ D:01C:UN
12
+ D:02B:UN
13
+ D:03A:UN
14
+ # D:03A:UN
15
+ D:03B:UN
16
+ D:04A:UN
17
+ D:04B:UN
18
+ D:05A:UN
19
+ D:05B:UN
@@ -0,0 +1,160 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # $Id: test_diags.rb,v 1.1 2006/03/28 16:31:10 werntges Exp werntges $
4
+ #
5
+ # Copyright (c) 2006 Heinz W. Werntges, FH Wiesbaden
6
+ # Licensed under the same terms as Ruby. No warranty provided
7
+
8
+ # Load path magic...
9
+ $:.unshift File.join(File.dirname(__FILE__), '..', '..', 'main', 'lib')
10
+ $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
11
+
12
+ require 'test/unit'
13
+
14
+ require 'edi4r'
15
+ require 'edi4r/edifact'
16
+ require 'edi4r-tdid'
17
+
18
+ class EDIFACT_Tests < Test::Unit::TestCase
19
+
20
+ =begin
21
+ def test_interchange
22
+ puts "Path is: " + ENV['EDI_NDB_PATH']
23
+ ic = nil
24
+ assert_nothing_raised {
25
+ ic = EDI::E::Interchange.new({})
26
+
27
+ msg = ic.new_message({:name=> 'ORDERS',
28
+ :version=> 'S',
29
+ :release=> '93A',
30
+ :resp_agency=> 'UN',
31
+ # :d0057=> @subset,
32
+ })
33
+ seg = msg.new_segment('BGM')
34
+ msg.add seg
35
+ seg.d1004 = '220'
36
+ p seg.names
37
+ seg = msg.new_segment('DTM')
38
+ msg.add seg
39
+ seg.cC507.d2005 = '137'
40
+ p seg.cC507.names
41
+ seg = msg.new_segment('UNS')
42
+ seg.d0081 = 'S'
43
+ msg.add seg
44
+ p seg.names
45
+ ic.add msg
46
+
47
+ print ic
48
+ puts
49
+ }
50
+ assert_nothing_raised {
51
+ ic = EDI::E::Interchange.new({:show_una => false})
52
+ ic.write $stdout
53
+ puts
54
+ }
55
+ assert_equal( '0.9.1', ic.version )
56
+ end
57
+ =end
58
+
59
+
60
+ def test_Diagrams
61
+ puts "Testing all TDID diagrams - this may take a while."
62
+ IO.foreach('dirlist') do |line|
63
+ next if line =~ /^#/
64
+ version, release, agency = line.chomp.split(/:/) # e.g.: D, 96A, UN
65
+
66
+ msglist = {}
67
+ EDI::Dir::Directory.flush_cache # or else you'll run out of memory ...
68
+ EDI::Diagram::Diagram.flush_cache
69
+
70
+ params = {:d0052=>version, :d0054=>release, :d0051=>agency, :is_iedi=>false}
71
+ assert_nothing_raised {
72
+ EDI::Dir::Directory.create('E', params).message_names.each do |name|
73
+ msglist[$1]=true if name =~ /^([A-Z]{6}):/
74
+ end
75
+ }
76
+ puts diag_key = [version, release, agency].join(':')
77
+ msglist.keys.sort.each do |msgname|
78
+ # puts "message #{msgname} in #{diag_key}:"
79
+ params[:d0065] = msgname
80
+ assert_nothing_raised {
81
+ diag = EDI::Diagram::Diagram.create('E', params)
82
+ # diag.each {|node| puts node.name}
83
+ }
84
+ print '.'; $stdout.sync
85
+ end
86
+ puts
87
+ end
88
+ puts "SV4 not used for testing yet!"
89
+ end
90
+
91
+
92
+ def test_Diagrams_I_EDI
93
+ puts "Testing all I-EDI TDID diagrams - this may take a while."
94
+ IO.foreach('dirlist_iedi') do |line|
95
+ next if line =~ /^#/
96
+ version, release, agency = line.chomp.split(/:/) # e.g.: D, 96A, UN
97
+
98
+ msglist = {}
99
+ EDI::Dir::Directory.flush_cache # or else you'll run out of memory ...
100
+ EDI::Diagram::Diagram.flush_cache
101
+
102
+ params = {:d0052=>version, :d0054=>release, :d0051=>agency, :is_iedi=>true}
103
+ assert_nothing_raised {
104
+ EDI::Dir::Directory.create('E', params).message_names.each do |name|
105
+ msglist[$1]=true if name =~ /^([A-Z]{6}):/
106
+ end
107
+ }
108
+ puts diag_key = [version, release, agency].join(':')
109
+ msglist.keys.sort.each do |msgname|
110
+ # puts "message #{msgname} in #{diag_key}:"
111
+ params[:d0065] = msgname
112
+ assert_nothing_raised { EDI::Diagram::Diagram.create('E', params) }
113
+ print '.'; $stdout.sync
114
+ end
115
+ puts
116
+ end
117
+ puts "SV4 not used for testing yet!"
118
+ end
119
+
120
+
121
+ =begin
122
+ # Testing the lower-level DirObjects is probably outdated
123
+ # since we are able to test whole Diagrams.
124
+
125
+ def test_DirObjects
126
+ puts "Path is: " + ENV['EDI_NDB_PATH']
127
+ puts "Testing all TDIDs - this may take a while."
128
+ IO.foreach('dirlist') do |line|
129
+ next if line =~ /^#/
130
+ version, release, agency = line.chomp.split(/:/) # e.g.: D, 96A, UN
131
+
132
+ msglist = {}
133
+ EDI::Dir::DirObject.caching_off # or else you'll run out of memory ...
134
+
135
+ assert_nothing_raised {
136
+ d = EDI::Dir::DirObject.create('E',
137
+ :d0052=>version,
138
+ :d0054=>release,
139
+ :d0051=>agency)
140
+ d.message_names.each {|name| msglist[$1]=true if name =~ /^([A-Z]{6}):/}
141
+ }
142
+ puts [version, release, agency].join(':')
143
+ msglist.keys.each do |msgname|
144
+ assert_nothing_raised {
145
+ d = EDI::Dir::DirObject.create('E',
146
+ :d0065=>msgname,
147
+ :d0052=>version,
148
+ :d0054=>release,
149
+ :d0051=>agency)
150
+ print '.'; $stdout.sync
151
+ # puts msgname +" in #{dir[0]}:#{dir[1]}"
152
+ }
153
+ end
154
+ puts
155
+ end
156
+ puts "I_EDI directories not tested yet!"
157
+ puts "SV4 not used for testing yet!"
158
+ end
159
+ =end
160
+ end
@@ -0,0 +1,109 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # $Id$
4
+ #
5
+ # Copyright (c) 2006 Heinz W. Werntges, FH Wiesbaden
6
+ # Licensed under the same terms as Ruby. No warranty provided
7
+
8
+ # Load path magic...
9
+ $:.unshift File.join(File.dirname(__FILE__), '..', '..', 'main', 'lib')
10
+ $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
11
+
12
+ require 'test/unit'
13
+
14
+ require 'edi4r'
15
+ require 'edi4r/edifact'
16
+ require 'edi4r-tdid'
17
+
18
+ # Are there multiple DE of the same name in a CDE which
19
+ # do not form a sequence?
20
+ # Likewise, are there (C)DE in a segment with the same property?
21
+ #
22
+ def search_for_distant_duplicates( name_list, seg )
23
+ (0...name_list.size-2).each do |i|
24
+ left = name_list[i]
25
+ next if name_list[i+1] == left
26
+ name_list[i+1..-1].each do |right|
27
+ puts "Distant duplicates found: #{left} in #{seg}/#{name_list.join(',')}" if left == right
28
+ end
29
+ end
30
+ end
31
+
32
+ class EDIFACT_2_Tests < Test::Unit::TestCase
33
+
34
+ def test_Messages
35
+ puts "Testing all messages in all TDID diagrams - this may take a while."
36
+
37
+ IO.foreach('dirlist') do |line|
38
+ next if line =~ /^#/
39
+ version, release, agency = line.chomp.split(/:/) # e.g.: D, 96A, UN
40
+
41
+ # SV4 from D.00A on required!
42
+ ic = EDI::E::Interchange.new( :version=> (release[0] == ?0 ? 4 : 3) )
43
+
44
+ msglist = {}
45
+ EDI::Dir::Directory.flush_cache # or you'll run out of memory ...
46
+ EDI::Diagram::Diagram.flush_cache
47
+
48
+ params={:d0052=>version, :d0054=>release, :d0051=>agency,:is_iedi=>false}
49
+ m_params = {:version=>version, :release=>release, :resp_agency=>agency}
50
+ assert_nothing_raised {
51
+ EDI::Dir::Directory.create('E', params).message_names.each do |name|
52
+ msglist[$1]=true if name =~ /^([A-Z]{6}):/
53
+ end
54
+ }
55
+ puts diag_key = [version, release, agency].join(':')
56
+ msglist.keys.sort.each do |msgname|
57
+ # puts "message #{msgname} in #{diag_key}:"
58
+ params[:d0065] = m_params[:msg_type] = msgname
59
+ diag = msg = nil
60
+ assert_nothing_raised {diag = EDI::Diagram::Diagram.create('E',params)}
61
+ assert_nothing_raised {msg = ic.new_message( m_params )}
62
+ assert_nothing_raised do
63
+ diag.each do |node|
64
+ seg = msg.new_segment( node.name )
65
+ names = seg.names
66
+ search_for_distant_duplicates( names, seg.name )
67
+ # seg.each do |cde|
68
+ # next unless cde.is_a? EDI::CDE
69
+ # search_for_distant_duplicates( cde.names, cde.name )
70
+ # end
71
+ end
72
+ end
73
+ print '.'; $stdout.sync
74
+ end
75
+ puts
76
+ end
77
+ puts "SV4 not used for testing yet!"
78
+ end
79
+
80
+ =begin
81
+ def test_Diagrams_I_EDI
82
+ puts "Testing all I-EDI TDID diagrams - this may take a while."
83
+ IO.foreach('dirlist_iedi') do |line|
84
+ next if line =~ /^#/
85
+ version, release, agency = line.chomp.split(/:/) # e.g.: D, 96A, UN
86
+
87
+ msglist = {}
88
+ EDI::Dir::DirObject.flush_cache # or else you'll run out of memory ...
89
+ EDI::Diagram::Diagram.flush_cache
90
+
91
+ params = {:d0052=>version, :d0054=>release, :d0051=>agency, :is_iedi=>true}
92
+ assert_nothing_raised {
93
+ EDI::Dir::Directory.create('E', params).message_names.each do |name|
94
+ msglist[$1]=true if name =~ /^([A-Z]{6}):/
95
+ end
96
+ }
97
+ puts diag_key = [version, release, agency].join(':')
98
+ msglist.keys.sort.each do |msgname|
99
+ # puts "message #{msgname} in #{diag_key}:"
100
+ params[:d0065] = msgname
101
+ assert_nothing_raised { EDI::Diagram::Diagram.create('E', params) }
102
+ print '.'; $stdout.sync
103
+ end
104
+ puts
105
+ end
106
+ puts "SV4 not used for testing yet!"
107
+ end
108
+ =end
109
+ end