Skip to content
Book a demoContact usGet started

Pricing Metrics

List Pricing Metrics
client.PricingMetrics.List(ctx, query) (*PricingMetricListResponse, error)
get/pricing-metrics
Create Pricing Metric
client.PricingMetrics.New(ctx, body) (*PricingMetricResource, error)
post/pricing-metrics
Get Pricing Metric
client.PricingMetrics.Get(ctx, pricingMetricID) (*PricingMetricResource, error)
get/pricing-metrics/{pricing_metric_id}
Create Pricing Metric Summary
client.PricingMetrics.NewSummary(ctx, pricingMetricID, body) (*[]PricingMetricNewSummaryResponse, error)
post/pricing-metrics/{pricing_metric_id}/summary
ModelsExpand Collapse
type Period struct{…}
End Time
formatdate-time
Start Time
formatdate-time
InclusiveEnd booloptional
InclusiveStart booloptional
type PricingMetricResource struct{…}
ID string

The ID of the pricing metric.

Aggregation PricingMetricResourceAggregationUnion

The aggregation function used to compute the value of the pricing metric.

Accepts one of the following:
type PricingMetricResourceAggregationSum struct{…}
AggregationType Sum
ValueField string

The field to sum over.

type PricingMetricResourceAggregationCount struct{…}
AggregationType Count
type PricingMetricResourceAggregationMax struct{…}
AggregationType Max
ValueField string

The field to get the max value of.

type PricingMetricResourceAggregationLast struct{…}
AggregationType Last
ValueField string

The field to get the last value of.

EventName string

The event name that the pricing metric is computed on.

Name string

The name of the pricing metric.

Unit string

The unit of the value computed by the pricing metric.

Dimensions []stringoptional

The dimensions by which the events are grouped to compute the pricing metric.