All URIs are relative to https://{customerId}.billabear.cloud/api/v1
Method | HTTP request | Description |
---|---|---|
createPrice | POST /product/{productId}/price | Create |
listPrice | GET /product/{productId}/price | List |
String createPrice(body, productId)
Create
Create a price
// Import classes:
//import BillaBear.ApiClient;
//import BillaBear.ApiException;
//import BillaBear.Configuration;
//import BillaBear.auth.*;
//import io.swagger.client.api.PricesApi;
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");
PricesApi apiInstance = new PricesApi();
Price body = new Price(); // Price |
String productId = "productId_example"; // String | The id of the product to retrieve
try {
String result = apiInstance.createPrice(body, productId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PricesApi#createPrice");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | Price | ||
productId | String | The id of the product to retrieve |
String
- Content-Type: application/json
- Accept: application/json
InlineResponse2009 listPrice(productId, limit, lastKey)
List
List all prices
// Import classes:
//import BillaBear.ApiClient;
//import BillaBear.ApiException;
//import BillaBear.Configuration;
//import BillaBear.auth.*;
//import io.swagger.client.api.PricesApi;
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");
PricesApi apiInstance = new PricesApi();
String productId = "productId_example"; // String | The id of the product to retrieve
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
try {
InlineResponse2009 result = apiInstance.listPrice(productId, limit, lastKey);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PricesApi#listPrice");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
productId | String | The id of the product to retrieve | |
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] |
- Content-Type: Not defined
- Accept: application/json