stackit-cost 0.3.0__tar.gz → 0.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/PKG-INFO +2 -2
  2. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/pyproject.toml +2 -2
  3. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/models/detailed_service_cost.py +7 -0
  4. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/models/report_data.py +7 -1
  5. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/.gitignore +0 -0
  6. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/README.md +0 -0
  7. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/__init__.py +0 -0
  8. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/api/__init__.py +0 -0
  9. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/api/default_api.py +0 -0
  10. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/api_client.py +0 -0
  11. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/api_response.py +0 -0
  12. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/configuration.py +0 -0
  13. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/exceptions.py +0 -0
  14. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/models/__init__.py +0 -0
  15. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/models/auth_error_response.py +0 -0
  16. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/models/error_response.py +0 -0
  17. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/models/project_cost.py +0 -0
  18. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/models/project_cost_with_detailed_services.py +0 -0
  19. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/models/project_cost_with_reports.py +0 -0
  20. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/models/project_cost_with_summarized_services.py +0 -0
  21. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/models/report_data_time_period.py +0 -0
  22. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/models/summarized_project_cost.py +0 -0
  23. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/models/summarized_service_cost.py +0 -0
  24. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/py.typed +0 -0
  25. {stackit_cost-0.3.0 → stackit_cost-0.4.1}/src/stackit/cost/rest.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: stackit-cost
3
- Version: 0.3.0
3
+ Version: 0.4.1
4
4
  Summary: STACKIT Cost API
5
5
  Project-URL: Homepage, https://github.com/stackitcloud/stackit-sdk-python
6
6
  Project-URL: Issues, https://github.com/stackitcloud/stackit-sdk-python/issues
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "stackit-cost"
3
- version = "v0.3.0"
3
+ version = "v0.4.1"
4
4
  description = "STACKIT Cost API"
5
5
  authors = [{name = "STACKIT Developer Tools", email = "developer-tools@stackit.cloud"}]
6
6
  requires-python = ">=3.10,<4.0"
@@ -55,7 +55,7 @@ include = ["src/stackit"]
55
55
  [tool.hatch.build.targets.wheel]
56
56
  include = ["src/stackit"]
57
57
 
58
- [tool.hatch.build.targets.wheel-sources]
58
+ [tool.hatch.build.targets.wheel.sources]
59
59
  "src/stackit" = "stackit"
60
60
 
61
61
  [build-system]
@@ -23,6 +23,7 @@ from pydantic import (
23
23
  Field,
24
24
  StrictFloat,
25
25
  StrictInt,
26
+ StrictStr,
26
27
  )
27
28
  from pydantic_core import to_jsonable_python
28
29
  from typing_extensions import Annotated, Self
@@ -56,6 +57,10 @@ class DetailedServiceCost(BaseModel):
56
57
  alias="totalDiscount",
57
58
  )
58
59
  total_quantity: StrictInt = Field(description="Total quantity", alias="totalQuantity")
60
+ total_quantity_decimal: StrictStr = Field(
61
+ description="Total quantity in decimal format, returned as string to preserve precision. NOTE: This field will be removed in future versions and `totalQuantity` will become a decimal. ",
62
+ alias="totalQuantityDecimal",
63
+ )
59
64
  unit_label: Annotated[str, Field(min_length=1, strict=True, max_length=64)] = Field(
60
65
  description="Label for unit", alias="unitLabel"
61
66
  )
@@ -67,6 +72,7 @@ class DetailedServiceCost(BaseModel):
67
72
  "totalCharge",
68
73
  "totalDiscount",
69
74
  "totalQuantity",
75
+ "totalQuantityDecimal",
70
76
  "unitLabel",
71
77
  ]
72
78
 
@@ -138,6 +144,7 @@ class DetailedServiceCost(BaseModel):
138
144
  "totalCharge": obj.get("totalCharge"),
139
145
  "totalDiscount": obj.get("totalDiscount"),
140
146
  "totalQuantity": obj.get("totalQuantity"),
147
+ "totalQuantityDecimal": obj.get("totalQuantityDecimal"),
141
148
  "unitLabel": obj.get("unitLabel"),
142
149
  }
143
150
  )
@@ -23,6 +23,7 @@ from pydantic import (
23
23
  Field,
24
24
  StrictFloat,
25
25
  StrictInt,
26
+ StrictStr,
26
27
  )
27
28
  from pydantic_core import to_jsonable_python
28
29
  from typing_extensions import Self
@@ -38,8 +39,12 @@ class ReportData(BaseModel):
38
39
  charge: Union[StrictFloat, StrictInt] = Field(description="Charge, value in cents")
39
40
  discount: Union[StrictFloat, StrictInt] = Field(description="Discount, value in cents")
40
41
  quantity: StrictInt = Field(description="Quantity")
42
+ quantity_decimal: StrictStr = Field(
43
+ description="Quantity in decimal format, returned as string to preserve precision. NOTE: This field will be removed in future versions and `totalQuantity` will become a decimal. ",
44
+ alias="quantityDecimal",
45
+ )
41
46
  time_period: ReportDataTimePeriod = Field(alias="timePeriod")
42
- __properties: ClassVar[List[str]] = ["charge", "discount", "quantity", "timePeriod"]
47
+ __properties: ClassVar[List[str]] = ["charge", "discount", "quantity", "quantityDecimal", "timePeriod"]
43
48
 
44
49
  model_config = ConfigDict(
45
50
  validate_by_name=True,
@@ -97,6 +102,7 @@ class ReportData(BaseModel):
97
102
  "charge": obj.get("charge"),
98
103
  "discount": obj.get("discount"),
99
104
  "quantity": obj.get("quantity"),
105
+ "quantityDecimal": obj.get("quantityDecimal"),
100
106
  "timePeriod": (
101
107
  ReportDataTimePeriod.from_dict(obj["timePeriod"]) if obj.get("timePeriod") is not None else None
102
108
  ),
File without changes
File without changes