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