zugferd-code-lists 0.1.19

ZUGFeRD code lists, e.g. languages enum, currencies enum, countries enum, etc.
Documentation
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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
#![allow(non_camel_case_types)]

#[cfg_attr(feature = "specta", derive(specta::Type))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
pub enum Enum1001 {
    /// Request for payment
    ///
    /// Invoice
    RequestForPayment,
    /// Debit note related to goods or services
    ///
    /// Invoice
    DebitNoteRelatedToGoodsOrServices,
    /// Credit note related to goods or services
    ///
    /// Credit Note
    CreditNoteRelatedToGoodsOrServices,
    /// Metered services invoice
    ///
    /// Invoice
    MeteredServicesInvoice,
    /// Credit note related to financial adjustments
    ///
    /// Credit Note
    CreditNoteRelatedToFinancialAdjustments,
    /// Debit note related to financial adjustments
    ///
    /// Invoice
    DebitNoteRelatedToFinancialAdjustments,
    /// Tax notification
    ///
    /// Invoice
    TaxNotification,
    /// Invoicing data sheet
    ///
    /// Invoice
    InvoicingDataSheet,
    /// Direct payment valuation
    ///
    /// Invoice
    DirectPaymentValuation,
    /// Provisional payment valuation
    ///
    /// Invoice
    ProvisionalPaymentValuation,
    /// Payment valuation
    ///
    /// Invoice
    PaymentValuation,
    /// Interim application for payment
    ///
    /// Invoice
    InterimApplicationForPayment,
    /// Final payment request based on completion of work
    ///
    /// Invoice
    FinalPaymentRequestBasedOnCompletionWork,
    /// Payment request for completed units
    ///
    /// Invoice
    PaymentRequestForCompletedUnits,
    /// Self billed credit note
    ///
    /// Credit Note
    SelfBilledCreditNote,
    /// Consolidated credit note - goods and services
    ///
    /// Credit Note
    ConsolidatedCreditNoteGoodsAndServices,
    /// Price variation invoice
    ///
    /// Invoice
    PriceVariationInvoice,
    /// Credit note for price variation
    ///
    /// Credit Note
    CreditNoteForPriceVariation,
    /// Delcredere credit note
    ///
    /// Credit Note
    DelcredereCreditNote,
    /// Proforma invoice
    ///
    /// Invoice
    ProformaInvoice,
    /// Partial invoice
    ///
    /// Invoice
    PartialInvoice,
    /// Commercial invoice which includes a packing list
    ///
    /// Invoice
    CommercialInvoiceWhichIncludesAPackingList,
    /// Commercial invoice
    ///
    /// Invoice
    CommercialInvoice,
    /// Credit note
    ///
    /// Credit Note
    CreditNote,
    /// Commission note
    ///
    /// Invoice
    CommissionNote,
    /// Debit note
    ///
    /// Invoice
    DebitNote,
    /// Corrected invoice
    ///
    /// Invoice
    CorrectedInvoice,
    /// Consolidated invoice
    ///
    /// Invoice
    ConsolidatedInvoice,
    /// Prepayment invoice
    ///
    /// Invoice
    PrepaymentInvoice,
    /// Hire invoice
    ///
    /// Invoice
    HireInvoice,
    /// Tax invoice
    ///
    /// Invoice
    TaxInvoice,
    /// Self-billed invoice
    ///
    /// Invoice
    SelfBilledInvoice,
    /// Delcredere invoice
    ///
    /// Invoice
    DelcredereInvoice,
    /// Factored invoice
    ///
    /// Invoice
    FactoredInvoice,
    /// Lease invoice
    ///
    /// Invoice
    LeaseInvoice,
    /// Consignment invoice
    ///
    /// Invoice
    ConsignmentInvoice,
    /// Factored credit note
    ///
    /// Credit Note
    FactoredCreditNote,
    /// Optical Character Reading (OCR) payment credit note
    ///
    /// Credit Note
    OpticalCharacterReadingOcrPaymentCreditNote,
    /// Debit advice
    ///
    /// Invoice
    DebitAdvice,
    /// Reversal of debit
    ///
    /// Invoice
    ReversalDebit,
    /// Reversal of credit
    ///
    /// Credit Note
    ReversalCredit,
    /// Self billed debit note
    ///
    /// Invoice
    SelfBilledDebitNote,
    /// Forwarder's credit note
    ///
    /// Credit Note
    ForwardersCreditNote,
    /// Forwarder's invoice discrepancy report
    ///
    /// Invoice
    ForwardersInvoiceDiscrepancyReport,
    /// Insurer's invoice
    ///
    /// Invoice
    InsurersInvoice,
    /// Forwarder's invoice
    ///
    /// Invoice
    ForwardersInvoice,
    /// Port charges documents
    ///
    /// Invoice
    PortChargesDocuments,
    /// Invoice information for accounting purposes
    ///
    /// Invoice
    InvoiceInformationForAccountingPurposes,
    /// Freight invoice
    ///
    /// Invoice
    FreightInvoice,
    /// Claim notification
    ///
    /// Invoice
    ClaimNotification,
    /// Consular invoice
    ///
    /// Invoice
    ConsularInvoice,
    /// Partial construction invoice
    ///
    /// Invoice
    PartialConstructionInvoice,
    /// Partial final construction invoice
    ///
    /// Invoice
    PartialFinalConstructionInvoice,
    /// Final construction invoice
    ///
    /// Invoice
    FinalConstructionInvoice,
    /// Customs invoice
    ///
    /// Invoice
    CustomsInvoice,
}

