Skip to content

Commit 023e7fc

Browse files
Generator: Update SDK /services/stackitmarketplace (#2278)
* Generate stackitmarketplace * Add changelog Signed-off-by: Alexander Dahmen <[email protected]> --------- Signed-off-by: Alexander Dahmen <[email protected]> Co-authored-by: Alexander Dahmen <[email protected]>
1 parent b2716d0 commit 023e7fc

File tree

5 files changed

+35
-3
lines changed

5 files changed

+35
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## Release (2025-xx-xx)
2+
- `stackitmarketplace`: [v1.10.0](services/stackitmarketplace/CHANGELOG.md#v1100)
3+
- **Feature:** Added `PlanId` to `CatalogProductPricingOption`and `SubscriptionProduct`
4+
15
## Release (2025-09-11)
26
- `cdn`: [v1.6.0](services/cdn/CHANGELOG.md#v160)
37
- **Feature:** Added Attribute `LogSink` to `ConfigPatch`

services/stackitmarketplace/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v1.10.0
2+
- **Feature:** Added `PlanId` to `CatalogProductPricingOption`and `SubscriptionProduct`
3+
14
## v1.9.0
25
- **Feature:** Added `RequestPrivatePlan` to `InquiriesCreateInquiryPayload`
36

services/stackitmarketplace/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "stackit-stackitmarketplace"
33

44
[tool.poetry]
55
name = "stackit-stackitmarketplace"
6-
version = "v1.9.0"
6+
version = "v1.10.0"
77
authors = [
88
"STACKIT Developer Tools <[email protected]>",
99
]

services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_pricing_option.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616

1717
import json
1818
import pprint
19+
import re # noqa: F401
1920
from typing import Any, ClassVar, Dict, List, Optional, Set
2021

21-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
22-
from typing_extensions import Self
22+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
23+
from typing_extensions import Annotated, Self
2324

2425
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
2526
CatalogPricingOptionHighlight,
@@ -38,6 +39,9 @@ class CatalogProductPricingOption(BaseModel):
3839
highlights: List[CatalogPricingOptionHighlight] = Field(description="The list of highlights.")
3940
name: StrictStr = Field(description="The pricing option name.")
4041
notice_period: Optional[NoticePeriod] = Field(default=None, alias="noticePeriod")
42+
plan_id: Annotated[str, Field(min_length=10, strict=True, max_length=29)] = Field(
43+
description="The user-readable plan ID of a pricing option.", alias="planId"
44+
)
4145
price_type: Optional[PriceType] = Field(default=None, alias="priceType")
4246
pricing_plan: Optional[StrictStr] = Field(
4347
default=None, description="Additional price type information.", alias="pricingPlan"
@@ -54,6 +58,7 @@ class CatalogProductPricingOption(BaseModel):
5458
"highlights",
5559
"name",
5660
"noticePeriod",
61+
"planId",
5762
"priceType",
5863
"pricingPlan",
5964
"rate",
@@ -63,6 +68,13 @@ class CatalogProductPricingOption(BaseModel):
6368
"unit",
6469
]
6570

71+
@field_validator("plan_id")
72+
def plan_id_validate_regular_expression(cls, value):
73+
"""Validates the regular expression"""
74+
if not re.match(r"^[a-z0-9-]{1,20}-[0-9a-f]{8}$", value):
75+
raise ValueError(r"must validate the regular expression /^[a-z0-9-]{1,20}-[0-9a-f]{8}$/")
76+
return value
77+
6678
model_config = ConfigDict(
6779
populate_by_name=True,
6880
validate_assignment=True,
@@ -133,6 +145,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
133145
"noticePeriod": (
134146
NoticePeriod.from_dict(obj["noticePeriod"]) if obj.get("noticePeriod") is not None else None
135147
),
148+
"planId": obj.get("planId"),
136149
"priceType": obj.get("priceType"),
137150
"pricingPlan": obj.get("pricingPlan"),
138151
"rate": obj.get("rate"),

services/stackitmarketplace/src/stackit/stackitmarketplace/models/subscription_product.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ class SubscriptionProduct(BaseModel):
3838
assets: Optional[Assets] = None
3939
delivery_method: DeliveryMethod = Field(alias="deliveryMethod")
4040
lifecycle_state: ProductLifecycleState = Field(alias="lifecycleState")
41+
plan_id: Annotated[str, Field(min_length=10, strict=True, max_length=29)] = Field(
42+
description="The user-readable plan ID of a pricing option.", alias="planId"
43+
)
4144
price_type: PriceType = Field(alias="priceType")
4245
pricing_plan: StrictStr = Field(description="Additional price type information.", alias="pricingPlan")
4346
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29)] = Field(
@@ -62,6 +65,7 @@ class SubscriptionProduct(BaseModel):
6265
"assets",
6366
"deliveryMethod",
6467
"lifecycleState",
68+
"planId",
6569
"priceType",
6670
"pricingPlan",
6771
"productId",
@@ -72,6 +76,13 @@ class SubscriptionProduct(BaseModel):
7276
"vendorWebsiteUrl",
7377
]
7478

79+
@field_validator("plan_id")
80+
def plan_id_validate_regular_expression(cls, value):
81+
"""Validates the regular expression"""
82+
if not re.match(r"^[a-z0-9-]{1,20}-[0-9a-f]{8}$", value):
83+
raise ValueError(r"must validate the regular expression /^[a-z0-9-]{1,20}-[0-9a-f]{8}$/")
84+
return value
85+
7586
@field_validator("product_id")
7687
def product_id_validate_regular_expression(cls, value):
7788
"""Validates the regular expression"""
@@ -178,6 +189,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
178189
"assets": Assets.from_dict(obj["assets"]) if obj.get("assets") is not None else None,
179190
"deliveryMethod": obj.get("deliveryMethod"),
180191
"lifecycleState": obj.get("lifecycleState"),
192+
"planId": obj.get("planId"),
181193
"priceType": obj.get("priceType"),
182194
"pricingPlan": obj.get("pricingPlan"),
183195
"productId": obj.get("productId"),

0 commit comments

Comments
 (0)