diff options
author | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2023-03-07 13:23:28 +0000 |
---|---|---|
committer | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2023-03-07 13:23:28 +0000 |
commit | bfb6e02604839d0ab07a1e914242575215715bf9 (patch) | |
tree | 30445a40215c36eff82df20dc98cf5c85d572754 | |
parent | 0910bfcbe914304c77613b6a2b1ae667645a4be2 (diff) |
automatic import of python-arcus
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-arcus.spec | 374 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 376 insertions, 0 deletions
@@ -0,0 +1 @@ +/arcus-1.2.11.tar.gz diff --git a/python-arcus.spec b/python-arcus.spec new file mode 100644 index 0000000..e49fcb5 --- /dev/null +++ b/python-arcus.spec @@ -0,0 +1,374 @@ +%global _empty_manifest_terminate_build 0 +Name: python-arcus +Version: 1.2.11 +Release: 1 +Summary: Arcus API Client +License: MIT License +URL: https://github.com/cuenca-mx/arcus-python +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/8f/63/40e20b8ea06809b8a5f6ebadff0081cd6c7490205d3deecb52c34c34c8d7/arcus-1.2.11.tar.gz +BuildArch: noarch + +Requires: python3-requests +Requires: python3-pytz +Requires: python3-iso8601 +Requires: python3-pydash +Requires: python3-dataclasses + +%description +# 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') + + +%package -n python3-arcus +Summary: Arcus API Client +Provides: python-arcus +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-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') + + +%package help +Summary: Development documents and examples for arcus +Provides: python3-arcus-doc +%description help +# 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') + + +%prep +%autosetup -n arcus-1.2.11 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-arcus -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Mar 07 2023 Python_Bot <Python_Bot@openeuler.org> - 1.2.11-1 +- Package Spec generated @@ -0,0 +1 @@ +f7e10a9754a0de492a567ed8c2202d05 arcus-1.2.11.tar.gz |