1#![allow(non_camel_case_types)]
2
3#[cfg_attr(feature = "specta", derive(specta::Type))]
4#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
6pub enum VATCAT {
7 PetroleumTax,
11 ProvisionalCountervailingDutyCash,
15 ProvisionalCountervailingDutyBond,
19 TobaccoTax,
23 EnergyFee,
27 CoffeeTax,
31 HarmonisedSalesTaxCanadian,
35 QuebecSalesTax,
39 CanadianProvincialSalesTax,
43 TaxOnReplacementPart,
47 MineralOilTax,
51 SpecialTax,
55 InsuranceTax,
59 ProvincialCannabisTax,
63 OutstandingDutyInterest,
67 AntiDumpingDuty,
71 StampDutyImpostaDiBollo,
75 AgriculturalLevy,
79 CarTax,
83 PaperConsortiumTaxItaly,
87 CommoditySpecificTax,
91 CustomsDuty,
95 CountervailingDuty,
99 EnvironmentalTax,
103 ExciseDuty,
107 AgriculturalExportRebate,
111 FederalExciseTax,
115 Free,
119 GeneralConstructionTax,
123 GoodsAndServicesTax,
127 IlluminantsTax,
131 ImportTax,
135 IndividualTax,
139 BusinessLicenseFee,
143 LocalConstructionTax,
147 LightDuesPayable,
151 LocalSalesTax,
155 LustTax,
159 MonetaryCompensatoryAmount,
163 MiscellaneousCashDeposit,
167 OtherTaxes,
171 ProvisionalDutyBond,
175 ProvisionalDutyCash,
179 PreferenceDuty,
183 SpecialConstructionTax,
187 ShiftedSocialSecurities,
191 StateProvincialSalesTax,
195 SuspendedDuty,
199 Surtax,
203 ShiftedWageTax,
207 AlcoholMarkTax,
211 Total,
215 TurnoverTax,
219 TonnageTaxes,
223 ValuationDeposit,
227 ValueAddedTax,
231}
232
233impl std::fmt::Display for VATCAT {
234 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
235 write!(f, "{}", <Self as crate::Code>::code(*self))
236 }
237}
238
239impl std::str::FromStr for VATCAT {
240 type Err = crate::ParseError<Self>;
241 fn from_str(s: &str) -> Result<Self, Self::Err> {
242 <Self as crate::FromCode>::from_code(s)
243 .ok_or_else(|| crate::ParseError::<Self>::new(s.to_owned()))
244 }
245}
246
247impl crate::Code for VATCAT {
248 fn code(self) -> &'static str {
249 match self {
250 VATCAT::PetroleumTax => "AAA",
251 VATCAT::ProvisionalCountervailingDutyCash => "AAB",
252 VATCAT::ProvisionalCountervailingDutyBond => "AAC",
253 VATCAT::TobaccoTax => "AAD",
254 VATCAT::EnergyFee => "AAE",
255 VATCAT::CoffeeTax => "AAF",
256 VATCAT::HarmonisedSalesTaxCanadian => "AAG",
257 VATCAT::QuebecSalesTax => "AAH",
258 VATCAT::CanadianProvincialSalesTax => "AAI",
259 VATCAT::TaxOnReplacementPart => "AAJ",
260 VATCAT::MineralOilTax => "AAK",
261 VATCAT::SpecialTax => "AAL",
262 VATCAT::InsuranceTax => "AAM",
263 VATCAT::ProvincialCannabisTax => "AAO",
264 VATCAT::OutstandingDutyInterest => "AAP",
265 VATCAT::AntiDumpingDuty => "ADD",
266 VATCAT::StampDutyImpostaDiBollo => "BOL",
267 VATCAT::AgriculturalLevy => "CAP",
268 VATCAT::CarTax => "CAR",
269 VATCAT::PaperConsortiumTaxItaly => "COC",
270 VATCAT::CommoditySpecificTax => "CST",
271 VATCAT::CustomsDuty => "CUD",
272 VATCAT::CountervailingDuty => "CVD",
273 VATCAT::EnvironmentalTax => "ENV",
274 VATCAT::ExciseDuty => "EXC",
275 VATCAT::AgriculturalExportRebate => "EXP",
276 VATCAT::FederalExciseTax => "FET",
277 VATCAT::Free => "FRE",
278 VATCAT::GeneralConstructionTax => "GCN",
279 VATCAT::GoodsAndServicesTax => "GST",
280 VATCAT::IlluminantsTax => "ILL",
281 VATCAT::ImportTax => "IMP",
282 VATCAT::IndividualTax => "IND",
283 VATCAT::BusinessLicenseFee => "LAC",
284 VATCAT::LocalConstructionTax => "LCN",
285 VATCAT::LightDuesPayable => "LDP",
286 VATCAT::LocalSalesTax => "LOC",
287 VATCAT::LustTax => "LST",
288 VATCAT::MonetaryCompensatoryAmount => "MCA",
289 VATCAT::MiscellaneousCashDeposit => "MCD",
290 VATCAT::OtherTaxes => "OTH",
291 VATCAT::ProvisionalDutyBond => "PDB",
292 VATCAT::ProvisionalDutyCash => "PDC",
293 VATCAT::PreferenceDuty => "PRF",
294 VATCAT::SpecialConstructionTax => "SCN",
295 VATCAT::ShiftedSocialSecurities => "SSS",
296 VATCAT::StateProvincialSalesTax => "STT",
297 VATCAT::SuspendedDuty => "SUP",
298 VATCAT::Surtax => "SUR",
299 VATCAT::ShiftedWageTax => "SWT",
300 VATCAT::AlcoholMarkTax => "TAC",
301 VATCAT::Total => "TOT",
302 VATCAT::TurnoverTax => "TOX",
303 VATCAT::TonnageTaxes => "TTA",
304 VATCAT::ValuationDeposit => "VAD",
305 VATCAT::ValueAddedTax => "VAT",
306 }
307 }
308}
309
310impl crate::Description for VATCAT {
311 fn description(self) -> &'static str {
312 match self {
313 VATCAT::PetroleumTax => "Petroleum tax",
314 VATCAT::ProvisionalCountervailingDutyCash => "Provisional countervailing duty cash",
315 VATCAT::ProvisionalCountervailingDutyBond => "Provisional countervailing duty bond",
316 VATCAT::TobaccoTax => "Tobacco tax",
317 VATCAT::EnergyFee => "Energy fee",
318 VATCAT::CoffeeTax => "Coffee tax",
319 VATCAT::HarmonisedSalesTaxCanadian => "Harmonised sales tax, Canadian",
320 VATCAT::QuebecSalesTax => "Quebec sales tax",
321 VATCAT::CanadianProvincialSalesTax => "Canadian provincial sales tax",
322 VATCAT::TaxOnReplacementPart => "Tax on replacement part",
323 VATCAT::MineralOilTax => "Mineral oil tax",
324 VATCAT::SpecialTax => "Special tax",
325 VATCAT::InsuranceTax => "Insurance tax",
326 VATCAT::ProvincialCannabisTax => "Provincial Cannabis Tax",
327 VATCAT::OutstandingDutyInterest => "Outstanding duty interest",
328 VATCAT::AntiDumpingDuty => "Anti-dumping duty",
329 VATCAT::StampDutyImpostaDiBollo => "Stamp duty (Imposta di Bollo)",
330 VATCAT::AgriculturalLevy => "Agricultural levy",
331 VATCAT::CarTax => "Car tax",
332 VATCAT::PaperConsortiumTaxItaly => "Paper consortium tax (Italy)",
333 VATCAT::CommoditySpecificTax => "Commodity specific tax",
334 VATCAT::CustomsDuty => "Customs duty",
335 VATCAT::CountervailingDuty => "Countervailing duty",
336 VATCAT::EnvironmentalTax => "Environmental tax",
337 VATCAT::ExciseDuty => "Excise duty",
338 VATCAT::AgriculturalExportRebate => "Agricultural export rebate",
339 VATCAT::FederalExciseTax => "Federal excise tax",
340 VATCAT::Free => "Free",
341 VATCAT::GeneralConstructionTax => "General construction tax",
342 VATCAT::GoodsAndServicesTax => "Goods and services tax",
343 VATCAT::IlluminantsTax => "Illuminants tax",
344 VATCAT::ImportTax => "Import tax",
345 VATCAT::IndividualTax => "Individual tax",
346 VATCAT::BusinessLicenseFee => "Business license fee",
347 VATCAT::LocalConstructionTax => "Local construction tax",
348 VATCAT::LightDuesPayable => "Light dues payable",
349 VATCAT::LocalSalesTax => "Local sales tax",
350 VATCAT::LustTax => "Lust tax",
351 VATCAT::MonetaryCompensatoryAmount => "Monetary compensatory amount",
352 VATCAT::MiscellaneousCashDeposit => "Miscellaneous cash deposit",
353 VATCAT::OtherTaxes => "Other taxes",
354 VATCAT::ProvisionalDutyBond => "Provisional duty bond",
355 VATCAT::ProvisionalDutyCash => "Provisional duty cash",
356 VATCAT::PreferenceDuty => "Preference duty",
357 VATCAT::SpecialConstructionTax => "Special construction tax",
358 VATCAT::ShiftedSocialSecurities => "Shifted social securities",
359 VATCAT::StateProvincialSalesTax => "State/provincial sales tax",
360 VATCAT::SuspendedDuty => "Suspended duty",
361 VATCAT::Surtax => "Surtax",
362 VATCAT::ShiftedWageTax => "Shifted wage tax",
363 VATCAT::AlcoholMarkTax => "Alcohol mark tax",
364 VATCAT::Total => "Total",
365 VATCAT::TurnoverTax => "Turnover tax",
366 VATCAT::TonnageTaxes => "Tonnage taxes",
367 VATCAT::ValuationDeposit => "Valuation deposit",
368 VATCAT::ValueAddedTax => "Value added tax",
369 }
370 }
371}
372
373impl crate::FromCode for VATCAT {
374 fn from_code(code: &str) -> Option<Self>
375 where
376 Self: Sized,
377 {
378 match code {
379 "AAA" => Some(VATCAT::PetroleumTax),
380 "AAB" => Some(VATCAT::ProvisionalCountervailingDutyCash),
381 "AAC" => Some(VATCAT::ProvisionalCountervailingDutyBond),
382 "AAD" => Some(VATCAT::TobaccoTax),
383 "AAE" => Some(VATCAT::EnergyFee),
384 "AAF" => Some(VATCAT::CoffeeTax),
385 "AAG" => Some(VATCAT::HarmonisedSalesTaxCanadian),
386 "AAH" => Some(VATCAT::QuebecSalesTax),
387 "AAI" => Some(VATCAT::CanadianProvincialSalesTax),
388 "AAJ" => Some(VATCAT::TaxOnReplacementPart),
389 "AAK" => Some(VATCAT::MineralOilTax),
390 "AAL" => Some(VATCAT::SpecialTax),
391 "AAM" => Some(VATCAT::InsuranceTax),
392 "AAO" => Some(VATCAT::ProvincialCannabisTax),
393 "AAP" => Some(VATCAT::OutstandingDutyInterest),
394 "ADD" => Some(VATCAT::AntiDumpingDuty),
395 "BOL" => Some(VATCAT::StampDutyImpostaDiBollo),
396 "CAP" => Some(VATCAT::AgriculturalLevy),
397 "CAR" => Some(VATCAT::CarTax),
398 "COC" => Some(VATCAT::PaperConsortiumTaxItaly),
399 "CST" => Some(VATCAT::CommoditySpecificTax),
400 "CUD" => Some(VATCAT::CustomsDuty),
401 "CVD" => Some(VATCAT::CountervailingDuty),
402 "ENV" => Some(VATCAT::EnvironmentalTax),
403 "EXC" => Some(VATCAT::ExciseDuty),
404 "EXP" => Some(VATCAT::AgriculturalExportRebate),
405 "FET" => Some(VATCAT::FederalExciseTax),
406 "FRE" => Some(VATCAT::Free),
407 "GCN" => Some(VATCAT::GeneralConstructionTax),
408 "GST" => Some(VATCAT::GoodsAndServicesTax),
409 "ILL" => Some(VATCAT::IlluminantsTax),
410 "IMP" => Some(VATCAT::ImportTax),
411 "IND" => Some(VATCAT::IndividualTax),
412 "LAC" => Some(VATCAT::BusinessLicenseFee),
413 "LCN" => Some(VATCAT::LocalConstructionTax),
414 "LDP" => Some(VATCAT::LightDuesPayable),
415 "LOC" => Some(VATCAT::LocalSalesTax),
416 "LST" => Some(VATCAT::LustTax),
417 "MCA" => Some(VATCAT::MonetaryCompensatoryAmount),
418 "MCD" => Some(VATCAT::MiscellaneousCashDeposit),
419 "OTH" => Some(VATCAT::OtherTaxes),
420 "PDB" => Some(VATCAT::ProvisionalDutyBond),
421 "PDC" => Some(VATCAT::ProvisionalDutyCash),
422 "PRF" => Some(VATCAT::PreferenceDuty),
423 "SCN" => Some(VATCAT::SpecialConstructionTax),
424 "SSS" => Some(VATCAT::ShiftedSocialSecurities),
425 "STT" => Some(VATCAT::StateProvincialSalesTax),
426 "SUP" => Some(VATCAT::SuspendedDuty),
427 "SUR" => Some(VATCAT::Surtax),
428 "SWT" => Some(VATCAT::ShiftedWageTax),
429 "TAC" => Some(VATCAT::AlcoholMarkTax),
430 "TOT" => Some(VATCAT::Total),
431 "TOX" => Some(VATCAT::TurnoverTax),
432 "TTA" => Some(VATCAT::TonnageTaxes),
433 "VAD" => Some(VATCAT::ValuationDeposit),
434 "VAT" => Some(VATCAT::ValueAddedTax),
435 _ => None,
436 }
437 }
438}