Skip to content

Commit

Permalink
feat(billable_metric): Expose rounding attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-pochet committed Nov 4, 2024
1 parent a544990 commit 80face2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lago_python_client/models/billable_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class BillableMetric(BaseModel):
code: Optional[str]
description: Optional[str]
recurring: Optional[bool]
rounding_function: Optional[str]
rounding_precision: Optional[int]
aggregation_type: Optional[str]
weighted_interval: Optional[str]
expression: Optional[str]
Expand All @@ -32,6 +34,8 @@ class BillableMetricResponse(BaseResponseModel):
code: str
description: Optional[str]
recurring: Optional[bool]
rounding_function: Optional[str]
rounding_precision: Optional[int]
aggregation_type: Optional[str]
weighted_interval: Optional[str]
expression: Optional[str]
Expand Down
2 changes: 2 additions & 0 deletions tests/fixtures/billable_metric.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"aggregation_type": "sum_agg",
"weighted_interval": null,
"recurring": false,
"rounding_function": "round",
"rounding_precision": 2,
"expression": "1 + 2",
"field_name": "amount_sum",
"created_at": "2022-04-29T08:59:51Z",
Expand Down
4 changes: 4 additions & 0 deletions tests/fixtures/billable_metric_index.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"aggregation_type": "sum_agg",
"weighted_interval": null,
"recurring": false,
"rounding_function": "round",
"rounding_precision": 2,
"expression": "1 + 2",
"field_name": "amount_sum",
"created_at": "2022-04-29T08:59:51Z",
Expand All @@ -24,6 +26,8 @@
"aggregation_type": "sum_agg",
"weighted_interval": null,
"recurring": false,
"rounding_function": "round",
"rounding_precision": 2,
"expression": "1 + 2",
"field_name": "amount_sum",
"created_at": "2022-04-30T08:59:51Z",
Expand Down

0 comments on commit 80face2

Please sign in to comment.