Python interaction with the CoinsBill API.
Project description
CoinsBill Python bindings
=========================
This is a python library for interacting with the
CoinsBill API, at `CoinsBill
<https://www.coinsbill.com/developers>`_.
Example Usage
-------------
simple usage::
from coinsbill import CoinsBill
access_token = 'a9esthaVUjOuvzTCSTXsJUCK0lCMCk'
api = CoinsBill(access_token)
# Create New Invoice
response = api.invoice.create(
email="bill@dow.com",
currency="USD",
country="US",
billing_first_name="Sam",
items=[{
"name": "fruits",
"quantity": 10,
"unit_price": 2
},
{
"name": "coffee",
"quantity": "4",
"unit_price": 3
}]
)
assert response.status_code == 201 # Successfull Create Invoice
response.json() # Load the body's JSON data.
# Get all Invoices
response = api.invoice.get()
assert response.status_code == 200 # Make sure we got back a successful response.
# Get Invoice by ID
response = api.invoice.get('8G98A')
assert response.status_code == 200 # Make sure we got back a successful response.
Installation
--------
This package is called coinsbill ``coinsbill`` on PyPI. Install using::
$ pip install --upgrade coinsbill
=========================
This is a python library for interacting with the
CoinsBill API, at `CoinsBill
<https://www.coinsbill.com/developers>`_.
Example Usage
-------------
simple usage::
from coinsbill import CoinsBill
access_token = 'a9esthaVUjOuvzTCSTXsJUCK0lCMCk'
api = CoinsBill(access_token)
# Create New Invoice
response = api.invoice.create(
email="bill@dow.com",
currency="USD",
country="US",
billing_first_name="Sam",
items=[{
"name": "fruits",
"quantity": 10,
"unit_price": 2
},
{
"name": "coffee",
"quantity": "4",
"unit_price": 3
}]
)
assert response.status_code == 201 # Successfull Create Invoice
response.json() # Load the body's JSON data.
# Get all Invoices
response = api.invoice.get()
assert response.status_code == 200 # Make sure we got back a successful response.
# Get Invoice by ID
response = api.invoice.get('8G98A')
assert response.status_code == 200 # Make sure we got back a successful response.
Installation
--------
This package is called coinsbill ``coinsbill`` on PyPI. Install using::
$ pip install --upgrade coinsbill
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
coinsbill-1.0.3.tar.gz
(3.8 kB
view hashes)