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 |
InlineResponse20012 charge_invoice(invoice_id)
Charge Invoice
Attempts to charge a card that is on file for the invoice amount
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::InvoicesApi.new
invoice_id = 'invoice_id_example' # String | The id of the invoice
begin
#Charge Invoice
result = api_instance.charge_invoice(invoice_id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling InvoicesApi->charge_invoice: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | String | The id of the invoice |
- Content-Type: Not defined
- Accept: application/json
String download_invoice(invoice_id)
Download Invoice
Returns the pdf blob for the invoice
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::InvoicesApi.new
invoice_id = 'invoice_id_example' # String | The id of the invoice
begin
#Download Invoice
result = api_instance.download_invoice(invoice_id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling InvoicesApi->download_invoice: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | String | The id of the invoice |
String
- Content-Type: Not defined
- Accept: application/pdf
InlineResponse2004 get_invoices_for_customer(customer_id)
List Customer Invoices
List Customer Invoices
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::InvoicesApi.new
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
begin
#List Customer Invoices
result = api_instance.get_invoices_for_customer(customer_id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling InvoicesApi->get_invoices_for_customer: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
customer_id | String | The id of the customer to retrieve |
- Content-Type: Not defined
- Accept: application/json