stackit-stackitmarketplace 1.2.0__tar.gz → 1.3.0__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.
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/PKG-INFO +1 -1
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/pyproject.toml +1 -1
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/__init__.py +3 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/__init__.py +3 -0
- stackit_stackitmarketplace-1.3.0/src/stackit/stackitmarketplace/models/catalog_product_facets_value_inner.py +83 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/list_catalog_products_response.py +18 -1
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/LICENSE.md +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/NOTICE.txt +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/README.md +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/api/__init__.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/api/default_api.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/api_client.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/api_response.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/configuration.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/exceptions.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/approve_subscription_payload.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/become_vendor.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/catalog_pricing_option_highlight.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/catalog_product_detail.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/catalog_product_details_vendor.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/catalog_product_highlight.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/catalog_product_overview.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/catalog_product_overview_vendor.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/catalog_product_pricing_option.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/catalog_product_support_resource.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/catalog_product_vendor_terms.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/contact_sales.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/delivery_method.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/error_response.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/inquiries_create_inquiry_payload.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/inquiry_become_vendor.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/inquiry_contact_sales.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/inquiry_form_type.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/inquiry_register_testing.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/inquiry_suggest_product.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/list_vendor_subscriptions_response.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/price_type.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/pricing_option_unit.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/product_lifecycle_state.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/register_testing.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/resolve_customer_payload.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/subscription_lifecycle_state.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/subscription_product.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/suggest_product.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/models/vendor_subscription.py +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/py.typed +0 -0
- {stackit_stackitmarketplace-1.2.0 → stackit_stackitmarketplace-1.3.0}/src/stackit/stackitmarketplace/rest.py +0 -0
|
@@ -47,6 +47,9 @@ from stackit.stackitmarketplace.models.catalog_product_detail import (
|
|
|
47
47
|
from stackit.stackitmarketplace.models.catalog_product_details_vendor import (
|
|
48
48
|
CatalogProductDetailsVendor,
|
|
49
49
|
)
|
|
50
|
+
from stackit.stackitmarketplace.models.catalog_product_facets_value_inner import (
|
|
51
|
+
CatalogProductFacetsValueInner,
|
|
52
|
+
)
|
|
50
53
|
from stackit.stackitmarketplace.models.catalog_product_highlight import (
|
|
51
54
|
CatalogProductHighlight,
|
|
52
55
|
)
|
|
@@ -28,6 +28,9 @@ from stackit.stackitmarketplace.models.catalog_product_detail import (
|
|
|
28
28
|
from stackit.stackitmarketplace.models.catalog_product_details_vendor import (
|
|
29
29
|
CatalogProductDetailsVendor,
|
|
30
30
|
)
|
|
31
|
+
from stackit.stackitmarketplace.models.catalog_product_facets_value_inner import (
|
|
32
|
+
CatalogProductFacetsValueInner,
|
|
33
|
+
)
|
|
31
34
|
from stackit.stackitmarketplace.models.catalog_product_highlight import (
|
|
32
35
|
CatalogProductHighlight,
|
|
33
36
|
)
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
import pprint
|
|
19
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class CatalogProductFacetsValueInner(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
CatalogProductFacetsValueInner
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
count: StrictInt = Field(description="The number of items associated with this facet value.")
|
|
31
|
+
value: StrictStr = Field(description="The value of the facet.")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["count", "value"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of CatalogProductFacetsValueInner from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of CatalogProductFacetsValueInner from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({"count": obj.get("count"), "value": obj.get("value")})
|
|
83
|
+
return _obj
|
|
@@ -21,6 +21,9 @@ from typing import Any, ClassVar, Dict, List, Optional, Set, Union
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
22
|
from typing_extensions import Annotated, Self
|
|
23
23
|
|
|
24
|
+
from stackit.stackitmarketplace.models.catalog_product_facets_value_inner import (
|
|
25
|
+
CatalogProductFacetsValueInner,
|
|
26
|
+
)
|
|
24
27
|
from stackit.stackitmarketplace.models.catalog_product_overview import (
|
|
25
28
|
CatalogProductOverview,
|
|
26
29
|
)
|
|
@@ -34,11 +37,14 @@ class ListCatalogProductsResponse(BaseModel):
|
|
|
34
37
|
cursor: StrictStr = Field(
|
|
35
38
|
description="A pagination cursor that represents a position in the dataset. If given, results will be returned from the item after the cursor. If not given, results will be returned from the beginning."
|
|
36
39
|
)
|
|
40
|
+
facets: Optional[Dict[str, List[CatalogProductFacetsValueInner]]] = Field(
|
|
41
|
+
default=None, description="A collection of facets, where each key represents a facet category."
|
|
42
|
+
)
|
|
37
43
|
items: List[CatalogProductOverview]
|
|
38
44
|
limit: Union[
|
|
39
45
|
Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]
|
|
40
46
|
] = Field(description="Limit for returned Objects.")
|
|
41
|
-
__properties: ClassVar[List[str]] = ["cursor", "items", "limit"]
|
|
47
|
+
__properties: ClassVar[List[str]] = ["cursor", "facets", "items", "limit"]
|
|
42
48
|
|
|
43
49
|
model_config = ConfigDict(
|
|
44
50
|
populate_by_name=True,
|
|
@@ -77,6 +83,13 @@ class ListCatalogProductsResponse(BaseModel):
|
|
|
77
83
|
exclude=excluded_fields,
|
|
78
84
|
exclude_none=True,
|
|
79
85
|
)
|
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of each value in facets (dict of array)
|
|
87
|
+
_field_dict_of_array = {}
|
|
88
|
+
if self.facets:
|
|
89
|
+
for _key in self.facets:
|
|
90
|
+
if self.facets[_key] is not None:
|
|
91
|
+
_field_dict_of_array[_key] = [_item.to_dict() for _item in self.facets[_key]]
|
|
92
|
+
_dict["facets"] = _field_dict_of_array
|
|
80
93
|
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
81
94
|
_items = []
|
|
82
95
|
if self.items:
|
|
@@ -98,6 +111,10 @@ class ListCatalogProductsResponse(BaseModel):
|
|
|
98
111
|
_obj = cls.model_validate(
|
|
99
112
|
{
|
|
100
113
|
"cursor": obj.get("cursor"),
|
|
114
|
+
"facets": dict(
|
|
115
|
+
(_k, [CatalogProductFacetsValueInner.from_dict(_item) for _item in _v] if _v is not None else None)
|
|
116
|
+
for _k, _v in obj.get("facets", {}).items()
|
|
117
|
+
),
|
|
101
118
|
"items": (
|
|
102
119
|
[CatalogProductOverview.from_dict(_item) for _item in obj["items"]]
|
|
103
120
|
if obj.get("items") is not None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|