waldur-api-client 7.7.1__py3-none-any.whl → 7.7.3__py3-none-any.whl

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.

Potentially problematic release.


This version of waldur-api-client might be problematic. Click here for more details.

Files changed (90) hide show
  1. waldur_api_client/api/marketplace_checklists/marketplace_checklists_questions_list.py +31 -32
  2. waldur_api_client/api/marketplace_checklists/marketplace_checklists_retrieve.py +15 -14
  3. waldur_api_client/api/marketplace_checklists_admin/__init__.py +1 -0
  4. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_checklist_questions.py +187 -0
  5. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_create.py +150 -0
  6. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_destroy.py +89 -0
  7. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_list.py +173 -0
  8. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_partial_update.py +164 -0
  9. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_retrieve.py +142 -0
  10. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_update.py +164 -0
  11. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/__init__.py +1 -0
  12. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_create.py +150 -0
  13. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_destroy.py +89 -0
  14. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_list.py +212 -0
  15. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_partial_update.py +164 -0
  16. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_retrieve.py +142 -0
  17. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_update.py +164 -0
  18. waldur_api_client/api/marketplace_checklists_admin_question_options/__init__.py +1 -0
  19. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_create.py +150 -0
  20. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_destroy.py +89 -0
  21. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_list.py +194 -0
  22. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_partial_update.py +164 -0
  23. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_retrieve.py +142 -0
  24. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_update.py +164 -0
  25. waldur_api_client/api/marketplace_checklists_admin_questions/__init__.py +1 -0
  26. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_create.py +148 -0
  27. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_destroy.py +89 -0
  28. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_list.py +192 -0
  29. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_partial_update.py +162 -0
  30. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_retrieve.py +140 -0
  31. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_update.py +162 -0
  32. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_list.py +23 -0
  33. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_set_pending_account_linking.py +105 -0
  34. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_set_pending_additional_validation.py +105 -0
  35. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_set_validation_complete.py +105 -0
  36. waldur_api_client/models/__init__.py +44 -2
  37. waldur_api_client/models/answer_list.py +8 -19
  38. waldur_api_client/models/answer_submit.py +7 -13
  39. waldur_api_client/models/answer_submit_request.py +7 -13
  40. waldur_api_client/models/booking_resource.py +18 -0
  41. waldur_api_client/models/booking_resources_list_field_item.py +2 -0
  42. waldur_api_client/models/booking_resources_retrieve_field_item.py +2 -0
  43. waldur_api_client/models/call_resource_template.py +23 -1
  44. waldur_api_client/models/checklist.py +8 -0
  45. waldur_api_client/models/checklist_admin.py +127 -0
  46. waldur_api_client/models/checklist_type_enum.py +10 -0
  47. waldur_api_client/models/create_checklist.py +131 -0
  48. waldur_api_client/models/create_checklist_request.py +90 -0
  49. waldur_api_client/models/event_types_enum.py +1 -0
  50. waldur_api_client/models/group_invitation.py +27 -3
  51. waldur_api_client/models/group_invitation_request.py +18 -0
  52. waldur_api_client/models/impact_level_display_enum.py +11 -0
  53. waldur_api_client/models/invitation.py +10 -4
  54. waldur_api_client/models/maintenance_announcement.py +8 -0
  55. waldur_api_client/models/maintenance_announcement_offering.py +17 -0
  56. waldur_api_client/models/maintenance_announcement_state_enum.py +7 -7
  57. waldur_api_client/models/marketplace_offering_users_list_field_item.py +2 -0
  58. waldur_api_client/models/marketplace_offering_users_list_state_item.py +16 -0
  59. waldur_api_client/models/marketplace_offering_users_retrieve_field_item.py +2 -0
  60. waldur_api_client/models/marketplace_provider_resources_details_retrieve_field_item.py +2 -0
  61. waldur_api_client/models/marketplace_provider_resources_list_field_item.py +2 -0
  62. waldur_api_client/models/marketplace_provider_resources_retrieve_field_item.py +2 -0
  63. waldur_api_client/models/marketplace_resources_details_retrieve_field_item.py +2 -0
  64. waldur_api_client/models/marketplace_resources_list_field_item.py +2 -0
  65. waldur_api_client/models/marketplace_resources_retrieve_field_item.py +2 -0
  66. waldur_api_client/models/offering_user.py +27 -0
  67. waldur_api_client/models/offering_user_state_enum.py +16 -0
  68. waldur_api_client/models/offering_user_state_transition_request.py +59 -0
  69. waldur_api_client/models/open_stack_port.py +15 -4
  70. waldur_api_client/models/open_stack_router.py +15 -4
  71. waldur_api_client/models/operator_enum.py +12 -0
  72. waldur_api_client/models/patched_create_checklist_request.py +96 -0
  73. waldur_api_client/models/patched_question_admin_request.py +208 -0
  74. waldur_api_client/models/patched_question_dependency_request.py +94 -0
  75. waldur_api_client/models/patched_question_options_admin_request.py +68 -0
  76. waldur_api_client/models/{checklist_question.py → question.py} +29 -16
  77. waldur_api_client/models/question_admin.py +260 -0
  78. waldur_api_client/models/question_admin_request.py +210 -0
  79. waldur_api_client/models/question_dependency.py +127 -0
  80. waldur_api_client/models/question_dependency_request.py +94 -0
  81. waldur_api_client/models/question_options.py +79 -0
  82. waldur_api_client/models/question_options_admin.py +103 -0
  83. waldur_api_client/models/question_options_admin_request.py +78 -0
  84. waldur_api_client/models/question_type_enum.py +15 -0
  85. waldur_api_client/models/resource.py +18 -0
  86. waldur_api_client/models/visible_invitation_details.py +10 -4
  87. {waldur_api_client-7.7.1.dist-info → waldur_api_client-7.7.3.dist-info}/METADATA +1 -1
  88. {waldur_api_client-7.7.1.dist-info → waldur_api_client-7.7.3.dist-info}/RECORD +90 -37
  89. {waldur_api_client-7.7.1.dist-info → waldur_api_client-7.7.3.dist-info}/LICENSE +0 -0
  90. {waldur_api_client-7.7.1.dist-info → waldur_api_client-7.7.3.dist-info}/WHEEL +0 -0
