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,599 @@
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
21
+ from typing import Optional
22
+ from typing_extensions import Annotated
23
+ from pluggy_sdk.models.auth_request import AuthRequest
24
+ from pluggy_sdk.models.auth_response import AuthResponse
25
+ from pluggy_sdk.models.connect_token_request import ConnectTokenRequest
26
+ from pluggy_sdk.models.connect_token_response import ConnectTokenResponse
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 AuthApi:
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 auth_create(
48
+ self,
49
+ auth_request: AuthRequest,
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
+ ) -> AuthResponse:
63
+ """Create API Key
64
+
65
+ Validate clientId and clientSecret and return an API Key
66
+
67
+ :param auth_request: (required)
68
+ :type auth_request: AuthRequest
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._auth_create_serialize(
92
+ auth_request=auth_request,
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': "AuthResponse",
101
+ '401': "GlobalErrorResponse",
102
+ '500': "GlobalErrorResponse",
103
+ }
104
+ response_data = self.api_client.call_api(
105
+ *_param,
106
+ _request_timeout=_request_timeout
107
+ )
108
+ response_data.read()
109
+ return self.api_client.response_deserialize(
110
+ response_data=response_data,
111
+ response_types_map=_response_types_map,
112
+ ).data
113
+
114
+
115
+ @validate_call
116
+ def auth_create_with_http_info(
117
+ self,
118
+ auth_request: AuthRequest,
119
+ _request_timeout: Union[
120
+ None,
121
+ Annotated[StrictFloat, Field(gt=0)],
122
+ Tuple[
123
+ Annotated[StrictFloat, Field(gt=0)],
124
+ Annotated[StrictFloat, Field(gt=0)]
125
+ ]
126
+ ] = None,
127
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
128
+ _content_type: Optional[StrictStr] = None,
129
+ _headers: Optional[Dict[StrictStr, Any]] = None,
130
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
131
+ ) -> ApiResponse[AuthResponse]:
132
+ """Create API Key
133
+
134
+ Validate clientId and clientSecret and return an API Key
135
+
136
+ :param auth_request: (required)
137
+ :type auth_request: AuthRequest
138
+ :param _request_timeout: timeout setting for this request. If one
139
+ number provided, it will be total request
140
+ timeout. It can also be a pair (tuple) of
141
+ (connection, read) timeouts.
142
+ :type _request_timeout: int, tuple(int, int), optional
143
+ :param _request_auth: set to override the auth_settings for an a single
144
+ request; this effectively ignores the
145
+ authentication in the spec for a single request.
146
+ :type _request_auth: dict, optional
147
+ :param _content_type: force content-type for the request.
148
+ :type _content_type: str, Optional
149
+ :param _headers: set to override the headers for a single
150
+ request; this effectively ignores the headers
151
+ in the spec for a single request.
152
+ :type _headers: dict, optional
153
+ :param _host_index: set to override the host_index for a single
154
+ request; this effectively ignores the host_index
155
+ in the spec for a single request.
156
+ :type _host_index: int, optional
157
+ :return: Returns the result object.
158
+ """ # noqa: E501
159
+
160
+ _param = self._auth_create_serialize(
161
+ auth_request=auth_request,
162
+ _request_auth=_request_auth,
163
+ _content_type=_content_type,
164
+ _headers=_headers,
165
+ _host_index=_host_index
166
+ )
167
+
168
+ _response_types_map: Dict[str, Optional[str]] = {
169
+ '200': "AuthResponse",
170
+ '401': "GlobalErrorResponse",
171
+ '500': "GlobalErrorResponse",
172
+ }
173
+ response_data = self.api_client.call_api(
174
+ *_param,
175
+ _request_timeout=_request_timeout
176
+ )
177
+ response_data.read()
178
+ return self.api_client.response_deserialize(
179
+ response_data=response_data,
180
+ response_types_map=_response_types_map,
181
+ )
182
+
183
+
184
+ @validate_call
185
+ def auth_create_without_preload_content(
186
+ self,
187
+ auth_request: AuthRequest,
188
+ _request_timeout: Union[
189
+ None,
190
+ Annotated[StrictFloat, Field(gt=0)],
191
+ Tuple[
192
+ Annotated[StrictFloat, Field(gt=0)],
193
+ Annotated[StrictFloat, Field(gt=0)]
194
+ ]
195
+ ] = None,
196
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
197
+ _content_type: Optional[StrictStr] = None,
198
+ _headers: Optional[Dict[StrictStr, Any]] = None,
199
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
200
+ ) -> RESTResponseType:
201
+ """Create API Key
202
+
203
+ Validate clientId and clientSecret and return an API Key
204
+
205
+ :param auth_request: (required)
206
+ :type auth_request: AuthRequest
207
+ :param _request_timeout: timeout setting for this request. If one
208
+ number provided, it will be total request
209
+ timeout. It can also be a pair (tuple) of
210
+ (connection, read) timeouts.
211
+ :type _request_timeout: int, tuple(int, int), optional
212
+ :param _request_auth: set to override the auth_settings for an a single
213
+ request; this effectively ignores the
214
+ authentication in the spec for a single request.
215
+ :type _request_auth: dict, optional
216
+ :param _content_type: force content-type for the request.
217
+ :type _content_type: str, Optional
218
+ :param _headers: set to override the headers for a single
219
+ request; this effectively ignores the headers
220
+ in the spec for a single request.
221
+ :type _headers: dict, optional
222
+ :param _host_index: set to override the host_index for a single
223
+ request; this effectively ignores the host_index
224
+ in the spec for a single request.
225
+ :type _host_index: int, optional
226
+ :return: Returns the result object.
227
+ """ # noqa: E501
228
+
229
+ _param = self._auth_create_serialize(
230
+ auth_request=auth_request,
231
+ _request_auth=_request_auth,
232
+ _content_type=_content_type,
233
+ _headers=_headers,
234
+ _host_index=_host_index
235
+ )
236
+
237
+ _response_types_map: Dict[str, Optional[str]] = {
238
+ '200': "AuthResponse",
239
+ '401': "GlobalErrorResponse",
240
+ '500': "GlobalErrorResponse",
241
+ }
242
+ response_data = self.api_client.call_api(
243
+ *_param,
244
+ _request_timeout=_request_timeout
245
+ )
246
+ return response_data.response
247
+
248
+
249
+ def _auth_create_serialize(
250
+ self,
251
+ auth_request,
252
+ _request_auth,
253
+ _content_type,
254
+ _headers,
255
+ _host_index,
256
+ ) -> RequestSerialized:
257
+
258
+ _host = None
259
+
260
+ _collection_formats: Dict[str, str] = {
261
+ }
262
+
263
+ _path_params: Dict[str, str] = {}
264
+ _query_params: List[Tuple[str, str]] = []
265
+ _header_params: Dict[str, Optional[str]] = _headers or {}
266
+ _form_params: List[Tuple[str, str]] = []
267
+ _files: Dict[str, Union[str, bytes]] = {}
268
+ _body_params: Optional[bytes] = None
269
+
270
+ # process the path parameters
271
+ # process the query parameters
272
+ # process the header parameters
273
+ # process the form parameters
274
+ # process the body parameter
275
+ if auth_request is not None:
276
+ _body_params = auth_request
277
+
278
+
279
+ # set the HTTP header `Accept`
280
+ _header_params['Accept'] = self.api_client.select_header_accept(
281
+ [
282
+ 'application/json'
283
+ ]
284
+ )
285
+
286
+ # set the HTTP header `Content-Type`
287
+ if _content_type:
288
+ _header_params['Content-Type'] = _content_type
289
+ else:
290
+ _default_content_type = (
291
+ self.api_client.select_header_content_type(
292
+ [
293
+ 'application/json'
294
+ ]
295
+ )
296
+ )
297
+ if _default_content_type is not None:
298
+ _header_params['Content-Type'] = _default_content_type
299
+
300
+ # authentication setting
301
+ _auth_settings: List[str] = [
302
+ ]
303
+
304
+ return self.api_client.param_serialize(
305
+ method='POST',
306
+ resource_path='/auth',
307
+ path_params=_path_params,
308
+ query_params=_query_params,
309
+ header_params=_header_params,
310
+ body=_body_params,
311
+ post_params=_form_params,
312
+ files=_files,
313
+ auth_settings=_auth_settings,
314
+ collection_formats=_collection_formats,
315
+ _host=_host,
316
+ _request_auth=_request_auth
317
+ )
318
+
319
+
320
+
321
+
322
+ @validate_call
323
+ def connect_token_create(
324
+ self,
325
+ connect_token_request: Annotated[Optional[ConnectTokenRequest], Field(description="Create connect token payload")] = None,
326
+ _request_timeout: Union[
327
+ None,
328
+ Annotated[StrictFloat, Field(gt=0)],
329
+ Tuple[
330
+ Annotated[StrictFloat, Field(gt=0)],
331
+ Annotated[StrictFloat, Field(gt=0)]
332
+ ]
333
+ ] = None,
334
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
335
+ _content_type: Optional[StrictStr] = None,
336
+ _headers: Optional[Dict[StrictStr, Any]] = None,
337
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
338
+ ) -> ConnectTokenResponse:
339
+ """Create Connect Token
340
+
341
+ Creates a connect token
342
+
343
+ :param connect_token_request: Create connect token payload
344
+ :type connect_token_request: ConnectTokenRequest
345
+ :param _request_timeout: timeout setting for this request. If one
346
+ number provided, it will be total request
347
+ timeout. It can also be a pair (tuple) of
348
+ (connection, read) timeouts.
349
+ :type _request_timeout: int, tuple(int, int), optional
350
+ :param _request_auth: set to override the auth_settings for an a single
351
+ request; this effectively ignores the
352
+ authentication in the spec for a single request.
353
+ :type _request_auth: dict, optional
354
+ :param _content_type: force content-type for the request.
355
+ :type _content_type: str, Optional
356
+ :param _headers: set to override the headers for a single
357
+ request; this effectively ignores the headers
358
+ in the spec for a single request.
359
+ :type _headers: dict, optional
360
+ :param _host_index: set to override the host_index for a single
361
+ request; this effectively ignores the host_index
362
+ in the spec for a single request.
363
+ :type _host_index: int, optional
364
+ :return: Returns the result object.
365
+ """ # noqa: E501
366
+
367
+ _param = self._connect_token_create_serialize(
368
+ connect_token_request=connect_token_request,
369
+ _request_auth=_request_auth,
370
+ _content_type=_content_type,
371
+ _headers=_headers,
372
+ _host_index=_host_index
373
+ )
374
+
375
+ _response_types_map: Dict[str, Optional[str]] = {
376
+ '200': "ConnectTokenResponse",
377
+ '403': "NotAuthenticatedResponse",
378
+ '404': "GlobalErrorResponse",
379
+ '500': "GlobalErrorResponse",
380
+ }
381
+ response_data = self.api_client.call_api(
382
+ *_param,
383
+ _request_timeout=_request_timeout
384
+ )
385
+ response_data.read()
386
+ return self.api_client.response_deserialize(
387
+ response_data=response_data,
388
+ response_types_map=_response_types_map,
389
+ ).data
390
+
391
+
392
+ @validate_call
393
+ def connect_token_create_with_http_info(
394
+ self,
395
+ connect_token_request: Annotated[Optional[ConnectTokenRequest], Field(description="Create connect token payload")] = None,
396
+ _request_timeout: Union[
397
+ None,
398
+ Annotated[StrictFloat, Field(gt=0)],
399
+ Tuple[
400
+ Annotated[StrictFloat, Field(gt=0)],
401
+ Annotated[StrictFloat, Field(gt=0)]
402
+ ]
403
+ ] = None,
404
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
405
+ _content_type: Optional[StrictStr] = None,
406
+ _headers: Optional[Dict[StrictStr, Any]] = None,
407
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
408
+ ) -> ApiResponse[ConnectTokenResponse]:
409
+ """Create Connect Token
410
+
411
+ Creates a connect token
412
+
413
+ :param connect_token_request: Create connect token payload
414
+ :type connect_token_request: ConnectTokenRequest
415
+ :param _request_timeout: timeout setting for this request. If one
416
+ number provided, it will be total request
417
+ timeout. It can also be a pair (tuple) of
418
+ (connection, read) timeouts.
419
+ :type _request_timeout: int, tuple(int, int), optional
420
+ :param _request_auth: set to override the auth_settings for an a single
421
+ request; this effectively ignores the
422
+ authentication in the spec for a single request.
423
+ :type _request_auth: dict, optional
424
+ :param _content_type: force content-type for the request.
425
+ :type _content_type: str, Optional
426
+ :param _headers: set to override the headers for a single
427
+ request; this effectively ignores the headers
428
+ in the spec for a single request.
429
+ :type _headers: dict, optional
430
+ :param _host_index: set to override the host_index for a single
431
+ request; this effectively ignores the host_index
432
+ in the spec for a single request.
433
+ :type _host_index: int, optional
434
+ :return: Returns the result object.
435
+ """ # noqa: E501
436
+
437
+ _param = self._connect_token_create_serialize(
438
+ connect_token_request=connect_token_request,
439
+ _request_auth=_request_auth,
440
+ _content_type=_content_type,
441
+ _headers=_headers,
442
+ _host_index=_host_index
443
+ )
444
+
445
+ _response_types_map: Dict[str, Optional[str]] = {
446
+ '200': "ConnectTokenResponse",
447
+ '403': "NotAuthenticatedResponse",
448
+ '404': "GlobalErrorResponse",
449
+ '500': "GlobalErrorResponse",
450
+ }
451
+ response_data = self.api_client.call_api(
452
+ *_param,
453
+ _request_timeout=_request_timeout
454
+ )
455
+ response_data.read()
456
+ return self.api_client.response_deserialize(
457
+ response_data=response_data,
458
+ response_types_map=_response_types_map,
459
+ )
460
+
461
+
462
+ @validate_call
463
+ def connect_token_create_without_preload_content(
464
+ self,
465
+ connect_token_request: Annotated[Optional[ConnectTokenRequest], Field(description="Create connect token payload")] = None,
466
+ _request_timeout: Union[
467
+ None,
468
+ Annotated[StrictFloat, Field(gt=0)],
469
+ Tuple[
470
+ Annotated[StrictFloat, Field(gt=0)],
471
+ Annotated[StrictFloat, Field(gt=0)]
472
+ ]
473
+ ] = None,
474
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
475
+ _content_type: Optional[StrictStr] = None,
476
+ _headers: Optional[Dict[StrictStr, Any]] = None,
477
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
478
+ ) -> RESTResponseType:
479
+ """Create Connect Token
480
+
481
+ Creates a connect token
482
+
483
+ :param connect_token_request: Create connect token payload
484
+ :type connect_token_request: ConnectTokenRequest
485
+ :param _request_timeout: timeout setting for this request. If one
486
+ number provided, it will be total request
487
+ timeout. It can also be a pair (tuple) of
488
+ (connection, read) timeouts.
489
+ :type _request_timeout: int, tuple(int, int), optional
490
+ :param _request_auth: set to override the auth_settings for an a single
491
+ request; this effectively ignores the
492
+ authentication in the spec for a single request.
493
+ :type _request_auth: dict, optional
494
+ :param _content_type: force content-type for the request.
495
+ :type _content_type: str, Optional
496
+ :param _headers: set to override the headers for a single
497
+ request; this effectively ignores the headers
498
+ in the spec for a single request.
499
+ :type _headers: dict, optional
500
+ :param _host_index: set to override the host_index for a single
501
+ request; this effectively ignores the host_index
502
+ in the spec for a single request.
503
+ :type _host_index: int, optional
504
+ :return: Returns the result object.
505
+ """ # noqa: E501
506
+
507
+ _param = self._connect_token_create_serialize(
508
+ connect_token_request=connect_token_request,
509
+ _request_auth=_request_auth,
510
+ _content_type=_content_type,
511
+ _headers=_headers,
512
+ _host_index=_host_index
513
+ )
514
+
515
+ _response_types_map: Dict[str, Optional[str]] = {
516
+ '200': "ConnectTokenResponse",
517
+ '403': "NotAuthenticatedResponse",
518
+ '404': "GlobalErrorResponse",
519
+ '500': "GlobalErrorResponse",
520
+ }
521
+ response_data = self.api_client.call_api(
522
+ *_param,
523
+ _request_timeout=_request_timeout
524
+ )
525
+ return response_data.response
526
+
527
+
528
+ def _connect_token_create_serialize(
529
+ self,
530
+ connect_token_request,
531
+ _request_auth,
532
+ _content_type,
533
+ _headers,
534
+ _host_index,
535
+ ) -> RequestSerialized:
536
+
537
+ _host = None
538
+
539
+ _collection_formats: Dict[str, str] = {
540
+ }
541
+
542
+ _path_params: Dict[str, str] = {}
543
+ _query_params: List[Tuple[str, str]] = []
544
+ _header_params: Dict[str, Optional[str]] = _headers or {}
545
+ _form_params: List[Tuple[str, str]] = []
546
+ _files: Dict[str, Union[str, bytes]] = {}
547
+ _body_params: Optional[bytes] = None
548
+
549
+ # process the path parameters
550
+ # process the query parameters
551
+ # process the header parameters
552
+ # process the form parameters
553
+ # process the body parameter
554
+ if connect_token_request is not None:
555
+ _body_params = connect_token_request
556
+
557
+
558
+ # set the HTTP header `Accept`
559
+ _header_params['Accept'] = self.api_client.select_header_accept(
560
+ [
561
+ 'application/json'
562
+ ]
563
+ )
564
+
565
+ # set the HTTP header `Content-Type`
566
+ if _content_type:
567
+ _header_params['Content-Type'] = _content_type
568
+ else:
569
+ _default_content_type = (
570
+ self.api_client.select_header_content_type(
571
+ [
572
+ 'application/json'
573
+ ]
574
+ )
575
+ )
576
+ if _default_content_type is not None:
577
+ _header_params['Content-Type'] = _default_content_type
578
+
579
+ # authentication setting
580
+ _auth_settings: List[str] = [
581
+ 'default'
582
+ ]
583
+
584
+ return self.api_client.param_serialize(
585
+ method='POST',
586
+ resource_path='/connect_token',
587
+ path_params=_path_params,
588
+ query_params=_query_params,
589
+ header_params=_header_params,
590
+ body=_body_params,
591
+ post_params=_form_params,
592
+ files=_files,
593
+ auth_settings=_auth_settings,
594
+ collection_formats=_collection_formats,
595
+ _host=_host,
596
+ _request_auth=_request_auth
597
+ )
598
+
599
+