impl std::fmt::Display for Enum1001 {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", <Self as crate::Code>::code(*self))
    }
}

impl std::str::FromStr for Enum1001 {
    type Err = crate::ParseError<Self>;
    fn from_str(s: &str) -> Result<Self, Self::Err> {
        <Self as crate::FromCode>::from_code(s)
            .ok_or_else(|| crate::ParseError::<Self>::new(s.to_owned()))
    }
}

impl crate::Code for Enum1001 {
    fn code(self) -> &'static str {
        match self {
            Enum1001::RequestForPayment => "71",
            Enum1001::DebitNoteRelatedToGoodsOrServices => "80",
            Enum1001::CreditNoteRelatedToGoodsOrServices => "81",
            Enum1001::MeteredServicesInvoice => "82",
            Enum1001::CreditNoteRelatedToFinancialAdjustments => "83",
            Enum1001::DebitNoteRelatedToFinancialAdjustments => "84",
            Enum1001::TaxNotification => "102",
            Enum1001::InvoicingDataSheet => "130",
            Enum1001::DirectPaymentValuation => "202",
            Enum1001::ProvisionalPaymentValuation => "203",
            Enum1001::PaymentValuation => "204",
            Enum1001::InterimApplicationForPayment => "211",
            Enum1001::FinalPaymentRequestBasedOnCompletionWork => "218",
            Enum1001::PaymentRequestForCompletedUnits => "219",
            Enum1001::SelfBilledCreditNote => "261",
            Enum1001::ConsolidatedCreditNoteGoodsAndServices => "262",
            Enum1001::PriceVariationInvoice => "295",
            Enum1001::CreditNoteForPriceVariation => "296",
            Enum1001::DelcredereCreditNote => "308",
            Enum1001::ProformaInvoice => "325",
            Enum1001::PartialInvoice => "326",
            Enum1001::CommercialInvoiceWhichIncludesAPackingList => "331",
            Enum1001::CommercialInvoice => "380",
            Enum1001::CreditNote => "381",
            Enum1001::CommissionNote => "382",
            Enum1001::DebitNote => "383",
            Enum1001::CorrectedInvoice => "384",
            Enum1001::ConsolidatedInvoice => "385",
            Enum1001::PrepaymentInvoice => "386",
            Enum1001::HireInvoice => "387",
            Enum1001::TaxInvoice => "388",
            Enum1001::SelfBilledInvoice => "389",
            Enum1001::DelcredereInvoice => "390",
            Enum1001::FactoredInvoice => "393",
            Enum1001::LeaseInvoice => "394",
            Enum1001::ConsignmentInvoice => "395",
            Enum1001::FactoredCreditNote => "396",
            Enum1001::OpticalCharacterReadingOcrPaymentCreditNote => "420",
            Enum1001::DebitAdvice => "456",
            Enum1001::ReversalDebit => "457",
            Enum1001::ReversalCredit => "458",
            Enum1001::SelfBilledDebitNote => "527",
            Enum1001::ForwardersCreditNote => "532",
            Enum1001::ForwardersInvoiceDiscrepancyReport => "553",
            Enum1001::InsurersInvoice => "575",
            Enum1001::ForwardersInvoice => "623",
            Enum1001::PortChargesDocuments => "633",
            Enum1001::InvoiceInformationForAccountingPurposes => "751",
            Enum1001::FreightInvoice => "780",
            Enum1001::ClaimNotification => "817",
            Enum1001::ConsularInvoice => "870",
            Enum1001::PartialConstructionInvoice => "875",
            Enum1001::PartialFinalConstructionInvoice => "876",
            Enum1001::FinalConstructionInvoice => "877",
            Enum1001::CustomsInvoice => "935",
        }
    }
}

