eddy 0.8.3 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -4
- data/CHANGELOG.md +51 -1
- data/Gemfile.lock +8 -8
- data/README.md +1 -1
- data/data/code-lists/333.tsv +8 -0
- data/data/segments/amt.segment.yml +7 -0
- data/data/segments/bia.segment.yml +10 -0
- data/data/segments/cur.segment.yml +8 -0
- data/data/segments/dtm.segment.yml +1 -0
- data/data/segments/fob.segment.yml +8 -0
- data/data/segments/itd.segment.yml +13 -0
- data/data/segments/mtx.segment.yml +7 -0
- data/data/segments/n9.segment.yml +7 -0
- data/data/segments/per.segment.yml +13 -0
- data/data/segments/po1.segment.yml +6 -0
- data/data/segments/po3.segment.yml +13 -0
- data/data/segments/qty.segment.yml +10 -0
- data/data/segments/ref.segment.yml +1 -0
- data/data/segments/sac.segment.yml +4 -0
- data/data/segments/sch.segment.yml +7 -0
- data/data/segments/sdq.segment.yml +8 -0
- data/data/segments/txi.segment.yml +9 -0
- data/data/transaction_sets/810.edi.yml +93 -0
- data/data/transaction_sets/846.edi.yml +57 -0
- data/data/transaction_sets/850.edi.yml +73 -0
- data/data/transaction_sets/855.edi.yml +74 -0
- data/data/transaction_sets/856.edi.yml +54 -0
- data/eddy.gemspec +1 -1
- data/exe/eddy +1 -0
- data/lib/definitions/elements/generated/100.currency_code.rb +200 -0
- data/lib/definitions/elements/generated/146.shipment_method_of_payment.rb +65 -0
- data/lib/definitions/elements/generated/1551.message_text.rb +29 -0
- data/lib/definitions/elements/generated/280.exchange_rate.rb +29 -0
- data/lib/definitions/elements/generated/309.location_qualifier.rb +209 -0
- data/lib/definitions/elements/generated/310.location_identifier.rb +29 -0
- data/lib/definitions/elements/generated/311.shipment_type_code.rb +42 -0
- data/lib/definitions/elements/generated/322.load_empty_status_code.rb +40 -0
- data/lib/definitions/elements/generated/325.tax_identification_number.rb +29 -0
- data/lib/definitions/elements/generated/333.terms_basis_date_code.rb +44 -0
- data/lib/definitions/elements/generated/336.terms_type_code.rb +102 -0
- data/lib/definitions/elements/generated/338.terms_discount_percent.rb +29 -0
- data/lib/definitions/elements/generated/351.terms_discount_days_due.rb +30 -0
- data/lib/definitions/elements/generated/363.note_reference_code.rb +278 -0
- data/lib/definitions/elements/generated/364.communication_number.rb +29 -0
- data/lib/definitions/elements/generated/365.communication_number_qualifier.rb +77 -0
- data/lib/definitions/elements/generated/366.contact_function_code.rb +267 -0
- data/lib/definitions/elements/generated/369.free_form_description.rb +29 -0
- data/lib/definitions/elements/generated/370.terms_discount_due_date.rb +29 -0
- data/lib/definitions/elements/generated/371.change_reason_code.rb +67 -0
- data/lib/definitions/elements/generated/378.allowance_charge_percent_qualifier.rb +48 -0
- data/lib/definitions/elements/generated/386.terms_net_days.rb +30 -0
- data/lib/definitions/elements/generated/446.terms_net_due_date.rb +29 -0
- data/lib/definitions/elements/generated/522.amount_qualifier_code.rb +1510 -0
- data/lib/definitions/elements/generated/673.quantity_qualifier.rb +869 -0
- data/lib/definitions/elements/generated/755.report_type_code.rb +559 -0
- data/lib/definitions/elements/generated/954.percent.rb +29 -0
- data/lib/definitions/elements/generated/963.tax_type_code.rb +111 -0
- data/lib/definitions/elements/manual/156.state_or_province_code.rb +16 -1
- data/lib/definitions/elements/manual/i/I10.interchange_control_standards_identifier.rb +2 -2
- data/lib/definitions/elements/manual/i/I11.interchange_control_version_number.rb +1 -0
- data/lib/definitions/segments/generated/amt.rb +56 -0
- data/lib/definitions/segments/generated/bia.rb +107 -0
- data/lib/definitions/segments/generated/cur.rb +73 -0
- data/lib/definitions/segments/generated/dtm.rb +17 -0
- data/lib/definitions/segments/generated/fob.rb +73 -0
- data/lib/definitions/segments/generated/hl.rb +90 -0
- data/lib/definitions/segments/generated/itd.rb +158 -0
- data/lib/definitions/segments/generated/mtx.rb +56 -0
- data/lib/definitions/segments/generated/n2.rb +56 -0
- data/lib/definitions/segments/generated/n9.rb +56 -0
- data/lib/definitions/segments/generated/per.rb +158 -0
- data/lib/definitions/segments/generated/po1.rb +102 -0
- data/lib/definitions/segments/generated/po3.rb +158 -0
- data/lib/definitions/segments/generated/qty.rb +73 -0
- data/lib/definitions/segments/generated/ref.rb +17 -0
- data/lib/definitions/segments/generated/sac.rb +68 -0
- data/lib/definitions/segments/generated/sch.rb +56 -0
- data/lib/definitions/segments/generated/sdq.rb +73 -0
- data/lib/definitions/segments/generated/txi.rb +90 -0
- data/lib/definitions/transaction_sets/manual/846/846.rb +122 -0
- data/lib/definitions/transaction_sets/manual/846/loops/lin.rb +155 -0
- data/lib/definitions/transaction_sets/manual/846/loops/n1.rb +107 -0
- data/lib/definitions/transaction_sets/manual/846/loops/qty.rb +75 -0
- data/lib/definitions/transaction_sets/manual/846/loops/sch.rb +59 -0
- data/lib/definitions/transaction_sets/manual/846/loops/sln.rb +59 -0
- data/lib/definitions/transaction_sets/manual/850/850.rb +108 -1
- data/lib/definitions/transaction_sets/manual/850/loops/ctp.rb +47 -0
- data/lib/definitions/transaction_sets/manual/850/loops/n1.rb +31 -10
- data/lib/definitions/transaction_sets/manual/850/loops/n9.rb +59 -0
- data/lib/definitions/transaction_sets/manual/850/loops/pid.rb +47 -0
- data/lib/definitions/transaction_sets/manual/850/loops/po1.rb +78 -10
- data/lib/definitions/transaction_sets/manual/850/loops/sac.rb +47 -0
- data/lib/eddy.rb +49 -3
- data/lib/eddy/build/transaction_set_builder.rb +1 -1
- data/lib/eddy/config.rb +0 -21
- data/lib/eddy/data.rb +0 -40
- data/lib/eddy/data/persistence/base.rb +5 -11
- data/lib/eddy/data/persistence/memory.rb +14 -22
- data/lib/eddy/errors.rb +13 -9
- data/lib/eddy/models/element/composite.rb +2 -0
- data/lib/eddy/models/element/id.rb +1 -1
- data/lib/eddy/models/element/r.rb +1 -0
- data/lib/eddy/models/functional_group.rb +3 -2
- data/lib/eddy/models/interchange.rb +5 -1
- data/lib/eddy/parse.rb +4 -56
- data/lib/eddy/parse/interchange.rb +58 -0
- data/lib/eddy/summary/loop.rb +1 -1
- data/lib/eddy/summary/segment.rb +2 -1
- data/lib/eddy/version.rb +1 -1
- metadata +78 -5
@@ -0,0 +1,29 @@
|
|
1
|
+
module Eddy
|
2
|
+
module Elements
|
3
|
+
# ### Element Summary:
|
4
|
+
#
|
5
|
+
# - Id: 954
|
6
|
+
# - Name: Percent
|
7
|
+
# - Type: R
|
8
|
+
# - Min/Max: 1/10
|
9
|
+
# - Description: Percentage expressed as a decimal
|
10
|
+
class E954 < Eddy::Models::Element::R
|
11
|
+
# @param val [Float]
|
12
|
+
# @param req [String]
|
13
|
+
# @param ref [String]
|
14
|
+
# @return [void]
|
15
|
+
def initialize(val: nil, req: nil, ref: nil)
|
16
|
+
@id = "954"
|
17
|
+
@name = "Percent"
|
18
|
+
@description = "Percentage expressed as a decimal"
|
19
|
+
super(
|
20
|
+
min: 1,
|
21
|
+
max: 10,
|
22
|
+
req: req,
|
23
|
+
ref: ref,
|
24
|
+
val: val,
|
25
|
+
)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,111 @@
|
|
1
|
+
module Eddy
|
2
|
+
module Elements
|
3
|
+
# ### Element Summary:
|
4
|
+
#
|
5
|
+
# - Id: 963
|
6
|
+
# - Name: Tax Type Code
|
7
|
+
# - Type: ID
|
8
|
+
# - Min/Max: 2/2
|
9
|
+
# - Description: Code specifying the type of tax
|
10
|
+
class E963 < Eddy::Models::Element::ID
|
11
|
+
|
12
|
+
# @param val [String]
|
13
|
+
# @param req [String]
|
14
|
+
# @param ref [String]
|
15
|
+
# @return [void]
|
16
|
+
def initialize(val: nil, req: nil, ref: nil)
|
17
|
+
@id = "963"
|
18
|
+
@name = "Tax Type Code"
|
19
|
+
@description = "Code specifying the type of tax"
|
20
|
+
super(
|
21
|
+
min: 2,
|
22
|
+
max: 2,
|
23
|
+
req: req,
|
24
|
+
ref: ref,
|
25
|
+
val: val,
|
26
|
+
)
|
27
|
+
end
|
28
|
+
|
29
|
+
# @return [Array<String>]
|
30
|
+
def code_list()
|
31
|
+
return [
|
32
|
+
"AA", # Stadium Tax
|
33
|
+
"AB", # Surtax
|
34
|
+
"AT", # Assessment
|
35
|
+
"BP", # Business Privilege Tax
|
36
|
+
"CA", # City Tax
|
37
|
+
"CB", # Threshold Tax
|
38
|
+
"CG", # Federal Value-added Tax (GST) on Goods
|
39
|
+
"CI", # City Rental Tax
|
40
|
+
"CP", # County/Parish Sales Tax
|
41
|
+
"CR", # County Rental Tax
|
42
|
+
"CS", # City Sales Tax
|
43
|
+
"CT", # County Tax
|
44
|
+
"CV", # Federal Value-added Tax (GST) on Services
|
45
|
+
"DL", # Default Labor Tax
|
46
|
+
"EQ", # Equipment Tax
|
47
|
+
"ET", # Energy Tax
|
48
|
+
"EV", # Environmental Tax
|
49
|
+
"F1", # FICA Tax
|
50
|
+
"F2", # FICA Medicare Tax
|
51
|
+
"F3", # FICA Social Security Tax
|
52
|
+
"FD", # Federal Tax
|
53
|
+
"FF", # Fuel Super Fund Tax
|
54
|
+
"FI", # Federal Income Tax Withholding
|
55
|
+
"FL", # Fuel L.U.S.T. Tax (Leaking Underground Storage Tank)
|
56
|
+
"FR", # Franchise Tax
|
57
|
+
"FS", # Fuel Spill Tax
|
58
|
+
"FT", # Federal Excise Tax
|
59
|
+
"GR", # Gross Receipts Tax
|
60
|
+
"GS", # Goods and Services Tax
|
61
|
+
"HS", # Public Health and Education Tax
|
62
|
+
"HT", # Handicap Tax
|
63
|
+
"HZ", # Hazardous Waste Tax
|
64
|
+
"LB", # Labor By Trade Tax
|
65
|
+
"LO", # Local Tax (Not Sales Tax)
|
66
|
+
"LS", # State and Local Sales Tax
|
67
|
+
"LT", # Local Sales Tax (All Applicable Sales Taxes by Taxing Authority Below the State Level)
|
68
|
+
"LU", # Leaky Underground Storage Tank (LUST) Tax (federal)
|
69
|
+
"LV", # Leaky Underground Storage Tank (LUST) Tax (state)
|
70
|
+
"MA", # Material Tax
|
71
|
+
"MN", # Minimum Tax
|
72
|
+
"MP", # Municipal Tax
|
73
|
+
"MS", # Miscellaneous State Tax
|
74
|
+
"MT", # Metropolitan Transit Tax
|
75
|
+
"OH", # Other Taxes
|
76
|
+
"OT", # Occupational Tax
|
77
|
+
"PG", # State or Provincial Tax on Goods
|
78
|
+
"PS", # State or Provincial Tax on Services
|
79
|
+
"SA", # State or Provincial Fuel Tax
|
80
|
+
"SB", # Secondary Percentage Tax
|
81
|
+
"SC", # School Tax
|
82
|
+
"SE", # State Excise Tax
|
83
|
+
"SF", # Superfund Tax
|
84
|
+
"SL", # State and Local Tax
|
85
|
+
"SP", # State/Provincial Tax
|
86
|
+
"SR", # State Rental Tax
|
87
|
+
"SS", # State Tax on Specific Labor
|
88
|
+
"ST", # State Sales Tax
|
89
|
+
"SU", # Sales and Use Tax
|
90
|
+
"SX", # Enhanced 911 - State Excise Tax
|
91
|
+
"T1", # Pre-threshold Tax
|
92
|
+
"T2", # Post Threshold Tax
|
93
|
+
"TD", # Telecommunications Device for the Deaf (TDD) Service Excise Tax
|
94
|
+
"TT", # Telecommunications Tax
|
95
|
+
"TX", # All Taxes
|
96
|
+
"UL", # License Tax
|
97
|
+
"UT", # Utility Users' Tax
|
98
|
+
"VA", # Value Added Tax
|
99
|
+
"WS", # Well Service
|
100
|
+
"ZA", # 911-City Tax
|
101
|
+
"ZB", # 911-County Tax
|
102
|
+
"ZC", # 911-Excise Tax
|
103
|
+
"ZD", # 911-State Tax
|
104
|
+
"ZE", # 911-Tax
|
105
|
+
"ZZ", # Mutually Defined
|
106
|
+
]
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
@@ -10,7 +10,7 @@ module Eddy
|
|
10
10
|
#
|
11
11
|
# ### Notes:
|
12
12
|
#
|
13
|
-
# - FIXME: Currently only accepts states in the USA.
|
13
|
+
# - FIXME: Currently only accepts states in the USA and Canada.
|
14
14
|
class E156 < Eddy::Models::Element::ID
|
15
15
|
|
16
16
|
# @param val [String] (nil)
|
@@ -33,6 +33,7 @@ module Eddy
|
|
33
33
|
# @return [Array<String>]
|
34
34
|
def code_list()
|
35
35
|
return [
|
36
|
+
# United States
|
36
37
|
"AL",
|
37
38
|
"AK",
|
38
39
|
"AZ",
|
@@ -84,6 +85,20 @@ module Eddy
|
|
84
85
|
"WV",
|
85
86
|
"WI",
|
86
87
|
"WY",
|
88
|
+
# Canada
|
89
|
+
"AB",
|
90
|
+
"BC",
|
91
|
+
"MB",
|
92
|
+
"NB",
|
93
|
+
"NL",
|
94
|
+
"NS",
|
95
|
+
"NT",
|
96
|
+
"NU",
|
97
|
+
"ON",
|
98
|
+
"PE",
|
99
|
+
"QC",
|
100
|
+
"SK",
|
101
|
+
"YT",
|
87
102
|
]
|
88
103
|
end
|
89
104
|
|
@@ -4,14 +4,14 @@ module Eddy
|
|
4
4
|
#
|
5
5
|
# - Id: I10
|
6
6
|
# - Name: Interchange Control Standards Identifier
|
7
|
-
# - Type: ID
|
7
|
+
# - Type: AN (Should be ID)
|
8
8
|
# - Min/Max: 1/1
|
9
9
|
# - Description: Code to identify the agency responsible for the control standard used by the message that is enclosed by the interchange header and trailer
|
10
10
|
#
|
11
11
|
# ### Notes:
|
12
12
|
#
|
13
13
|
# - (Default value: `"U"`)
|
14
|
-
class I10 < Eddy::Models::Element::
|
14
|
+
class I10 < Eddy::Models::Element::AN
|
15
15
|
|
16
16
|
# @param val [String] ("U")
|
17
17
|
# @param req [String] (nil)
|
@@ -47,6 +47,7 @@ module Eddy
|
|
47
47
|
"00400", # Standard Issued as ANSI X12.5-1997
|
48
48
|
"00401", # Draft Standards for Trial Use Approved for Publication by ASC X12 Procedures Review Board through October 1997
|
49
49
|
"00402", # Draft Standards for Trial Use Approved for Publication by ASC X12 Procedures Review Board through October 1998
|
50
|
+
"00501",
|
50
51
|
]
|
51
52
|
end
|
52
53
|
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module Eddy
|
2
|
+
module Segments
|
3
|
+
# ### Segment Summary:
|
4
|
+
#
|
5
|
+
# - Id: AMT
|
6
|
+
# - Name: Monetary Amount Information
|
7
|
+
# - Purpose: To indicate the total monetary amount.
|
8
|
+
class AMT < Eddy::Models::Segment
|
9
|
+
|
10
|
+
# @param store [Eddy::Data::Store]
|
11
|
+
# @return [void]
|
12
|
+
def initialize(store)
|
13
|
+
@id = "AMT"
|
14
|
+
@name = "Monetary Amount Information"
|
15
|
+
@amt01 = Eddy::Elements::E522.new(ref: "AMT01", req: "M")
|
16
|
+
@amt02 = Eddy::Elements::E782.new(ref: "AMT02", req: "M")
|
17
|
+
super(
|
18
|
+
store,
|
19
|
+
@amt01,
|
20
|
+
@amt02,
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
24
|
+
# ### AMT01
|
25
|
+
#
|
26
|
+
# - Id: 522
|
27
|
+
# - Name: Amount Qualifier Code
|
28
|
+
# - Type: ID
|
29
|
+
# - Min/Max: 1/3
|
30
|
+
# - Description: Code to qualify amount
|
31
|
+
#
|
32
|
+
# @param arg [String]
|
33
|
+
# @return [void]
|
34
|
+
def AMT01=(arg)
|
35
|
+
@amt01.value = arg
|
36
|
+
end
|
37
|
+
alias AmountQualifierCode= AMT01=
|
38
|
+
|
39
|
+
# ### AMT02
|
40
|
+
#
|
41
|
+
# - Id: 782
|
42
|
+
# - Name: Monetary Amount
|
43
|
+
# - Type: R
|
44
|
+
# - Min/Max: 1/18
|
45
|
+
# - Description: Monetary amount
|
46
|
+
#
|
47
|
+
# @param arg [Float]
|
48
|
+
# @return [void]
|
49
|
+
def AMT02=(arg)
|
50
|
+
@amt02.value = arg
|
51
|
+
end
|
52
|
+
alias MonetaryAmount= AMT02=
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
module Eddy
|
2
|
+
module Segments
|
3
|
+
# ### Segment Summary:
|
4
|
+
#
|
5
|
+
# - Id: BIA
|
6
|
+
# - Name: Beginning Segment for Inventory Inquiry/Advice
|
7
|
+
# - Purpose: To indicate the beginning of an Inventory Inquiry/Advice Transaction Set
|
8
|
+
class BIA < Eddy::Models::Segment
|
9
|
+
|
10
|
+
# @param store [Eddy::Data::Store]
|
11
|
+
# @return [void]
|
12
|
+
def initialize(store)
|
13
|
+
@id = "BIA"
|
14
|
+
@name = "Beginning Segment for Inventory Inquiry/Advice"
|
15
|
+
@bia01 = Eddy::Elements::E353.new(ref: "BIA01", req: "M")
|
16
|
+
@bia02 = Eddy::Elements::E755.new(ref: "BIA02", req: "M")
|
17
|
+
@bia03 = Eddy::Elements::E127.new(ref: "BIA03", req: "M")
|
18
|
+
@bia04 = Eddy::Elements::E373.new(ref: "BIA04", req: "M")
|
19
|
+
@bia05 = Eddy::Elements::E337.new(ref: "BIA05", req: "O")
|
20
|
+
super(
|
21
|
+
store,
|
22
|
+
@bia01,
|
23
|
+
@bia02,
|
24
|
+
@bia03,
|
25
|
+
@bia04,
|
26
|
+
@bia05,
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
# ### BIA01
|
31
|
+
#
|
32
|
+
# - Id: 353
|
33
|
+
# - Name: Transaction Set Purpose Code
|
34
|
+
# - Type: ID
|
35
|
+
# - Min/Max: 2/2
|
36
|
+
# - Description: Code identifying purpose of transaction set
|
37
|
+
#
|
38
|
+
# @param arg [String]
|
39
|
+
# @return [void]
|
40
|
+
def BIA01=(arg)
|
41
|
+
@bia01.value = arg
|
42
|
+
end
|
43
|
+
alias TransactionSetPurposeCode= BIA01=
|
44
|
+
|
45
|
+
# ### BIA02
|
46
|
+
#
|
47
|
+
# - Id: 755
|
48
|
+
# - Name: Report Type Code
|
49
|
+
# - Type: ID
|
50
|
+
# - Min/Max: 2/2
|
51
|
+
# - Description: Code indicating the title or contents of a document, report or supporting item
|
52
|
+
#
|
53
|
+
# @param arg [String]
|
54
|
+
# @return [void]
|
55
|
+
def BIA02=(arg)
|
56
|
+
@bia02.value = arg
|
57
|
+
end
|
58
|
+
alias ReportTypeCode= BIA02=
|
59
|
+
|
60
|
+
# ### BIA03
|
61
|
+
#
|
62
|
+
# - Id: 127
|
63
|
+
# - Name: Reference Identification
|
64
|
+
# - Type: AN
|
65
|
+
# - Min/Max: 1/30
|
66
|
+
# - Description: Reference information as defined for a particular Transaction Set or as specified by the Reference Identification Qualifier
|
67
|
+
#
|
68
|
+
# @param arg [String]
|
69
|
+
# @return [void]
|
70
|
+
def BIA03=(arg)
|
71
|
+
@bia03.value = arg
|
72
|
+
end
|
73
|
+
alias ReferenceIdentification= BIA03=
|
74
|
+
|
75
|
+
# ### BIA04
|
76
|
+
#
|
77
|
+
# - Id: 373
|
78
|
+
# - Name: Date
|
79
|
+
# - Type: DT
|
80
|
+
# - Min/Max: 8/8
|
81
|
+
# - Description: Date expressed as CCYYMMDD
|
82
|
+
#
|
83
|
+
# @param arg [Time]
|
84
|
+
# @return [void]
|
85
|
+
def BIA04=(arg)
|
86
|
+
@bia04.value = arg
|
87
|
+
end
|
88
|
+
alias Date= BIA04=
|
89
|
+
|
90
|
+
# ### BIA05
|
91
|
+
#
|
92
|
+
# - Id: 337
|
93
|
+
# - Name: Time
|
94
|
+
# - Type: TM
|
95
|
+
# - Min/Max: 4/8
|
96
|
+
# - Description: Time expressed in 24-hour clock time as follows: HHMM, or HHMMSS, or HHMMSSD, or HHMMSSDD, where H = hours (00-23), M = minutes (00-59), S = integer seconds (00-59) and DD = decimal seconds; decimal seconds are expressed as follows: D = tenths (0-9) and DD = hundredths (00-99)
|
97
|
+
#
|
98
|
+
# @param arg [Time]
|
99
|
+
# @return [void]
|
100
|
+
def BIA05=(arg)
|
101
|
+
@bia05.value = arg
|
102
|
+
end
|
103
|
+
alias Time= BIA05=
|
104
|
+
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
module Eddy
|
2
|
+
module Segments
|
3
|
+
# ### Segment Summary:
|
4
|
+
#
|
5
|
+
# - Id: CUR
|
6
|
+
# - Name: Currency
|
7
|
+
# - Purpose: To specify the currency (dollars, pounds, francs, etc.) used in a transaction
|
8
|
+
class CUR < Eddy::Models::Segment
|
9
|
+
|
10
|
+
# @param store [Eddy::Data::Store]
|
11
|
+
# @return [void]
|
12
|
+
def initialize(store)
|
13
|
+
@id = "CUR"
|
14
|
+
@name = "Currency"
|
15
|
+
@cur01 = Eddy::Elements::E98.new(ref: "CUR01", req: "M")
|
16
|
+
@cur02 = Eddy::Elements::E100.new(ref: "CUR02", req: "M")
|
17
|
+
@cur03 = Eddy::Elements::E280.new(ref: "CUR03", req: "O")
|
18
|
+
super(
|
19
|
+
store,
|
20
|
+
@cur01,
|
21
|
+
@cur02,
|
22
|
+
@cur03,
|
23
|
+
)
|
24
|
+
end
|
25
|
+
|
26
|
+
# ### CUR01
|
27
|
+
#
|
28
|
+
# - Id: 98
|
29
|
+
# - Name: Entity Identifier Code
|
30
|
+
# - Type: ID
|
31
|
+
# - Min/Max: 2/3
|
32
|
+
# - Description: Code identifying an organizational entity, a physical location, property or an individual
|
33
|
+
#
|
34
|
+
# @param arg [String]
|
35
|
+
# @return [void]
|
36
|
+
def CUR01=(arg)
|
37
|
+
@cur01.value = arg
|
38
|
+
end
|
39
|
+
alias EntityIdentifierCode= CUR01=
|
40
|
+
|
41
|
+
# ### CUR02
|
42
|
+
#
|
43
|
+
# - Id: 100
|
44
|
+
# - Name: Currency Code
|
45
|
+
# - Type: ID
|
46
|
+
# - Min/Max: 3/3
|
47
|
+
# - Description: Code (Standard ISO) for country in whose currency the charges are specified
|
48
|
+
#
|
49
|
+
# @param arg [String]
|
50
|
+
# @return [void]
|
51
|
+
def CUR02=(arg)
|
52
|
+
@cur02.value = arg
|
53
|
+
end
|
54
|
+
alias CurrencyCode= CUR02=
|
55
|
+
|
56
|
+
# ### CUR03
|
57
|
+
#
|
58
|
+
# - Id: 280
|
59
|
+
# - Name: Exchange Rate
|
60
|
+
# - Type: R
|
61
|
+
# - Min/Max: 4/10
|
62
|
+
# - Description: Value to be used as a multiplier conversion factor to convert monetary value from one currency to another
|
63
|
+
#
|
64
|
+
# @param arg [Float]
|
65
|
+
# @return [void]
|
66
|
+
def CUR03=(arg)
|
67
|
+
@cur03.value = arg
|
68
|
+
end
|
69
|
+
alias ExchangeRate= CUR03=
|
70
|
+
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -14,10 +14,12 @@ module Eddy
|
|
14
14
|
@name = "Date/Time Reference"
|
15
15
|
@dtm01 = Eddy::Elements::E374.new(ref: "DTM01", req: "M")
|
16
16
|
@dtm02 = Eddy::Elements::E373.new(ref: "DTM02", req: "X")
|
17
|
+
@dtm03 = Eddy::Elements::E337.new(ref: "DTM03", req: "X")
|
17
18
|
super(
|
18
19
|
store,
|
19
20
|
@dtm01,
|
20
21
|
@dtm02,
|
22
|
+
@dtm03,
|
21
23
|
)
|
22
24
|
end
|
23
25
|
|
@@ -51,6 +53,21 @@ module Eddy
|
|
51
53
|
end
|
52
54
|
alias Date= DTM02=
|
53
55
|
|
56
|
+
# ### DTM03
|
57
|
+
#
|
58
|
+
# - Id: 337
|
59
|
+
# - Name: Time
|
60
|
+
# - Type: TM
|
61
|
+
# - Min/Max: 4/8
|
62
|
+
# - Description: Time expressed in 24-hour clock time as follows: HHMM, or HHMMSS, or HHMMSSD, or HHMMSSDD, where H = hours (00-23), M = minutes (00-59), S = integer seconds (00-59) and DD = decimal seconds; decimal seconds are expressed as follows: D = tenths (0-9) and DD = hundredths (00-99)
|
63
|
+
#
|
64
|
+
# @param arg [Time]
|
65
|
+
# @return [void]
|
66
|
+
def DTM03=(arg)
|
67
|
+
@dtm03.value = arg
|
68
|
+
end
|
69
|
+
alias Time= DTM03=
|
70
|
+
|
54
71
|
end
|
55
72
|
end
|
56
73
|
end
|