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 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)
)
cuenta.baja()
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.4.1.dev0.tar.gz
(11.0 kB
view hashes)
Built Distribution
Close
Hashes for stpmex-3.4.1.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55bf5390056f57246e27cee970fb920c5f221371fd502da75ff0ba047d11b989 |
|
MD5 | e680e65306949e7667735da797f221bb |
|
BLAKE2b-256 | 6b3b3218b13c8f58d5523d00475389386a4c9470415ea281467375c5e476742d |