Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 88 additions & 70 deletions tests/cassettes/test_delete_business_metric_values.yaml

Large diffs are not rendered by default.

170 changes: 85 additions & 85 deletions tests/cassettes/test_get_all_business_metrics.yaml

Large diffs are not rendered by default.

172 changes: 86 additions & 86 deletions tests/cassettes/test_get_business_metric.yaml

Large diffs are not rendered by default.

170 changes: 85 additions & 85 deletions tests/cassettes/test_get_business_metric_values.yaml

Large diffs are not rendered by default.

172 changes: 86 additions & 86 deletions tests/cassettes/test_update_business_metric.yaml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions vantage_sdk/models/gen_models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
from .unit_costs_get_parameters_query_date_bin import UnitCostsGetParametersQueryDateBin
from .unit_costs_get_parameters_query import UnitCostsGetParametersQuery
from .unit_costs import UnitCosts
from .unit_cost_calculation_type import UnitCostCalculationType
from .unit_cost import UnitCost
from .teams_team_token_members_get_parameters_query import TeamsTeamTokenMembersGetParametersQuery
from .teams_get_parameters_query import TeamsGetParametersQuery
Expand Down Expand Up @@ -407,8 +408,10 @@
from .audit_logs import AuditLogs
from .audit_log import AuditLog
from .attached_cost_report_for_business_metric_unit_scale import AttachedCostReportForBusinessMetricUnitScale
from .attached_cost_report_for_business_metric_calculation_type import AttachedCostReportForBusinessMetricCalculationType
from .attached_cost_report_for_business_metric import AttachedCostReportForBusinessMetric
from .attached_business_metric_for_cost_report_unit_scale import AttachedBusinessMetricForCostReportUnitScale
from .attached_business_metric_for_cost_report_calculation_type import AttachedBusinessMetricForCostReportCalculationType
from .attached_business_metric_for_cost_report import AttachedBusinessMetricForCostReport
from .async_virtual_tag_config_update import AsyncVirtualTagConfigUpdate
from .anomaly_notifications_get_parameters_query import AnomalyNotificationsGetParametersQuery
Expand Down Expand Up @@ -451,8 +454,10 @@
"AnomalyNotificationsGetParametersQuery",
"AsyncVirtualTagConfigUpdate",
"AttachedBusinessMetricForCostReport",
"AttachedBusinessMetricForCostReportCalculationType",
"AttachedBusinessMetricForCostReportUnitScale",
"AttachedCostReportForBusinessMetric",
"AttachedCostReportForBusinessMetricCalculationType",
"AttachedCostReportForBusinessMetricUnitScale",
"AuditLog",
"AuditLogs",
Expand Down Expand Up @@ -743,6 +748,7 @@
"TeamsGetParametersQuery",
"TeamsTeamTokenMembersGetParametersQuery",
"UnitCost",
"UnitCostCalculationType",
"UnitCosts",
"UnitCostsGetParametersQuery",
"UnitCostsGetParametersQueryDateBin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Annotated
from pydantic import BaseModel, ConfigDict, Field
from collections.abc import Sequence
from . import attached_business_metric_for_cost_report_unit_scale
from . import attached_business_metric_for_cost_report_calculation_type, attached_business_metric_for_cost_report_unit_scale


class AttachedBusinessMetricForCostReport(BaseModel):
Expand All @@ -14,4 +14,5 @@ class AttachedBusinessMetricForCostReport(BaseModel):
)
business_metric_token: Annotated[str, Field(description="The token of the BusinessMetric that's attached to the CostReport.", examples=['bsnss_mtrc_1234'])]
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'])]
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'])]
label_filter: Annotated[Sequence[str] | None, Field(description='The labels that the BusinessMetric is filtered by within a particular CostReport.')] = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# generated by datamodel-codegen:
# filename: openapi_spec.json

from __future__ import annotations
from enum import StrEnum


class AttachedBusinessMetricForCostReportCalculationType(StrEnum):
"""
The calculation type applied when this BusinessMetric is used in the CostReport.
"""
unit_cost = 'unit_cost'
gross_margin = 'gross_margin'
usage_unit_cost = 'usage_unit_cost'
raw_business_metric = 'raw_business_metric'
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Annotated
from pydantic import BaseModel, ConfigDict, Field
from collections.abc import Sequence
from . import attached_cost_report_for_business_metric_unit_scale
from . import attached_cost_report_for_business_metric_calculation_type, attached_cost_report_for_business_metric_unit_scale


