All URIs are relative to https://api.getlago.com/api/v1, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
createBillableMetric() | POST /billable_metrics | Create a new billable metric |
destroyBillableMetric() | DELETE /billable_metrics/{code} | Delete a billable metric |
findAllBillableMetricGroups() | GET /billable_metrics/{code}/groups | Find Billable metric groups |
findAllBillableMetrics() | GET /billable_metrics | Find Billable metrics |
findBillableMetric() | GET /billable_metrics/{code} | Find billable metric by code |
updateBillableMetric() | PUT /billable_metrics/{code} | Update an existing billable metric |
createBillableMetric($billable_metric_input): \OpenAPI\Client\Model\BillableMetric
Create a new billable metric
Create a new billable metric
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\BillableMetricsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$billable_metric_input = new \OpenAPI\Client\Model\BillableMetricInput(); // \OpenAPI\Client\Model\BillableMetricInput | Billable metric payload
try {
$result = $apiInstance->createBillableMetric($billable_metric_input);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BillableMetricsApi->createBillableMetric: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
billable_metric_input | \OpenAPI\Client\Model\BillableMetricInput | Billable metric payload |
\OpenAPI\Client\Model\BillableMetric
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
destroyBillableMetric($code): \OpenAPI\Client\Model\BillableMetric
Delete a billable metric
Delete a billable metric
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\BillableMetricsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$code = example_code; // string | Code of the existing billable metric
try {
$result = $apiInstance->destroyBillableMetric($code);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BillableMetricsApi->destroyBillableMetric: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
code | string | Code of the existing billable metric |
\OpenAPI\Client\Model\BillableMetric
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
findAllBillableMetricGroups($code, $page, $per_page): \OpenAPI\Client\Model\GroupsPaginated
Find Billable metric groups
Find all billable metric groups in certain organisation
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\BillableMetricsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$code = example_code; // string | Code of the existing billable metric
$page = 2; // int | Number of page
$per_page = 20; // int | Number of records per page
try {
$result = $apiInstance->findAllBillableMetricGroups($code, $page, $per_page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BillableMetricsApi->findAllBillableMetricGroups: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
code | string | Code of the existing billable metric | |
page | int | Number of page | [optional] |
per_page | int | Number of records per page | [optional] |
\OpenAPI\Client\Model\GroupsPaginated
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
findAllBillableMetrics($page, $per_page): \OpenAPI\Client\Model\BillableMetricsPaginated
Find Billable metrics
Find all billable metrics in certain organisation
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\BillableMetricsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$page = 2; // int | Number of page
$per_page = 20; // int | Number of records per page
try {
$result = $apiInstance->findAllBillableMetrics($page, $per_page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BillableMetricsApi->findAllBillableMetrics: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
page | int | Number of page | [optional] |
per_page | int | Number of records per page | [optional] |
\OpenAPI\Client\Model\BillableMetricsPaginated
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
findBillableMetric($code): \OpenAPI\Client\Model\BillableMetric
Find billable metric by code
Return a single billable metric
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\BillableMetricsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$code = example_code; // string | Code of the existing billable metric
try {
$result = $apiInstance->findBillableMetric($code);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BillableMetricsApi->findBillableMetric: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
code | string | Code of the existing billable metric |
\OpenAPI\Client\Model\BillableMetric
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateBillableMetric($code, $billable_metric_input): \OpenAPI\Client\Model\BillableMetric
Update an existing billable metric
Update an existing billable metric by code
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\BillableMetricsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$code = example_code; // string | Code of the existing billable metric
$billable_metric_input = new \OpenAPI\Client\Model\BillableMetricInput(); // \OpenAPI\Client\Model\BillableMetricInput | Update an existing billable metric
try {
$result = $apiInstance->updateBillableMetric($code, $billable_metric_input);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BillableMetricsApi->updateBillableMetric: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
code | string | Code of the existing billable metric | |
billable_metric_input | \OpenAPI\Client\Model\BillableMetricInput | Update an existing billable metric |
\OpenAPI\Client\Model\BillableMetric
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]