pluggy-sdk 1.0.0.post2__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.
Files changed (163) hide show
  1. pluggy_sdk/__init__.py +183 -0
  2. pluggy_sdk/api/__init__.py +26 -0
  3. pluggy_sdk/api/account_api.py +582 -0
  4. pluggy_sdk/api/acquirer_anticipation_api.py +658 -0
  5. pluggy_sdk/api/acquirer_receivable_api.py +658 -0
  6. pluggy_sdk/api/acquirer_sale_api.py +658 -0
  7. pluggy_sdk/api/auth_api.py +599 -0
  8. pluggy_sdk/api/bill_api.py +561 -0
  9. pluggy_sdk/api/bulk_payment_api.py +854 -0
  10. pluggy_sdk/api/category_api.py +1084 -0
  11. pluggy_sdk/api/connector_api.py +970 -0
  12. pluggy_sdk/api/identity_api.py +575 -0
  13. pluggy_sdk/api/income_report_api.py +308 -0
  14. pluggy_sdk/api/investment_api.py +909 -0
  15. pluggy_sdk/api/items_api.py +1441 -0
  16. pluggy_sdk/api/loan_api.py +561 -0
  17. pluggy_sdk/api/payment_customer_api.py +1399 -0
  18. pluggy_sdk/api/payment_intent_api.py +833 -0
  19. pluggy_sdk/api/payment_recipient_api.py +1976 -0
  20. pluggy_sdk/api/payment_request_api.py +1636 -0
  21. pluggy_sdk/api/portfolio_yield_api.py +574 -0
  22. pluggy_sdk/api/smart_account_api.py +1116 -0
  23. pluggy_sdk/api/transaction_api.py +954 -0
  24. pluggy_sdk/api/webhook_api.py +1391 -0
  25. pluggy_sdk/api_client.py +769 -0
  26. pluggy_sdk/api_response.py +21 -0
  27. pluggy_sdk/configuration.py +466 -0
  28. pluggy_sdk/exceptions.py +200 -0
  29. pluggy_sdk/models/__init__.py +145 -0
  30. pluggy_sdk/models/account.py +134 -0
  31. pluggy_sdk/models/accounts_list200_response.py +102 -0
  32. pluggy_sdk/models/acquirer_anticipation.py +117 -0
  33. pluggy_sdk/models/acquirer_anticipation_data.py +101 -0
  34. pluggy_sdk/models/acquirer_data.py +113 -0
  35. pluggy_sdk/models/acquirer_receivable.py +143 -0
  36. pluggy_sdk/models/acquirer_receivable_data.py +108 -0
  37. pluggy_sdk/models/acquirer_receivable_data_establishment.py +96 -0
  38. pluggy_sdk/models/acquirer_receivable_destination_account.py +92 -0
  39. pluggy_sdk/models/acquirer_receivable_related_sale.py +99 -0
  40. pluggy_sdk/models/acquirer_sale.py +171 -0
  41. pluggy_sdk/models/acquirer_sale_data.py +150 -0
  42. pluggy_sdk/models/acquirer_sale_installment.py +93 -0
  43. pluggy_sdk/models/acquirer_sale_installment_data.py +95 -0
  44. pluggy_sdk/models/address.py +110 -0
  45. pluggy_sdk/models/aggregated_portfolio.py +120 -0
  46. pluggy_sdk/models/aggregated_portfolio_response.py +102 -0
  47. pluggy_sdk/models/asset_distribution.py +88 -0
  48. pluggy_sdk/models/auth_request.py +90 -0
  49. pluggy_sdk/models/auth_response.py +88 -0
  50. pluggy_sdk/models/bank_data.py +92 -0
  51. pluggy_sdk/models/bill.py +109 -0
  52. pluggy_sdk/models/bill_finance_charge.py +103 -0
  53. pluggy_sdk/models/bills_list200_response.py +102 -0
  54. pluggy_sdk/models/bulk_payment.py +128 -0
  55. pluggy_sdk/models/bulk_payments_list200_response.py +102 -0
  56. pluggy_sdk/models/category.py +96 -0
  57. pluggy_sdk/models/client_category_rule.py +94 -0
  58. pluggy_sdk/models/company.py +90 -0
  59. pluggy_sdk/models/connect_token_request.py +94 -0
  60. pluggy_sdk/models/connect_token_response.py +88 -0
  61. pluggy_sdk/models/connector.py +141 -0
  62. pluggy_sdk/models/connector_credential.py +121 -0
  63. pluggy_sdk/models/connector_health.py +96 -0
  64. pluggy_sdk/models/connector_health_details.py +90 -0
  65. pluggy_sdk/models/connector_list_response.py +102 -0
  66. pluggy_sdk/models/connector_user_action.py +93 -0
  67. pluggy_sdk/models/create_bulk_payment.py +96 -0
  68. pluggy_sdk/models/create_client_category_rule.py +92 -0
  69. pluggy_sdk/models/create_item.py +111 -0
  70. pluggy_sdk/models/create_item_parameters.py +144 -0
  71. pluggy_sdk/models/create_or_update_payment_customer.py +105 -0
  72. pluggy_sdk/models/create_payment_customer_request_body.py +103 -0
  73. pluggy_sdk/models/create_payment_intent.py +94 -0
  74. pluggy_sdk/models/create_payment_recipient.py +100 -0
  75. pluggy_sdk/models/create_payment_request.py +102 -0
  76. pluggy_sdk/models/create_pix_qr_payment_request.py +96 -0
  77. pluggy_sdk/models/create_smart_account_request.py +102 -0
  78. pluggy_sdk/models/create_webhook.py +99 -0
  79. pluggy_sdk/models/credential_select_option.py +90 -0
  80. pluggy_sdk/models/credit_card_metadata.py +101 -0
  81. pluggy_sdk/models/credit_data.py +127 -0
  82. pluggy_sdk/models/document.py +100 -0
  83. pluggy_sdk/models/email.py +100 -0
  84. pluggy_sdk/models/global_error_response.py +94 -0
  85. pluggy_sdk/models/i_count_response.py +88 -0
  86. pluggy_sdk/models/identity_relation.py +102 -0
  87. pluggy_sdk/models/identity_response.py +149 -0
  88. pluggy_sdk/models/income_report.py +90 -0
  89. pluggy_sdk/models/income_reports_response.py +102 -0
  90. pluggy_sdk/models/investment.py +192 -0
  91. pluggy_sdk/models/investment_expenses.py +108 -0
  92. pluggy_sdk/models/investment_metadata.py +99 -0
  93. pluggy_sdk/models/investment_transaction.py +124 -0
  94. pluggy_sdk/models/investments_list200_response.py +102 -0
  95. pluggy_sdk/models/item.py +148 -0
  96. pluggy_sdk/models/item_creation_error_response.py +102 -0
  97. pluggy_sdk/models/item_error.py +94 -0
  98. pluggy_sdk/models/item_options.py +90 -0
  99. pluggy_sdk/models/loan.py +199 -0
  100. pluggy_sdk/models/loan_contracted_fee.py +118 -0
  101. pluggy_sdk/models/loan_contracted_finance_charge.py +92 -0
  102. pluggy_sdk/models/loan_installment_balloon_payment.py +95 -0
  103. pluggy_sdk/models/loan_installment_balloon_payment_amount.py +90 -0
  104. pluggy_sdk/models/loan_installments.py +130 -0
  105. pluggy_sdk/models/loan_interest_rate.py +136 -0
  106. pluggy_sdk/models/loan_payment_release.py +103 -0
  107. pluggy_sdk/models/loan_payment_release_over_parcel.py +106 -0
  108. pluggy_sdk/models/loan_payment_release_over_parcel_charge.py +92 -0
  109. pluggy_sdk/models/loan_payment_release_over_parcel_fee.py +92 -0
  110. pluggy_sdk/models/loan_payments.py +98 -0
  111. pluggy_sdk/models/loan_warranty.py +94 -0
  112. pluggy_sdk/models/loans_list200_response.py +102 -0
  113. pluggy_sdk/models/merchant.py +96 -0
  114. pluggy_sdk/models/monthly_portfolio.py +100 -0
  115. pluggy_sdk/models/monthly_portfolio_response.py +102 -0
  116. pluggy_sdk/models/not_authenticated_response.py +90 -0
  117. pluggy_sdk/models/page_response_acquirer_anticipations.py +102 -0
  118. pluggy_sdk/models/page_response_acquirer_receivables.py +102 -0
  119. pluggy_sdk/models/page_response_acquirer_sales.py +102 -0
  120. pluggy_sdk/models/page_response_category_rules.py +102 -0
  121. pluggy_sdk/models/page_response_investment_transactions.py +102 -0
  122. pluggy_sdk/models/page_response_transactions.py +102 -0
  123. pluggy_sdk/models/parameter_validation_error.py +92 -0
  124. pluggy_sdk/models/parameter_validation_response.py +98 -0
  125. pluggy_sdk/models/payment_customer.py +105 -0
  126. pluggy_sdk/models/payment_customers_list200_response.py +102 -0
  127. pluggy_sdk/models/payment_data.py +105 -0
  128. pluggy_sdk/models/payment_data_participant.py +101 -0
  129. pluggy_sdk/models/payment_institution.py +101 -0
  130. pluggy_sdk/models/payment_intent.py +145 -0
  131. pluggy_sdk/models/payment_intents_list200_response.py +102 -0
  132. pluggy_sdk/models/payment_recipient.py +106 -0
  133. pluggy_sdk/models/payment_recipient_account.py +99 -0
  134. pluggy_sdk/models/payment_recipients_institution_list200_response.py +102 -0
  135. pluggy_sdk/models/payment_recipients_list200_response.py +102 -0
  136. pluggy_sdk/models/payment_request.py +118 -0
  137. pluggy_sdk/models/payment_request_callback_urls.py +92 -0
  138. pluggy_sdk/models/payment_requests_list200_response.py +102 -0
  139. pluggy_sdk/models/percentage_over_index.py +90 -0
  140. pluggy_sdk/models/phone_number.py +100 -0
  141. pluggy_sdk/models/pix_data.py +90 -0
  142. pluggy_sdk/models/smart_account.py +107 -0
  143. pluggy_sdk/models/smart_account_address.py +112 -0
  144. pluggy_sdk/models/smart_account_balance.py +95 -0
  145. pluggy_sdk/models/smart_accounts_list200_response.py +102 -0
  146. pluggy_sdk/models/status_detail.py +142 -0
  147. pluggy_sdk/models/status_detail_product.py +101 -0
  148. pluggy_sdk/models/status_detail_product_warning.py +92 -0
  149. pluggy_sdk/models/transaction.py +145 -0
  150. pluggy_sdk/models/update_item.py +109 -0
  151. pluggy_sdk/models/update_item_parameters.py +144 -0
  152. pluggy_sdk/models/update_payment_recipient.py +100 -0
  153. pluggy_sdk/models/update_payment_request.py +102 -0
  154. pluggy_sdk/models/update_transaction.py +88 -0
  155. pluggy_sdk/models/webhook.py +106 -0
  156. pluggy_sdk/models/webhook_creation_error_response.py +90 -0
  157. pluggy_sdk/models/webhooks_list200_response.py +102 -0
  158. pluggy_sdk/py.typed +0 -0
  159. pluggy_sdk/rest.py +258 -0
  160. pluggy_sdk-1.0.0.post2.dist-info/METADATA +336 -0
  161. pluggy_sdk-1.0.0.post2.dist-info/RECORD +163 -0
  162. pluggy_sdk-1.0.0.post2.dist-info/WHEEL +5 -0
  163. pluggy_sdk-1.0.0.post2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1441 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pluggy API
