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