Client library for stpmex.com
Project description
STP python3.6+ client library
Cliente para el servicio REST de STP
Requerimientos
Python v3.6 o superior.
Documentación de API
Instalación
pip install stpmex
Correr pruebas
make venv
source venv/bin/activate
make test
Uso básico
from stpmex import Client
client = Client(
empresa='TU_EMPRESA',
priv_key='PKEY_CONTENIDO',
priv_key_passphrase='supersecret',
)
cuenta = client.cuentas.alta(
nombre='Eduardo',
apellidoPaterno='Salvador',
apellidoMaterno='Hernández',
rfcCurp='SAHE800416HDFABC01',
cuenta='646180110400000007',
)
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=datetime.date(2020, 4, 20)
)
# Orden - consulta por clave rastreo
orden = client.ordenes.consulta_clave_rastreo(
claveRastreo='CR1234567890',
institucionOperante=90646,
fechaOperacion=datetime.date(2020, 4, 20)
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
stpmex-3.7.1.tar.gz
(19.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
stpmex-3.7.1-py3-none-any.whl
(24.5 kB
view details)
File details
Details for the file stpmex-3.7.1.tar.gz.
File metadata
- Download URL: stpmex-3.7.1.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9a07d1a8a4cce6e6182eb6b42488a9aa09118ccca20f79bd4a1b21b8a722d6f
|
|
| MD5 |
584b230e3312af09cf62d8528aa5fe57
|
|
| BLAKE2b-256 |
8715b080027f4fc028abdba77d72d884655ee68204afbcbd1e050155d8d87fa2
|
File details
Details for the file stpmex-3.7.1-py3-none-any.whl.
File metadata
- Download URL: stpmex-3.7.1-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b001c43f3971164ff94a84f3460e4e53655d7dd8d6544108eef9fd3195def36
|
|
| MD5 |
38a57aabe67df23c31e33da33f7d0a6e
|
|
| BLAKE2b-256 |
ac3390a58e76e17f3fdf0a02ef1de250f54fb22f737846f3083bd4b1f17bed84
|