class FooType: class Meta: name = "fooType" foo: Optional[XmlDate] = field(default=None, metadata={ "type": "Element", "namespace": "", "required": True, "min_exclusive": XmlDate(1999, 1, 31), })
class NistschemaSvIvAtomicDateMaxExclusive5: class Meta: name = "NISTSchema-SV-IV-atomic-date-maxExclusive-5" namespace = "NISTSchema-SV-IV-atomic-date-maxExclusive-5-NS" value: Optional[XmlDate] = field(default=None, metadata={ "required": True, "max_exclusive": XmlDate(2030, 12, 31), })
def test_from_value_simple(self): self.assertEqual(DataType.BOOLEAN, DataType.from_value(True)) self.assertEqual(DataType.DECIMAL, DataType.from_value(Decimal(1.1))) self.assertEqual(DataType.QNAME, DataType.from_value(QName("a"))) self.assertEqual(DataType.STRING, DataType.from_value("a")) self.assertEqual(DataType.DATE, DataType.from_value(XmlDate(2021, 1, 1))) self.assertEqual(DataType.TIME, DataType.from_value(XmlTime(12, 1, 1))) self.assertEqual( DataType.DATE_TIME, DataType.from_value(XmlDateTime(2002, 1, 1, 12, 1, 1)) ) self.assertEqual(DataType.STRING, DataType.from_value(self))
class NistschemaSvIvAtomicDateMinExclusive4: class Meta: name = "NISTSchema-SV-IV-atomic-date-minExclusive-4" namespace = "NISTSchema-SV-IV-atomic-date-minExclusive-4-NS" value: Optional[XmlDate] = field( default=None, metadata={ "required": True, "min_exclusive": XmlDate(2025, 1, 9), } )
class NistschemaSvIvAtomicDateMaxInclusive4: class Meta: name = "NISTSchema-SV-IV-atomic-date-maxInclusive-4" namespace = "NISTSchema-SV-IV-atomic-date-maxInclusive-4-NS" value: Optional[XmlDate] = field( default=None, metadata={ "required": True, "max_inclusive": XmlDate(1971, 1, 23), } )
class Test: class Meta: name = "test" namespace = "ST_facets" value: Optional[XmlDate] = field( default=None, metadata={ "required": True, "max_inclusive": XmlDate(2002, 2, 28), } )
class NistschemaSvIvAtomicDateEnumeration4Type(Enum): VALUE_1991_09_06 = XmlDate(1991, 9, 6) VALUE_2022_07_25 = XmlDate(2022, 7, 25) VALUE_2021_10_20 = XmlDate(2021, 10, 20) VALUE_1984_08_15 = XmlDate(1984, 8, 15) VALUE_1975_11_02 = XmlDate(1975, 11, 2) VALUE_2000_02_01 = XmlDate(2000, 2, 1)
class Root: class Meta: name = "root" namespace = "http://xstest-tns/schema11_D3_3_10_v01" el_date: List[XmlDate] = field(default_factory=list, metadata={ "name": "elDate", "type": "Element", "namespace": "", "min_occurs": 1, "min_inclusive": XmlDate(2000, 12, 12, 780), })
class ProductType: number: Optional[int] = field(default=None, metadata={ "type": "Element", "namespace": "", "required": True, }) name: Optional[str] = field(default=None, metadata={ "type": "Element", "namespace": "", "required": True, }) size_or_color_or_description: List[object] = field( default_factory=list, metadata={ "type": "Elements", "choices": ( { "name": "size", "type": SizeType, "namespace": "", }, { "name": "color", "type": ColorType, "namespace": "", }, { "name": "description", "type": DescriptionType, "namespace": "", }, ), }) eff_date: XmlDate = field(default=XmlDate(1900, 1, 1), metadata={ "name": "effDate", "type": "Attribute", }) other_attributes: Dict[str, str] = field(default_factory=dict, metadata={ "type": "Attributes", "namespace": "##other", })
def make_books(how_many: int): return Books(book=[ BookForm( author="Arne Dahl", title="Misterioso: A Crime Novel", genre="Thrillers & Suspense", price=15.95, pub_date=XmlDate(1999, 10, 5), review=( "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " "Integer at erat sagittis, accumsan mauris eu, egestas " "quam. Nam tristique felis justo, vel iaculis ipsum cursus " "at. Praesent varius enim ac nunc interdum placerat. " "Integer porttitor, nibh at viverra vehicula, leo dui " "suscipit nisi, ornare laoreet eros neque nec mi. Proin."), id="9788831796781", ) for _ in range(how_many) ])
def setUp(self): super().setUp() self.books = Books(book=[ BookForm( id="bk001", author="Hightower, Kim", title="The First Book", genre="Fiction", price=44.95, pub_date=XmlDate.from_string("2000-10-01"), review="An amazing story of nothing.", ), BookForm( id="bk002", author="Nagata, Suanne", title="Becoming Somebody", genre="Biography", review="A masterpiece of the fine art of gossiping.", ), ]) self.expected = { "book": [ { "author": "Hightower, Kim", "genre": "Fiction", "id": "bk001", "lang": "en", "price": 44.95, "pub_date": "2000-10-01", "review": "An amazing story of nothing.", "title": "The First Book", }, { "author": "Nagata, Suanne", "genre": "Biography", "id": "bk002", "lang": "en", "review": "A masterpiece of the fine art of gossiping.", "title": "Becoming Somebody", }, ] }
class NistschemaSvIvListDateEnumeration3Type(Enum): VALUE_2005_06_20_2009_08_24_1994_01_13_1971_03_22_2012_09_21_2000_02_24_2010_10_07_2012_07_07_1983_12_24 = ( XmlDate(2005, 6, 20), XmlDate(2009, 8, 24), XmlDate(1994, 1, 13), XmlDate(1971, 3, 22), XmlDate(2012, 9, 21), XmlDate(2000, 2, 24), XmlDate(2010, 10, 7), XmlDate(2012, 7, 7), XmlDate(1983, 12, 24), ) VALUE_2025_09_07_1996_03_19_1971_02_18_2001_03_25_1975_09_11_1976_02_13_1980_12_10_1972_08_21 = ( XmlDate(2025, 9, 7), XmlDate(1996, 3, 19), XmlDate(1971, 2, 18), XmlDate(2001, 3, 25), XmlDate(1975, 9, 11), XmlDate(1976, 2, 13), XmlDate(1980, 12, 10), XmlDate(1972, 8, 21), ) VALUE_2014_07_06_2028_02_01_1990_05_05_1979_10_27_1998_09_05_2018_07_19 = ( XmlDate(2014, 7, 6), XmlDate(2028, 2, 1), XmlDate(1990, 5, 5), XmlDate(1979, 10, 27), XmlDate(1998, 9, 5), XmlDate(2018, 7, 19), ) VALUE_2003_07_21_1987_08_20_2023_12_02_2004_12_20_2013_01_28_2005_02_23_2016_06_07_2013_12_27 = ( XmlDate(2003, 7, 21), XmlDate(1987, 8, 20), XmlDate(2023, 12, 2), XmlDate(2004, 12, 20), XmlDate(2013, 1, 28), XmlDate(2005, 2, 23), XmlDate(2016, 6, 7), XmlDate(2013, 12, 27), ) VALUE_2029_12_12_1977_08_04_1973_04_04_1980_03_26_1987_12_28_2004_07_10_1999_01_23 = ( XmlDate(2029, 12, 12), XmlDate(1977, 8, 4), XmlDate(1973, 4, 4), XmlDate(1980, 3, 26), XmlDate(1987, 12, 28), XmlDate(2004, 7, 10), XmlDate(1999, 1, 23), ) VALUE_1972_04_02_2009_06_22_2012_12_31_2018_09_01_2018_12_09_2021_12_11_1975_05_11 = ( XmlDate(1972, 4, 2), XmlDate(2009, 6, 22), XmlDate(2012, 12, 31), XmlDate(2018, 9, 1), XmlDate(2018, 12, 9), XmlDate(2021, 12, 11), XmlDate(1975, 5, 11), ) VALUE_1971_02_24_2019_06_15_1991_08_21_2029_12_24_2029_01_13 = ( XmlDate(1971, 2, 24), XmlDate(2019, 6, 15), XmlDate(1991, 8, 21), XmlDate(2029, 12, 24), XmlDate(2029, 1, 13), ) VALUE_1970_02_18_2005_05_25_1994_04_09_2017_06_27_2008_08_24_2012_07_08_1970_01_26_1978_01_22 = ( XmlDate(1970, 2, 18), XmlDate(2005, 5, 25), XmlDate(1994, 4, 9), XmlDate(2017, 6, 27), XmlDate(2008, 8, 24), XmlDate(2012, 7, 8), XmlDate(1970, 1, 26), XmlDate(1978, 1, 22), ) VALUE_1988_03_08_1991_07_04_2006_01_08_2000_04_02_1991_05_08 = ( XmlDate(1988, 3, 8), XmlDate(1991, 7, 4), XmlDate(2006, 1, 8), XmlDate(2000, 4, 2), XmlDate(1991, 5, 8), )
class NistschemaSvIvListDateEnumeration4Type(Enum): VALUE_1975_08_07_1986_06_10_2015_09_26_1975_11_10_1975_05_12_2004_04_28_2001_01_24_2030_08_12 = ( XmlDate(1975, 8, 7), XmlDate(1986, 6, 10), XmlDate(2015, 9, 26), XmlDate(1975, 11, 10), XmlDate(1975, 5, 12), XmlDate(2004, 4, 28), XmlDate(2001, 1, 24), XmlDate(2030, 8, 12), ) VALUE_1997_11_23_1998_10_26_1982_05_22_2028_02_02_2008_03_14_1983_04_08_1999_08_24_1989_10_10_2003_07_25_2001_09_22 = ( XmlDate(1997, 11, 23), XmlDate(1998, 10, 26), XmlDate(1982, 5, 22), XmlDate(2028, 2, 2), XmlDate(2008, 3, 14), XmlDate(1983, 4, 8), XmlDate(1999, 8, 24), XmlDate(1989, 10, 10), XmlDate(2003, 7, 25), XmlDate(2001, 9, 22), ) VALUE_2019_06_09_2010_12_25_2008_07_03_2001_05_11_1971_07_13_1985_11_13 = ( XmlDate(2019, 6, 9), XmlDate(2010, 12, 25), XmlDate(2008, 7, 3), XmlDate(2001, 5, 11), XmlDate(1971, 7, 13), XmlDate(1985, 11, 13), ) VALUE_2017_02_03_1994_10_09_2019_12_12_1984_08_02_1992_11_15_1986_03_17_2027_12_31_2021_12_16 = ( XmlDate(2017, 2, 3), XmlDate(1994, 10, 9), XmlDate(2019, 12, 12), XmlDate(1984, 8, 2), XmlDate(1992, 11, 15), XmlDate(1986, 3, 17), XmlDate(2027, 12, 31), XmlDate(2021, 12, 16), ) VALUE_1979_04_21_2020_01_17_1993_09_19_1992_01_14_1975_09_18_2015_05_03_2014_04_29_2005_06_15_2004_09_27_2029_08_15 = ( XmlDate(1979, 4, 21), XmlDate(2020, 1, 17), XmlDate(1993, 9, 19), XmlDate(1992, 1, 14), XmlDate(1975, 9, 18), XmlDate(2015, 5, 3), XmlDate(2014, 4, 29), XmlDate(2005, 6, 15), XmlDate(2004, 9, 27), XmlDate(2029, 8, 15), ) VALUE_1999_07_19_1986_03_26_1999_12_27_1972_05_16_1987_09_16_2015_09_17 = ( XmlDate(1999, 7, 19), XmlDate(1986, 3, 26), XmlDate(1999, 12, 27), XmlDate(1972, 5, 16), XmlDate(1987, 9, 16), XmlDate(2015, 9, 17), ) VALUE_2010_07_09_1977_06_28_1982_10_24_1986_10_13_1986_09_10_2024_12_10_1990_09_11 = ( XmlDate(2010, 7, 9), XmlDate(1977, 6, 28), XmlDate(1982, 10, 24), XmlDate(1986, 10, 13), XmlDate(1986, 9, 10), XmlDate(2024, 12, 10), XmlDate(1990, 9, 11), ) VALUE_2023_10_14_1980_10_09_1982_12_05_1988_04_09_1984_02_11_2021_05_24_2017_07_12 = ( XmlDate(2023, 10, 14), XmlDate(1980, 10, 9), XmlDate(1982, 12, 5), XmlDate(1988, 4, 9), XmlDate(1984, 2, 11), XmlDate(2021, 5, 24), XmlDate(2017, 7, 12), )
from tests.fixtures.books import Books, BookForm from xsdata.models.datatype import XmlDate books = Books(book=[ BookForm( id="bk001", author="Hightower, Kim", title="The First Book", genre="Fiction", price=44.95, pub_date=XmlDate(2000, 10, 1), review="An amazing story of nothing.", ), BookForm( id="bk002", author="Nagata, Suanne", title="Becoming Somebody", genre="Biography", price=33.95, pub_date=XmlDate(2001, 1, 10), review="A masterpiece of the fine art of gossiping.", ), ]) events = [('start-ns', 'brk', 'urn:books'), ('start', '{urn:books}books', {}, { 'brk': 'urn:books' }), ('start', 'book', { 'id': 'bk001', 'lang': 'en' }, {
class FooTypeFoo(Enum): VALUE_1999_05_31 = XmlDate(1999, 5, 31) VALUE_1999_07_31 = XmlDate(1999, 7, 31) VALUE_2000_03_10 = XmlDate(2000, 3, 10)
class DadosNotaFiscal: """ :ivar id: Identificador do Registro (RPS) :ivar numero_nf: :ivar situacao_nf: Situação da Nota Fiscal N - para Nota Normal :ivar tipo_nf: Tipo da Nota Fiscal P - para Serviço Prestado :ivar emissao: Data de Emissão da Nota Fiscal (*não informar) :ivar cnpjcpftomador: CNPJ / CPF do Tomador de Serviço (sem máscara) :ivar nome_tomador: Nome ou Razão Social do Tomador de Serviço :ivar uftomador: Sigla do Estado do Tomador de Serviço :ivar cidade_tomador: Código do Município na Tabela IBGE do Tomador de Serviço :ivar endereco_tomador: Endereço do Tomador de Serviço :ivar numero_tomador: Número do Tomador de Serviço :ivar complemento_tomador: Complemento do Tomador de Serviço :ivar bairro_tomador: Bairro do Tomador de Serviço :ivar ceptomador: CEP do Tomador de Serviço :ivar email_tomador: E-mail do Tomador de Serviço :ivar observacao: Observações da Nota Fiscal :ivar nfsubstituta: Informar o número da Nota Fiscal Substituta de uma Nota Fiscal Cancelada. :ivar valor_aliquota_simples_nacional: (OPCIONAL) Valor da Alíquota do Simples Nacional, informar quando o tipo da empresa for "Simples Nacional" :ivar local_prestacao: Local da Prestação do Serviço 1 - para serviço na sede do prestador 2 - para serviço para imóvel (Construção Civil) 3 - para serviço em via pública 4 - para serviço fora do município :ivar descricao_local_prestacao: Dados do Local de Prestação do Serviço :ivar descricao_local_prestacao_complementar: Dados complementares do Local de Prestação do Serviço :ivar inscricao_imovel: Inscrição Cadastral do Imóvel (usar quando o Local de Prestação for do tipo 2) :ivar uflocal_prestacao: Sigla do Estado da Prestação do Serviço (usar quando o Local de Prestação for do tipo 4) :ivar cidade_local_prestacao: Cidade da Prestação do Serviço (usar quando o Local de Prestação for do tipo 4) :ivar valor_aliquota_local_prestacao: (OPCIONAL) Valor da Alíquota no Local de Prestação do Serviço (usar quando o Local de Prestação for do tipo 4) :ivar endereco_local_prestacao: Endereço da Prestação do Serviço (usar quando o Local de Prestação for do tipo 3 ou 4) :ivar numero_local_prestacao: Número da localização do imóvel da Prestação do Serviço (usar quando o Local de Prestação for do tipo 4) :ivar complemento_local_prestacao: Complemento do imóvel da Prestação do Serviço (usar quando o Local de Prestação for do tipo 4) :ivar bairro_local_prestacao: Bairro da Prestação do Serviço (usar quando o Local de Prestação for do tipo 4) :ivar ceplocal_prestacao: CEP da Prestação do Serviço (usar quando o Local de Prestação for do tipo 4) :ivar motivo_cancelamento: Descrição do Motivo de Cancelamento da Nota Fiscal :ivar tipo_documento: Código do Tipo de Nota Fiscal (verificar com a Prefeitura a lista de códigos válidos) :ivar dados_itens_nota_fiscal: :ivar dados_impostos_nota_fiscal: """ id: Optional[int] = field( default=None, metadata={ "name": "ID", "type": "Element", "namespace": "", "required": True, } ) numero_nf: str = field( init=False, default="0000000000", metadata={ "name": "NumeroNF", "type": "Element", "namespace": "", "required": True, } ) situacao_nf: str = field( init=False, default="N", metadata={ "name": "SituacaoNF", "type": "Element", "namespace": "", "required": True, } ) tipo_nf: str = field( init=False, default="P", metadata={ "name": "TipoNF", "type": "Element", "namespace": "", "required": True, } ) emissao: XmlDate = field( init=False, default=XmlDate(1900, 1, 1), metadata={ "name": "Emissao", "type": "Element", "namespace": "", "required": True, } ) cnpjcpftomador: Optional[str] = field( default=None, metadata={ "name": "CNPJCPFTomador", "type": "Element", "namespace": "", "required": True, "min_length": 11, "max_length": 14, } ) nome_tomador: Optional[str] = field( default=None, metadata={ "name": "NomeTomador", "type": "Element", "namespace": "", "required": True, "min_length": 0, "max_length": 60, } ) uftomador: Optional[DadosNotaFiscalUftomador1] = field( default=None, metadata={ "name": "UFTomador", "type": "Element", "namespace": "", "required": True, } ) cidade_tomador: Optional[str] = field( default=None, metadata={ "name": "CidadeTomador", "type": "Element", "namespace": "", "required": True, "pattern": r"[0-9]{7}", } ) endereco_tomador: Optional[str] = field( default=None, metadata={ "name": "EnderecoTomador", "type": "Element", "namespace": "", "required": True, "min_length": 0, "max_length": 60, } ) numero_tomador: Optional[str] = field( default=None, metadata={ "name": "NumeroTomador", "type": "Element", "namespace": "", "required": True, "min_length": 0, "max_length": 10, } ) complemento_tomador: Optional[str] = field( default=None, metadata={ "name": "ComplementoTomador", "type": "Element", "namespace": "", "required": True, "min_length": 0, "max_length": 60, } ) bairro_tomador: Optional[str] = field( default=None, metadata={ "name": "BairroTomador", "type": "Element", "namespace": "", "required": True, "min_length": 0, "max_length": 40, } ) ceptomador: Optional[str] = field( default=None, metadata={ "name": "CEPTomador", "type": "Element", "namespace": "", "required": True, "pattern": r"[0-9]{5}-[0-9]{3}", } ) email_tomador: Optional[str] = field( default=None, metadata={ "name": "EmailTomador", "type": "Element", "namespace": "", "required": True, "min_length": 0, "max_length": 50, } ) observacao: Optional[str] = field( default=None, metadata={ "name": "Observacao", "type": "Element", "namespace": "", "required": True, "min_length": 0, "max_length": 200, } ) nfsubstituta: str = field( init=False, default="0000000000", metadata={ "name": "NFSubstituta", "type": "Element", "namespace": "", "required": True, } ) valor_aliquota_simples_nacional: Optional[DadosNotaFiscalValorAliquotaSimplesNacional] = field( default=None, metadata={ "name": "ValorAliquotaSimplesNacional", "type": "Element", "namespace": "", } ) local_prestacao: Optional[DadosNotaFiscalLocalPrestacao1] = field( default=None, metadata={ "name": "LocalPrestacao", "type": "Element", "namespace": "", "required": True, } ) descricao_local_prestacao: Optional[str] = field( default=None, metadata={ "name": "DescricaoLocalPrestacao", "type": "Element", "namespace": "", "required": True, "min_length": 0, "max_length": 60, } ) descricao_local_prestacao_complementar: Optional[str] = field( default=None, metadata={ "name": "DescricaoLocalPrestacaoComplementar", "type": "Element", "namespace": "", "required": True, "min_length": 0, "max_length": 50, } ) inscricao_imovel: Optional[Decimal] = field( default=None, metadata={ "name": "InscricaoImovel", "type": "Element", "namespace": "", "required": True, } ) uflocal_prestacao: Optional[DadosNotaFiscalUflocalPrestacao1] = field( default=None, metadata={ "name": "UFLocalPrestacao", "type": "Element", "namespace": "", "required": True, } ) cidade_local_prestacao: Optional[str] = field( default=None, metadata={ "name": "CidadeLocalPrestacao", "type": "Element", "namespace": "", "required": True, "pattern": r"[0-9]{7}", } ) valor_aliquota_local_prestacao: Optional[Decimal] = field( default=None, metadata={ "name": "ValorAliquotaLocalPrestacao", "type": "Element", "namespace": "", } ) endereco_local_prestacao: Optional[str] = field( default=None, metadata={ "name": "EnderecoLocalPrestacao", "type": "Element", "namespace": "", "required": True, "min_length": 0, "max_length": 60, } ) numero_local_prestacao: Optional[str] = field( default=None, metadata={ "name": "NumeroLocalPrestacao", "type": "Element", "namespace": "", "required": True, "min_length": 0, "max_length": 10, } ) complemento_local_prestacao: Optional[str] = field( default=None, metadata={ "name": "ComplementoLocalPrestacao", "type": "Element", "namespace": "", "required": True, "min_length": 0, "max_length": 30, } ) bairro_local_prestacao: Optional[str] = field( default=None, metadata={ "name": "BairroLocalPrestacao", "type": "Element", "namespace": "", "required": True, "min_length": 0, "max_length": 40, } ) ceplocal_prestacao: Optional[str] = field( default=None, metadata={ "name": "CEPLocalPrestacao", "type": "Element", "namespace": "", "required": True, "pattern": r"[0-9]{5}-[0-9]{3}", } ) motivo_cancelamento: str = field( init=False, default="", metadata={ "name": "MotivoCancelamento", "type": "Element", "namespace": "", "required": True, } ) tipo_documento: Optional[str] = field( default=None, metadata={ "name": "TipoDocumento", "type": "Element", "namespace": "", "required": True, "pattern": r"[0-9]{3}", } ) dados_itens_nota_fiscal: Optional["Nfeeletronica.DadosNotaFiscal.DadosItensNotaFiscal"] = field( default=None, metadata={ "name": "DadosItensNotaFiscal", "type": "Element", "namespace": "", "required": True, } ) dados_impostos_nota_fiscal: List["Nfeeletronica.DadosNotaFiscal.DadosImpostosNotaFiscal"] = field( default_factory=list, metadata={ "name": "DadosImpostosNotaFiscal", "type": "Element", "namespace": "", "max_occurs": 8, } ) @dataclass class DadosItensNotaFiscal: """ :ivar item_atividade: Código do Item da Atividade prestado (de acordo com lista informada pela Prefeitura) :ivar texto_item: Texto do Item da Nota Fiscal :ivar valor_item: Valor do Item da Nota Fiscal :ivar valor_deducao: Valor das Deduções da Nota Fiscal :ivar retido: Identifica se o imposto do serviço foi retido na fonte pelo Tomador S - para Imposto Retido pelo Tomador N - para Imposto Não Retido pelo Tomador :ivar pais: """ item_atividade: Optional[int] = field( default=None, metadata={ "name": "ItemAtividade", "type": "Element", "namespace": "", "required": True, } ) texto_item: Optional[str] = field( default=None, metadata={ "name": "TextoItem", "type": "Element", "namespace": "", "required": True, "min_length": 10, "max_length": 1800, } ) valor_item: Optional[Decimal] = field( default=None, metadata={ "name": "ValorItem", "type": "Element", "namespace": "", "required": True, } ) valor_deducao: Optional[Decimal] = field( default=None, metadata={ "name": "ValorDeducao", "type": "Element", "namespace": "", "required": True, } ) retido: Optional[DadosItensNotaFiscalRetido1] = field( default=None, metadata={ "name": "Retido", "type": "Element", "namespace": "", "required": True, } ) pais: Optional[str] = field( default=None, metadata={ "name": "Pais", "type": "Element", "namespace": "", "required": True, "min_length": 0, "max_length": 50, } ) @dataclass class DadosImpostosNotaFiscal: """ :ivar imposto: Sigla do Imposto utilizado na Dedução :ivar valor_imposto: Valor do Imposto utilizado na Dedução """ imposto: Optional[str] = field( default=None, metadata={ "name": "Imposto", "type": "Element", "namespace": "", "required": True, "min_length": 3, "max_length": 6, } ) valor_imposto: Optional[Decimal] = field( default=None, metadata={ "name": "ValorImposto", "type": "Element", "namespace": "", "required": True, } )
class NistschemaSvIvListDateEnumeration1Type(Enum): VALUE_2014_04_29_1996_10_24_1981_06_13_1997_10_17_1997_09_06_1991_03_21_1987_03_24_1970_05_02_2024_06_29 = ( XmlDate(2014, 4, 29), XmlDate(1996, 10, 24), XmlDate(1981, 6, 13), XmlDate(1997, 10, 17), XmlDate(1997, 9, 6), XmlDate(1991, 3, 21), XmlDate(1987, 3, 24), XmlDate(1970, 5, 2), XmlDate(2024, 6, 29), ) VALUE_1977_04_29_2008_07_06_2028_11_03_2023_04_03_2022_08_27_2025_12_07_2001_07_21 = ( XmlDate(1977, 4, 29), XmlDate(2008, 7, 6), XmlDate(2028, 11, 3), XmlDate(2023, 4, 3), XmlDate(2022, 8, 27), XmlDate(2025, 12, 7), XmlDate(2001, 7, 21), ) VALUE_2008_09_14_2011_07_16_2017_04_12_2014_04_25_2014_01_20_1990_06_18_1983_05_09_1975_09_28_1997_07_19 = ( XmlDate(2008, 9, 14), XmlDate(2011, 7, 16), XmlDate(2017, 4, 12), XmlDate(2014, 4, 25), XmlDate(2014, 1, 20), XmlDate(1990, 6, 18), XmlDate(1983, 5, 9), XmlDate(1975, 9, 28), XmlDate(1997, 7, 19), ) VALUE_2003_09_18_2028_09_11_1997_08_15_1980_08_07_1987_12_06_2007_06_29_1971_08_27_2000_04_26_2020_07_11 = ( XmlDate(2003, 9, 18), XmlDate(2028, 9, 11), XmlDate(1997, 8, 15), XmlDate(1980, 8, 7), XmlDate(1987, 12, 6), XmlDate(2007, 6, 29), XmlDate(1971, 8, 27), XmlDate(2000, 4, 26), XmlDate(2020, 7, 11), ) VALUE_1981_10_23_1971_07_23_1999_04_16_1983_01_05_2017_12_16_2029_09_15_1985_11_29_1978_04_11_2010_04_06 = ( XmlDate(1981, 10, 23), XmlDate(1971, 7, 23), XmlDate(1999, 4, 16), XmlDate(1983, 1, 5), XmlDate(2017, 12, 16), XmlDate(2029, 9, 15), XmlDate(1985, 11, 29), XmlDate(1978, 4, 11), XmlDate(2010, 4, 6), ) VALUE_1999_05_21_1997_06_29_2010_10_08_1991_09_17_1990_10_12_2024_12_25 = ( XmlDate(1999, 5, 21), XmlDate(1997, 6, 29), XmlDate(2010, 10, 8), XmlDate(1991, 9, 17), XmlDate(1990, 10, 12), XmlDate(2024, 12, 25), ) VALUE_1993_05_28_2026_08_08_1972_11_19_1998_08_13_2011_10_02_2020_11_24_1996_10_13_2006_09_30 = ( XmlDate(1993, 5, 28), XmlDate(2026, 8, 8), XmlDate(1972, 11, 19), XmlDate(1998, 8, 13), XmlDate(2011, 10, 2), XmlDate(2020, 11, 24), XmlDate(1996, 10, 13), XmlDate(2006, 9, 30), )
class NistschemaSvIvListDateEnumeration2Type(Enum): VALUE_2024_09_15_2013_11_23_1989_04_09_2001_10_10_1978_05_08_1980_09_07_1970_11_26_2015_03_09 = ( XmlDate(2024, 9, 15), XmlDate(2013, 11, 23), XmlDate(1989, 4, 9), XmlDate(2001, 10, 10), XmlDate(1978, 5, 8), XmlDate(1980, 9, 7), XmlDate(1970, 11, 26), XmlDate(2015, 3, 9), ) VALUE_1975_06_30_2011_01_23_1971_02_24_2028_08_01_2017_11_02 = ( XmlDate(1975, 6, 30), XmlDate(2011, 1, 23), XmlDate(1971, 2, 24), XmlDate(2028, 8, 1), XmlDate(2017, 11, 2), ) VALUE_2028_06_06_2007_09_15_2003_12_06_1995_10_27_2016_03_21_2012_05_18_2008_12_08_2030_09_22_2005_11_01 = ( XmlDate(2028, 6, 6), XmlDate(2007, 9, 15), XmlDate(2003, 12, 6), XmlDate(1995, 10, 27), XmlDate(2016, 3, 21), XmlDate(2012, 5, 18), XmlDate(2008, 12, 8), XmlDate(2030, 9, 22), XmlDate(2005, 11, 1), ) VALUE_2019_11_18_1989_04_08_1993_12_11_2003_08_19_2017_07_29_2030_11_20_1985_06_02_2007_12_17_2013_01_10 = ( XmlDate(2019, 11, 18), XmlDate(1989, 4, 8), XmlDate(1993, 12, 11), XmlDate(2003, 8, 19), XmlDate(2017, 7, 29), XmlDate(2030, 11, 20), XmlDate(1985, 6, 2), XmlDate(2007, 12, 17), XmlDate(2013, 1, 10), ) VALUE_1982_12_14_2029_06_02_1971_11_02_2018_02_05_2013_03_31_1978_05_29 = ( XmlDate(1982, 12, 14), XmlDate(2029, 6, 2), XmlDate(1971, 11, 2), XmlDate(2018, 2, 5), XmlDate(2013, 3, 31), XmlDate(1978, 5, 29), ) VALUE_1972_04_12_1991_01_10_2014_03_22_1992_10_21_2028_10_04_2016_05_27_1990_11_15_2022_11_04 = ( XmlDate(1972, 4, 12), XmlDate(1991, 1, 10), XmlDate(2014, 3, 22), XmlDate(1992, 10, 21), XmlDate(2028, 10, 4), XmlDate(2016, 5, 27), XmlDate(1990, 11, 15), XmlDate(2022, 11, 4), )
class RestrictedProductType(ProductType): eff_date: XmlDate = field(default=XmlDate(1900, 1, 1), metadata={ "name": "effDate", "type": "Attribute", })
class FooTypeFoo(Enum): VALUE_1999_05_31 = XmlDate(1999, 5, 31)
class Balanza: """ Estándar de balanza de comprobación que se entrega como parte de la contabilidad electrónica. :ivar ctas: Nodo obligatorio para expresar el detalle de cada cuenta o subcuenta de la balanza de comprobación. :ivar version: Atributo requerido para expresar la versión del formato. :ivar rfc: Atributo requerido para expresar el RFC del contribuyente que envía los datos :ivar mes: Atributo requerido para expresar el mes al que corresponde la balanza de comprobación :ivar anio: Atributo requerido para expresar el año al que corresponde la balanza :ivar tipo_envio: Atributo requerido para expresar el tipo de envío de la balanza (N - Normal; C - Complementaria) :ivar fecha_mod_bal: Atributo opcional para expresar la fecha de la última modificación contable de la balanza de comprobación. Es requerido cuando el tipo de Envío es complementario. :ivar sello: Atributo opcional para contener el sello digital del archivo de contabilidad electrónica. El sello deberá ser expresado cómo una cadena de texto en formato Base 64 :ivar no_certificado: Atributo opcional para expresar el número de serie del certificado de sello digital que ampara el archivo de contabilidad electrónica, de acuerdo al acuse correspondiente a 20 posiciones otorgado por el sistema del SAT. :ivar certificado: Atributo opcional que sirve para expresar el certificado de sello digital que ampara al archivo de contabilidad electrónica como texto, en formato base 64. """ class Meta: namespace = "http://www.sat.gob.mx/esquemas/ContabilidadE/1_3/BalanzaComprobacion" namespace_prefix = "BCE" schema_location = "http://www.sat.gob.mx/esquemas/ContabilidadE/1_3/BalanzaComprobacion/BalanzaComprobacion_1_3.xsd" ctas: List["Balanza.Ctas"] = field( default_factory=list, metadata={ "name": "Ctas", "type": "Element", "min_occurs": 1, } ) version: str = field( init=False, default="1.3", metadata={ "name": "Version", "type": "Attribute", "required": True, } ) rfc: Optional[str] = field( default=None, metadata={ "name": "RFC", "type": "Attribute", "required": True, "min_length": 12, "max_length": 13, "white_space": "collapse", "pattern": r"[A-ZÑ&]{3,4}[0-9]{2}[0-1][0-9][0-3][0-9][A-Z0-9]?[A-Z0-9]?[0-9A-Z]?", } ) mes: Optional[str] = field( default=None, metadata={ "name": "Mes", "type": "Attribute", "required": True, } ) anio: Optional[int] = field( default=None, metadata={ "name": "Anio", "type": "Attribute", "required": True, "min_inclusive": 2015, "max_inclusive": 2099, } ) tipo_envio: Optional[str] = field( default=None, metadata={ "name": "TipoEnvio", "type": "Attribute", "required": True, "pattern": r"[NC]", } ) fecha_mod_bal: Optional[XmlDate] = field( default=None, metadata={ "name": "FechaModBal", "type": "Attribute", "min_inclusive": XmlDate(2015, 1, 1), } ) sello: Optional[str] = field( default=None, metadata={ "name": "Sello", "type": "Attribute", "white_space": "collapse", } ) no_certificado: Optional[str] = field( default=None, metadata={ "name": "noCertificado", "type": "Attribute", "length": 20, } ) certificado: Optional[str] = field( default=None, metadata={ "name": "Certificado", "type": "Attribute", "white_space": "collapse", } ) @dataclass class Ctas: """ :ivar num_cta: Atributo requerido para expresar la clave asignada con que se distingue la cuenta o subcuenta en el catálogo de cuentas del contribuyente. :ivar saldo_ini: Atributo requerido para expresar el monto del saldo inicial de la cuenta o subcuenta en el periodo. De acuerdo a la naturaleza de la cuenta o subcuenta, deberá de corresponder el saldo inicial, de lo contrario se entenderá que es un saldo inicial de naturaleza inversa. En caso de no existir dato, colocar cero (0) :ivar debe: Atributo requerido para expresar el monto de los movimientos deudores de la cuenta o subcuenta. En caso de no existir dato, colocar cero (0) :ivar haber: Atributo requerido para expresar el monto de los movimientos acreedores de la cuenta o subcuenta. En caso de no existir dato, colocar cero (0) :ivar saldo_fin: Atributo requerido para expresar el monto del saldo final de la cuenta o subcuenta en el periodo. De acuerdo a la naturaleza de la cuenta o subcuenta, deberá de corresponder el saldo final, de lo contrario se entenderá que es un saldo final de naturaleza inversa. En caso de no existir dato, colocar cero (0) """ num_cta: Optional[str] = field( default=None, metadata={ "name": "NumCta", "type": "Attribute", "required": True, "min_length": 1, "max_length": 100, } ) saldo_ini: Optional[Decimal] = field( default=None, metadata={ "name": "SaldoIni", "type": "Attribute", "required": True, "min_exclusive": Decimal("-9999999999999999999999.99"), "max_inclusive": Decimal("9999999999999999999999.99"), "fraction_digits": 2, "white_space": "collapse", } ) debe: Optional[Decimal] = field( default=None, metadata={ "name": "Debe", "type": "Attribute", "required": True, "min_exclusive": Decimal("-9999999999999999999999.99"), "max_inclusive": Decimal("9999999999999999999999.99"), "fraction_digits": 2, "white_space": "collapse", } ) haber: Optional[Decimal] = field( default=None, metadata={ "name": "Haber", "type": "Attribute", "required": True, "min_exclusive": Decimal("-9999999999999999999999.99"), "max_inclusive": Decimal("9999999999999999999999.99"), "fraction_digits": 2, "white_space": "collapse", } ) saldo_fin: Optional[Decimal] = field( default=None, metadata={ "name": "SaldoFin", "type": "Attribute", "required": True, "min_exclusive": Decimal("-9999999999999999999999.99"), "max_inclusive": Decimal("9999999999999999999999.99"), "fraction_digits": 2, "white_space": "collapse", } )