4242
4343
4444settings = FiscalApiSettings (
45- # api_url="https://test.fiscalapi.com",
46- # api_key="<API_KEY> ",
47- # tenant="<TENANT_KEY> "
45+ api_url = "https://test.fiscalapi.com" ,
46+ api_key = "sk_test_b7dae706_e16f_4faf_90fb_a5d1990985a2 " ,
47+ tenant = "275510ee-f64d-435a-9e92-1553d8f10a7e "
4848)
4949
5050client = FiscalApiClient (settings = settings )
@@ -645,9 +645,9 @@ def create_factura_ferroviario_nacional():
645645 invoice = Invoice (
646646 series = "Serie" ,
647647 date = datetime .now ().strftime ("%Y-%m-%dT%H:%M:%S" ),
648- payment_form_id = "01" ,
649- currency_id = "MXN" ,
650- payment_method_id = "PPD" ,
648+ payment_form_code = "01" ,
649+ currency_code = "MXN" ,
650+ payment_method_code = "PPD" ,
651651 expedition_zip_code = "99080" ,
652652 cfdi_type_id = "T" ,
653653 tax_object_id = "01" ,
@@ -683,7 +683,7 @@ def create_factura_ferroviario_nacional():
683683 unidad_peso_id = "XBX" ,
684684 ubicaciones = [
685685 Ubicacion (
686- tipo_ubicacion_id = "Origen" ,
686+ tipo_ubicacion = "Origen" ,
687687 id_ubicacion = "OR101010" ,
688688 rfc_remitente_destinatario = "EKU9003173C9" ,
689689 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -702,7 +702,7 @@ def create_factura_ferroviario_nacional():
702702 ),
703703 ),
704704 Ubicacion (
705- tipo_ubicacion_id = "Destino" ,
705+ tipo_ubicacion = "Destino" ,
706706 id_ubicacion = "DE202021" ,
707707 rfc_remitente_destinatario = "EKU9003173C9" ,
708708 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -713,7 +713,7 @@ def create_factura_ferroviario_nacional():
713713 tipo_estacion_id = "01" ,
714714 ),
715715 Ubicacion (
716- tipo_ubicacion_id = "Destino" ,
716+ tipo_ubicacion = "Destino" ,
717717 id_ubicacion = "DE202022" ,
718718 rfc_remitente_destinatario = "EKU9003173C9" ,
719719 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -724,7 +724,7 @@ def create_factura_ferroviario_nacional():
724724 tipo_estacion_id = "01" ,
725725 ),
726726 Ubicacion (
727- tipo_ubicacion_id = "Destino" ,
727+ tipo_ubicacion = "Destino" ,
728728 id_ubicacion = "DE202023" ,
729729 rfc_remitente_destinatario = "EKU9003173C9" ,
730730 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -735,7 +735,7 @@ def create_factura_ferroviario_nacional():
735735 tipo_estacion_id = "01" ,
736736 ),
737737 Ubicacion (
738- tipo_ubicacion_id = "Destino" ,
738+ tipo_ubicacion = "Destino" ,
739739 id_ubicacion = "DE202024" ,
740740 rfc_remitente_destinatario = "EKU9003173C9" ,
741741 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -746,7 +746,7 @@ def create_factura_ferroviario_nacional():
746746 tipo_estacion_id = "01" ,
747747 ),
748748 Ubicacion (
749- tipo_ubicacion_id = "Destino" ,
749+ tipo_ubicacion = "Destino" ,
750750 id_ubicacion = "DE202025" ,
751751 rfc_remitente_destinatario = "EKU9003173C9" ,
752752 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -845,7 +845,7 @@ def create_factura_ferroviario_extranjero():
845845 regimen_aduaneros = [RegimenAduanero (regimen_aduanero_id = "EXD" )],
846846 ubicaciones = [
847847 Ubicacion (
848- tipo_ubicacion_id = "Origen" ,
848+ tipo_ubicacion = "Origen" ,
849849 id_ubicacion = "OR101010" ,
850850 rfc_remitente_destinatario = "EKU9003173C9" ,
851851 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -864,7 +864,7 @@ def create_factura_ferroviario_extranjero():
864864 ),
865865 ),
866866 Ubicacion (
867- tipo_ubicacion_id = "Destino" ,
867+ tipo_ubicacion = "Destino" ,
868868 id_ubicacion = "DE202021" ,
869869 rfc_remitente_destinatario = "EKU9003173C9" ,
870870 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -875,7 +875,7 @@ def create_factura_ferroviario_extranjero():
875875 tipo_estacion_id = "01" ,
876876 ),
877877 Ubicacion (
878- tipo_ubicacion_id = "Destino" ,
878+ tipo_ubicacion = "Destino" ,
879879 id_ubicacion = "DE202022" ,
880880 rfc_remitente_destinatario = "EKU9003173C9" ,
881881 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -886,7 +886,7 @@ def create_factura_ferroviario_extranjero():
886886 tipo_estacion_id = "01" ,
887887 ),
888888 Ubicacion (
889- tipo_ubicacion_id = "Destino" ,
889+ tipo_ubicacion = "Destino" ,
890890 id_ubicacion = "DE202023" ,
891891 rfc_remitente_destinatario = "EKU9003173C9" ,
892892 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -897,7 +897,7 @@ def create_factura_ferroviario_extranjero():
897897 tipo_estacion_id = "01" ,
898898 ),
899899 Ubicacion (
900- tipo_ubicacion_id = "Destino" ,
900+ tipo_ubicacion = "Destino" ,
901901 id_ubicacion = "DE202024" ,
902902 rfc_remitente_destinatario = "EKU9003173C9" ,
903903 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -908,7 +908,7 @@ def create_factura_ferroviario_extranjero():
908908 tipo_estacion_id = "01" ,
909909 ),
910910 Ubicacion (
911- tipo_ubicacion_id = "Destino" ,
911+ tipo_ubicacion = "Destino" ,
912912 id_ubicacion = "DE202025" ,
913913 rfc_remitente_destinatario = "XEXX010101000" ,
914914 nombre_remitente_destinatario = "DESTINATARIO EXTRANJERO" ,
@@ -1006,7 +1006,7 @@ def create_factura_ferroviario_internacional_aduanero():
10061006 regimen_aduaneros = [RegimenAduanero (regimen_aduanero_id = "IMD" )],
10071007 ubicaciones = [
10081008 Ubicacion (
1009- tipo_ubicacion_id = "Origen" ,
1009+ tipo_ubicacion = "Origen" ,
10101010 id_ubicacion = "OR101010" ,
10111011 rfc_remitente_destinatario = "EKU9003173C9" ,
10121012 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -1025,7 +1025,7 @@ def create_factura_ferroviario_internacional_aduanero():
10251025 ),
10261026 ),
10271027 Ubicacion (
1028- tipo_ubicacion_id = "Destino" ,
1028+ tipo_ubicacion = "Destino" ,
10291029 id_ubicacion = "DE202021" ,
10301030 rfc_remitente_destinatario = "EKU9003173C9" ,
10311031 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -1036,7 +1036,7 @@ def create_factura_ferroviario_internacional_aduanero():
10361036 tipo_estacion_id = "01" ,
10371037 ),
10381038 Ubicacion (
1039- tipo_ubicacion_id = "Destino" ,
1039+ tipo_ubicacion = "Destino" ,
10401040 id_ubicacion = "DE202022" ,
10411041 rfc_remitente_destinatario = "EKU9003173C9" ,
10421042 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -1047,7 +1047,7 @@ def create_factura_ferroviario_internacional_aduanero():
10471047 tipo_estacion_id = "01" ,
10481048 ),
10491049 Ubicacion (
1050- tipo_ubicacion_id = "Destino" ,
1050+ tipo_ubicacion = "Destino" ,
10511051 id_ubicacion = "DE202023" ,
10521052 rfc_remitente_destinatario = "EKU9003173C9" ,
10531053 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -1058,7 +1058,7 @@ def create_factura_ferroviario_internacional_aduanero():
10581058 tipo_estacion_id = "01" ,
10591059 ),
10601060 Ubicacion (
1061- tipo_ubicacion_id = "Destino" ,
1061+ tipo_ubicacion = "Destino" ,
10621062 id_ubicacion = "DE202024" ,
10631063 rfc_remitente_destinatario = "EKU9003173C9" ,
10641064 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -1069,7 +1069,7 @@ def create_factura_ferroviario_internacional_aduanero():
10691069 tipo_estacion_id = "01" ,
10701070 ),
10711071 Ubicacion (
1072- tipo_ubicacion_id = "Destino" ,
1072+ tipo_ubicacion = "Destino" ,
10731073 id_ubicacion = "DE202025" ,
10741074 rfc_remitente_destinatario = "EKU9003173C9" ,
10751075 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -1100,8 +1100,8 @@ def create_factura_ferroviario_internacional_aduanero():
11001100 ],
11011101 documentacion_aduanera = [
11021102 DocumentoAduanero (
1103- tipo_doc_aduanero_id = "01" ,
1104- num_pedimento_aduanero = "23 43 0472 8000448" ,
1103+ tipo_documento_id = "01" ,
1104+ num_pedimento = "23 43 0472 8000448" ,
11051105 rfc_impo = "EKU9003173C9" ,
11061106 )
11071107 ],
@@ -1170,7 +1170,7 @@ def create_factura_aereo_nacional():
11701170 unidad_peso_id = "XBX" ,
11711171 ubicaciones = [
11721172 Ubicacion (
1173- tipo_ubicacion_id = "Origen" ,
1173+ tipo_ubicacion = "Origen" ,
11741174 id_ubicacion = "OR101010" ,
11751175 rfc_remitente_destinatario = "EKU9003173C9" ,
11761176 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
@@ -1180,7 +1180,7 @@ def create_factura_aereo_nacional():
11801180 tipo_estacion_id = "02" ,
11811181 ),
11821182 Ubicacion (
1183- tipo_ubicacion_id = "Destino" ,
1183+ tipo_ubicacion = "Destino" ,
11841184 id_ubicacion = "DE202025" ,
11851185 rfc_remitente_destinatario = "EKU9003173C9" ,
11861186 nombre_remitente_destinatario = "ESCUELA KEMPER URGATE" ,
0 commit comments