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
@@ -0,0 +1,171 @@
1
+ tag = 'PAT'
2
+ Eancom.register_segment(tag: tag, klass: Eancom::Edifact::PAT)
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
+ payment_terms_type_code_qualifier = Eancom::Edifact::Composite.new
21
+ data = Eancom::Edifact::Data.new(
22
+ type: String,
23
+ length: 1..3,
24
+ dictionary: {
25
+ '1' => {
26
+ description: 'Basic',
27
+ identifier: 'basic'
28
+ },
29
+ '2' => {
30
+ description: 'End of month',
31
+ identifier: 'end_of_month'
32
+ },
33
+ '3' => {
34
+ description: 'Fixed date',
35
+ identifier: 'fixed_date'
36
+ },
37
+ '4' => {
38
+ description: 'Deferred',
39
+ identifier: 'deferred'
40
+ },
41
+ '5' => {
42
+ description: 'Discount not applicable',
43
+ identifier: 'discount_not_applicable'
44
+ },
45
+ '6' => {
46
+ description: 'Mixed',
47
+ identifier: 'mixed'
48
+ },
49
+ '7' => {
50
+ description: 'Extended',
51
+ identifier: 'extended'
52
+ },
53
+ '8' => {
54
+ desription: 'Basic discount offered',
55
+ identifier: 'basic_discount_offered'
56
+ },
57
+ '9' => {
58
+ description: 'Proximo',
59
+ identifier: 'proximo'
60
+ },
61
+ '10' => {
62
+ description: 'Instant',
63
+ identifier: 'instant'
64
+ },
65
+ '11' => {
66
+ description: 'Elective',
67
+ identifier: 'elective'
68
+ },
69
+ '12' => {
70
+ description: '10 days after end of month',
71
+ identifier: '10_days_after_end_of_month'
72
+ },
73
+ '18' => {
74
+ description: 'Previously agreed upon',
75
+ identifier: 'previously_agreed_upon'
76
+ },
77
+ '20' => {
78
+ description: 'Penalty terms',
79
+ identifier: 'penalty_terms'
80
+ },
81
+ '22' => {
82
+ description: 'Discount',
83
+ identifier: 'discount'
84
+ },
85
+ '37' => {
86
+ description: 'Complete payment',
87
+ identifier: 'complete_payment'
88
+ }
89
+ },
90
+ description: 'Payment terms type code qualifier',
91
+ required: true
92
+ )
93
+ payment_terms_type_code_qualifier.add(:payment_terms_type_code_qualifier, data)
94
+
95
+ structure << payment_terms_type_code_qualifier
96
+ #==============================================================================
97
+ # PAYMENT TERMS #
98
+ #==============================================================================
99
+ payment_terms_type_description_identifier = Eancom::Edifact::Composite.new
100
+ data = Eancom::Edifact::Data.new(
101
+ type: String,
102
+ length: 1..17,
103
+ dictionary: {
104
+ '1' => {
105
+ description: 'Draft(s) drawn on issuing bank',
106
+ identifier: 'drafts_drawn_on_issuing_bank'
107
+ },
108
+ '2' => {
109
+ description: 'Draft(s) drawn on advising bank',
110
+ identifier: 'drafts_drawn_on_advising_bank'
111
+ },
112
+ '3' => {
113
+ description: 'Draft(s) drawn on reimbursing bank',
114
+ identifier: 'drafts_drawn_on_reimbursing_bank'
115
+ },
116
+ '4' => {
117
+ description: 'Draft(s) drawn on applicant',
118
+ identifier: 'drafts_drawn_on_applicant'
119
+ },
120
+ '5' => {
121
+ description: 'Draft(s) drawn on any other drawee',
122
+ identifier: 'drafts_drawn_on_any_other_drawee'
123
+ },
124
+ '6' => {
125
+ description: 'No drafts',
126
+ identifier: 'no_drafts'
127
+ },
128
+ 'ZZZ' => {
129
+ description: 'Mutually defined',
130
+ identifier: 'mutually_defined'
131
+ }
132
+ },
133
+ description: 'Payment terms description identifier',
134
+ required: true
135
+ )
136
+ payment_terms_type_description_identifier.add(:payment_terms_type_description_identifier, data)
137
+
138
+ structure << payment_terms_type_description_identifier
139
+ #==============================================================================
140
+ # TERMS/TIME INFORMATION #
141
+ #==============================================================================
142
+ time_reference_code = Eancom::Edifact::Composite.new
143
+ data = Eancom::Edifact::Data.new(
144
+ type: String,
145
+ length: 1..3,
146
+ dictionary: {
147
+ '5' => {
148
+ description: 'Date of invoice',
149
+ identifier: 'date_of_invoice'
150
+ },
151
+ '66' => {
152
+ description: 'Specified date',
153
+ identifier: 'specified_date'
154
+ },
155
+ '69' => {
156
+ description: 'Invoice transmission date',
157
+ identifier: 'invoice_transmission_date'
158
+ },
159
+ '81' => {
160
+ description: 'Date of shipment as evidenced by the transport document(s)',
161
+ identifier: 'date_of_shipment_as_evid_by_the_transp_docs'
162
+ }
163
+ },
164
+ description: 'Time reference code',
165
+ required: true
166
+ )
167
+ time_reference_code.add(:time_reference_code, data)
168
+
169
+ structure << time_reference_code
170
+ #==============================================================================
171
+ Eancom.register_structure(tag: 'PAT', structure: structure)
@@ -8,19 +8,18 @@ structure = Eancom::Edifact::Structure.new(tag: tag)
8
8
  tag = Eancom::Edifact::Composite.new
