@@ -1514,9 +1514,9 @@ def list_vendor_subscriptions(
15141514 _headers : Optional [Dict [StrictStr , Any ]] = None ,
15151515 _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
15161516 ) -> ListVendorSubscriptionsResponse :
1517- """List all subscriptions
1517+ """List all subscriptions of a project.
15181518
1519- List all subscriptions.
1519+ List all subscriptions of a project .
15201520
15211521 :param project_id: The project ID. (required)
15221522 :type project_id: str
@@ -1606,9 +1606,9 @@ def list_vendor_subscriptions_with_http_info(
16061606 _headers : Optional [Dict [StrictStr , Any ]] = None ,
16071607 _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
16081608 ) -> ApiResponse [ListVendorSubscriptionsResponse ]:
1609- """List all subscriptions
1609+ """List all subscriptions of a project.
16101610
1611- List all subscriptions.
1611+ List all subscriptions of a project .
16121612
16131613 :param project_id: The project ID. (required)
16141614 :type project_id: str
@@ -1698,9 +1698,9 @@ def list_vendor_subscriptions_without_preload_content(
16981698 _headers : Optional [Dict [StrictStr , Any ]] = None ,
16991699 _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
17001700 ) -> RESTResponseType :
1701- """List all subscriptions
1701+ """List all subscriptions of a project.
17021702
1703- List all subscriptions.
1703+ List all subscriptions of a project .
17041704
17051705 :param project_id: The project ID. (required)
17061706 :type project_id: str
@@ -2077,3 +2077,262 @@ def _resolve_customer_serialize(
20772077 _host = _host ,
20782078 _request_auth = _request_auth ,
20792079 )
2080+
2081+ @validate_call
2082+ def vendors_subscriptions_reject (
2083+ self ,
2084+ project_id : Annotated [str , Field (min_length = 36 , strict = True , max_length = 36 , description = "The project ID." )],
2085+ subscription_id : Annotated [
2086+ str , Field (min_length = 36 , strict = True , max_length = 36 , description = "The subscription ID." )
2087+ ],
2088+ _request_timeout : Union [
2089+ None ,
2090+ Annotated [StrictFloat , Field (gt = 0 )],
2091+ Tuple [Annotated [StrictFloat , Field (gt = 0 )], Annotated [StrictFloat , Field (gt = 0 )]],
2092+ ] = None ,
2093+ _request_auth : Optional [Dict [StrictStr , Any ]] = None ,
2094+ _content_type : Optional [StrictStr ] = None ,
2095+ _headers : Optional [Dict [StrictStr , Any ]] = None ,
2096+ _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
2097+ ) -> None :
2098+ """Reject a subscription
2099+
2100+ Reject a subscription (in any lifecycle state). Only available for subscriptions to products with lifecycle state `PRODUCT_PREVIEW`.
2101+
2102+ :param project_id: The project ID. (required)
2103+ :type project_id: str
2104+ :param subscription_id: The subscription ID. (required)
2105+ :type subscription_id: str
2106+ :param _request_timeout: timeout setting for this request. If one
2107+ number provided, it will be total request
2108+ timeout. It can also be a pair (tuple) of
2109+ (connection, read) timeouts.
2110+ :type _request_timeout: int, tuple(int, int), optional
2111+ :param _request_auth: set to override the auth_settings for an a single
2112+ request; this effectively ignores the
2113+ authentication in the spec for a single request.
2114+ :type _request_auth: dict, optional
2115+ :param _content_type: force content-type for the request.
2116+ :type _content_type: str, Optional
2117+ :param _headers: set to override the headers for a single
2118+ request; this effectively ignores the headers
2119+ in the spec for a single request.
2120+ :type _headers: dict, optional
2121+ :param _host_index: set to override the host_index for a single
2122+ request; this effectively ignores the host_index
2123+ in the spec for a single request.
2124+ :type _host_index: int, optional
2125+ :return: Returns the result object.
2126+ """ # noqa: E501 docstring might be too long
2127+
2128+ _param = self ._vendors_subscriptions_reject_serialize (
2129+ project_id = project_id ,
2130+ subscription_id = subscription_id ,
2131+ _request_auth = _request_auth ,
2132+ _content_type = _content_type ,
2133+ _headers = _headers ,
2134+ _host_index = _host_index ,
2135+ )
2136+
2137+ _response_types_map : Dict [str , Optional [str ]] = {
2138+ "204" : None ,
2139+ "400" : "ErrorResponse" ,
2140+ "401" : "ErrorResponse" ,
2141+ "403" : "ErrorResponse" ,
2142+ "404" : "ErrorResponse" ,
2143+ }
2144+ response_data = self .api_client .call_api (* _param , _request_timeout = _request_timeout )
2145+ response_data .read ()
2146+ return self .api_client .response_deserialize (
2147+ response_data = response_data ,
2148+ response_types_map = _response_types_map ,
2149+ ).data
2150+
2151+ @validate_call
2152+ def vendors_subscriptions_reject_with_http_info (
2153+ self ,
2154+ project_id : Annotated [str , Field (min_length = 36 , strict = True , max_length = 36 , description = "The project ID." )],
2155+ subscription_id : Annotated [
2156+ str , Field (min_length = 36 , strict = True , max_length = 36 , description = "The subscription ID." )
2157+ ],
2158+ _request_timeout : Union [
2159+ None ,
2160+ Annotated [StrictFloat , Field (gt = 0 )],
2161+ Tuple [Annotated [StrictFloat , Field (gt = 0 )], Annotated [StrictFloat , Field (gt = 0 )]],
2162+ ] = None ,
2163+ _request_auth : Optional [Dict [StrictStr , Any ]] = None ,
2164+ _content_type : Optional [StrictStr ] = None ,
2165+ _headers : Optional [Dict [StrictStr , Any ]] = None ,
2166+ _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
2167+ ) -> ApiResponse [None ]:
2168+ """Reject a subscription
2169+
2170+ Reject a subscription (in any lifecycle state). Only available for subscriptions to products with lifecycle state `PRODUCT_PREVIEW`.
2171+
2172+ :param project_id: The project ID. (required)
2173+ :type project_id: str
2174+ :param subscription_id: The subscription ID. (required)
2175+ :type subscription_id: str
2176+ :param _request_timeout: timeout setting for this request. If one
2177+ number provided, it will be total request
2178+ timeout. It can also be a pair (tuple) of
2179+ (connection, read) timeouts.
2180+ :type _request_timeout: int, tuple(int, int), optional
2181+ :param _request_auth: set to override the auth_settings for an a single
2182+ request; this effectively ignores the
2183+ authentication in the spec for a single request.
2184+ :type _request_auth: dict, optional
2185+ :param _content_type: force content-type for the request.
2186+ :type _content_type: str, Optional
2187+ :param _headers: set to override the headers for a single
2188+ request; this effectively ignores the headers
2189+ in the spec for a single request.
2190+ :type _headers: dict, optional
2191+ :param _host_index: set to override the host_index for a single
2192+ request; this effectively ignores the host_index
2193+ in the spec for a single request.
2194+ :type _host_index: int, optional
2195+ :return: Returns the result object.
2196+ """ # noqa: E501 docstring might be too long
2197+
2198+ _param = self ._vendors_subscriptions_reject_serialize (
2199+ project_id = project_id ,
2200+ subscription_id = subscription_id ,
2201+ _request_auth = _request_auth ,
2202+ _content_type = _content_type ,
2203+ _headers = _headers ,
2204+ _host_index = _host_index ,
2205+ )
2206+
2207+ _response_types_map : Dict [str , Optional [str ]] = {
2208+ "204" : None ,
2209+ "400" : "ErrorResponse" ,
2210+ "401" : "ErrorResponse" ,
2211+ "403" : "ErrorResponse" ,
2212+ "404" : "ErrorResponse" ,
2213+ }
2214+ response_data = self .api_client .call_api (* _param , _request_timeout = _request_timeout )
2215+ response_data .read ()
2216+ return self .api_client .response_deserialize (
2217+ response_data = response_data ,
2218+ response_types_map = _response_types_map ,
2219+ )
2220+
2221+ @validate_call
2222+ def vendors_subscriptions_reject_without_preload_content (
2223+ self ,
2224+ project_id : Annotated [str , Field (min_length = 36 , strict = True , max_length = 36 , description = "The project ID." )],
2225+ subscription_id : Annotated [
2226+ str , Field (min_length = 36 , strict = True , max_length = 36 , description = "The subscription ID." )
2227+ ],
2228+ _request_timeout : Union [
2229+ None ,
2230+ Annotated [StrictFloat , Field (gt = 0 )],
2231+ Tuple [Annotated [StrictFloat , Field (gt = 0 )], Annotated [StrictFloat , Field (gt = 0 )]],
2232+ ] = None ,
2233+ _request_auth : Optional [Dict [StrictStr , Any ]] = None ,
2234+ _content_type : Optional [StrictStr ] = None ,
2235+ _headers : Optional [Dict [StrictStr , Any ]] = None ,
2236+ _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
2237+ ) -> RESTResponseType :
2238+ """Reject a subscription
2239+
2240+ Reject a subscription (in any lifecycle state). Only available for subscriptions to products with lifecycle state `PRODUCT_PREVIEW`.
2241+
2242+ :param project_id: The project ID. (required)
2243+ :type project_id: str
2244+ :param subscription_id: The subscription ID. (required)
2245+ :type subscription_id: str
2246+ :param _request_timeout: timeout setting for this request. If one
2247+ number provided, it will be total request
2248+ timeout. It can also be a pair (tuple) of
2249+ (connection, read) timeouts.
2250+ :type _request_timeout: int, tuple(int, int), optional
2251+ :param _request_auth: set to override the auth_settings for an a single
2252+ request; this effectively ignores the
2253+ authentication in the spec for a single request.
2254+ :type _request_auth: dict, optional
2255+ :param _content_type: force content-type for the request.
2256+ :type _content_type: str, Optional
2257+ :param _headers: set to override the headers for a single
2258+ request; this effectively ignores the headers
2259+ in the spec for a single request.
2260+ :type _headers: dict, optional
2261+ :param _host_index: set to override the host_index for a single
2262+ request; this effectively ignores the host_index
2263+ in the spec for a single request.
2264+ :type _host_index: int, optional
2265+ :return: Returns the result object.
2266+ """ # noqa: E501 docstring might be too long
2267+
2268+ _param = self ._vendors_subscriptions_reject_serialize (
2269+ project_id = project_id ,
2270+ subscription_id = subscription_id ,
2271+ _request_auth = _request_auth ,
2272+ _content_type = _content_type ,
2273+ _headers = _headers ,
2274+ _host_index = _host_index ,
2275+ )
2276+
2277+ _response_types_map : Dict [str , Optional [str ]] = {
2278+ "204" : None ,
2279+ "400" : "ErrorResponse" ,
2280+ "401" : "ErrorResponse" ,
2281+ "403" : "ErrorResponse" ,
2282+ "404" : "ErrorResponse" ,
2283+ }
2284+ response_data = self .api_client .call_api (* _param , _request_timeout = _request_timeout )
2285+ return response_data .response
2286+
2287+ def _vendors_subscriptions_reject_serialize (
2288+ self ,
2289+ project_id ,
2290+ subscription_id ,
2291+ _request_auth ,
2292+ _content_type ,
2293+ _headers ,
2294+ _host_index ,
2295+ ) -> RequestSerialized :
2296+
2297+ _host = None
2298+
2299+ _collection_formats : Dict [str , str ] = {}
2300+
2301+ _path_params : Dict [str , str ] = {}
2302+ _query_params : List [Tuple [str , str ]] = []
2303+ _header_params : Dict [str , Optional [str ]] = _headers or {}
2304+ _form_params : List [Tuple [str , str ]] = []
2305+ _files : Dict [str , Union [str , bytes ]] = {}
2306+ _body_params : Optional [bytes ] = None
2307+
2308+ # process the path parameters
2309+ if project_id is not None :
2310+ _path_params ["projectId" ] = project_id
2311+ if subscription_id is not None :
2312+ _path_params ["subscriptionId" ] = subscription_id
2313+ # process the query parameters
2314+ # process the header parameters
2315+ # process the form parameters
2316+ # process the body parameter
2317+
2318+ # set the HTTP header `Accept`
2319+ if "Accept" not in _header_params :
2320+ _header_params ["Accept" ] = self .api_client .select_header_accept (["application/json" ])
2321+
2322+ # authentication setting
2323+ _auth_settings : List [str ] = []
2324+
2325+ return self .api_client .param_serialize (
2326+ method = "POST" ,
2327+ resource_path = "/v1/vendors/projects/{projectId}/subscriptions/{subscriptionId}/reject" ,
2328+ path_params = _path_params ,
2329+ query_params = _query_params ,
2330+ header_params = _header_params ,
2331+ body = _body_params ,
2332+ post_params = _form_params ,
2333+ files = _files ,
2334+ auth_settings = _auth_settings ,
2335+ collection_formats = _collection_formats ,
2336+ _host = _host ,
2337+ _request_auth = _request_auth ,
2338+ )
0 commit comments