Skip to content

Latest commit

 

History

History
172 lines (121 loc) · 4.99 KB

File metadata and controls

172 lines (121 loc) · 4.99 KB

billabear.InvoicesApi

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

charge_invoice

InlineResponse20014 charge_invoice(invoice_id)

Charge Invoice

Attempts to charge a card that is on file for the invoice amount

Example

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)

Parameters

Name Type Description Notes
invoice_id str The id of the invoice

Return type

InlineResponse20014

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

download_invoice

str download_invoice(invoice_id)

Download Invoice

Returns the pdf blob for the invoice

Example

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)

Parameters

Name Type Description Notes
invoice_id str The id of the invoice

Return type

str

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/pdf

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_invoices_for_customer

InlineResponse2006 get_invoices_for_customer(customer_id)

List Customer Invoices

List Customer Invoices

Example

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)

Parameters

Name Type Description Notes
customer_id str The id of the customer to retrieve

Return type

InlineResponse2006

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]