eancom 1.4.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +7 -3
- data/.gitlab-ci.yml +11 -13
- data/.ruby-version +1 -1
- data/Gemfile +2 -4
- data/Gemfile.lock +23 -103
- data/README.md +46 -0
- data/definitions/desadv/d01b.rb +139 -93
- data/definitions/desadv/d96a.rb +187 -101
- data/definitions/invoic/d01b.rb +559 -0
- data/definitions/invoic/d96a.rb +389 -0
- data/definitions/invrpt/d01b.rb +134 -0
- data/definitions/invrpt/d96a.rb +125 -0
- data/definitions/orders/d01b.rb +182 -0
- data/definitions/orders/d96b.rb +198 -0
- data/definitions/ordrsp/d01b.rb +251 -0
- data/definitions/ordrsp/d96b.rb +226 -0
- data/definitions/pricat/d01b.rb +225 -0
- data/definitions/pricat/d96b.rb +207 -0
- data/definitions/retann/d01b.rb +172 -0
- data/definitions/retann/d96b.rb +221 -0
- data/definitions/segments/ajt.rb +47 -0
- data/definitions/segments/alc.rb +128 -36
- data/definitions/segments/bgm.rb +128 -0
- data/definitions/segments/cdi.rb +39 -0
- data/definitions/segments/cnt.rb +4 -0
- data/definitions/segments/cta.rb +89 -0
- data/definitions/segments/cux.rb +9 -2
- data/definitions/segments/dgs.rb +34 -0
- data/definitions/segments/doc.rb +45 -0
- data/definitions/segments/dtm.rb +85 -1
- data/definitions/segments/efi.rb +67 -0
- data/definitions/segments/eqd.rb +37 -0
- data/definitions/segments/ftx.rb +24 -2
- data/definitions/segments/gin.rb +113 -0
- data/definitions/segments/imd.rb +5 -1
- data/definitions/segments/inv.rb +94 -0
- data/definitions/segments/lin.rb +23 -3
- data/definitions/segments/loc.rb +52 -4
- data/definitions/segments/moa.rb +86 -2
- data/definitions/segments/nad.rb +69 -9
- data/definitions/segments/pac.rb +12 -0
- data/definitions/segments/pat.rb +171 -0
- data/definitions/segments/pcd.rb +72 -0
- data/definitions/segments/pci.rb +110 -0
- data/definitions/segments/pgi.rb +6 -2
- data/definitions/segments/pia.rb +21 -21
- data/definitions/segments/pri.rb +21 -1
- data/definitions/segments/qty.rb +219 -5
- data/definitions/segments/rff.rb +51 -7
- data/definitions/segments/rte.rb +52 -0
- data/definitions/segments/tax.rb +17 -10
- data/definitions/segments/tdt.rb +24 -0
- data/definitions/segments/tod.rb +64 -0
- data/definitions/segments/tru.rb +34 -0
- data/definitions/segments/una.rb +7 -7
- data/definitions/segments/unb.rb +4 -4
- data/definitions/segments/unh.rb +70 -5
- data/definitions/segments/uns.rb +2 -2
- data/definitions/segments/unt.rb +2 -2
- data/definitions/slsrpt/d01b.rb +104 -100
- data/definitions/slsrpt/d96a.rb +104 -99
- data/eancom.gemspec +5 -8
- data/lib/eancom/edifact/document.rb +2 -2
- data/lib/eancom/edifact/footer.rb +1 -0
- data/lib/eancom/edifact/segment.rb +2 -2
- data/lib/eancom/edifact/segments/ajt.rb +32 -0
- data/lib/eancom/edifact/segments/ali.rb +2 -4
- data/lib/eancom/edifact/segments/bgm.rb +4 -3
- data/lib/eancom/edifact/segments/cdi.rb +30 -0
- data/lib/eancom/edifact/segments/cnt.rb +8 -1
- data/lib/eancom/edifact/segments/cps.rb +4 -1
- data/lib/eancom/edifact/segments/cta.rb +30 -0
- data/lib/eancom/edifact/segments/cux.rb +1 -1
- data/lib/eancom/edifact/segments/dgs.rb +31 -0
- data/lib/eancom/edifact/segments/doc.rb +30 -0
- data/lib/eancom/edifact/segments/dtm.rb +10 -6
- data/lib/eancom/edifact/segments/efi.rb +38 -0
- data/lib/eancom/edifact/segments/eqd.rb +30 -0
- data/lib/eancom/edifact/segments/ftx.rb +2 -2
- data/lib/eancom/edifact/segments/gin.rb +45 -0
- data/lib/eancom/edifact/segments/imd.rb +1 -1
- data/lib/eancom/edifact/segments/inv.rb +43 -0
- data/lib/eancom/edifact/segments/lin.rb +7 -3
- data/lib/eancom/edifact/segments/loc.rb +8 -5
- data/lib/eancom/edifact/segments/mea.rb +1 -0
- data/lib/eancom/edifact/segments/moa.rb +3 -3
- data/lib/eancom/edifact/segments/nad.rb +11 -6
- data/lib/eancom/edifact/segments/pac.rb +3 -1
- data/lib/eancom/edifact/segments/pat.rb +37 -0
- data/lib/eancom/edifact/segments/pcd.rb +33 -0
- data/lib/eancom/edifact/segments/pci.rb +40 -0
- data/lib/eancom/edifact/segments/pia.rb +1 -0
- data/lib/eancom/edifact/segments/pri.rb +0 -1
- data/lib/eancom/edifact/segments/qty.rb +9 -5
- data/lib/eancom/edifact/segments/rff.rb +8 -2
- data/lib/eancom/edifact/segments/rte.rb +33 -0
- data/lib/eancom/edifact/segments/tax.rb +7 -1
- data/lib/eancom/edifact/segments/tdt.rb +4 -1
- data/lib/eancom/edifact/segments/tod.rb +33 -0
- data/lib/eancom/edifact/segments/tru.rb +31 -0
- data/lib/eancom/edifact/segments/una.rb +2 -1
- data/lib/eancom/edifact/segments/unb.rb +4 -5
- data/lib/eancom/edifact/segments/unh.rb +6 -4
- data/lib/eancom/edifact/segments/uns.rb +3 -0
- data/lib/eancom/edifact/structure.rb +0 -1
- data/lib/eancom/edifact.rb +15 -1
- data/lib/eancom/factory.rb +1 -1
- data/lib/eancom/parser/document.rb +2 -10
- data/lib/eancom/version.rb +1 -1
- data/lib/eancom.rb +3 -1
- data/pricat.json +1 -0
- metadata +51 -52
- data/.rspec_status +0 -225
- data/.rubocop.yml +0 -2
@@ -0,0 +1,33 @@
|
|
1
|
+
module Eancom
|
2
|
+
module Edifact
|
3
|
+
class PCD < Segment
|
4
|
+
TAG = 'PCD'.freeze
|
5
|
+
TYPE = :header
|
6
|
+
|
7
|
+
attr_reader :segment_type
|
8
|
+
|
9
|
+
def initialize(
|
10
|
+
tag: nil,
|
11
|
+
percentage:,
|
12
|
+
percentage_type_code_qualifier: nil
|
13
|
+
)
|
14
|
+
@tag = tag
|
15
|
+
@percentage_type_code_qualifier = percentage_type_code_qualifier
|
16
|
+
@percentage = percentage
|
17
|
+
|
18
|
+
super(tag: tag || TAG)
|
19
|
+
end
|
20
|
+
|
21
|
+
def to_json_hash
|
22
|
+
hash = {}
|
23
|
+
hash.merge!(percentage_type_code_qualifier: find_identifier(:percentage_type_code_qualifier)) if @percentage_type_code_qualifier
|
24
|
+
hash.merge!(percentage: @percentage) if @percentage
|
25
|
+
hash
|
26
|
+
end
|
27
|
+
|
28
|
+
def segment_type
|
29
|
+
TYPE
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Eancom
|
2
|
+
module Edifact
|
3
|
+
class PCI < Segment
|
4
|
+
TAG = 'PCI'.freeze
|
5
|
+
TYPE = :body
|
6
|
+
|
7
|
+
attr_reader :segment_type
|
8
|
+
|
9
|
+
def initialize(
|
10
|
+
tag: nil,
|
11
|
+
marking_instructions_code:,
|
12
|
+
marks_and_labels_code: nil,
|
13
|
+
container_or_package_contents_indicator_mode: nil
|
14
|
+
)
|
15
|
+
|
16
|
+
@tag = tag
|
17
|
+
@marking_instructions_code = marking_instructions_code
|
18
|
+
@marks_and_labels_code = marks_and_labels_code
|
19
|
+
@container_or_package_contents_indicator_mode = container_or_package_contents_indicator_mode
|
20
|
+
super(tag: tag || TAG)
|
21
|
+
end
|
22
|
+
|
23
|
+
def to_json_hash
|
24
|
+
hash = {}
|
25
|
+
hash.merge!(marking_instructions_code: find_identifier(:marking_instructions_code)) if @marking_instructions_code
|
26
|
+
hash.merge!(marks_and_labels_code: @marks_and_labels_code) if @marks_and_labels_code
|
27
|
+
hash.merge!(container_or_package_contents_indicator_mode: @container_or_package_contents_indicator_mode) if @container_or_package_contents_indicator_mode
|
28
|
+
hash
|
29
|
+
end
|
30
|
+
|
31
|
+
def group_name
|
32
|
+
'package_identification'
|
33
|
+
end
|
34
|
+
|
35
|
+
def segment_type
|
36
|
+
TYPE
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -61,6 +61,7 @@ module Eancom
|
|
61
61
|
|
62
62
|
def to_json_hash
|
63
63
|
hash = {}
|
64
|
+
hash.merge!(product_identifier_code_qualifier: find_identifier(:product_identifier_code_qualifier)) if @product_identifier_code_qualifier
|
64
65
|
hash.merge!(item_identifier_1: @item_identifier_1) if @item_identifier_1
|
65
66
|
hash.merge!(item_type_identification_code_1: find_identifier(:item_type_identification_code_1)) if @item_type_identification_code_1
|
66
67
|
hash.merge!(code_list_identification_code_1: @code_list_identification_code_1) if @code_list_identification_code_1
|
@@ -19,11 +19,15 @@ module Eancom
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def to_json_hash
|
22
|
-
{
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
22
|
+
hash = { identifier => {} }
|
23
|
+
hash[identifier].merge!({ quantity: @quantity }) if @quantity
|
24
|
+
hash.merge!(measurement_unit_code: find_identifier(:measurement_unit_code)) if @measurement_unit_code
|
25
|
+
hash.merge!(identifier: @identifier) if @identifier
|
26
|
+
hash
|
27
|
+
end
|
28
|
+
|
29
|
+
def group_name
|
30
|
+
'quantities'
|
27
31
|
end
|
28
32
|
|
29
33
|
def segment_type
|
@@ -21,11 +21,17 @@ module Eancom
|
|
21
21
|
def to_json_hash
|
22
22
|
{
|
23
23
|
identifier => {
|
24
|
-
reference_identifier: @reference_identifier
|
25
|
-
|
24
|
+
reference_identifier: @reference_identifier,
|
25
|
+
document_line_identifier: @document_line_identifier
|
26
|
+
},
|
27
|
+
identifier: @identifier
|
26
28
|
}
|
27
29
|
end
|
28
30
|
|
31
|
+
def group_name
|
32
|
+
'references'
|
33
|
+
end
|
34
|
+
|
29
35
|
def segment_type
|
30
36
|
TYPE
|
31
37
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Eancom
|
2
|
+
module Edifact
|
3
|
+
class RTE < Segment
|
4
|
+
TAG = 'RTE'.freeze
|
5
|
+
TYPE = :header
|
6
|
+
|
7
|
+
attr_reader :segment_type
|
8
|
+
|
9
|
+
def initialize(
|
10
|
+
tag: nil,
|
11
|
+
rate_type_code_qualifier: nil,
|
12
|
+
unit_price_basis_rate: nil
|
13
|
+
)
|
14
|
+
@tag = tag
|
15
|
+
@rate_type_code_qualifier = rate_type_code_qualifier
|
16
|
+
@unit_price_basis_rate = unit_price_basis_rate
|
17
|
+
|
18
|
+
super(tag: tag || TAG)
|
19
|
+
end
|
20
|
+
|
21
|
+
def to_json_hash
|
22
|
+
hash = {}
|
23
|
+
hash.merge!(rate_type_code_qualifier: find_identifier(:rate_type_code_qualifier)) if @rate_type_code_qualifier
|
24
|
+
hash.merge!(unit_price_basis_rate: @unit_price_basis_rate) if @unit_price_basis_rate
|
25
|
+
hash
|
26
|
+
end
|
27
|
+
|
28
|
+
def segment_type
|
29
|
+
TYPE
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -9,7 +9,7 @@ module Eancom
|
|
9
9
|
def initialize(
|
10
10
|
tag: nil,
|
11
11
|
duty_or_tax_or_fee_function_code_qualifier:,
|
12
|
-
duty_or_tax_or_fee_name_code
|
12
|
+
duty_or_tax_or_fee_name_code: nil,
|
13
13
|
code_list_identification_code_1: nil,
|
14
14
|
code_list_responsibility_agency_code_1: nil,
|
15
15
|
duty_or_tax_or_fee_type_name: nil,
|
@@ -50,8 +50,14 @@ module Eancom
|
|
50
50
|
|
51
51
|
def to_json_hash
|
52
52
|
hash = {}
|
53
|
+
hash.merge!(duty_or_tax_or_fee_function_code_qualifier: find_identifier(:duty_or_tax_or_fee_function_code_qualifier)) if @duty_or_tax_or_fee_function_code_qualifier
|
53
54
|
hash.merge!(duty_or_tax_or_fee_name_code: find_identifier(:duty_or_tax_or_fee_name_code)) if @duty_or_tax_or_fee_name_code
|
55
|
+
hash.merge!(duty_or_tax_or_fee_account_code: @duty_or_tax_or_fee_account_code) if @duty_or_tax_or_fee_account_code
|
56
|
+
hash.merge!(duty_tax_fee_rate_code: @duty_tax_fee_rate_code) if @duty_tax_fee_rate_code
|
54
57
|
hash.merge!(duty_or_tax_or_fee_rate: @duty_or_tax_or_fee_rate) if @duty_or_tax_or_fee_rate
|
58
|
+
hash.merge!(code_list_identification_code_3: @code_list_identification_code_3) if @code_list_identification_code_3
|
59
|
+
hash.merge!(code_list_responsibility_agency_code_3: @code_list_responsibility_agency_code_3) if @code_list_responsibility_agency_code_3
|
60
|
+
hash.merge!(code_list_responsibility_agency_code_4: @code_list_responsibility_agency_code_4) if @code_list_responsibility_agency_code_4
|
55
61
|
hash.merge!(duty_or_tax_or_fee_category_code: find_identifier(:duty_or_tax_or_fee_category_code)) if @duty_or_tax_or_fee_category_code
|
56
62
|
outer_hash = {}
|
57
63
|
identifier = find_identifier(:duty_or_tax_or_fee_function_code_qualifier)
|
@@ -43,7 +43,10 @@ module Eancom
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def to_json_hash
|
46
|
-
{}
|
46
|
+
hash = {}
|
47
|
+
hash.merge!(transport_stage_code_qualifier: find_identifier(:transport_stage_code_qualifier)) if @transport_stage_code_qualifier
|
48
|
+
hash.merge!(transport_mode_name_code: find_identifier(:transport_mode_name_code)) if @transport_mode_name_code
|
49
|
+
hash
|
47
50
|
end
|
48
51
|
|
49
52
|
def segment_type
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Eancom
|
2
|
+
module Edifact
|
3
|
+
class TOD < Segment
|
4
|
+
TAG = 'TOD'.freeze
|
5
|
+
TYPE = :header
|
6
|
+
|
7
|
+
attr_reader :segment_type
|
8
|
+
|
9
|
+
def initialize(
|
10
|
+
tag: nil,
|
11
|
+
delivery_or_transport_terms_function_code: nil,
|
12
|
+
delivery_or_transport_terms_description_code: nil
|
13
|
+
)
|
14
|
+
@tag = tag
|
15
|
+
@delivery_or_transport_terms_function_code = delivery_or_transport_terms_function_code
|
16
|
+
@delivery_or_transport_terms_description_code = delivery_or_transport_terms_description_code
|
17
|
+
|
18
|
+
super(tag: tag || TAG)
|
19
|
+
end
|
20
|
+
|
21
|
+
def to_json_hash
|
22
|
+
hash = {}
|
23
|
+
hash.merge!(delivery_or_transport_terms_function_code: @delivery_or_transport_terms_function_code) if @delivery_or_transport_terms_function_code
|
24
|
+
hash.merge!(delivery_or_transport_terms_description_code: @delivery_or_transport_terms_description_code) if @delivery_or_transport_terms_description_code
|
25
|
+
hash
|
26
|
+
end
|
27
|
+
|
28
|
+
def segment_type
|
29
|
+
TYPE
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Eancom
|
2
|
+
module Edifact
|
3
|
+
class TRU < Segment
|
4
|
+
TAG = 'TRU'.freeze
|
5
|
+
TYPE = :body
|
6
|
+
|
7
|
+
attr_reader :segment_type
|
8
|
+
|
9
|
+
def initialize(
|
10
|
+
tag: nil,
|
11
|
+
object_identifier:
|
12
|
+
)
|
13
|
+
|
14
|
+
@tag = tag
|
15
|
+
@object_identifier = object_identifier
|
16
|
+
|
17
|
+
super(tag: tag || TAG)
|
18
|
+
end
|
19
|
+
|
20
|
+
def to_json_hash
|
21
|
+
hash = {}
|
22
|
+
hash.merge!(object_identifier: @object_identifier)
|
23
|
+
hash
|
24
|
+
end
|
25
|
+
|
26
|
+
def segment_type
|
27
|
+
TYPE
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -47,16 +47,15 @@ module Eancom
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def to_json_hash
|
50
|
-
|
50
|
+
{
|
51
51
|
interchange_sender_identification: @interchange_sender_identification,
|
52
52
|
interchange_recipient_identification: @interchange_recipient_identification,
|
53
53
|
date: @date,
|
54
54
|
time: @time,
|
55
|
-
interchange_control_reference: @interchange_control_reference
|
55
|
+
interchange_control_reference: @interchange_control_reference,
|
56
|
+
application_reference: @application_reference,
|
57
|
+
interchange_agreement_identifier: @interchange_agreement_identifier
|
56
58
|
}
|
57
|
-
|
58
|
-
hash.merge!(sender_identifiction_code_qualifier: @sender_identifiction_code_qualifier) if @sender_identifiction_code_qualifier
|
59
|
-
hash.merge!(recipient_identifiction_code_qualifier: @recipient_identifiction_code_qualifier) if @recipient_identifiction_code_qualifier
|
60
59
|
end
|
61
60
|
|
62
61
|
def segment_type
|
@@ -11,7 +11,7 @@ module Eancom
|
|
11
11
|
message_version_number:,
|
12
12
|
message_release_number:,
|
13
13
|
controlling_agency:,
|
14
|
-
association_assigned_code
|
14
|
+
association_assigned_code:,
|
15
15
|
code_list_directory_version_number: nil
|
16
16
|
)
|
17
17
|
|
@@ -26,6 +26,10 @@ module Eancom
|
|
26
26
|
super(tag: tag || TAG)
|
27
27
|
end
|
28
28
|
|
29
|
+
'''
|
30
|
+
Changing this to_json_hash function throws unusualy many errors.
|
31
|
+
Discuss whether or not this hash function needs to be changed.
|
32
|
+
'''
|
29
33
|
def to_json_hash
|
30
34
|
hash = {
|
31
35
|
message_reference_number: @message_reference_number,
|
@@ -33,10 +37,8 @@ module Eancom
|
|
33
37
|
message_version_number: @message_version_number,
|
34
38
|
message_release_number: @message_release_number,
|
35
39
|
controlling_agency: @controlling_agency,
|
40
|
+
association_assigned_code: @association_assigned_code
|
36
41
|
}
|
37
|
-
hash[:association_assigned_code] = @association_assigned_code if @association_assigned_code
|
38
|
-
hash[:code_list_directory_version_number] = @code_list_directory_version_number if @code_list_directory_version_number
|
39
|
-
hash
|
40
42
|
end
|
41
43
|
|
42
44
|
def segment_type
|
data/lib/eancom/edifact.rb
CHANGED
@@ -21,6 +21,18 @@ require 'eancom/edifact/segments/unt'
|
|
21
21
|
require 'eancom/edifact/segments/unz'
|
22
22
|
|
23
23
|
require 'eancom/edifact/segments/alc'
|
24
|
+
require 'eancom/edifact/segments/ajt'
|
25
|
+
require 'eancom/edifact/segments/dgs'
|
26
|
+
require 'eancom/edifact/segments/efi'
|
27
|
+
require 'eancom/edifact/segments/tru'
|
28
|
+
require 'eancom/edifact/segments/cdi'
|
29
|
+
require 'eancom/edifact/segments/gin'
|
30
|
+
require 'eancom/edifact/segments/rte'
|
31
|
+
require 'eancom/edifact/segments/pcd'
|
32
|
+
require 'eancom/edifact/segments/eqd'
|
33
|
+
require 'eancom/edifact/segments/tod'
|
34
|
+
require 'eancom/edifact/segments/pat'
|
35
|
+
require 'eancom/edifact/segments/doc'
|
24
36
|
require 'eancom/edifact/segments/ali'
|
25
37
|
require 'eancom/edifact/segments/bgm'
|
26
38
|
require 'eancom/edifact/segments/cav'
|
@@ -28,15 +40,18 @@ require 'eancom/edifact/segments/cci'
|
|
28
40
|
require 'eancom/edifact/segments/cnt'
|
29
41
|
require 'eancom/edifact/segments/cps'
|
30
42
|
require 'eancom/edifact/segments/cux'
|
43
|
+
require 'eancom/edifact/segments/cta'
|
31
44
|
require 'eancom/edifact/segments/dtm'
|
32
45
|
require 'eancom/edifact/segments/ftx'
|
33
46
|
require 'eancom/edifact/segments/imd'
|
47
|
+
require 'eancom/edifact/segments/inv'
|
34
48
|
require 'eancom/edifact/segments/lin'
|
35
49
|
require 'eancom/edifact/segments/loc'
|
36
50
|
require 'eancom/edifact/segments/mea'
|
37
51
|
require 'eancom/edifact/segments/moa'
|
38
52
|
require 'eancom/edifact/segments/nad'
|
39
53
|
require 'eancom/edifact/segments/pac'
|
54
|
+
require 'eancom/edifact/segments/pci'
|
40
55
|
require 'eancom/edifact/segments/pgi'
|
41
56
|
require 'eancom/edifact/segments/pia'
|
42
57
|
require 'eancom/edifact/segments/pri'
|
@@ -49,4 +64,3 @@ module Eancom
|
|
49
64
|
module Edifact
|
50
65
|
end
|
51
66
|
end
|
52
|
-
|
data/lib/eancom/factory.rb
CHANGED
@@ -29,7 +29,7 @@ module Eancom
|
|
29
29
|
elsif segment.is_footer?
|
30
30
|
@document.add_to_body(segment)
|
31
31
|
else
|
32
|
-
raise SegmentTypeNotDefined
|
32
|
+
raise SegmentTypeNotDefined
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
@@ -53,16 +53,8 @@ module Eancom
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def convert(string)
|
56
|
-
string
|
57
|
-
'UTF-8',
|
58
|
-
'binary',
|
59
|
-
invalid: :replace,
|
60
|
-
undef: :replace,
|
61
|
-
replace: ''
|
62
|
-
)
|
63
|
-
string
|
56
|
+
string.encode('UTF-8')
|
64
57
|
end
|
65
|
-
|
66
58
|
end
|
67
59
|
end
|
68
60
|
end
|
data/lib/eancom/version.rb
CHANGED
data/lib/eancom.rb
CHANGED
data/pricat.json
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"#<File:0x00007ff38589ba40>"
|
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:
|
4
|
+
version: 2.0.0
|
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:
|
11
|
+
date: 2021-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: pry-nav
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: pry-remote
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,35 +39,7 @@ dependencies:
|
|
53
39
|
- !ruby/object:Gem::Version
|
54
40
|
version: '0'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rspec
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rubocop
|
42
|
+
name: pry-nav
|
85
43
|
requirement: !ruby/object:Gem::Requirement
|
86
44
|
requirements:
|
87
45
|
- - ">="
|
@@ -122,7 +80,7 @@ dependencies:
|
|
122
80
|
- - ">="
|
123
81
|
- !ruby/object:Gem::Version
|
124
82
|
version: '0'
|
125
|
-
description:
|
83
|
+
description:
|
126
84
|
email:
|
127
85
|
- support@fadendaten.ch
|
128
86
|
executables: []
|
@@ -133,8 +91,6 @@ files:
|
|
133
91
|
- ".gitignore"
|
134
92
|
- ".gitlab-ci.yml"
|
135
93
|
- ".rspec"
|
136
|
-
- ".rspec_status"
|
137
|
-
- ".rubocop.yml"
|
138
94
|
- ".ruby-version"
|
139
95
|
- ".travis.yml"
|
140
96
|
- Gemfile
|
@@ -146,30 +102,57 @@ files:
|
|
146
102
|
- bin/setup
|
147
103
|
- definitions/desadv/d01b.rb
|
148
104
|
- definitions/desadv/d96a.rb
|
105
|
+
- definitions/invoic/d01b.rb
|
106
|
+
- definitions/invoic/d96a.rb
|
107
|
+
- definitions/invrpt/d01b.rb
|
108
|
+
- definitions/invrpt/d96a.rb
|
109
|
+
- definitions/orders/d01b.rb
|
110
|
+
- definitions/orders/d96b.rb
|
111
|
+
- definitions/ordrsp/d01b.rb
|
112
|
+
- definitions/ordrsp/d96b.rb
|
113
|
+
- definitions/pricat/d01b.rb
|
114
|
+
- definitions/pricat/d96b.rb
|
115
|
+
- definitions/retann/d01b.rb
|
116
|
+
- definitions/retann/d96b.rb
|
117
|
+
- definitions/segments/ajt.rb
|
149
118
|
- definitions/segments/alc.rb
|
150
119
|
- definitions/segments/ali.rb
|
151
120
|
- definitions/segments/bgm.rb
|
152
121
|
- definitions/segments/cav.rb
|
153
122
|
- definitions/segments/cci.rb
|
123
|
+
- definitions/segments/cdi.rb
|
154
124
|
- definitions/segments/cnt.rb
|
155
125
|
- definitions/segments/cps.rb
|
126
|
+
- definitions/segments/cta.rb
|
156
127
|
- definitions/segments/cux.rb
|
128
|
+
- definitions/segments/dgs.rb
|
129
|
+
- definitions/segments/doc.rb
|
157
130
|
- definitions/segments/dtm.rb
|
131
|
+
- definitions/segments/efi.rb
|
132
|
+
- definitions/segments/eqd.rb
|
158
133
|
- definitions/segments/ftx.rb
|
134
|
+
- definitions/segments/gin.rb
|
159
135
|
- definitions/segments/imd.rb
|
136
|
+
- definitions/segments/inv.rb
|
160
137
|
- definitions/segments/lin.rb
|
161
138
|
- definitions/segments/loc.rb
|
162
139
|
- definitions/segments/mea.rb
|
163
140
|
- definitions/segments/moa.rb
|
164
141
|
- definitions/segments/nad.rb
|
165
142
|
- definitions/segments/pac.rb
|
143
|
+
- definitions/segments/pat.rb
|
144
|
+
- definitions/segments/pcd.rb
|
145
|
+
- definitions/segments/pci.rb
|
166
146
|
- definitions/segments/pgi.rb
|
167
147
|
- definitions/segments/pia.rb
|
168
148
|
- definitions/segments/pri.rb
|
169
149
|
- definitions/segments/qty.rb
|
170
150
|
- definitions/segments/rff.rb
|
151
|
+
- definitions/segments/rte.rb
|
171
152
|
- definitions/segments/tax.rb
|
172
153
|
- definitions/segments/tdt.rb
|
154
|
+
- definitions/segments/tod.rb
|
155
|
+
- definitions/segments/tru.rb
|
173
156
|
- definitions/segments/una.rb
|
174
157
|
- definitions/segments/unb.rb
|
175
158
|
- definitions/segments/unh.rb
|
@@ -192,30 +175,45 @@ files:
|
|
192
175
|
- lib/eancom/edifact/item.rb
|
193
176
|
- lib/eancom/edifact/message.rb
|
194
177
|
- lib/eancom/edifact/segment.rb
|
178
|
+
- lib/eancom/edifact/segments/ajt.rb
|
195
179
|
- lib/eancom/edifact/segments/alc.rb
|
196
180
|
- lib/eancom/edifact/segments/ali.rb
|
197
181
|
- lib/eancom/edifact/segments/bgm.rb
|
198
182
|
- lib/eancom/edifact/segments/cav.rb
|
199
183
|
- lib/eancom/edifact/segments/cci.rb
|
184
|
+
- lib/eancom/edifact/segments/cdi.rb
|
200
185
|
- lib/eancom/edifact/segments/cnt.rb
|
201
186
|
- lib/eancom/edifact/segments/cps.rb
|
187
|
+
- lib/eancom/edifact/segments/cta.rb
|
202
188
|
- lib/eancom/edifact/segments/cux.rb
|
189
|
+
- lib/eancom/edifact/segments/dgs.rb
|
190
|
+
- lib/eancom/edifact/segments/doc.rb
|
203
191
|
- lib/eancom/edifact/segments/dtm.rb
|
192
|
+
- lib/eancom/edifact/segments/efi.rb
|
193
|
+
- lib/eancom/edifact/segments/eqd.rb
|
204
194
|
- lib/eancom/edifact/segments/ftx.rb
|
195
|
+
- lib/eancom/edifact/segments/gin.rb
|
205
196
|
- lib/eancom/edifact/segments/imd.rb
|
197
|
+
- lib/eancom/edifact/segments/inv.rb
|
206
198
|
- lib/eancom/edifact/segments/lin.rb
|
207
199
|
- lib/eancom/edifact/segments/loc.rb
|
208
200
|
- lib/eancom/edifact/segments/mea.rb
|
209
201
|
- lib/eancom/edifact/segments/moa.rb
|
210
202
|
- lib/eancom/edifact/segments/nad.rb
|
211
203
|
- lib/eancom/edifact/segments/pac.rb
|
204
|
+
- lib/eancom/edifact/segments/pat.rb
|
205
|
+
- lib/eancom/edifact/segments/pcd.rb
|
206
|
+
- lib/eancom/edifact/segments/pci.rb
|
212
207
|
- lib/eancom/edifact/segments/pgi.rb
|
213
208
|
- lib/eancom/edifact/segments/pia.rb
|
214
209
|
- lib/eancom/edifact/segments/pri.rb
|
215
210
|
- lib/eancom/edifact/segments/qty.rb
|
216
211
|
- lib/eancom/edifact/segments/rff.rb
|
212
|
+
- lib/eancom/edifact/segments/rte.rb
|
217
213
|
- lib/eancom/edifact/segments/tax.rb
|
218
214
|
- lib/eancom/edifact/segments/tdt.rb
|
215
|
+
- lib/eancom/edifact/segments/tod.rb
|
216
|
+
- lib/eancom/edifact/segments/tru.rb
|
219
217
|
- lib/eancom/edifact/segments/una.rb
|
220
218
|
- lib/eancom/edifact/segments/unb.rb
|
221
219
|
- lib/eancom/edifact/segments/unh.rb
|
@@ -228,12 +226,13 @@ files:
|
|
228
226
|
- lib/eancom/parser/document.rb
|
229
227
|
- lib/eancom/parser/segment.rb
|
230
228
|
- lib/eancom/version.rb
|
229
|
+
- pricat.json
|
231
230
|
homepage: https://fadendaten.ch
|
232
231
|
licenses:
|
233
232
|
- MIT
|
234
233
|
metadata:
|
235
234
|
homepage_uri: https://fadendaten.ch
|
236
|
-
post_install_message:
|
235
|
+
post_install_message:
|
237
236
|
rdoc_options: []
|
238
237
|
require_paths:
|
239
238
|
- lib
|
@@ -248,8 +247,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
248
247
|
- !ruby/object:Gem::Version
|
249
248
|
version: '0'
|
250
249
|
requirements: []
|
251
|
-
rubygems_version: 3.
|
252
|
-
signing_key:
|
250
|
+
rubygems_version: 3.2.3
|
251
|
+
signing_key:
|
253
252
|
specification_version: 4
|
254
253
|
summary: EDIFACT Generator for the EANCOM Subset
|
255
254
|
test_files: []
|