{ "info": { "author": "Palo Sopko", "author_email": "pavol@sopko.sk", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Cardberg Bindings for Python\n\nPython library for [Cardberg](https://www.cardberg.com)'s API to work with gift cards.\n\nThe bindings currently allow you to:\n\n1. Get information on a specific card\n2. Create a transaction on a specific card\n\nDetailed information of Cardberg's API can be found at [their website](http://loyal.cardberg.com/api/). If you feel like you need covering additional API methods, please open an issue or create a pull request.\n\n## Setup\n\nYou can install this package by using `pip`:\n\n\tpip install cardberg\n\nIf you fancy `pipenv` use:\n\n\tpipenv install cardberg\n\nTo install from source, run:\n\n\tpython setup.py install\n\nFor the API client to work you would need Python 2.7+ or Python 3.4+.\n\nTo install via `requirements` file from your project, add the following for the moment before updating dependencies:\n\n\tgit+git://github.com/palosopko/cardberg-python.git#egg=cardberg\n\n## Usage\n\nFirst off, you need to require the library and set the authentication information by providing your user handle and shared secret you got from the provider.\n\n\timport cardberg\n\tcardberg.api_credentials = (\"partner_id\", \"shared_secret\")\n\n**Getting card information** is accomplished by calling `cardberg.Card.get()`. The method returns a `Card` object that includes `id`, `name`, `surname`, `status` and available `credits` and `points`. On this `Card` object we may **create a transaction** (whether positive or negative) by calling `create_transaction()` method with transaction type, decimal value of the transaction and optional bill ID for further reference.\n\nPossible transaction types are either \"credits\" or \"points\" depending on what budget do we use. If you want to make a debit (for example your user is buying something) then provide a negative value.\n\nExample:\n\n import cardberg\n from decimal import Decimal\n\n cardberg.api_credentials = (\"partner_id\", \"shared_secret\")\n\n card = cardberg.Card.get(\"D1nd17h\")\n\n card.create_transaction(\n cardberg.Card.TRANSACTION_CREDITS,\n Decimal(\"-1.00\")\n )\n\n## Contributing\n\n1. Check for open issues or open a new issue for a feature request or a bug.\n2. Fork the repository and make your changes to the master branch (or branch off of it).\n3. Send a pull request.\n\n## Development\n\nRun all tests on all supported Python versions:\n\n\tmake test\n\nRun the linter with:\n\n\tmake lint\n\nThe client library uses Black for code formatting. Code must be formatted with Black before PRs are submitted. Run the formatter with:\n\n\tmake fmt\n\n## Changelog\n\n### v0.2.0: 03/10/2019\n\nPython 3 compatibility, code formatting covered by Black and various small fixes and formal changes to make everything better.\n\n### v0.1.1: 21/03/2016\n\nAdded rounding to two decimal places on credits and points returned from Cardberg's API.\n\n### v0.1.0: 14/03/2016\n\nInitial version with support for `card_info` and `create_transaction` API methods.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "cardberg", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "cardberg", "package_url": "https://pypi.org/project/cardberg/", "platform": "", "project_url": "https://pypi.org/project/cardberg/", "project_urls": { "Bug Tracker": "https://github.com/palosopko/cardberg-python/issues", "Source Code": "https://github.com/palosopko/cardberg-python" }, "release_url": "https://pypi.org/project/cardberg/0.2.0/", "requires_dist": null, "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "summary": "Cardberg Service Bindings for Python", "version": "0.2.0" }, "last_serial": 5924035, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "95c62a301cee0894a29f7d24074fdf45", "sha256": "ba3bb2fe3f301ace757783467d86f366f57d54fd33c930e0702e0bc88cdcecdc" }, "downloads": -1, "filename": "cardberg-0.2.0-py2.7.egg", "has_sig": false, "md5_digest": "95c62a301cee0894a29f7d24074fdf45", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 9669, "upload_time": "2019-10-03T11:15:34", "url": "https://files.pythonhosted.org/packages/5a/37/5786e5cb06ad72a6f0136f32d3a7cfd6b6a0ef10d9ccc1be2966d296e551/cardberg-0.2.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "816d078ae3f5856d9b26de83b5d83f56", "sha256": "8bdf58933183aa7aa8481f60018d88130b4b6031d66e55ac9a65b1e9006bbb00" }, "downloads": -1, "filename": "cardberg-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "816d078ae3f5856d9b26de83b5d83f56", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 6035, "upload_time": "2019-10-03T15:30:11", "url": "https://files.pythonhosted.org/packages/f9/69/713f1bcca7b687c2c1fb7578d332b382cced290b9a91ddc6ce8f17327567/cardberg-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b8f8b0e874a996239a7b35a2d6545054", "sha256": "53309ca93971a669e9a7976aef763ba9469c14d14fa505e98805cf29d385f6fd" }, "downloads": -1, "filename": "cardberg-0.2.0-py3.7.egg", "has_sig": false, "md5_digest": "b8f8b0e874a996239a7b35a2d6545054", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 9878, "upload_time": "2019-10-03T11:15:37", "url": "https://files.pythonhosted.org/packages/5f/95/21a4baab96ba9eca932e859ab238cd77adfbb99a45c89f46d0bd1a9c8656/cardberg-0.2.0-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "338a9cc35044537abc4ec4bd6a6130ec", "sha256": "122d3aabc1236feff12f8d6516b7b020cfe6c3cdae5ac397d52f2a4a8ce5869e" }, "downloads": -1, "filename": "cardberg-0.2.0.tar.gz", "has_sig": false, "md5_digest": "338a9cc35044537abc4ec4bd6a6130ec", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 6295, "upload_time": "2019-10-03T15:30:12", "url": "https://files.pythonhosted.org/packages/d9/4a/67bc96a7f399155ccd52bca21a19b8506a9769af7f6a637db0eb052af803/cardberg-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "95c62a301cee0894a29f7d24074fdf45", "sha256": "ba3bb2fe3f301ace757783467d86f366f57d54fd33c930e0702e0bc88cdcecdc" }, "downloads": -1, "filename": "cardberg-0.2.0-py2.7.egg", "has_sig": false, "md5_digest": "95c62a301cee0894a29f7d24074fdf45", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 9669, "upload_time": "2019-10-03T11:15:34", "url": "https://files.pythonhosted.org/packages/5a/37/5786e5cb06ad72a6f0136f32d3a7cfd6b6a0ef10d9ccc1be2966d296e551/cardberg-0.2.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "816d078ae3f5856d9b26de83b5d83f56", "sha256": "8bdf58933183aa7aa8481f60018d88130b4b6031d66e55ac9a65b1e9006bbb00" }, "downloads": -1, "filename": "cardberg-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "816d078ae3f5856d9b26de83b5d83f56", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 6035, "upload_time": "2019-10-03T15:30:11", "url": "https://files.pythonhosted.org/packages/f9/69/713f1bcca7b687c2c1fb7578d332b382cced290b9a91ddc6ce8f17327567/cardberg-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b8f8b0e874a996239a7b35a2d6545054", "sha256": "53309ca93971a669e9a7976aef763ba9469c14d14fa505e98805cf29d385f6fd" }, "downloads": -1, "filename": "cardberg-0.2.0-py3.7.egg", "has_sig": false, "md5_digest": "b8f8b0e874a996239a7b35a2d6545054", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 9878, "upload_time": "2019-10-03T11:15:37", "url": "https://files.pythonhosted.org/packages/5f/95/21a4baab96ba9eca932e859ab238cd77adfbb99a45c89f46d0bd1a9c8656/cardberg-0.2.0-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "338a9cc35044537abc4ec4bd6a6130ec", "sha256": "122d3aabc1236feff12f8d6516b7b020cfe6c3cdae5ac397d52f2a4a8ce5869e" }, "downloads": -1, "filename": "cardberg-0.2.0.tar.gz", "has_sig": false, "md5_digest": "338a9cc35044537abc4ec4bd6a6130ec", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 6295, "upload_time": "2019-10-03T15:30:12", "url": "https://files.pythonhosted.org/packages/d9/4a/67bc96a7f399155ccd52bca21a19b8506a9769af7f6a637db0eb052af803/cardberg-0.2.0.tar.gz" } ] }