eddy 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (309) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +103 -37
  3. data/.solargraph.yml +4 -0
  4. data/.vscode/settings.json +17 -0
  5. data/.yardopts +2 -2
  6. data/CHANGELOG.md +50 -0
  7. data/Gemfile.lock +21 -7
  8. data/README.md +32 -3
  9. data/Rakefile +1 -10
  10. data/data/004010/code-lists/100.tsv +164 -0
  11. data/data/004010/code-lists/156.tsv +52 -0
  12. data/data/004010/code-lists/26.tsv +499 -0
  13. data/data/004010/code-lists/etc/100-fancy-definitions.tsv +164 -0
  14. data/data/004010/code-lists/etc/100-with-funds-codes.tsv +180 -0
  15. data/data/004010/code-lists/etc/26-alpha2.tsv +250 -0
  16. data/data/004010/code-lists/etc/26-alpha3.tsv +250 -0
  17. data/data/004010/elements-short.tsv +1405 -0
  18. data/data/004010/elements.tsv +3 -3
  19. data/data/004010/segments.tsv +1009 -1003
  20. data/data/004010/segments/ack.segment.yml +15 -0
  21. data/data/004010/segments/bak.segment.yml +9 -0
  22. data/data/004010/segments/beg.segment.yml +17 -0
  23. data/data/004010/segments/big.segment.yml +10 -0
  24. data/data/004010/segments/bsn.segment.yml +10 -0
  25. data/data/004010/segments/cad.segment.yml +14 -0
  26. data/data/004010/segments/ctp.segment.yml +19 -0
  27. data/data/004010/segments/ctt.segment.yml +13 -0
  28. data/data/004010/segments/dtm.segment.yml +7 -0
  29. data/data/004010/segments/envelope/ge.segment.yml +7 -0
  30. data/data/004010/segments/envelope/gs.segment.yml +13 -0
  31. data/data/004010/segments/envelope/iea.segment.yml +8 -0
  32. data/data/004010/segments/envelope/isa.segment.yml +22 -0
  33. data/data/004010/segments/envelope/se.segment.yml +7 -0
  34. data/data/004010/segments/envelope/st.segment.yml +12 -0
  35. data/data/004010/segments/hl.segment.yml +9 -0
  36. data/data/004010/segments/it1.segment.yml +20 -0
  37. data/data/004010/segments/lin.segment.yml +10 -0
  38. data/data/004010/segments/loop/hl.segment.yml +8 -0
  39. data/data/004010/segments/man.segment.yml +7 -0
  40. data/data/004010/segments/n1.segment.yml +9 -0
  41. data/data/004010/segments/n2.segment.yml +7 -0
  42. data/data/004010/segments/n3.segment.yml +6 -0
  43. data/data/004010/segments/n4.segment.yml +9 -0
  44. data/data/004010/segments/pid.segment.yml +10 -0
  45. data/data/004010/segments/po1.segment.yml +14 -0
  46. data/data/004010/segments/prf.segment.yml +9 -0
  47. data/data/004010/segments/ref.segment.yml +7 -0
  48. data/data/004010/segments/sac.segment.yml +20 -0
  49. data/data/004010/segments/sln.segment.yml +12 -0
  50. data/data/004010/segments/sn1.segment.yml +11 -0
  51. data/data/004010/segments/td1.segment.yml +13 -0
  52. data/data/004010/segments/td5.segment.yml +11 -0
  53. data/data/004010/segments/tds.segment.yml +10 -0
  54. data/data/schema/element_summary.json +60 -0
  55. data/data/schema/loop_summary.json +49 -0
  56. data/data/schema/segment_summary.json +66 -0
  57. data/data/schema/src/element_summary.schema.yml +73 -0
  58. data/data/schema/src/loop_summary.schema.yml +50 -0
  59. data/data/schema/src/segment_summary.schema.yml +59 -0
  60. data/data/schema/src/transaction_set_summary.schema.yml +27 -0
  61. data/data/schema/transaction_set_summary.json +33 -0
  62. data/data/sources.md +114 -145
  63. data/eddy.gemspec +6 -3
  64. data/exe/eddy +14 -0
  65. data/lib/definitions/elements/generated/1005.hierarchical_structure_code.rb +98 -0
  66. data/lib/definitions/elements/generated/1019.invoice_type_code.rb +40 -0
  67. data/lib/definitions/elements/generated/103.packaging_code.rb +29 -0
  68. data/lib/definitions/elements/generated/1166.contract_type_code.rb +87 -0
  69. data/lib/definitions/elements/generated/1232.purchase_category.rb +53 -0
  70. data/lib/definitions/elements/generated/127.reference_identification.rb +29 -0
  71. data/lib/definitions/elements/generated/128.reference_identification_qualifier.rb +1540 -0
  72. data/lib/definitions/elements/generated/1300.service_promotion_allowance_or_charge_code.rb +1090 -0
  73. data/lib/definitions/elements/generated/1301.agency_service_promotion_allowance_or_charge_code.rb +29 -0
  74. data/lib/definitions/elements/generated/133.routing_sequence_code.rb +60 -0
  75. data/lib/definitions/elements/generated/166.address_information.rb +29 -0
  76. data/lib/definitions/elements/generated/183.volume.rb +29 -0
  77. data/lib/definitions/elements/generated/187.weight_qualifier.rb +88 -0
  78. data/lib/definitions/elements/generated/19.city_name.rb +29 -0
  79. data/lib/definitions/elements/generated/206.equipment_initial.rb +29 -0
  80. data/lib/definitions/elements/generated/207.equipment_number.rb +29 -0
  81. data/lib/definitions/elements/generated/212.unit_price.rb +29 -0
  82. data/lib/definitions/elements/generated/22.commodity_code.rb +29 -0
  83. data/lib/definitions/elements/generated/23.commodity_code_qualifier.rb +60 -0
  84. data/lib/definitions/elements/generated/234.product_service_id.rb +29 -0
  85. data/lib/definitions/elements/generated/235.product_service_id_qualifier.rb +514 -0
  86. data/lib/definitions/elements/generated/236.price_identifier_code.rb +201 -0
  87. data/lib/definitions/elements/generated/248.allowance_or_charge_indicator.rb +44 -0
  88. data/lib/definitions/elements/generated/26.country_code.rb +535 -0
  89. data/lib/definitions/elements/generated/284.service_level_code.rb +103 -0
  90. data/lib/definitions/elements/generated/324.purchase_order_number.rb +29 -0
  91. data/lib/definitions/elements/generated/326.request_reference_number.rb +29 -0
  92. data/lib/definitions/elements/generated/327.change_order_sequence_number.rb +29 -0
  93. data/lib/definitions/elements/generated/328.release_number.rb +29 -0
  94. data/lib/definitions/elements/generated/330.quantity_ordered.rb +29 -0
  95. data/lib/definitions/elements/generated/347.hash_total.rb +29 -0
  96. data/lib/definitions/elements/generated/349.item_description_type.rb +40 -0
  97. data/lib/definitions/elements/generated/352.description.rb +29 -0
  98. data/lib/definitions/elements/generated/353.transaction_set_purpose_code.rb +102 -0
  99. data/lib/definitions/elements/generated/354.number_of_line_items.rb +30 -0
  100. data/lib/definitions/elements/generated/355.unit_or_basis_for_measurement_code.rb +831 -0
  101. data/lib/definitions/elements/generated/358.quantity_invoiced.rb +29 -0
  102. data/lib/definitions/elements/generated/367.contract_number.rb +29 -0
  103. data/lib/definitions/elements/generated/368.shipment_order_status_code.rb +139 -0
  104. data/lib/definitions/elements/generated/374.date_time_qualifier.rb +1149 -0
  105. data/lib/definitions/elements/generated/380.quantity.rb +29 -0
  106. data/lib/definitions/elements/generated/382.number_of_units_shipped.rb +29 -0
  107. data/lib/definitions/elements/generated/387.routing.rb +29 -0
  108. data/lib/definitions/elements/generated/396.shipment_identification.rb +29 -0
  109. data/lib/definitions/elements/generated/559.agency_qualifier_code.rb +213 -0
  110. data/lib/definitions/elements/generated/587.acknowledgment_type.rb +52 -0
  111. data/lib/definitions/elements/generated/610.amount.rb +30 -0
  112. data/lib/definitions/elements/generated/639.basis_of_unit_price_code.rb +128 -0
  113. data/lib/definitions/elements/generated/640.transaction_type_code.rb +483 -0
  114. data/lib/definitions/elements/generated/646.quantity_shipped_to_date.rb +29 -0
  115. data/lib/definitions/elements/generated/648.price_multiplier_qualifier.rb +43 -0
  116. data/lib/definitions/elements/generated/649.multiplier.rb +29 -0
  117. data/lib/definitions/elements/generated/66.identification_code_qualifier.rb +252 -0
  118. data/lib/definitions/elements/generated/662.relationship_code.rb +42 -0
  119. data/lib/definitions/elements/generated/668.line_item_status_code.rb +63 -0
  120. data/lib/definitions/elements/generated/67.identification_code.rb +29 -0
  121. data/lib/definitions/elements/generated/687.class_of_trade_code.rb +89 -0
  122. data/lib/definitions/elements/generated/750.product_process_characteristic_code.rb +254 -0
  123. data/lib/definitions/elements/generated/751.product_description_code.rb +29 -0
  124. data/lib/definitions/elements/generated/76.invoice_number.rb +29 -0
  125. data/lib/definitions/elements/generated/782.monetary_amount.rb +29 -0
  126. data/lib/definitions/elements/generated/786.security_level_code.rb +54 -0
  127. data/lib/definitions/elements/generated/79.lading_description.rb +29 -0
  128. data/lib/definitions/elements/generated/80.lading_quantity.rb +30 -0
  129. data/lib/definitions/elements/generated/87.marks_and_numbers.rb +29 -0
  130. data/lib/definitions/elements/generated/88.marks_and_numbers_qualifier.rb +57 -0
  131. data/lib/definitions/elements/generated/91.transportation_method_type_code.rb +108 -0
  132. data/lib/definitions/elements/generated/92.purchase_order_type_code.rb +106 -0
  133. data/lib/definitions/elements/generated/98.entity_identifier_code.rb +1349 -0
  134. data/lib/definitions/elements/manual/116.postal_code.rb +44 -0
  135. data/lib/definitions/elements/manual/124.application_receivers_code.rb +29 -0
  136. data/lib/definitions/elements/manual/140.standard_carrier_alpha_code.rb +211 -0
  137. data/lib/definitions/elements/manual/142.application_senders_code.rb +29 -0
  138. data/lib/definitions/elements/manual/143.transaction_set_identifier_code.rb +335 -0
  139. data/lib/definitions/elements/manual/156.state_or_province_code.rb +92 -0
  140. data/lib/definitions/elements/manual/28.group_control_number.rb +34 -0
  141. data/lib/definitions/elements/manual/329.transactional_set_control_number.rb +35 -0
  142. data/lib/definitions/elements/manual/337.time.rb +30 -0
  143. data/lib/definitions/elements/manual/350.assigned_identification.rb +33 -0
  144. data/lib/definitions/elements/manual/373.date.rb +30 -0
  145. data/lib/definitions/elements/manual/455.responsible_agency_code.rb +43 -0
  146. data/lib/definitions/elements/manual/479.functional_identifier_code.rb +271 -0
  147. data/lib/definitions/elements/manual/480.version_release_industry_identifier_code.rb +145 -0
  148. data/lib/definitions/elements/manual/784.length_of_binary_data.rb +30 -0
  149. data/lib/definitions/elements/manual/785.binary_data.rb +30 -0
  150. data/lib/definitions/elements/manual/96.number_of_included_segments.rb +30 -0
  151. data/lib/definitions/elements/manual/97.number_of_transaction_sets_included.rb +30 -0
  152. data/lib/definitions/elements/manual/hl/628.hierarchical_id_number.rb +29 -0
  153. data/lib/definitions/elements/manual/hl/734.hierarchical_parent_id_number.rb +29 -0
  154. data/lib/definitions/elements/manual/hl/735.hierarchical_level_code.rb +207 -0
  155. data/lib/definitions/elements/manual/hl/736.hierarchical_child_code.rb +39 -0
  156. data/lib/definitions/elements/manual/i/I01.authorization_information_qualifier.rb +48 -0
  157. data/lib/definitions/elements/manual/i/I02.authorization_information.rb +33 -0
  158. data/lib/definitions/elements/manual/i/I03.security_information_qualifier.rb +43 -0
  159. data/lib/definitions/elements/manual/i/I04.security_information.rb +33 -0
  160. data/lib/definitions/elements/manual/i/I05.interchange_id_qualifier.rb +75 -0
  161. data/lib/definitions/elements/manual/i/I06.interchange_sender_id.rb +29 -0
  162. data/lib/definitions/elements/manual/i/I07.interchange_receiver_id.rb +29 -0
  163. data/lib/definitions/elements/manual/i/I08.interchange_date.rb +35 -0
  164. data/lib/definitions/elements/manual/i/I09.interchange_time.rb +36 -0
  165. data/lib/definitions/elements/manual/i/I10.interchange_control_standards_identifier.rb +42 -0
  166. data/lib/definitions/elements/manual/i/I11.interchange_control_version_number.rb +55 -0
  167. data/lib/definitions/elements/manual/i/I12.interchange_control_number.rb +34 -0
  168. data/lib/definitions/elements/manual/i/I13.acknowledgment_requested.rb +43 -0
  169. data/lib/definitions/elements/manual/i/I14.usage_indicator.rb +40 -0
  170. data/lib/definitions/elements/manual/i/I15.component_element_separator.rb +36 -0
  171. data/lib/definitions/elements/manual/i/I16.number_of_included_functional_groups.rb +30 -0
  172. data/lib/definitions/elements/manual/misc/81.weight.rb +29 -0
  173. data/lib/definitions/elements/manual/misc/93.name.rb +29 -0
  174. data/lib/definitions/segments/generated/ack.rb +192 -0
  175. data/lib/definitions/segments/generated/bak.rb +90 -0
  176. data/lib/definitions/segments/generated/beg.rb +226 -0
  177. data/lib/definitions/segments/generated/big.rb +107 -0
  178. data/lib/definitions/segments/generated/bsn.rb +107 -0
  179. data/lib/definitions/segments/generated/cad.rb +175 -0
  180. data/lib/definitions/segments/generated/ctp.rb +158 -0
  181. data/lib/definitions/segments/generated/ctt.rb +141 -0
  182. data/lib/definitions/segments/generated/dtm.rb +56 -0
  183. data/lib/definitions/segments/generated/it1.rb +277 -0
  184. data/lib/definitions/segments/generated/lin.rb +107 -0
  185. data/lib/definitions/segments/generated/man.rb +56 -0
  186. data/lib/definitions/segments/generated/n1.rb +90 -0
  187. data/lib/definitions/segments/generated/n3.rb +39 -0
  188. data/lib/definitions/segments/generated/n4.rb +90 -0
  189. data/lib/definitions/segments/generated/pid.rb +107 -0
  190. data/lib/definitions/segments/generated/po1.rb +175 -0
  191. data/lib/definitions/segments/generated/prf.rb +90 -0
  192. data/lib/definitions/segments/generated/ref.rb +56 -0
  193. data/lib/definitions/segments/generated/sac.rb +107 -0
  194. data/lib/definitions/segments/generated/sln.rb +141 -0
  195. data/lib/definitions/segments/generated/sn1.rb +124 -0
  196. data/lib/definitions/segments/generated/td1.rb +158 -0
  197. data/lib/definitions/segments/generated/td5.rb +107 -0
  198. data/lib/definitions/segments/generated/tds.rb +39 -0
  199. data/lib/definitions/segments/manual/envelopes/ge.rb +53 -0
  200. data/lib/definitions/segments/manual/envelopes/gs.rb +163 -0
  201. data/lib/definitions/segments/manual/envelopes/iea.rb +53 -0
  202. data/lib/definitions/segments/manual/envelopes/isa.rb +295 -0
  203. data/lib/definitions/segments/manual/envelopes/se.rb +52 -0
  204. data/lib/definitions/segments/manual/envelopes/st.rb +52 -0
  205. data/lib/definitions/segments/manual/hl.rb +96 -0
  206. data/lib/definitions/segments/manual/n2.rb +52 -0
  207. data/lib/definitions/transaction_sets/manual/810/810.rb +143 -0
  208. data/lib/definitions/transaction_sets/manual/810/loops.rb +109 -0
  209. data/lib/definitions/transaction_sets/manual/850/850.rb +92 -0
  210. data/lib/definitions/transaction_sets/manual/850/loops.rb +58 -0
  211. data/lib/definitions/transaction_sets/manual/855/855.rb +83 -0
  212. data/lib/definitions/transaction_sets/manual/855/loops.rb +104 -0
  213. data/lib/definitions/transaction_sets/manual/856/856.rb +83 -0
  214. data/lib/definitions/transaction_sets/manual/856/loops.rb +155 -0
  215. data/lib/eddy.rb +29 -7
  216. data/lib/eddy/build/build.rb +47 -0
  217. data/lib/eddy/build/elements/element.rb +67 -0
  218. data/lib/eddy/build/elements/elements.rb +46 -0
  219. data/lib/eddy/build/elements/id.rb +55 -0
  220. data/lib/eddy/build/elements/n.rb +48 -0
  221. data/lib/eddy/build/loop_builder.rb +93 -0
  222. data/lib/eddy/build/segment_builder.rb +169 -0
  223. data/lib/eddy/build/transaction_set_builder.rb +218 -0
  224. data/lib/eddy/cli/cli.rb +39 -0
  225. data/lib/eddy/config.rb +51 -0
  226. data/lib/eddy/data.rb +50 -0
  227. data/lib/eddy/data/persistence/active_record.rb +10 -0
  228. data/lib/eddy/data/persistence/base.rb +47 -0
  229. data/lib/eddy/data/persistence/file.rb +50 -0
  230. data/lib/eddy/data/persistence/memory.rb +65 -0
  231. data/lib/eddy/data/store.rb +108 -0
  232. data/lib/eddy/errors.rb +112 -0
  233. data/lib/eddy/models/element.rb +14 -0
  234. data/lib/eddy/models/element/an.rb +55 -0
  235. data/lib/eddy/models/element/b.rb +53 -0
  236. data/lib/eddy/models/element/base.rb +116 -0
  237. data/lib/eddy/models/element/composite.rb +6 -0
  238. data/lib/eddy/models/element/dt.rb +100 -0
  239. data/lib/eddy/models/element/id.rb +58 -0
  240. data/lib/eddy/models/element/n.rb +94 -0
  241. data/lib/eddy/models/element/r.rb +84 -0
  242. data/lib/eddy/models/element/tm.rb +113 -0
  243. data/lib/eddy/models/loop.rb +74 -0
  244. data/lib/eddy/models/segment.rb +35 -0
  245. data/lib/eddy/models/transaction_set.rb +101 -0
  246. data/lib/eddy/parse.rb +58 -0
  247. data/lib/eddy/schema/element_summary.rb +123 -0
  248. data/lib/eddy/schema/loop_summary.rb +101 -0
  249. data/lib/eddy/schema/segment_summary.rb +116 -0
  250. data/lib/eddy/schema/transaction_set_summary.rb +96 -0
  251. data/lib/eddy/schema/validate.rb +41 -0
  252. data/lib/eddy/util.rb +16 -0
  253. data/lib/eddy/util/clean_folder.rb +14 -0
  254. data/lib/eddy/util/edi_data.rb +153 -0
  255. data/lib/eddy/util/new_number.rb +24 -0
  256. data/lib/eddy/util/normalize.rb +51 -0
  257. data/lib/eddy/util/paths.rb +19 -0
  258. data/lib/eddy/util/read.rb +38 -0
  259. data/lib/eddy/util/time.rb +56 -0
  260. data/lib/eddy/util/timestamp.rb +12 -0
  261. data/lib/eddy/util/trim.rb +29 -0
  262. data/lib/eddy/version.rb +1 -1
  263. data/lib/eddy/write/functional_group.rb +33 -0
  264. data/lib/eddy/write/interchange.rb +28 -0
  265. data/lib/eddy/write/simple_interchange.rb +57 -0
  266. data/lib/generators/eddy/initializer/initializer_generator.rb +17 -0
  267. data/lib/generators/eddy/initializer/templates/eddy.rb.erb +6 -0
  268. data/lib/generators/eddy/migration/migration_generator.rb +53 -0
  269. data/lib/generators/eddy/migration/templates/migration.rb.erb +35 -0
  270. data/tasks/build.rake +15 -0
  271. data/tasks/misc/gemspec.rake +12 -0
  272. data/tasks/misc/missing_lists.rake +240 -0
  273. data/tasks/misc/yaml2json.rake +20 -0
  274. data/todo.txt +16 -0
  275. metadata +297 -42
  276. data/data/004010/segments/ISA.tsv +0 -17
  277. data/data/schema.jsonc +0 -67
  278. data/lib/eddy/build/build_an.rb +0 -31
  279. data/lib/eddy/build/build_dt.rb +0 -46
  280. data/lib/eddy/build/build_elements.rb +0 -181
  281. data/lib/eddy/build/build_id.rb +0 -56
  282. data/lib/eddy/build/build_r_and_n.rb +0 -69
  283. data/lib/eddy/build/build_tm.rb +0 -52
  284. data/lib/eddy/build/segments.rb +0 -25
  285. data/lib/eddy/definitions/manual/elements/109.dt.pickup_date.rb +0 -20
  286. data/lib/eddy/definitions/manual/elements/111.tm.pickup_time.rb +0 -20
  287. data/lib/eddy/definitions/manual/elements/112.an.pier_name.rb +0 -19
  288. data/lib/eddy/definitions/manual/elements/785.b.binary_data.rb +0 -19
  289. data/lib/eddy/definitions/manual/elements/81.r.weight.rb +0 -19
  290. data/lib/eddy/definitions/manual/elements/86.n0.total_equipment.rb +0 -20
  291. data/lib/eddy/definitions/manual/elements/I02.authorization_information.rb +0 -20
  292. data/lib/eddy/definitions/manual/elements/I04.security_information.rb +0 -20
  293. data/lib/eddy/definitions/manual/elements/I08.interchange_date.rb +0 -20
  294. data/lib/eddy/definitions/manual/elements/I09.interchange_time.rb +0 -20
  295. data/lib/eddy/definitions/manual/elements/I15.component_element_separator.rb +0 -32
  296. data/lib/eddy/definitions/manual/segments/n1.rb +0 -14
  297. data/lib/eddy/element.rb +0 -14
  298. data/lib/eddy/element/an.rb +0 -36
  299. data/lib/eddy/element/b.rb +0 -9
  300. data/lib/eddy/element/base.rb +0 -37
  301. data/lib/eddy/element/dt.rb +0 -89
  302. data/lib/eddy/element/id.rb +0 -40
  303. data/lib/eddy/element/n.rb +0 -43
  304. data/lib/eddy/element/r.rb +0 -47
  305. data/lib/eddy/element/tm.rb +0 -108
  306. data/lib/eddy/error.rb +0 -14
  307. data/lib/eddy/helpers.rb +0 -31
  308. data/lib/eddy/segment.rb +0 -12
  309. data/lib/eddy/transaction_set.rb +0 -35
