Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blueromans/xoxoday
XoxoDay Api Client Python PyPackage
https://github.com/blueromans/xoxoday
api-client api-rest json-api payment-gateway python python3 redeem requests xoxoday
Last synced: 2 months ago
JSON representation
XoxoDay Api Client Python PyPackage
- Host: GitHub
- URL: https://github.com/blueromans/xoxoday
- Owner: blueromans
- License: mit
- Created: 2023-06-15T18:04:34.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-07-28T07:52:45.000Z (over 1 year ago)
- Last Synced: 2024-10-05T06:48:39.892Z (4 months ago)
- Topics: api-client, api-rest, json-api, payment-gateway, python, python3, redeem, requests, xoxoday
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![PyPI version](https://img.shields.io/pypi/v/XoxoDay.svg)](https://pypi.python.org/pypi/XoxoDay)
# XoxoDay Api Client Python PyPackage
XoxoDay Api Client is a Python library to access services quickly.
## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install foobar.
```bash
pip install XoxoDay
```
## Environment Variables```bash
XOXODAY_ENV = 'dev|prod'
XOXODAY_ACCESS_TOKEN = 'access_token'
XOXODAY_REFRESH_TOKEN = 'refresh_token'
XOXODAY_CLIENT_ID = 'client_id'
XOXODAY_CLIENT_SECRET = 'client_secret'
```
### Note
If you don't want to set this variables from global environment you can pass them to class.
You can see usage below
## Usage```python
from XoxoDay import XoxoDayServicekwargs = {
# you can also set XoxoDay environment from environment.
'environment': 'dev|prod', # Default value : dev
'access_token': 'XoxoDay Access Token', # Default value : None
'refresh_token': 'XoxoDay Refresh Token', # Default value : None
'client_id': 'XoxoDay Client Id', # Default value : None
'client_secret': 'XoxoDay Client Secret', # Default value : None
}
# Initialize client with
XoxoDay_service = XoxoDayService()
# or XoxoDay_service = XoxoDayService(**kwargs)# Get Vouchers
#filters = [{"key": "productName", "value": "Paypal International"}]
#includeProducts= "productId"
funding_source = XoxoDay_service.getVouchers(filters=None, includeProducts=None)# Place Order
order = XoxoDay_service.placeOrder(email="[email protected]", productId='productId', denomination='amount', poNumber="Unique Number for Order")```
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
## License
[MIT](https://choosealicense.com/licenses/mit/)