@@ -0,0 +1,140 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Union
3
+ from uuid import UUID
4
+
5
+ import httpx
6
+
7
+ from ... import errors
8
+ from ...client import AuthenticatedClient, Client
9
+ from ...models.question_admin import QuestionAdmin
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ uuid: UUID,
15
+ ) -> dict[str, Any]:
16
+ _kwargs: dict[str, Any] = {
17
+ "method": "get",
18
+ "url": f"/api/marketplace-checklists-admin-questions/{uuid}/",
19
+ }
20
+
21
+ return _kwargs
22
+
23
+
24
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> QuestionAdmin:
25
+ if response.status_code == 200:
26
+ response_200 = QuestionAdmin.from_dict(response.json())
27
+
28
+ return response_200
29
+ raise errors.UnexpectedStatus(response.status_code, response.content)
30
+
31
+
32
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[QuestionAdmin]:
33
+ return Response(
34
+ status_code=HTTPStatus(response.status_code),
35
+ content=response.content,
36
+ headers=response.headers,
37
+ parsed=_parse_response(client=client, response=response),
38
+ )
39
+
40
+
41
+ def sync_detailed(
42
+ uuid: UUID,
43
+ *,
44
+ client: AuthenticatedClient,
45
+ ) -> Response[QuestionAdmin]:
46
+ """
47
+ Args:
48
+ uuid (UUID):
49
+
50
+ Raises:
51
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
52
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
53
+
54
+ Returns:
55
+ Response[QuestionAdmin]
56
+ """
57
+
58
+ kwargs = _get_kwargs(
59
+ uuid=uuid,
60
+ )
61
+
62
+ response = client.get_httpx_client().request(
63
+ **kwargs,
64
+ )
65
+
66
+ return _build_response(client=client, response=response)
67
+
68
+
69
+ def sync(
70
+ uuid: UUID,
71
+ *,
72
+ client: AuthenticatedClient,
73
+ ) -> QuestionAdmin:
74
+ """
75
+ Args:
76
+ uuid (UUID):
77
+
78
+ Raises:
79
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
80
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
81
+
82
+ Returns:
83
+ QuestionAdmin
84
+ """
85
+
86
+ return sync_detailed(
87
+ uuid=uuid,
88
+ client=client,
89
+ ).parsed
90
+
91
+
92
+ async def asyncio_detailed(
93
+ uuid: UUID,
94
+ *,
95
+ client: AuthenticatedClient,
96
+ ) -> Response[QuestionAdmin]:
97
+ """
98
+ Args:
99
+ uuid (UUID):
100
+
101
+ Raises:
102
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
103
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
104
+
105
+ Returns:
106
+ Response[QuestionAdmin]
107
+ """
108
+
109
+ kwargs = _get_kwargs(
110
+ uuid=uuid,
111
+ )
112
+
113
+ response = await client.get_async_httpx_client().request(**kwargs)
114
+
115
+ return _build_response(client=client, response=response)
116
+
117
+
118
+ async def asyncio(
119
+ uuid: UUID,
120
+ *,
121
+ client: AuthenticatedClient,
122
+ ) -> QuestionAdmin:
123
+ """
124
+ Args:
125
+ uuid (UUID):
126
+
127
+ Raises:
128
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
129
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
130
+
131
+ Returns:
132
+ QuestionAdmin
133
+ """
134
+
135
+ return (
136
+ await asyncio_detailed(
137
+ uuid=uuid,
138
+ client=client,
139
+ )
140
+ ).parsed
@@ -0,0 +1,162 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Union
3
+ from uuid import UUID
4
+
5
+ import httpx
6
+
7
+ from ... import errors
8
+ from ...client import AuthenticatedClient, Client
9
+ from ...models.question_admin import QuestionAdmin
10
+ from ...models.question_admin_request import QuestionAdminRequest
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ uuid: UUID,
16
+ *,
17
+ body: QuestionAdminRequest,
18
+ ) -> dict[str, Any]:
19
+ headers: dict[str, Any] = {}
20
+
21
+ _kwargs: dict[str, Any] = {
22
+ "method": "put",
23
+ "url": f"/api/marketplace-checklists-admin-questions/{uuid}/",
24
+ }
25
+
26
+ _kwargs["json"] = body.to_dict()
27
+
28
+ headers["Content-Type"] = "application/json"
29
+
30
+ _kwargs["headers"] = headers
31
+ return _kwargs
32
+
33
+
34
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> QuestionAdmin:
35
+ if response.status_code == 200:
36
+ response_200 = QuestionAdmin.from_dict(response.json())
37
+
38
+ return response_200
39
+ raise errors.UnexpectedStatus(response.status_code, response.content)
40
+
41
+
42
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[QuestionAdmin]:
43
+ return Response(
44
+ status_code=HTTPStatus(response.status_code),
45
+ content=response.content,
46
+ headers=response.headers,
47
+ parsed=_parse_response(client=client, response=response),
48
+ )
49
+
50
+
51
+ def sync_detailed(
52
+ uuid: UUID,
53
+ *,
54
+ client: AuthenticatedClient,
55
+ body: QuestionAdminRequest,
56
+ ) -> Response[QuestionAdmin]:
57
+ """
58
+ Args:
59
+ uuid (UUID):
60
+ body (QuestionAdminRequest):
61
+
62
+ Raises:
63
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
64
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
65
+
66
+ Returns:
67
+ Response[QuestionAdmin]
68
+ """
69
+
70
+ kwargs = _get_kwargs(
71
+ uuid=uuid,
72
+ body=body,
73
+ )
74
+
75
+ response = client.get_httpx_client().request(
76
+ **kwargs,
77
+ )
78
+
79
+ return _build_response(client=client, response=response)
80
+
81
+
82
+ def sync(
83
+ uuid: UUID,
84
+ *,
85
+ client: AuthenticatedClient,
86
+ body: QuestionAdminRequest,
87
+ ) -> QuestionAdmin:
88
+ """
89
+ Args:
90
+ uuid (UUID):
91
+ body (QuestionAdminRequest):
92
+
93
+ Raises:
94
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
95
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
96
+
97
+ Returns:
98
+ QuestionAdmin
99
+ """
100
+
101
+ return sync_detailed(
102
+ uuid=uuid,
103
+ client=client,
104
+ body=body,
105
+ ).parsed
106
+
107
+
108
+ async def asyncio_detailed(
109
+ uuid: UUID,
110
+ *,
111
+ client: AuthenticatedClient,
112
+ body: QuestionAdminRequest,
113
+ ) -> Response[QuestionAdmin]:
114
+ """
115
+ Args:
116
+ uuid (UUID):
117
+ body (QuestionAdminRequest):
118
+
119
+ Raises:
120
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
121
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
122
+
123
+ Returns:
124
+ Response[QuestionAdmin]
125
+ """
126
+
127
+ kwargs = _get_kwargs(
128
+ uuid=uuid,
129
+ body=body,
130
+ )
131
+
132
+ response = await client.get_async_httpx_client().request(**kwargs)
133
+
134
+ return _build_response(client=client, response=response)
135
+
136
+
137
+ async def asyncio(
138
+ uuid: UUID,
139
+ *,
140
+ client: AuthenticatedClient,
141
+ body: QuestionAdminRequest,
142
+ ) -> QuestionAdmin:
143
+ """
144
+ Args:
145
+ uuid (UUID):
146
+ body (QuestionAdminRequest):
147
+
148
+ Raises:
149
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
150
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
151
+
152
+ Returns:
153
+ QuestionAdmin
154
+ """
155
+
156
+ return (
157
+ await asyncio_detailed(
158
+ uuid=uuid,
159
+ client=client,
160
+ body=body,
161
+ )
162
+ ).parsed
@@ -9,6 +9,7 @@ from ... import errors
9
9
  from ...client import AuthenticatedClient, Client
