MeterCreate
Summary
Types
@type t() :: %PolarExpress.Schemas.MeterCreate{ aggregation: PolarExpress.Schemas.CountAggregation.t() | PolarExpress.Schemas.PropertyAggregation.t() | PolarExpress.Schemas.UniqueAggregation.t() | nil, custom_label: String.t() | nil, custom_multiplier: integer() | nil, filter: PolarExpress.Schemas.Filter.t() | nil, metadata: %{ required(String.t()) => String.t() | integer() | float() | boolean() | nil } | nil, name: String.t() | nil, organization_id: String.t() | nil, unit: PolarExpress.Schemas.MeterUnit.t() | nil }
aggregation- The aggregation to apply on the filtered events to calculate the meter.custom_label- The label for the custom unit, e.g. 'request'. Required when unit is 'custom'. Nullable.custom_multiplier- The multiplier to convert from the base unit to display scale, e.g. 1000 to display per 1000 units. Defaults to 1 when not provided. Nullable.filter- The filter to apply on events that'll be used to calculate the meter.metadata- Key-value object allowing you to store additional information.
The key must be a string with a maximum length of 40 characters. The value must be either:
- A string with a maximum length of 500 characters
- An integer
- A floating-point number
- A boolean
You can store up to 50 key-value pairs.
name- The name of the meter. Will be shown on customer's invoices and usage.organization_id- The ID of the organization owning the meter. Required unless you use an organization token. Nullable.unit- The unit of the meter.