"""Schema for Reference Vat Rates serialization.""" from abacus_common_logic.marshalling.custom_fields import ma from ledger.constants.constants import VAT_TYPES class ReferenceVatRateListSchema(ma.Schema): """Reference Vat Rates list response.""" reference_vat_rate_id = ma.IntegerId() country_of_tax_residence = ma.String(allow_none=True) country_of_tax_policy = ma.String(allow_none=True) effective_date = ma.FormattedDate() is_sba_signed = ma.Boolean(allow_none=True) is_tax_applicable = ma.Boolean(allow_none=True) is_vat_registered_in_country_of_tax_policy = ma.Boolean(allow_none=True) tax_rate = ma.Decimal(as_string=True, allow_none=True) transaction_type = ma.String(allow_none=True) vat_type = ma.Enum(options=VAT_TYPES, required=True)