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,1116 @@
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_account_request import CreateSmartAccountRequest
24
+ from pluggy_sdk.models.smart_account import SmartAccount
25
+ from pluggy_sdk.models.smart_account_balance import SmartAccountBalance
26
+ from pluggy_sdk.models.smart_accounts_list200_response import SmartAccountsList200Response
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 SmartAccountApi:
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 smart_account_balance_retrieve(
48
+ self,
49
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
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
+ ) -> SmartAccountBalance:
63
+ """Retrieve Balance
64
+
65
+ Recovers the smart account balance resource by its id
66
+
67
+ :param id: Smart account primary identifier (required)
68
+ :type id: str
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._smart_account_balance_retrieve_serialize(
92
+ id=id,
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': "SmartAccountBalance",
101
+ '404': "GlobalErrorResponse",
102
+ }
103
+ response_data = self.api_client.call_api(
104
+ *_param,
105
+ _request_timeout=_request_timeout
106
+ )
107
+ response_data.read()
108
+ return self.api_client.response_deserialize(
109
+ response_data=response_data,
110
+ response_types_map=_response_types_map,
111
+ ).data
112
+
113
+
114
+ @validate_call
115
+ def smart_account_balance_retrieve_with_http_info(
116
+ self,
117
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
118
+ _request_timeout: Union[
119
+ None,
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Tuple[
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Annotated[StrictFloat, Field(gt=0)]
124
+ ]
125
+ ] = None,
126
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
127
+ _content_type: Optional[StrictStr] = None,
128
+ _headers: Optional[Dict[StrictStr, Any]] = None,
129
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
130
+ ) -> ApiResponse[SmartAccountBalance]:
131
+ """Retrieve Balance
132
+
133
+ Recovers the smart account balance resource by its id
134
+
135
+ :param id: Smart account primary identifier (required)
136
+ :type id: str
137
+ :param _request_timeout: timeout setting for this request. If one
138
+ number provided, it will be total request
139
+ timeout. It can also be a pair (tuple) of
140
+ (connection, read) timeouts.
141
+ :type _request_timeout: int, tuple(int, int), optional
142
+ :param _request_auth: set to override the auth_settings for an a single
143
+ request; this effectively ignores the
144
+ authentication in the spec for a single request.
145
+ :type _request_auth: dict, optional
146
+ :param _content_type: force content-type for the request.
147
+ :type _content_type: str, Optional
148
+ :param _headers: set to override the headers for a single
149
+ request; this effectively ignores the headers
150
+ in the spec for a single request.
151
+ :type _headers: dict, optional
152
+ :param _host_index: set to override the host_index for a single
153
+ request; this effectively ignores the host_index
154
+ in the spec for a single request.
155
+ :type _host_index: int, optional
156
+ :return: Returns the result object.
157
+ """ # noqa: E501
158
+
159
+ _param = self._smart_account_balance_retrieve_serialize(
160
+ id=id,
161
+ _request_auth=_request_auth,
162
+ _content_type=_content_type,
163
+ _headers=_headers,
164
+ _host_index=_host_index
165
+ )
166
+
167
+ _response_types_map: Dict[str, Optional[str]] = {
168
+ '200': "SmartAccountBalance",
169
+ '404': "GlobalErrorResponse",
170
+ }
171
+ response_data = self.api_client.call_api(
172
+ *_param,
173
+ _request_timeout=_request_timeout
174
+ )
175
+ response_data.read()
176
+ return self.api_client.response_deserialize(
177
+ response_data=response_data,
178
+ response_types_map=_response_types_map,
179
+ )
180
+
181
+
182
+ @validate_call
183
+ def smart_account_balance_retrieve_without_preload_content(
184
+ self,
185
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
186
+ _request_timeout: Union[
187
+ None,
188
+ Annotated[StrictFloat, Field(gt=0)],
189
+ Tuple[
190
+ Annotated[StrictFloat, Field(gt=0)],
191
+ Annotated[StrictFloat, Field(gt=0)]
192
+ ]
193
+ ] = None,
194
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
195
+ _content_type: Optional[StrictStr] = None,
196
+ _headers: Optional[Dict[StrictStr, Any]] = None,
197
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
198
+ ) -> RESTResponseType:
199
+ """Retrieve Balance
200
+
201
+ Recovers the smart account balance resource by its id
202
+
203
+ :param id: Smart account primary identifier (required)
204
+ :type id: str
205
+ :param _request_timeout: timeout setting for this request. If one
206
+ number provided, it will be total request
207
+ timeout. It can also be a pair (tuple) of
208
+ (connection, read) timeouts.
209
+ :type _request_timeout: int, tuple(int, int), optional
210
+ :param _request_auth: set to override the auth_settings for an a single
211
+ request; this effectively ignores the
212
+ authentication in the spec for a single request.
213
+ :type _request_auth: dict, optional
214
+ :param _content_type: force content-type for the request.
215
+ :type _content_type: str, Optional
216
+ :param _headers: set to override the headers for a single
217
+ request; this effectively ignores the headers
218
+ in the spec for a single request.
219
+ :type _headers: dict, optional
220
+ :param _host_index: set to override the host_index for a single
221
+ request; this effectively ignores the host_index
222
+ in the spec for a single request.
223
+ :type _host_index: int, optional
224
+ :return: Returns the result object.
225
+ """ # noqa: E501
226
+
227
+ _param = self._smart_account_balance_retrieve_serialize(
228
+ id=id,
229
+ _request_auth=_request_auth,
230
+ _content_type=_content_type,
231
+ _headers=_headers,
232
+ _host_index=_host_index
233
+ )
234
+
235
+ _response_types_map: Dict[str, Optional[str]] = {
236
+ '200': "SmartAccountBalance",
237
+ '404': "GlobalErrorResponse",
238
+ }
239
+ response_data = self.api_client.call_api(
240
+ *_param,
241
+ _request_timeout=_request_timeout
242
+ )
243
+ return response_data.response
244
+
245
+
246
+ def _smart_account_balance_retrieve_serialize(
247
+ self,
248
+ id,
249
+ _request_auth,
250
+ _content_type,
251
+ _headers,
252
+ _host_index,
253
+ ) -> RequestSerialized:
254
+
255
+ _host = None
256
+
257
+ _collection_formats: Dict[str, str] = {
258
+ }
259
+
260
+ _path_params: Dict[str, str] = {}
261
+ _query_params: List[Tuple[str, str]] = []
262
+ _header_params: Dict[str, Optional[str]] = _headers or {}
263
+ _form_params: List[Tuple[str, str]] = []
264
+ _files: Dict[str, Union[str, bytes]] = {}
265
+ _body_params: Optional[bytes] = None
266
+
267
+ # process the path parameters
268
+ if id is not None:
269
+ _path_params['id'] = id
270
+ # process the query parameters
271
+ # process the header parameters
272
+ # process the form parameters
273
+ # process the body parameter
274
+
275
+
276
+ # set the HTTP header `Accept`
277
+ _header_params['Accept'] = self.api_client.select_header_accept(
278
+ [
279
+ 'application/json'
280
+ ]
281
+ )
282
+
283
+
284
+ # authentication setting
285
+ _auth_settings: List[str] = [
286
+ 'default'
287
+ ]
288
+
289
+ return self.api_client.param_serialize(
290
+ method='GET',
291
+ resource_path='/payments/smart-accounts/{id}/balance',
292
+ path_params=_path_params,
293
+ query_params=_query_params,
294
+ header_params=_header_params,
295
+ body=_body_params,
296
+ post_params=_form_params,
297
+ files=_files,
298
+ auth_settings=_auth_settings,
299
+ collection_formats=_collection_formats,
300
+ _host=_host,
301
+ _request_auth=_request_auth
302
+ )
303
+
304
+
305
+
306
+
307
+ @validate_call
308
+ def smart_account_create(
309
+ self,
310
+ create_smart_account_request: CreateSmartAccountRequest,
311
+ _request_timeout: Union[
312
+ None,
313
+ Annotated[StrictFloat, Field(gt=0)],
314
+ Tuple[
315
+ Annotated[StrictFloat, Field(gt=0)],
316
+ Annotated[StrictFloat, Field(gt=0)]
317
+ ]
318
+ ] = None,
319
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
320
+ _content_type: Optional[StrictStr] = None,
321
+ _headers: Optional[Dict[StrictStr, Any]] = None,
322
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
323
+ ) -> SmartAccount:
324
+ """Create
325
+
326
+ Creates the smart account resource
327
+
328
+ :param create_smart_account_request: (required)
329
+ :type create_smart_account_request: CreateSmartAccountRequest
330
+ :param _request_timeout: timeout setting for this request. If one
331
+ number provided, it will be total request
332
+ timeout. It can also be a pair (tuple) of
333
+ (connection, read) timeouts.
334
+ :type _request_timeout: int, tuple(int, int), optional
335
+ :param _request_auth: set to override the auth_settings for an a single
336
+ request; this effectively ignores the
337
+ authentication in the spec for a single request.
338
+ :type _request_auth: dict, optional
339
+ :param _content_type: force content-type for the request.
340
+ :type _content_type: str, Optional
341
+ :param _headers: set to override the headers for a single
342
+ request; this effectively ignores the headers
343
+ in the spec for a single request.
344
+ :type _headers: dict, optional
345
+ :param _host_index: set to override the host_index for a single
346
+ request; this effectively ignores the host_index
347
+ in the spec for a single request.
348
+ :type _host_index: int, optional
349
+ :return: Returns the result object.
350
+ """ # noqa: E501
351
+
352
+ _param = self._smart_account_create_serialize(
353
+ create_smart_account_request=create_smart_account_request,
354
+ _request_auth=_request_auth,
355
+ _content_type=_content_type,
356
+ _headers=_headers,
357
+ _host_index=_host_index
358
+ )
359
+
360
+ _response_types_map: Dict[str, Optional[str]] = {
361
+ '200': "SmartAccount",
362
+ '400': "GlobalErrorResponse",
363
+ }
364
+ response_data = self.api_client.call_api(
365
+ *_param,
366
+ _request_timeout=_request_timeout
367
+ )
368
+ response_data.read()
369
+ return self.api_client.response_deserialize(
370
+ response_data=response_data,
371
+ response_types_map=_response_types_map,
372
+ ).data
373
+
374
+
375
+ @validate_call
376
+ def smart_account_create_with_http_info(
377
+ self,
378
+ create_smart_account_request: CreateSmartAccountRequest,
379
+ _request_timeout: Union[
380
+ None,
381
+ Annotated[StrictFloat, Field(gt=0)],
382
+ Tuple[
383
+ Annotated[StrictFloat, Field(gt=0)],
384
+ Annotated[StrictFloat, Field(gt=0)]
385
+ ]
386
+ ] = None,
387
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
388
+ _content_type: Optional[StrictStr] = None,
389
+ _headers: Optional[Dict[StrictStr, Any]] = None,
390
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
391
+ ) -> ApiResponse[SmartAccount]:
392
+ """Create
393
+
394
+ Creates the smart account resource
395
+
396
+ :param create_smart_account_request: (required)
397
+ :type create_smart_account_request: CreateSmartAccountRequest
398
+ :param _request_timeout: timeout setting for this request. If one
399
+ number provided, it will be total request
400
+ timeout. It can also be a pair (tuple) of
401
+ (connection, read) timeouts.
402
+ :type _request_timeout: int, tuple(int, int), optional
403
+ :param _request_auth: set to override the auth_settings for an a single
404
+ request; this effectively ignores the
405
+ authentication in the spec for a single request.
406
+ :type _request_auth: dict, optional
407
+ :param _content_type: force content-type for the request.
408
+ :type _content_type: str, Optional
409
+ :param _headers: set to override the headers for a single
410
+ request; this effectively ignores the headers
411
+ in the spec for a single request.
412
+ :type _headers: dict, optional
413
+ :param _host_index: set to override the host_index for a single
414
+ request; this effectively ignores the host_index
415
+ in the spec for a single request.
416
+ :type _host_index: int, optional
417
+ :return: Returns the result object.
418
+ """ # noqa: E501
419
+
420
+ _param = self._smart_account_create_serialize(
421
+ create_smart_account_request=create_smart_account_request,
422
+ _request_auth=_request_auth,
423
+ _content_type=_content_type,
424
+ _headers=_headers,
425
+ _host_index=_host_index
426
+ )
427
+
428
+ _response_types_map: Dict[str, Optional[str]] = {
429
+ '200': "SmartAccount",
430
+ '400': "GlobalErrorResponse",
431
+ }
432
+ response_data = self.api_client.call_api(
433
+ *_param,
434
+ _request_timeout=_request_timeout
435
+ )
436
+ response_data.read()
437
+ return self.api_client.response_deserialize(
438
+ response_data=response_data,
439
+ response_types_map=_response_types_map,
440
+ )
441
+
442
+
443
+ @validate_call
444
+ def smart_account_create_without_preload_content(
445
+ self,
446
+ create_smart_account_request: CreateSmartAccountRequest,
447
+ _request_timeout: Union[
448
+ None,
449
+ Annotated[StrictFloat, Field(gt=0)],
450
+ Tuple[
451
+ Annotated[StrictFloat, Field(gt=0)],
452
+ Annotated[StrictFloat, Field(gt=0)]
453
+ ]
454
+ ] = None,
455
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
456
+ _content_type: Optional[StrictStr] = None,
457
+ _headers: Optional[Dict[StrictStr, Any]] = None,
458
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
459
+ ) -> RESTResponseType:
460
+ """Create
461
+
462
+ Creates the smart account resource
463
+
464
+ :param create_smart_account_request: (required)
465
+ :type create_smart_account_request: CreateSmartAccountRequest
466
+ :param _request_timeout: timeout setting for this request. If one
467
+ number provided, it will be total request
468
+ timeout. It can also be a pair (tuple) of
469
+ (connection, read) timeouts.
470
+ :type _request_timeout: int, tuple(int, int), optional
471
+ :param _request_auth: set to override the auth_settings for an a single
472
+ request; this effectively ignores the
473
+ authentication in the spec for a single request.
474
+ :type _request_auth: dict, optional
475
+ :param _content_type: force content-type for the request.
476
+ :type _content_type: str, Optional
477
+ :param _headers: set to override the headers for a single
478
+ request; this effectively ignores the headers
479
+ in the spec for a single request.
480
+ :type _headers: dict, optional
481
+ :param _host_index: set to override the host_index for a single
482
+ request; this effectively ignores the host_index
483
+ in the spec for a single request.
484
+ :type _host_index: int, optional
485
+ :return: Returns the result object.
486
+ """ # noqa: E501
487
+
488
+ _param = self._smart_account_create_serialize(
489
+ create_smart_account_request=create_smart_account_request,
490
+ _request_auth=_request_auth,
491
+ _content_type=_content_type,
492
+ _headers=_headers,
493
+ _host_index=_host_index
494
+ )
495
+
496
+ _response_types_map: Dict[str, Optional[str]] = {
497
+ '200': "SmartAccount",
498
+ '400': "GlobalErrorResponse",
499
+ }
500
+ response_data = self.api_client.call_api(
501
+ *_param,
502
+ _request_timeout=_request_timeout
503
+ )
504
+ return response_data.response
505
+
506
+
507
+ def _smart_account_create_serialize(
508
+ self,
509
+ create_smart_account_request,
510
+ _request_auth,
511
+ _content_type,
512
+ _headers,
513
+ _host_index,
514
+ ) -> RequestSerialized:
515
+
516
+ _host = None
517
+
518
+ _collection_formats: Dict[str, str] = {
519
+ }
520
+
521
+ _path_params: Dict[str, str] = {}
522
+ _query_params: List[Tuple[str, str]] = []
523
+ _header_params: Dict[str, Optional[str]] = _headers or {}
524
+ _form_params: List[Tuple[str, str]] = []
525
+ _files: Dict[str, Union[str, bytes]] = {}
526
+ _body_params: Optional[bytes] = None
527
+
528
+ # process the path parameters
529
+ # process the query parameters
530
+ # process the header parameters
531
+ # process the form parameters
532
+ # process the body parameter
533
+ if create_smart_account_request is not None:
534
+ _body_params = create_smart_account_request
535
+
536
+
537
+ # set the HTTP header `Accept`
538
+ _header_params['Accept'] = self.api_client.select_header_accept(
539
+ [
540
+ 'application/json'
541
+ ]
542
+ )
543
+
544
+ # set the HTTP header `Content-Type`
545
+ if _content_type:
546
+ _header_params['Content-Type'] = _content_type
547
+ else:
548
+ _default_content_type = (
549
+ self.api_client.select_header_content_type(
550
+ [
551
+ 'application/json'
552
+ ]
553
+ )
554
+ )
555
+ if _default_content_type is not None:
556
+ _header_params['Content-Type'] = _default_content_type
557
+
558
+ # authentication setting
559
+ _auth_settings: List[str] = [
560
+ 'default'
561
+ ]
562
+
563
+ return self.api_client.param_serialize(
564
+ method='POST',
565
+ resource_path='/payments/smart-accounts',
566
+ path_params=_path_params,
567
+ query_params=_query_params,
568
+ header_params=_header_params,
569
+ body=_body_params,
570
+ post_params=_form_params,
571
+ files=_files,
572
+ auth_settings=_auth_settings,
573
+ collection_formats=_collection_formats,
574
+ _host=_host,
575
+ _request_auth=_request_auth
576
+ )
577
+
578
+
579
+
580
+
581
+ @validate_call
582
+ def smart_account_retrieve(
583
+ self,
584
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
585
+ _request_timeout: Union[
586
+ None,
587
+ Annotated[StrictFloat, Field(gt=0)],
588
+ Tuple[
589
+ Annotated[StrictFloat, Field(gt=0)],
590
+ Annotated[StrictFloat, Field(gt=0)]
591
+ ]
592
+ ] = None,
593
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
594
+ _content_type: Optional[StrictStr] = None,
595
+ _headers: Optional[Dict[StrictStr, Any]] = None,
596
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
597
+ ) -> SmartAccount:
598
+ """Retrieve
599
+
600
+ Recovers the smart account resource by its id
601
+
602
+ :param id: Smart account primary identifier (required)
603
+ :type id: str
604
+ :param _request_timeout: timeout setting for this request. If one
605
+ number provided, it will be total request
606
+ timeout. It can also be a pair (tuple) of
607
+ (connection, read) timeouts.
608
+ :type _request_timeout: int, tuple(int, int), optional
609
+ :param _request_auth: set to override the auth_settings for an a single
610
+ request; this effectively ignores the
611
+ authentication in the spec for a single request.
612
+ :type _request_auth: dict, optional
613
+ :param _content_type: force content-type for the request.
614
+ :type _content_type: str, Optional
615
+ :param _headers: set to override the headers for a single
616
+ request; this effectively ignores the headers
617
+ in the spec for a single request.
618
+ :type _headers: dict, optional
619
+ :param _host_index: set to override the host_index for a single
620
+ request; this effectively ignores the host_index
621
+ in the spec for a single request.
622
+ :type _host_index: int, optional
623
+ :return: Returns the result object.
624
+ """ # noqa: E501
625
+
626
+ _param = self._smart_account_retrieve_serialize(
627
+ id=id,
628
+ _request_auth=_request_auth,
629
+ _content_type=_content_type,
630
+ _headers=_headers,
631
+ _host_index=_host_index
632
+ )
633
+
634
+ _response_types_map: Dict[str, Optional[str]] = {
635
+ '200': "SmartAccount",
636
+ '404': "GlobalErrorResponse",
637
+ }
638
+ response_data = self.api_client.call_api(
639
+ *_param,
640
+ _request_timeout=_request_timeout
641
+ )
642
+ response_data.read()
643
+ return self.api_client.response_deserialize(
644
+ response_data=response_data,
645
+ response_types_map=_response_types_map,
646
+ ).data
647
+
648
+
649
+ @validate_call
650
+ def smart_account_retrieve_with_http_info(
651
+ self,
652
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
653
+ _request_timeout: Union[
654
+ None,
655
+ Annotated[StrictFloat, Field(gt=0)],
656
+ Tuple[
657
+ Annotated[StrictFloat, Field(gt=0)],
658
+ Annotated[StrictFloat, Field(gt=0)]
659
+ ]
660
+ ] = None,
661
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
662
+ _content_type: Optional[StrictStr] = None,
663
+ _headers: Optional[Dict[StrictStr, Any]] = None,
664
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
665
+ ) -> ApiResponse[SmartAccount]:
666
+ """Retrieve
667
+
668
+ Recovers the smart account resource by its id
669
+
670
+ :param id: Smart account primary identifier (required)
671
+ :type id: str
672
+ :param _request_timeout: timeout setting for this request. If one
673
+ number provided, it will be total request
674
+ timeout. It can also be a pair (tuple) of
675
+ (connection, read) timeouts.
676
+ :type _request_timeout: int, tuple(int, int), optional
677
+ :param _request_auth: set to override the auth_settings for an a single
678
+ request; this effectively ignores the
679
+ authentication in the spec for a single request.
680
+ :type _request_auth: dict, optional
681
+ :param _content_type: force content-type for the request.
682
+ :type _content_type: str, Optional
683
+ :param _headers: set to override the headers for a single
684
+ request; this effectively ignores the headers
685
+ in the spec for a single request.
686
+ :type _headers: dict, optional
687
+ :param _host_index: set to override the host_index for a single
688
+ request; this effectively ignores the host_index
689
+ in the spec for a single request.
690
+ :type _host_index: int, optional
691
+ :return: Returns the result object.
692
+ """ # noqa: E501
693
+
694
+ _param = self._smart_account_retrieve_serialize(
695
+ id=id,
696
+ _request_auth=_request_auth,
697
+ _content_type=_content_type,
698
+ _headers=_headers,
699
+ _host_index=_host_index
700
+ )
701
+
702
+ _response_types_map: Dict[str, Optional[str]] = {
703
+ '200': "SmartAccount",
704
+ '404': "GlobalErrorResponse",
705
+ }
706
+ response_data = self.api_client.call_api(
707
+ *_param,
708
+ _request_timeout=_request_timeout
709
+ )
710
+ response_data.read()
711
+ return self.api_client.response_deserialize(
712
+ response_data=response_data,
713
+ response_types_map=_response_types_map,
714
+ )
715
+
716
+
717
+ @validate_call
718
+ def smart_account_retrieve_without_preload_content(
719
+ self,
720
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
721
+ _request_timeout: Union[
722
+ None,
723
+ Annotated[StrictFloat, Field(gt=0)],
724
+ Tuple[
725
+ Annotated[StrictFloat, Field(gt=0)],
726
+ Annotated[StrictFloat, Field(gt=0)]
727
+ ]
728
+ ] = None,
729
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
730
+ _content_type: Optional[StrictStr] = None,
731
+ _headers: Optional[Dict[StrictStr, Any]] = None,
732
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
733
+ ) -> RESTResponseType:
734
+ """Retrieve
735
+
736
+ Recovers the smart account resource by its id
737
+
738
+ :param id: Smart account primary identifier (required)
739
+ :type id: str
740
+ :param _request_timeout: timeout setting for this request. If one
741
+ number provided, it will be total request
742
+ timeout. It can also be a pair (tuple) of
743
+ (connection, read) timeouts.
744
+ :type _request_timeout: int, tuple(int, int), optional
745
+ :param _request_auth: set to override the auth_settings for an a single
746
+ request; this effectively ignores the
747
+ authentication in the spec for a single request.
748
+ :type _request_auth: dict, optional
749
+ :param _content_type: force content-type for the request.
750
+ :type _content_type: str, Optional
751
+ :param _headers: set to override the headers for a single
752
+ request; this effectively ignores the headers
753
+ in the spec for a single request.
754
+ :type _headers: dict, optional
755
+ :param _host_index: set to override the host_index for a single
756
+ request; this effectively ignores the host_index
757
+ in the spec for a single request.
758
+ :type _host_index: int, optional
759
+ :return: Returns the result object.
760
+ """ # noqa: E501
761
+
762
+ _param = self._smart_account_retrieve_serialize(
763
+ id=id,
764
+ _request_auth=_request_auth,
765
+ _content_type=_content_type,
766
+ _headers=_headers,
767
+ _host_index=_host_index
768
+ )
769
+
770
+ _response_types_map: Dict[str, Optional[str]] = {
771
+ '200': "SmartAccount",
772
+ '404': "GlobalErrorResponse",
773
+ }
774
+ response_data = self.api_client.call_api(
775
+ *_param,
776
+ _request_timeout=_request_timeout
777
+ )
778
+ return response_data.response
779
+
780
+
781
+ def _smart_account_retrieve_serialize(
782
+ self,
783
+ id,
784
+ _request_auth,
785
+ _content_type,
786
+ _headers,
787
+ _host_index,
788
+ ) -> RequestSerialized:
789
+
790
+ _host = None
791
+
792
+ _collection_formats: Dict[str, str] = {
793
+ }
794
+
795
+ _path_params: Dict[str, str] = {}
796
+ _query_params: List[Tuple[str, str]] = []
797
+ _header_params: Dict[str, Optional[str]] = _headers or {}
798
+ _form_params: List[Tuple[str, str]] = []
799
+ _files: Dict[str, Union[str, bytes]] = {}
800
+ _body_params: Optional[bytes] = None
801
+
802
+ # process the path parameters
803
+ if id is not None:
804
+ _path_params['id'] = id
805
+ # process the query parameters
806
+ # process the header parameters
807
+ # process the form parameters
808
+ # process the body parameter
809
+
810
+
811
+ # set the HTTP header `Accept`
812
+ _header_params['Accept'] = self.api_client.select_header_accept(
813
+ [
814
+ 'application/json'
815
+ ]
816
+ )
817
+
818
+
819
+ # authentication setting
820
+ _auth_settings: List[str] = [
821
+ 'default'
822
+ ]
823
+
824
+ return self.api_client.param_serialize(
825
+ method='GET',
826
+ resource_path='/payments/smart-accounts/{id}',
827
+ path_params=_path_params,
828
+ query_params=_query_params,
829
+ header_params=_header_params,
830
+ body=_body_params,
831
+ post_params=_form_params,
832
+ files=_files,
833
+ auth_settings=_auth_settings,
834
+ collection_formats=_collection_formats,
835
+ _host=_host,
836
+ _request_auth=_request_auth
837
+ )
838
+
839
+
840
+
841
+
842
+ @validate_call
843
+ def smart_accounts_list(
844
+ self,
845
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
846
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
847
+ _request_timeout: Union[
848
+ None,
849
+ Annotated[StrictFloat, Field(gt=0)],
850
+ Tuple[
851
+ Annotated[StrictFloat, Field(gt=0)],
852
+ Annotated[StrictFloat, Field(gt=0)]
853
+ ]
854
+ ] = None,
855
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
856
+ _content_type: Optional[StrictStr] = None,
857
+ _headers: Optional[Dict[StrictStr, Any]] = None,
858
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
859
+ ) -> SmartAccountsList200Response:
860
+ """List
861
+
862
+ Recovers all created smart accounts
863
+
864
+ :param page_size: Page size for the paging request, default: 20
865
+ :type page_size: float
866
+ :param page: Page number for the paging request, default: 1
867
+ :type page: float
868
+ :param _request_timeout: timeout setting for this request. If one
869
+ number provided, it will be total request
870
+ timeout. It can also be a pair (tuple) of
871
+ (connection, read) timeouts.
872
+ :type _request_timeout: int, tuple(int, int), optional
873
+ :param _request_auth: set to override the auth_settings for an a single
874
+ request; this effectively ignores the
875
+ authentication in the spec for a single request.
876
+ :type _request_auth: dict, optional
877
+ :param _content_type: force content-type for the request.
878
+ :type _content_type: str, Optional
879
+ :param _headers: set to override the headers for a single
880
+ request; this effectively ignores the headers
881
+ in the spec for a single request.
882
+ :type _headers: dict, optional
883
+ :param _host_index: set to override the host_index for a single
884
+ request; this effectively ignores the host_index
885
+ in the spec for a single request.
886
+ :type _host_index: int, optional
887
+ :return: Returns the result object.
888
+ """ # noqa: E501
889
+
890
+ _param = self._smart_accounts_list_serialize(
891
+ page_size=page_size,
892
+ page=page,
893
+ _request_auth=_request_auth,
894
+ _content_type=_content_type,
895
+ _headers=_headers,
896
+ _host_index=_host_index
897
+ )
898
+
899
+ _response_types_map: Dict[str, Optional[str]] = {
900
+ '200': "SmartAccountsList200Response",
901
+ }
902
+ response_data = self.api_client.call_api(
903
+ *_param,
904
+ _request_timeout=_request_timeout
905
+ )
906
+ response_data.read()
907
+ return self.api_client.response_deserialize(
908
+ response_data=response_data,
909
+ response_types_map=_response_types_map,
910
+ ).data
911
+
912
+
913
+ @validate_call
914
+ def smart_accounts_list_with_http_info(
915
+ self,
916
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
917
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
918
+ _request_timeout: Union[
919
+ None,
920
+ Annotated[StrictFloat, Field(gt=0)],
921
+ Tuple[
922
+ Annotated[StrictFloat, Field(gt=0)],
923
+ Annotated[StrictFloat, Field(gt=0)]
924
+ ]
925
+ ] = None,
926
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
927
+ _content_type: Optional[StrictStr] = None,
928
+ _headers: Optional[Dict[StrictStr, Any]] = None,
929
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
930
+ ) -> ApiResponse[SmartAccountsList200Response]:
931
+ """List
932
+
933
+ Recovers all created smart accounts
934
+
935
+ :param page_size: Page size for the paging request, default: 20
936
+ :type page_size: float
937
+ :param page: Page number for the paging request, default: 1
938
+ :type page: float
939
+ :param _request_timeout: timeout setting for this request. If one
940
+ number provided, it will be total request
941
+ timeout. It can also be a pair (tuple) of
942
+ (connection, read) timeouts.
943
+ :type _request_timeout: int, tuple(int, int), optional
944
+ :param _request_auth: set to override the auth_settings for an a single
945
+ request; this effectively ignores the
946
+ authentication in the spec for a single request.
947
+ :type _request_auth: dict, optional
948
+ :param _content_type: force content-type for the request.
949
+ :type _content_type: str, Optional
950
+ :param _headers: set to override the headers for a single
951
+ request; this effectively ignores the headers
952
+ in the spec for a single request.
953
+ :type _headers: dict, optional
954
+ :param _host_index: set to override the host_index for a single
955
+ request; this effectively ignores the host_index
956
+ in the spec for a single request.
957
+ :type _host_index: int, optional
958
+ :return: Returns the result object.
959
+ """ # noqa: E501
960
+
961
+ _param = self._smart_accounts_list_serialize(
962
+ page_size=page_size,
963
+ page=page,
964
+ _request_auth=_request_auth,
965
+ _content_type=_content_type,
966
+ _headers=_headers,
967
+ _host_index=_host_index
968
+ )
969
+
970
+ _response_types_map: Dict[str, Optional[str]] = {
971
+ '200': "SmartAccountsList200Response",
972
+ }
973
+ response_data = self.api_client.call_api(
974
+ *_param,
975
+ _request_timeout=_request_timeout
976
+ )
977
+ response_data.read()
978
+ return self.api_client.response_deserialize(
979
+ response_data=response_data,
980
+ response_types_map=_response_types_map,
981
+ )
982
+
983
+
984
+ @validate_call
985
+ def smart_accounts_list_without_preload_content(
986
+ self,
987
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
988
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
989
+ _request_timeout: Union[
990
+ None,
991
+ Annotated[StrictFloat, Field(gt=0)],
992
+ Tuple[
993
+ Annotated[StrictFloat, Field(gt=0)],
994
+ Annotated[StrictFloat, Field(gt=0)]
995
+ ]
996
+ ] = None,
997
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
998
+ _content_type: Optional[StrictStr] = None,
999
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1000
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1001
+ ) -> RESTResponseType:
1002
+ """List
1003
+
1004
+ Recovers all created smart accounts
1005
+
1006
+ :param page_size: Page size for the paging request, default: 20
1007
+ :type page_size: float
1008
+ :param page: Page number for the paging request, default: 1
1009
+ :type page: float
1010
+ :param _request_timeout: timeout setting for this request. If one
1011
+ number provided, it will be total request
1012
+ timeout. It can also be a pair (tuple) of
1013
+ (connection, read) timeouts.
1014
+ :type _request_timeout: int, tuple(int, int), optional
1015
+ :param _request_auth: set to override the auth_settings for an a single
1016
+ request; this effectively ignores the
1017
+ authentication in the spec for a single request.
1018
+ :type _request_auth: dict, optional
1019
+ :param _content_type: force content-type for the request.
1020
+ :type _content_type: str, Optional
1021
+ :param _headers: set to override the headers for a single
1022
+ request; this effectively ignores the headers
1023
+ in the spec for a single request.
1024
+ :type _headers: dict, optional
1025
+ :param _host_index: set to override the host_index for a single
1026
+ request; this effectively ignores the host_index
1027
+ in the spec for a single request.
1028
+ :type _host_index: int, optional
1029
+ :return: Returns the result object.
1030
+ """ # noqa: E501
1031
+
1032
+ _param = self._smart_accounts_list_serialize(
1033
+ page_size=page_size,
1034
+ page=page,
1035
+ _request_auth=_request_auth,
1036
+ _content_type=_content_type,
1037
+ _headers=_headers,
1038
+ _host_index=_host_index
1039
+ )
1040
+
1041
+ _response_types_map: Dict[str, Optional[str]] = {
1042
+ '200': "SmartAccountsList200Response",
1043
+ }
1044
+ response_data = self.api_client.call_api(
1045
+ *_param,
1046
+ _request_timeout=_request_timeout
1047
+ )
1048
+ return response_data.response
1049
+
1050
+
1051
+ def _smart_accounts_list_serialize(
1052
+ self,
1053
+ page_size,
1054
+ page,
1055
+ _request_auth,
1056
+ _content_type,
1057
+ _headers,
1058
+ _host_index,
1059
+ ) -> RequestSerialized:
1060
+
1061
+ _host = None
1062
+
1063
+ _collection_formats: Dict[str, str] = {
1064
+ }
1065
+
1066
+ _path_params: Dict[str, str] = {}
1067
+ _query_params: List[Tuple[str, str]] = []
1068
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1069
+ _form_params: List[Tuple[str, str]] = []
1070
+ _files: Dict[str, Union[str, bytes]] = {}
1071
+ _body_params: Optional[bytes] = None
1072
+
1073
+ # process the path parameters
1074
+ # process the query parameters
1075
+ if page_size is not None:
1076
+
1077
+ _query_params.append(('pageSize', page_size))
1078
+
1079
+ if page is not None:
1080
+
1081
+ _query_params.append(('page', page))
1082
+
1083
+ # process the header parameters
1084
+ # process the form parameters
1085
+ # process the body parameter
1086
+
1087
+
1088
+ # set the HTTP header `Accept`
1089
+ _header_params['Accept'] = self.api_client.select_header_accept(
1090
+ [
1091
+ 'application/json'
1092
+ ]
1093
+ )
1094
+
1095
+
1096
+ # authentication setting
1097
+ _auth_settings: List[str] = [
1098
+ 'default'
1099
+ ]
1100
+
1101
+ return self.api_client.param_serialize(
1102
+ method='GET',
1103
+ resource_path='/payments/smart-accounts',
1104
+ path_params=_path_params,
1105
+ query_params=_query_params,
1106
+ header_params=_header_params,
1107
+ body=_body_params,
1108
+ post_params=_form_params,
1109
+ files=_files,
1110
+ auth_settings=_auth_settings,
1111
+ collection_formats=_collection_formats,
1112
+ _host=_host,
1113
+ _request_auth=_request_auth
1114
+ )
1115
+
1116
+