class AttachedCostReportForBusinessMetric(BaseModel):
Expand All @@ -14,4 +14,5 @@ class AttachedCostReportForBusinessMetric(BaseModel):
)
cost_report_token: Annotated[str | None, Field(description='The token of the CostReport the BusinessMetric is attached to.', examples=['rprt_1234'])]
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'])]
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'])]
label_filter: Annotated[Sequence[str] | None, Field(description='The labels that the BusinessMetric is filtered by within a particular CostReport.')] = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# generated by datamodel-codegen:
# filename: openapi_spec.json

from __future__ import annotations
from enum import StrEnum


class AttachedCostReportForBusinessMetricCalculationType(StrEnum):
"""
The calculation type applied when this BusinessMetric is used in the CostReport.
"""
unit_cost = 'unit_cost'
gross_margin = 'gross_margin'
usage_unit_cost = 'usage_unit_cost'
raw_business_metric = 'raw_business_metric'
1 change: 1 addition & 0 deletions vantage_sdk/models/gen_models/cost_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class CostProvider(StrEnum):
circle_ci = 'circle_ci'
modal = 'modal'
eleven_labs = 'eleven_labs'
baseten = 'baseten'


class CostProviderModel(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ class CostProviderAccountsGetParametersQueryProvider(StrEnum):
circle_ci = 'circle_ci'
modal = 'modal'
eleven_labs = 'eleven_labs'
baseten = 'baseten'
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ class CostReportsCostReportTokenForecastedCostsGetParametersQueryProvider(StrEnu
circle_ci = 'circle_ci'
modal = 'modal'
eleven_labs = 'eleven_labs'
baseten = 'baseten'
all = 'all'
2 changes: 1 addition & 1 deletion vantage_sdk/models/gen_models/create_managed_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ class CreateManagedAccount(BaseModel):
name: Annotated[str, Field(description='The name of the Managed Account.')]
contact_email: Annotated[str, Field(description='The contact email address for the Managed Account.')]
access_credential_tokens: Annotated[Sequence[str] | None, Field(description='Access Credential (aka Integrations) tokens to assign to the Managed Account.')] = None
billing_rule_tokens: Annotated[Sequence[str] | None, Field(description='Billing Rule tokens to assign to the Managed Account.')] = None
billing_rule_tokens: Annotated[Sequence[str] | None, Field(description='Billing Rule tokens to assign to the Managed Account, in their desired execution order. Tokens must be ordered by execution group: AWS transforms, then COST inserts, then COST transforms, then monthly post-transform inserts. Within a group any order is accepted and persisted as-is. Submitting a list whose cross-group ordering does not match the pipeline returns a 400.Existing rules with apply_to_all enabled will be added implicity to the end of their execution group.')] = None
email_domain: Annotated[str | None, Field(description='Email domain to associate with this Managed Account for SSO.')] = None
1 change: 1 addition & 0 deletions vantage_sdk/models/gen_models/forecasted_cost_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ class ForecastedCostProvider(StrEnum):
circle_ci = 'circle_ci'
modal = 'modal'
eleven_labs = 'eleven_labs'
baseten = 'baseten'
all = 'all'
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ class IntegrationsGetParametersQueryProvider(StrEnum):
circle_ci = 'circle_ci'
modal = 'modal'
eleven_labs = 'eleven_labs'
baseten = 'baseten'
2 changes: 1 addition & 1 deletion vantage_sdk/models/gen_models/managed_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ManagedAccount(BaseModel):
contact_email: str
parent_account_token: Annotated[str, Field(description='The token for the parent Account.')]
access_credential_tokens: Annotated[Sequence[str], Field(description='The tokens for the Access Credentials assigned to the Managed Account.')]
billing_rule_tokens: Annotated[Sequence[str], Field(description='The tokens for the Billing Rules assigned to the Managed Account.')]
billing_rule_tokens: Annotated[Sequence[str], Field(description="The tokens for the Billing Rules assigned to the Managed Account, in the order they will execute against this account's cost data.")]
email_domain: Annotated[str | None, Field(description='Email domain associated with this Managed Account for SSO.')] = None
msp_billing_profile_token: Annotated[str | None, Field(description='Token of the MSP billing profile used for this managed account (MSP invoicing accounts only)')] = None
payment_terms_days: Annotated[int | None, Field(description='Number of days until payment is due after invoice date (MSP invoicing accounts only)')] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ class TagsGetParametersQueryProvider(StrEnum):
circle_ci = 'circle_ci'
modal = 'modal'
eleven_labs = 'eleven_labs'
baseten = 'baseten'
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ class TagsKeyValuesGetParametersQueryProvider(StrEnum):
circle_ci = 'circle_ci'
modal = 'modal'
eleven_labs = 'eleven_labs'
baseten = 'baseten'
5 changes: 3 additions & 2 deletions vantage_sdk/models/gen_models/unit_cost.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from __future__ import annotations
from typing import Annotated
from pydantic import BaseModel, ConfigDict, Field
from . import links as links_1
from . import links as links_1, unit_cost_calculation_type


class UnitCost(BaseModel):
Expand All @@ -14,7 +14,8 @@ class UnitCost(BaseModel):
links: links_1.Links | None = None
business_metric_token: Annotated[str, Field(description='The token of the BusinessMetric for which the unit cost was calculated.', examples=['bsnss_mtrc_1234'])]
business_metric_title: Annotated[str, Field(description='The title of the BusinessMetric for which the unit cost was calculated.', examples=['Total Revenue'])]
unit_cost_amount: Annotated[str, Field(description='The amount of the unit cost.', examples=['4.25'])]
calculation_type: Annotated[unit_cost_calculation_type.UnitCostCalculationType | None, Field(description='The calculation type applied to produce this result.', examples=['unit_cost'])] = None
unit_cost_amount: Annotated[str, Field(description='The amount of the unit cost. For raw_business_metric types, this equals the business_metric_amount.', examples=['4.25'])]
business_metric_amount: Annotated[str, Field(description='The amount of the business metric.', examples=['0.371'])]
scale: Annotated[float, Field(description="The scale of the BusinessMetric's values within a particular CostReport.", examples=[1.0])]
date: Annotated[str, Field(description='The date for which the unit cost was calculated. ISO 8601 Formatted.', examples=['2023-09-05+00:00'])]
15 changes: 15 additions & 0 deletions vantage_sdk/models/gen_models/unit_cost_calculation_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# generated by datamodel-codegen:
# filename: openapi_spec.json

from __future__ import annotations
from enum import StrEnum


class UnitCostCalculationType(StrEnum):
"""
The calculation type applied to produce this result.
"""
unit_cost = 'unit_cost'
gross_margin = 'gross_margin'
usage_unit_cost = 'usage_unit_cost'
raw_business_metric = 'raw_business_metric'
2 changes: 1 addition & 1 deletion vantage_sdk/models/gen_models/update_managed_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class UpdateManagedAccount(BaseModel):
name: Annotated[str | None, Field(description='The name of the Managed Account.')] = None
contact_email: Annotated[str | None, Field(description='The contact email address for the Managed Account.')] = None
access_credential_tokens: Annotated[Sequence[str] | None, Field(description='Access Credential (aka Integrations) tokens to assign to the Managed Account.')] = None
billing_rule_tokens: Annotated[Sequence[str] | None, Field(description='Billing Rule tokens to assign to the Managed Account.')] = None
billing_rule_tokens: Annotated[Sequence[str] | None, Field(description='Billing Rule tokens to assign to the Managed Account, in their desired execution order. Tokens must be ordered by execution group: AWS transforms, then COST inserts, then COST transforms, then monthly post-transform inserts. Within a group any order is accepted and persisted as-is. Submitting a list whose cross-group ordering does not match the pipeline returns a 400.')] = None
email_domain: Annotated[str | None, Field(description='Email domain to associate with this Managed Account for SSO.')] = None
msp_billing_profile_token: Annotated[str | None, Field(description='Token of the MSP billing profile to use for this managed account (MSP invoicing accounts only).')] = None
payment_terms_days: Annotated[int | None, Field(description='Number of days until payment is due after invoice date (MSP invoicing accounts only). Defaults to 10.')] = None
Expand Down
2 changes: 1 addition & 1 deletion vantage_sdk/models/gen_models/virtual_tag_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class VirtualTagConfig(BaseModel):
created_by_token: Annotated[str | None, Field(description='The token of the Creator of the VirtualTagConfig.', examples=['usr_1234'])]
key: Annotated[str, Field(description='The key of the VirtualTagConfig.', examples=['Cost Center'])]
overridable: Annotated[bool, Field(description='Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.')]
backfill_until: Annotated[str, Field(description='The earliest month VirtualTagConfig should be backfilled to.', examples=['2025-12-01'])]
backfill_until: Annotated[str, Field(description='The earliest month VirtualTagConfig should be backfilled to.', examples=['2026-01-01'])]
collapsed_tag_keys: Annotated[Sequence[virtual_tag_config_collapsed_tag_key.VirtualTagConfigCollapsedTagKey], Field(description='Tag keys to collapse values for.')]
values: Annotated[Sequence[virtual_tag_config_value.VirtualTagConfigValue], Field(description='Values for the VirtualTagConfig, with match precedence determined by their relative order in the list.')]
Loading