All URIs are relative to https://{customerId}.billabear.cloud/api/v1
Method | HTTP request | Description |
---|---|---|
chargeInvoice | POST /invoice/{invoiceId}/charge | Charge Invoice |
downloadInvoice | GET /invoice/{invoiceId}/download | Download Invoice |
getInvoicesForCustomer | GET /customer/{customerId}/invoices | List Customer Invoices |
InlineResponse20014 chargeInvoice(invoiceId)
Charge Invoice
Attempts to charge a card that is on file for the invoice amount
// Import classes:
//import com.billabear.sdk.invoker.ApiClient;
//import com.billabear.sdk.invoker.ApiException;
//import com.billabear.sdk.invoker.Configuration;
//import com.billabear.sdk.invoker.auth.*;
//import com.billabear.sdk.api.InvoicesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
InvoicesApi apiInstance = new InvoicesApi();
String invoiceId = "invoiceId_example"; // String | The id of the invoice
try {
InlineResponse20014 result = apiInstance.chargeInvoice(invoiceId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InvoicesApi#chargeInvoice");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
invoiceId | String | The id of the invoice |
- Content-Type: Not defined
- Accept: application/json
File downloadInvoice(invoiceId)
Download Invoice
Returns the pdf blob for the invoice
// Import classes:
//import com.billabear.sdk.invoker.ApiClient;
//import com.billabear.sdk.invoker.ApiException;
//import com.billabear.sdk.invoker.Configuration;
//import com.billabear.sdk.invoker.auth.*;
//import com.billabear.sdk.api.InvoicesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
InvoicesApi apiInstance = new InvoicesApi();
String invoiceId = "invoiceId_example"; // String | The id of the invoice
try {
File result = apiInstance.downloadInvoice(invoiceId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InvoicesApi#downloadInvoice");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
invoiceId | String | The id of the invoice |
- Content-Type: Not defined
- Accept: application/pdf
InlineResponse2006 getInvoicesForCustomer(customerId)
List Customer Invoices
List Customer Invoices
// Import classes:
//import com.billabear.sdk.invoker.ApiClient;
//import com.billabear.sdk.invoker.ApiException;
//import com.billabear.sdk.invoker.Configuration;
//import com.billabear.sdk.invoker.auth.*;
//import com.billabear.sdk.api.InvoicesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
InvoicesApi apiInstance = new InvoicesApi();
String customerId = "customerId_example"; // String | The id of the customer to retrieve
try {
InlineResponse2006 result = apiInstance.getInvoicesForCustomer(customerId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InvoicesApi#getInvoicesForCustomer");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
customerId | String | The id of the customer to retrieve |
- Content-Type: Not defined
- Accept: application/json