9
9
  data = Eancom::Edifact::Data.new(
10
10
  type: String,
11
- length: 3,
11
+ length: 1..3,
12
12
  dictionary: nil,
13
- description: "Message Header",
13
+ description: 'Message Header',
14
14
  required: true
15
15
  )
16
16
  tag.add(:tag, data)
17
17
 
18
18
  structure << tag
19
19
  #==============================================================================
20
- # Product group type code #
20
+ # PERCENTAGE DETAILS #
21
21
  #==============================================================================
22
22
  percentage_details = Eancom::Edifact::Composite.new
23
-
24
23
  data = Eancom::Edifact::Data.new(
25
24
  type: String,
26
25
  length: 1..3,
@@ -34,17 +33,13 @@ data = Eancom::Edifact::Data.new(
34
33
  identifier: 'charge'
35
34
  },
36
35
  '3' => {
37
- description: 'Allowance or Charge',
36
+ description: 'Allowance or charge',
38
37
  identifier: 'allowance_or_charge'
39
38
  },
40
39
  '7' => {
41
40
  description: 'Percentage of invoice',
42
41
  identifier: 'percentage_of_invoice'
43
42
  },
44
- '9' => {
45
- description: 'Adjustment',
46
- identifier: 'adjustment'
47
- },
48
43
  '12' => {
49
44
  description: 'Discount',
50
45
  identifier: 'discount'
@@ -56,100 +51,22 @@ data = Eancom::Edifact::Data.new(
56
51
  '16' => {
57
52
  description: 'Interest percentage',
58
53
  identifier: 'interest_percentage'
59
- },
60
- '18' => {
61
- description: 'Percentage credit note',
62
- identifier: 'percentage_credit_note'
63
- },
64
- '19' => {
65
- description: 'Percentage debit note',
66
- identifier: 'percentage_debit_note'
67
- },
68
- '68' => {
69
- description: 'Percentage of due amount',
70
- identifier: 'percentage_of_due_amount'
71
- },
72
- '159' => {
73
- description: 'Nestable percentage',
74
- identifier: 'nestable_percentage'
75
- },
76
- '161' => {
77
- description: 'Transport weight completed',
78
- identifier: 'transport_weight_completed'
79
- },
80
- '162' => {
81
- description: 'Transport volume completed',
82
- identifier: 'transport_volume_completed'
83
- },
84
- '163' => {
85
- description: 'Percentage of order',
86
- identifier: 'percentage_of_order'
87
- },
54
+ }
88
55
  },
89
56
  description: 'Percentage type code qualifier',
90
57
  required: true
91
58
  )