impl crate::Description for Enum1001 {
    fn description(self) -> &'static str {
        match self {
            Enum1001::RequestForPayment => "Request for payment",
            Enum1001::DebitNoteRelatedToGoodsOrServices => {
                "Debit note related to goods or services"
            }
            Enum1001::CreditNoteRelatedToGoodsOrServices => {
                "Credit note related to goods or services"
            }
            Enum1001::MeteredServicesInvoice => "Metered services invoice",
            Enum1001::CreditNoteRelatedToFinancialAdjustments => {
                "Credit note related to financial adjustments"
            }
            Enum1001::DebitNoteRelatedToFinancialAdjustments => {
                "Debit note related to financial adjustments"
            }
            Enum1001::TaxNotification => "Tax notification",
            Enum1001::InvoicingDataSheet => "Invoicing data sheet",
            Enum1001::DirectPaymentValuation => "Direct payment valuation",
            Enum1001::ProvisionalPaymentValuation => "Provisional payment valuation",
            Enum1001::PaymentValuation => "Payment valuation",
            Enum1001::InterimApplicationForPayment => "Interim application for payment",
            Enum1001::FinalPaymentRequestBasedOnCompletionWork => {
                "Final payment request based on completion of work"
            }
            Enum1001::PaymentRequestForCompletedUnits => "Payment request for completed units",
            Enum1001::SelfBilledCreditNote => "Self billed credit note",
            Enum1001::ConsolidatedCreditNoteGoodsAndServices => {
                "Consolidated credit note - goods and services"
            }
            Enum1001::PriceVariationInvoice => "Price variation invoice",
            Enum1001::CreditNoteForPriceVariation => "Credit note for price variation",
            Enum1001::DelcredereCreditNote => "Delcredere credit note",
            Enum1001::ProformaInvoice => "Proforma invoice",
            Enum1001::PartialInvoice => "Partial invoice",
            Enum1001::CommercialInvoiceWhichIncludesAPackingList => {
                "Commercial invoice which includes a packing list"
            }
            Enum1001::CommercialInvoice => "Commercial invoice",
            Enum1001::CreditNote => "Credit note",
            Enum1001::CommissionNote => "Commission note",
            Enum1001::DebitNote => "Debit note",
            Enum1001::CorrectedInvoice => "Corrected invoice",
            Enum1001::ConsolidatedInvoice => "Consolidated invoice",
            Enum1001::PrepaymentInvoice => "Prepayment invoice",
            Enum1001::HireInvoice => "Hire invoice",
            Enum1001::TaxInvoice => "Tax invoice",
            Enum1001::SelfBilledInvoice => "Self-billed invoice",
            Enum1001::DelcredereInvoice => "Delcredere invoice",
            Enum1001::FactoredInvoice => "Factored invoice",
            Enum1001::LeaseInvoice => "Lease invoice",
            Enum1001::ConsignmentInvoice => "Consignment invoice",
            Enum1001::FactoredCreditNote => "Factored credit note",
            Enum1001::OpticalCharacterReadingOcrPaymentCreditNote => {
                "Optical Character Reading (OCR) payment credit note"
            }
            Enum1001::DebitAdvice => "Debit advice",
            Enum1001::ReversalDebit => "Reversal of debit",
            Enum1001::ReversalCredit => "Reversal of credit",
            Enum1001::SelfBilledDebitNote => "Self billed debit note",
            Enum1001::ForwardersCreditNote => "Forwarder's credit note",
            Enum1001::ForwardersInvoiceDiscrepancyReport => {
                "Forwarder's invoice discrepancy report"
            }
            Enum1001::InsurersInvoice => "Insurer's invoice",
            Enum1001::ForwardersInvoice => "Forwarder's invoice",
            Enum1001::PortChargesDocuments => "Port charges documents",
            Enum1001::InvoiceInformationForAccountingPurposes => {
                "Invoice information for accounting purposes"
            }
            Enum1001::FreightInvoice => "Freight invoice",
            Enum1001::ClaimNotification => "Claim notification",
            Enum1001::ConsularInvoice => "Consular invoice",
            Enum1001::PartialConstructionInvoice => "Partial construction invoice",
            Enum1001::PartialFinalConstructionInvoice => "Partial final construction invoice",
            Enum1001::FinalConstructionInvoice => "Final construction invoice",
            Enum1001::CustomsInvoice => "Customs invoice",
        }
    }
}