5
+
6
+ Pluggy's main API to review data and execute connectors
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: hello@pluggy.ai
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from pydantic import Field, StrictStr
21
+ from typing import Dict, Optional
22
+ from typing_extensions import Annotated
23
+ from pluggy_sdk.models.create_item import CreateItem
24
+ from pluggy_sdk.models.i_count_response import ICountResponse
25
+ from pluggy_sdk.models.item import Item
26
+ from pluggy_sdk.models.update_item import UpdateItem
27
+
28
+ from pluggy_sdk.api_client import ApiClient, RequestSerialized
29
+ from pluggy_sdk.api_response import ApiResponse
30
+ from pluggy_sdk.rest import RESTResponseType
31
+
32
+
33
+ class ItemsApi:
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None) -> None:
41
+ if api_client is None:
42
+ api_client = ApiClient.get_default()
43
+ self.api_client = api_client
44
+
45
+
46
+ @validate_call
47
+ def items_create(
48
+ self,
49
+ create_item: CreateItem,
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> Item:
63
+ """Create
64
+
65
+ Creates a item and syncs all the products with the financial institution, using as credentials the sent parameters.
66
+
67
+ :param create_item: (required)
68
+ :type create_item: CreateItem
69
+ :param _request_timeout: timeout setting for this request. If one
70
+ number provided, it will be total request
71
+ timeout. It can also be a pair (tuple) of
72
+ (connection, read) timeouts.
73
+ :type _request_timeout: int, tuple(int, int), optional
74
+ :param _request_auth: set to override the auth_settings for an a single
75
+ request; this effectively ignores the
76
+ authentication in the spec for a single request.
77
+ :type _request_auth: dict, optional
78
+ :param _content_type: force content-type for the request.
79
+ :type _content_type: str, Optional
80
+ :param _headers: set to override the headers for a single
81
+ request; this effectively ignores the headers
82
+ in the spec for a single request.
83
+ :type _headers: dict, optional
84
+ :param _host_index: set to override the host_index for a single
85
+ request; this effectively ignores the host_index
86
+ in the spec for a single request.
87
+ :type _host_index: int, optional
88
+ :return: Returns the result object.
89
+ """ # noqa: E501
90
+
91
+ _param = self._items_create_serialize(
92
+ create_item=create_item,
93
+ _request_auth=_request_auth,
94
+ _content_type=_content_type,
95
+ _headers=_headers,
96
+ _host_index=_host_index
97
+ )
98
+
99
+ _response_types_map: Dict[str, Optional[str]] = {
100
+ '200': "Item",
101
+ '400': "ItemCreationErrorResponse",
102
+ '409': "GlobalErrorResponse",
103
+ '500': "GlobalErrorResponse",
104
+ }
105
+ response_data = self.api_client.call_api(
106
+ *_param,
107
+ _request_timeout=_request_timeout
108
+ )
109
+ response_data.read()
110
+ return self.api_client.response_deserialize(
111
+ response_data=response_data,
112
+ response_types_map=_response_types_map,
113
+ ).data
114
+
115
+
116
+ @validate_call
117
+ def items_create_with_http_info(
118
+ self,
119
+ create_item: CreateItem,
120
+ _request_timeout: Union[
121
+ None,
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Tuple[
124
+ Annotated[StrictFloat, Field(gt=0)],
125
+ Annotated[StrictFloat, Field(gt=0)]
126
+ ]
127
+ ] = None,
128
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
129
+ _content_type: Optional[StrictStr] = None,
130
+ _headers: Optional[Dict[StrictStr, Any]] = None,
131
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
132
+ ) -> ApiResponse[Item]:
133
+ """Create
134
+
135
+ Creates a item and syncs all the products with the financial institution, using as credentials the sent parameters.
136
+
137
+ :param create_item: (required)
138
+ :type create_item: CreateItem
139
+ :param _request_timeout: timeout setting for this request. If one
140
+ number provided, it will be total request
141
+ timeout. It can also be a pair (tuple) of
142
+ (connection, read) timeouts.
143
+ :type _request_timeout: int, tuple(int, int), optional
144
+ :param _request_auth: set to override the auth_settings for an a single
145
+ request; this effectively ignores the
146
+ authentication in the spec for a single request.
147
+ :type _request_auth: dict, optional
148
+ :param _content_type: force content-type for the request.
149
+ :type _content_type: str, Optional
150
+ :param _headers: set to override the headers for a single
151
+ request; this effectively ignores the headers
152
+ in the spec for a single request.
153
+ :type _headers: dict, optional
154
+ :param _host_index: set to override the host_index for a single
155
+ request; this effectively ignores the host_index
156
+ in the spec for a single request.
157
+ :type _host_index: int, optional
158
+ :return: Returns the result object.
159
+ """ # noqa: E501
160
+
161
+ _param = self._items_create_serialize(
162
+ create_item=create_item,
163
+ _request_auth=_request_auth,
164
+ _content_type=_content_type,
165
+ _headers=_headers,
166
+ _host_index=_host_index
167
+ )
168
+
169
+ _response_types_map: Dict[str, Optional[str]] = {
170
+ '200': "Item",
171
+ '400': "ItemCreationErrorResponse",
172
+ '409': "GlobalErrorResponse",
173
+ '500': "GlobalErrorResponse",
174
+ }
175
+ response_data = self.api_client.call_api(
176
+ *_param,
177
+ _request_timeout=_request_timeout
178
+ )
179
+ response_data.read()
180
+ return self.api_client.response_deserialize(
181
+ response_data=response_data,
182
+ response_types_map=_response_types_map,
183
+ )
184
+
185
+
186
+ @validate_call
187
+ def items_create_without_preload_content(
188
+ self,
189
+ create_item: CreateItem,
190
+ _request_timeout: Union[
191
+ None,
192
+ Annotated[StrictFloat, Field(gt=0)],
193
+ Tuple[
194
+ Annotated[StrictFloat, Field(gt=0)],
195
+ Annotated[StrictFloat, Field(gt=0)]
196
+ ]
197
+ ] = None,
198
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
199
+ _content_type: Optional[StrictStr] = None,
200
+ _headers: Optional[Dict[StrictStr, Any]] = None,
201
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
202
+ ) -> RESTResponseType:
203
+ """Create
204
+
205
+ Creates a item and syncs all the products with the financial institution, using as credentials the sent parameters.
206
+
207
+ :param create_item: (required)
208
+ :type create_item: CreateItem
209
+ :param _request_timeout: timeout setting for this request. If one
210
+ number provided, it will be total request
211
+ timeout. It can also be a pair (tuple) of
212
+ (connection, read) timeouts.
213
+ :type _request_timeout: int, tuple(int, int), optional
214
+ :param _request_auth: set to override the auth_settings for an a single
215
+ request; this effectively ignores the
216
+ authentication in the spec for a single request.
217
+ :type _request_auth: dict, optional
218
+ :param _content_type: force content-type for the request.
219
+ :type _content_type: str, Optional
220
+ :param _headers: set to override the headers for a single
221
+ request; this effectively ignores the headers
222
+ in the spec for a single request.
223
+ :type _headers: dict, optional
224
+ :param _host_index: set to override the host_index for a single
225
+ request; this effectively ignores the host_index
226
+ in the spec for a single request.
227
+ :type _host_index: int, optional
228
+ :return: Returns the result object.
229
+ """ # noqa: E501
230
+
231
+ _param = self._items_create_serialize(
232
+ create_item=create_item,
233
+ _request_auth=_request_auth,
234
+ _content_type=_content_type,
235
+ _headers=_headers,
236
+ _host_index=_host_index
237
+ )
238
+
239
+ _response_types_map: Dict[str, Optional[str]] = {
240
+ '200': "Item",
241
+ '400': "ItemCreationErrorResponse",
242
+ '409': "GlobalErrorResponse",
243
+ '500': "GlobalErrorResponse",
244
+ }
245
+ response_data = self.api_client.call_api(
246
+ *_param,
247
+ _request_timeout=_request_timeout
248
+ )
249
+ return response_data.response
250
+
251
+
252
+ def _items_create_serialize(
253
+ self,
254
+ create_item,
255
+ _request_auth,
256
+ _content_type,
257
+ _headers,
258
+ _host_index,
259
+ ) -> RequestSerialized:
260
+
261
+ _host = None
262
+
263
+ _collection_formats: Dict[str, str] = {
264
+ }
265
+
266
+ _path_params: Dict[str, str] = {}
267
+ _query_params: List[Tuple[str, str]] = []
268
+ _header_params: Dict[str, Optional[str]] = _headers or {}
269
+ _form_params: List[Tuple[str, str]] = []
270
+ _files: Dict[str, Union[str, bytes]] = {}
271
+ _body_params: Optional[bytes] = None
272
+
273
+ # process the path parameters
274
+ # process the query parameters
275
+ # process the header parameters
276
+ # process the form parameters
277
+ # process the body parameter
278
+ if create_item is not None:
279
+ _body_params = create_item
280
+
281
+
282
+ # set the HTTP header `Accept`
283
+ _header_params['Accept'] = self.api_client.select_header_accept(
284
+ [
285
+ 'application/json'
286
+ ]
287
+ )
288
+
289
+ # set the HTTP header `Content-Type`
290
+ if _content_type:
291
+ _header_params['Content-Type'] = _content_type
292
+ else:
293
+ _default_content_type = (
294
+ self.api_client.select_header_content_type(
295
+ [
296
+ 'application/json'
297
+ ]
298
+ )
299
+ )
300
+ if _default_content_type is not None:
301
+ _header_params['Content-Type'] = _default_content_type
302
+
303
+ # authentication setting
304
+ _auth_settings: List[str] = [
305
+ 'default'
306
+ ]
307
+
308
+ return self.api_client.param_serialize(
309
+ method='POST',
310
+ resource_path='/items',
311
+ path_params=_path_params,
312
+ query_params=_query_params,
313
+ header_params=_header_params,
314
+ body=_body_params,
315
+ post_params=_form_params,
316
+ files=_files,
317
+ auth_settings=_auth_settings,
318
+ collection_formats=_collection_formats,
319
+ _host=_host,
320
+ _request_auth=_request_auth
321
+ )
322
+
323
+
324
+
325
+
326
+ @validate_call
327
+ def items_delete(
328
+ self,
329
+ id: Annotated[StrictStr, Field(description="Item primary identifier")],
330
+ _request_timeout: Union[
331
+ None,
332
+ Annotated[StrictFloat, Field(gt=0)],
333
+ Tuple[
334
+ Annotated[StrictFloat, Field(gt=0)],
335
+ Annotated[StrictFloat, Field(gt=0)]
336
+ ]
337
+ ] = None,
338
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
339
+ _content_type: Optional[StrictStr] = None,
340
+ _headers: Optional[Dict[StrictStr, Any]] = None,
341
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
342
+ ) -> ICountResponse:
343
+ """Delete
344
+
345
+ Delete the item by its primary identifier
346
+
347
+ :param id: Item primary identifier (required)
348
+ :type id: str
349
+ :param _request_timeout: timeout setting for this request. If one
350
+ number provided, it will be total request
351
+ timeout. It can also be a pair (tuple) of
352
+ (connection, read) timeouts.
353
+ :type _request_timeout: int, tuple(int, int), optional
354
+ :param _request_auth: set to override the auth_settings for an a single
355
+ request; this effectively ignores the
356
+ authentication in the spec for a single request.
357
+ :type _request_auth: dict, optional
358
+ :param _content_type: force content-type for the request.
359
+ :type _content_type: str, Optional
360
+ :param _headers: set to override the headers for a single
361
+ request; this effectively ignores the headers
362
+ in the spec for a single request.
363
+ :type _headers: dict, optional
364
+ :param _host_index: set to override the host_index for a single
365
+ request; this effectively ignores the host_index
366
+ in the spec for a single request.
367
+ :type _host_index: int, optional
368
+ :return: Returns the result object.
369
+ """ # noqa: E501
370
+
371
+ _param = self._items_delete_serialize(
372
+ id=id,
373
+ _request_auth=_request_auth,
374
+ _content_type=_content_type,
375
+ _headers=_headers,
376
+ _host_index=_host_index
377
+ )
378
+
379
+ _response_types_map: Dict[str, Optional[str]] = {
380
+ '200': "ICountResponse",
381
+ '404': "GlobalErrorResponse",
382
+ '500': "GlobalErrorResponse",
383
+ }
384
+ response_data = self.api_client.call_api(
385
+ *_param,
386
+ _request_timeout=_request_timeout
387
+ )
388
+ response_data.read()
389
+ return self.api_client.response_deserialize(
390
+ response_data=response_data,
391
+ response_types_map=_response_types_map,
392
+ ).data
393
+
394
+
395
+ @validate_call
396
+ def items_delete_with_http_info(
397
+ self,
398
+ id: Annotated[StrictStr, Field(description="Item primary identifier")],
399
+ _request_timeout: Union[
400
+ None,
401
+ Annotated[StrictFloat, Field(gt=0)],
402
+ Tuple[
403
+ Annotated[StrictFloat, Field(gt=0)],
404
+ Annotated[StrictFloat, Field(gt=0)]
405
+ ]
406
+ ] = None,
407
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
408
+ _content_type: Optional[StrictStr] = None,
409
+ _headers: Optional[Dict[StrictStr, Any]] = None,
410
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
411
+ ) -> ApiResponse[ICountResponse]:
412
+ """Delete
413
+
414
+ Delete the item by its primary identifier
415
+
416
+ :param id: Item primary identifier (required)
417
+ :type id: str
418
+ :param _request_timeout: timeout setting for this request. If one
419
+ number provided, it will be total request
420
+ timeout. It can also be a pair (tuple) of
421
+ (connection, read) timeouts.
422
+ :type _request_timeout: int, tuple(int, int), optional
423
+ :param _request_auth: set to override the auth_settings for an a single
424
+ request; this effectively ignores the
425
+ authentication in the spec for a single request.
426
+ :type _request_auth: dict, optional
427
+ :param _content_type: force content-type for the request.
428
+ :type _content_type: str, Optional
429
+ :param _headers: set to override the headers for a single
430
+ request; this effectively ignores the headers
431
+ in the spec for a single request.
432
+ :type _headers: dict, optional
433
+ :param _host_index: set to override the host_index for a single
434
+ request; this effectively ignores the host_index
435
+ in the spec for a single request.
436
+ :type _host_index: int, optional
437
+ :return: Returns the result object.
438
+ """ # noqa: E501
439
+
440
+ _param = self._items_delete_serialize(
441
+ id=id,
442
+ _request_auth=_request_auth,
443
+ _content_type=_content_type,
444
+ _headers=_headers,
445
+ _host_index=_host_index
446
+ )
447
+
448
+ _response_types_map: Dict[str, Optional[str]] = {
449
+ '200': "ICountResponse",
450
+ '404': "GlobalErrorResponse",
451
+ '500': "GlobalErrorResponse",
452
+ }
453
+ response_data = self.api_client.call_api(
454
+ *_param,
455
+ _request_timeout=_request_timeout
456
+ )
457
+ response_data.read()
458
+ return self.api_client.response_deserialize(
459
+ response_data=response_data,
460
+ response_types_map=_response_types_map,
461
+ )
462
+
463
+
464
+ @validate_call
465
+ def items_delete_without_preload_content(
466
+ self,
467
+ id: Annotated[StrictStr, Field(description="Item primary identifier")],
468
+ _request_timeout: Union[
469
+ None,
470
+ Annotated[StrictFloat, Field(gt=0)],
471
+ Tuple[
472
+ Annotated[StrictFloat, Field(gt=0)],
473
+ Annotated[StrictFloat, Field(gt=0)]
474
+ ]
475
+ ] = None,
476
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
477
+ _content_type: Optional[StrictStr] = None,
478
+ _headers: Optional[Dict[StrictStr, Any]] = None,
479
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
480
+ ) -> RESTResponseType:
481
+ """Delete
482
+
483
+ Delete the item by its primary identifier
484
+
485
+ :param id: Item primary identifier (required)
486
+ :type id: str
487
+ :param _request_timeout: timeout setting for this request. If one
488
+ number provided, it will be total request
489
+ timeout. It can also be a pair (tuple) of
490
+ (connection, read) timeouts.
491
+ :type _request_timeout: int, tuple(int, int), optional
492
+ :param _request_auth: set to override the auth_settings for an a single
493
+ request; this effectively ignores the
494
+ authentication in the spec for a single request.
495
+ :type _request_auth: dict, optional
496
+ :param _content_type: force content-type for the request.
497
+ :type _content_type: str, Optional
498
+ :param _headers: set to override the headers for a single
499
+ request; this effectively ignores the headers
500
+ in the spec for a single request.
501
+ :type _headers: dict, optional
502
+ :param _host_index: set to override the host_index for a single
503
+ request; this effectively ignores the host_index
504
+ in the spec for a single request.
505
+ :type _host_index: int, optional
506
+ :return: Returns the result object.
507
+ """ # noqa: E501
508
+
509
+ _param = self._items_delete_serialize(
510
+ id=id,
511
+ _request_auth=_request_auth,
512
+ _content_type=_content_type,
513
+ _headers=_headers,
514
+ _host_index=_host_index
515
+ )
516
+
517
+ _response_types_map: Dict[str, Optional[str]] = {
518
+ '200': "ICountResponse",
519
+ '404': "GlobalErrorResponse",
520
+ '500': "GlobalErrorResponse",
521
+ }
522
+ response_data = self.api_client.call_api(
523
+ *_param,
524
+ _request_timeout=_request_timeout
525
+ )
526
+ return response_data.response
527
+
528
+
529
+ def _items_delete_serialize(
530
+ self,
531
+ id,
532
+ _request_auth,
533
+ _content_type,
534
+ _headers,
535
+ _host_index,
536
+ ) -> RequestSerialized:
537
+
538
+ _host = None
539
+
540
+ _collection_formats: Dict[str, str] = {
541
+ }
542
+
543
+ _path_params: Dict[str, str] = {}
544
+ _query_params: List[Tuple[str, str]] = []
545
+ _header_params: Dict[str, Optional[str]] = _headers or {}
546
+ _form_params: List[Tuple[str, str]] = []
547
+ _files: Dict[str, Union[str, bytes]] = {}
548
+ _body_params: Optional[bytes] = None
549
+
550
+ # process the path parameters
551
+ if id is not None:
552
+ _path_params['id'] = id
553
+ # process the query parameters
554
+ # process the header parameters
555
+ # process the form parameters
556
+ # process the body parameter
557
+
558
+
559
+ # set the HTTP header `Accept`
560
+ _header_params['Accept'] = self.api_client.select_header_accept(
561
+ [
562
+ 'application/json'
563
+ ]
564
+ )
565
+
566
+
567
+ # authentication setting
568
+ _auth_settings: List[str] = [
569
+ 'default'
570
+ ]
571
+
572
+ return self.api_client.param_serialize(
573
+ method='DELETE',
574
+ resource_path='/items/{id}',
575
+ path_params=_path_params,
576
+ query_params=_query_params,
577
+ header_params=_header_params,
578
+ body=_body_params,
579
+ post_params=_form_params,
580
+ files=_files,
581
+ auth_settings=_auth_settings,
582
+ collection_formats=_collection_formats,
583
+ _host=_host,
584
+ _request_auth=_request_auth
585
+ )
586
+
587
+
588
+
589
+
590
+ @validate_call
591
+ def items_retrieve(
592
+ self,
593
+ id: Annotated[StrictStr, Field(description="Item primary identifier")],
594
+ _request_timeout: Union[
595
+ None,
596
+ Annotated[StrictFloat, Field(gt=0)],
597
+ Tuple[
598
+ Annotated[StrictFloat, Field(gt=0)],
599
+ Annotated[StrictFloat, Field(gt=0)]
600
+ ]
601
+ ] = None,
602
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
603
+ _content_type: Optional[StrictStr] = None,
604
+ _headers: Optional[Dict[StrictStr, Any]] = None,
605
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
606
+ ) -> Item:
607
+ """Retrieve
608
+
609
+ Recovers the item resource by its id
610
+
611
+ :param id: Item primary identifier (required)
612
+ :type id: str
613
+ :param _request_timeout: timeout setting for this request. If one
614
+ number provided, it will be total request
615
+ timeout. It can also be a pair (tuple) of
616
+ (connection, read) timeouts.
617
+ :type _request_timeout: int, tuple(int, int), optional
618
+ :param _request_auth: set to override the auth_settings for an a single
619
+ request; this effectively ignores the
620
+ authentication in the spec for a single request.
621
+ :type _request_auth: dict, optional
622
+ :param _content_type: force content-type for the request.
623
+ :type _content_type: str, Optional
624
+ :param _headers: set to override the headers for a single
625
+ request; this effectively ignores the headers
626
+ in the spec for a single request.
627
+ :type _headers: dict, optional
628
+ :param _host_index: set to override the host_index for a single
629
+ request; this effectively ignores the host_index
630
+ in the spec for a single request.
631
+ :type _host_index: int, optional
632
+ :return: Returns the result object.
633
+ """ # noqa: E501
634
+
635
+ _param = self._items_retrieve_serialize(
636
+ id=id,
637
+ _request_auth=_request_auth,
638
+ _content_type=_content_type,
639
+ _headers=_headers,
640
+ _host_index=_host_index
641
+ )
642
+
643
+ _response_types_map: Dict[str, Optional[str]] = {
644
+ '200': "Item",
645
+ '404': "GlobalErrorResponse",
646
+ '500': "GlobalErrorResponse",
647
+ }
648
+ response_data = self.api_client.call_api(
649
+ *_param,
650
+ _request_timeout=_request_timeout
651
+ )
652
+ response_data.read()
653
+ return self.api_client.response_deserialize(
654
+ response_data=response_data,
655
+ response_types_map=_response_types_map,
656
+ ).data
657
+
658
+
659
+ @validate_call
660
+ def items_retrieve_with_http_info(
661
+ self,
662
+ id: Annotated[StrictStr, Field(description="Item primary identifier")],
663
+ _request_timeout: Union[
664
+ None,
665
+ Annotated[StrictFloat, Field(gt=0)],
666
+ Tuple[
667
+ Annotated[StrictFloat, Field(gt=0)],
668
+ Annotated[StrictFloat, Field(gt=0)]
669
+ ]
670
+ ] = None,
671
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
672
+ _content_type: Optional[StrictStr] = None,
673
+ _headers: Optional[Dict[StrictStr, Any]] = None,
674
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
675
+ ) -> ApiResponse[Item]:
676
+ """Retrieve
677
+
678
+ Recovers the item resource by its id
679
+
680
+ :param id: Item primary identifier (required)
681
+ :type id: str
682
+ :param _request_timeout: timeout setting for this request. If one
683
+ number provided, it will be total request
684
+ timeout. It can also be a pair (tuple) of
685
+ (connection, read) timeouts.
686
+ :type _request_timeout: int, tuple(int, int), optional
687
+ :param _request_auth: set to override the auth_settings for an a single
688
+ request; this effectively ignores the
689
+ authentication in the spec for a single request.
690
+ :type _request_auth: dict, optional
691
+ :param _content_type: force content-type for the request.
692
+ :type _content_type: str, Optional
693
+ :param _headers: set to override the headers for a single
694
+ request; this effectively ignores the headers
695
+ in the spec for a single request.
696
+ :type _headers: dict, optional
697
+ :param _host_index: set to override the host_index for a single
698
+ request; this effectively ignores the host_index
699
+ in the spec for a single request.
700
+ :type _host_index: int, optional
701
+ :return: Returns the result object.
702
+ """ # noqa: E501
703
+
704
+ _param = self._items_retrieve_serialize(
705
+ id=id,
706
+ _request_auth=_request_auth,
707
+ _content_type=_content_type,
708
+ _headers=_headers,
709
+ _host_index=_host_index
710
+ )
711
+
712
+ _response_types_map: Dict[str, Optional[str]] = {
713
+ '200': "Item",
714
+ '404': "GlobalErrorResponse",
715
+ '500': "GlobalErrorResponse",
716
+ }
717
+ response_data = self.api_client.call_api(
718
+ *_param,
719
+ _request_timeout=_request_timeout
720
+ )
721
+ response_data.read()
722
+ return self.api_client.response_deserialize(
723
+ response_data=response_data,
724
+ response_types_map=_response_types_map,
725
+ )
726
+
727
+
728
+ @validate_call
729
+ def items_retrieve_without_preload_content(
730
+ self,
731
+ id: Annotated[StrictStr, Field(description="Item primary identifier")],
732
+ _request_timeout: Union[
733
+ None,
734
+ Annotated[StrictFloat, Field(gt=0)],
735
+ Tuple[
736
+ Annotated[StrictFloat, Field(gt=0)],
737
+ Annotated[StrictFloat, Field(gt=0)]
738
+ ]
739
+ ] = None,
740
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
741
+ _content_type: Optional[StrictStr] = None,
742
+ _headers: Optional[Dict[StrictStr, Any]] = None,
743
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
744
+ ) -> RESTResponseType:
745
+ """Retrieve
746
+
747
+ Recovers the item resource by its id
748
+
749
+ :param id: Item primary identifier (required)
750
+ :type id: str
751
+ :param _request_timeout: timeout setting for this request. If one
752
+ number provided, it will be total request
753
+ timeout. It can also be a pair (tuple) of
754
+ (connection, read) timeouts.
755
+ :type _request_timeout: int, tuple(int, int), optional
756
+ :param _request_auth: set to override the auth_settings for an a single
757
+ request; this effectively ignores the
758
+ authentication in the spec for a single request.
759
+ :type _request_auth: dict, optional
760
+ :param _content_type: force content-type for the request.
761
+ :type _content_type: str, Optional
762
+ :param _headers: set to override the headers for a single
763
+ request; this effectively ignores the headers
764
+ in the spec for a single request.
765
+ :type _headers: dict, optional
766
+ :param _host_index: set to override the host_index for a single
767
+ request; this effectively ignores the host_index
768
+ in the spec for a single request.
769
+ :type _host_index: int, optional
770
+ :return: Returns the result object.
771
+ """ # noqa: E501
772
+
773
+ _param = self._items_retrieve_serialize(
774
+ id=id,
775
+ _request_auth=_request_auth,
776
+ _content_type=_content_type,
777
+ _headers=_headers,
778
+ _host_index=_host_index
779
+ )
780
+
781
+ _response_types_map: Dict[str, Optional[str]] = {
782
+ '200': "Item",
783
+ '404': "GlobalErrorResponse",
784
+ '500': "GlobalErrorResponse",
785
+ }
786
+ response_data = self.api_client.call_api(
787
+ *_param,
788
+ _request_timeout=_request_timeout
789
+ )
790
+ return response_data.response
791
+
792
+
793
+ def _items_retrieve_serialize(
794
+ self,
795
+ id,
796
+ _request_auth,
797
+ _content_type,
798
+ _headers,
799
+ _host_index,
800
+ ) -> RequestSerialized:
801
+
802
+ _host = None
803
+
804
+ _collection_formats: Dict[str, str] = {
805
+ }
806
+
807
+ _path_params: Dict[str, str] = {}
808
+ _query_params: List[Tuple[str, str]] = []
809
+ _header_params: Dict[str, Optional[str]] = _headers or {}
810
+ _form_params: List[Tuple[str, str]] = []
811
+ _files: Dict[str, Union[str, bytes]] = {}
812
+ _body_params: Optional[bytes] = None
813
+
814
+ # process the path parameters
815
+ if id is not None:
816
+ _path_params['id'] = id
817
+ # process the query parameters
818
+ # process the header parameters
819
+ # process the form parameters
820
+ # process the body parameter
821
+
822
+
823
+ # set the HTTP header `Accept`
824
+ _header_params['Accept'] = self.api_client.select_header_accept(
825
+ [
826
+ 'application/json'
827
+ ]
828
+ )
829
+
830
+
831
+ # authentication setting
832
+ _auth_settings: List[str] = [
833
+ 'default'
834
+ ]
835
+
836
+ return self.api_client.param_serialize(
837
+ method='GET',
838
+ resource_path='/items/{id}',
839
+ path_params=_path_params,
840
+ query_params=_query_params,
841
+ header_params=_header_params,
842
+ body=_body_params,
843
+ post_params=_form_params,
844
+ files=_files,
845
+ auth_settings=_auth_settings,
846
+ collection_formats=_collection_formats,
847
+ _host=_host,
848
+ _request_auth=_request_auth
849
+ )
850
+
851
+
852
+
853
+
854
+ @validate_call
855
+ def items_send_mfa(
856
+ self,
857
+ id: Annotated[StrictStr, Field(description="Item primary identifier")],
858
+ request_body: Dict[str, StrictStr],
859
+ _request_timeout: Union[
860
+ None,
861
+ Annotated[StrictFloat, Field(gt=0)],
862
+ Tuple[
863
+ Annotated[StrictFloat, Field(gt=0)],
864
+ Annotated[StrictFloat, Field(gt=0)]
865
+ ]
866
+ ] = None,
867
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
868
+ _content_type: Optional[StrictStr] = None,
869
+ _headers: Optional[Dict[StrictStr, Any]] = None,
870
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
871
+ ) -> Item:
872
+ """Send MFA
873
+
874
+ When item is Waiting User Input, this method allows to submit multi-factor authentication value
875
+
876
+ :param id: Item primary identifier (required)
877
+ :type id: str
878
+ :param request_body: (required)
879
+ :type request_body: Dict[str, str]
880
+ :param _request_timeout: timeout setting for this request. If one
881
+ number provided, it will be total request
882
+ timeout. It can also be a pair (tuple) of
883
+ (connection, read) timeouts.
884
+ :type _request_timeout: int, tuple(int, int), optional
885
+ :param _request_auth: set to override the auth_settings for an a single
886
+ request; this effectively ignores the
887
+ authentication in the spec for a single request.
888
+ :type _request_auth: dict, optional
889
+ :param _content_type: force content-type for the request.
890
+ :type _content_type: str, Optional
891
+ :param _headers: set to override the headers for a single
892
+ request; this effectively ignores the headers
893
+ in the spec for a single request.
894
+ :type _headers: dict, optional
895
+ :param _host_index: set to override the host_index for a single
896
+ request; this effectively ignores the host_index
897
+ in the spec for a single request.
898
+ :type _host_index: int, optional
899
+ :return: Returns the result object.
900
+ """ # noqa: E501
901
+
902
+ _param = self._items_send_mfa_serialize(
903
+ id=id,
904
+ request_body=request_body,
905
+ _request_auth=_request_auth,
906
+ _content_type=_content_type,
907
+ _headers=_headers,
908
+ _host_index=_host_index
909
+ )
910
+
911
+ _response_types_map: Dict[str, Optional[str]] = {
912
+ '200': "Item",
913
+ '404': "GlobalErrorResponse",
914
+ '500': "GlobalErrorResponse",
915
+ }
916
+ response_data = self.api_client.call_api(
917
+ *_param,
918
+ _request_timeout=_request_timeout
919
+ )
920
+ response_data.read()
921
+ return self.api_client.response_deserialize(
922
+ response_data=response_data,
923
+ response_types_map=_response_types_map,
924
+ ).data
925
+
926
+
927
+ @validate_call
928
+ def items_send_mfa_with_http_info(
929
+ self,
930
+ id: Annotated[StrictStr, Field(description="Item primary identifier")],
931
+ request_body: Dict[str, StrictStr],
932
+ _request_timeout: Union[
933
+ None,
934
+ Annotated[StrictFloat, Field(gt=0)],
935
+ Tuple[
936
+ Annotated[StrictFloat, Field(gt=0)],
937
+ Annotated[StrictFloat, Field(gt=0)]
938
+ ]
939
+ ] = None,
940
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
941
+ _content_type: Optional[StrictStr] = None,
942
+ _headers: Optional[Dict[StrictStr, Any]] = None,
943
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
944
+ ) -> ApiResponse[Item]:
945
+ """Send MFA
946
+
947
+ When item is Waiting User Input, this method allows to submit multi-factor authentication value
948
+
949
+ :param id: Item primary identifier (required)
950
+ :type id: str
951
+ :param request_body: (required)
952
+ :type request_body: Dict[str, str]
953
+ :param _request_timeout: timeout setting for this request. If one
954
+ number provided, it will be total request
955
+ timeout. It can also be a pair (tuple) of
956
+ (connection, read) timeouts.
957
+ :type _request_timeout: int, tuple(int, int), optional
958
+ :param _request_auth: set to override the auth_settings for an a single
959
+ request; this effectively ignores the
960
+ authentication in the spec for a single request.
961
+ :type _request_auth: dict, optional
962
+ :param _content_type: force content-type for the request.
963
+ :type _content_type: str, Optional
964
+ :param _headers: set to override the headers for a single
965
+ request; this effectively ignores the headers
966
+ in the spec for a single request.
967
+ :type _headers: dict, optional
968
+ :param _host_index: set to override the host_index for a single
969
+ request; this effectively ignores the host_index
970
+ in the spec for a single request.
971
+ :type _host_index: int, optional
972
+ :return: Returns the result object.
973
+ """ # noqa: E501
974
+
975
+ _param = self._items_send_mfa_serialize(
976
+ id=id,
977
+ request_body=request_body,
978
+ _request_auth=_request_auth,
979
+ _content_type=_content_type,
980
+ _headers=_headers,
981
+ _host_index=_host_index
982
+ )
983
+
984
+ _response_types_map: Dict[str, Optional[str]] = {
985
+ '200': "Item",
986
+ '404': "GlobalErrorResponse",
987
+ '500': "GlobalErrorResponse",
988
+ }
989
+ response_data = self.api_client.call_api(
990
+ *_param,
991
+ _request_timeout=_request_timeout
992
+ )
993
+ response_data.read()
994
+ return self.api_client.response_deserialize(
995
+ response_data=response_data,
996
+ response_types_map=_response_types_map,
997
+ )
998
+
999
+
1000
+ @validate_call
1001
+ def items_send_mfa_without_preload_content(
1002
+ self,
1003
+ id: Annotated[StrictStr, Field(description="Item primary identifier")],
1004
+ request_body: Dict[str, StrictStr],
1005
+ _request_timeout: Union[
1006
+ None,
1007
+ Annotated[StrictFloat, Field(gt=0)],
1008
+ Tuple[
1009
+ Annotated[StrictFloat, Field(gt=0)],
1010
+ Annotated[StrictFloat, Field(gt=0)]
1011
+ ]
1012
+ ] = None,
1013
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1014
+ _content_type: Optional[StrictStr] = None,
1015
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1016
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1017
+ ) -> RESTResponseType:
1018
+ """Send MFA
1019
+
1020
+ When item is Waiting User Input, this method allows to submit multi-factor authentication value
1021
+
1022
+ :param id: Item primary identifier (required)
1023
+ :type id: str
1024
+ :param request_body: (required)
1025
+ :type request_body: Dict[str, str]
1026
+ :param _request_timeout: timeout setting for this request. If one
1027
+ number provided, it will be total request
1028
+ timeout. It can also be a pair (tuple) of
1029
+ (connection, read) timeouts.
1030
+ :type _request_timeout: int, tuple(int, int), optional
1031
+ :param _request_auth: set to override the auth_settings for an a single
1032
+ request; this effectively ignores the
1033
+ authentication in the spec for a single request.
1034
+ :type _request_auth: dict, optional
1035
+ :param _content_type: force content-type for the request.
1036
+ :type _content_type: str, Optional
1037
+ :param _headers: set to override the headers for a single
1038
+ request; this effectively ignores the headers
1039
+ in the spec for a single request.
1040
+ :type _headers: dict, optional
1041
+ :param _host_index: set to override the host_index for a single
1042
+ request; this effectively ignores the host_index
1043
+ in the spec for a single request.
1044
+ :type _host_index: int, optional
1045
+ :return: Returns the result object.
1046
+ """ # noqa: E501
1047
+
1048
+ _param = self._items_send_mfa_serialize(
1049
+ id=id,
1050
+ request_body=request_body,
1051
+ _request_auth=_request_auth,
1052
+ _content_type=_content_type,
1053
+ _headers=_headers,
1054
+ _host_index=_host_index
1055
+ )
1056
+
1057
+ _response_types_map: Dict[str, Optional[str]] = {
1058
+ '200': "Item",
1059
+ '404': "GlobalErrorResponse",
1060
+ '500': "GlobalErrorResponse",
1061
+ }
1062
+ response_data = self.api_client.call_api(
1063
+ *_param,
1064
+ _request_timeout=_request_timeout
1065
+ )
1066
+ return response_data.response
1067
+
1068
+
1069
+ def _items_send_mfa_serialize(
1070
+ self,
1071
+ id,
1072
+ request_body,
1073
+ _request_auth,
1074
+ _content_type,
1075
+ _headers,
1076
+ _host_index,
1077
+ ) -> RequestSerialized:
1078
+
1079
+ _host = None
1080
+
1081
+ _collection_formats: Dict[str, str] = {
1082
+ }
1083
+
1084
+ _path_params: Dict[str, str] = {}
1085
+ _query_params: List[Tuple[str, str]] = []
1086
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1087
+ _form_params: List[Tuple[str, str]] = []
1088
+ _files: Dict[str, Union[str, bytes]] = {}
1089
+ _body_params: Optional[bytes] = None
1090
+
1091
+ # process the path parameters
1092
+ if id is not None:
1093
+ _path_params['id'] = id
1094
+ # process the query parameters
1095
+ # process the header parameters
1096
+ # process the form parameters
1097
+ # process the body parameter
1098
+ if request_body is not None:
1099
+ _body_params = request_body
1100
+
1101
+
1102
+ # set the HTTP header `Accept`
1103
+ _header_params['Accept'] = self.api_client.select_header_accept(
1104
+ [
1105
+ 'application/json'
1106
+ ]
1107
+ )
1108
+
1109
+ # set the HTTP header `Content-Type`
1110
+ if _content_type:
1111
+ _header_params['Content-Type'] = _content_type
1112
+ else:
1113
+ _default_content_type = (
1114
+ self.api_client.select_header_content_type(
1115
+ [
1116
+ 'application/json'
1117
+ ]
1118
+ )
1119
+ )
1120
+ if _default_content_type is not None:
1121
+ _header_params['Content-Type'] = _default_content_type
1122
+
1123
+ # authentication setting
1124
+ _auth_settings: List[str] = [
1125
+ 'default'
1126
+ ]
1127
+
1128
+ return self.api_client.param_serialize(
1129
+ method='POST',
1130
+ resource_path='/items/{id}/mfa',
1131
+ path_params=_path_params,
1132
+ query_params=_query_params,
1133
+ header_params=_header_params,
1134
+ body=_body_params,
1135
+ post_params=_form_params,
1136
+ files=_files,
1137
+ auth_settings=_auth_settings,
1138
+ collection_formats=_collection_formats,
1139
+ _host=_host,
1140
+ _request_auth=_request_auth
1141
+ )
1142
+
1143
+
1144
+
1145
+
1146
+ @validate_call
1147
+ def items_update(
1148
+ self,
1149
+ id: Annotated[StrictStr, Field(description="Item primary identifier")],
1150
+ update_item: Annotated[Optional[UpdateItem], Field(description="Update item request")] = None,
1151
+ _request_timeout: Union[
1152
+ None,
1153
+ Annotated[StrictFloat, Field(gt=0)],
1154
+ Tuple[
1155
+ Annotated[StrictFloat, Field(gt=0)],
1156
+ Annotated[StrictFloat, Field(gt=0)]
1157
+ ]
1158
+ ] = None,
1159
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1160
+ _content_type: Optional[StrictStr] = None,
1161
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1162
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1163
+ ) -> Item:
1164
+ """Update
1165
+
1166
+ Triggers new syncronization for the Item, optionally updating the stored credentials.
1167
+
1168
+ :param id: Item primary identifier (required)
1169
+ :type id: str
1170
+ :param update_item: Update item request
1171
+ :type update_item: UpdateItem
1172
+ :param _request_timeout: timeout setting for this request. If one
1173
+ number provided, it will be total request
1174
+ timeout. It can also be a pair (tuple) of
1175
+ (connection, read) timeouts.
1176
+ :type _request_timeout: int, tuple(int, int), optional
1177
+ :param _request_auth: set to override the auth_settings for an a single
1178
+ request; this effectively ignores the
1179
+ authentication in the spec for a single request.
1180
+ :type _request_auth: dict, optional
1181
+ :param _content_type: force content-type for the request.
1182
+ :type _content_type: str, Optional
1183
+ :param _headers: set to override the headers for a single
1184
+ request; this effectively ignores the headers
1185
+ in the spec for a single request.
1186
+ :type _headers: dict, optional
1187
+ :param _host_index: set to override the host_index for a single
1188
+ request; this effectively ignores the host_index
1189
+ in the spec for a single request.
1190
+ :type _host_index: int, optional
1191
+ :return: Returns the result object.
1192
+ """ # noqa: E501
1193
+
1194
+ _param = self._items_update_serialize(
1195
+ id=id,
1196
+ update_item=update_item,
1197
+ _request_auth=_request_auth,
1198
+ _content_type=_content_type,
1199
+ _headers=_headers,
1200
+ _host_index=_host_index
1201
+ )
1202
+
1203
+ _response_types_map: Dict[str, Optional[str]] = {
1204
+ '200': "Item",
1205
+ '400': "GlobalErrorResponse",
1206
+ '404': "GlobalErrorResponse",
1207
+ '409': "GlobalErrorResponse",
1208
+ '500': "GlobalErrorResponse",
1209
+ }
1210
+ response_data = self.api_client.call_api(
1211
+ *_param,
1212
+ _request_timeout=_request_timeout
1213
+ )
1214
+ response_data.read()
1215
+ return self.api_client.response_deserialize(
1216
+ response_data=response_data,
1217
+ response_types_map=_response_types_map,
1218
+ ).data
1219
+
1220
+
1221
+ @validate_call
1222
+ def items_update_with_http_info(
1223
+ self,
1224
+ id: Annotated[StrictStr, Field(description="Item primary identifier")],
1225
+ update_item: Annotated[Optional[UpdateItem], Field(description="Update item request")] = None,
1226
+ _request_timeout: Union[
1227
+ None,
1228
+ Annotated[StrictFloat, Field(gt=0)],
1229
+ Tuple[
1230
+ Annotated[StrictFloat, Field(gt=0)],
1231
+ Annotated[StrictFloat, Field(gt=0)]
1232
+ ]
1233
+ ] = None,
1234
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1235
+ _content_type: Optional[StrictStr] = None,
1236
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1237
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1238
+ ) -> ApiResponse[Item]:
1239
+ """Update
1240
+
1241
+ Triggers new syncronization for the Item, optionally updating the stored credentials.
1242
+
1243
+ :param id: Item primary identifier (required)
1244
+ :type id: str
1245
+ :param update_item: Update item request
1246
+ :type update_item: UpdateItem
1247
+ :param _request_timeout: timeout setting for this request. If one
1248
+ number provided, it will be total request
1249
+ timeout. It can also be a pair (tuple) of
1250
+ (connection, read) timeouts.
1251
+ :type _request_timeout: int, tuple(int, int), optional
1252
+ :param _request_auth: set to override the auth_settings for an a single
1253
+ request; this effectively ignores the
1254
+ authentication in the spec for a single request.
1255
+ :type _request_auth: dict, optional
1256
+ :param _content_type: force content-type for the request.
1257
+ :type _content_type: str, Optional
1258
+ :param _headers: set to override the headers for a single
1259
+ request; this effectively ignores the headers
1260
+ in the spec for a single request.
1261
+ :type _headers: dict, optional
1262
+ :param _host_index: set to override the host_index for a single
1263
+ request; this effectively ignores the host_index
1264
+ in the spec for a single request.
1265
+ :type _host_index: int, optional
1266
+ :return: Returns the result object.
1267
+ """ # noqa: E501
1268
+
1269
+ _param = self._items_update_serialize(
1270
+ id=id,
1271
+ update_item=update_item,
1272
+ _request_auth=_request_auth,
1273
+ _content_type=_content_type,
1274
+ _headers=_headers,
1275
+ _host_index=_host_index
1276
+ )
1277
+
1278
+ _response_types_map: Dict[str, Optional[str]] = {
1279
+ '200': "Item",
1280
+ '400': "GlobalErrorResponse",
1281
+ '404': "GlobalErrorResponse",
1282
+ '409': "GlobalErrorResponse",
1283
+ '500': "GlobalErrorResponse",
1284
+ }
1285
+ response_data = self.api_client.call_api(
1286
+ *_param,
1287
+ _request_timeout=_request_timeout
1288
+ )
1289
+ response_data.read()
1290
+ return self.api_client.response_deserialize(
1291
+ response_data=response_data,
1292
+ response_types_map=_response_types_map,
1293
+ )
1294
+
1295
+
1296
+ @validate_call
1297
+ def items_update_without_preload_content(
1298
+ self,
1299
+ id: Annotated[StrictStr, Field(description="Item primary identifier")],
1300
+ update_item: Annotated[Optional[UpdateItem], Field(description="Update item request")] = None,
1301
+ _request_timeout: Union[
1302
+ None,
1303
+ Annotated[StrictFloat, Field(gt=0)],
1304
+ Tuple[
1305
+ Annotated[StrictFloat, Field(gt=0)],
1306
+ Annotated[StrictFloat, Field(gt=0)]
1307
+ ]
1308
+ ] = None,
1309
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1310
+ _content_type: Optional[StrictStr] = None,
1311
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1312
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1313
+ ) -> RESTResponseType:
1314
+ """Update
1315
+
1316
+ Triggers new syncronization for the Item, optionally updating the stored credentials.
1317
+
1318
+ :param id: Item primary identifier (required)
1319
+ :type id: str
1320
+ :param update_item: Update item request
1321
+ :type update_item: UpdateItem
1322
+ :param _request_timeout: timeout setting for this request. If one
1323
+ number provided, it will be total request
1324
+ timeout. It can also be a pair (tuple) of
1325
+ (connection, read) timeouts.
1326
+ :type _request_timeout: int, tuple(int, int), optional
1327
+ :param _request_auth: set to override the auth_settings for an a single
1328
+ request; this effectively ignores the
1329
+ authentication in the spec for a single request.
1330
+ :type _request_auth: dict, optional
1331
+ :param _content_type: force content-type for the request.
1332
+ :type _content_type: str, Optional
1333
+ :param _headers: set to override the headers for a single
1334
+ request; this effectively ignores the headers
1335
+ in the spec for a single request.
1336
+ :type _headers: dict, optional
1337
+ :param _host_index: set to override the host_index for a single
1338
+ request; this effectively ignores the host_index
1339
+ in the spec for a single request.
1340
+ :type _host_index: int, optional
1341
+ :return: Returns the result object.
1342
+ """ # noqa: E501
1343
+
1344
+ _param = self._items_update_serialize(
1345
+ id=id,
1346
+ update_item=update_item,
1347
+ _request_auth=_request_auth,
1348
+ _content_type=_content_type,
1349
+ _headers=_headers,
1350
+ _host_index=_host_index
1351
+ )
1352
+
1353
+ _response_types_map: Dict[str, Optional[str]] = {
1354
+ '200': "Item",
1355
+ '400': "GlobalErrorResponse",
1356
+ '404': "GlobalErrorResponse",
1357
+ '409': "GlobalErrorResponse",
1358
+ '500': "GlobalErrorResponse",
1359
+ }
1360
+ response_data = self.api_client.call_api(
1361
+ *_param,
1362
+ _request_timeout=_request_timeout
1363
+ )
1364
+ return response_data.response
1365
+
1366
+
1367
+ def _items_update_serialize(
1368
+ self,
1369
+ id,
1370
+ update_item,
1371
+ _request_auth,
1372
+ _content_type,
1373
+ _headers,
1374
+ _host_index,
1375
+ ) -> RequestSerialized:
1376
+
1377
+ _host = None
1378
+
1379
+ _collection_formats: Dict[str, str] = {
1380
+ }
1381
+
1382
+ _path_params: Dict[str, str] = {}
1383
+ _query_params: List[Tuple[str, str]] = []
1384
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1385
+ _form_params: List[Tuple[str, str]] = []
1386
+ _files: Dict[str, Union[str, bytes]] = {}
1387
+ _body_params: Optional[bytes] = None
1388
+
1389
+ # process the path parameters
1390
+ if id is not None:
1391
+ _path_params['id'] = id
1392
+ # process the query parameters
1393
+ # process the header parameters
1394
+ # process the form parameters
1395
+ # process the body parameter
1396
+ if update_item is not None:
1397
+ _body_params = update_item
1398
+
1399
+
1400
+ # set the HTTP header `Accept`
1401
+ _header_params['Accept'] = self.api_client.select_header_accept(
1402
+ [
1403
+ 'application/json'
1404
+ ]
1405
+ )
1406
+
1407
+ # set the HTTP header `Content-Type`
1408
+ if _content_type:
1409
+ _header_params['Content-Type'] = _content_type
1410
+ else:
1411
+ _default_content_type = (
1412
+ self.api_client.select_header_content_type(
1413
+ [
1414
+ 'application/json'
1415
+ ]
1416
+ )
1417
+ )
1418
+ if _default_content_type is not None:
1419
+ _header_params['Content-Type'] = _default_content_type
1420
+
1421
+ # authentication setting
1422
+ _auth_settings: List[str] = [
1423
+ 'default'
1424
+ ]
1425
+
1426
+ return self.api_client.param_serialize(
1427
+ method='PATCH',
1428
+ resource_path='/items/{id}',
1429
+ path_params=_path_params,
1430
+ query_params=_query_params,
1431
+ header_params=_header_params,
1432
+ body=_body_params,
1433
+ post_params=_form_params,
1434
+ files=_files,
1435
+ auth_settings=_auth_settings,
1436
+ collection_formats=_collection_formats,
1437
+ _host=_host,
1438
+ _request_auth=_request_auth
1439
+ )
1440
+
1441
+