arcus-1.2.9
توضیحات
Arcus API Client
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | arcus-1.2.9 |
| نام | arcus |
| نسخه کتابخانه | 1.2.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Cuenca |
| ایمیل نویسنده | dev@cuenca.com |
| آدرس صفحه اصلی | https://github.com/cuenca-mx/arcus-python |
| آدرس اینترنتی | https://pypi.org/project/arcus/ |
| مجوز | - |
# arcus-python
[](https://github.com/cuenca-mx/arcus-python/actions?query=workflow%3Atest)
[](https://codecov.io/gh/cuenca-mx/arcus-python)
[](https://pypi.org/project/arcus/)
[](https://pepy.tech/project/arcus)
Arcus python3.6+ client library for API version 3.1 of [Arcus](https://www.arcusfi.com/).
## Install
```bash
$ pip install arcus
```
## Testing
```bash
$ make test
```
## Authentication and account info
Current version support direct endpoint calls.
```python
from arcus.client import Client
# Create an Arcus client instance
client = Client('your-api-key', 'your-secret-key')
# Get account info
account_info = client.get('/account')
# create bill
account_info = dict(biller_id=40, account_number='501000000007')
bill = client.post('/bills', account_info)
```
## Pay bills
```python
from arcus import Client
client = Client('your-api-key', 'your-secret-key')
# create bill
bill = client.bills.create(40, '501000000007')
# pay bill
transaction = bill.pay()
# refresh transaction
transaction.refresh()
# cancel transaction
cancellation = transaction.cancel()
assert cancellation['code'] == 'R0'
assert cancellation['message'] == 'Transaction successful'
assert transaction.status == 'refunded'
```
## Top-up
```python
from arcus import Client
client = Client('your-api-key', 'your-secret-key')
biller_id = 808080
phone_number = '5599992222'
amount = 100.0
# by default, currency is MXN
topup = client.topups.create(biller_id, phone_number, amount)
assert topup.bill_amount == 100.0
```
## Billers list
You can list all active billers or filter in a specific field
```python
from arcus.client import Client
# Create an Arcus client instance
client = Client('your-api-key', 'your-secret-key')
# Get all billers in Mexico which use MXN as currency
mx_biller_list = client.biller.list(country='MX', currency='MXN')
# Get all billers with an specific biller_type
electricity_biller_list = client.biller.list(biller_type='Electricity')
نیازمندی
| مقدار | نام |
|---|---|
| <2.28,>=2.21 | requests |
| <2021.4,>=2020.1 | pytz |
| <1.1,>=0.1 | iso8601 |
| <5.2,>=4.7 | pydash |
| >=0.6 | dataclasses |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl arcus-1.2.9:
pip install arcus-1.2.9.whl
نصب پکیج tar.gz arcus-1.2.9:
pip install arcus-1.2.9.tar.gz