Skip to content

Commit a01d9a3

Browse files
Generate stackitmarketplace (#1293)
1 parent 3a29802 commit a01d9a3

File tree

4 files changed

+46
-2
lines changed

4 files changed

+46
-2
lines changed

services/stackitmarketplace/src/stackit/stackitmarketplace/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
from stackit.stackitmarketplace.models.list_vendor_subscriptions_response import (
9090
ListVendorSubscriptionsResponse,
9191
)
92+
from stackit.stackitmarketplace.models.offer_type import OfferType
9293
from stackit.stackitmarketplace.models.price_type import PriceType
9394
from stackit.stackitmarketplace.models.pricing_option_unit import PricingOptionUnit
9495
from stackit.stackitmarketplace.models.product_lifecycle_state import (

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
from stackit.stackitmarketplace.models.list_vendor_subscriptions_response import (
7171
ListVendorSubscriptionsResponse,
7272
)
73+
from stackit.stackitmarketplace.models.offer_type import OfferType
7374
from stackit.stackitmarketplace.models.price_type import PriceType
7475
from stackit.stackitmarketplace.models.pricing_option_unit import PricingOptionUnit
7576
from stackit.stackitmarketplace.models.product_lifecycle_state import (

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
CatalogProductVendorTerms,
4747
)
4848
from stackit.stackitmarketplace.models.delivery_method import DeliveryMethod
49+
from stackit.stackitmarketplace.models.offer_type import OfferType
4950
from stackit.stackitmarketplace.models.product_lifecycle_state import (
5051
ProductLifecycleState,
5152
)
@@ -69,13 +70,15 @@ class CatalogProductDetail(BaseModel):
6970
industries: Optional[List[StrictStr]] = Field(
7071
default=None, description="The list of industries associated to the product."
7172
)
72-
is_product_listing: StrictBool = Field(
73-
description="If true, the product is not fully integrated but only listed. Product listings may not have prices and support information.",
73+
is_product_listing: Optional[StrictBool] = Field(
74+
default=None,
75+
description="If true, the product is not fully integrated but only listed. Product listings may not have prices and support information. Deprecated: Will be removed after 16.12.2025. Please use `offerType` as replacement.",
7476
alias="isProductListing",
7577
)
7678
lifecycle_state: ProductLifecycleState = Field(alias="lifecycleState")
7779
logo: Union[StrictBytes, StrictStr] = Field(description="The logo base64 encoded.")
7880
name: Annotated[str, Field(strict=True, max_length=512)] = Field(description="The name of the product.")
81+
offer_type: OfferType = Field(alias="offerType")
7982
pricing_options: List[CatalogProductPricingOption] = Field(
8083
description="The list of pricing options.", alias="pricingOptions"
8184
)
@@ -111,6 +114,7 @@ class CatalogProductDetail(BaseModel):
111114
"lifecycleState",
112115
"logo",
113116
"name",
117+
"offerType",
114118
"pricingOptions",
115119
"productId",
116120
"summary",
@@ -262,6 +266,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
262266
"lifecycleState": obj.get("lifecycleState"),
263267
"logo": obj.get("logo"),
264268
"name": obj.get("name"),
269+
"offerType": obj.get("offerType"),
265270
"pricingOptions": (
266271
[CatalogProductPricingOption.from_dict(_item) for _item in obj["pricingOptions"]]
267272
if obj.get("pricingOptions") is not None
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# coding: utf-8
2+
3+
"""
4+
STACKIT Marketplace API
5+
6+
API to manage STACKIT Marketplace.
7+
8+
The version of the OpenAPI document: 1
9+
Contact: marketplace@stackit.cloud
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
11+
12+
Do not edit the class manually.
13+
""" # noqa: E501 docstring might be too long
14+
15+
from __future__ import annotations
16+
17+
import json
18+
from enum import Enum
19+
20+
from typing_extensions import Self
21+
22+
23+
class OfferType(str, Enum):
24+
"""
25+
The offer type of a product reflecting the business model.
26+
"""
27+
28+
"""
29+
allowed enum values
30+
"""
31+
OFFER_LISTING = "OFFER_LISTING"
32+
OFFER_RESELLING = "OFFER_RESELLING"
33+
34+
@classmethod
35+
def from_json(cls, json_str: str) -> Self:
36+
"""Create an instance of OfferType from a JSON string"""
37+
return cls(json.loads(json_str))

0 commit comments

Comments
 (0)