Skip to main content

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
--------


::


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 on PyPI. Install using::

$ pip install --upgrade coinsbill

Project details


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.2.tar.gz (3.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page