stupidedi 1.4.0 → 1.4.2
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.
- checksums.yaml +4 -4
- data/README.md +11 -5
- data/Rakefile +4 -4
- data/bin/edi-obfuscate +1 -1
- data/lib/stupidedi/config.rb +2 -0
- data/lib/stupidedi/editor/004010.rb +1 -1
- data/lib/stupidedi/editor/implementation_ack.rb +3 -3
- data/lib/stupidedi/interchanges/00501/element_defs.rb +3 -3
- data/lib/stupidedi/parser/builder_dsl.rb +4 -1
- data/lib/stupidedi/schema/abstract_element_use.rb +9 -0
- data/lib/stupidedi/schema/component_element_use.rb +2 -0
- data/lib/stupidedi/schema/composite_element_use.rb +6 -1
- data/lib/stupidedi/schema/segment_use.rb +4 -4
- data/lib/stupidedi/schema/simple_element_use.rb +2 -0
- data/lib/stupidedi/transaction_sets/004010/implementations/IN810.rb +162 -0
- data/lib/stupidedi/transaction_sets/004010/implementations.rb +1 -0
- data/lib/stupidedi/transaction_sets/004010/standards/IN810.rb +38 -0
- data/lib/stupidedi/transaction_sets/004010/standards/PR855.rb +2 -1
- data/lib/stupidedi/transaction_sets/004010/standards.rb +1 -0
- data/lib/stupidedi/transaction_sets/005010/implementations/X212-HN277.rb +552 -0
- data/lib/stupidedi/transaction_sets/005010/implementations/X220A1-BE834.rb +3 -3
- data/lib/stupidedi/transaction_sets/005010/implementations/X222A1-HC837.rb +26 -26
- data/lib/stupidedi/transaction_sets/005010/implementations/X223A2-HC837.rb +5 -5
- data/lib/stupidedi/transaction_sets/005010/implementations/X223A3-HC837.rb +5 -5
- data/lib/stupidedi/transaction_sets/005010/implementations/X279-HB271.rb +14 -14
- data/lib/stupidedi/transaction_sets/005010/implementations/X279-HS270.rb +1 -1
- data/lib/stupidedi/transaction_sets/005010/implementations/X279A1-HB271.rb +3 -3
- data/lib/stupidedi/transaction_sets/005010/implementations/X279A1-HS270.rb +1 -1
- data/lib/stupidedi/transaction_sets/005010/implementations.rb +1 -0
- data/lib/stupidedi/transaction_sets/builder/dsl.rb +192 -0
- data/lib/stupidedi/transaction_sets/builder.rb +5 -1
- data/lib/stupidedi/values/composite_element_val.rb +9 -2
- data/lib/stupidedi/values/repeated_element_val.rb +1 -1
- data/lib/stupidedi/version.rb +1 -1
- data/lib/stupidedi/versions/003010/element_defs.rb +5 -2
- data/lib/stupidedi/versions/004010/element_defs.rb +72 -2
- data/lib/stupidedi/versions/004010/segment_defs/ACK.rb +43 -0
- data/lib/stupidedi/versions/004010/segment_defs/BIG.rb +25 -0
- data/lib/stupidedi/versions/004010/segment_defs/IT1.rb +39 -0
- data/lib/stupidedi/versions/004010/segment_defs/ITD.rb +29 -0
- data/lib/stupidedi/versions/004010/segment_defs/SAC.rb +31 -0
- data/lib/stupidedi/versions/004010/segment_defs/TDS.rb +18 -0
- data/lib/stupidedi/versions/004010/segment_defs/TXI.rb +24 -0
- data/lib/stupidedi/versions/004010/segment_defs.rb +7 -0
- data/lib/stupidedi/versions/005010/element_defs.rb +170 -5
- data/lib/stupidedi/versions/common/element_types/id.rb +1 -1
- data/lib/stupidedi/versions/common/element_types/r.rb +3 -1
- metadata +16 -6
@@ -0,0 +1,192 @@
|
|
1
|
+
module Stupidedi
|
2
|
+
module TransactionSets
|
3
|
+
module Builder
|
4
|
+
class Dsl
|
5
|
+
|
6
|
+
##
|
7
|
+
# Build a definition for a given document using DSL-style.
|
8
|
+
# DSL style is a bit easier to use than manually building a syntax tree.
|
9
|
+
def self.build(shortcode, code, name, &block)
|
10
|
+
body = DocumentBodyDSL.new(&block).tables
|
11
|
+
Builder.build(shortcode, code, name, *body)
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
##
|
17
|
+
# Syntax for DSLs in which you can define elements.
|
18
|
+
module ElementSyntax
|
19
|
+
|
20
|
+
##
|
21
|
+
# Define an element within this block
|
22
|
+
def element(*args)
|
23
|
+
add_element(Builder::Element(*args))
|
24
|
+
end
|
25
|
+
|
26
|
+
##
|
27
|
+
# Define a composite element within this block, using a sub-block for the sub-elements
|
28
|
+
def composite(*args, &block)
|
29
|
+
subelements = SegmentBodyDSL.new(&block).elements
|
30
|
+
add_element(Builder::Element(*(args + subelements)))
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
##
|
36
|
+
# Syntax for DSLs in which you can define segments.
|
37
|
+
module SegmentSyntax
|
38
|
+
|
39
|
+
def segment(pos, type, name, requirement, repeat, &block)
|
40
|
+
elements = SegmentBodyDSL.new(&block).elements
|
41
|
+
segment = Builder::Segment(
|
42
|
+
pos,
|
43
|
+
type,
|
44
|
+
name,
|
45
|
+
requirement,
|
46
|
+
repeat,
|
47
|
+
*elements
|
48
|
+
)
|
49
|
+
|
50
|
+
add_segment(segment)
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
##
|
56
|
+
# Syntax for DSLs in which you can define loops.
|
57
|
+
module LoopSyntax
|
58
|
+
|
59
|
+
##
|
60
|
+
# Define a loop within this block.
|
61
|
+
# The underscore is there because "loop" is a ruby keyword.
|
62
|
+
def loop_(name, repeat, &block)
|
63
|
+
body = LoopBodyDSL.new(&block).elements
|
64
|
+
add_loop(Schema::LoopDef.build(name, repeat, *body))
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
68
|
+
|
69
|
+
##
|
70
|
+
# Syntax for DSLs in which you can define tables.
|
71
|
+
module TableSyntax
|
72
|
+
|
73
|
+
##
|
74
|
+
# Define a header table within this block.
|
75
|
+
def table_header(name, &block)
|
76
|
+
add_table(Schema::TableDef.header(name, *get_table_contents(&block)))
|
77
|
+
end
|
78
|
+
|
79
|
+
##
|
80
|
+
# Define a detail table within this block
|
81
|
+
def table_detail(name, &block)
|
82
|
+
add_table(Schema::TableDef.detail(name, *get_table_contents(&block)))
|
83
|
+
end
|
84
|
+
|
85
|
+
##
|
86
|
+
# Helper method to get the body of a table.
|
87
|
+
def get_table_contents(&block)
|
88
|
+
TableBodyDSL.new(&block).elements
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
|
93
|
+
##
|
94
|
+
# Syntax for DSLs in which you can define values lists.
|
95
|
+
module ValuesSyntax
|
96
|
+
|
97
|
+
def values(*args)
|
98
|
+
Builder::Values(*args)
|
99
|
+
end
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# A DSL for the body of a loop, which allows defining loops and segments
|
105
|
+
class LoopBodyDSL
|
106
|
+
|
107
|
+
include LoopSyntax
|
108
|
+
include SegmentSyntax
|
109
|
+
|
110
|
+
def initialize(&block)
|
111
|
+
@elements = []
|
112
|
+
instance_eval(&block)
|
113
|
+
end
|
114
|
+
|
115
|
+
attr_accessor :elements
|
116
|
+
|
117
|
+
def add_loop(loop_)
|
118
|
+
elements << loop_
|
119
|
+
end
|
120
|
+
|
121
|
+
def add_segment(segment)
|
122
|
+
elements << segment
|
123
|
+
end
|
124
|
+
|
125
|
+
end
|
126
|
+
|
127
|
+
##
|
128
|
+
# A DSL for the body of a segment, which allows defining elements and using
|
129
|
+
# values lists.
|
130
|
+
class SegmentBodyDSL
|
131
|
+
|
132
|
+
include ElementSyntax
|
133
|
+
include ValuesSyntax
|
134
|
+
|
135
|
+
def initialize(&block)
|
136
|
+
@elements = []
|
137
|
+
instance_eval(&block)
|
138
|
+
end
|
139
|
+
|
140
|
+
def add_element(e)
|
141
|
+
@elements << e
|
142
|
+
end
|
143
|
+
|
144
|
+
attr_accessor :elements
|
145
|
+
end
|
146
|
+
|
147
|
+
##
|
148
|
+
# A DSL for the body of a table, which allows defining segments and loops.
|
149
|
+
class TableBodyDSL
|
150
|
+
|
151
|
+
include LoopSyntax
|
152
|
+
include SegmentSyntax
|
153
|
+
|
154
|
+
def initialize(&block)
|
155
|
+
@elements = []
|
156
|
+
instance_eval(&block)
|
157
|
+
end
|
158
|
+
|
159
|
+
def add_loop(l)
|
160
|
+
@elements << l
|
161
|
+
end
|
162
|
+
|
163
|
+
def add_segment(segment)
|
164
|
+
@elements << segment
|
165
|
+
end
|
166
|
+
|
167
|
+
attr_accessor :elements
|
168
|
+
end
|
169
|
+
|
170
|
+
##
|
171
|
+
# A DSL for the body of a document, which allows defining tables.
|
172
|
+
class DocumentBodyDSL
|
173
|
+
|
174
|
+
include TableSyntax
|
175
|
+
|
176
|
+
def initialize(&block)
|
177
|
+
@tables = []
|
178
|
+
instance_eval(&block)
|
179
|
+
end
|
180
|
+
|
181
|
+
attr_accessor :tables
|
182
|
+
|
183
|
+
def add_table(table)
|
184
|
+
tables << table
|
185
|
+
end
|
186
|
+
|
187
|
+
end
|
188
|
+
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
@@ -7,8 +7,12 @@ module Stupidedi
|
|
7
7
|
# {Builder} is a simple DSL for construction a transaction set
|
8
8
|
#
|
9
9
|
module Builder
|
10
|
+
|
11
|
+
autoload :Dsl, "stupidedi/transaction_sets/builder/dsl"
|
12
|
+
|
10
13
|
end
|
11
14
|
|
15
|
+
|
12
16
|
class << Builder
|
13
17
|
# @return [Schema::TransactionSetDef]
|
14
18
|
def build(functional_group, id, name, *table_defs)
|
@@ -150,7 +154,7 @@ module Stupidedi
|
|
150
154
|
end
|
151
155
|
|
152
156
|
allowed_values = arguments.select{|x| x.is_a?(Array) and x.head == :Values }
|
153
|
-
|
157
|
+
|
154
158
|
if allowed_values.length == 1
|
155
159
|
begin
|
156
160
|
changes[:allowed_values] = element_use.allowed_values.replace(allowed_values.head.last)
|
@@ -17,8 +17,6 @@ module Stupidedi
|
|
17
17
|
|
18
18
|
def_delegators :@usage, :definition, :descriptor
|
19
19
|
|
20
|
-
def_delegators "@children.head", :position
|
21
|
-
|
22
20
|
def initialize(children, usage)
|
23
21
|
@children, @usage =
|
24
22
|
children, usage
|
@@ -31,6 +29,15 @@ module Stupidedi
|
|
31
29
|
changes.fetch(:usage, @usage)
|
32
30
|
end
|
33
31
|
|
32
|
+
def position
|
33
|
+
if @children.present?
|
34
|
+
@children.head.position
|
35
|
+
else
|
36
|
+
# GH-194
|
37
|
+
"<position unknown>"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
34
41
|
# @return false
|
35
42
|
def leaf?
|
36
43
|
false
|
data/lib/stupidedi/version.rb
CHANGED
@@ -2664,7 +2664,9 @@ module Stupidedi
|
|
2664
2664
|
E301 = t::ID.new(:E301 , "Car Type Code" , 1, 4)
|
2665
2665
|
E305 = t::ID.new(:E305, "Transaction Handling Code" , 1, 1,
|
2666
2666
|
s::CodeList.build(
|
2667
|
-
"I" => "Remittance Information Only"
|
2667
|
+
"I" => "Remittance Information Only",
|
2668
|
+
"C" => "Payment Accompanies Remittance Advice",
|
2669
|
+
"X" => "Make Payment and Send Remittance Advice"))
|
2668
2670
|
E306 = t::ID.new(:E306 , "Action Code" , 1, 2,
|
2669
2671
|
s::CodeList.build(
|
2670
2672
|
"0" => "Authorize",
|
@@ -4704,7 +4706,8 @@ module Stupidedi
|
|
4704
4706
|
"ZZ" => "Mutually Defined"))
|
4705
4707
|
E591 = t::ID.new(:E591, "Payment Method Code" , 3, 3,
|
4706
4708
|
s::CodeList.build(
|
4707
|
-
"PBC" => "Pay by Check"
|
4709
|
+
"PBC" => "Pay by Check",
|
4710
|
+
"ZZZ" => "Mutually Defined"))
|
4708
4711
|
E595 = t::ID.new(:E595 , "Compartment ID Code" , 1, 1,
|
4709
4712
|
s::CodeList.build(
|
4710
4713
|
"1" => "Brake End",
|
@@ -30,7 +30,7 @@ module Stupidedi
|
|
30
30
|
"RC" => "Refrigerated (Reefer) Car",
|
31
31
|
"RT" => "Controlled Temperature Trailer (Reefer)",
|
32
32
|
"SU" => "Supplier/Manufacturer",
|
33
|
-
"TF" => "Trailer,
|
33
|
+
"TF" => "Trailer, Dry Freight",
|
34
34
|
"TL" => "Trailer (not otherwise specified)",
|
35
35
|
"TV" => "Truck, Van"))
|
36
36
|
E46 = t::AN.new(:E46 , "Ex Parte" , 4, 4)
|
@@ -4045,6 +4045,8 @@ module Stupidedi
|
|
4045
4045
|
"BL" => "Brand/Label",
|
4046
4046
|
"CB" => "Buyer's Part Number",
|
4047
4047
|
"ER" => "Jurisdiction Specific Procedure and Supply Codes",
|
4048
|
+
"EN" => "European Article Number (EAN)",
|
4049
|
+
"GC" => "Grade Code",
|
4048
4050
|
"HC" => "Health Care Financing Administration Common Procedural Coding System (HCPCS) Codes",
|
4049
4051
|
"ID" => "International Classification of Diseases Clinical Modification (ICD-9-CM) - Procedure",
|
4050
4052
|
"IV" => "Home Infusion EDI Coalition (HIEC) Product/Service Code",
|
@@ -4678,6 +4680,7 @@ module Stupidedi
|
|
4678
4680
|
E310 = t::AN.new(:E310 , "Location Identifier" , 1, 30)
|
4679
4681
|
E319 = t::AN.new(:E319 , "Temperature Control" , 3, 6)
|
4680
4682
|
E324 = t::AN.new(:E324 , "Purchase Order Number" , 1, 22)
|
4683
|
+
E326 = t::AN.new(:E326 , "Request Reference Number" , 1, 45)
|
4681
4684
|
E328 = t::AN.new(:E328 , "Release Number" , 1, 30)
|
4682
4685
|
E329 = t::ID.new(:E329 , "Transaction Set Control Number" , 4, 9)
|
4683
4686
|
E330 = t:: R.new(:E330 , "Quantity Ordered" , 1, 15)
|
@@ -5411,7 +5414,9 @@ module Stupidedi
|
|
5411
5414
|
s::CodeList.build(
|
5412
5415
|
"PE" => "Price per Each",
|
5413
5416
|
"PP" => "Price per Pound",
|
5414
|
-
"UM" => "Price per Unit of Measure"
|
5417
|
+
"UM" => "Price per Unit of Measure",
|
5418
|
+
"PC" => "Price per Case",
|
5419
|
+
"ZZ" => "Mutually Defined"))
|
5415
5420
|
E640 = t::ID.new(:E640 , "Transaction Type Code" , 2, 2,
|
5416
5421
|
s::CodeList.build(
|
5417
5422
|
"01" => "Location Address Message",
|
@@ -9461,6 +9466,71 @@ module Stupidedi
|
|
9461
9466
|
s::CodeList.external("559"))
|
9462
9467
|
E1715 = t::ID.new(:E1715, "Country Subdivision Code" , 1, 3,
|
9463
9468
|
s::CodeList.external("5"))
|
9469
|
+
E1716 = t::AN.new(:E1716, "Change Order Sequence Number" , 1, 8)
|
9470
|
+
E1717 = t::ID.new(:E1717, "Allowance or Charge Indicator" , 1, 1,
|
9471
|
+
s::CodeList.build(
|
9472
|
+
"A" => "Allowance",
|
9473
|
+
"C" => "Charge",
|
9474
|
+
"N" => "No Allowance or Charge"))
|
9475
|
+
E1718 = t::ID.new(:E1718, "Allowance or Charge Indicator" , 4, 4,
|
9476
|
+
s::CodeList.build(
|
9477
|
+
"A310" => "Air Express Charge",
|
9478
|
+
"A930" => "Carrier Credit Allowance",
|
9479
|
+
"B720" => "Cooperative Advertising Allowance",
|
9480
|
+
"B820" => "Currency Adjustment",
|
9481
|
+
"B860" => "Customs Broker Fee",
|
9482
|
+
"B870" => "Customs Charge",
|
9483
|
+
"B872" => "Customs Duty",
|
9484
|
+
"B994" => "Declared Value for Customs",
|
9485
|
+
"C000" => "Defective Allowance",
|
9486
|
+
"C040" => "Delivery",
|
9487
|
+
"C260" => "Discount - Incentive",
|
9488
|
+
"C860" => "Expedited Shipments",
|
9489
|
+
"D170" => "Free Goods",
|
9490
|
+
"D240" => "Freight",
|
9491
|
+
"D360" => "Goods and Services Tax Charge",
|
9492
|
+
"D500" => "Handling",
|
9493
|
+
"D900" => "Installation",
|
9494
|
+
"E170" => "Labeling",
|
9495
|
+
"F155" => "Packaging",
|
9496
|
+
"F330" => "Pick-up and Delivery",
|
9497
|
+
"F920" => "Quantity Surcharge",
|
9498
|
+
"G740" => "Service Charge",
|
9499
|
+
"G970" => "Small Order Charge",
|
9500
|
+
"H090" => "Special Handling",
|
9501
|
+
"H151" => "Special Services",
|
9502
|
+
"H640" => "Tax - Excist Tax - Destination",
|
9503
|
+
"H740" => "Tax - Sate and Use",
|
9504
|
+
"H770" => "Tax - Sate Tax",
|
9505
|
+
"H750" => "Tax - Sales Tax",
|
9506
|
+
"H800" => "Tax - VAT",
|
9507
|
+
"I170" => "Trade Discountt",
|
9508
|
+
"ZZZZ" => "Mutually Defined"))
|
9509
|
+
E1719 = t::AN.new(:E1719, "Agency Service, Promotion, Allowance, or Charge Code", 1, 10)
|
9510
|
+
E1720 = t::ID.new(:E1720, "Allowance/Charge Percent Qualifier" , 1, 1)
|
9511
|
+
E1721 = t:: R.new(:E1721, "Rate" , 1, 10)
|
9512
|
+
E1722 = t::ID.new(:E1722, "Allowance or Charge Method of Handling Code", 2, 2)
|
9513
|
+
E1723 = t::AN.new(:E1723, "Option Number" , 1, 20)
|
9514
|
+
E1724 = t::ID.new(:E1724, "Tax Type Code" , 2, 2)
|
9515
|
+
E1725 = t::ID.new(:E1725, "Tax Jurisdiction Code Qualifier" , 2, 2)
|
9516
|
+
E1726 = t::AN.new(:E1726, "Tax Jurisdiction Code" , 1, 10)
|
9517
|
+
E1727 = t::ID.new(:E1727, "Tax Exempt Code" , 1, 1)
|
9518
|
+
E1728 = t::ID.new(:E1728, "Relationship Code" , 1, 1)
|
9519
|
+
E1729 = t:: R.new(:E1729, "Dollar Basis for Percent" , 1, 9)
|
9520
|
+
E1730 = t::AN.new(:E1730, "Tax Identification Number" , 1, 20)
|
9521
|
+
E1731 = t::AN.new(:E1731, "Assigned Identification" , 1, 20)
|
9522
|
+
E1732 = t:: R.new(:E1732, "Quantity Invoiced" , 1, 10)
|
9523
|
+
E1733 = t::ID.new(:E1733, "Terms Type Code" , 2, 2)
|
9524
|
+
E1734 = t::ID.new(:E1734, "Terms Basis Date Code" , 1, 2)
|
9525
|
+
E1735 = t::DT.new(:E1735, "Terms Discount Due Date" , 8, 8)
|
9526
|
+
E1736 = t::Nn.new(:E1736, "Terms Discount Days Due" , 1, 3, 0)
|
9527
|
+
E1737 = t::DT.new(:E1737, "Terms Net Due Date" , 8, 8)
|
9528
|
+
E1738 = t::Nn.new(:E1738, "Terms Net Days" , 1, 3, 0)
|
9529
|
+
E1739 = t::Nn.new(:E1739, "Terms Discount Amount" , 1, 10, 2)
|
9530
|
+
E1740 = t::DT.new(:E1740, "Terms Deferred Due Date" , 8, 8)
|
9531
|
+
E1741 = t::Nn.new(:E1741, "Deferred Amount Due" , 1, 10, 2)
|
9532
|
+
E1742 = t::Nn.new(:E1742, "Day of Month" , 1, 2, 0)
|
9533
|
+
E1743 = t::ID.new(:E1743, "Payment Method Code" , 1, 2)
|
9464
9534
|
C001 = Schema::CompositeElementDef.build(:C001,
|
9465
9535
|
"Composite Unit of Measure",
|
9466
9536
|
"To identify a composite unit of measure",
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Stupidedi
|
3
|
+
module Versions
|
4
|
+
module FortyTen
|
5
|
+
module SegmentDefs
|
6
|
+
s = Schema
|
7
|
+
e = ElementDefs
|
8
|
+
r = ElementReqs
|
9
|
+
|
10
|
+
ACK = s::SegmentDef.build(:ACK, "Line Item Acknowledgment", "To start acknowledgement of a line item",
|
11
|
+
e::E668 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
12
|
+
e::E380 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
13
|
+
e::E355 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
14
|
+
e::E374 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
15
|
+
e::E373 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
16
|
+
e::E326 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
17
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
18
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
19
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
20
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
21
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
22
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
23
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
24
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
25
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
26
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
27
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
28
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
29
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
30
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
31
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
32
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
33
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
34
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
35
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
36
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
37
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
38
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
39
|
+
e::E1271 .simple_use(r::Optional, s::RepeatCount.bounded(1)))
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Stupidedi
|
3
|
+
module Versions
|
4
|
+
module FortyTen
|
5
|
+
module SegmentDefs
|
6
|
+
s = Schema
|
7
|
+
e = ElementDefs
|
8
|
+
r = ElementReqs
|
9
|
+
|
10
|
+
BIG = s::SegmentDef.build(:BIG, "Beginning Segment for Invoice",
|
11
|
+
"To indicate the beginning of the Invoice Transaction Set and transmit identifying numbers and dates",
|
12
|
+
e::E32 .simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
|
13
|
+
e::E76 .simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
|
14
|
+
e::E32 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
15
|
+
e::E324 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
16
|
+
e::E328 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
17
|
+
e::E1716.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
18
|
+
e::E640 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
19
|
+
e::E353 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
20
|
+
e::E306 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
21
|
+
e::E76 .simple_use(r::Optional, s::RepeatCount.bounded(1)))
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Stupidedi
|
3
|
+
module Versions
|
4
|
+
module FortyTen
|
5
|
+
module SegmentDefs
|
6
|
+
s = Schema
|
7
|
+
e = ElementDefs
|
8
|
+
r = ElementReqs
|
9
|
+
|
10
|
+
IT1 = s::SegmentDef.build(:IT1, "Baseline Item Data (Invoice)", "Invoice Lines",
|
11
|
+
e::E1731.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
12
|
+
e::E1732.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
13
|
+
e::E355 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
14
|
+
e::E212 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
15
|
+
e::E639 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
16
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
17
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
18
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
19
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
20
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
21
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
22
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
23
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
24
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
25
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
26
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
27
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
28
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
29
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
30
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
31
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
32
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
33
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
34
|
+
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
35
|
+
e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)))
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Stupidedi
|
3
|
+
module Versions
|
4
|
+
module FortyTen
|
5
|
+
module SegmentDefs
|
6
|
+
s = Schema
|
7
|
+
e = ElementDefs
|
8
|
+
r = ElementReqs
|
9
|
+
|
10
|
+
ITD = s::SegmentDef.build(:ITD, "Terms of Sale/Deferred Terms of Sale", "Terms of Sale/Deferred Terms of Sale",
|
11
|
+
e::E1733.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
12
|
+
e::E1734.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
13
|
+
e::E954 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
14
|
+
e::E1735.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
15
|
+
e::E1736.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
16
|
+
e::E1737.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
17
|
+
e::E1738.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
18
|
+
e::E1739.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
19
|
+
e::E1740.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
20
|
+
e::E1741.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
21
|
+
e::E954 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
22
|
+
e::E352 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
23
|
+
e::E1742.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
24
|
+
e::E1743.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
25
|
+
e::E954 .simple_use(r::Optional, s::RepeatCount.bounded(1)))
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Stupidedi
|
3
|
+
module Versions
|
4
|
+
module FortyTen
|
5
|
+
module SegmentDefs
|
6
|
+
s = Schema
|
7
|
+
e = ElementDefs
|
8
|
+
r = ElementReqs
|
9
|
+
|
10
|
+
SAC = s::SegmentDef.build(:SAC, "Service, Promotion, Allowance, or Charge Information",
|
11
|
+
"To indicate the header charge information",
|
12
|
+
e::E1717.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
13
|
+
e::E1718.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
14
|
+
e::E559 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
15
|
+
e::E1719.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
16
|
+
e::E782 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
17
|
+
e::E1720.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
18
|
+
e::E954 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
19
|
+
e::E1721.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
20
|
+
e::E355 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
21
|
+
e::E380 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
22
|
+
e::E380 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
23
|
+
e::E1722.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
24
|
+
e::E127 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
25
|
+
e::E1723.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
26
|
+
e::E352 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
27
|
+
e::E819 .simple_use(r::Optional, s::RepeatCount.bounded(1)))
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Stupidedi
|
3
|
+
module Versions
|
4
|
+
module FortyTen
|
5
|
+
module SegmentDefs
|
6
|
+
s = Schema
|
7
|
+
e = ElementDefs
|
8
|
+
r = ElementReqs
|
9
|
+
|
10
|
+
TDS = s::SegmentDef.build(:TDS, "Total Monetary Value Summary", "Total Monetary Value Summary",
|
11
|
+
e::E610.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
12
|
+
e::E610.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
13
|
+
e::E610.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
14
|
+
e::E610.simple_use(r::Optional, s::RepeatCount.bounded(1)))
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Stupidedi
|
3
|
+
module Versions
|
4
|
+
module FortyTen
|
5
|
+
module SegmentDefs
|
6
|
+
s = Schema
|
7
|
+
e = ElementDefs
|
8
|
+
r = ElementReqs
|
9
|
+
|
10
|
+
TXI = s::SegmentDef.build(:TXI, "Tax Information", "Tax Information",
|
11
|
+
e::E1724.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
12
|
+
e::E782 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
13
|
+
e::E954 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
14
|
+
e::E1725.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
15
|
+
e::E1726.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
16
|
+
e::E1727.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
17
|
+
e::E1728.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
18
|
+
e::E1729.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
19
|
+
e::E1730.simple_use(r::Optional, s::RepeatCount.bounded(1)),
|
20
|
+
e::E1731.simple_use(r::Optional, s::RepeatCount.bounded(1)))
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -3,6 +3,7 @@ module Stupidedi
|
|
3
3
|
module Versions
|
4
4
|
module FortyTen
|
5
5
|
module SegmentDefs
|
6
|
+
autoload :ACK, "stupidedi/versions/004010/segment_defs/ACK"
|
6
7
|
autoload :AK1, "stupidedi/versions/004010/segment_defs/AK1"
|
7
8
|
autoload :AK2, "stupidedi/versions/004010/segment_defs/AK2"
|
8
9
|
autoload :AK3, "stupidedi/versions/004010/segment_defs/AK3"
|
@@ -20,6 +21,12 @@ module Stupidedi
|
|
20
21
|
autoload :BAK, "stupidedi/versions/004010/segment_defs/BAK"
|
21
22
|
autoload :BCT, "stupidedi/versions/004010/segment_defs/BCT"
|
22
23
|
autoload :BEG, "stupidedi/versions/004010/segment_defs/BEG"
|
24
|
+
autoload :BIG, "stupidedi/versions/004010/segment_defs/BIG"
|
25
|
+
autoload :ITD, "stupidedi/versions/004010/segment_defs/ITD"
|
26
|
+
autoload :IT1, "stupidedi/versions/004010/segment_defs/IT1"
|
27
|
+
autoload :TXI, "stupidedi/versions/004010/segment_defs/TXI"
|
28
|
+
autoload :TDS, "stupidedi/versions/004010/segment_defs/TDS"
|
29
|
+
autoload :SAC, "stupidedi/versions/004010/segment_defs/SAC"
|
23
30
|
autoload :BFR, "stupidedi/versions/004010/segment_defs/BFR"
|
24
31
|
autoload :BPR, "stupidedi/versions/004010/segment_defs/BPR"
|
25
32
|
autoload :BSN, "stupidedi/versions/004010/segment_defs/BSN"
|