summaryrefslogtreecommitdiff
path: root/python-stpmex.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-15 06:36:54 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-15 06:36:54 +0000
commit5669e1cf0f64ef12929a53c8f5b4adb81886e7d8 (patch)
treea6fe2293b99268650bf76e1f2009bf53cd749f77 /python-stpmex.spec
parent1afc65ccd33787495f2381f348b7c2ac976cdc16 (diff)
automatic import of python-stpmex
Diffstat (limited to 'python-stpmex.spec')
-rw-r--r--python-stpmex.spec391
1 files changed, 391 insertions, 0 deletions
diff --git a/python-stpmex.spec b/python-stpmex.spec
new file mode 100644
index 0000000..08fa210
--- /dev/null
+++ b/python-stpmex.spec
@@ -0,0 +1,391 @@
+%global _empty_manifest_terminate_build 0
+Name: python-stpmex
+Version: 3.11.2
+Release: 1
+Summary: Client library for stpmex.com
+License: MIT License
+URL: https://github.com/cuenca-mx/stpmex-python
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/0d/3f/86ec30dd26c1f4c84f2c031aae19a557ebe014629539ff542784c0165366/stpmex-3.11.2.tar.gz
+BuildArch: noarch
+
+Requires: python3-cryptography
+Requires: python3-cuenca-validations
+Requires: python3-requests
+Requires: python3-workalendar
+
+%description
+# STP python3.6+ client library
+
+
+[![test](https://github.com/cuenca-mx/stpmex-python/workflows/test/badge.svg)](https://github.com/cuenca-mx/stpmex-python/actions?query=workflow%3Atest)
+[![codecov](https://codecov.io/gh/cuenca-mx/stpmex-python/branch/main/graph/badge.svg)](https://codecov.io/gh/cuenca-mx/stpmex-python)
+[![PyPI](https://img.shields.io/pypi/v/stpmex.svg)](https://pypi.org/project/stpmex/)
+[![Downloads](https://pepy.tech/badge/stpmex)](https://pepy.tech/project/stpmex)
+
+Cliente para el servicio REST de STP
+
+
+## Requerimientos
+
+Python v3.6 o superior.
+
+## Documentación de API
+
+[General](https://stpmex.zendesk.com/hc/es) y
+[WADL](https://demo.stpmex.com:7024/speiws/rest/application.wadl?metadata=true&detail=true)
+
+## Instalación
+
+```
+pip install stpmex
+```
+
+## Correr pruebas
+
+```
+make venv
+source venv/bin/activate
+make test
+```
+
+## Uso básico
+
+```python
+import datetime as dt
+
+from stpmex import Client
+from stpmex.types import Pais
+
+client = Client(
+ empresa='TU_EMPRESA',
+ priv_key='PKEY_CONTENIDO',
+ priv_key_passphrase='supersecret',
+)
+
+cuenta_persona_fisica = client.cuentas.alta(
+ nombre='Eduardo',
+ apellidoPaterno='Salvador',
+ apellidoMaterno='Hernández',
+ rfcCurp='SAHE800416HDFABC01',
+ cuenta='646180110400000007',
+ paisNacimiento=Pais.MX,
+ fechaNacimiento=dt.date(1980, 4, 14),
+)
+
+
+cuenta_persona_moral = client.cuentas_morales.alta(
+ nombre='LA TIENDITA DE LA ESQUINA SA DE CV',
+ cuenta='646180157036325892',
+ pais=Pais.MX,
+ fechaConstitucion=dt.date(2021, 1, 1),
+ rfcCurp='ABC200101AB0',
+)
+
+# Si deseas dar de alta una nueva clabe para la misma
+# razón social, haces el mismo request sustituyendo `cuenta`
+# con la nueva clabe
+cuenta_persona_moral = client.cuentas_morales.alta(
+ nombre='LA TIENDITA DE LA ESQUINA SA DE CV',
+ cuenta='646180157036325832',
+ pais=Pais.MX,
+ fechaConstitucion=dt.date(2021, 1, 1),
+ rfcCurp='ABC200101AB0',
+)
+
+orden = client.ordenes.registra(
+ monto=1.2,
+ cuentaOrdenante=cuenta.cuenta,
+ nombreBeneficiario='Ricardo Sanchez',
+ cuentaBeneficiario='072691004495711499',
+ institucionContraparte='40072',
+ conceptoPago='Prueba',
+)
+
+# Saldo
+saldo = client.saldos.consulta(cuenta='646456789123456789')
+
+# Ordenes - enviadas
+enviadas = client.ordenes.consulta_enviadas() # fecha_operacion es el día de hoy
+
+# Ordenes - recibidas
+recibidas = client.ordenes.consulta_recibidas(
+ fecha_operacion=dt.date(2020, 4, 20)
+)
+
+# Orden - consulta por clave rastreo
+orden = client.ordenes.consulta_clave_rastreo(
+ claveRastreo='CR1234567890',
+ institucionOperante=90646,
+ fechaOperacion=dt.date(2020, 4, 20)
+)
+```
+
+
+%package -n python3-stpmex
+Summary: Client library for stpmex.com
+Provides: python-stpmex
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-stpmex
+# STP python3.6+ client library
+
+
+[![test](https://github.com/cuenca-mx/stpmex-python/workflows/test/badge.svg)](https://github.com/cuenca-mx/stpmex-python/actions?query=workflow%3Atest)
+[![codecov](https://codecov.io/gh/cuenca-mx/stpmex-python/branch/main/graph/badge.svg)](https://codecov.io/gh/cuenca-mx/stpmex-python)
+[![PyPI](https://img.shields.io/pypi/v/stpmex.svg)](https://pypi.org/project/stpmex/)
+[![Downloads](https://pepy.tech/badge/stpmex)](https://pepy.tech/project/stpmex)
+
+Cliente para el servicio REST de STP
+
+
+## Requerimientos
+
+Python v3.6 o superior.
+
+## Documentación de API
+
+[General](https://stpmex.zendesk.com/hc/es) y
+[WADL](https://demo.stpmex.com:7024/speiws/rest/application.wadl?metadata=true&detail=true)
+
+## Instalación
+
+```
+pip install stpmex
+```
+
+## Correr pruebas
+
+```
+make venv
+source venv/bin/activate
+make test
+```
+
+## Uso básico
+
+```python
+import datetime as dt
+
+from stpmex import Client
+from stpmex.types import Pais
+
+client = Client(
+ empresa='TU_EMPRESA',
+ priv_key='PKEY_CONTENIDO',
+ priv_key_passphrase='supersecret',
+)
+
+cuenta_persona_fisica = client.cuentas.alta(
+ nombre='Eduardo',
+ apellidoPaterno='Salvador',
+ apellidoMaterno='Hernández',
+ rfcCurp='SAHE800416HDFABC01',
+ cuenta='646180110400000007',
+ paisNacimiento=Pais.MX,
+ fechaNacimiento=dt.date(1980, 4, 14),
+)
+
+
+cuenta_persona_moral = client.cuentas_morales.alta(
+ nombre='LA TIENDITA DE LA ESQUINA SA DE CV',
+ cuenta='646180157036325892',
+ pais=Pais.MX,
+ fechaConstitucion=dt.date(2021, 1, 1),
+ rfcCurp='ABC200101AB0',
+)
+
+# Si deseas dar de alta una nueva clabe para la misma
+# razón social, haces el mismo request sustituyendo `cuenta`
+# con la nueva clabe
+cuenta_persona_moral = client.cuentas_morales.alta(
+ nombre='LA TIENDITA DE LA ESQUINA SA DE CV',
+ cuenta='646180157036325832',
+ pais=Pais.MX,
+ fechaConstitucion=dt.date(2021, 1, 1),
+ rfcCurp='ABC200101AB0',
+)
+
+orden = client.ordenes.registra(
+ monto=1.2,
+ cuentaOrdenante=cuenta.cuenta,
+ nombreBeneficiario='Ricardo Sanchez',
+ cuentaBeneficiario='072691004495711499',
+ institucionContraparte='40072',
+ conceptoPago='Prueba',
+)
+
+# Saldo
+saldo = client.saldos.consulta(cuenta='646456789123456789')
+
+# Ordenes - enviadas
+enviadas = client.ordenes.consulta_enviadas() # fecha_operacion es el día de hoy
+
+# Ordenes - recibidas
+recibidas = client.ordenes.consulta_recibidas(
+ fecha_operacion=dt.date(2020, 4, 20)
+)
+
+# Orden - consulta por clave rastreo
+orden = client.ordenes.consulta_clave_rastreo(
+ claveRastreo='CR1234567890',
+ institucionOperante=90646,
+ fechaOperacion=dt.date(2020, 4, 20)
+)
+```
+
+
+%package help
+Summary: Development documents and examples for stpmex
+Provides: python3-stpmex-doc
+%description help
+# STP python3.6+ client library
+
+
+[![test](https://github.com/cuenca-mx/stpmex-python/workflows/test/badge.svg)](https://github.com/cuenca-mx/stpmex-python/actions?query=workflow%3Atest)
+[![codecov](https://codecov.io/gh/cuenca-mx/stpmex-python/branch/main/graph/badge.svg)](https://codecov.io/gh/cuenca-mx/stpmex-python)
+[![PyPI](https://img.shields.io/pypi/v/stpmex.svg)](https://pypi.org/project/stpmex/)
+[![Downloads](https://pepy.tech/badge/stpmex)](https://pepy.tech/project/stpmex)
+
+Cliente para el servicio REST de STP
+
+
+## Requerimientos
+
+Python v3.6 o superior.
+
+## Documentación de API
+
+[General](https://stpmex.zendesk.com/hc/es) y
+[WADL](https://demo.stpmex.com:7024/speiws/rest/application.wadl?metadata=true&detail=true)
+
+## Instalación
+
+```
+pip install stpmex
+```
+
+## Correr pruebas
+
+```
+make venv
+source venv/bin/activate
+make test
+```
+
+## Uso básico
+
+```python
+import datetime as dt
+
+from stpmex import Client
+from stpmex.types import Pais
+
+client = Client(
+ empresa='TU_EMPRESA',
+ priv_key='PKEY_CONTENIDO',
+ priv_key_passphrase='supersecret',
+)
+
+cuenta_persona_fisica = client.cuentas.alta(
+ nombre='Eduardo',
+ apellidoPaterno='Salvador',
+ apellidoMaterno='Hernández',
+ rfcCurp='SAHE800416HDFABC01',
+ cuenta='646180110400000007',
+ paisNacimiento=Pais.MX,
+ fechaNacimiento=dt.date(1980, 4, 14),
+)
+
+
+cuenta_persona_moral = client.cuentas_morales.alta(
+ nombre='LA TIENDITA DE LA ESQUINA SA DE CV',
+ cuenta='646180157036325892',
+ pais=Pais.MX,
+ fechaConstitucion=dt.date(2021, 1, 1),
+ rfcCurp='ABC200101AB0',
+)
+
+# Si deseas dar de alta una nueva clabe para la misma
+# razón social, haces el mismo request sustituyendo `cuenta`
+# con la nueva clabe
+cuenta_persona_moral = client.cuentas_morales.alta(
+ nombre='LA TIENDITA DE LA ESQUINA SA DE CV',
+ cuenta='646180157036325832',
+ pais=Pais.MX,
+ fechaConstitucion=dt.date(2021, 1, 1),
+ rfcCurp='ABC200101AB0',
+)
+
+orden = client.ordenes.registra(
+ monto=1.2,
+ cuentaOrdenante=cuenta.cuenta,
+ nombreBeneficiario='Ricardo Sanchez',
+ cuentaBeneficiario='072691004495711499',
+ institucionContraparte='40072',
+ conceptoPago='Prueba',
+)
+
+# Saldo
+saldo = client.saldos.consulta(cuenta='646456789123456789')
+
+# Ordenes - enviadas
+enviadas = client.ordenes.consulta_enviadas() # fecha_operacion es el día de hoy
+
+# Ordenes - recibidas
+recibidas = client.ordenes.consulta_recibidas(
+ fecha_operacion=dt.date(2020, 4, 20)
+)
+
+# Orden - consulta por clave rastreo
+orden = client.ordenes.consulta_clave_rastreo(
+ claveRastreo='CR1234567890',
+ institucionOperante=90646,
+ fechaOperacion=dt.date(2020, 4, 20)
+)
+```
+
+
+%prep
+%autosetup -n stpmex-3.11.2
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-stpmex -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 3.11.2-1
+- Package Spec generated