eancom 1.6.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +7 -4
  3. data/.gitlab-ci.yml +11 -13
  4. data/.ruby-version +1 -1
  5. data/Gemfile +2 -4
  6. data/Gemfile.lock +21 -103
  7. data/README.md +46 -0
  8. data/definitions/desadv/d01b.rb +134 -87
  9. data/definitions/desadv/d96a.rb +145 -82
  10. data/definitions/invoic/d01b.rb +559 -0
  11. data/definitions/invoic/d96a.rb +389 -0
  12. data/definitions/invrpt/d01b.rb +134 -0
  13. data/definitions/invrpt/d96a.rb +125 -0
  14. data/definitions/orders/d01b.rb +182 -0
  15. data/definitions/orders/d96b.rb +198 -0
  16. data/definitions/ordrsp/d01b.rb +251 -0
  17. data/definitions/ordrsp/d96b.rb +226 -0
  18. data/definitions/pricat/d01b.rb +225 -0
  19. data/definitions/pricat/d96b.rb +207 -0
  20. data/definitions/retann/d01b.rb +172 -0
  21. data/definitions/retann/d96b.rb +221 -0
  22. data/definitions/segments/ajt.rb +47 -0
  23. data/definitions/segments/alc.rb +128 -36
  24. data/definitions/segments/bgm.rb +122 -2
  25. data/definitions/segments/cdi.rb +39 -0
  26. data/definitions/segments/cnt.rb +4 -0
  27. data/definitions/segments/cta.rb +89 -0
  28. data/definitions/segments/cux.rb +9 -2
  29. data/definitions/segments/dgs.rb +34 -0
  30. data/definitions/segments/doc.rb +45 -0
  31. data/definitions/segments/dtm.rb +75 -20
  32. data/definitions/segments/efi.rb +67 -0
  33. data/definitions/segments/eqd.rb +37 -0
  34. data/definitions/segments/ftx.rb +22 -8
  35. data/definitions/segments/gin.rb +113 -0
  36. data/definitions/segments/imd.rb +9 -13
  37. data/definitions/segments/inv.rb +94 -0
  38. data/definitions/segments/lin.rb +24 -4
  39. data/definitions/segments/loc.rb +52 -4
  40. data/definitions/segments/moa.rb +86 -2
  41. data/definitions/segments/nad.rb +69 -9
  42. data/definitions/segments/pac.rb +12 -0
  43. data/definitions/segments/pat.rb +171 -0
  44. data/definitions/segments/pcd.rb +9 -92
  45. data/definitions/segments/pci.rb +110 -0
  46. data/definitions/segments/pgi.rb +7 -3
  47. data/definitions/segments/pia.rb +21 -29
  48. data/definitions/segments/pri.rb +25 -13
  49. data/definitions/segments/qty.rb +208 -2
  50. data/definitions/segments/rff.rb +49 -13
  51. data/definitions/segments/rte.rb +52 -0
  52. data/definitions/segments/tax.rb +17 -10
  53. data/definitions/segments/tdt.rb +24 -0
  54. data/definitions/segments/tod.rb +64 -0
  55. data/definitions/segments/tru.rb +34 -0
  56. data/definitions/segments/una.rb +8 -8
  57. data/definitions/segments/unb.rb +4 -4
  58. data/definitions/segments/unh.rb +70 -5
  59. data/definitions/segments/uns.rb +2 -2
  60. data/definitions/segments/unt.rb +2 -2
  61. data/definitions/slsrpt/d01b.rb +132 -128
  62. data/definitions/slsrpt/d96a.rb +132 -129
  63. data/eancom.gemspec +5 -8
  64. data/lib/eancom/edifact/body.rb +37 -18
  65. data/lib/eancom/edifact/document.rb +20 -16
  66. data/lib/eancom/edifact/footer.rb +1 -0
  67. data/lib/eancom/edifact/item.rb +1 -1
  68. data/lib/eancom/edifact/message.rb +7 -39
  69. data/lib/eancom/edifact/segment.rb +9 -11
  70. data/lib/eancom/edifact/segments/ajt.rb +32 -0
  71. data/lib/eancom/edifact/segments/ali.rb +2 -4
  72. data/lib/eancom/edifact/segments/bgm.rb +4 -3
  73. data/lib/eancom/edifact/segments/cdi.rb +30 -0
  74. data/lib/eancom/edifact/segments/cnt.rb +8 -1
  75. data/lib/eancom/edifact/segments/cps.rb +4 -1
  76. data/lib/eancom/edifact/segments/cta.rb +30 -0
  77. data/lib/eancom/edifact/segments/cux.rb +1 -1
  78. data/lib/eancom/edifact/segments/dgs.rb +31 -0
  79. data/lib/eancom/edifact/segments/doc.rb +30 -0
  80. data/lib/eancom/edifact/segments/dtm.rb +10 -6
  81. data/lib/eancom/edifact/segments/efi.rb +38 -0
  82. data/lib/eancom/edifact/segments/eqd.rb +30 -0
  83. data/lib/eancom/edifact/segments/ftx.rb +2 -2
  84. data/lib/eancom/edifact/segments/gin.rb +45 -0
  85. data/lib/eancom/edifact/segments/imd.rb +1 -1
  86. data/lib/eancom/edifact/segments/inv.rb +43 -0
  87. data/lib/eancom/edifact/segments/lin.rb +7 -4
  88. data/lib/eancom/edifact/segments/loc.rb +8 -9
  89. data/lib/eancom/edifact/segments/mea.rb +1 -0
  90. data/lib/eancom/edifact/segments/moa.rb +3 -3
  91. data/lib/eancom/edifact/segments/nad.rb +11 -6
  92. data/lib/eancom/edifact/segments/pac.rb +3 -1
  93. data/lib/eancom/edifact/segments/pat.rb +37 -0
  94. data/lib/eancom/edifact/segments/pcd.rb +6 -17
  95. data/lib/eancom/edifact/segments/pci.rb +40 -0
  96. data/lib/eancom/edifact/segments/pia.rb +1 -0
  97. data/lib/eancom/edifact/segments/pri.rb +0 -1
  98. data/lib/eancom/edifact/segments/qty.rb +9 -5
  99. data/lib/eancom/edifact/segments/rff.rb +8 -2
  100. data/lib/eancom/edifact/segments/rte.rb +33 -0
  101. data/lib/eancom/edifact/segments/tax.rb +7 -1
  102. data/lib/eancom/edifact/segments/tdt.rb +4 -1
  103. data/lib/eancom/edifact/segments/tod.rb +33 -0
  104. data/lib/eancom/edifact/segments/tru.rb +31 -0
  105. data/lib/eancom/edifact/segments/una.rb +2 -1
  106. data/lib/eancom/edifact/segments/unb.rb +4 -5
  107. data/lib/eancom/edifact/segments/unh.rb +6 -4
  108. data/lib/eancom/edifact/segments/uns.rb +4 -1
  109. data/lib/eancom/edifact/structure.rb +0 -1
  110. data/lib/eancom/edifact.rb +15 -4
  111. data/lib/eancom/factory.rb +1 -1
  112. data/lib/eancom/parser/document.rb +3 -16
  113. data/lib/eancom/parser/segment.rb +9 -10
  114. data/lib/eancom/version.rb +1 -3
  115. data/lib/eancom.rb +3 -1
  116. data/pricat.json +1 -0
  117. metadata +45 -51
  118. data/.rubocop.yml +0 -2
  119. data/.tool-versions +0 -1
  120. data/definitions/segments/qvr.rb +0 -140
  121. data/lib/eancom/edifact/location.rb +0 -56
  122. data/lib/eancom/edifact/segments/qvr.rb +0 -50