92
59
  percentage_details.add(:percentage_type_code_qualifier, data)
93
60
 
94
- data = Eancom::Edifact::Data.new(
95
- type: Integer,
96
- length: 0..10,
97
- dictionary: nil,
98
- description: 'Percentage',
99
- required: true
100
- )
101
- percentage_details.add(:percentage, data)
102
-
103
- data = Eancom::Edifact::Data.new(
104
- type: String,
105
- length: 0..3,
106
- dictionary: {
107
- '1' => {
108
- description: 'Per unit',
109
- identifier: 'per_unit'
110
- },
111
- '13' => {
112
- description: 'Invoice value',
113
- identifier: 'invoice_value'
114
- },
115
- },
116
- description: 'Percentage',
117
- required: true
118
- )
119
- percentage_details.add(:percentage_basis_identification_code, data)
120
-
121
61
  data = Eancom::Edifact::Data.new(
122
62
  type: String,
123
- length: 0..17,
63
+ length: 1..10,
124
64
  dictionary: nil,
125
- description: 'Code list identification code',
126
- required: false
127
- )
128
- percentage_details.add(:code_list_idenfitifaction_code, data)
129
-
130
- data = Eancom::Edifact::Data.new(
131
- type: String,
132
- length: 0..3,
133
- dictionary: {
134
- '9' => {
135
- description: 'GS1',
136
- identifier: 'gsi',
137
- },
138
- '91' => {
139
- description: 'Assigned by supplier or suppliers agent',
140
- identifier: 'assigned_by_supplier_or_suppliers_agent'
141
- },
142
- '92' => {
143
- description: 'Assigned by buyer or buyers agent',
144
- identifier: 'assigned_by_buyer_or_buyers_agent'
145
- }
146
- },
147
- description: 'Code list responsible agancy code',
65
+ description: 'Percentage',
148
66
  required: false
149
67
  )
150
- percentage_details.add(:code_list_responsibility_agency_code, data)
68
+ percentage_details.add(:percentage, data)
151
69
 
152
70
  structure << percentage_details
153
-
154
- #==============================================================================
71
+ #===============================================================================#
155
72
  Eancom.register_structure(tag: 'PCD', structure: structure)
