Python API client for the Alma Installments API
Project description
alma-python-client
Python API Client for the Alma API
Install
pip install alma-client
Demo
from alma import Client
alma_client = Client(api_key="sk_test..")
payments = alma_client.payments.fetch_all()
for p in payments:
print(f"{p.id}: Paiement en {len(p.payment_plan)} fois")
payment_data = {
"purchase_amount": 10000,
"return_url": "http://merchant.com/payment-success",
"shipping_address": {
"first_name": "Martin",
"last_name": "Dupond",
"line1": "1 rue de Rivoli",
"postal_code": "75004",
"city": "Paris"
}
}
eligibility = alma_client.payments.eligibility(payment_data)
if eligibility.eligible:
alma_client.payments.create(payment_data)
Changelog
1.1.0 (2020-03-25)
- Add support for Python 3.5+
1.0.1 (2020-03-24)
- Automatically detects the API mode from the api_key.
1.0.0 (2020-03-24)
- Create a Python client for Alma
- Handle Order entity for Payment
- Handle the refund endpoint
- Handle pagination for orders
- Handle the send-sms API for payments.
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
alma-client-1.1.0.tar.gz
(11.8 kB
view details)
Built Distribution
File details
Details for the file alma-client-1.1.0.tar.gz
.
File metadata
- Download URL: alma-client-1.1.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d12f07f6b9d46df1a135957d3689b75571734579b3ce446978a56754a4b50330 |
|
MD5 | effc4686862e3515e2bb703e3b284709 |
|
BLAKE2b-256 | 89a16c17973167daed95b16f4d7cecfc200364b3993969a69657e943fe2e5dfa |
File details
Details for the file alma_client-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: alma_client-1.1.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d76c6a2fd55bb86b96f0f03b7637adec38c365a0beb9396eb58fecd45eaeee1 |
|
MD5 | 735bb93dfbaf701a1ed0bbcffa337d14 |
|
BLAKE2b-256 | f42ec74aebb5ad63827dbef7215ee19d23f51dbec40174601e707599115cbd88 |