Skip to content

Commit 7a3431c

Browse files
Merge pull request #28 from block/chore/update-openapi-spec
chore: update OpenAPI spec and regenerate models
2 parents 33c5993 + b155690 commit 7a3431c

23 files changed

Lines changed: 499 additions & 420 deletions

‎tests/cassettes/test_delete_business_metric_values.yaml‎

Lines changed: 88 additions & 70 deletions
Large diffs are not rendered by default.

‎tests/cassettes/test_get_all_business_metrics.yaml‎

Lines changed: 85 additions & 85 deletions
Large diffs are not rendered by default.

‎tests/cassettes/test_get_business_metric.yaml‎

Lines changed: 86 additions & 86 deletions
Large diffs are not rendered by default.

‎tests/cassettes/test_get_business_metric_values.yaml‎

Lines changed: 85 additions & 85 deletions
Large diffs are not rendered by default.

‎tests/cassettes/test_update_business_metric.yaml‎

Lines changed: 86 additions & 86 deletions
Large diffs are not rendered by default.

‎vantage_sdk/models/gen_models/__init__.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
from .unit_costs_get_parameters_query_date_bin import UnitCostsGetParametersQueryDateBin
127127
from .unit_costs_get_parameters_query import UnitCostsGetParametersQuery
128128
from .unit_costs import UnitCosts
129+
from .unit_cost_calculation_type import UnitCostCalculationType
129130
from .unit_cost import UnitCost
130131
from .teams_team_token_members_get_parameters_query import TeamsTeamTokenMembersGetParametersQuery
131132
from .teams_get_parameters_query import TeamsGetParametersQuery
@@ -407,8 +408,10 @@
407408
from .audit_logs import AuditLogs
408409
from .audit_log import AuditLog
409410
from .attached_cost_report_for_business_metric_unit_scale import AttachedCostReportForBusinessMetricUnitScale
411+
from .attached_cost_report_for_business_metric_calculation_type import AttachedCostReportForBusinessMetricCalculationType
410412
from .attached_cost_report_for_business_metric import AttachedCostReportForBusinessMetric
411413
from .attached_business_metric_for_cost_report_unit_scale import AttachedBusinessMetricForCostReportUnitScale
414+
from .attached_business_metric_for_cost_report_calculation_type import AttachedBusinessMetricForCostReportCalculationType
412415
from .attached_business_metric_for_cost_report import AttachedBusinessMetricForCostReport
413416
from .async_virtual_tag_config_update import AsyncVirtualTagConfigUpdate
414417
from .anomaly_notifications_get_parameters_query import AnomalyNotificationsGetParametersQuery
@@ -451,8 +454,10 @@
451454
"AnomalyNotificationsGetParametersQuery",
452455
"AsyncVirtualTagConfigUpdate",
453456
"AttachedBusinessMetricForCostReport",
457+
"AttachedBusinessMetricForCostReportCalculationType",
454458
"AttachedBusinessMetricForCostReportUnitScale",
455459
"AttachedCostReportForBusinessMetric",
460+
"AttachedCostReportForBusinessMetricCalculationType",
456461
"AttachedCostReportForBusinessMetricUnitScale",
457462
"AuditLog",
458463
"AuditLogs",
@@ -743,6 +748,7 @@
743748
"TeamsGetParametersQuery",
744749
"TeamsTeamTokenMembersGetParametersQuery",
745750
"UnitCost",
751+
"UnitCostCalculationType",
746752
"UnitCosts",
747753
"UnitCostsGetParametersQuery",
748754
"UnitCostsGetParametersQueryDateBin",

‎vantage_sdk/models/gen_models/attached_business_metric_for_cost_report.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import Annotated
66
from pydantic import BaseModel, ConfigDict, Field
77
from collections.abc import Sequence
8-
from . import attached_business_metric_for_cost_report_unit_scale
8+
from . import attached_business_metric_for_cost_report_calculation_type, attached_business_metric_for_cost_report_unit_scale
99

1010

1111
class AttachedBusinessMetricForCostReport(BaseModel):
@@ -14,4 +14,5 @@ class AttachedBusinessMetricForCostReport(BaseModel):
1414
)
1515
business_metric_token: Annotated[str, Field(description="The token of the BusinessMetric that's attached to the CostReport.", examples=['bsnss_mtrc_1234'])]
1616
unit_scale: Annotated[attached_business_metric_for_cost_report_unit_scale.AttachedBusinessMetricForCostReportUnitScale, Field(description="Determines the scale of the BusinessMetric's values within a particular CostReport.", examples=['per_hundred'])]
17+
calculation_type: Annotated[attached_business_metric_for_cost_report_calculation_type.AttachedBusinessMetricForCostReportCalculationType, Field(description='The calculation type applied when this BusinessMetric is used in the CostReport.', examples=['unit_cost'])]
1718
label_filter: Annotated[Sequence[str] | None, Field(description='The labels that the BusinessMetric is filtered by within a particular CostReport.')] = None
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# generated by datamodel-codegen:
2+
# filename: openapi_spec.json
3+
4+
from __future__ import annotations
5+
from enum import StrEnum
6+
7+
8+
class AttachedBusinessMetricForCostReportCalculationType(StrEnum):
9+
"""
10+
The calculation type applied when this BusinessMetric is used in the CostReport.
11+
"""
12+
unit_cost = 'unit_cost'
13+
gross_margin = 'gross_margin'
14+
usage_unit_cost = 'usage_unit_cost'
15+
raw_business_metric = 'raw_business_metric'

‎vantage_sdk/models/gen_models/attached_cost_report_for_business_metric.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import Annotated
66
from pydantic import BaseModel, ConfigDict, Field
77
from collections.abc import Sequence
8-
from . import attached_cost_report_for_business_metric_unit_scale
8+
from . import attached_cost_report_for_business_metric_calculation_type, attached_cost_report_for_business_metric_unit_scale
99

1010

1111
class AttachedCostReportForBusinessMetric(BaseModel):
@@ -14,4 +14,5 @@ class AttachedCostReportForBusinessMetric(BaseModel):
1414
)
1515
cost_report_token: Annotated[str | None, Field(description='The token of the CostReport the BusinessMetric is attached to.', examples=['rprt_1234'])]
1616
unit_scale: Annotated[attached_cost_report_for_business_metric_unit_scale.AttachedCostReportForBusinessMetricUnitScale, Field(description="Determines the scale of the BusinessMetric's values within a particular CostReport.", examples=['per_hundred'])]
17+
calculation_type: Annotated[attached_cost_report_for_business_metric_calculation_type.AttachedCostReportForBusinessMetricCalculationType, Field(description='The calculation type applied when this BusinessMetric is used in the CostReport.', examples=['unit_cost'])]
1718
label_filter: Annotated[Sequence[str] | None, Field(description='The labels that the BusinessMetric is filtered by within a particular CostReport.')] = None
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# generated by datamodel-codegen:
2+
# filename: openapi_spec.json
3+
4+
from __future__ import annotations
5+
from enum import StrEnum
6+
7+
8+
class AttachedCostReportForBusinessMetricCalculationType(StrEnum):
9+
"""
10+
The calculation type applied when this BusinessMetric is used in the CostReport.
11+
"""
12+
unit_cost = 'unit_cost'
13+
gross_margin = 'gross_margin'
14+
usage_unit_cost = 'usage_unit_cost'
15+
raw_business_metric = 'raw_business_metric'

0 commit comments

Comments
 (0)