Skip to content

Commit a137a04

Browse files
stackit-pipelinebahkauv70
andauthoredApr 4, 2025
Generator: Update SDK /services/stackitmarketplace (#817)
* Generate stackitmarketplace * chore: updated changelogs --------- Co-authored-by: Rüdiger Schmitz <[email protected]>
1 parent 6877a31 commit a137a04

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
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-YY)
2+
- `stackitmarketplace`: [0.3.0](services/stackitmarketplace/CHANGELOG.md#v030-2025-04-04)
3+
- **Feature:** Add new `VendorProductId` attribute for subscription products
4+
15
## Release (2025-03-27)
26
- `alb`: [v0.1.0](services/alb/CHANGELOG.md#v010-2025-03-18)
37
- **New**: Client for managing the ALB service

‎services/stackitmarketplace/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v0.3.0 (2025-04-04)
2+
- **Feature:** Add new `VendorProductId` attribute for subscription products
3+
14
## v0.2.0 (2025-03-05)
25

36
- **Feature:** Add method to create inquiries: `InquiriesCreateInquiry`

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616

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

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

2425

2526
class SubscriptionProduct(BaseModel):
@@ -34,6 +35,9 @@ class SubscriptionProduct(BaseModel):
3435
product_id: StrictStr = Field(description="The product ID.", alias="productId")
3536
product_name: StrictStr = Field(description="The name of the product.", alias="productName")
3637
vendor_name: StrictStr = Field(description="The product's vendor name.", alias="vendorName")
38+
vendor_product_id: Optional[Annotated[str, Field(strict=True)]] = Field(
39+
default=None, description="The product ID provided by the Vendor.", alias="vendorProductId"
40+
)
3741
vendor_website_url: StrictStr = Field(description="The vendor's website.", alias="vendorWebsiteUrl")
3842
__properties: ClassVar[List[str]] = [
3943
"deliveryMethod",
@@ -43,6 +47,7 @@ class SubscriptionProduct(BaseModel):
4347
"productId",
4448
"productName",
4549
"vendorName",
50+
"vendorProductId",
4651
"vendorWebsiteUrl",
4752
]
4853

@@ -67,6 +72,16 @@ def price_type_validate_enum(cls, value):
6772
raise ValueError("must be one of enum values ('CONTRACT', 'FREE', 'FREE_TRIAL', 'BYOL', 'PAYG')")
6873
return value
6974

75+
@field_validator("vendor_product_id")
76+
def vendor_product_id_validate_regular_expression(cls, value):
77+
"""Validates the regular expression"""
78+
if value is None:
79+
return value
80+
81+
if not re.match(r"^[a-zA-Z0-9](?:[a-zA-Z0-9_+&-]){0,39}$", value):
82+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9](?:[a-zA-Z0-9_+&-]){0,39}$/")
83+
return value
84+
7085
model_config = ConfigDict(
7186
populate_by_name=True,
7287
validate_assignment=True,
@@ -124,6 +139,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
124139
"productId": obj.get("productId"),
125140
"productName": obj.get("productName"),
126141
"vendorName": obj.get("vendorName"),
142+
"vendorProductId": obj.get("vendorProductId"),
127143
"vendorWebsiteUrl": obj.get("vendorWebsiteUrl"),
128144
}
129145
)

0 commit comments

Comments
 (0)