All URIs are relative to https://{customerId}.billabear.cloud/api/v1
Method | HTTP request | Description |
---|---|---|
createProduct | POST /product | Create |
listProduct | GET /product | List |
showProductById | GET /product/{productId} | Detail |
updateProduct | PUT /product/{productId} | Update |
createProduct(body)
Create
Create a product
// 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.ProductsApi;
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");
ProductsApi apiInstance = new ProductsApi();
Product body = new Product(); // Product |
try {
apiInstance.createProduct(body);
} catch (ApiException e) {
System.err.println("Exception when calling ProductsApi#createProduct");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | Product |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
InlineResponse20010 listProduct(limit, lastKey, name)
List
List all products
// 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.ProductsApi;
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");
ProductsApi apiInstance = new ProductsApi();
Integer limit = 56; // Integer | How many items to return at one time (max 100)
String lastKey = "lastKey_example"; // String | The key to be used in pagination to say what the last key of the previous page was
String name = "name_example"; // String | The name to search for
try {
InlineResponse20010 result = apiInstance.listProduct(limit, lastKey, name);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProductsApi#listProduct");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
limit | Integer | How many items to return at one time (max 100) | [optional] |
lastKey | String | The key to be used in pagination to say what the last key of the previous page was | [optional] |
name | String | The name to search for | [optional] |
- Content-Type: Not defined
- Accept: application/json
Product showProductById(productId)
Detail
Info for a specific product
// 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.ProductsApi;
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");
ProductsApi apiInstance = new ProductsApi();
String productId = "productId_example"; // String | The id of the product to retrieve
try {
Product result = apiInstance.showProductById(productId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProductsApi#showProductById");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
productId | String | The id of the product to retrieve |
- Content-Type: Not defined
- Accept: application/json
Product updateProduct(productId)
Update
Update a product
// 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.ProductsApi;
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");
ProductsApi apiInstance = new ProductsApi();
String productId = "productId_example"; // String | The id of the product to retrieve
try {
Product result = apiInstance.updateProduct(productId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProductsApi#updateProduct");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
productId | String | The id of the product to retrieve |
- Content-Type: Not defined
- Accept: application/json