1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
//! X12 data elements 0000-0099.
crate::code_enum!(
/// **56** Type of Service Code
///
/// - Data element: 56
/// - Type: Identifier (ID)
/// - Length: min 2, max 2
///
/// Code specifying the extent of transportation service requested.
E56 {
/// Airport-to-Airport
"AA" => Aa,
/// Transport Mode Change
"AI" => Ai,
/// Breakbulk
"BB" => Bb,
/// Container Station
"CS" => Cs,
/// Container Yard
"CY" => Cy,
/// Door-to-Airport of Debarkation
"DA" => Da,
/// Door to Door
"DD" => Dd,
/// Door to Ramp
"DR" => Dr,
/// Haulage (contractual carrier arrangement)
"HA" => Ha,
/// House-to-house
"HH" => Hh,
/// House-to-pier
"HP" => Hp,
/// Less than Trailer/Container Load
"LT" => Lt,
}
);
crate::code_enum!(
/// **88** Marks and Numbers Qualifier
///
/// - Data element: 88
/// - Type: Identifier (ID)
/// - Length: min 1, max 2
///
/// Code specifying the application or source of Marks and Numbers (87).
E88 {
/// EAN.UCC Serial Shipping Container Code (SSCC)
"AA" => Aa,
/// UCC/EAN-128 Application Identifier (AI) and Data
"AI" => Ai,
/// Shipper-Assigned Case Number
"CA" => Ca,
/// Carrier-Assigned Package ID Number
"CP" => Cp,
/// EAN.UCC SSCC and Application Identifier
"GM" => Gm,
/// Line Item Only
"L" => L,
/// Master Carton Number
"MC" => Mc,
/// Premarked by Buyer
"PB" => Pb,
/// Originator Assigned
"R" => R,
/// Entire Shipment
"S" => S,
/// Shipper Assigned
"SM" => Sm,
/// U.P.C. Shipping Container Code
"UC" => Uc,
/// U.P.C. Consumer Package Code (1-5-5-1)
"UP" => Up,
/// Pallet Number
"W" => W,
/// Mutually Defined
"ZZ" => Zz,
}
);
crate::code_enum!(
/// **23** Commodity Code Qualifier
///
/// - Data element: 23
/// - Type: Identifier (ID)
/// - Length: min 1, max 1
///
/// Code identifying the commodity coding system used in Commodity Code (22).
E23 {
/// National Drug Code
"5" => N5,
/// Harmonized Tariff Schedule of the United States Annotated
"A" => A,
/// U.S. Foreign Trade Schedule B
"B" => B,
/// Canadian Freight Classification
"C" => C,
/// Federal Supply Classification
"K" => K,
/// National Motor Freight Classification (NMFC)
"N" => N,
/// North American Industrial Classification System (NAICS) Code
"R" => R,
/// Standard Transportation Commodity Code (STCC)
"T" => T,
/// Uniform Freight Classification (UFC)
"U" => U,
/// Standard Industrial Classification (SIC) Code
"V" => V,
/// Mutually Defined
"Z" => Z,
}
);
crate::code_enum!(
/// **40** Equipment Description Code
///
/// - Data element: 40
/// - Type: Identifier (ID)
/// - Length: min 2, max 2
///
/// Code identifying type of equipment used for shipment. Common codes named
/// below; any other round-trips as `Unknown`.
E40 {
/// 40 ft. IL Container (Open Top)
"40" => N40,
/// Air Ride Van
"AA" => Aa,
/// Boxcar
"BX" => Bx,
/// Closed Van
"CV" => Cv,
/// Refrigerated Container
"CZ" => Cz,
/// Flat Bed Trailer
"FT" => Ft,
/// High Cube Van
"HV" => Hv,
/// Refrigerated (Reefer) Car
"RC" => Rc,
/// Flat Car
"RF" => Rf,
/// Gondola Car (Open)
"RO" => Ro,
/// Trailer, Dry Freight
"TF" => Tf,
/// Trailer (not otherwise specified)
"TL" => Tl,
/// Tank Car
"TN" => Tn,
/// Tractor
"TR" => Tr,
/// Truck, Van
"TV" => Tv,
}
);
crate::code_enum!(
/// **91** Transportation Method/Type Code
///
/// - Data element: 91
/// - Type: Identifier (ID)
/// - Length: min 1, max 2
///
/// Code specifying the method or type of transportation for the shipment.
E91 {
/// Air
"A" => A,
/// Air Express
"AE" => Ae,
/// Barge
"B" => B,
/// Consolidation
"C" => C,
/// Parcel Post
"D" => D,
/// Expedited Truck
"E" => E,
/// Customer Pickup
"H" => H,
/// Contract Carrier
"L" => L,
/// Motor (Common Carrier)
"M" => M,
/// Containerized Ocean
"O" => O,
/// Private Carrier
"P" => P,
/// Rail
"R" => R,
/// Ocean
"S" => S,
/// Best Way (Shipper's Option)
"T" => T,
/// Private Parcel Service
"U" => U,
}
);
crate::code_enum!(
/// **26** Country Code
///
/// - Data element: 26
/// - Type: Identifier (ID)
/// - Length: min 2, max 3
///
/// Code identifying the country (ISO 3166 alpha-2). Common codes named below;
/// any other round-trips as `Unknown`.
E26 {
/// United States
"US" => Us,
/// Canada
"CA" => Ca,
/// Mexico
"MX" => Mx,
/// United Kingdom
"GB" => Gb,
/// Germany
"DE" => De,
/// France
"FR" => Fr,
/// Italy
"IT" => It,
/// Spain
"ES" => Es,
/// Netherlands
"NL" => Nl,
/// China
"CN" => Cn,
/// Japan
"JP" => Jp,
/// Australia
"AU" => Au,
/// Brazil
"BR" => Br,
/// India
"IN" => In,
}
);
crate::code_enum!(
/// **66** Identification Code Qualifier
///
/// - Data element: 66
/// - Type: Identifier (ID)
/// - Length: min 1, max 2
///
/// Code designating the system/method of code structure used for the
/// Identification Code (67). Common codes named below.
E66 {
/// D-U-N-S Number, Dun & Bradstreet
"1" => N1,
/// D-U-N-S+4, D-U-N-S Number with Four Character Suffix
"9" => N9,
/// Assigned by Seller or Seller's Agent
"91" => N91,
/// Assigned by Buyer or Buyer's Agent
"92" => N92,
/// Standard Carrier Alpha Code (SCAC)
"2" => N2,
/// Health Industry Number (HIN)
"20" => N20,
/// Global Location Number (GLN)
"UL" => Ul,
/// Mutually Defined
"ZZ" => Zz,
}
);
crate::code_enum!(
/// **98** Entity Identifier Code
///
/// - Data element: 98
/// - Type: Identifier (ID)
/// - Length: min 2, max 3
///
/// Code identifying an organizational entity, a physical location, property or
/// an individual. Common codes named below; any other round-trips as `Unknown`.
E98 {
/// Provider
"1P" => N1p,
/// Receiver
"40" => N40,
/// Submitter
"41" => N41,
/// Bill-to-Party
"BT" => Bt,
/// Buying Party (Purchaser)
"BY" => By,
/// Carrier
"CA" => Ca,
/// Consignee
"CN" => Cn,
/// Party to Receive Drop Ship
"DD" => Dd,
/// Message From
"FR" => Fr,
/// Insured or Subscriber
"IL" => Il,
/// Location of Goods
"LH" => Lh,
/// Manufacturer of Goods
"MF" => Mf,
/// Payee
"PE" => Pe,
/// Payer
"PR" => Pr,
/// Patient
"QC" => Qc,
/// Ship From
"SF" => Sf,
/// Shipper
"SH" => Sh,
/// Ship To
"ST" => St,
/// Supplier/Manufacturer
"SU" => Su,
/// Message To
"TO" => To,
/// Selling Party
"SE" => Se,
/// Vendor
"VN" => Vn,
/// Remit To
"RI" => Ri,
/// Party to Receive Commercial Invoice Remittance
"RE" => Re,
}
);