@@ -0,0 +1,92 @@
1
+ module Eddy
2
+ module Elements
3
+ # ### Element Summary:
4
+ #
5
+ # - Id: 156
6
+ # - Name: State or Province Code
7
+ # - Type: ID
8
+ # - Min/Max: 2/2
9
+ # - Description: Code (Standard State/Province) as defined by appropriate government agency.
10
+ #
11
+ # ### Notes:
12
+ #
13
+ # - FIXME: Currently only accepts states in the USA.
14
+ class E156 < Eddy::Element::ID
15
+
16
+ # @param val [String] (nil)
17
+ # @param req [String] (nil)
18
+ # @param ref [String] (nil)
19
+ # @return [void]
20
+ def initialize(val: nil, req: nil, ref: nil)
21
+ @id = "156"
22
+ @name = "State or Province Code"
23
+ @description = "(Standard State/Province) as defined by appropriate government agency."
24
+ super(
25
+ min: 2,
26
+ max: 2,
27
+ req: req,
28
+ ref: ref,
29
+ val: val,
30
+ )
31
+ end
32
+
33
+ # @return [Array<String>]
34
+ def code_list()
35
+ return [
36
+ "AL",
37
+ "AK",
38
+ "AZ",
39
+ "AR",
40
+ "CA",
41
+ "CO",
42
+ "CT",
43
+ "DE",
44
+ "DC",
45
+ "FL",
46
+ "GA",
47
+ "HI",
48
+ "ID",
49
+ "IL",
50
+ "IN",
51
+ "IA",
52
+ "KS",
53
+ "KY",
54
+ "LA",
55
+ "ME",
56
+ "MD",
57
+ "MA",
58
+ "MI",
59
+ "MN",
60
+ "MS",
61
+ "MO",
62
+ "MT",
63
+ "NE",
64
+ "NV",
65
+ "NH",
66
+ "NJ",
67
+ "NM",
68
+ "NY",
69
+ "NC",
70
+ "ND",
71
+ "OH",
72
+ "OK",
73
+ "OR",
74
+ "PA",
75
+ "RI",
76
+ "SC",
77
+ "SD",
78
+ "TN",
79
+ "TX",
80
+ "UT",
81
+ "VT",
82
+ "VA",
83
+ "WA",
84
+ "WV",
85
+ "WI",
86
+ "WY",
87
+ ]
88
+ end
89
+
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,34 @@
1
+ module Eddy
2
+ module Elements
3
+ # ### Element Summary:
4
+ #
5
+ # - Id: 28
6
+ # - Name: Group Control Number
7
+ # - Type: N0
8
+ # - Min/Max: 1/9
9
+ # - Description: Assigned number originated and maintained by the sender
10
+ #
11
+ # ### Notes:
12
+ #
13
+ # - Values for this element need to be generated and have their uniqueness ensured.
14
+ class E28 < Eddy::Element::N
15
+ # @param val [Integer] (nil)
16
+ # @param req [String] (nil)
17
+ # @param ref [String] (nil)
18
+ # @return [void]
19
+ def initialize(val: nil, req: nil, ref: nil)
20
+ @id = "28"
21
+ @name = "Group Control Number"
22
+ @description = "Assigned number originated and maintained by the sender"
23
+ super(
24
+ min: 1,
25
+ max: 9,
26
+ req: req,
27
+ ref: ref,
28
+ val: val,
29
+ decimals: 0,
30
+ )
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,35 @@
1
+ module Eddy
2
+ module Elements
3
+ # ### Element Summary:
4
+ #
5
+ # - Id: 329
6
+ # - Name: Transaction Set Control Number
7
+ # - Type: AN
8
+ # - Min/Max: 4/9
9
+ # - Description: Identifying control number that must be unique within the transaction set functional group assigned by the originator for a transaction set
10
+ #
11
+ # ### Notes:
12
+ #
13
+ # - Values for this element need to be generated and have their uniqueness ensured.
14
+ # - This element inherits from {Eddy::Element::N}, even though it is technically an `AN`.
15
+ class E329 < Eddy::Element::N
16
+ # @param val [String] (nil)
17
+ # @param req [String] (nil)
18
+ # @param ref [String] (nil)
19
+ # @return [void]
20
+ def initialize(val: nil, req: nil, ref: nil)
21
+ @id = "329"
22
+ @name = "Transaction Set Control Number"
23
+ @description = "Identifying control number that must be unique within the transaction set functional group assigned by the originator for a transaction set"
24
+ super(
25
+ min: 4,
26
+ max: 9,
27
+ req: req,
28
+ ref: ref,
29
+ val: val,
30
+ decimals: 0,
31
+ )
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,30 @@
1
+ module Eddy
2
+ module Elements
3
+ # ### Element Summary:
4
+ #
5
+ # - Id: 337
6
+ # - Name: Time
7
+ # - Type: TM
8
+ # - Min/Max: 4/8
9
+ # - Description: Time expressed in 24-hour clock time as follows: HHMM, or HHMMSS, or HHMMSSD, or HHMMSSDD, where H = hours (00-23), M = minutes (00-59), S = integer seconds (00-59) and DD = decimal seconds; decimal seconds are expressed as follows: D = tenths (0-9) and DD = hundredths (00-99)
10
+ class E337 < Eddy::Element::TM
11
+ # @param val [Time]
12
+ # @param req [String] (nil)
13
+ # @param ref [String] (nil)
14
+ # @return [void]
15
+ def initialize(val: nil, req: nil, ref: nil)
16
+ @id = "337"
17
+ @name = "Time"
18
+ @description = "Time expressed in 24-hour clock time as follows: HHMM, or HHMMSS, or HHMMSSD, or HHMMSSDD, where H = hours (00-23), M = minutes (00-59), S = integer seconds (00-59) and DD = decimal seconds; decimal seconds are expressed as follows: D = tenths (0-9) and DD = hundredths (00-99)"
19
+ self.fmt = :hhmmssdd
20
+ super(
21
+ min: 4,
22
+ max: 8,
23
+ req: req,
24
+ ref: ref,
25
+ val: val,
26
+ )
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,33 @@
1
+ module Eddy
2
+ module Elements
3
+ # ### Element Summary:
4
+ #
5
+ # - Id: 350
6
+ # - Name: Assigned Identification
7
+ # - Type: AN
8
+ # - Min/Max: 1/20
9
+ # - Description: Alphanumeric characters assigned for differentiation within a transaction set
10
+ #
11
+ # ### Notes:
12
+ #
13
+ # - These don't nessecarily need to be generated.
14
+ class E350 < Eddy::Element::AN
15
+ # @param val [String] (nil)
16
+ # @param req [String] (nil)
17
+ # @param ref [String] (nil)
18
+ # @return [void]
19
+ def initialize(val: nil, req: nil, ref: nil)
20
+ @id = "350"
21
+ @name = "Assigned Identification"
22
+ @description = "Alphanumeric characters assigned for differentiation within a transaction set"
23
+ super(
24
+ min: 1,
25
+ max: 20,
26
+ req: req,
27
+ ref: ref,
28
+ val: val,
29
+ )
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,30 @@
1
+ module Eddy
2
+ module Elements
3
+ # ### Element Summary:
4
+ #
5
+ # - Id: 373
6
+ # - Name: Date
7
+ # - Type: DT
8
+ # - Min/Max: 8/8
9
+ # - Description: Date expressed as CCYYMMDD
10
+ class E373 < Eddy::Element::DT
11
+ # @param val [Time] (nil)
12
+ # @param req [String] (nil)
13
+ # @param ref [String] (nil)
14
+ # @return [void]
15
+ def initialize(val: nil, req: nil, ref: nil)
16
+ @id = "373"
17
+ @name = "Date"
18
+ @description = "Date expressed as CCYYMMDD"
19
+ self.fmt = :ccyymmdd
20
+ super(
21
+ min: 8,
22
+ max: 8,
23
+ req: req,
24
+ ref: ref,
25
+ val: val,
26
+ )
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,43 @@
1
+ module Eddy
2
+ module Elements
3
+ # ### Element Summary:
4
+ #
5
+ # - Id: 455
6
+ # - Name: Responsible Agency Code
7
+ # - Type: ID
8
+ # - Min/Max: 1/2
9
+ # - Description: Code used in conjunction with Data Element 480 to identify the issuer of the standard
10
+ #
11
+ # ### Notes:
12
+ #
13
+ # - Default value: `"X"`
14
+ class E455 < Eddy::Element::ID
15
+
16
+ # @param val [String] ("X")
17
+ # @param req [String] (nil)
18
+ # @param ref [String] (nil)
19
+ # @return [void]
20
+ def initialize(val: "X", req: nil, ref: nil)
21
+ @id = "455"
22
+ @name = "Responsible Agency Code"
23
+ @description = "Code used in conjunction with Data Element 480 to identify the issuer of the standard"
24
+ super(
25
+ min: 1,
26
+ max: 2,
27
+ req: req,
28
+ ref: ref,
29
+ val: val,
30
+ )
31
+ end
32
+
33
+ # @return [Array<String>]
34
+ def code_list()
35
+ return [
36
+ "T", # Transportation Data Coordinating Committee (TDCC)
37
+ "X", # Accredited Standards Committee X12
38
+ ]
39
+ end
40
+
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,271 @@
1
+ module Eddy
2
+ module Elements
3
+ # ### Element Summary:
4
+ #
5
+ # - Id: 479
6
+ # - Name: Functional Identifier Code
7
+ # - Type: ID
8
+ # - Min/Max: 2/2
9
+ # - Description: (Functional Group) Code identifying a group of application related transaction sets
10
+ class E479 < Eddy::Element::ID
11
+
12
+ # @param val [String]
13
+ # @param req [String] (nil)
14
+ # @param ref [String] (nil)
15
+ # @return [void]
16
+ def initialize(val: nil, req: nil, ref: nil)
17
+ @id = "479"
18
+ @name = "Functional Identifier Code"
19
+ @description = "(Functional Group) Code identifying a group of application related transaction sets"
20
+ super(
21
+ min: 2,
22
+ max: 2,
23
+ req: req,
24
+ ref: ref,
25
+ val: val,
26
+ )
27
+ end
28
+
29
+ # @return [Array<String>]
30
+ def code_list()
31
+ return [
32
+ "AA", # Account Analysis (822)
33
+ "AB", # Logistics Service Request (219)
34
+ "AD", # Individual Life, Annuity and Disability Application (267)
35
+ "AF", # Application for Admission to Educational Institutions (189)
36
+ "AG", # Application Advice (824)
37
+ "AH", # Logistics Service Response (220)
38
+ "AI", # Automotive Inspection Detail (928)
39
+ "AK", # Student Educational Record (Transcript) Acknowledgment (131)
40
+ "AL", # Set Cancellation (998) and Application Acceptance/Rejection Advice (499)
41
+ "AN", # Return Merchandise Authorization and Notification (180)
42
+ "AO", # Income or Asset Offset (521)
43
+ "AR", # Warehouse Stock Transfer Shipment Advice (943)
44
+ "AS", # Transportation Appointment Schedule Information (163)
45
+ "AT", # Animal Toxicological Data (249)
46
+ "AW", # Warehouse Inventory Adjustment Advice (947)
47
+ "BC", # Business Credit Report (155)
48
+ "BE", # Benefit Enrollment and Maintenance (834)
49
+ "BF", # Business Entity Filings (105)
50
+ "BL", # Motor Carrier Bill of Lading (211)
51
+ "BS", # Shipment and Billing Notice (857)
52
+ "CA", # Purchase Order Change Acknowledgment/Request - Seller Initiated (865)
53
+ "CB", # Unemployment Insurance Tax Claim or Charge Information (153)
54
+ "CC", # Clauses and Provisions (504)
55
+ "CD", # Credit/Debit Adjustment (812)
56
+ "CE", # Cartage Work Assignment (222)
57
+ "CF", # Corporate Financial Adjustment Information (844 and 849)
58
+ "CG", # Administrative Message (994)
59
+ "CH", # Car Handling Information (420)
60
+ "CI", # Consolidated Service Invoice/Statement (811)
61
+ "CJ", # Manufacturer Coupon Family Code Structure (877)
62
+ "CK", # Manufacturer Coupon Redemption Detail (881)
63
+ "CM", # Component Parts Content (871)
64
+ "CN", # Coupon Notification (887)
65
+ "CO", # Cooperative Advertising Agreements (290)
66
+ "CP", # Electronic Proposal Information (251, 805)
67
+ "CR", # Rail Carhire Settlements (414)
68
+ "CS", # Cryptographic Service Message (815)
69
+ "CT", # Application Control Totals (831)
70
+ "CV", # Commercial Vehicle Safety and Credentials Information Exchange (285)
71
+ "D3", # Contract Completion Status (567)
72
+ "D4", # Contract Abstract (561)
73
+ "D5", # Contract Payment Management Report (568)
74
+ "DA", # Debit Authorization (828)
75
+ "DD", # Shipment Delivery Discrepancy Information (854)
76
+ "DF", # Market Development Fund Allocation (883)
77
+ "DI", # Dealer Information (128)
78
+ "DM", # Shipper's Car Order (422)
79
+ "DS", # Data Status Tracking (242)
80
+ "DX", # Direct Exchange Delivery and Return Information (894, 895)
81
+ "EC", # Educational Course Inventory (188)
82
+ "ED", # Student Educational Record (Transcript) (130)
83
+ "EI", # Railroad Equipment Inquiry or Advice (456)
84
+ "ER", # Revenue Receipts Statement (170)
85
+ "ES", # Notice of Employment Status (540)
86
+ "EV", # Railroad Event Report (451)
87
+ "EX", # Excavation Communication (620)
88
+ "FA", # Functional Acknowledgment (997)
89
+ "FB", # Freight Invoice (859)
90
+ "FC", # Court and Law Enforcement Information (175, 176)
91
+ "FG", # Motor Carrier Loading and Route Guide (217)
92
+ "FH", # Motor Carrier Tariff Information (218)
93
+ "FR", # Financial Reporting (821, 827)
94
+ "FT", # File Transfer (996)
95
+ "GB", # Average Agreement Demurrage (423)
96
+ "GC", # Damage Claim Transaction Sets (920, 924, 925, 926)
97
+ "GE", # General Request, Response or Confirmation (814)
98
+ "GF", # Response to a Load Tender (990)
99
+ "GL", # Intermodal Group Loading Plan (715)
100
+ "GP", # Grocery Products Invoice (880)
101
+ "GR", # Statistical Government Information (152)
102
+ "GT", # Grant or Assistance Application (194)
103
+ "HB", # Eligibility, Coverage or Benefit Information (271)
104
+ "HC", # Health Care Claim (837)
105
+ "HI", # Health Care Services Review Information (278)
106
+ "HN", # Health Care Claim Status Notification (277)
107
+ "HP", # Health Care Claim Payment/Advice (835)
108
+ "HR", # Health Care Claim Status Request (276)
109
+ "HS", # Eligibility, Coverage or Benefit Inquiry (270)
110
+ "IA", # Air Freight Details and Invoice (110, 980)
111
+ "IB", # Inventory Inquiry/Advice (846)
112
+ "IC", # Rail Advance Interchange Consist (418)
113
+ "ID", # Insurance/Annuity Application Status (273)
114
+ "IE", # Insurance Producer Administration (252)
115
+ "IG", # Direct Store Delivery Summary Information (882)
116
+ "II", # Rail Freight Details and Invoice Summary (411)
117
+ "IJ", # Report of Injury, Illness or Incident (148)
118
+ "IM", # Motor Carrier Freight Details and Invoice (210, 980)
119
+ "IN", # Invoice Information (810,819)
120
+ "IO", # Ocean Shipment Billing Details (310, 312, 980)
121
+ "IP", # Intermodal Ramp Activity (622)
122
+ "IR", # Rail Carrier Freight Details and Invoice (410, 980)
123
+ "IS", # Estimated Time of Arrival and Car Scheduling (421)
124
+ "KM", # Commercial Vehicle Credentials (286)
125
+ "LA", # Federal Communications Commission (FCC) License Application (195)
126
+ "LB", # Lockbox (823)
127
+ "LI", # Locomotive Information (436)
128
+ "LN", # Property and Casualty Loss Notification (272)
129
+ "LR", # Logistics Reassignment (536)
130
+ "LS", # Asset Schedule (851)
131
+ "LT", # Student Loan Transfer and Status Verification (144)
132
+ "MA", # Motor Carrier Summary Freight Bill Manifest (224)
133
+ "MC", # Request for Motor Carrier Rate Proposal (107)
134
+ "MD", # Department of Defense Inventory Management (527)
135
+ "ME", # Mortgage Origination (198, 200, 201, 261, 262, 263, 833, 872)
136
+ "MF", # Market Development Funds Settlement (884)
137
+ "MG", # Mortgage Servicing Transaction Sets (203, 206, 260, 264, 266)
138
+ "MH", # Motor Carrier Rate Proposal (106)
139
+ "MI", # Motor Carrier Shipment Status Inquiry (213)
140
+ "MJ", # Secondary Mortgage Market Loan Delivery (202)
141
+ "MK", # Response to a Motor Carrier Rate Proposal (108)
142
+ "MM", # Medical Event Reporting (500)
143
+ "MN", # Mortgage Note (205)
144
+ "MO", # Maintenance Service Order (650)
145
+ "MP", # Motion Picture Booking Confirmation (159)
146
+ "MQ", # Consolidators Freight Bill and Invoice (223)
147
+ "MR", # Multilevel Railcar Load Details (125)
148
+ "MS", # Material Safety Data Sheet (848)
149
+ "MT", # Electronic Form Structure (868)
150
+ "MV", # Material Obligation Validation (517)
151
+ "MW", # Rail Waybill Response (427)
152
+ "MX", # Material Claim (847)
153
+ "MY", # Response to a Cartage Work Assignment (225)
154
+ "NC", # Nonconformance Report (842)
155
+ "NL", # Name and Address Lists (101)
156
+ "NP", # Notice of Power of Attorney (157)
157
+ "NT", # Notice of Tax Adjustment or Assessment (149)
158
+ "OC", # Cargo Insurance Advice of Shipment (362)
159
+ "OG", # Order Group - Grocery (875, 876)
160
+ "OR", # Organizational Relationships (816)
161
+ "OW", # Warehouse Shipping Order (940)
162
+ "PA", # Price Authorization Acknowledgment/Status (845)
163
+ "PB", # Railroad Parameter Trace Registration (455)
164
+ "PC", # Purchase Order Change Request - Buyer Initiated (860)
165
+ "PD", # Product Activity Data (852)
166
+ "PE", # Periodic Compensation (256)
167
+ "PF", # Annuity Activity (268)
168
+ "PG", # Insurance Plan Description (100)
169
+ "PH", # Pricing History (503)
170
+ "PI", # Patient Information (275)
171
+ "PJ", # Project Schedule Reporting (806)
172
+ "PK", # Project Cost Reporting (839) and Contractor Cost Data Reporting (196)
173
+ "PL", # Railroad Problem Log Inquiry or Advice (452)
174
+ "PN", # Product Source Information (244)
175
+ "PO", # Purchase Order (850)
176
+ "PQ", # Property Damage Report (112)
177
+ "PR", # Purchase Order Acknowledgement (855)
178
+ "PS", # Planning Schedule with Release Capability (830)
179
+ "PT", # Product Transfer and Resale Report (867)
180
+ "PU", # Motor Carrier Shipment Pick-up Notification (216)
181
+ "PV", # Purchase Order Shipment Management Document (250)
182
+ "PY", # Payment Cancellation Request (829)
183
+ "QG", # Product Information (878, 879, 888, 889, 893, 896)
184
+ "QM", # Transportation Carrier Shipment Status Message (214)
185
+ "QO", # Ocean Shipment Status Information (313, 315)
186
+ "RA", # Payment Order/Remittance Advice (820)
187
+ "RB", # Railroad Clearance (470)
188
+ "RC", # Receiving Advice/Acceptance Certificate (861)
189
+ "RD", # Royalty Regulatory Report (185)
190
+ "RE", # Warehouse Stock Receipt Advice (944)
191
+ "RH", # Railroad Reciprocal Switch File (433)
192
+ "RI", # Routing and Carrier Instruction (853)
193
+ "RJ", # Railroad Mark Register Update Activity (434)
194
+ "RK", # Standard Transportation Commodity Code Master (435)
195
+ "RL", # Rail Industrial Switch List (423)
196
+ "RM", # Railroad Station Master File (431)
197
+ "RN", # Requisition Transaction (511)
198
+ "RO", # Ocean Booking Information (300, 301,303)
199
+ "RP", # Commission Sales Report (818)
200
+ "RQ", # Request for Quotation (840) and Procurement Notices (836)
201
+ "RR", # Response to Request For Quotation (843)
202
+ "RS", # Order Status Information (869, 870)
203
+ "RT", # Report of Test Results (863)
204
+ "RU", # Railroad Retirement Activity (429)
205
+ "RV", # Railroad Junctions and Interchanges Activity (437)
206
+ "RW", # Rail Revenue Waybill (426)
207
+ "RX", # Rail Deprescription (432)
208
+ "RY", # Request for Student Educational Record (Transcript) (146)
209
+ "RZ", # Response to Request for Student Educational Record (Transcript) (147)
210
+ "SA", # Air Shipment Information (104)
211
+ "SB", # Switch Rails (424)
212
+ "SC", # Price/Sales Catalog (832)
213
+ "SD", # Student Loan Pre-Claims and Claims (191)
214
+ "SE", # Shipper's Export Declaration (601)
215
+ "SG", # SG Receiving Advice - Grocery (885)
216
+ "SH", # Ship Notice/Manifest (856)
217
+ "SI", # Shipment Information (858)
218
+ "SJ", # Transportation Automatic Equipment Identification (160)
219
+ "SL", # Student Loan Application and Guarantee (135, 139)
220
+ "SM", # Motor Carrier Load Tender (204)
221
+ "SN", # Rail Route File Maintenance (475)
222
+ "SO", # Ocean Shipment Information (304, 306, 309, 311, 317, 319, 321, 322, 323, 324, 325, 350, 352, 353, 354, 355, 356, 357, 358, 361)
223
+ "SP", # Specifications/Technical Information (841)
224
+ "SQ", # Production Sequence (866)
225
+ "SR", # Rail Carrier Shipment Information (404, 419)
226
+ "SS", # Shipping Schedule (862)
227
+ "ST", # Railroad Service Commitment Advice (453)
228
+ "SU", # Account Assignment/Inquiry and Service/Status (248)
229
+ "SV", # Student Enrollment Verification (190)
230
+ "SW", # Warehouse Shipping Advice (945)
231
+ "TA", # Electronic Filing of Tax Return Data Acknowledgment (151)
232
+ "TC", # Court Submission (176)
233
+ "TD", # Trading Partner Profile (838)
234
+ "TF", # Electronic Filing of Tax Return Data (813)
235
+ "TI", # Tax Information Exchange (826)
236
+ "TM", # Motor Carrier Delivery Trailer Manifest (212)
237
+ "TN", # Tax Rate Notification (150)
238
+ "TO", # Real Estate Title Services (197, 199, 265)
239
+ "TP", # Rail Rate Transactions (460, 463, 466, 468, 485, 486, 490, 492, 494)
240
+ "TR", # Train Sheet (161)
241
+ "TS", # Transportation Services Tender (602)
242
+ "TT", # Testing Results Request and Report (138)
243
+ "TX", # Text Message (864)
244
+ "UA", # Retail Account Characteristics (885)
245
+ "UB", # Customer Call Reporting (886)
246
+ "UC", # Uniform Commercial Code Filing (154)
247
+ "UD", # Deduction Research Report (891)
248
+ "UI", # Underwriting Information Services (255)
249
+ "UP", # Motor Carrier Pick-up Manifest (215)
250
+ "UW", # Insurance Underwriting Requirements Reporting (186)
251
+ "VA", # Vehicle Application Advice (126)
252
+ "VB", # Vehicle Baying Order (127)
253
+ "VC", # Vehicle Shipping Order (120)
254
+ "VD", # Vehicle Damage (124)
255
+ "VE", # Vessel Content Details (109)
256
+ "VH", # Vehicle Carrier Rate Update (129)
257
+ "VI", # Voter Registration Information (280)
258
+ "VS", # Vehicle Service (121)
259
+ "WA", # Product Service Transaction Sets (140, 141, 142, 143)
260
+ "WB", # Rail Carrier Waybill Interchange (417)
261
+ "WG", # Vendor Performance Review (501)
262
+ "WI", # Wage Determination (288)
263
+ "WL", # Well Information (625)
264
+ "WR", # Shipment Weights (440)
265
+ "WT", # Rail Waybill Request (425)
266
+ ]
267
+ end
268
+
269
+ end
270
+ end
271
+ end