Python API client for the Alma Installments API
Project description
alma-python-client
Python API Client for the Alma API
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 {p.installments_count)} 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.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.0.1.tar.gz
(10.8 kB
view hashes)
Built Distribution
Close
Hashes for alma_client-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1854b0d2183d3ece835f767323148ec78e94ef99f25e748c8821201d163ba7b3 |
|
MD5 | 94d77234639af511b82b55d88211117b |
|
BLAKE2b-256 | b02a2864d9b2e543fae5ec988a8889000ba5b491dc7111091902621529b2440d |