diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/__init__.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/__init__.py index 463421676..be4cbfdb5 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/__init__.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/__init__.py @@ -31,43 +31,16 @@ "ApiException", "ApproveSubscriptionPayload", "Assets", - "BecomeVendor", - "CatalogPricingOptionHighlight", - "CatalogProductDetail", - "CatalogProductDetailsVendor", - "CatalogProductFacetsValueInner", - "CatalogProductHighlight", - "CatalogProductOverview", - "CatalogProductOverviewVendor", - "CatalogProductPricingOption", - "CatalogProductSupportResource", - "CatalogProductVendorTerms", - "ContactSales", "DeliveryMethod", "ErrorResponse", - "FreeTrial", - "InquiriesCreateInquiryPayload", - "InquiryBecomeVendor", - "InquiryContactSales", - "InquiryFormType", - "InquiryRegisterTesting", - "InquiryRequestPrivatePlan", - "InquirySuggestProduct", - "ListCatalogProductsResponse", "ListVendorSubscriptionsResponse", "LocalizedVersion", - "NoticePeriod", - "OfferType", "PriceType", - "PricingOptionUnit", "ProductLifecycleState", - "RegisterTesting", - "RequestPrivatePlan", "ResolveCustomerPayload", "ServiceCertificate", "SubscriptionLifecycleState", "SubscriptionProduct", - "SuggestProduct", "VendorSubscription", ] @@ -92,90 +65,22 @@ ApproveSubscriptionPayload as ApproveSubscriptionPayload, ) from stackit.stackitmarketplace.models.assets import Assets as Assets -from stackit.stackitmarketplace.models.become_vendor import BecomeVendor as BecomeVendor -from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import ( - CatalogPricingOptionHighlight as CatalogPricingOptionHighlight, -) -from stackit.stackitmarketplace.models.catalog_product_detail import ( - CatalogProductDetail as CatalogProductDetail, -) -from stackit.stackitmarketplace.models.catalog_product_details_vendor import ( - CatalogProductDetailsVendor as CatalogProductDetailsVendor, -) -from stackit.stackitmarketplace.models.catalog_product_facets_value_inner import ( - CatalogProductFacetsValueInner as CatalogProductFacetsValueInner, -) -from stackit.stackitmarketplace.models.catalog_product_highlight import ( - CatalogProductHighlight as CatalogProductHighlight, -) -from stackit.stackitmarketplace.models.catalog_product_overview import ( - CatalogProductOverview as CatalogProductOverview, -) -from stackit.stackitmarketplace.models.catalog_product_overview_vendor import ( - CatalogProductOverviewVendor as CatalogProductOverviewVendor, -) -from stackit.stackitmarketplace.models.catalog_product_pricing_option import ( - CatalogProductPricingOption as CatalogProductPricingOption, -) -from stackit.stackitmarketplace.models.catalog_product_support_resource import ( - CatalogProductSupportResource as CatalogProductSupportResource, -) -from stackit.stackitmarketplace.models.catalog_product_vendor_terms import ( - CatalogProductVendorTerms as CatalogProductVendorTerms, -) -from stackit.stackitmarketplace.models.contact_sales import ContactSales as ContactSales from stackit.stackitmarketplace.models.delivery_method import ( DeliveryMethod as DeliveryMethod, ) from stackit.stackitmarketplace.models.error_response import ( ErrorResponse as ErrorResponse, ) -from stackit.stackitmarketplace.models.free_trial import FreeTrial as FreeTrial -from stackit.stackitmarketplace.models.inquiries_create_inquiry_payload import ( - InquiriesCreateInquiryPayload as InquiriesCreateInquiryPayload, -) -from stackit.stackitmarketplace.models.inquiry_become_vendor import ( - InquiryBecomeVendor as InquiryBecomeVendor, -) -from stackit.stackitmarketplace.models.inquiry_contact_sales import ( - InquiryContactSales as InquiryContactSales, -) -from stackit.stackitmarketplace.models.inquiry_form_type import ( - InquiryFormType as InquiryFormType, -) -from stackit.stackitmarketplace.models.inquiry_register_testing import ( - InquiryRegisterTesting as InquiryRegisterTesting, -) -from stackit.stackitmarketplace.models.inquiry_request_private_plan import ( - InquiryRequestPrivatePlan as InquiryRequestPrivatePlan, -) -from stackit.stackitmarketplace.models.inquiry_suggest_product import ( - InquirySuggestProduct as InquirySuggestProduct, -) -from stackit.stackitmarketplace.models.list_catalog_products_response import ( - ListCatalogProductsResponse as ListCatalogProductsResponse, -) from stackit.stackitmarketplace.models.list_vendor_subscriptions_response import ( ListVendorSubscriptionsResponse as ListVendorSubscriptionsResponse, ) from stackit.stackitmarketplace.models.localized_version import ( LocalizedVersion as LocalizedVersion, ) -from stackit.stackitmarketplace.models.notice_period import NoticePeriod as NoticePeriod -from stackit.stackitmarketplace.models.offer_type import OfferType as OfferType from stackit.stackitmarketplace.models.price_type import PriceType as PriceType -from stackit.stackitmarketplace.models.pricing_option_unit import ( - PricingOptionUnit as PricingOptionUnit, -) from stackit.stackitmarketplace.models.product_lifecycle_state import ( ProductLifecycleState as ProductLifecycleState, ) -from stackit.stackitmarketplace.models.register_testing import ( - RegisterTesting as RegisterTesting, -) -from stackit.stackitmarketplace.models.request_private_plan import ( - RequestPrivatePlan as RequestPrivatePlan, -) from stackit.stackitmarketplace.models.resolve_customer_payload import ( ResolveCustomerPayload as ResolveCustomerPayload, ) @@ -188,9 +93,6 @@ from stackit.stackitmarketplace.models.subscription_product import ( SubscriptionProduct as SubscriptionProduct, ) -from stackit.stackitmarketplace.models.suggest_product import ( - SuggestProduct as SuggestProduct, -) from stackit.stackitmarketplace.models.vendor_subscription import ( VendorSubscription as VendorSubscription, ) diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/api/default_api.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/api/default_api.py index 31d9445f0..79fc3023e 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/api/default_api.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/api/default_api.py @@ -29,15 +29,6 @@ from stackit.stackitmarketplace.models.approve_subscription_payload import ( ApproveSubscriptionPayload, ) -from stackit.stackitmarketplace.models.catalog_product_detail import ( - CatalogProductDetail, -) -from stackit.stackitmarketplace.models.inquiries_create_inquiry_payload import ( - InquiriesCreateInquiryPayload, -) -from stackit.stackitmarketplace.models.list_catalog_products_response import ( - ListCatalogProductsResponse, -) from stackit.stackitmarketplace.models.list_vendor_subscriptions_response import ( ListVendorSubscriptionsResponse, ) @@ -343,261 +334,6 @@ def _approve_subscription_serialize( _request_auth=_request_auth, ) - @validate_call - def get_catalog_product( - self, - product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29, description="The product ID.")], - locale: Annotated[Optional[StrictStr], Field(description="The language of the response.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CatalogProductDetail: - """Get a product - - Get a product. - - :param product_id: The product ID. (required) - :type product_id: str - :param locale: The language of the response. - :type locale: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_catalog_product_serialize( - product_id=product_id, - locale=locale, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "CatalogProductDetail", - "400": "ErrorResponse", - "401": "ErrorResponse", - "403": "ErrorResponse", - "404": "ErrorResponse", - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def get_catalog_product_with_http_info( - self, - product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29, description="The product ID.")], - locale: Annotated[Optional[StrictStr], Field(description="The language of the response.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CatalogProductDetail]: - """Get a product - - Get a product. - - :param product_id: The product ID. (required) - :type product_id: str - :param locale: The language of the response. - :type locale: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_catalog_product_serialize( - product_id=product_id, - locale=locale, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "CatalogProductDetail", - "400": "ErrorResponse", - "401": "ErrorResponse", - "403": "ErrorResponse", - "404": "ErrorResponse", - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def get_catalog_product_without_preload_content( - self, - product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29, description="The product ID.")], - locale: Annotated[Optional[StrictStr], Field(description="The language of the response.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get a product - - Get a product. - - :param product_id: The product ID. (required) - :type product_id: str - :param locale: The language of the response. - :type locale: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_catalog_product_serialize( - product_id=product_id, - locale=locale, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "CatalogProductDetail", - "400": "ErrorResponse", - "401": "ErrorResponse", - "403": "ErrorResponse", - "404": "ErrorResponse", - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - return response_data.response - - def _get_catalog_product_serialize( - self, - product_id, - locale, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = {} - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if product_id is not None: - _path_params["productId"] = product_id - # process the query parameters - if locale is not None: - - _query_params.append(("locale", locale)) - - # process the header parameters - # process the form parameters - # process the body parameter - - # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - - # authentication setting - _auth_settings: List[str] = [] - - return self.api_client.param_serialize( - method="GET", - resource_path="/v1/catalog/products/{productId}", - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth, - ) - @validate_call def get_vendor_subscription( self, @@ -857,629 +593,6 @@ def _get_vendor_subscription_serialize( _request_auth=_request_auth, ) - @validate_call - def inquiries_create_inquiry( - self, - inquiries_create_inquiry_payload: InquiriesCreateInquiryPayload, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Create inquiry - - Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. - - :param inquiries_create_inquiry_payload: (required) - :type inquiries_create_inquiry_payload: InquiriesCreateInquiryPayload - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._inquiries_create_inquiry_serialize( - inquiries_create_inquiry_payload=inquiries_create_inquiry_payload, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "202": None, - "400": "ErrorResponse", - "401": "ErrorResponse", - "403": "ErrorResponse", - "404": "ErrorResponse", - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def inquiries_create_inquiry_with_http_info( - self, - inquiries_create_inquiry_payload: InquiriesCreateInquiryPayload, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Create inquiry - - Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. - - :param inquiries_create_inquiry_payload: (required) - :type inquiries_create_inquiry_payload: InquiriesCreateInquiryPayload - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._inquiries_create_inquiry_serialize( - inquiries_create_inquiry_payload=inquiries_create_inquiry_payload, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "202": None, - "400": "ErrorResponse", - "401": "ErrorResponse", - "403": "ErrorResponse", - "404": "ErrorResponse", - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def inquiries_create_inquiry_without_preload_content( - self, - inquiries_create_inquiry_payload: InquiriesCreateInquiryPayload, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create inquiry - - Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. - - :param inquiries_create_inquiry_payload: (required) - :type inquiries_create_inquiry_payload: InquiriesCreateInquiryPayload - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._inquiries_create_inquiry_serialize( - inquiries_create_inquiry_payload=inquiries_create_inquiry_payload, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "202": None, - "400": "ErrorResponse", - "401": "ErrorResponse", - "403": "ErrorResponse", - "404": "ErrorResponse", - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - return response_data.response - - def _inquiries_create_inquiry_serialize( - self, - inquiries_create_inquiry_payload, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = {} - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if inquiries_create_inquiry_payload is not None: - _body_params = inquiries_create_inquiry_payload - - # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [] - - return self.api_client.param_serialize( - method="POST", - resource_path="/v1/inquiries", - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth, - ) - - @validate_call - def list_catalog_products( - self, - cursor: Annotated[ - Optional[StrictStr], - Field( - 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." - ), - ] = None, - limit: Annotated[ - Optional[ - Union[ - Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)] - ] - ], - Field( - description="The maximum number of items to return in the response. If maximum is exceeded, maximum is used." - ), - ] = None, - locale: Annotated[Optional[StrictStr], Field(description="The language of the response.")] = None, - filter: Annotated[ - Optional[StrictStr], - Field( - description='Filter the products based on attributes, e.g., `deliveryMethod eq "SAAS"`. The supported operators are: - `PR` (present; `name pr`) - `EQ` (equal) - `NE` (not equal) - `CO` (contains; `text co "searching"`) - `SW` (starts with) - `EW` (ends with) - `GT` (greater than) - `LT` (less than) - `GE` (greater than or equal) - `LE` (less than or equal). These expressions can be logically linked with `AND` and `OR`. All attributes (and the special `text` attribute) can be used as filters, if the attribute type allows the operator. ' - ), - ] = None, - sort: Annotated[ - Optional[StrictStr], - Field( - description="Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`." - ), - ] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListCatalogProductsResponse: - """List all products - - List all products. - - :param cursor: 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. - :type cursor: str - :param limit: The maximum number of items to return in the response. If maximum is exceeded, maximum is used. - :type limit: float - :param locale: The language of the response. - :type locale: str - :param filter: Filter the products based on attributes, e.g., `deliveryMethod eq \"SAAS\"`. The supported operators are: - `PR` (present; `name pr`) - `EQ` (equal) - `NE` (not equal) - `CO` (contains; `text co \"searching\"`) - `SW` (starts with) - `EW` (ends with) - `GT` (greater than) - `LT` (less than) - `GE` (greater than or equal) - `LE` (less than or equal). These expressions can be logically linked with `AND` and `OR`. All attributes (and the special `text` attribute) can be used as filters, if the attribute type allows the operator. - :type filter: str - :param sort: Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`. - :type sort: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_catalog_products_serialize( - cursor=cursor, - limit=limit, - locale=locale, - filter=filter, - sort=sort, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCatalogProductsResponse", - "400": "ErrorResponse", - "401": "ErrorResponse", - "403": "ErrorResponse", - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def list_catalog_products_with_http_info( - self, - cursor: Annotated[ - Optional[StrictStr], - Field( - 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." - ), - ] = None, - limit: Annotated[ - Optional[ - Union[ - Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)] - ] - ], - Field( - description="The maximum number of items to return in the response. If maximum is exceeded, maximum is used." - ), - ] = None, - locale: Annotated[Optional[StrictStr], Field(description="The language of the response.")] = None, - filter: Annotated[ - Optional[StrictStr], - Field( - description='Filter the products based on attributes, e.g., `deliveryMethod eq "SAAS"`. The supported operators are: - `PR` (present; `name pr`) - `EQ` (equal) - `NE` (not equal) - `CO` (contains; `text co "searching"`) - `SW` (starts with) - `EW` (ends with) - `GT` (greater than) - `LT` (less than) - `GE` (greater than or equal) - `LE` (less than or equal). These expressions can be logically linked with `AND` and `OR`. All attributes (and the special `text` attribute) can be used as filters, if the attribute type allows the operator. ' - ), - ] = None, - sort: Annotated[ - Optional[StrictStr], - Field( - description="Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`." - ), - ] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListCatalogProductsResponse]: - """List all products - - List all products. - - :param cursor: 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. - :type cursor: str - :param limit: The maximum number of items to return in the response. If maximum is exceeded, maximum is used. - :type limit: float - :param locale: The language of the response. - :type locale: str - :param filter: Filter the products based on attributes, e.g., `deliveryMethod eq \"SAAS\"`. The supported operators are: - `PR` (present; `name pr`) - `EQ` (equal) - `NE` (not equal) - `CO` (contains; `text co \"searching\"`) - `SW` (starts with) - `EW` (ends with) - `GT` (greater than) - `LT` (less than) - `GE` (greater than or equal) - `LE` (less than or equal). These expressions can be logically linked with `AND` and `OR`. All attributes (and the special `text` attribute) can be used as filters, if the attribute type allows the operator. - :type filter: str - :param sort: Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`. - :type sort: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_catalog_products_serialize( - cursor=cursor, - limit=limit, - locale=locale, - filter=filter, - sort=sort, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCatalogProductsResponse", - "400": "ErrorResponse", - "401": "ErrorResponse", - "403": "ErrorResponse", - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def list_catalog_products_without_preload_content( - self, - cursor: Annotated[ - Optional[StrictStr], - Field( - 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." - ), - ] = None, - limit: Annotated[ - Optional[ - Union[ - Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)] - ] - ], - Field( - description="The maximum number of items to return in the response. If maximum is exceeded, maximum is used." - ), - ] = None, - locale: Annotated[Optional[StrictStr], Field(description="The language of the response.")] = None, - filter: Annotated[ - Optional[StrictStr], - Field( - description='Filter the products based on attributes, e.g., `deliveryMethod eq "SAAS"`. The supported operators are: - `PR` (present; `name pr`) - `EQ` (equal) - `NE` (not equal) - `CO` (contains; `text co "searching"`) - `SW` (starts with) - `EW` (ends with) - `GT` (greater than) - `LT` (less than) - `GE` (greater than or equal) - `LE` (less than or equal). These expressions can be logically linked with `AND` and `OR`. All attributes (and the special `text` attribute) can be used as filters, if the attribute type allows the operator. ' - ), - ] = None, - sort: Annotated[ - Optional[StrictStr], - Field( - description="Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`." - ), - ] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List all products - - List all products. - - :param cursor: 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. - :type cursor: str - :param limit: The maximum number of items to return in the response. If maximum is exceeded, maximum is used. - :type limit: float - :param locale: The language of the response. - :type locale: str - :param filter: Filter the products based on attributes, e.g., `deliveryMethod eq \"SAAS\"`. The supported operators are: - `PR` (present; `name pr`) - `EQ` (equal) - `NE` (not equal) - `CO` (contains; `text co \"searching\"`) - `SW` (starts with) - `EW` (ends with) - `GT` (greater than) - `LT` (less than) - `GE` (greater than or equal) - `LE` (less than or equal). These expressions can be logically linked with `AND` and `OR`. All attributes (and the special `text` attribute) can be used as filters, if the attribute type allows the operator. - :type filter: str - :param sort: Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`. - :type sort: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_catalog_products_serialize( - cursor=cursor, - limit=limit, - locale=locale, - filter=filter, - sort=sort, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCatalogProductsResponse", - "400": "ErrorResponse", - "401": "ErrorResponse", - "403": "ErrorResponse", - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - return response_data.response - - def _list_catalog_products_serialize( - self, - cursor, - limit, - locale, - filter, - sort, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = {} - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if cursor is not None: - - _query_params.append(("cursor", cursor)) - - if limit is not None: - - _query_params.append(("limit", limit)) - - if locale is not None: - - _query_params.append(("locale", locale)) - - if filter is not None: - - _query_params.append(("filter", filter)) - - if sort is not None: - - _query_params.append(("sort", sort)) - - # process the header parameters - # process the form parameters - # process the body parameter - - # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - - # authentication setting - _auth_settings: List[str] = [] - - return self.api_client.param_serialize( - method="GET", - resource_path="/v1/catalog/products", - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth, - ) - @validate_call def list_vendor_subscriptions( self, diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/__init__.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/__init__.py index aaa781e80..6f71c7bfe 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/__init__.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/__init__.py @@ -19,72 +19,16 @@ ApproveSubscriptionPayload, ) from stackit.stackitmarketplace.models.assets import Assets -from stackit.stackitmarketplace.models.become_vendor import BecomeVendor -from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import ( - CatalogPricingOptionHighlight, -) -from stackit.stackitmarketplace.models.catalog_product_detail import ( - CatalogProductDetail, -) -from stackit.stackitmarketplace.models.catalog_product_details_vendor import ( - CatalogProductDetailsVendor, -) -from stackit.stackitmarketplace.models.catalog_product_facets_value_inner import ( - CatalogProductFacetsValueInner, -) -from stackit.stackitmarketplace.models.catalog_product_highlight import ( - CatalogProductHighlight, -) -from stackit.stackitmarketplace.models.catalog_product_overview import ( - CatalogProductOverview, -) -from stackit.stackitmarketplace.models.catalog_product_overview_vendor import ( - CatalogProductOverviewVendor, -) -from stackit.stackitmarketplace.models.catalog_product_pricing_option import ( - CatalogProductPricingOption, -) -from stackit.stackitmarketplace.models.catalog_product_support_resource import ( - CatalogProductSupportResource, -) -from stackit.stackitmarketplace.models.catalog_product_vendor_terms import ( - CatalogProductVendorTerms, -) -from stackit.stackitmarketplace.models.contact_sales import ContactSales from stackit.stackitmarketplace.models.delivery_method import DeliveryMethod from stackit.stackitmarketplace.models.error_response import ErrorResponse -from stackit.stackitmarketplace.models.free_trial import FreeTrial -from stackit.stackitmarketplace.models.inquiries_create_inquiry_payload import ( - InquiriesCreateInquiryPayload, -) -from stackit.stackitmarketplace.models.inquiry_become_vendor import InquiryBecomeVendor -from stackit.stackitmarketplace.models.inquiry_contact_sales import InquiryContactSales -from stackit.stackitmarketplace.models.inquiry_form_type import InquiryFormType -from stackit.stackitmarketplace.models.inquiry_register_testing import ( - InquiryRegisterTesting, -) -from stackit.stackitmarketplace.models.inquiry_request_private_plan import ( - InquiryRequestPrivatePlan, -) -from stackit.stackitmarketplace.models.inquiry_suggest_product import ( - InquirySuggestProduct, -) -from stackit.stackitmarketplace.models.list_catalog_products_response import ( - ListCatalogProductsResponse, -) from stackit.stackitmarketplace.models.list_vendor_subscriptions_response import ( ListVendorSubscriptionsResponse, ) from stackit.stackitmarketplace.models.localized_version import LocalizedVersion -from stackit.stackitmarketplace.models.notice_period import NoticePeriod -from stackit.stackitmarketplace.models.offer_type import OfferType from stackit.stackitmarketplace.models.price_type import PriceType -from stackit.stackitmarketplace.models.pricing_option_unit import PricingOptionUnit from stackit.stackitmarketplace.models.product_lifecycle_state import ( ProductLifecycleState, ) -from stackit.stackitmarketplace.models.register_testing import RegisterTesting -from stackit.stackitmarketplace.models.request_private_plan import RequestPrivatePlan from stackit.stackitmarketplace.models.resolve_customer_payload import ( ResolveCustomerPayload, ) @@ -93,5 +37,4 @@ SubscriptionLifecycleState, ) from stackit.stackitmarketplace.models.subscription_product import SubscriptionProduct -from stackit.stackitmarketplace.models.suggest_product import SuggestProduct from stackit.stackitmarketplace.models.vendor_subscription import VendorSubscription