Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Latest commit

 

History

History
32 lines (26 loc) · 1.91 KB

BillableMetricBaseInput.md

File metadata and controls

32 lines (26 loc) · 1.91 KB

LagoAPI::BillableMetricBaseInput

Properties

Name Type Description Notes
name String Name of the billable metric. [optional]
code String Unique code used to identify the billable metric associated with the API request. This code associates each event with the correct metric. [optional]
description String Internal description of the billable metric. [optional]
recurring Boolean Defines if the billable metric is persisted billing period over billing period. - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period. - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period. - If not defined in the request, default value is `false`. [optional]
field_name String Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`. [optional]
aggregation_type String Aggregation method used to compute usage for this billable metric. [optional]
weighted_interval String Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`. [optional]
group BillableMetricGroup [optional]

Example

require 'lago_ruby'

instance = LagoAPI::BillableMetricBaseInput.new(
  name: Storage,
  code: storage,
  description: GB of storage used in my application,
  recurring: false,
  field_name: gb,
  aggregation_type: sum_agg,
  weighted_interval: seconds,
  group: null
)