eancom 1.5.5 → 1.5.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c5b7b190b71d11d44c7e7ee8517d42210de62af2d9cf7db2753a806964a6807
4
- data.tar.gz: 96c97f166dbf1a43124998eceda1d108debbe655c3089484369a8b1e075a807b
3
+ metadata.gz: a6528d1683b7871c94ada34d8b29f46827c1fcc9c970855e81190d020cfe435e
4
+ data.tar.gz: c3a8326ce9be33cd202b315fedc82235fff74e9ee1238b05e13008a40ece8f7d
5
5
  SHA512:
6
- metadata.gz: c0b9ee99cead92c3a79e23957c506247345d15f679b69684cd0a6a04152f3cfd55fa86661114f1988bd789fa8fc3663f104459b3683a196175df7558506881bf
7
- data.tar.gz: '0919d32a690c9b53a6e4107825c950e9eca7c18edaf816e9646ede9a5eb92ab68342e8471596c232107d01d86a23796c3d400acd308baf5bd2393faea3105cb1'
6
+ metadata.gz: 719ec7a34fe12a4fc3738d97bb732dd36bc793e965b3e21b85bce5007c0e1f2ee6a4694901faf2a55721980da3058c0374a4be4bd2cd81098968e66be6070902
7
+ data.tar.gz: 2935634f2d295dfbe11b213eee756d7ed6268cd266afebd2717f35b5d29b145cfeacc250745763f185e0d346fe538fe28eddbfd11b36c7db28cb72692b05c868
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 2.7.6
1
+ ruby 3.0.2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eancom (1.4.0)
4
+ eancom (1.5.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -137,4 +137,4 @@ DEPENDENCIES
137
137
  timecop
138
138
 
139
139
  BUNDLED WITH
140
- 2.1.4
140
+ 2.2.22
@@ -255,6 +255,14 @@ data = Eancom::Edifact::Data.new(
255
255
  '42' => {
256
256
  description: 'Confirmation_via_specific_means',
257
257
  identifier: 'confirmation_via_specific_means'
258
+ },
259
+ '46' => {
260
+ description: 'Message content is provisional',
261
+ identifier: 'provisional'
262
+ },
263
+ '47' => {
264
+ description: 'Message content is definitive',
265
+ identifier: 'definitive'
258
266
  }
259
267
  },
260
268
  description: 'Message function code',
@@ -43,6 +43,10 @@ data = Eancom::Edifact::Data.new(
43
43
  '1' => {
44
44
  description: 'Text for subsequent use',
45
45
  identifier: 'text_for_subsequent_use'
46
+ },
47
+ '3' => {
48
+ description: 'Text for immediate use',
49
+ identifier: 'text_for_immediate_use'
46
50
  }
47
51
  },
48
52
  description: "Free Text function code",
@@ -92,6 +96,10 @@ data = Eancom::Edifact::Data.new(
92
96
  '246' => {
93
97
  description: "GS1 Germany",
94
98
  identifier: 'gs1_germany'
99
+ },
100
+ 'ZZZ' => {
101
+ description: 'Mutually defined',
102
+ identifier: 'mutually_defined'
95
103
  }
96
104
  },
97
105
  description: "Code list responsible agency code",
@@ -115,26 +115,34 @@ data = Eancom::Edifact::Data.new(
115
115
  description: 'Discount price',
116
116
  identifier: 'discount_price',
117
117
  },
118
- 'MRP' => {
119
- description: 'Market retail price',
120
- identifier: 'market_retail_price',
118
+ 'EUP' => {
119
+ description: 'Expected unit price',
120
+ identifier: 'expected_unit_price'
121
121
  },
122
122
  'LIU' => {
123
123
  description: 'List price',
124
124
  identifier: 'list_price',
125
125
  },
126
- 'SRP' => {
127
- description: 'Suggested retail price',
128
- identifier: 'suggested_retail_price',
126
+ 'LBL' => {
127
+ description: 'Labelling price',
128
+ identifier: 'labelling_price'
129
129
  },
130
- 'RTP' => {
131
- description: 'Retail price',
132
- identifier: 'retail_price',
130
+ 'MRP' => {
131
+ description: 'Market retail price',
132
+ identifier: 'market_retail_price',
133
133
  },
134
134
  'NTP' => {
135
135
  description: 'Net unit price',
136
136
  identifier: 'net_unit_price',
137
- }
137
+ },
138
+ 'RTP' => {
139
+ description: 'Retail price',
140
+ identifier: 'retail_price',
141
+ },
142
+ 'SRP' => {
143
+ description: 'Suggested retail price',
144
+ identifier: 'suggested_retail_price',
145
+ },
138
146
  },
139
147
  description: 'Price specification code',
140
148
  required: false
@@ -153,7 +161,7 @@ price_information.add(:unit_price_basis_value, data)
153
161
  data = Eancom::Edifact::Data.new(
154
162
  type: String,
155
163
  length: 0..3,
156
- dictionary: {
164
+ dictionary: {
157
165
  'KGM' => {
158
166
  description: 'Kilogram',
159
167
  identifier: 'kilogram',
@@ -40,6 +40,10 @@ data = Eancom::Edifact::Data.new(
40
40
  description: 'Invoiced quantity',
41
41
  identifier: 'invoiced_quantity'
42
42
  },
43
+ '53' => {
44
+ description: 'Minimum order quantity',
45
+ identifier: 'minimum_order_quantity'
46
+ },
43
47
  '59' => {
44
48
  description: 'Numbers of consumer units in the traded unit',
45
49
  identifier: 'numbers_or_consumer_units_in_the_traded_unit'
@@ -49,6 +49,10 @@ data = Eancom::Edifact::Data.new(
49
49
  description: 'Beneficiarys reference',
50
50
  identifier: 'beneficiarys_reference'
51
51
  },
52
+ 'AJS' => {
53
+ description: 'Agreement number',
54
+ identifier: 'agreement_number'
55
+ },
52
56
  'ALL' => {
53
57
  description: 'Message Batch number',
54
58
  identifier: 'message_batch_number'
@@ -137,6 +141,10 @@ data = Eancom::Edifact::Data.new(
137
141
  description: 'VAT registration number',
138
142
  identifier: 'vat_registration_number'
139
143
  },
144
+ 'XB8' => {
145
+ description: 'Agreement number',
146
+ identifier: 'agreement_number_old'
147
+ }
140
148
  },
141
149
  description: "Reference code quailifier",
142
150
  required: true
@@ -11,21 +11,18 @@ module Eancom
11
11
  end
12
12
 
13
13
  def self.initialize_by_components(structure, array)
14
- begin
15
- new(structure.build_hash(array))
16
- rescue StandardError => e
17
- raise SegmentParserError.new(
18
- "'Parser Error in structure #{structure.tag} with array #{array}.\n \
19
- 'Inside Structure: \n \ '#{structure.to_s}.\n \
14
+ new(**structure.build_hash(array))
15
+ rescue StandardError => e
16
+ raise SegmentParserError, "'Parser Error in structure #{structure.tag} with array #{array}.\n \
17
+ 'Inside Structure: \n \ '#{structure}.\n \
20
18
  'Error:\n \
21
19
  '#{e}"
22
- )
23
- end
24
20
  end
25
21
 
26
22
  def validate_structure
27
23
  attributes.each do |key, value|
28
24
  next if value.nil?
25
+
29
26
  structure.validate!(key, value)
30
27
  end
31
28
  end
@@ -42,6 +39,7 @@ module Eancom
42
39
  string = array.map do |e|
43
40
  e = e.compact
44
41
  next if e.empty?
42
+
45
43
  [e.join(component_delimiter)]
46
44
  end.join(data_delimiter)
47
45
  clean_end_string(string)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Eancom
4
- VERSION = '1.5.5'
4
+ VERSION = '1.5.7'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eancom
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fadendaten GmbH
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-06 00:00:00.000000000 Z
11
+ date: 2023-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -122,7 +122,7 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
- description:
125
+ description:
126
126
  email:
127
127
  - support@fadendaten.ch
128
128
  executables: []
@@ -233,7 +233,7 @@ licenses:
233
233
  - MIT
234
234
  metadata:
235
235
  homepage_uri: https://fadendaten.ch
236
- post_install_message:
236
+ post_install_message:
237
237
  rdoc_options: []
238
238
  require_paths:
239
239
  - lib
@@ -248,8 +248,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
248
248
  - !ruby/object:Gem::Version
249
249
  version: '0'
250
250
  requirements: []
251
- rubygems_version: 3.1.6
252
- signing_key:
251
+ rubygems_version: 3.2.22
252
+ signing_key:
253
253
  specification_version: 4
254
254
  summary: EDIFACT Generator for the EANCOM Subset
255
255
  test_files: []