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.with_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.2.0 (2020-09-01)
- Add support for different authentication methods
- Add Black & isort checks on pull requests
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.2.0.tar.gz
(13.2 kB
view hashes)
Built Distribution
Close
Hashes for alma_client-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f91b160edc3a6c127250205051fe2ec988f659913ee9b455affd4d256fe4a5c |
|
MD5 | 0259839040f84dc613d50ed0102d7535 |
|
BLAKE2b-256 | 60b3f8c726eb12dba8b884c3e494bf5d8fcf8e7d0603711a69722fcf91d9c651 |