%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
[![test](https://github.com/cuenca-mx/arcus-python/workflows/test/badge.svg)](https://github.com/cuenca-mx/arcus-python/actions?query=workflow%3Atest)
[![codecov](https://codecov.io/gh/cuenca-mx/arcus-python/branch/master/graph/badge.svg)](https://codecov.io/gh/cuenca-mx/arcus-python)
[![PyPI](https://img.shields.io/pypi/v/arcus.svg)](https://pypi.org/project/arcus/)
[![Downloads](https://pepy.tech/badge/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
[![test](https://github.com/cuenca-mx/arcus-python/workflows/test/badge.svg)](https://github.com/cuenca-mx/arcus-python/actions?query=workflow%3Atest)
[![codecov](https://codecov.io/gh/cuenca-mx/arcus-python/branch/master/graph/badge.svg)](https://codecov.io/gh/cuenca-mx/arcus-python)
[![PyPI](https://img.shields.io/pypi/v/arcus.svg)](https://pypi.org/project/arcus/)
[![Downloads](https://pepy.tech/badge/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
[![test](https://github.com/cuenca-mx/arcus-python/workflows/test/badge.svg)](https://github.com/cuenca-mx/arcus-python/actions?query=workflow%3Atest)
[![codecov](https://codecov.io/gh/cuenca-mx/arcus-python/branch/master/graph/badge.svg)](https://codecov.io/gh/cuenca-mx/arcus-python)
[![PyPI](https://img.shields.io/pypi/v/arcus.svg)](https://pypi.org/project/arcus/)
[![Downloads](https://pepy.tech/badge/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