10
10
  from ...models.marketplace_offering_users_list_field_item import MarketplaceOfferingUsersListFieldItem
11
11
  from ...models.marketplace_offering_users_list_o_item import MarketplaceOfferingUsersListOItem
12
+ from ...models.marketplace_offering_users_list_state_item import MarketplaceOfferingUsersListStateItem
12
13
  from ...models.offering_user import OfferingUser
13
14
  from ...types import UNSET, Response, Unset
14
15
 
@@ -27,6 +28,7 @@ def _get_kwargs(
27
28
  parent_offering_uuid: Union[Unset, UUID] = UNSET,
28
29
  provider_uuid: Union[Unset, UUID] = UNSET,
29
30
  query: Union[Unset, str] = UNSET,
31
+ state: Union[Unset, list[MarketplaceOfferingUsersListStateItem]] = UNSET,
30
32
  user_username: Union[Unset, str] = UNSET,
31
33
  user_uuid: Union[Unset, UUID] = UNSET,
32
34
  ) -> dict[str, Any]:
@@ -85,6 +87,15 @@ def _get_kwargs(
85
87
 
86
88
  params["query"] = query
87
89
 
90
+ json_state: Union[Unset, list[str]] = UNSET
91
+ if not isinstance(state, Unset):
92
+ json_state = []
93
+ for state_item_data in state:
94
+ state_item = state_item_data.value
95
+ json_state.append(state_item)
96
+
97
+ params["state"] = json_state
98
+
88
99
  params["user_username"] = user_username
89
100
 
90
101
  json_user_uuid: Union[Unset, str] = UNSET
@@ -142,6 +153,7 @@ def sync_detailed(
142
153
  parent_offering_uuid: Union[Unset, UUID] = UNSET,
143
154
  provider_uuid: Union[Unset, UUID] = UNSET,
144
155
  query: Union[Unset, str] = UNSET,
156
+ state: Union[Unset, list[MarketplaceOfferingUsersListStateItem]] = UNSET,
145
157
  user_username: Union[Unset, str] = UNSET,
146
158
  user_uuid: Union[Unset, UUID] = UNSET,
147
159
  ) -> Response[list["OfferingUser"]]:
@@ -160,6 +172,7 @@ def sync_detailed(
160
172
  parent_offering_uuid (Union[Unset, UUID]):
161
173
  provider_uuid (Union[Unset, UUID]):
162
174
  query (Union[Unset, str]):
175
+ state (Union[Unset, list[MarketplaceOfferingUsersListStateItem]]):
163
176
  user_username (Union[Unset, str]):
164
177
  user_uuid (Union[Unset, UUID]):
165
178
 
@@ -184,6 +197,7 @@ def sync_detailed(
184
197
  parent_offering_uuid=parent_offering_uuid,
185
198
  provider_uuid=provider_uuid,
186
199
  query=query,
200
+ state=state,
187
201
  user_username=user_username,
188
202
  user_uuid=user_uuid,
189
203
  )
@@ -210,6 +224,7 @@ def sync(
210
224
  parent_offering_uuid: Union[Unset, UUID] = UNSET,
211
225
  provider_uuid: Union[Unset, UUID] = UNSET,
212
226
  query: Union[Unset, str] = UNSET,
227
+ state: Union[Unset, list[MarketplaceOfferingUsersListStateItem]] = UNSET,
213
228
  user_username: Union[Unset, str] = UNSET,
214
229
  user_uuid: Union[Unset, UUID] = UNSET,
215
230
  ) -> list["OfferingUser"]:
@@ -228,6 +243,7 @@ def sync(
228
243
  parent_offering_uuid (Union[Unset, UUID]):
229
244
  provider_uuid (Union[Unset, UUID]):
230
245
  query (Union[Unset, str]):
246
+ state (Union[Unset, list[MarketplaceOfferingUsersListStateItem]]):
231
247
  user_username (Union[Unset, str]):
232
248
  user_uuid (Union[Unset, UUID]):
233
249
 
@@ -253,6 +269,7 @@ def sync(
253
269
  parent_offering_uuid=parent_offering_uuid,
254
270
  provider_uuid=provider_uuid,
255
271
  query=query,
272
+ state=state,
256
273
  user_username=user_username,
257
274
  user_uuid=user_uuid,
258
275
  ).parsed
@@ -273,6 +290,7 @@ async def asyncio_detailed(
273
290
  parent_offering_uuid: Union[Unset, UUID] = UNSET,
274
291
  provider_uuid: Union[Unset, UUID] = UNSET,
275
292
  query: Union[Unset, str] = UNSET,
293
+ state: Union[Unset, list[MarketplaceOfferingUsersListStateItem]] = UNSET,
276
294
  user_username: Union[Unset, str] = UNSET,
277
295
  user_uuid: Union[Unset, UUID] = UNSET,
278
296
  ) -> Response[list["OfferingUser"]]:
@@ -291,6 +309,7 @@ async def asyncio_detailed(
291
309
  parent_offering_uuid (Union[Unset, UUID]):
292
310
  provider_uuid (Union[Unset, UUID]):
293
311
  query (Union[Unset, str]):
312
+ state (Union[Unset, list[MarketplaceOfferingUsersListStateItem]]):
294
313
  user_username (Union[Unset, str]):
295
314
  user_uuid (Union[Unset, UUID]):
296
315
 
@@ -315,6 +334,7 @@ async def asyncio_detailed(
315
334
  parent_offering_uuid=parent_offering_uuid,
316
335
  provider_uuid=provider_uuid,
317
336
  query=query,
337
+ state=state,
318
338
  user_username=user_username,
319
339
  user_uuid=user_uuid,
320
340
  )
@@ -339,6 +359,7 @@ async def asyncio(
339
359
  parent_offering_uuid: Union[Unset, UUID] = UNSET,
340
360
  provider_uuid: Union[Unset, UUID] = UNSET,
341
361
  query: Union[Unset, str] = UNSET,
362
+ state: Union[Unset, list[MarketplaceOfferingUsersListStateItem]] = UNSET,
342
363
  user_username: Union[Unset, str] = UNSET,
343
364
  user_uuid: Union[Unset, UUID] = UNSET,
344
365
  ) -> list["OfferingUser"]:
@@ -357,6 +378,7 @@ async def asyncio(
357
378
  parent_offering_uuid (Union[Unset, UUID]):
358
379
  provider_uuid (Union[Unset, UUID]):
359
380
  query (Union[Unset, str]):
381
+ state (Union[Unset, list[MarketplaceOfferingUsersListStateItem]]):
360
382
  user_username (Union[Unset, str]):
361
383
  user_uuid (Union[Unset, UUID]):
362
384
 
@@ -383,6 +405,7 @@ async def asyncio(
383
405
  parent_offering_uuid=parent_offering_uuid,
384
406
  provider_uuid=provider_uuid,
385
407
  query=query,
408
+ state=state,
386
409
  user_username=user_username,
387
410
  user_uuid=user_uuid,
388
411
  )
@@ -0,0 +1,105 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Union
3
+ from uuid import UUID
4
+
5
+ import httpx
6
+
7
+ from ... import errors
8
+ from ...client import AuthenticatedClient, Client
9
+ from ...models.offering_user_state_transition_request import OfferingUserStateTransitionRequest
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ uuid: UUID,
15
+ *,
16
+ body: OfferingUserStateTransitionRequest,
17
+ ) -> dict[str, Any]:
18
+ headers: dict[str, Any] = {}
19
+
20
+ _kwargs: dict[str, Any] = {
21
+ "method": "post",
22
+ "url": f"/api/marketplace-offering-users/{uuid}/set_pending_account_linking/",
23
+ }
24
+
25
+ _kwargs["json"] = body.to_dict()
26
+
27
+ headers["Content-Type"] = "application/json"
28
+
29
+ _kwargs["headers"] = headers
30
+ return _kwargs
31
+
32
+
33
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Any:
34
+ if response.status_code == 200:
35
+ return None
36
+ raise errors.UnexpectedStatus(response.status_code, response.content)
37
+
38
+
39
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
40
+ return Response(
41
+ status_code=HTTPStatus(response.status_code),
42
+ content=response.content,
43
+ headers=response.headers,
44
+ parsed=_parse_response(client=client, response=response),
45
+ )
46
+
47
+
48
+ def sync_detailed(
49
+ uuid: UUID,
50
+ *,
51
+ client: AuthenticatedClient,
52
+ body: OfferingUserStateTransitionRequest,
53
+ ) -> Response[Any]:
54
+ """
55
+ Args:
56
+ uuid (UUID):
57
+ body (OfferingUserStateTransitionRequest):
58
+
59
+ Raises:
60
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
61
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
62
+
63
+ Returns:
64
+ Response[Any]
65
+ """
66
+
67
+ kwargs = _get_kwargs(
68
+ uuid=uuid,
69
+ body=body,
70
+ )
71
+
72
+ response = client.get_httpx_client().request(
73
+ **kwargs,
74
+ )
75
+
76
+ return _build_response(client=client, response=response)
77
+
78
+
79
+ async def asyncio_detailed(
80
+ uuid: UUID,
81
+ *,
82
+ client: AuthenticatedClient,
83
+ body: OfferingUserStateTransitionRequest,
84
+ ) -> Response[Any]:
85
+ """
86
+ Args:
87
+ uuid (UUID):
88
+ body (OfferingUserStateTransitionRequest):
89
+
90
+ Raises:
91
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
92
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
93
+
94
+ Returns:
95
+ Response[Any]
96
+ """
97
+
98
+ kwargs = _get_kwargs(
99
+ uuid=uuid,
100
+ body=body,
101
+ )
102
+
103
+ response = await client.get_async_httpx_client().request(**kwargs)
104
+
105
+ return _build_response(client=client, response=response)
@@ -0,0 +1,105 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Union
3
+ from uuid import UUID
4
+
5
+ import httpx
6
+
7
+ from ... import errors
8
+ from ...client import AuthenticatedClient, Client
9
+ from ...models.offering_user_state_transition_request import OfferingUserStateTransitionRequest
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ uuid: UUID,
15
+ *,
16
+ body: OfferingUserStateTransitionRequest,
17
+ ) -> dict[str, Any]:
18
+ headers: dict[str, Any] = {}
19
+
20
+ _kwargs: dict[str, Any] = {
21
+ "method": "post",
22
+ "url": f"/api/marketplace-offering-users/{uuid}/set_pending_additional_validation/",
23
+ }
24
+
25
+ _kwargs["json"] = body.to_dict()
26
+
27
+ headers["Content-Type"] = "application/json"
28
+
29
+ _kwargs["headers"] = headers
30
+ return _kwargs
31
+
32
+
33
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Any:
34
+ if response.status_code == 200:
35
+ return None
36
+ raise errors.UnexpectedStatus(response.status_code, response.content)
37
+
38
+
39
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
40
+ return Response(
41
+ status_code=HTTPStatus(response.status_code),
42
+ content=response.content,
43
+ headers=response.headers,
44
+ parsed=_parse_response(client=client, response=response),
45
+ )
46
+
47
+
48
+ def sync_detailed(
49
+ uuid: UUID,
50
+ *,
51
+ client: AuthenticatedClient,
52
+ body: OfferingUserStateTransitionRequest,
53
+ ) -> Response[Any]:
54
+ """
55
+ Args:
56
+ uuid (UUID):
57
+ body (OfferingUserStateTransitionRequest):
58
+
59
+ Raises:
60
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
61
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
62
+
63
+ Returns:
64
+ Response[Any]
65
+ """
66
+
67
+ kwargs = _get_kwargs(
68
+ uuid=uuid,
69
+ body=body,
70
+ )
71
+
72
+ response = client.get_httpx_client().request(
73
+ **kwargs,
74
+ )
75
+
76
+ return _build_response(client=client, response=response)
77
+
78
+
79
+ async def asyncio_detailed(
80
+ uuid: UUID,
81
+ *,
82
+ client: AuthenticatedClient,
83
+ body: OfferingUserStateTransitionRequest,
84
+ ) -> Response[Any]:
85
+ """
86
+ Args:
87
+ uuid (UUID):
88
+ body (OfferingUserStateTransitionRequest):
89
+
90
+ Raises:
91
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
92
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
93
+
94
+ Returns:
95
+ Response[Any]
96
+ """
97
+
98
+ kwargs = _get_kwargs(
99
+ uuid=uuid,
100
+ body=body,
101
+ )
102
+
103
+ response = await client.get_async_httpx_client().request(**kwargs)
104
+
105
+ return _build_response(client=client, response=response)