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 = ();
241 fn from_str(s: &str) -> Result<Self, Self::Err> {
242 <Self as crate::FromCode>::from_code(s).ok_or(())
243 }
244}
245
246impl crate::Code for VATCAT {
247 fn code(self) -> &'static str {
248 match self {
249 VATCAT::PetroleumTax => "AAA",
250 VATCAT::ProvisionalCountervailingDutyCash => "AAB",
251 VATCAT::ProvisionalCountervailingDutyBond => "AAC",
252 VATCAT::TobaccoTax => "AAD",
253 VATCAT::EnergyFee => "AAE",
254 VATCAT::CoffeeTax => "AAF",
255 VATCAT::HarmonisedSalesTaxCanadian => "AAG",
256 VATCAT::QuebecSalesTax => "AAH",
257 VATCAT::CanadianProvincialSalesTax => "AAI",
258 VATCAT::TaxOnReplacementPart => "AAJ",
259 VATCAT::MineralOilTax => "AAK",
260 VATCAT::SpecialTax => "AAL",
261 VATCAT::InsuranceTax => "AAM",
262 VATCAT::ProvincialCannabisTax => "AAO",
263 VATCAT::OutstandingDutyInterest => "AAP",
264 VATCAT::AntiDumpingDuty => "ADD",
265 VATCAT::StampDutyImpostaDiBollo => "BOL",
266 VATCAT::AgriculturalLevy => "CAP",
267 VATCAT::CarTax => "CAR",
268 VATCAT::PaperConsortiumTaxItaly => "COC",
269 VATCAT::CommoditySpecificTax => "CST",
270 VATCAT::CustomsDuty => "CUD",
271 VATCAT::CountervailingDuty => "CVD",
272 VATCAT::EnvironmentalTax => "ENV",
273 VATCAT::ExciseDuty => "EXC",
274 VATCAT::AgriculturalExportRebate => "EXP",
275 VATCAT::FederalExciseTax => "FET",
276 VATCAT::Free => "FRE",
277 VATCAT::GeneralConstructionTax => "GCN",
278 VATCAT::GoodsAndServicesTax => "GST",
279 VATCAT::IlluminantsTax => "ILL",
280 VATCAT::ImportTax => "IMP",
281 VATCAT::IndividualTax => "IND",
282 VATCAT::BusinessLicenseFee => "LAC",
283 VATCAT::LocalConstructionTax => "LCN",
284 VATCAT::LightDuesPayable => "LDP",
285 VATCAT::LocalSalesTax => "LOC",
286 VATCAT::LustTax => "LST",
287 VATCAT::MonetaryCompensatoryAmount => "MCA",
288 VATCAT::MiscellaneousCashDeposit => "MCD",
289 VATCAT::OtherTaxes => "OTH",
290 VATCAT::ProvisionalDutyBond => "PDB",
291 VATCAT::ProvisionalDutyCash => "PDC",
292 VATCAT::PreferenceDuty => "PRF",
293 VATCAT::SpecialConstructionTax => "SCN",
294 VATCAT::ShiftedSocialSecurities => "SSS",
295 VATCAT::StateProvincialSalesTax => "STT",
296 VATCAT::SuspendedDuty => "SUP",
297 VATCAT::Surtax => "SUR",
298 VATCAT::ShiftedWageTax => "SWT",
299 VATCAT::AlcoholMarkTax => "TAC",
300 VATCAT::Total => "TOT",
301 VATCAT::TurnoverTax => "TOX",
302 VATCAT::TonnageTaxes => "TTA",
303 VATCAT::ValuationDeposit => "VAD",
304 VATCAT::ValueAddedTax => "VAT",
305 }
306 }
307}
308
309impl crate::Description for VATCAT {
310 fn description(self) -> &'static str {
311 match self {
312 VATCAT::PetroleumTax => "Petroleum tax",
313 VATCAT::ProvisionalCountervailingDutyCash => "Provisional countervailing duty cash",
314 VATCAT::ProvisionalCountervailingDutyBond => "Provisional countervailing duty bond",
315 VATCAT::TobaccoTax => "Tobacco tax",
316 VATCAT::EnergyFee => "Energy fee",
317 VATCAT::CoffeeTax => "Coffee tax",
318 VATCAT::HarmonisedSalesTaxCanadian => "Harmonised sales tax, Canadian",
319 VATCAT::QuebecSalesTax => "Quebec sales tax",
320 VATCAT::CanadianProvincialSalesTax => "Canadian provincial sales tax",
321 VATCAT::TaxOnReplacementPart => "Tax on replacement part",
322 VATCAT::MineralOilTax => "Mineral oil tax",
323 VATCAT::SpecialTax => "Special tax",
324 VATCAT::InsuranceTax => "Insurance tax",
325 VATCAT::ProvincialCannabisTax => "Provincial Cannabis Tax",
326 VATCAT::OutstandingDutyInterest => "Outstanding duty interest",
327 VATCAT::AntiDumpingDuty => "Anti-dumping duty",
328 VATCAT::StampDutyImpostaDiBollo => "Stamp duty (Imposta di Bollo)",
329 VATCAT::AgriculturalLevy => "Agricultural levy",
330 VATCAT::CarTax => "Car tax",
331 VATCAT::PaperConsortiumTaxItaly => "Paper consortium tax (Italy)",
332 VATCAT::CommoditySpecificTax => "Commodity specific tax",
333 VATCAT::CustomsDuty => "Customs duty",
334 VATCAT::CountervailingDuty => "Countervailing duty",
335 VATCAT::EnvironmentalTax => "Environmental tax",
336 VATCAT::ExciseDuty => "Excise duty",
337 VATCAT::AgriculturalExportRebate => "Agricultural export rebate",
338 VATCAT::FederalExciseTax => "Federal excise tax",
339 VATCAT::Free => "Free",
340 VATCAT::GeneralConstructionTax => "General construction tax",
341 VATCAT::GoodsAndServicesTax => "Goods and services tax",
342 VATCAT::IlluminantsTax => "Illuminants tax",
343 VATCAT::ImportTax => "Import tax",
344 VATCAT::IndividualTax => "Individual tax",
345 VATCAT::BusinessLicenseFee => "Business license fee",
346 VATCAT::LocalConstructionTax => "Local construction tax",
347 VATCAT::LightDuesPayable => "Light dues payable",
348 VATCAT::LocalSalesTax => "Local sales tax",
349 VATCAT::LustTax => "Lust tax",
350 VATCAT::MonetaryCompensatoryAmount => "Monetary compensatory amount",
351 VATCAT::MiscellaneousCashDeposit => "Miscellaneous cash deposit",
352 VATCAT::OtherTaxes => "Other taxes",
353 VATCAT::ProvisionalDutyBond => "Provisional duty bond",
354 VATCAT::ProvisionalDutyCash => "Provisional duty cash",
355 VATCAT::PreferenceDuty => "Preference duty",
356 VATCAT::SpecialConstructionTax => "Special construction tax",
357 VATCAT::ShiftedSocialSecurities => "Shifted social securities",
358 VATCAT::StateProvincialSalesTax => "State/provincial sales tax",
359 VATCAT::SuspendedDuty => "Suspended duty",
360 VATCAT::Surtax => "Surtax",
361 VATCAT::ShiftedWageTax => "Shifted wage tax",
362 VATCAT::AlcoholMarkTax => "Alcohol mark tax",
363 VATCAT::Total => "Total",
364 VATCAT::TurnoverTax => "Turnover tax",
365 VATCAT::TonnageTaxes => "Tonnage taxes",
366 VATCAT::ValuationDeposit => "Valuation deposit",
367 VATCAT::ValueAddedTax => "Value added tax",
368 }
369 }
370}
371
372impl crate::FromCode for VATCAT {
373 fn from_code(code: &str) -> Option<Self>
374 where
375 Self: Sized,
376 {
377 match code {
378 "AAA" => Some(VATCAT::PetroleumTax),
379 "AAB" => Some(VATCAT::ProvisionalCountervailingDutyCash),
380 "AAC" => Some(VATCAT::ProvisionalCountervailingDutyBond),
381 "AAD" => Some(VATCAT::TobaccoTax),
382 "AAE" => Some(VATCAT::EnergyFee),
383 "AAF" => Some(VATCAT::CoffeeTax),
384 "AAG" => Some(VATCAT::HarmonisedSalesTaxCanadian),
385 "AAH" => Some(VATCAT::QuebecSalesTax),
386 "AAI" => Some(VATCAT::CanadianProvincialSalesTax),
387 "AAJ" => Some(VATCAT::TaxOnReplacementPart),
388 "AAK" => Some(VATCAT::MineralOilTax),
389 "AAL" => Some(VATCAT::SpecialTax),
390 "AAM" => Some(VATCAT::InsuranceTax),
391 "AAO" => Some(VATCAT::ProvincialCannabisTax),
392 "AAP" => Some(VATCAT::OutstandingDutyInterest),
393 "ADD" => Some(VATCAT::AntiDumpingDuty),
394 "BOL" => Some(VATCAT::StampDutyImpostaDiBollo),
395 "CAP" => Some(VATCAT::AgriculturalLevy),
396 "CAR" => Some(VATCAT::CarTax),
397 "COC" => Some(VATCAT::PaperConsortiumTaxItaly),
398 "CST" => Some(VATCAT::CommoditySpecificTax),
399 "CUD" => Some(VATCAT::CustomsDuty),
400 "CVD" => Some(VATCAT::CountervailingDuty),
401 "ENV" => Some(VATCAT::EnvironmentalTax),
402 "EXC" => Some(VATCAT::ExciseDuty),
403 "EXP" => Some(VATCAT::AgriculturalExportRebate),
404 "FET" => Some(VATCAT::FederalExciseTax),
405 "FRE" => Some(VATCAT::Free),
406 "GCN" => Some(VATCAT::GeneralConstructionTax),
407 "GST" => Some(VATCAT::GoodsAndServicesTax),
408 "ILL" => Some(VATCAT::IlluminantsTax),
409 "IMP" => Some(VATCAT::ImportTax),
410 "IND" => Some(VATCAT::IndividualTax),
411 "LAC" => Some(VATCAT::BusinessLicenseFee),
412 "LCN" => Some(VATCAT::LocalConstructionTax),
413 "LDP" => Some(VATCAT::LightDuesPayable),
414 "LOC" => Some(VATCAT::LocalSalesTax),
415 "LST" => Some(VATCAT::LustTax),
416 "MCA" => Some(VATCAT::MonetaryCompensatoryAmount),
417 "MCD" => Some(VATCAT::MiscellaneousCashDeposit),
418 "OTH" => Some(VATCAT::OtherTaxes),
419 "PDB" => Some(VATCAT::ProvisionalDutyBond),
420 "PDC" => Some(VATCAT::ProvisionalDutyCash),
421 "PRF" => Some(VATCAT::PreferenceDuty),
422 "SCN" => Some(VATCAT::SpecialConstructionTax),
423 "SSS" => Some(VATCAT::ShiftedSocialSecurities),
424 "STT" => Some(VATCAT::StateProvincialSalesTax),
425 "SUP" => Some(VATCAT::SuspendedDuty),
426 "SUR" => Some(VATCAT::Surtax),
427 "SWT" => Some(VATCAT::ShiftedWageTax),
428 "TAC" => Some(VATCAT::AlcoholMarkTax),
429 "TOT" => Some(VATCAT::Total),
430 "TOX" => Some(VATCAT::TurnoverTax),
431 "TTA" => Some(VATCAT::TonnageTaxes),
432 "VAD" => Some(VATCAT::ValuationDeposit),
433 "VAT" => Some(VATCAT::ValueAddedTax),
434 _ => None,
435 }
436 }
437}