impl crate::FromCode for Enum1001 {
    fn from_code(code: &str) -> Option<Self>
    where
        Self: Sized,
    {
        match code {
            "71" => Some(Enum1001::RequestForPayment),
            "80" => Some(Enum1001::DebitNoteRelatedToGoodsOrServices),
            "81" => Some(Enum1001::CreditNoteRelatedToGoodsOrServices),
            "82" => Some(Enum1001::MeteredServicesInvoice),
            "83" => Some(Enum1001::CreditNoteRelatedToFinancialAdjustments),
            "84" => Some(Enum1001::DebitNoteRelatedToFinancialAdjustments),
            "102" => Some(Enum1001::TaxNotification),
            "130" => Some(Enum1001::InvoicingDataSheet),
            "202" => Some(Enum1001::DirectPaymentValuation),
            "203" => Some(Enum1001::ProvisionalPaymentValuation),
            "204" => Some(Enum1001::PaymentValuation),
            "211" => Some(Enum1001::InterimApplicationForPayment),
            "218" => Some(Enum1001::FinalPaymentRequestBasedOnCompletionWork),
            "219" => Some(Enum1001::PaymentRequestForCompletedUnits),
            "261" => Some(Enum1001::SelfBilledCreditNote),
            "262" => Some(Enum1001::ConsolidatedCreditNoteGoodsAndServices),
            "295" => Some(Enum1001::PriceVariationInvoice),
            "296" => Some(Enum1001::CreditNoteForPriceVariation),
            "308" => Some(Enum1001::DelcredereCreditNote),
            "325" => Some(Enum1001::ProformaInvoice),
            "326" => Some(Enum1001::PartialInvoice),
            "331" => Some(Enum1001::CommercialInvoiceWhichIncludesAPackingList),
            "380" => Some(Enum1001::CommercialInvoice),
            "381" => Some(Enum1001::CreditNote),
            "382" => Some(Enum1001::CommissionNote),
            "383" => Some(Enum1001::DebitNote),
            "384" => Some(Enum1001::CorrectedInvoice),
            "385" => Some(Enum1001::ConsolidatedInvoice),
            "386" => Some(Enum1001::PrepaymentInvoice),
            "387" => Some(Enum1001::HireInvoice),
            "388" => Some(Enum1001::TaxInvoice),
            "389" => Some(Enum1001::SelfBilledInvoice),
            "390" => Some(Enum1001::DelcredereInvoice),
            "393" => Some(Enum1001::FactoredInvoice),
            "394" => Some(Enum1001::LeaseInvoice),
            "395" => Some(Enum1001::ConsignmentInvoice),
            "396" => Some(Enum1001::FactoredCreditNote),
            "420" => Some(Enum1001::OpticalCharacterReadingOcrPaymentCreditNote),
            "456" => Some(Enum1001::DebitAdvice),
            "457" => Some(Enum1001::ReversalDebit),
            "458" => Some(Enum1001::ReversalCredit),
            "527" => Some(Enum1001::SelfBilledDebitNote),
            "532" => Some(Enum1001::ForwardersCreditNote),
            "553" => Some(Enum1001::ForwardersInvoiceDiscrepancyReport),
            "575" => Some(Enum1001::InsurersInvoice),
            "623" => Some(Enum1001::ForwardersInvoice),
            "633" => Some(Enum1001::PortChargesDocuments),
            "751" => Some(Enum1001::InvoiceInformationForAccountingPurposes),
            "780" => Some(Enum1001::FreightInvoice),
            "817" => Some(Enum1001::ClaimNotification),
            "870" => Some(Enum1001::ConsularInvoice),
            "875" => Some(Enum1001::PartialConstructionInvoice),
            "876" => Some(Enum1001::PartialFinalConstructionInvoice),
            "877" => Some(Enum1001::FinalConstructionInvoice),
            "935" => Some(Enum1001::CustomsInvoice),
            _ => None,
        }
    }
}