All URIs are relative to https://{customerId}.billabear.cloud/api/v1
| Method | HTTP request | Description |
|---|---|---|
| charge_invoice | POST /invoice/{invoiceId}/charge | Charge Invoice |
| download_invoice | GET /invoice/{invoiceId}/download | Download Invoice |
| get_invoices_for_customer | GET /customer/{customerId}/invoices | List Customer Invoices |
InlineResponse20014 charge_invoice(invoice_id)
Charge Invoice
Attempts to charge a card that is on file for the invoice amount
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.InvoicesApi(billabear.ApiClient(configuration))
invoice_id = 'invoice_id_example' # str | The id of the invoice
try:
# Charge Invoice
api_response = api_instance.charge_invoice(invoice_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling InvoicesApi->charge_invoice: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| invoice_id | str | The id of the invoice |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str download_invoice(invoice_id)
Download Invoice
Returns the pdf blob for the invoice
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.InvoicesApi(billabear.ApiClient(configuration))
invoice_id = 'invoice_id_example' # str | The id of the invoice
try:
# Download Invoice
api_response = api_instance.download_invoice(invoice_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling InvoicesApi->download_invoice: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| invoice_id | str | The id of the invoice |
str
- Content-Type: Not defined
- Accept: application/pdf
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2006 get_invoices_for_customer(customer_id)
List Customer Invoices
List Customer Invoices
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.InvoicesApi(billabear.ApiClient(configuration))
customer_id = 'customer_id_example' # str | The id of the customer to retrieve
try:
# List Customer Invoices
api_response = api_instance.get_invoices_for_customer(customer_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling InvoicesApi->get_invoices_for_customer: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| customer_id | str | The id of the customer to retrieve |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]