Pre-release
This release is a pre-release and may not be stable for production use.
Cuenca – Python client library
Transfers
Create transfer
import cuenca
cuenca.configure(sandbox=True) # if using sandbox
transfer = cuenca.Transfer.create(
recipient_name='Benito Juárez',
account_number='646180157042875763',
amount=12345, # Mx$123.45
descriptor='sending money', # As it'll appear for the customer
idempotency_key='unique string',
)
# To get updated status (estado)
transfer.refresh()
Retrieve by id
import cuenca
transfer = cuenca.Transfer.retrieve('tr_123')
Query by idempotency_key, account_number and status
Results are always returned in descending order of created_at
The methods that can be used:
one()- returns a single result. RaisesNoResultFoundif there are no results andMultipleResultsFoundif there are more than onefirst()- returns the first result orNoneif there aren't anyall()- returns a generator of all matching results. Pagination is handled automatically as you iterate over the responsecount()- returns an integer with the count of the matching results
import cuenca
from cuenca.types import Status
# find the unique transfer using the idempotency key
transfer = cuenca.Transfer.one(idempotency_key='unique string')
# returns a generator of all succeeded transfers to the specific account
transfers = cuenca.Transfer.all(
account_number='646180157000000004',
status=Status.succeeded
)
# the total number of succeeded transfers
count = cuenca.Transfer.count(status=Status.succeeded)
Api Keys
Roll the ApiKey
import cuenca
# create new key and deactive old key in 60 mins
old_key, new_key = cuenca.ApiKey.roll(60)
Release files for cuenca 0.0.1.dev0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cuenca-0.0.1.dev0.tar.gz | 8.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cuenca-0.0.1.dev0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.1 kB
Release files / cuenca-0.0.1.dev0.tar.gz
| Download URL | cuenca-0.0.1.dev0.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
85e4f39944729cdaf500639b2c9b3aff10adb90621b2ad2246208400c1cae709
|
|
BLAKE2b-256 checksum How to use checksums |
0d59b5a116a25f538a87e0247767acdb17952cd39bb6eb76156e2ffeaff76d85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.7
|
Release files / cuenca-0.0.1.dev0-py3-none-any.whl
| Download URL | cuenca-0.0.1.dev0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
871b9e0b6f22544834b58e00173359bf4f45be8fd1741478cdf0ce0b5987b11f
|
|
BLAKE2b-256 checksum How to use checksums |
0ef28c90fb18b898b07c62e6aa584a553e2b54527291cf40bbca28446ad2844f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.7
|