Skip to content
Join our SlackContact usGet started

Pricing Metrics

List Pricing Metrics
pricing_metrics.list(PricingMetricListParams**kwargs) -> PricingMetricListResponse
get/pricing-metrics
Create Pricing Metric
pricing_metrics.create(PricingMetricCreateParams**kwargs) -> PricingMetricResource
post/pricing-metrics
Get Pricing Metric
pricing_metrics.retrieve(strpricing_metric_id) -> PricingMetricResource
get/pricing-metrics/{pricing_metric_id}
Create Pricing Metric Summary
pricing_metrics.create_summary(strpricing_metric_id, PricingMetricCreateSummaryParams**kwargs) -> PricingMetricCreateSummaryResponse
post/pricing-metrics/{pricing_metric_id}/summary
ModelsExpand Collapse
class Period:
end: datetime
formatdate-time
start: datetime
formatdate-time
inclusive_end: Optional[bool]
inclusive_start: Optional[bool]
class PricingMetricResource:
id: str

The ID of the pricing metric.

aggregation: Aggregation

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

Accepts one of the following:
class AggregationSumAggregationPricingMetricResource:
aggregation_type: Literal["sum"]
Accepts one of the following:
"sum"
value_field: str

The field to sum over.

class AggregationCountAggregationPricingMetricResource:
aggregation_type: Literal["count"]
Accepts one of the following:
"count"
class AggregationMaxAggregationPricingMetricResource:
aggregation_type: Literal["max"]
Accepts one of the following:
"max"
value_field: str

The field to get the max value of.

class AggregationLastAggregationPricingMetricResource:
aggregation_type: Literal["last"]
Accepts one of the following:
"last"
value_field: str

The field to get the last value of.

event_name: str

The event name that the pricing metric is computed on.

name: str

The name of the pricing metric.

unit: str

The unit of the value computed by the pricing metric.

dimensions: Optional[List[str]]

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