Skip to content

Generator: Update SDK /services/stackitmarketplace #817

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 4, 2025
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Release (2025-XX-YY)
- `stackitmarketplace`: [0.3.0](services/stackitmarketplace/CHANGELOG.md#v030-2025-04-04)
- **Feature:** Add new `VendorProductId` attribute for subscription products

## Release (2025-03-27)
- `alb`: [v0.1.0](services/alb/CHANGELOG.md#v010-2025-03-18)
- **New**: Client for managing the ALB service
Expand Down
3 changes: 3 additions & 0 deletions services/stackitmarketplace/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v0.3.0 (2025-04-04)
- **Feature:** Add new `VendorProductId` attribute for subscription products

## v0.2.0 (2025-03-05)

- **Feature:** Add method to create inquiries: `InquiriesCreateInquiry`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@

import json
import pprint
import re
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing_extensions import Self
from typing_extensions import Annotated, Self


class SubscriptionProduct(BaseModel):
Expand All @@ -34,6 +35,9 @@ class SubscriptionProduct(BaseModel):
product_id: StrictStr = Field(description="The product ID.", alias="productId")
product_name: StrictStr = Field(description="The name of the product.", alias="productName")
vendor_name: StrictStr = Field(description="The product's vendor name.", alias="vendorName")
vendor_product_id: Optional[Annotated[str, Field(strict=True)]] = Field(
default=None, description="The product ID provided by the Vendor.", alias="vendorProductId"
)
vendor_website_url: StrictStr = Field(description="The vendor's website.", alias="vendorWebsiteUrl")
__properties: ClassVar[List[str]] = [
"deliveryMethod",
Expand All @@ -43,6 +47,7 @@ class SubscriptionProduct(BaseModel):
"productId",
"productName",
"vendorName",
"vendorProductId",
"vendorWebsiteUrl",
]

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

@field_validator("vendor_product_id")
def vendor_product_id_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if value is None:
return value

if not re.match(r"^[a-zA-Z0-9](?:[a-zA-Z0-9_+&-]){0,39}$", value):
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9](?:[a-zA-Z0-9_+&-]){0,39}$/")
return value

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
Expand Down Expand Up @@ -124,6 +139,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"productId": obj.get("productId"),
"productName": obj.get("productName"),
"vendorName": obj.get("vendorName"),
"vendorProductId": obj.get("vendorProductId"),
"vendorWebsiteUrl": obj.get("vendorWebsiteUrl"),
}
)
Expand Down
Loading