docs/BillingUsageMetricsApi.md in fastly-8.10.0 vs docs/BillingUsageMetricsApi.md in fastly-9.0.0

- old
+ new

@@ -11,12 +11,12 @@ > [!NOTE] > All URIs are relative to `https://api.fastly.com` Method | HTTP request | Description ------ | ------------ | ----------- -[**get_service_level_usage**](BillingUsageMetricsApi.md#get_service_level_usage) | **GET** /billing/v2/account_customers/{customer_id}/service-usage-metrics | Retrieve service-level usage metrics for a product. -[**get_service_level_usage_types**](BillingUsageMetricsApi.md#get_service_level_usage_types) | **GET** /billing/v2/account_customers/{customer_id}/service-usage-types | Retrieve product usage types for a customer. +[**get_service_level_usage**](BillingUsageMetricsApi.md#get_service_level_usage) | **GET** /billing/v3/service-usage-metrics | Retrieve service-level usage metrics for a product. +[**get_usage_metrics**](BillingUsageMetricsApi.md#get_usage_metrics) | **GET** /billing/v3/usage-metrics | Get monthly usage metrics ## `get_service_level_usage()` ```ruby @@ -28,16 +28,12 @@ ### Examples ```ruby api_instance = Fastly::BillingUsageMetricsApi.new opts = { - customer_id: 'customer_id_example', # String | Alphanumeric string identifying the customer. product_id: 'product_id_example', # String | The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. usage_type_name: 'usage_type_name_example', # String | The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. - time_granularity: 'time_granularity_example', # String | - start_date: '2023-01-01', # String | - end_date: '2023-01-31', # String | start_month: '2023-01', # String | end_month: '2023-03', # String | limit: 'limit_example', # String | Number of results per page. The maximum is 100. cursor: 'cursor_example', # String | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. } @@ -53,16 +49,12 @@ ### Options | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **customer_id** | **String** | Alphanumeric string identifying the customer. | | | **product_id** | **String** | The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. | | | **usage_type_name** | **String** | The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. | | -| **time_granularity** | **String** | | | -| **start_date** | **String** | | [optional] | -| **end_date** | **String** | | [optional] | | **start_month** | **String** | | [optional] | | **end_month** | **String** | | [optional] | | **limit** | **String** | Number of results per page. The maximum is 100. | [optional][default to &#39;5&#39;] | | **cursor** | **String** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] | @@ -70,42 +62,44 @@ [**Serviceusagemetrics**](Serviceusagemetrics.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) -## `get_service_level_usage_types()` +## `get_usage_metrics()` ```ruby -get_service_level_usage_types(opts): <Serviceusagetypes> # Retrieve product usage types for a customer. +get_usage_metrics(opts): <Usagemetric> # Get monthly usage metrics ``` -Returns product usage types reported by the customer's services. +Returns monthly usage metrics for customer by product. ### Examples ```ruby api_instance = Fastly::BillingUsageMetricsApi.new opts = { - customer_id: 'customer_id_example', # String | Alphanumeric string identifying the customer. + start_month: '2023-01', # String | + end_month: '2023-03', # String | } begin - # Retrieve product usage types for a customer. - result = api_instance.get_service_level_usage_types(opts) + # Get monthly usage metrics + result = api_instance.get_usage_metrics(opts) p result rescue Fastly::ApiError => e - puts "Error when calling BillingUsageMetricsApi->get_service_level_usage_types: #{e}" + puts "Error when calling BillingUsageMetricsApi->get_usage_metrics: #{e}" end ``` ### Options | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **customer_id** | **String** | Alphanumeric string identifying the customer. | | +| **start_month** | **String** | | [optional] | +| **end_month** | **String** | | [optional] | ### Return type -[**Serviceusagetypes**](Serviceusagetypes.md) +[**Usagemetric**](Usagemetric.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)