@@ -36,6 +36,10 @@ currency_type_dictionary = {
36
36
  description: 'Price list currency',
37
37
  identifier: 'price_list_currency'
38
38
  },
39
+ '9' => {
40
+ description: 'Order currency',
41
+ identifier: 'order_currency'
42
+ },
39
43
  '10' => {
40
44
  description: 'Pricing_currency',
41
45
  identifier: 'pricing_currency'
@@ -43,6 +47,10 @@ currency_type_dictionary = {
43
47
  '11' => {
44
48
  description: 'Payment currency',
45
49
  identifier: 'payment_currency'
50
+ },
51
+ '12' => {
52
+ description: 'Quotation currency',
53
+ identifier: 'quotation_currency'
46
54
  }
47
55
  }
48
56
 
@@ -55,7 +63,6 @@ data = Eancom::Edifact::Data.new(
55
63
  description: 'Currency usage code qualifier',
56
64
  required: true
57
65
  )
58
-
59
66
  currency_details.add(:currency_usage_code_qualifier_1, data)
60
67
 
61
68
  data = Eancom::Edifact::Data.new(
@@ -98,7 +105,7 @@ data = Eancom::Edifact::Data.new(
98
105
  length: 1..3,
99
106
  dictionary: currency_type_dictionary,
100
107
  description: 'Currency usage code qualifier',
101
- required: false
108
+ required: true
102
109
  )
103
110
 
104
111
  currency_details_2.add(:currency_usage_code_qualifier_2, data)
@@ -0,0 +1,34 @@
1
+ tag = 'DGS'
2
+ Eancom.register_segment(tag: tag, klass: Eancom::Edifact::DGS)
3
+
4
+ structure = Eancom::Edifact::Structure.new(tag: tag)
5
+ #==============================================================================
6
+ # Tag #
7
+ #==============================================================================
8
+ tag = Eancom::Edifact::Composite.new()
9
+ data = Eancom::Edifact::Data.new(
10
+ type: String,
11
+ length: 3,
12
+ dictionary: nil,
13
+ description: "Message Header",
14
+ required: true
15
+ )
16
+ tag.add(:tag, data)
17
+
18
+ structure << tag
19
+ #==============================================================================
20
+ # HAZARD CODE #
21
+ #==============================================================================
22
+ hazard_identification_code = Eancom::Edifact::Composite.new()
23
+ data = Eancom::Edifact::Data.new(
24
+ type: String,
25
+ length: 1..7,
26
+ dictionary: nil,
27
+ description: 'Hazard identification code',
28
+ required: true
29
+ )
30
+ hazard_identification_code.add(:hazard_identification_code, data)
31
+
32
+ structure << hazard_identification_code
33
+ #==============================================================================
34
+ Eancom.register_structure(tag: 'DGS', structure: structure)
@@ -0,0 +1,45 @@
1
+ tag = 'DOC'
2
+ Eancom.register_segment(tag: tag, klass: Eancom::Edifact::DOC)
3
+
4
+ structure = Eancom::Edifact::Structure.new(tag: tag)
5
+ #==============================================================================
6
+ # Tag #
7
+ #==============================================================================
8
+ tag = Eancom::Edifact::Composite.new
9
+ data = Eancom::Edifact::Data.new(
10
+ type: String,
11
+ length: 1..3,
12
+ dictionary: nil,
13
+ description: 'Message Header',
14
+ required: true
15
+ )
16
+ tag.add(:tag, data)
17
+
18
+ structure << tag
19
+ #==============================================================================
20
+ # DOCUMENT/MESSAGE NAME #
21
+ #==============================================================================
22
+ document_name_code = Eancom::Edifact::Composite.new
23
+
24
+ data = Eancom::Edifact::Data.new(
25
+ type: String,
26
+ length: 1..3,
27
+ dictionary: {
28
+ '270' => {
29
+ description: 'Delivery note'
30
+ },
31
+ '381' => {
32
+ description: 'Credit note - goods and services'
33
+ },
34
+ '71E' => {
35
+ description: 'Instruction for returns (GS1 Temporary Code)'
36
+ }
37
+ },
38
+ description: 'Document name code',
39
+ required: false
40
+ )
41
+ document_name_code.add(:document_name_code, data)
42
+
43
+ structure << document_name_code
44
+ #==============================================================================
45
+ Eancom.register_structure(tag: 'DOC', structure: structure)
@@ -21,9 +21,13 @@ type_dictionary = {
21
21
  identifier: 'service_completion_date_time_actual'
22
22
  },
23
23
  '2' => {
24
- description: 'Delivery date/time, reqested',
24
+ description: 'Delivery date/time, requested',
25
25
  identifier: 'delivery_date_time'
26
26
  },
27
+ '3' => {
28
+ description: 'Invoice date/time, requested',
29
+ identifier: 'invoice_date_time'
30
+ },
27
31
  '7' => {
28
32
  description: 'Effectiv date/time',
29
33
  identifier: 'effectiv_date_time'
@@ -32,6 +36,14 @@ type_dictionary = {
32
36
  description: 'Despatch date and/or time',
33
37
  identifier: 'despatch_date_and_or_time'
34
38
  },
39
+ '12' => {
40
+ description: 'Terms discount due date/time',
41
+ identifier: 'terms_discount_due_date_time'
42
+ },
43
+ '13' => {
44
+ description: 'Terms net due date',
45
+ identifier: 'terms_net_due_date'
46
+ },
35
47
  '17' => {
36
48
  description: 'Delivery date/time, estimated',
37
49
  identifier: 'delivery_date_time_estimated'
@@ -68,10 +80,34 @@ type_dictionary = {
68
80
  description: 'Delivery date/time, earliest',
69
81
  identifier: 'delivery_date_time_earliest'
70
82
  },
83
+ '100' => {
84
+ description: 'Product ageing period before delivery',
85
+ identifier: 'product_ageing_period_before_delivery'
86
+ },
87
+ '110' => {
88
+ description: 'ship date/time',
89
+ identifier: 'ship_date_time'
90
+ },
91
+ '132' => {
92
+ description: 'Arrival date/time, estimated',
93
+ identifier: 'arrival_date_time_estimated'
94
+ },
95
+ '133' => {
96
+ description: 'Departure date/time, estimated',
97
+ identifier: 'departure_date_time_estimated'
98
+ },
99
+ '134' => {
100
+ description: 'Rate of exchange date/time',
101
+ identifier: 'rate_of_exchange_date_time'
102
+ },
71
103
  '137' => {
72
104
  description: 'Document/message date/time',
73
105
  identifier: 'document_message_date_time'
74
106
  },
107
+ '140' => {
108
+ description: 'Payment due date',
109
+ identifier: 'payment_due_date'
110
+ },
75
111
  '157' => {
76
112
  description: 'Validity start date',
77
113
  identifier: 'valitity_start_date'
@@ -80,6 +116,10 @@ type_dictionary = {
80
116
  description: 'Reference date/time',
81
117
  identifier: 'reference_date_time'
82
118
  },
119
+ '186' => {
120
+ description: 'Departure date/time, actual',
121
+ identifier: 'departure_date_time_actual'
122
+ },
83
123
  '194' => {
84
124
  description: 'Start date/time',
85
125
  identifier: 'start_date_time'
@@ -92,25 +132,41 @@ type_dictionary = {
92
132
  description: 'End date/time',
93
133
  identifier: 'end_date_time'
94
134
  },
135
+ '209' => {
136
+ description: 'Value date',
137
+ identifier: 'value_date'
138
+ },
139
+ '235' => {
140
+ description: 'Collection date/time',
141
+ identifier: 'collection_date_time'
142
+ },
95
143
  '263' => {
96
144
  description: 'Invoicing period',
97
145
  identifier: 'invoicing_period'
98
146
  },
147
+ '267' => {
148
+ description: 'Rate/price date/time',
149
+ identifier: 'rate_price_date_time'
150
+ },
151
+ '273' => {
152
+ description: 'Validity period',
153
+ identifier: 'validity_period'
154
+ },
99
155
  '325' => {
100
156
  description: 'Tax period',
101
157
  identifier: 'tax_period'
102
158
  },
159
+ '326' => {
160
+ description: 'Charge period',
161
+ identifier: 'charge_period'
162
+ },
103
163
  '356' => {
104
164
  description: 'Sales date, and or time, and or period',
105
165
  identifier: 'sales_date_and_or_time_and_or_period'
106
166
  },
107
- '418' => {
108
- description: 'Minimum shelf life remaining at time of receipt',
109
- identifier: 'minimum_shelf_life_remaining_at_time_of_receipt'
110
- },
111
- '423' => {
112
- description: 'First date of ordering',
113
- identifier: 'first_date_of_ordering'
167
+ '366' => {
168
+ description: 'Inventory report date',
169
+ identifier: 'inventory_report_date'
114
170
  },
115
171
  '454' => {
116
172
  description: 'Accounting value date',
@@ -120,10 +176,6 @@ type_dictionary = {
120
176
  description: 'Connection date/time',
121
177
  identifier: 'connection_date_time'
122
178
  },
123
- '765' => {
124
- description: 'Seasonal availabilty calendar year',
125
- identifier: 'seasonal_availabilty_calendar_year'
126
- }
127
179
  }
128
180
 
129
181
  data = Eancom::Edifact::Data.new(
@@ -159,19 +211,22 @@ format_dictionary = {
159
211
  value: 'CCYYMMDDHHMMSS',
160
212
  identifier: 'date_time_second'
161
213
  },
162
- '602' => {
163
- description: 'Calendar year including century: C = Century; Y = Year',
164
- value: 'CCYY',
165
- identifier: 'century_year'
166
- },
167
214
  '718' => {
168
215
  description: 'Period',
169
216
  value: 'CCYYMMDD-CCZZMMDD',
170
217
  identifier: 'period'
171
218
  },
172
- '801' => {
173
- description: 'Year',
174
- identifier: 'year'
219
+ '802' => {
220
+ description: 'Month',
221
+ identifier: 'month'
222
+ },
223
+ '803' => {
224
+ description: 'Week',
225
+ identifier: 'week'
226
+ },
227
+ '804' => {
228
+ description: 'Day',
229
+ identifier: 'day'
175
230
  }
176
231
  }
177
232
 
@@ -0,0 +1,67 @@
1
+ tag = 'EFI'
2
+ Eancom.register_segment(tag: tag, klass: Eancom::Edifact::EFI)
3
+
4
+ structure = Eancom::Edifact::Structure.new(tag: tag)
5
+ #==============================================================================
6
+ # Tag #
7
+ #==============================================================================
8
+ tag = Eancom::Edifact::Composite.new
9
+ data = Eancom::Edifact::Data.new(
10
+ type: String,
11
+ length: 1..3,
12
+ dictionary: nil,
13
+ description: 'Message Header',
14
+ required: true
15
+ )
16
+ tag.add(:tag, data)
17
+
18
+ structure << tag
19
+ #==============================================================================
20
+ # FILE IDENTIFICATION #
21
+ #==============================================================================
22
+ file_name = Eancom::Edifact::Composite.new()
23
+
24
+ data = Eancom::Edifact::Data.new(
25
+ type: String,
26
+ length: 1..3,
27
+ dictionary: nil,
28
+ description: 'File name',
29
+ required: true
30
+ )
31
+ file_name.add(:file_name, data)
32
+
33
+ structure << file_name
34
+ #==============================================================================
35
+ # FILE DETAILS #
36
+ #==============================================================================
37
+ file_format_name = Eancom::Edifact::Composite.new()
38
+
39
+ data = Eancom::Edifact::Data.new(
40
+ type: String,
41
+ length: 1..3,
42
+ dictionary: nil,
43
+ description: 'File format name',
44
+ required: true
45
+ )
46
+ file_format_name.add(:file_format_name, data)
47
+
48
+ data = Eancom::Edifact::Data.new(
49
+ type: String,
50
+ length: 1..3,
51
+ dictionary: {
52
+ '3' => {
53
+ description: 'Binary',
54
+ identifier: 'binary'
55
+ },
56
+ '4' => {
57
+ description: 'Analogue',
58
+ identifier: 'analogue'
59
+ }
60
+ },
61
+ description: 'Data format description code',
62
+ required: false
63
+ )
64
+ file_format_name.add(:data_format_description_code, data)
65
+ structure << file_format_name
66
+ #==============================================================================
67
+ Eancom.register_structure(tag: 'EFI', structure: structure)
@@ -0,0 +1,37 @@
1
+ tag = 'EQD'
2
+ Eancom.register_segment(tag: tag, klass: Eancom::Edifact::EQD)
3
+
4
+ structure = Eancom::Edifact::Structure.new(tag: tag)
5
+ #==============================================================================
6
+ # Tag #
7
+ #==============================================================================
8
+ tag = Eancom::Edifact::Composite.new
9
+ data = Eancom::Edifact::Data.new(
10
+ type: String,
11
+ length: 1..3,
12
+ dictionary: nil,
13
+ description: 'Message Header',
14
+ required: true
15
+ )
16
+ tag.add(:tag, data)
17
+
18
+ structure << tag
19
+
20
+ equipment_code_qualifier = Eancom::Edifact::Composite.new
21
+ data = Eancom::Edifact::Data.new(
22
+ type: String,
23
+ length: 1..3,
24
+ dictionary: {
25
+ 'CN' => {
26
+ description: 'Container',
27
+ identifier: 'container'
28
+ }
29
+ },
30
+ description: 'Equipment code qualifier',
31
+ required: true
32
+ )
33
+ equipment_code_qualifier.add(:equipment_code_qualifier, data)
34
+
35
+ structure << equipment_code_qualifier
36
+ #==============================================================================
37
+ Eancom.register_structure(tag: 'EQD', structure: structure)
@@ -24,7 +24,20 @@ text_subject_code_qualifier = Eancom::Edifact::Composite.new()
24
24
  data = Eancom::Edifact::Data.new(
25
25
  type: String,
26
26
  length: 1..3,
27
- dictionary: nil,
27
+ dictionary: {
28
+ 'PUR' => {
29
+ description: 'Purchasing information',
30
+ identifier: 'purchasing_information'
31
+ },
32
+ 'ZZZ' => {
33
+ description: 'Mutually defined',
34
+ identifier: 'mutually_defined'
35
+ },
36
+ 'SUR' => {
37
+ description: 'Supplier remarks',
38
+ identifier: 'supplier_remarks'
39
+ }
40
+ },
28
41
  description: "Text subject code qualifier",
29
42
  required: true
30
43
  )
@@ -45,8 +58,8 @@ data = Eancom::Edifact::Data.new(
45
58
  identifier: 'text_for_subsequent_use'
46
59
  },
47
60
  '3' => {
48
- description: 'Text for immediate use',
49
- identifier: 'text_for_immediate_use'
61
+ description: 'Text for subsequent use',
62
+ identifier: 'text_for_subsequent_use'
50
63
  }
51
64
  },
52
65
  description: "Free Text function code",
@@ -63,7 +76,12 @@ text_reference = Eancom::Edifact::Composite.new()
63
76
  data = Eancom::Edifact::Data.new(
64
77
  type: String,
65
78
  length: 0..3,
66
- dictionary: nil,
79
+ dictionary: {
80
+ '001' => {
81
+ description: 'Standard Text',
82
+ identifier: 'standard_text'
83
+ }
84
+ },
67
85
  description: "Free Text value_code",
68
86
  required: false
69
87
  )
@@ -96,10 +114,6 @@ data = Eancom::Edifact::Data.new(
96
114
  '246' => {
97
115
  description: "GS1 Germany",
98
116
  identifier: 'gs1_germany'
99
- },
100
- 'ZZZ' => {
101
- description: 'Mutually defined',
102
- identifier: 'mutually_defined'
103
117
  }
104
118
  },
105
119
  description: "Code list responsible agency code",
@@ -0,0 +1,113 @@
1
+ tag = 'GIN'
2
+ Eancom.register_segment(tag: tag, klass: Eancom::Edifact::GIN)
3
+
4
+ structure = Eancom::Edifact::Structure.new(tag: tag)
5
+ #==============================================================================
6
+ # Tag #
7
+ #==============================================================================
8
+ tag = Eancom::Edifact::Composite.new()
9
+ data = Eancom::Edifact::Data.new(
10
+ type: String,
11
+ length: 3,
12
+ dictionary: nil,
13
+ description: "Message Header",
14
+ required: true
15
+ )
16
+ tag.add(:tag, data)
17
+
18
+ structure << tag
19
+ #==============================================================================
20
+ # Object identification code qualifier
21
+ #==============================================================================
22
+ object_identification_code_qualifier = Eancom::Edifact::Composite.new()
23
+ data = Eancom::Edifact::Data.new(
24
+ type: String,
25
+ length: 1..3,
26
+ dictionary: {
27
+ 'BJ' => {
28
+ description: 'Serial shipping container code',
29
+ identifier: 'serial_shipping_container_code'
30
+ },
31
+ 'SRV' => {
32
+ description: 'GS1 Global Trade Item Number (GS1 Temporary Code)',
33
+ identifier: 'gs1_global_trade_item_number'
34
+ }
35
+ },
36
+ description: 'Object identification code qualifier',
37
+ required: true
38
+ )
39
+ object_identification_code_qualifier.add(:object_identification_code_qualifier, data)
40
+
41
+ structure << object_identification_code_qualifier
42
+ #==============================================================================
43
+ # Identity number range
44
+ #==============================================================================
45
+ object_identifier_1 = Eancom::Edifact::Composite.new()
46
+ data = Eancom::Edifact::Data.new(
47
+ type: String,
48
+ length: 1..35,
49
+ dictionary: nil,
50
+ description: 'Object identifier one',
51
+ required: true
52
+ )
53
+ object_identifier_1.add(:object_identifier_1, data)
54
+
55
+ structure << object_identifier_1
56
+ #==============================================================================
57
+ # Identity number range
58
+ #==============================================================================
59
+ object_identifier_2 = Eancom::Edifact::Composite.new()
60
+ data = Eancom::Edifact::Data.new(
61
+ type: String,
62
+ length: 1..35,
63
+ dictionary: nil,
64
+ description: 'Object identifier two',
65
+ required: true
66
+ )
67
+ object_identifier_2.add(:object_identifier_2, data)
68
+
69
+ structure << object_identifier_2
70
+ #==============================================================================
71
+ # Identity number range
72
+ #==============================================================================
73
+ object_identifier_3 = Eancom::Edifact::Composite.new()
74
+ data = Eancom::Edifact::Data.new(
75
+ type: String,
76
+ length: 1..35,
77
+ dictionary: nil,
78
+ description: 'Object identifier three',
79
+ required: true
80
+ )
81
+ object_identifier_3.add(:object_identifier_3, data)
82
+
83
+ structure << object_identifier_3
84
+ #==============================================================================
85
+ # Identity number range
86
+ #==============================================================================
87
+ object_identifier_4 = Eancom::Edifact::Composite.new()
88
+ data = Eancom::Edifact::Data.new(
89
+ type: String,
90
+ length: 1..35,
91
+ dictionary: nil,
92
+ description: 'Object identifier four',
93
+ required: true
94
+ )
95
+ object_identifier_4.add(:object_identifier_4, data)
96
+
97
+ structure << object_identifier_4
98
+ #==============================================================================
99
+ # Identity number range
100
+ #==============================================================================
101
+ object_identifier_5 = Eancom::Edifact::Composite.new()
102
+ data = Eancom::Edifact::Data.new(
103
+ type: String,
104
+ length: 1..35,
105
+ dictionary: nil,
106
+ description: 'Object identifier five',
107
+ required: true
108
+ )
109
+ object_identifier_5.add(:object_identifier_5, data)
110
+
111
+ structure << object_identifier_5
112
+
113
+ Eancom.register_structure(tag: 'GIN', structure: structure)
@@ -25,14 +25,6 @@ data = Eancom::Edifact::Data.new(
25
25
  type: String,
26
26
  length: 1..3,
27
27
  dictionary: {
28
- 'A' => {
29
- description: 'Free-form long description',
30
- identifier: 'free_form_long_description'
31
- },
32
- 'B' => {
33
- description: 'Code and text',
34
- identifier: 'code_and_text'
35
- },
36
28
  'C' => {
37
29
  description: 'Code (from industry code list)',
38
30
  identifier: 'code'
@@ -53,6 +45,10 @@ data = Eancom::Edifact::Data.new(
53
45
  description: 'Structured (from industry code list)',
54
46
  identifier: 'structured'
55
47
  },
48
+ 'B' => {
49
+ description: 'Code and text',
50
+ identifier: 'code_and_text'
51
+ }
56
52
  },
57
53
  description: "Description format code",
58
54
  required: true
@@ -67,7 +63,7 @@ item_characteristic = Eancom::Edifact::Composite.new()
67
63
 
68
64
  item_characteristic_code = Eancom::Edifact::Data.new(
69
65
  type: String,
70
- length: 1..3,
66
+ length: 0..3,
71
67
  dictionary: {
72
68
  '2' => {
73
69
  description: 'General product form',
@@ -125,6 +121,10 @@ item_characteristic_code = Eancom::Edifact::Data.new(
125
121
  description: 'Style',
126
122
  identifier: 'style'
127
123
  },
124
+ 'MNF' => {
125
+ description: 'Manufacturer',
126
+ identifier: 'manufacturer'
127
+ },
128
128
  'XX1' => {
129
129
  description: 'Collar Type',
130
130
  identifier: 'collar_type'
@@ -145,10 +145,6 @@ item_characteristic_code = Eancom::Edifact::Data.new(
145
145
  description: 'Season name',
146
146
  identifier: 'season_name'
147
147
  },
148
- 'XX7' => {
149
- description: 'Season code',
150
- identifier: 'season_code'
151
- },
152
148
  },
153
149
  description: "Item characteristic code",
154
150
  required: true