eddy 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +103 -37
- data/.solargraph.yml +4 -0
- data/.vscode/settings.json +17 -0
- data/.yardopts +2 -2
- data/CHANGELOG.md +50 -0
- data/Gemfile.lock +21 -7
- data/README.md +32 -3
- data/Rakefile +1 -10
- data/data/004010/code-lists/100.tsv +164 -0
- data/data/004010/code-lists/156.tsv +52 -0
- data/data/004010/code-lists/26.tsv +499 -0
- data/data/004010/code-lists/etc/100-fancy-definitions.tsv +164 -0
- data/data/004010/code-lists/etc/100-with-funds-codes.tsv +180 -0
- data/data/004010/code-lists/etc/26-alpha2.tsv +250 -0
- data/data/004010/code-lists/etc/26-alpha3.tsv +250 -0
- data/data/004010/elements-short.tsv +1405 -0
- data/data/004010/elements.tsv +3 -3
- data/data/004010/segments.tsv +1009 -1003
- data/data/004010/segments/ack.segment.yml +15 -0
- data/data/004010/segments/bak.segment.yml +9 -0
- data/data/004010/segments/beg.segment.yml +17 -0
- data/data/004010/segments/big.segment.yml +10 -0
- data/data/004010/segments/bsn.segment.yml +10 -0
- data/data/004010/segments/cad.segment.yml +14 -0
- data/data/004010/segments/ctp.segment.yml +19 -0
- data/data/004010/segments/ctt.segment.yml +13 -0
- data/data/004010/segments/dtm.segment.yml +7 -0
- data/data/004010/segments/envelope/ge.segment.yml +7 -0
- data/data/004010/segments/envelope/gs.segment.yml +13 -0
- data/data/004010/segments/envelope/iea.segment.yml +8 -0
- data/data/004010/segments/envelope/isa.segment.yml +22 -0
- data/data/004010/segments/envelope/se.segment.yml +7 -0
- data/data/004010/segments/envelope/st.segment.yml +12 -0
- data/data/004010/segments/hl.segment.yml +9 -0
- data/data/004010/segments/it1.segment.yml +20 -0
- data/data/004010/segments/lin.segment.yml +10 -0
- data/data/004010/segments/loop/hl.segment.yml +8 -0
- data/data/004010/segments/man.segment.yml +7 -0
- data/data/004010/segments/n1.segment.yml +9 -0
- data/data/004010/segments/n2.segment.yml +7 -0
- data/data/004010/segments/n3.segment.yml +6 -0
- data/data/004010/segments/n4.segment.yml +9 -0
- data/data/004010/segments/pid.segment.yml +10 -0
- data/data/004010/segments/po1.segment.yml +14 -0
- data/data/004010/segments/prf.segment.yml +9 -0
- data/data/004010/segments/ref.segment.yml +7 -0
- data/data/004010/segments/sac.segment.yml +20 -0
- data/data/004010/segments/sln.segment.yml +12 -0
- data/data/004010/segments/sn1.segment.yml +11 -0
- data/data/004010/segments/td1.segment.yml +13 -0
- data/data/004010/segments/td5.segment.yml +11 -0
- data/data/004010/segments/tds.segment.yml +10 -0
- data/data/schema/element_summary.json +60 -0
- data/data/schema/loop_summary.json +49 -0
- data/data/schema/segment_summary.json +66 -0
- data/data/schema/src/element_summary.schema.yml +73 -0
- data/data/schema/src/loop_summary.schema.yml +50 -0
- data/data/schema/src/segment_summary.schema.yml +59 -0
- data/data/schema/src/transaction_set_summary.schema.yml +27 -0
- data/data/schema/transaction_set_summary.json +33 -0
- data/data/sources.md +114 -145
- data/eddy.gemspec +6 -3
- data/exe/eddy +14 -0
- data/lib/definitions/elements/generated/1005.hierarchical_structure_code.rb +98 -0
- data/lib/definitions/elements/generated/1019.invoice_type_code.rb +40 -0
- data/lib/definitions/elements/generated/103.packaging_code.rb +29 -0
- data/lib/definitions/elements/generated/1166.contract_type_code.rb +87 -0
- data/lib/definitions/elements/generated/1232.purchase_category.rb +53 -0
- data/lib/definitions/elements/generated/127.reference_identification.rb +29 -0
- data/lib/definitions/elements/generated/128.reference_identification_qualifier.rb +1540 -0
- data/lib/definitions/elements/generated/1300.service_promotion_allowance_or_charge_code.rb +1090 -0
- data/lib/definitions/elements/generated/1301.agency_service_promotion_allowance_or_charge_code.rb +29 -0
- data/lib/definitions/elements/generated/133.routing_sequence_code.rb +60 -0
- data/lib/definitions/elements/generated/166.address_information.rb +29 -0
- data/lib/definitions/elements/generated/183.volume.rb +29 -0
- data/lib/definitions/elements/generated/187.weight_qualifier.rb +88 -0
- data/lib/definitions/elements/generated/19.city_name.rb +29 -0
- data/lib/definitions/elements/generated/206.equipment_initial.rb +29 -0
- data/lib/definitions/elements/generated/207.equipment_number.rb +29 -0
- data/lib/definitions/elements/generated/212.unit_price.rb +29 -0
- data/lib/definitions/elements/generated/22.commodity_code.rb +29 -0
- data/lib/definitions/elements/generated/23.commodity_code_qualifier.rb +60 -0
- data/lib/definitions/elements/generated/234.product_service_id.rb +29 -0
- data/lib/definitions/elements/generated/235.product_service_id_qualifier.rb +514 -0
- data/lib/definitions/elements/generated/236.price_identifier_code.rb +201 -0
- data/lib/definitions/elements/generated/248.allowance_or_charge_indicator.rb +44 -0
- data/lib/definitions/elements/generated/26.country_code.rb +535 -0
- data/lib/definitions/elements/generated/284.service_level_code.rb +103 -0
- data/lib/definitions/elements/generated/324.purchase_order_number.rb +29 -0
- data/lib/definitions/elements/generated/326.request_reference_number.rb +29 -0
- data/lib/definitions/elements/generated/327.change_order_sequence_number.rb +29 -0
- data/lib/definitions/elements/generated/328.release_number.rb +29 -0
- data/lib/definitions/elements/generated/330.quantity_ordered.rb +29 -0
- data/lib/definitions/elements/generated/347.hash_total.rb +29 -0
- data/lib/definitions/elements/generated/349.item_description_type.rb +40 -0
- data/lib/definitions/elements/generated/352.description.rb +29 -0
- data/lib/definitions/elements/generated/353.transaction_set_purpose_code.rb +102 -0
- data/lib/definitions/elements/generated/354.number_of_line_items.rb +30 -0
- data/lib/definitions/elements/generated/355.unit_or_basis_for_measurement_code.rb +831 -0
- data/lib/definitions/elements/generated/358.quantity_invoiced.rb +29 -0
- data/lib/definitions/elements/generated/367.contract_number.rb +29 -0
- data/lib/definitions/elements/generated/368.shipment_order_status_code.rb +139 -0
- data/lib/definitions/elements/generated/374.date_time_qualifier.rb +1149 -0
- data/lib/definitions/elements/generated/380.quantity.rb +29 -0
- data/lib/definitions/elements/generated/382.number_of_units_shipped.rb +29 -0
- data/lib/definitions/elements/generated/387.routing.rb +29 -0
- data/lib/definitions/elements/generated/396.shipment_identification.rb +29 -0
- data/lib/definitions/elements/generated/559.agency_qualifier_code.rb +213 -0
- data/lib/definitions/elements/generated/587.acknowledgment_type.rb +52 -0
- data/lib/definitions/elements/generated/610.amount.rb +30 -0
- data/lib/definitions/elements/generated/639.basis_of_unit_price_code.rb +128 -0
- data/lib/definitions/elements/generated/640.transaction_type_code.rb +483 -0
- data/lib/definitions/elements/generated/646.quantity_shipped_to_date.rb +29 -0
- data/lib/definitions/elements/generated/648.price_multiplier_qualifier.rb +43 -0
- data/lib/definitions/elements/generated/649.multiplier.rb +29 -0
- data/lib/definitions/elements/generated/66.identification_code_qualifier.rb +252 -0
- data/lib/definitions/elements/generated/662.relationship_code.rb +42 -0
- data/lib/definitions/elements/generated/668.line_item_status_code.rb +63 -0
- data/lib/definitions/elements/generated/67.identification_code.rb +29 -0
- data/lib/definitions/elements/generated/687.class_of_trade_code.rb +89 -0
- data/lib/definitions/elements/generated/750.product_process_characteristic_code.rb +254 -0
- data/lib/definitions/elements/generated/751.product_description_code.rb +29 -0
- data/lib/definitions/elements/generated/76.invoice_number.rb +29 -0
- data/lib/definitions/elements/generated/782.monetary_amount.rb +29 -0
- data/lib/definitions/elements/generated/786.security_level_code.rb +54 -0
- data/lib/definitions/elements/generated/79.lading_description.rb +29 -0
- data/lib/definitions/elements/generated/80.lading_quantity.rb +30 -0
- data/lib/definitions/elements/generated/87.marks_and_numbers.rb +29 -0
- data/lib/definitions/elements/generated/88.marks_and_numbers_qualifier.rb +57 -0
- data/lib/definitions/elements/generated/91.transportation_method_type_code.rb +108 -0
- data/lib/definitions/elements/generated/92.purchase_order_type_code.rb +106 -0
- data/lib/definitions/elements/generated/98.entity_identifier_code.rb +1349 -0
- data/lib/definitions/elements/manual/116.postal_code.rb +44 -0
- data/lib/definitions/elements/manual/124.application_receivers_code.rb +29 -0
- data/lib/definitions/elements/manual/140.standard_carrier_alpha_code.rb +211 -0
- data/lib/definitions/elements/manual/142.application_senders_code.rb +29 -0
- data/lib/definitions/elements/manual/143.transaction_set_identifier_code.rb +335 -0
- data/lib/definitions/elements/manual/156.state_or_province_code.rb +92 -0
- data/lib/definitions/elements/manual/28.group_control_number.rb +34 -0
- data/lib/definitions/elements/manual/329.transactional_set_control_number.rb +35 -0
- data/lib/definitions/elements/manual/337.time.rb +30 -0
- data/lib/definitions/elements/manual/350.assigned_identification.rb +33 -0
- data/lib/definitions/elements/manual/373.date.rb +30 -0
- data/lib/definitions/elements/manual/455.responsible_agency_code.rb +43 -0
- data/lib/definitions/elements/manual/479.functional_identifier_code.rb +271 -0
- data/lib/definitions/elements/manual/480.version_release_industry_identifier_code.rb +145 -0
- data/lib/definitions/elements/manual/784.length_of_binary_data.rb +30 -0
- data/lib/definitions/elements/manual/785.binary_data.rb +30 -0
- data/lib/definitions/elements/manual/96.number_of_included_segments.rb +30 -0
- data/lib/definitions/elements/manual/97.number_of_transaction_sets_included.rb +30 -0
- data/lib/definitions/elements/manual/hl/628.hierarchical_id_number.rb +29 -0
- data/lib/definitions/elements/manual/hl/734.hierarchical_parent_id_number.rb +29 -0
- data/lib/definitions/elements/manual/hl/735.hierarchical_level_code.rb +207 -0
- data/lib/definitions/elements/manual/hl/736.hierarchical_child_code.rb +39 -0
- data/lib/definitions/elements/manual/i/I01.authorization_information_qualifier.rb +48 -0
- data/lib/definitions/elements/manual/i/I02.authorization_information.rb +33 -0
- data/lib/definitions/elements/manual/i/I03.security_information_qualifier.rb +43 -0
- data/lib/definitions/elements/manual/i/I04.security_information.rb +33 -0
- data/lib/definitions/elements/manual/i/I05.interchange_id_qualifier.rb +75 -0
- data/lib/definitions/elements/manual/i/I06.interchange_sender_id.rb +29 -0
- data/lib/definitions/elements/manual/i/I07.interchange_receiver_id.rb +29 -0
- data/lib/definitions/elements/manual/i/I08.interchange_date.rb +35 -0
- data/lib/definitions/elements/manual/i/I09.interchange_time.rb +36 -0
- data/lib/definitions/elements/manual/i/I10.interchange_control_standards_identifier.rb +42 -0
- data/lib/definitions/elements/manual/i/I11.interchange_control_version_number.rb +55 -0
- data/lib/definitions/elements/manual/i/I12.interchange_control_number.rb +34 -0
- data/lib/definitions/elements/manual/i/I13.acknowledgment_requested.rb +43 -0
- data/lib/definitions/elements/manual/i/I14.usage_indicator.rb +40 -0
- data/lib/definitions/elements/manual/i/I15.component_element_separator.rb +36 -0
- data/lib/definitions/elements/manual/i/I16.number_of_included_functional_groups.rb +30 -0
- data/lib/definitions/elements/manual/misc/81.weight.rb +29 -0
- data/lib/definitions/elements/manual/misc/93.name.rb +29 -0
- data/lib/definitions/segments/generated/ack.rb +192 -0
- data/lib/definitions/segments/generated/bak.rb +90 -0
- data/lib/definitions/segments/generated/beg.rb +226 -0
- data/lib/definitions/segments/generated/big.rb +107 -0
- data/lib/definitions/segments/generated/bsn.rb +107 -0
- data/lib/definitions/segments/generated/cad.rb +175 -0
- data/lib/definitions/segments/generated/ctp.rb +158 -0
- data/lib/definitions/segments/generated/ctt.rb +141 -0
- data/lib/definitions/segments/generated/dtm.rb +56 -0
- data/lib/definitions/segments/generated/it1.rb +277 -0
- data/lib/definitions/segments/generated/lin.rb +107 -0
- data/lib/definitions/segments/generated/man.rb +56 -0
- data/lib/definitions/segments/generated/n1.rb +90 -0
- data/lib/definitions/segments/generated/n3.rb +39 -0
- data/lib/definitions/segments/generated/n4.rb +90 -0
- data/lib/definitions/segments/generated/pid.rb +107 -0
- data/lib/definitions/segments/generated/po1.rb +175 -0
- data/lib/definitions/segments/generated/prf.rb +90 -0
- data/lib/definitions/segments/generated/ref.rb +56 -0
- data/lib/definitions/segments/generated/sac.rb +107 -0
- data/lib/definitions/segments/generated/sln.rb +141 -0
- data/lib/definitions/segments/generated/sn1.rb +124 -0
- data/lib/definitions/segments/generated/td1.rb +158 -0
- data/lib/definitions/segments/generated/td5.rb +107 -0
- data/lib/definitions/segments/generated/tds.rb +39 -0
- data/lib/definitions/segments/manual/envelopes/ge.rb +53 -0
- data/lib/definitions/segments/manual/envelopes/gs.rb +163 -0
- data/lib/definitions/segments/manual/envelopes/iea.rb +53 -0
- data/lib/definitions/segments/manual/envelopes/isa.rb +295 -0
- data/lib/definitions/segments/manual/envelopes/se.rb +52 -0
- data/lib/definitions/segments/manual/envelopes/st.rb +52 -0
- data/lib/definitions/segments/manual/hl.rb +96 -0
- data/lib/definitions/segments/manual/n2.rb +52 -0
- data/lib/definitions/transaction_sets/manual/810/810.rb +143 -0
- data/lib/definitions/transaction_sets/manual/810/loops.rb +109 -0
- data/lib/definitions/transaction_sets/manual/850/850.rb +92 -0
- data/lib/definitions/transaction_sets/manual/850/loops.rb +58 -0
- data/lib/definitions/transaction_sets/manual/855/855.rb +83 -0
- data/lib/definitions/transaction_sets/manual/855/loops.rb +104 -0
- data/lib/definitions/transaction_sets/manual/856/856.rb +83 -0
- data/lib/definitions/transaction_sets/manual/856/loops.rb +155 -0
- data/lib/eddy.rb +29 -7
- data/lib/eddy/build/build.rb +47 -0
- data/lib/eddy/build/elements/element.rb +67 -0
- data/lib/eddy/build/elements/elements.rb +46 -0
- data/lib/eddy/build/elements/id.rb +55 -0
- data/lib/eddy/build/elements/n.rb +48 -0
- data/lib/eddy/build/loop_builder.rb +93 -0
- data/lib/eddy/build/segment_builder.rb +169 -0
- data/lib/eddy/build/transaction_set_builder.rb +218 -0
- data/lib/eddy/cli/cli.rb +39 -0
- data/lib/eddy/config.rb +51 -0
- data/lib/eddy/data.rb +50 -0
- data/lib/eddy/data/persistence/active_record.rb +10 -0
- data/lib/eddy/data/persistence/base.rb +47 -0
- data/lib/eddy/data/persistence/file.rb +50 -0
- data/lib/eddy/data/persistence/memory.rb +65 -0
- data/lib/eddy/data/store.rb +108 -0
- data/lib/eddy/errors.rb +112 -0
- data/lib/eddy/models/element.rb +14 -0
- data/lib/eddy/models/element/an.rb +55 -0
- data/lib/eddy/models/element/b.rb +53 -0
- data/lib/eddy/models/element/base.rb +116 -0
- data/lib/eddy/models/element/composite.rb +6 -0
- data/lib/eddy/models/element/dt.rb +100 -0
- data/lib/eddy/models/element/id.rb +58 -0
- data/lib/eddy/models/element/n.rb +94 -0
- data/lib/eddy/models/element/r.rb +84 -0
- data/lib/eddy/models/element/tm.rb +113 -0
- data/lib/eddy/models/loop.rb +74 -0
- data/lib/eddy/models/segment.rb +35 -0
- data/lib/eddy/models/transaction_set.rb +101 -0
- data/lib/eddy/parse.rb +58 -0
- data/lib/eddy/schema/element_summary.rb +123 -0
- data/lib/eddy/schema/loop_summary.rb +101 -0
- data/lib/eddy/schema/segment_summary.rb +116 -0
- data/lib/eddy/schema/transaction_set_summary.rb +96 -0
- data/lib/eddy/schema/validate.rb +41 -0
- data/lib/eddy/util.rb +16 -0
- data/lib/eddy/util/clean_folder.rb +14 -0
- data/lib/eddy/util/edi_data.rb +153 -0
- data/lib/eddy/util/new_number.rb +24 -0
- data/lib/eddy/util/normalize.rb +51 -0
- data/lib/eddy/util/paths.rb +19 -0
- data/lib/eddy/util/read.rb +38 -0
- data/lib/eddy/util/time.rb +56 -0
- data/lib/eddy/util/timestamp.rb +12 -0
- data/lib/eddy/util/trim.rb +29 -0
- data/lib/eddy/version.rb +1 -1
- data/lib/eddy/write/functional_group.rb +33 -0
- data/lib/eddy/write/interchange.rb +28 -0
- data/lib/eddy/write/simple_interchange.rb +57 -0
- data/lib/generators/eddy/initializer/initializer_generator.rb +17 -0
- data/lib/generators/eddy/initializer/templates/eddy.rb.erb +6 -0
- data/lib/generators/eddy/migration/migration_generator.rb +53 -0
- data/lib/generators/eddy/migration/templates/migration.rb.erb +35 -0
- data/tasks/build.rake +15 -0
- data/tasks/misc/gemspec.rake +12 -0
- data/tasks/misc/missing_lists.rake +240 -0
- data/tasks/misc/yaml2json.rake +20 -0
- data/todo.txt +16 -0
- metadata +297 -42
- data/data/004010/segments/ISA.tsv +0 -17
- data/data/schema.jsonc +0 -67
- data/lib/eddy/build/build_an.rb +0 -31
- data/lib/eddy/build/build_dt.rb +0 -46
- data/lib/eddy/build/build_elements.rb +0 -181
- data/lib/eddy/build/build_id.rb +0 -56
- data/lib/eddy/build/build_r_and_n.rb +0 -69
- data/lib/eddy/build/build_tm.rb +0 -52
- data/lib/eddy/build/segments.rb +0 -25
- data/lib/eddy/definitions/manual/elements/109.dt.pickup_date.rb +0 -20
- data/lib/eddy/definitions/manual/elements/111.tm.pickup_time.rb +0 -20
- data/lib/eddy/definitions/manual/elements/112.an.pier_name.rb +0 -19
- data/lib/eddy/definitions/manual/elements/785.b.binary_data.rb +0 -19
- data/lib/eddy/definitions/manual/elements/81.r.weight.rb +0 -19
- data/lib/eddy/definitions/manual/elements/86.n0.total_equipment.rb +0 -20
- data/lib/eddy/definitions/manual/elements/I02.authorization_information.rb +0 -20
- data/lib/eddy/definitions/manual/elements/I04.security_information.rb +0 -20
- data/lib/eddy/definitions/manual/elements/I08.interchange_date.rb +0 -20
- data/lib/eddy/definitions/manual/elements/I09.interchange_time.rb +0 -20
- data/lib/eddy/definitions/manual/elements/I15.component_element_separator.rb +0 -32
- data/lib/eddy/definitions/manual/segments/n1.rb +0 -14
- data/lib/eddy/element.rb +0 -14
- data/lib/eddy/element/an.rb +0 -36
- data/lib/eddy/element/b.rb +0 -9
- data/lib/eddy/element/base.rb +0 -37
- data/lib/eddy/element/dt.rb +0 -89
- data/lib/eddy/element/id.rb +0 -40
- data/lib/eddy/element/n.rb +0 -43
- data/lib/eddy/element/r.rb +0 -47
- data/lib/eddy/element/tm.rb +0 -108
- data/lib/eddy/error.rb +0 -14
- data/lib/eddy/helpers.rb +0 -31
- data/lib/eddy/segment.rb +0 -12
- data/lib/eddy/transaction_set.rb +0 -35
@@ -0,0 +1,158 @@
|
|
1
|
+
module Eddy
|
2
|
+
module Segments
|
3
|
+
# ### Segment Summary:
|
4
|
+
#
|
5
|
+
# - Id: TD1
|
6
|
+
# - Name: Carrier Details (Quantity and Weight)
|
7
|
+
# - Purpose: To specify the transportation details relative to commodity, weight, and quantity.
|
8
|
+
class TD1 < Eddy::Segment
|
9
|
+
|
10
|
+
# @param store [Eddy::Data::Store]
|
11
|
+
# @return [void]
|
12
|
+
def initialize(store)
|
13
|
+
@id = "TD1"
|
14
|
+
@name = "Carrier Details (Quantity and Weight)"
|
15
|
+
@td101 = Eddy::Elements::E103.new(ref: "TD101", req: "O")
|
16
|
+
@td102 = Eddy::Elements::E80.new(ref: "TD102", req: "X")
|
17
|
+
@td103 = Eddy::Elements::E23.new(ref: "TD103", req: "O")
|
18
|
+
@td104 = Eddy::Elements::E22.new(ref: "TD104", req: "X")
|
19
|
+
@td105 = Eddy::Elements::E79.new(ref: "TD105", req: "O")
|
20
|
+
@td106 = Eddy::Elements::E187.new(ref: "TD106", req: "O")
|
21
|
+
@td107 = Eddy::Elements::E81.new(ref: "TD107", req: "X")
|
22
|
+
@td108 = Eddy::Elements::E355.new(ref: "TD108", req: "X")
|
23
|
+
super(
|
24
|
+
store,
|
25
|
+
@td101,
|
26
|
+
@td102,
|
27
|
+
@td103,
|
28
|
+
@td104,
|
29
|
+
@td105,
|
30
|
+
@td106,
|
31
|
+
@td107,
|
32
|
+
@td108,
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
36
|
+
# ### TD101
|
37
|
+
#
|
38
|
+
# - Id: 103
|
39
|
+
# - Name: Packaging Code
|
40
|
+
# - Type: AN
|
41
|
+
# - Min/Max: 3/5
|
42
|
+
# - Description: Code identifying the type of packaging; Part 1: Packaging Form, Part 2: Packaging Material; if the Data Element is used, then Part 1 is always required
|
43
|
+
#
|
44
|
+
# @param arg [String]
|
45
|
+
# @return [void]
|
46
|
+
def TD101=(arg)
|
47
|
+
@td101.value = arg
|
48
|
+
end
|
49
|
+
alias PackagingCode= TD101=
|
50
|
+
|
51
|
+
# ### TD102
|
52
|
+
#
|
53
|
+
# - Id: 80
|
54
|
+
# - Name: Lading Quantity
|
55
|
+
# - Type: N0
|
56
|
+
# - Min/Max: 1/7
|
57
|
+
# - Description: Number of units (pieces) of the lading commodity
|
58
|
+
#
|
59
|
+
# @param arg [Integer]
|
60
|
+
# @return [void]
|
61
|
+
def TD102=(arg)
|
62
|
+
@td102.value = arg
|
63
|
+
end
|
64
|
+
alias LadingQuantity= TD102=
|
65
|
+
|
66
|
+
# ### TD103
|
67
|
+
#
|
68
|
+
# - Id: 23
|
69
|
+
# - Name: Commodity Code Qualifier
|
70
|
+
# - Type: ID
|
71
|
+
# - Min/Max: 1/1
|
72
|
+
# - Description: Code identifying the commodity coding system used for Commodity Code
|
73
|
+
#
|
74
|
+
# @param arg [String]
|
75
|
+
# @return [void]
|
76
|
+
def TD103=(arg)
|
77
|
+
@td103.value = arg
|
78
|
+
end
|
79
|
+
alias CommodityCodeQualifier= TD103=
|
80
|
+
|
81
|
+
# ### TD104
|
82
|
+
#
|
83
|
+
# - Id: 22
|
84
|
+
# - Name: Commodity Code
|
85
|
+
# - Type: AN
|
86
|
+
# - Min/Max: 1/30
|
87
|
+
# - Description: Code describing a commodity or group of commodities
|
88
|
+
#
|
89
|
+
# @param arg [String]
|
90
|
+
# @return [void]
|
91
|
+
def TD104=(arg)
|
92
|
+
@td104.value = arg
|
93
|
+
end
|
94
|
+
alias CommodityCode= TD104=
|
95
|
+
|
96
|
+
# ### TD105
|
97
|
+
#
|
98
|
+
# - Id: 79
|
99
|
+
# - Name: Lading Description
|
100
|
+
# - Type: AN
|
101
|
+
# - Min/Max: 1/50
|
102
|
+
# - Description: Description of an item as required for rating and billing purposes
|
103
|
+
#
|
104
|
+
# @param arg [String]
|
105
|
+
# @return [void]
|
106
|
+
def TD105=(arg)
|
107
|
+
@td105.value = arg
|
108
|
+
end
|
109
|
+
alias LadingDescription= TD105=
|
110
|
+
|
111
|
+
# ### TD106
|
112
|
+
#
|
113
|
+
# - Id: 187
|
114
|
+
# - Name: Weight Qualifier
|
115
|
+
# - Type: ID
|
116
|
+
# - Min/Max: 1/2
|
117
|
+
# - Description: Code defining the type of weight
|
118
|
+
#
|
119
|
+
# @param arg [String]
|
120
|
+
# @return [void]
|
121
|
+
def TD106=(arg)
|
122
|
+
@td106.value = arg
|
123
|
+
end
|
124
|
+
alias WeightQualifier= TD106=
|
125
|
+
|
126
|
+
# ### TD107
|
127
|
+
#
|
128
|
+
# - Id: 81
|
129
|
+
# - Name: Weight
|
130
|
+
# - Type: R
|
131
|
+
# - Min/Max: 1/10
|
132
|
+
# - Description: Numeric value of weight
|
133
|
+
#
|
134
|
+
# @param arg [Float]
|
135
|
+
# @return [void]
|
136
|
+
def TD107=(arg)
|
137
|
+
@td107.value = arg
|
138
|
+
end
|
139
|
+
alias Weight= TD107=
|
140
|
+
|
141
|
+
# ### TD108
|
142
|
+
#
|
143
|
+
# - Id: 355
|
144
|
+
# - Name: Unit or Basis for Measurement Code
|
145
|
+
# - Type: ID
|
146
|
+
# - Min/Max: 2/2
|
147
|
+
# - Description: Code specifying the units in which a value is being expressed, or manner in which a measurement has been taken
|
148
|
+
#
|
149
|
+
# @param arg [String]
|
150
|
+
# @return [void]
|
151
|
+
def TD108=(arg)
|
152
|
+
@td108.value = arg
|
153
|
+
end
|
154
|
+
alias UnitOrBasisForMeasurementCode= TD108=
|
155
|
+
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
module Eddy
|
2
|
+
module Segments
|
3
|
+
# ### Segment Summary:
|
4
|
+
#
|
5
|
+
# - Id: TD5
|
6
|
+
# - Name: Carrier Details (Routing Sequence/Transit Time)
|
7
|
+
# - Purpose: To specify the carrier and sequence of routing and provide transit time information.
|
8
|
+
class TD5 < Eddy::Segment
|
9
|
+
|
10
|
+
# @param store [Eddy::Data::Store]
|
11
|
+
# @return [void]
|
12
|
+
def initialize(store)
|
13
|
+
@id = "TD5"
|
14
|
+
@name = "Carrier Details (Routing Sequence/Transit Time)"
|
15
|
+
@td501 = Eddy::Elements::E133.new(ref: "TD501", req: "M")
|
16
|
+
@td502 = Eddy::Elements::E66.new(ref: "TD502", req: "X")
|
17
|
+
@td503 = Eddy::Elements::E67.new(ref: "TD503", req: "X")
|
18
|
+
@td504 = Eddy::Elements::E91.new(ref: "TD504", req: "M")
|
19
|
+
@td505 = Eddy::Elements::E387.new(ref: "TD505", req: "X")
|
20
|
+
super(
|
21
|
+
store,
|
22
|
+
@td501,
|
23
|
+
@td502,
|
24
|
+
@td503,
|
25
|
+
@td504,
|
26
|
+
@td505,
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
# ### TD501
|
31
|
+
#
|
32
|
+
# - Id: 133
|
33
|
+
# - Name: Routing Sequence Code
|
34
|
+
# - Type: ID
|
35
|
+
# - Min/Max: 1/2
|
36
|
+
# - Description: Code describing the relationship of a carrier to a specific shipment movement
|
37
|
+
#
|
38
|
+
# @param arg [String]
|
39
|
+
# @return [void]
|
40
|
+
def TD501=(arg)
|
41
|
+
@td501.value = arg
|
42
|
+
end
|
43
|
+
alias RoutingSequenceCode= TD501=
|
44
|
+
|
45
|
+
# ### TD502
|
46
|
+
#
|
47
|
+
# - Id: 66
|
48
|
+
# - Name: Identification Code Qualifier
|
49
|
+
# - Type: ID
|
50
|
+
# - Min/Max: 1/2
|
51
|
+
# - Description: Code designating the system/method of code structure used for Identification Code (67)
|
52
|
+
#
|
53
|
+
# @param arg [String]
|
54
|
+
# @return [void]
|
55
|
+
def TD502=(arg)
|
56
|
+
@td502.value = arg
|
57
|
+
end
|
58
|
+
alias IdentificationCodeQualifier= TD502=
|
59
|
+
|
60
|
+
# ### TD503
|
61
|
+
#
|
62
|
+
# - Id: 67
|
63
|
+
# - Name: Identification Code
|
64
|
+
# - Type: AN
|
65
|
+
# - Min/Max: 2/80
|
66
|
+
# - Description: Code identifying a party or other code
|
67
|
+
#
|
68
|
+
# @param arg [String]
|
69
|
+
# @return [void]
|
70
|
+
def TD503=(arg)
|
71
|
+
@td503.value = arg
|
72
|
+
end
|
73
|
+
alias IdentificationCode= TD503=
|
74
|
+
|
75
|
+
# ### TD504
|
76
|
+
#
|
77
|
+
# - Id: 91
|
78
|
+
# - Name: Transportation Method/Type Code
|
79
|
+
# - Type: ID
|
80
|
+
# - Min/Max: 1/2
|
81
|
+
# - Description: Code specifying the method or type of transportation for the shipment
|
82
|
+
#
|
83
|
+
# @param arg [String]
|
84
|
+
# @return [void]
|
85
|
+
def TD504=(arg)
|
86
|
+
@td504.value = arg
|
87
|
+
end
|
88
|
+
alias TransportationMethodTypeCode= TD504=
|
89
|
+
|
90
|
+
# ### TD505
|
91
|
+
#
|
92
|
+
# - Id: 387
|
93
|
+
# - Name: Routing
|
94
|
+
# - Type: AN
|
95
|
+
# - Min/Max: 1/35
|
96
|
+
# - Description: Free-form description of the routing or requested routing for shipment, or the originating carrier's identity
|
97
|
+
#
|
98
|
+
# @param arg [String]
|
99
|
+
# @return [void]
|
100
|
+
def TD505=(arg)
|
101
|
+
@td505.value = arg
|
102
|
+
end
|
103
|
+
alias Routing= TD505=
|
104
|
+
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Eddy
|
2
|
+
module Segments
|
3
|
+
# ### Segment Summary:
|
4
|
+
#
|
5
|
+
# - Id: TDS
|
6
|
+
# - Name: Total Monetary Value Summary
|
7
|
+
# - Purpose: To specify the total invoice discounts and amounts.
|
8
|
+
class TDS < Eddy::Segment
|
9
|
+
|
10
|
+
# @param store [Eddy::Data::Store]
|
11
|
+
# @return [void]
|
12
|
+
def initialize(store)
|
13
|
+
@id = "TDS"
|
14
|
+
@name = "Total Monetary Value Summary"
|
15
|
+
@tds01 = Eddy::Elements::E610.new(ref: "TDS01", req: "M")
|
16
|
+
super(
|
17
|
+
store,
|
18
|
+
@tds01,
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
# ### TDS01
|
23
|
+
#
|
24
|
+
# - Id: 610
|
25
|
+
# - Name: Amount
|
26
|
+
# - Type: N2
|
27
|
+
# - Min/Max: 1/15
|
28
|
+
# - Description: Monetary amount
|
29
|
+
#
|
30
|
+
# @param arg [Integer]
|
31
|
+
# @return [void]
|
32
|
+
def TDS01=(arg)
|
33
|
+
@tds01.value = arg
|
34
|
+
end
|
35
|
+
alias Amount= TDS01=
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module Eddy
|
2
|
+
module Segments
|
3
|
+
# ### Segment Summary:
|
4
|
+
#
|
5
|
+
# - Id: GE
|
6
|
+
# - Name: Functional Group Trailer
|
7
|
+
# - Purpose: To indicate the end of a functional group and to provide control information.
|
8
|
+
class GE < Eddy::Segment
|
9
|
+
|
10
|
+
# @param store [Eddy::Data::Store]
|
11
|
+
# @param group_control_number [Integer]
|
12
|
+
# @return [void]
|
13
|
+
def initialize(store, group_control_number)
|
14
|
+
@id = "GE"
|
15
|
+
@name = "Functional Group Trailer"
|
16
|
+
@ge01 = Eddy::Elements::E97.new(ref: "GE01", req: "M", val: store.number_of_transaction_sets_included)
|
17
|
+
@ge02 = Eddy::Elements::E28.new(ref: "GE02", req: "M", val: group_control_number)
|
18
|
+
super(store, @ge01, @ge02)
|
19
|
+
end
|
20
|
+
|
21
|
+
# ### GE01
|
22
|
+
#
|
23
|
+
# - Id: 97
|
24
|
+
# - Name: Number of Transaction Sets Included
|
25
|
+
# - Type: N0
|
26
|
+
# - Min/Max: 1/6
|
27
|
+
# - Description: Total number of transaction sets included in the functional group or interchange (transmission) group terminated by the trailer containing this data element
|
28
|
+
#
|
29
|
+
# @param arg [Integer]
|
30
|
+
# @return [void]
|
31
|
+
def GE01=(arg)
|
32
|
+
@ge01.value = arg
|
33
|
+
end
|
34
|
+
alias NumberOfTransactionSetsIncluded= GE01=
|
35
|
+
|
36
|
+
# ### GE02
|
37
|
+
#
|
38
|
+
# - Id: 28
|
39
|
+
# - Name: Group Control Number
|
40
|
+
# - Type: N0
|
41
|
+
# - Min/Max: 1/9
|
42
|
+
# - Description: Assigned number originated and maintained by the sender
|
43
|
+
#
|
44
|
+
# @param arg [Integer]
|
45
|
+
# @return [void]
|
46
|
+
def GE02=(arg)
|
47
|
+
@ge02.value = arg
|
48
|
+
end
|
49
|
+
alias GroupControlNumber= GE02=
|
50
|
+
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,163 @@
|
|
1
|
+
module Eddy
|
2
|
+
module Segments
|
3
|
+
# ### Segment Summary:
|
4
|
+
#
|
5
|
+
# - Id: GS
|
6
|
+
# - Name: Functional Group Header
|
7
|
+
# - Purpose: To indicate the beginning of a functional group and to provide control information.
|
8
|
+
class GS < Eddy::Segment
|
9
|
+
|
10
|
+
# @param store [Eddy::Data::Store]
|
11
|
+
# @param group_control_number [Integer]
|
12
|
+
# @param transaction_set [Eddy::TransactionSet]
|
13
|
+
# @return [void]
|
14
|
+
def initialize(store, group_control_number, transaction_set)
|
15
|
+
@id = "GS"
|
16
|
+
@name = "Functional Group Header"
|
17
|
+
@gs01 = Eddy::Elements::E479.new(ref: "GS01", req: "M", val: transaction_set.functional_group)
|
18
|
+
@gs02 = Eddy::Elements::E142.new(ref: "GS02", req: "M", val: store.application_senders_code)
|
19
|
+
@gs03 = Eddy::Elements::E124.new(ref: "GS03", req: "M", val: store.application_receivers_code)
|
20
|
+
@gs04 = Eddy::Elements::E373.new(ref: "GS04", req: "M", val: store.time)
|
21
|
+
@gs05 = Eddy::Elements::E337.new(ref: "GS05", req: "M", val: store.time) # TODO: Define time fmt for this.
|
22
|
+
@gs06 = Eddy::Elements::E28.new(ref: "GS06", req: "M", val: group_control_number)
|
23
|
+
@gs07 = Eddy::Elements::E455.new(ref: "GS07", req: "M")
|
24
|
+
@gs08 = Eddy::Elements::E480.new(ref: "GS08", req: "M", val: store.version_release_industry_id_code)
|
25
|
+
super(
|
26
|
+
store,
|
27
|
+
@gs01,
|
28
|
+
@gs02,
|
29
|
+
@gs03,
|
30
|
+
@gs04,
|
31
|
+
@gs05,
|
32
|
+
@gs06,
|
33
|
+
@gs07,
|
34
|
+
@gs08,
|
35
|
+
)
|
36
|
+
end
|
37
|
+
|
38
|
+
# ### GS01
|
39
|
+
#
|
40
|
+
# - Id: 479
|
41
|
+
# - Name: Functional Identifier Code
|
42
|
+
# - Type: ID
|
43
|
+
# - Min/Max: 2/2
|
44
|
+
# - Description: Code identifying a group of application related transaction sets
|
45
|
+
#
|
46
|
+
# @param arg [String]
|
47
|
+
# @return [void]
|
48
|
+
def GS01=(arg)
|
49
|
+
@gs01.value = arg
|
50
|
+
end
|
51
|
+
alias FunctionalIdentifierCode= GS01=
|
52
|
+
|
53
|
+
# ### GS02
|
54
|
+
#
|
55
|
+
# - Id: 142
|
56
|
+
# - Name: Application Sender's Code
|
57
|
+
# - Type: AN
|
58
|
+
# - Min/Max: 2/15
|
59
|
+
# - Description: Code identifying party sending transmission; codes agreed to by trading partners
|
60
|
+
#
|
61
|
+
# @param arg [String]
|
62
|
+
# @return [void]
|
63
|
+
def GS02=(arg)
|
64
|
+
@gs02.value = arg
|
65
|
+
end
|
66
|
+
alias ApplicationSendersCode= GS02=
|
67
|
+
|
68
|
+
# ### GS03
|
69
|
+
#
|
70
|
+
# - Id: 124
|
71
|
+
# - Name: Application Receiver's Code
|
72
|
+
# - Type: AN
|
73
|
+
# - Min/Max: 2/15
|
74
|
+
# - Description: Code identifying party receiving transmission. Codes agreed to by trading partners
|
75
|
+
#
|
76
|
+
# @param arg [String]
|
77
|
+
# @return [void]
|
78
|
+
def GS03=(arg)
|
79
|
+
@gs03.value = arg
|
80
|
+
end
|
81
|
+
alias ApplicationReceiversCode= GS03=
|
82
|
+
|
83
|
+
# ### GS04
|
84
|
+
#
|
85
|
+
# - Id: 373
|
86
|
+
# - Name: Date
|
87
|
+
# - Type: DT
|
88
|
+
# - Min/Max: 8/8
|
89
|
+
# - Description: Date expressed as CCYYMMDD
|
90
|
+
#
|
91
|
+
# @param arg [Time]
|
92
|
+
# @return [void]
|
93
|
+
def GS04=(arg)
|
94
|
+
@gs04.value = arg
|
95
|
+
end
|
96
|
+
alias Date= GS04=
|
97
|
+
|
98
|
+
# ### GS05
|
99
|
+
#
|
100
|
+
# - Id: 337
|
101
|
+
# - Name: Time
|
102
|
+
# - Type: TM
|
103
|
+
# - Min/Max: 4/8
|
104
|
+
# - 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)
|
105
|
+
#
|
106
|
+
# @param arg [Time]
|
107
|
+
# @return [void]
|
108
|
+
def GS05=(arg)
|
109
|
+
@gs05.value = arg
|
110
|
+
end
|
111
|
+
alias Time= GS05=
|
112
|
+
|
113
|
+
# ### GS06
|
114
|
+
#
|
115
|
+
# - Id: 28
|
116
|
+
# - Name: Group Control Number
|
117
|
+
# - Type: N0
|
118
|
+
# - Min/Max: 1/9
|
119
|
+
# - Description: Assigned number originated and maintained by the sender
|
120
|
+
#
|
121
|
+
# @param arg [Integer]
|
122
|
+
# @return [void]
|
123
|
+
def GS06=(arg)
|
124
|
+
@gs06.value = arg
|
125
|
+
end
|
126
|
+
alias GroupControlNumber= GS06=
|
127
|
+
|
128
|
+
# ### GS07
|
129
|
+
#
|
130
|
+
# - Id: 455
|
131
|
+
# - Name: Responsible Agency Code
|
132
|
+
# - Type: ID
|
133
|
+
# - Min/Max: 1/2
|
134
|
+
# - Description: Code used in conjunction with Data Element 480 to identify the issuer of the standard
|
135
|
+
#
|
136
|
+
# ### Notes:
|
137
|
+
#
|
138
|
+
# - (Default value: `"X"`)
|
139
|
+
# @param arg [String]
|
140
|
+
# @return [void]
|
141
|
+
def GS07=(arg)
|
142
|
+
@gs07.value = arg
|
143
|
+
end
|
144
|
+
alias ResponsibleAgencyCode= GS07=
|
145
|
+
|
146
|
+
# ### GS08
|
147
|
+
#
|
148
|
+
# - Id: 480
|
149
|
+
# - Name: Version / Release / Industry Identifier Code
|
150
|
+
# - Type: AN
|
151
|
+
# - Min/Max: 1/12
|
152
|
+
# - Description: Code indicating the version, release, subrelease, and industry identifier of the EDI standard being used, including the GS and GE segments; if code in DE455 in GS segment is X, then in DE 480 positions 1-3 are the version number; positions 4-6 are the release and subrelease, level of the version; and positions 7-12 are the industry or trade association identifiers (optionally assigned by user); if code in DE455 in GS segment is T, then other formats are allowed
|
153
|
+
#
|
154
|
+
# @param arg [String]
|
155
|
+
# @return [void]
|
156
|
+
def GS08=(arg)
|
157
|
+
@gs08.value = arg
|
158
|
+
end
|
159
|
+
alias VersionReleaseIndustryIdentifierCode= GS08=
|
160
|
+
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|