@@ -0,0 +1,110 @@
1
+ tag = 'PCI'
2
+ Eancom.register_segment(tag: tag, klass: Eancom::Edifact::PCI)
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
+ # Marking instructions code #
21
+ #==============================================================================
22
+ marking_instructions_code = Eancom::Edifact::Composite.new
23
+ data = Eancom::Edifact::Data.new(
24
+ type: String,
25
+ length: 1..3,
26
+ dictionary: {
27
+ '1' => {
28
+ description: 'Do not mark suppliers company name',
29
+ identifier: 'do_not_mark_suppliers_company_name'
30
+ },
31
+ '2' => {
32
+ description: 'Mark customers company name',
33
+ identifier: 'mark_customers_company_name'
34
+ },
35
+ '3' => {
36
+ description: 'Mark customers references',
37
+ identifier: 'mark_customers_references'
38
+ },
39
+ '6' => {
40
+ description: 'Mark packages dimensions',
41
+ identifier: 'mark_packages_dimensions'
42
+ },
43
+ '7' => {
44
+ description: 'Mark net weight',
45
+ identifier: 'mark_net_weight'
46
+ },
47
+ '8' => {
48
+ description: 'Mark gross weight',
49
+ identifier: 'mark_gross_weight'
50
+ },
51
+ '10' => {
52
+ description: 'Mark batch number',
53
+ identifier: 'mark_batch_number'
54
+ },
55
+ '14' => {
56
+ description: 'Mark expiry date',
57
+ identifier: 'mark_expiry_date'
58
+ },
59
+ '16' => {
60
+ description: 'Buyers instructions',
61
+ identifier: 'buyers_instructions'
62
+ },
63
+ '17' => {
64
+ description: "Supplier's instructions",
65
+ identifier: 'supliers_instructions'
66
+ },
67
+ '18' => {
68
+ description: "Carrier's instructions",
69
+ identifier: 'carriers_instructions'
70
+ },
71
+ '33E' => {
72
+ description: 'Marked with serial shipping container code (GS1 Temporary Code)',
73
+ identifier: 'marked_with_serial_shipping_container_code_gs1_temporary_code'
74
+ },
75
+ '34E' => {
76
+ description: 'Marked with GS1 number (GS1 Temporary Code)',
77
+ identifier: 'marked_with_gs1_number'
78
+ }
79
+ },
80
+ description: 'Marking instructions code',
81
+ required: false
82
+ )
83
+ marking_instructions_code.add(:marking_instructions_code, data)
84
+
85
+ structure << marking_instructions_code
86
+ #==============================================================================
87
+ # MARKS & LABELS #
88
+ #==============================================================================
89
+ marks_and_labels_code = Eancom::Edifact::Composite.new
90
+ data = Eancom::Edifact::Data.new(
91
+ type: String,
92
+ length: 1..35,
93
+ dictionary: nil,
94
+ description: 'Shipping marks description',
95
+ required: true
96
+ )
97
+ marks_and_labels_code.add(:shipping_marks_description, data)
98
+
99
+ data = Eancom::Edifact::Data.new(
100
+ type: String,
101
+ length: 1..3,
102
+ dictionary: nil,
103
+ description: 'Container or package contents indicator code',
104
+ required: false
105
+ )
106
+ marks_and_labels_code.add(:container_or_package_contents_indicator_mode, data)
107
+
108
+ structure << marks_and_labels_code
109
+
110
+ Eancom.register_structure(tag: 'PCI', structure: structure)
@@ -65,6 +65,10 @@ data = Eancom::Edifact::Data.new(
65
65
  description: 'Group of complementary products',
66
66
  identifier: 'group_of_complementary_products'
67
67
  },
