eddy 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,15 @@
1
+ ---
2
+ id: ACK
3
+ name: Line Item Acknowledgement
4
+ purpose: To acknowledge the ordered quantities and specify the ready date for a specific line item
5
+ elements:
6
+ - { ref: ACK01, id: '668', req: M }
7
+ - { ref: ACK02, id: '380', req: X }
8
+ - { ref: ACK03, id: '355', req: X }
9
+ - { ref: ACK04, id: '374', req: O }
10
+ - { ref: ACK05, id: '373', req: X }
11
+ - { ref: ACK06, id: '326', req: O }
12
+ - { ref: ACK07, id: '235', req: X }
13
+ - { ref: ACK08, id: '234', req: X }
14
+ - { ref: ACK09, id: '235', req: X }
15
+ - { ref: ACK10, id: '234', req: X }
@@ -0,0 +1,9 @@
1
+ ---
2
+ id: BAK
3
+ name: Beginning Segment for Purchase Order Acknowledgment
4
+ purpose: To indicate the beginning of the Purchase Order Acknowledgment Transaction Set and transmit identifying numbers and date.
5
+ elements:
6
+ - { ref: BAK01, id: '353', req: M }
7
+ - { ref: BAK02, id: '587', req: M }
8
+ - { ref: BAK03, id: '324', req: M }
9
+ - { ref: BAK04, id: '373', req: M }
@@ -0,0 +1,17 @@
1
+ ---
2
+ id: BEG
3
+ name: Beginning Segment for Purchase Order
4
+ purpose: To indicate the beginning of the Purchase Order Transaction Set and transmit identifying numbers and dates
5
+ elements:
6
+ - { ref: BEG01, id: '353', req: M }
7
+ - { ref: BEG02, id: '92', req: M }
8
+ - { ref: BEG03, id: '324', req: M }
9
+ - { ref: BEG04, id: '328', req: O }
10
+ - { ref: BEG05, id: '373', req: M, description: The date assigned to the purchase order by the purchaser. }
11
+ - { ref: BEG06, id: '367', req: O }
12
+ - { ref: BEG07, id: '587', req: O }
13
+ - { ref: BEG08, id: '1019', req: O }
14
+ - { ref: BEG09, id: '1166', req: O }
15
+ - { ref: BEG10, id: '1232', req: O }
16
+ - { ref: BEG11, id: '786', req: O }
17
+ - { ref: BEG12, id: '640', req: O }
@@ -0,0 +1,10 @@
1
+ ---
2
+ id: BIG
3
+ name: Beginning Segment for Invoice
4
+ purpose: To indicate the beginning of an invoice transaction set and transmit identifying numbers and dates.
5
+ elements:
6
+ - { ref: BIG01, id: '373', req: M }
7
+ - { ref: BIG02, id: '76', req: M }
8
+ - { ref: BIG03, id: '373', req: O }
9
+ - { ref: BIG04, id: '324', req: O }
10
+ - { ref: BIG05, id: '328', req: O }
@@ -0,0 +1,10 @@
1
+ ---
2
+ id: BSN
3
+ name: Beginning Segment for Ship Notice
4
+ purpose: To transmit identifying numbers, dates, and other basic data relating to the transaction set.
5
+ elements:
6
+ - { ref: BSN01, id: '353', req: M }
7
+ - { ref: BSN02, id: '396', req: M }
8
+ - { ref: BSN03, id: '373', req: M }
9
+ - { ref: BSN04, id: '337', req: M }
10
+ - { ref: BSN05, id: '1005', req: O }
@@ -0,0 +1,14 @@
1
+ ---
2
+ id: CAD
3
+ name: Carrier Detail
4
+ purpose: To specify transportation details for the transaction.
5
+ elements:
6
+ - { ref: CAD01, id: '91', req: O } # FIXME: req probably should be M
7
+ - { ref: CAD02, id: '206', req: O }
8
+ - { ref: CAD03, id: '207', req: O }
9
+ - { ref: CAD04, id: '140', req: X }
10
+ - { ref: CAD05, id: '387', req: X }
11
+ - { ref: CAD06, id: '368', req: O }
12
+ - { ref: CAD07, id: '128', req: O }
13
+ - { ref: CAD08, id: '127', req: X }
14
+ - { ref: CAD09, id: '284', req: O }
@@ -0,0 +1,19 @@
1
+ ---
2
+ id: CTP
3
+ name: Pricing Information
4
+ purpose: To specify pricing information.
5
+ elements:
6
+ - { ref: CTP01, id: '687', req: O }
7
+ - { ref: CTP02, id: '236', req: X }
8
+ - { ref: CTP03, id: '212', req: X }
9
+ - { ref: CTP04, id: '380', req: X }
10
+ - { ref: CTP05, id: '355', req: X }
11
+ - { ref: CTP06, id: '648', req: O }
12
+ - { ref: CTP07, id: '649', req: X }
13
+ - { ref: CTP08, id: '782', req: O }
14
+ notes: |
15
+ 1.P0405 - If either CTP04 or CTP05 is present, then the other is required.
16
+ 2.C0607 - If CTP06 is present, then CTP07 is required.
17
+ 3.C0902 - If CTP09 is present, then CTP02 is required.
18
+ 4.C1002 - If CTP10 is present, then CTP02 is required.
19
+ 5.C1103 - If CTP11 is present, then CTP03 is required.
@@ -0,0 +1,13 @@
1
+ ---
2
+ id: CTT
3
+ name: Transaction Totals
4
+ purpose: To transmit a hash total for a specific element in the transaction set
5
+ notes: http://www.x12.org/rfis/Hash%20Totals.pdf
6
+ elements:
7
+ - { ref: CTT01, id: '354', req: M }
8
+ - { ref: CTT02, id: '347', req: O }
9
+ - { ref: CTT03, id: '81', req: X }
10
+ - { ref: CTT04, id: '355', req: X }
11
+ - { ref: CTT05, id: '183', req: X }
12
+ - { ref: CTT06, id: '355', req: X }
13
+ - { ref: CTT07, id: '352', req: O }
@@ -0,0 +1,7 @@
1
+ ---
2
+ id: DTM
3
+ name: Date/Time Reference
4
+ purpose: To specify pertinent dates and times.
5
+ elements:
6
+ - { ref: DTM01, id: '374', req: M }
7
+ - { ref: DTM02, id: '373', req: X }
@@ -0,0 +1,7 @@
1
+ ---
2
+ id: GE
3
+ name: Functional Group Trailer
4
+ purpose: To indicate the end of a functional group and to provide control information.
5
+ elements:
6
+ - { ref: GE01, id: '97', req: M }
7
+ - { ref: GE02, id: '28', req: M }
@@ -0,0 +1,13 @@
1
+ ---
2
+ id: GS
3
+ name: Functional Group Header
4
+ purpose: To indicate the beginning of a functional group and to provide control information.
5
+ elements:
6
+ - { ref: GS01, id: '479', req: M }
7
+ - { ref: GS02, id: '142', req: M }
8
+ - { ref: GS03, id: '124', req: M }
9
+ - { ref: GS04, id: '373', req: M }
10
+ - { ref: GS05, id: '337', req: M }
11
+ - { ref: GS06, id: '28' , req: M }
12
+ - { ref: GS07, id: '455', req: M }
13
+ - { ref: GS08, id: '480', req: M }
@@ -0,0 +1,8 @@
1
+ ---
2
+ id: IEA
3
+ name: Interchange Control Trailer
4
+ purpose: To define the end of an interchange of zero or more functional groups and interchange-related control segments.
5
+ elements:
6
+ - { ref: IEA01, id: 'I16', req: M }
7
+ - { ref: IEA02, id: 'I12', req: M }
8
+
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: ISA
3
+ name: Interchange Control Header
4
+ purpose: To start and identify an interchange of zero or more functional groups and interchange-related control segments.
5
+ elements:
6
+ - { ref: ISA01, id: 'I01', req: M }
7
+ - { ref: ISA02, id: 'I02', req: M }
8
+ - { ref: ISA03, id: 'I03', req: M }
9
+ - { ref: ISA04, id: 'I04', req: M }
10
+ - { ref: ISA05, id: 'I05', req: M }
11
+ - { ref: ISA06, id: 'I06', req: M }
12
+ - { ref: ISA07, id: 'I05', req: M }
13
+ - { ref: ISA08, id: 'I07', req: M }
14
+ - { ref: ISA09, id: 'I08', req: M }
15
+ - { ref: ISA10, id: 'I09', req: M }
16
+ - { ref: ISA11, id: 'I10', req: M }
17
+ - { ref: ISA12, id: 'I11', req: M }
18
+ - { ref: ISA13, id: 'I12', req: M }
19
+ - { ref: ISA14, id: 'I13', req: M }
20
+ - { ref: ISA15, id: 'I14', req: M }
21
+ - { ref: ISA16, id: 'I15', req: M }
22
+
@@ -0,0 +1,7 @@
1
+ ---
2
+ id: SE
3
+ name: Transaction Set Trailer
4
+ purpose: To indicate the end of the transaction set and provide the count of the transmitted segments (including the beginning (ST) and ending (SE) segments).
5
+ elements:
6
+ - { ref: SE01, id: '96', req: M }
7
+ - { ref: SE02, id: '329', req: M }
@@ -0,0 +1,12 @@
1
+ ---
2
+ id: ST
3
+ name: Transaction Set Header
4
+ purpose: To indicate the start of a transaction set and to assign a control number.
5
+ elements:
6
+ - { ref: ST01, id: '143', req: M }
7
+ - { ref: ST02, id: '329', req: M }
8
+ # - ref: ST03
9
+ # id: '???'
10
+ # req: O
11
+ # description: "This is a reference assigned to identify implementation convention (similar to Version Number in GS08). The reason for this element is that some translators do not let you map to ISA and GS segments. This element will allow a user to map to the version number (e.g. 005010X222A1) if needed. The ST-03 will always take precedence over GS08."
12
+ # description: "The ST03 element was added to all of the above transactions. This element contains the same value as GS08. Some EDI translation products omit the ISA and GS segments (envelopes) prior to application (ST-SE) processing. By providing the information from GS08 at this level, it will ensure that the appropriate application mapping is used at translation time."
@@ -0,0 +1,9 @@
1
+ ---
2
+ id: HL
3
+ name: Hierarchical Level
4
+ purpose: To identify dependencies among and the content of hierarchically related groups of data segments.
5
+ elements:
6
+ - { ref: HL01, id: '628', req: M }
7
+ - { ref: HL02, id: '734', req: O }
8
+ - { ref: HL03, id: '735', req: M }
9
+ - { ref: HL04, id: '736', req: O }
@@ -0,0 +1,20 @@
1
+ ---
2
+ id: IT1
3
+ name: Baseline Item Data (Invoice)
4
+ purpose: To specify the basic and most frequently used line item data for the invoice and related transactions.
5
+ elements:
6
+ - { ref: IT101, id: '350', req: O }
7
+ - { ref: IT102, id: '358', req: X }
8
+ - { ref: IT103, id: '355', req: X }
9
+ - { ref: IT104, id: '212', req: X }
10
+ - { ref: IT105, id: '639', req: O }
11
+ - { ref: IT106, id: '235', req: X }
12
+ - { ref: IT107, id: '234', req: X }
13
+ - { ref: IT108, id: '235', req: X }
14
+ - { ref: IT109, id: '234', req: X }
15
+ - { ref: IT110, id: '235', req: X }
16
+ - { ref: IT111, id: '234', req: X }
17
+ - { ref: IT112, id: '235', req: X }
18
+ - { ref: IT113, id: '234', req: X }
19
+ - { ref: IT114, id: '235', req: X }
20
+ - { ref: IT115, id: '234', req: X }
@@ -0,0 +1,10 @@
1
+ ---
2
+ id: LIN
3
+ name: Item Identification
4
+ purpose: To specify basic item identification data.
5
+ elements:
6
+ - { ref: LIN01, id: '350', req: O }
7
+ - { ref: LIN02, id: '235', req: M }
8
+ - { ref: LIN03, id: '234', req: M }
9
+ - { ref: LIN04, id: '235', req: X }
10
+ - { ref: LIN05, id: '234', req: X }
@@ -0,0 +1,8 @@
1
+ ---
2
+ id: HL
3
+ name: Hierarchical Level
4
+ purpose: To identify dependencies among and the content of hierarchically related groups of data segments.
5
+ elements:
6
+ - { ref: HL01, id: '628', req: M }
7
+ - { ref: HL02, id: '734', req: O }
8
+ - { ref: HL03, id: '735', req: M }
@@ -0,0 +1,7 @@
1
+ ---
2
+ id: MAN
3
+ name: Marks and Numbers
4
+ purpose: To indicate identifying marks and numbers for shipping containers.
5
+ elements:
6
+ - { ref: MAN01, id: '88', req: M }
7
+ - { ref: MAN02, id: '87', req: M }
@@ -0,0 +1,9 @@
1
+ ---
2
+ id: N1
3
+ name: Name
4
+ purpose: To identify a party by type of organization, name, and code
5
+ elements:
6
+ - { ref: N101, id: '98', req: M }
7
+ - { ref: N102, id: '93', req: X }
8
+ - { ref: N103, id: '66', req: X }
9
+ - { ref: N104, id: '67', req: X }
@@ -0,0 +1,7 @@
1
+ ---
2
+ id: N2
3
+ name: Additional Name Information
4
+ purpose: To identify a party by type of organization, name, and code.
5
+ elements:
6
+ - { ref: N201, id: '93', req: M }
7
+ - { ref: N202, id: '93', req: O }
@@ -0,0 +1,6 @@
1
+ ---
2
+ id: N3
3
+ name: Address Information
4
+ purpose: To specify the location of the named party
5
+ elements:
6
+ - { ref: N301, id: '166', req: M }
@@ -0,0 +1,9 @@
1
+ ---
2
+ id: N4
3
+ name: Geographic Location
4
+ purpose: To specify the geographic place of the named party
5
+ elements:
6
+ - { ref: N401, id: '19', req: O }
7
+ - { ref: N402, id: '156', req: O }
8
+ - { ref: N403, id: '116', req: O }
9
+ - { ref: N404, id: '26', req: O }
@@ -0,0 +1,10 @@
1
+ ---
2
+ id: PID
3
+ name: Product/Item Description
4
+ purpose: To describe a product or process in coded or free-form format
5
+ elements:
6
+ - { ref: PID01, id: '349', req: M }
7
+ - { ref: PID02, id: '750', req: O }
8
+ - { ref: PID03, id: '559', req: O }
9
+ - { ref: PID04, id: '751', req: O }
10
+ - { ref: PID05, id: '352', req: X }
@@ -0,0 +1,14 @@
1
+ ---
2
+ id: PO1
3
+ name: Baseline Item Data
4
+ purpose: To specify basic and most frequently used line item data
5
+ elements:
6
+ - { ref: PO101, id: '350', req: O }
7
+ - { ref: PO102, id: '330', req: X }
8
+ - { ref: PO103, id: '355', req: O }
9
+ - { ref: PO104, id: '212', req: X }
10
+ - { ref: PO105, id: '639', req: O }
11
+ - { ref: PO106, id: '235', req: X }
12
+ - { ref: PO107, id: '234', req: X }
13
+ - { ref: PO108, id: '235', req: X }
14
+ - { ref: PO109, id: '234', req: X }
@@ -0,0 +1,9 @@
1
+ ---
2
+ id: PRF
3
+ name: Purchase Order Reference
4
+ purpose: To provide reference to a specific purchase order.
5
+ elements:
6
+ - { ref: PRF01, id: '324', req: M }
7
+ - { ref: PRF02, id: '328', req: O }
8
+ - { ref: PRF03, id: '327', req: O }
9
+ - { ref: PRF04, id: '373', req: O }
@@ -0,0 +1,7 @@
1
+ ---
2
+ id: REF
3
+ name: Reference Identification
4
+ purpose: To specify identifying information.
5
+ elements:
6
+ - { ref: REF01, id: '128', req: M }
7
+ - { ref: REF02, id: '127', req: X }
@@ -0,0 +1,20 @@
1
+ ---
2
+ id: SAC
3
+ name: Service, Promotion, Allowance, or Charge Information
4
+ purpose: To request or identify a service, promotion, allowance, or charge; to specify the amount or percentage for the service,promotion, allowance, or charge.
5
+ elements:
6
+ - { ref: SAC01, id: '248', req: M }
7
+ - { ref: SAC02, id: '1300', req: X }
8
+ - { ref: SAC03, id: '559', req: X }
9
+ - { ref: SAC04, id: '1301', req: X }
10
+ - { ref: SAC05, id: '610', req: O }
11
+ notes: |
12
+ 1.R0203 - At least one of SAC02 or SAC03 is required.
13
+ 2.P0304 - If either SAC03 or SAC04 is present, then the other is required.
14
+ 3.P0607 - If either SAC06 or SAC07 is present, then the other is required.
15
+ 4.P0910 - If either SAC09 or SAC10 is present, then the other is required.
16
+ 5.C1110 - If SAC11 is present, then SAC10 is required.
17
+ 6.L130204 - If SAC13 is present, then at least one of SAC02 or SAC04 is required.
18
+ 7.C1413 - If SAC14 is present, then SAC13 is required.
19
+ 8.C1615 - If SAC16 is present, then SAC15 is required.
20
+ https://www.jobisez.com/edi/documents/elements-codes.aspx?segment=SAC
@@ -0,0 +1,12 @@
1
+ ---
2
+ id: SLN
3
+ name: Subline Item Detail
4
+ purpose: To specify product subline detail item data.
5
+ elements:
6
+ - { ref: SLN01, id: '350', req: M }
7
+ - { ref: SLN02, id: '350', req: O }
8
+ - { ref: SLN03, id: '662', req: M }
9
+ - { ref: SLN04, id: '380', req: X }
10
+ - { ref: SLN05, id: '355', req: O }
11
+ - { ref: SLN06, id: '212', req: X }
12
+ - { ref: SLN07, id: '639', req: O }
@@ -0,0 +1,11 @@
1
+ ---
2
+ id: SN1
3
+ name: Item Detail (Shipment)
4
+ purpose: To specify line-item detail relative to shipment.
5
+ elements:
6
+ - { ref: SN101, id: '350', req: O }
7
+ - { ref: SN102, id: '382', req: M }
8
+ - { ref: SN103, id: '355', req: M }
9
+ - { ref: SN104, id: '646', req: O }
10
+ - { ref: SN105, id: '330', req: X }
11
+ - { ref: SN106, id: '355', req: X }
@@ -0,0 +1,13 @@
1
+ ---
2
+ id: TD1
3
+ name: Carrier Details (Quantity and Weight)
4
+ purpose: To specify the transportation details relative to commodity, weight, and quantity.
5
+ elements:
6
+ - { ref: TD101, id: '103', req: O }
7
+ - { ref: TD102, id: '80', req: X }
8
+ - { ref: TD103, id: '23', req: O }
9
+ - { ref: TD104, id: '22', req: X }
10
+ - { ref: TD105, id: '79', req: O }
11
+ - { ref: TD106, id: '187', req: O }
12
+ - { ref: TD107, id: '81', req: X }
13
+ - { ref: TD108, id: '355', req: X }
@@ -0,0 +1,11 @@
1
+ ---
2
+ id: TD5
3
+ name: Carrier Details (Routing Sequence/Transit Time)
4
+ purpose: To specify the carrier and sequence of routing and provide transit time information.
5
+ elements:
6
+ - { ref: TD501, id: '133', req: M }
7
+ - { ref: TD502, id: '66' , req: X }
8
+ - { ref: TD503, id: '67' , req: X }
9
+ - { ref: TD504, id: '91' , req: M }
10
+ - { ref: TD505, id: '387', req: X }
11
+
@@ -0,0 +1,10 @@
1
+ ---
2
+ id: TDS
3
+ name: Total Monetary Value Summary
4
+ purpose: To specify the total invoice discounts and amounts.
5
+ elements:
6
+ - { ref: TDS01, id: '610', req: M }
7
+ # - { ref: TDS02, id: '', req: X }
8
+ # - { ref: TDS03, id: '', req: O }
9
+ # - { ref: TDS04, id: '', req: O }
10
+