68
+ 'BEX' => {
69
+ description: 'GTIN allocation group for special purposes (GS1 Temporary Code)',
70
+ identifier: 'gtin_allocation_group_for_special_purposes'
71
+ },
68
72
  'DEF' => {
69
73
  description: 'Definition Group',
70
74
  identifier: 'definition_group'
@@ -117,7 +121,7 @@ data = Eancom::Edifact::Data.new(
117
121
  dictionary: {
118
122
  '9' => {
119
123
  description: 'GS1',
120
- identifier: 'gsi',
124
+ identifier: 'gs1',
121
125
  },
122
126
  '91' => {
123
127
  description: 'Assigned by supplier or suppliers agent',
@@ -128,7 +132,7 @@ data = Eancom::Edifact::Data.new(
128
132
  identifier: 'assigned_by_buyer_or_buyers_agent'
129
133
  }
130
134
  },
131
- description: 'Code list responsible agancy code',
135
+ description: 'Code list responsible agency code',
132
136
  required: false
133
137
  )
134
138
  product_group.add(:code_list_responsibility_agency_code, data)
@@ -142,7 +146,7 @@ data = Eancom::Edifact::Data.new(
142
146
  )
143
147
  product_group.add(:product_group_name, data)
144
148
 
145
- structure << product_group
146
149
 
150
+ structure << product_group
147
151
  #==============================================================================
148
152
  Eancom.register_structure(tag: 'PGI', structure: structure)
@@ -5,11 +5,11 @@ structure = Eancom::Edifact::Structure.new(tag: tag)
5
5
  #==============================================================================
6
6
  # Tag #
7
7
  #==============================================================================
8
- tag = Eancom::Edifact::Composite.new()
8
+ tag = Eancom::Edifact::Composite.new
9
9
  data = Eancom::Edifact::Data.new(
10
10
  type: String,
11
- length: 3,
12
- description: "Message Header",
11
+ length: 1..3,
12
+ description: 'Message Header',
13
13
  required: true
14
14
  )
15
15
  tag.add(:tag, data)
@@ -18,7 +18,7 @@ structure << tag
18
18
  #==============================================================================
19
19
  # Product Identifier Code Qualifier #
20
20
  #==============================================================================
21
- product_identifier_code_qualifier = Eancom::Edifact::Composite.new()
21
+ product_identifier_code_qualifier = Eancom::Edifact::Composite.new
22
22
 
23
23
  data = Eancom::Edifact::Data.new(
24
24
  type: String,
@@ -50,7 +50,7 @@ structure << product_identifier_code_qualifier
50
50
  #==============================================================================
51
51
  # Item Number Identification 1 #
52
52
  #==============================================================================
53
- item_number_identification_1 = Eancom::Edifact::Composite.new()
53
+ item_number_identification_1 = Eancom::Edifact::Composite.new
54
54
 
55
55
  data = Eancom::Edifact::Data.new(
56
56
  type: String,
@@ -81,11 +81,11 @@ data = Eancom::Edifact::Data.new(
81
81
  identifier: 'buyers_item_number'
82
82
  },
83
83
  'HS' => {
84
- description: "Harmonised system",
84
+ description: 'Harmonised system',
85
85
  identifier: 'harmonised_system'
86
86
  },
87
87
  'GD' => {
88
- description: "Industry sector article group number/product classification code (GS1 Code)",
88
+ description: 'Industry sector article group number/product classification code (GS1 Code)',
89
89
  identifier: 'industry_sector_article_group_number_product_classification_code'
90
90
  },
91
91
  'GU' => {
@@ -121,7 +121,7 @@ item_number_identification_1.add(:item_type_identification_code_1, data)
121
121
  data = Eancom::Edifact::Data.new(
122
122
  type: String,
123
123
  length: 0..17,
124
- description: "Code list identification code",
124
+ description: 'Code list identification code',
125
125
  required: false
126
126
  )
127
127
  item_number_identification_1.add(:code_list_identification_code_1, data)
@@ -141,13 +141,9 @@ data = Eancom::Edifact::Data.new(
141
141
  '92' => {
142
142
  description: "Assigned by buyer or buyer's agent",
143
143
  identifier: 'assigned_by_buyer_or_buyers_agent'
144
- },
145
- '246' => {
146
- description: 'GS1 Germany',
147
- identification: 'gs1_germany'
148
144
  }
149
145
  },
150
- description: "Code list responsible agency code",
146
+ description: 'Code list responsible agency code',
151
147
  required: false
152
148
  )
153
149
  item_number_identification_1.add(:code_list_responsible_agency_code_1, data)
@@ -156,7 +152,7 @@ structure << item_number_identification_1
156
152
  #==============================================================================
157
153
  # Item Number Identification 2 #
158
154
  #==============================================================================
159
- item_number_identification_2 = Eancom::Edifact::Composite.new()
155
+ item_number_identification_2 = Eancom::Edifact::Composite.new
160
156
 
161
157
  data = Eancom::Edifact::Data.new(
162
158
  type: String,
@@ -215,7 +211,7 @@ item_number_identification_2.add(:item_type_identification_code_2, data)
215
211
  data = Eancom::Edifact::Data.new(
216
212
  type: String,
217
213
  length: 0..17,
218
- description: "Code list identification code",
214
+ description: 'Code list identification code',
219
215
  required: false
220
216
  )
221
217
  item_number_identification_2.add(:code_list_identification_code_2, data)
@@ -237,7 +233,7 @@ data = Eancom::Edifact::Data.new(
237
233
  identification: 'assigned_by_buyer_or_buyers_agent'
238
234
  }
239
235
  },
240
- description: "Code list responsible agency code",
236
+ description: 'Code list responsible agency code',
241
237
  required: false
242
238
  )
243
239
  item_number_identification_2.add(:code_list_responsible_agency_code_2, data)
@@ -246,7 +242,7 @@ structure << item_number_identification_2
246
242
  #==============================================================================
247
243
  # Item Number Identification 3 #
248
244
  #==============================================================================
249
- item_number_identification_3 = Eancom::Edifact::Composite.new()
245
+ item_number_identification_3 = Eancom::Edifact::Composite.new
250
246
 
251
247
  data = Eancom::Edifact::Data.new(
252
248
  type: String,
@@ -301,7 +297,7 @@ item_number_identification_3.add(:item_type_identification_code_3, data)
301
297
  data = Eancom::Edifact::Data.new(
302
298
  type: String,
303
299
  length: 0..17,
304
- description: "Code list identification code",
300
+ description: 'Code list identification code',
305
301
  required: false
306
302
  )
307
303
  item_number_identification_3.add(:code_list_identification_code_3, data)
@@ -323,7 +319,7 @@ data = Eancom::Edifact::Data.new(
323
319
  identification: 'assigned_by_buyer_or_buyers_agent'
324
320
  }
325
321
  },
326
- description: "Code list responsible agency code",
322
+ description: 'Code list responsible agency code',
327
323
  required: false
328
324
  )
329
325
  item_number_identification_3.add(:code_list_responsible_agency_code_3, data)
@@ -332,7 +328,7 @@ structure << item_number_identification_3
332
328
  #==============================================================================
333
329
  # Item Number Identification 4 #
334
330
  #==============================================================================
335
- item_number_identification_4 = Eancom::Edifact::Composite.new()
331
+ item_number_identification_4 = Eancom::Edifact::Composite.new
336
332
 
337
333
  data = Eancom::Edifact::Data.new(
338
334
  type: String,
@@ -387,7 +383,7 @@ item_number_identification_4.add(:item_type_identification_code_4, data)
387
383
  data = Eancom::Edifact::Data.new(
388
384
  type: String,
389
385
  length: 0..17,
390
- description: "Code list identification code",
386
+ description: 'Code list identification code',
391
387
  required: false
392
388
  )
393
389
  item_number_identification_4.add(:code_list_identification_code_4, data)
@@ -409,7 +405,7 @@ data = Eancom::Edifact::Data.new(
409
405
  identifier: 'assigned_by_buyer_or_buyers_agent'
410
406
  }
411
407
  },
412
- description: "Code list responsible agency code",
408
+ description: 'Code list responsible agency code',
413
409
  required: false
414
410
  )
415
411
  item_number_identification_4.add(:code_list_responsible_agency_code_4, data)
@@ -418,7 +414,7 @@ structure << item_number_identification_4
418
414
  #==============================================================================
419
415
  # Item Number Identification 5 #
420
416
  #==============================================================================
421
- item_number_identification_5 = Eancom::Edifact::Composite.new()
417
+ item_number_identification_5 = Eancom::Edifact::Composite.new
422
418
 
423
419
  data = Eancom::Edifact::Data.new(
424
420
  type: String,
@@ -473,7 +469,7 @@ item_number_identification_5.add(:item_type_identification_code_5, data)
473
469
  data = Eancom::Edifact::Data.new(
474
470
  type: String,
475
471
  length: 0..17,
476
- description: "Code list identification code",
472
+ description: 'Code list identification code',
477
473
  required: false
478
474
  )
479
475
  item_number_identification_5.add(:code_list_identification_code_5, data)
@@ -493,13 +489,9 @@ data = Eancom::Edifact::Data.new(
493
489
  '92' => {
494
490
  description: "Assigned by buyer or buyer's agent",
495
491
  identification: 'assigned_by_buyer_or_buyers_agent'
496
- },
497
- '246' => {
498
- description: 'GS1 Germany',
499
- identification: 'gs1_germany'
500
492
  }
501
493
  },
502
- description: "Code list responsible agency code",
494
+ description: 'Code list responsible agency code',
503
495
  required: false
504
496
  )
505
497
  item_number_identification_5.add(:code_list_responsible_agency_code_5, data)