pluggy-sdk 1.0.0.post34__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. pluggy_sdk/__init__.py +200 -0
  2. pluggy_sdk/api/__init__.py +25 -0
  3. pluggy_sdk/api/account_api.py +588 -0
  4. pluggy_sdk/api/acquirer_anticipation_api.py +664 -0
  5. pluggy_sdk/api/acquirer_receivable_api.py +664 -0
  6. pluggy_sdk/api/acquirer_sale_api.py +664 -0
  7. pluggy_sdk/api/auth_api.py +605 -0
  8. pluggy_sdk/api/benefit_api.py +567 -0
  9. pluggy_sdk/api/bill_api.py +567 -0
  10. pluggy_sdk/api/bulk_payment_api.py +1127 -0
  11. pluggy_sdk/api/category_api.py +1096 -0
  12. pluggy_sdk/api/connector_api.py +979 -0
  13. pluggy_sdk/api/consent_api.py +576 -0
  14. pluggy_sdk/api/identity_api.py +581 -0
  15. pluggy_sdk/api/income_report_api.py +311 -0
  16. pluggy_sdk/api/investment_api.py +918 -0
  17. pluggy_sdk/api/items_api.py +1456 -0
  18. pluggy_sdk/api/loan_api.py +567 -0
  19. pluggy_sdk/api/payment_customer_api.py +1414 -0
  20. pluggy_sdk/api/payment_intent_api.py +842 -0
  21. pluggy_sdk/api/payment_receipts_api.py +842 -0
  22. pluggy_sdk/api/payment_recipient_api.py +1997 -0
  23. pluggy_sdk/api/payment_request_api.py +2739 -0
  24. pluggy_sdk/api/payment_schedule_api.py +823 -0
  25. pluggy_sdk/api/payroll_loan_api.py +561 -0
  26. pluggy_sdk/api/portfolio_yield_api.py +580 -0
  27. pluggy_sdk/api/smart_account_api.py +1704 -0
  28. pluggy_sdk/api/smart_account_transfer_api.py +610 -0
  29. pluggy_sdk/api/smart_transfer_api.py +1406 -0
  30. pluggy_sdk/api/transaction_api.py +963 -0
  31. pluggy_sdk/api/webhook_api.py +1406 -0
  32. pluggy_sdk/api_client.py +798 -0
  33. pluggy_sdk/api_response.py +21 -0
  34. pluggy_sdk/configuration.py +596 -0
  35. pluggy_sdk/exceptions.py +217 -0
  36. pluggy_sdk/models/__init__.py +163 -0
  37. pluggy_sdk/models/account.py +134 -0
  38. pluggy_sdk/models/accounts_list200_response.py +102 -0
  39. pluggy_sdk/models/acquirer_anticipation.py +117 -0
  40. pluggy_sdk/models/acquirer_anticipation_data.py +101 -0
  41. pluggy_sdk/models/acquirer_data.py +113 -0
  42. pluggy_sdk/models/acquirer_receivable.py +143 -0
  43. pluggy_sdk/models/acquirer_receivable_data.py +108 -0
  44. pluggy_sdk/models/acquirer_receivable_data_establishment.py +96 -0
  45. pluggy_sdk/models/acquirer_receivable_destination_account.py +92 -0
  46. pluggy_sdk/models/acquirer_receivable_related_sale.py +99 -0
  47. pluggy_sdk/models/acquirer_sale.py +171 -0
  48. pluggy_sdk/models/acquirer_sale_data.py +150 -0
  49. pluggy_sdk/models/acquirer_sale_installment.py +93 -0
  50. pluggy_sdk/models/acquirer_sale_installment_data.py +95 -0
  51. pluggy_sdk/models/address.py +110 -0
  52. pluggy_sdk/models/aggregated_portfolio.py +120 -0
  53. pluggy_sdk/models/aggregated_portfolio_response.py +102 -0
  54. pluggy_sdk/models/asset_distribution.py +88 -0
  55. pluggy_sdk/models/auth_request.py +90 -0
  56. pluggy_sdk/models/auth_response.py +88 -0
  57. pluggy_sdk/models/bank_data.py +92 -0
  58. pluggy_sdk/models/benefit_loan.py +121 -0
  59. pluggy_sdk/models/benefit_loan_client.py +102 -0
  60. pluggy_sdk/models/benefit_response.py +118 -0
  61. pluggy_sdk/models/benefit_response_paying_institution.py +94 -0
  62. pluggy_sdk/models/benefits_list200_response.py +102 -0
  63. pluggy_sdk/models/bill.py +109 -0
  64. pluggy_sdk/models/bill_finance_charge.py +103 -0
  65. pluggy_sdk/models/bills_list200_response.py +102 -0
  66. pluggy_sdk/models/boleto.py +121 -0
  67. pluggy_sdk/models/boleto_payer.py +90 -0
  68. pluggy_sdk/models/boleto_recipient.py +90 -0
  69. pluggy_sdk/models/bulk_payment.py +128 -0
  70. pluggy_sdk/models/bulk_payments_list200_response.py +102 -0
  71. pluggy_sdk/models/category.py +96 -0
  72. pluggy_sdk/models/client_category_rule.py +98 -0
  73. pluggy_sdk/models/company.py +90 -0
  74. pluggy_sdk/models/connect_token_request.py +94 -0
  75. pluggy_sdk/models/connect_token_response.py +88 -0
  76. pluggy_sdk/models/connector.py +145 -0
  77. pluggy_sdk/models/connector_credential.py +121 -0
  78. pluggy_sdk/models/connector_health.py +96 -0
  79. pluggy_sdk/models/connector_health_details.py +90 -0
  80. pluggy_sdk/models/connector_list_response.py +102 -0
  81. pluggy_sdk/models/connector_user_action.py +93 -0
  82. pluggy_sdk/models/consent.py +120 -0
  83. pluggy_sdk/models/create_boleto_payment_request.py +98 -0
  84. pluggy_sdk/models/create_bulk_payment.py +96 -0
  85. pluggy_sdk/models/create_client_category_rule.py +96 -0
  86. pluggy_sdk/models/create_item.py +115 -0
  87. pluggy_sdk/models/create_item_parameters.py +144 -0
  88. pluggy_sdk/models/create_or_update_payment_customer.py +105 -0
  89. pluggy_sdk/models/create_payment_customer_request_body.py +103 -0
  90. pluggy_sdk/models/create_payment_intent.py +110 -0
  91. pluggy_sdk/models/create_payment_recipient.py +104 -0
  92. pluggy_sdk/models/create_payment_request.py +115 -0
  93. pluggy_sdk/models/create_payment_request_schedule.py +189 -0
  94. pluggy_sdk/models/create_pix_qr_payment_request.py +96 -0
  95. pluggy_sdk/models/create_smart_account_request.py +104 -0
  96. pluggy_sdk/models/create_smart_account_transfer_request.py +92 -0
  97. pluggy_sdk/models/create_smart_transfer_payment.py +96 -0
  98. pluggy_sdk/models/create_smart_transfer_preauthorization.py +104 -0
  99. pluggy_sdk/models/create_webhook.py +99 -0
  100. pluggy_sdk/models/credential_select_option.py +90 -0
  101. pluggy_sdk/models/credit_card_metadata.py +101 -0
  102. pluggy_sdk/models/credit_data.py +127 -0
  103. pluggy_sdk/models/custom.py +100 -0
  104. pluggy_sdk/models/daily.py +101 -0
  105. pluggy_sdk/models/document.py +100 -0
  106. pluggy_sdk/models/email.py +100 -0
  107. pluggy_sdk/models/global_error_response.py +94 -0
  108. pluggy_sdk/models/i_count_response.py +88 -0
  109. pluggy_sdk/models/identity_relation.py +102 -0
  110. pluggy_sdk/models/identity_response.py +173 -0
  111. pluggy_sdk/models/identity_response_financial_relationships.py +111 -0
  112. pluggy_sdk/models/identity_response_financial_relationships_accounts_inner.py +98 -0
  113. pluggy_sdk/models/identity_response_financial_relationships_procurators_inner.py +101 -0
  114. pluggy_sdk/models/identity_response_qualifications.py +112 -0
  115. pluggy_sdk/models/identity_response_qualifications_informed_income.py +100 -0
  116. pluggy_sdk/models/identity_response_qualifications_informed_patrimony.py +90 -0
  117. pluggy_sdk/models/income_report.py +90 -0
  118. pluggy_sdk/models/income_reports_response.py +102 -0
  119. pluggy_sdk/models/investment.py +192 -0
  120. pluggy_sdk/models/investment_expenses.py +108 -0
  121. pluggy_sdk/models/investment_metadata.py +100 -0
  122. pluggy_sdk/models/investment_transaction.py +124 -0
  123. pluggy_sdk/models/investments_list200_response.py +102 -0
  124. pluggy_sdk/models/item.py +150 -0
  125. pluggy_sdk/models/item_creation_error_response.py +102 -0
  126. pluggy_sdk/models/item_error.py +94 -0
  127. pluggy_sdk/models/item_options.py +94 -0
  128. pluggy_sdk/models/loan.py +199 -0
  129. pluggy_sdk/models/loan_contracted_fee.py +118 -0
  130. pluggy_sdk/models/loan_contracted_finance_charge.py +92 -0
  131. pluggy_sdk/models/loan_installment_balloon_payment.py +95 -0
  132. pluggy_sdk/models/loan_installment_balloon_payment_amount.py +90 -0
  133. pluggy_sdk/models/loan_installments.py +130 -0
  134. pluggy_sdk/models/loan_interest_rate.py +136 -0
  135. pluggy_sdk/models/loan_payment_release.py +103 -0
  136. pluggy_sdk/models/loan_payment_release_over_parcel.py +106 -0
  137. pluggy_sdk/models/loan_payment_release_over_parcel_charge.py +92 -0
  138. pluggy_sdk/models/loan_payment_release_over_parcel_fee.py +92 -0
  139. pluggy_sdk/models/loan_payments.py +98 -0
  140. pluggy_sdk/models/loan_warranty.py +94 -0
  141. pluggy_sdk/models/loans_list200_response.py +102 -0
  142. pluggy_sdk/models/merchant.py +96 -0
  143. pluggy_sdk/models/monthly.py +103 -0
  144. pluggy_sdk/models/monthly_portfolio.py +100 -0
  145. pluggy_sdk/models/monthly_portfolio_response.py +102 -0
  146. pluggy_sdk/models/not_authenticated_response.py +90 -0
  147. pluggy_sdk/models/page_response_acquirer_anticipations.py +102 -0
  148. pluggy_sdk/models/page_response_acquirer_receivables.py +102 -0
  149. pluggy_sdk/models/page_response_acquirer_sales.py +102 -0
  150. pluggy_sdk/models/page_response_category_rules.py +102 -0
  151. pluggy_sdk/models/page_response_consents.py +102 -0
  152. pluggy_sdk/models/page_response_investment_transactions.py +102 -0
  153. pluggy_sdk/models/page_response_transactions.py +102 -0
  154. pluggy_sdk/models/parameter_validation_error.py +92 -0
  155. pluggy_sdk/models/parameter_validation_response.py +98 -0
  156. pluggy_sdk/models/payment_customer.py +105 -0
  157. pluggy_sdk/models/payment_customers_list200_response.py +102 -0
  158. pluggy_sdk/models/payment_data.py +111 -0
  159. pluggy_sdk/models/payment_data_boleto_metadata.py +98 -0
  160. pluggy_sdk/models/payment_data_participant.py +102 -0
  161. pluggy_sdk/models/payment_institution.py +101 -0
  162. pluggy_sdk/models/payment_intent.py +145 -0
  163. pluggy_sdk/models/payment_intent_parameter.py +90 -0
  164. pluggy_sdk/models/payment_intents_list200_response.py +102 -0
  165. pluggy_sdk/models/payment_receipt.py +120 -0
  166. pluggy_sdk/models/payment_receipt_bank_account.py +92 -0
  167. pluggy_sdk/models/payment_receipt_person.py +96 -0
  168. pluggy_sdk/models/payment_recipient.py +110 -0
  169. pluggy_sdk/models/payment_recipient_account.py +92 -0
  170. pluggy_sdk/models/payment_recipients_institution_list200_response.py +102 -0
  171. pluggy_sdk/models/payment_recipients_list200_response.py +102 -0
  172. pluggy_sdk/models/payment_request.py +132 -0
  173. pluggy_sdk/models/payment_request_callback_urls.py +92 -0
  174. pluggy_sdk/models/payment_request_receipt_list200_response.py +102 -0
  175. pluggy_sdk/models/payment_request_schedule.py +183 -0
  176. pluggy_sdk/models/payment_requests_list200_response.py +102 -0
  177. pluggy_sdk/models/payment_schedules_list200_response.py +102 -0
  178. pluggy_sdk/models/payroll_loan.py +121 -0
  179. pluggy_sdk/models/payroll_loan_client.py +102 -0
  180. pluggy_sdk/models/payroll_loan_response.py +125 -0
  181. pluggy_sdk/models/payroll_loan_response_client.py +102 -0
  182. pluggy_sdk/models/payroll_loans_list200_response.py +102 -0
  183. pluggy_sdk/models/percentage_over_index.py +90 -0
  184. pluggy_sdk/models/phone_number.py +100 -0
  185. pluggy_sdk/models/pix_data.py +90 -0
  186. pluggy_sdk/models/schedule_payment.py +102 -0
  187. pluggy_sdk/models/schedule_type_custom.py +100 -0
  188. pluggy_sdk/models/schedule_type_daily.py +101 -0
  189. pluggy_sdk/models/schedule_type_monthly.py +103 -0
  190. pluggy_sdk/models/schedule_type_single.py +98 -0
  191. pluggy_sdk/models/schedule_type_weekly.py +110 -0
  192. pluggy_sdk/models/single.py +98 -0
  193. pluggy_sdk/models/smart_account.py +107 -0
  194. pluggy_sdk/models/smart_account_address.py +112 -0
  195. pluggy_sdk/models/smart_account_balance.py +95 -0
  196. pluggy_sdk/models/smart_account_transfer.py +123 -0
  197. pluggy_sdk/models/smart_accounts_list200_response.py +102 -0
  198. pluggy_sdk/models/smart_tranfers_preauthorizations_list200_response.py +102 -0
  199. pluggy_sdk/models/smart_transfer_callback_urls.py +90 -0
  200. pluggy_sdk/models/smart_transfer_payment.py +116 -0
  201. pluggy_sdk/models/smart_transfer_preauthorization.py +128 -0
  202. pluggy_sdk/models/smart_transfer_preauthorization_parameter.py +90 -0
  203. pluggy_sdk/models/status_detail.py +127 -0
  204. pluggy_sdk/models/status_detail_product.py +101 -0
  205. pluggy_sdk/models/status_detail_product_warning.py +92 -0
  206. pluggy_sdk/models/transaction.py +141 -0
  207. pluggy_sdk/models/update_item.py +109 -0
  208. pluggy_sdk/models/update_item_parameters.py +144 -0
  209. pluggy_sdk/models/update_payment_recipient.py +102 -0
  210. pluggy_sdk/models/update_payment_request.py +102 -0
  211. pluggy_sdk/models/update_transaction.py +88 -0
  212. pluggy_sdk/models/webhook.py +106 -0
  213. pluggy_sdk/models/webhook_creation_error_response.py +90 -0
  214. pluggy_sdk/models/webhooks_list200_response.py +102 -0
  215. pluggy_sdk/models/weekly.py +110 -0
  216. pluggy_sdk/py.typed +0 -0
  217. pluggy_sdk/rest.py +258 -0
  218. pluggy_sdk-1.0.0.post34.dist-info/METADATA +373 -0
  219. pluggy_sdk-1.0.0.post34.dist-info/RECORD +221 -0
  220. pluggy_sdk-1.0.0.post34.dist-info/WHEEL +5 -0
  221. pluggy_sdk-1.0.0.post34.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1704 @@
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.create_smart_account_transfer_request import CreateSmartAccountTransferRequest
25
+ from pluggy_sdk.models.smart_account import SmartAccount
26
+ from pluggy_sdk.models.smart_account_balance import SmartAccountBalance
27
+ from pluggy_sdk.models.smart_account_transfer import SmartAccountTransfer
28
+ from pluggy_sdk.models.smart_accounts_list200_response import SmartAccountsList200Response
29
+
30
+ from pluggy_sdk.api_client import ApiClient, RequestSerialized
31
+ from pluggy_sdk.api_response import ApiResponse
32
+ from pluggy_sdk.rest import RESTResponseType
33
+
34
+
35
+ class SmartAccountApi:
36
+ """NOTE: This class is auto generated by OpenAPI Generator
37
+ Ref: https://openapi-generator.tech
38
+
39
+ Do not edit the class manually.
40
+ """
41
+
42
+ def __init__(self, api_client=None) -> None:
43
+ if api_client is None:
44
+ api_client = ApiClient.get_default()
45
+ self.api_client = api_client
46
+
47
+
48
+ @validate_call
49
+ def smart_account_balance_retrieve(
50
+ self,
51
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
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
+ ) -> SmartAccountBalance:
65
+ """Retrieve Balance
66
+
67
+ Recovers the smart account balance resource by its id
68
+
69
+ :param id: Smart account primary identifier (required)
70
+ :type id: str
71
+ :param _request_timeout: timeout setting for this request. If one
72
+ number provided, it will be total request
73
+ timeout. It can also be a pair (tuple) of
74
+ (connection, read) timeouts.
75
+ :type _request_timeout: int, tuple(int, int), optional
76
+ :param _request_auth: set to override the auth_settings for an a single
77
+ request; this effectively ignores the
78
+ authentication in the spec for a single request.
79
+ :type _request_auth: dict, optional
80
+ :param _content_type: force content-type for the request.
81
+ :type _content_type: str, Optional
82
+ :param _headers: set to override the headers for a single
83
+ request; this effectively ignores the headers
84
+ in the spec for a single request.
85
+ :type _headers: dict, optional
86
+ :param _host_index: set to override the host_index for a single
87
+ request; this effectively ignores the host_index
88
+ in the spec for a single request.
89
+ :type _host_index: int, optional
90
+ :return: Returns the result object.
91
+ """ # noqa: E501
92
+
93
+ _param = self._smart_account_balance_retrieve_serialize(
94
+ id=id,
95
+ _request_auth=_request_auth,
96
+ _content_type=_content_type,
97
+ _headers=_headers,
98
+ _host_index=_host_index
99
+ )
100
+
101
+ _response_types_map: Dict[str, Optional[str]] = {
102
+ '200': "SmartAccountBalance",
103
+ '404': "GlobalErrorResponse",
104
+ }
105
+ response_data = self.api_client.call_api(
106
+ *_param,
107
+ _request_timeout=_request_timeout
108
+ )
109
+ response_data.read()
110
+ return self.api_client.response_deserialize(
111
+ response_data=response_data,
112
+ response_types_map=_response_types_map,
113
+ ).data
114
+
115
+
116
+ @validate_call
117
+ def smart_account_balance_retrieve_with_http_info(
118
+ self,
119
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
120
+ _request_timeout: Union[
121
+ None,
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Tuple[
124
+ Annotated[StrictFloat, Field(gt=0)],
125
+ Annotated[StrictFloat, Field(gt=0)]
126
+ ]
127
+ ] = None,
128
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
129
+ _content_type: Optional[StrictStr] = None,
130
+ _headers: Optional[Dict[StrictStr, Any]] = None,
131
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
132
+ ) -> ApiResponse[SmartAccountBalance]:
133
+ """Retrieve Balance
134
+
135
+ Recovers the smart account balance resource by its id
136
+
137
+ :param id: Smart account primary identifier (required)
138
+ :type id: str
139
+ :param _request_timeout: timeout setting for this request. If one
140
+ number provided, it will be total request
141
+ timeout. It can also be a pair (tuple) of
142
+ (connection, read) timeouts.
143
+ :type _request_timeout: int, tuple(int, int), optional
144
+ :param _request_auth: set to override the auth_settings for an a single
145
+ request; this effectively ignores the
146
+ authentication in the spec for a single request.
147
+ :type _request_auth: dict, optional
148
+ :param _content_type: force content-type for the request.
149
+ :type _content_type: str, Optional
150
+ :param _headers: set to override the headers for a single
151
+ request; this effectively ignores the headers
152
+ in the spec for a single request.
153
+ :type _headers: dict, optional
154
+ :param _host_index: set to override the host_index for a single
155
+ request; this effectively ignores the host_index
156
+ in the spec for a single request.
157
+ :type _host_index: int, optional
158
+ :return: Returns the result object.
159
+ """ # noqa: E501
160
+
161
+ _param = self._smart_account_balance_retrieve_serialize(
162
+ id=id,
163
+ _request_auth=_request_auth,
164
+ _content_type=_content_type,
165
+ _headers=_headers,
166
+ _host_index=_host_index
167
+ )
168
+
169
+ _response_types_map: Dict[str, Optional[str]] = {
170
+ '200': "SmartAccountBalance",
171
+ '404': "GlobalErrorResponse",
172
+ }
173
+ response_data = self.api_client.call_api(
174
+ *_param,
175
+ _request_timeout=_request_timeout
176
+ )
177
+ response_data.read()
178
+ return self.api_client.response_deserialize(
179
+ response_data=response_data,
180
+ response_types_map=_response_types_map,
181
+ )
182
+
183
+
184
+ @validate_call
185
+ def smart_account_balance_retrieve_without_preload_content(
186
+ self,
187
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
188
+ _request_timeout: Union[
189
+ None,
190
+ Annotated[StrictFloat, Field(gt=0)],
191
+ Tuple[
192
+ Annotated[StrictFloat, Field(gt=0)],
193
+ Annotated[StrictFloat, Field(gt=0)]
194
+ ]
195
+ ] = None,
196
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
197
+ _content_type: Optional[StrictStr] = None,
198
+ _headers: Optional[Dict[StrictStr, Any]] = None,
199
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
200
+ ) -> RESTResponseType:
201
+ """Retrieve Balance
202
+
203
+ Recovers the smart account balance resource by its id
204
+
205
+ :param id: Smart account primary identifier (required)
206
+ :type id: str
207
+ :param _request_timeout: timeout setting for this request. If one
208
+ number provided, it will be total request
209
+ timeout. It can also be a pair (tuple) of
210
+ (connection, read) timeouts.
211
+ :type _request_timeout: int, tuple(int, int), optional
212
+ :param _request_auth: set to override the auth_settings for an a single
213
+ request; this effectively ignores the
214
+ authentication in the spec for a single request.
215
+ :type _request_auth: dict, optional
216
+ :param _content_type: force content-type for the request.
217
+ :type _content_type: str, Optional
218
+ :param _headers: set to override the headers for a single
219
+ request; this effectively ignores the headers
220
+ in the spec for a single request.
221
+ :type _headers: dict, optional
222
+ :param _host_index: set to override the host_index for a single
223
+ request; this effectively ignores the host_index
224
+ in the spec for a single request.
225
+ :type _host_index: int, optional
226
+ :return: Returns the result object.
227
+ """ # noqa: E501
228
+
229
+ _param = self._smart_account_balance_retrieve_serialize(
230
+ id=id,
231
+ _request_auth=_request_auth,
232
+ _content_type=_content_type,
233
+ _headers=_headers,
234
+ _host_index=_host_index
235
+ )
236
+
237
+ _response_types_map: Dict[str, Optional[str]] = {
238
+ '200': "SmartAccountBalance",
239
+ '404': "GlobalErrorResponse",
240
+ }
241
+ response_data = self.api_client.call_api(
242
+ *_param,
243
+ _request_timeout=_request_timeout
244
+ )
245
+ return response_data.response
246
+
247
+
248
+ def _smart_account_balance_retrieve_serialize(
249
+ self,
250
+ id,
251
+ _request_auth,
252
+ _content_type,
253
+ _headers,
254
+ _host_index,
255
+ ) -> RequestSerialized:
256
+
257
+ _host = None
258
+
259
+ _collection_formats: Dict[str, str] = {
260
+ }
261
+
262
+ _path_params: Dict[str, str] = {}
263
+ _query_params: List[Tuple[str, str]] = []
264
+ _header_params: Dict[str, Optional[str]] = _headers or {}
265
+ _form_params: List[Tuple[str, str]] = []
266
+ _files: Dict[
267
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
268
+ ] = {}
269
+ _body_params: Optional[bytes] = None
270
+
271
+ # process the path parameters
272
+ if id is not None:
273
+ _path_params['id'] = id
274
+ # process the query parameters
275
+ # process the header parameters
276
+ # process the form parameters
277
+ # process the body parameter
278
+
279
+
280
+ # set the HTTP header `Accept`
281
+ if 'Accept' not in _header_params:
282
+ _header_params['Accept'] = self.api_client.select_header_accept(
283
+ [
284
+ 'application/json'
285
+ ]
286
+ )
287
+
288
+
289
+ # authentication setting
290
+ _auth_settings: List[str] = [
291
+ 'default'
292
+ ]
293
+
294
+ return self.api_client.param_serialize(
295
+ method='GET',
296
+ resource_path='/payments/smart-accounts/{id}/balance',
297
+ path_params=_path_params,
298
+ query_params=_query_params,
299
+ header_params=_header_params,
300
+ body=_body_params,
301
+ post_params=_form_params,
302
+ files=_files,
303
+ auth_settings=_auth_settings,
304
+ collection_formats=_collection_formats,
305
+ _host=_host,
306
+ _request_auth=_request_auth
307
+ )
308
+
309
+
310
+
311
+
312
+ @validate_call
313
+ def smart_account_create(
314
+ self,
315
+ create_smart_account_request: CreateSmartAccountRequest,
316
+ _request_timeout: Union[
317
+ None,
318
+ Annotated[StrictFloat, Field(gt=0)],
319
+ Tuple[
320
+ Annotated[StrictFloat, Field(gt=0)],
321
+ Annotated[StrictFloat, Field(gt=0)]
322
+ ]
323
+ ] = None,
324
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
325
+ _content_type: Optional[StrictStr] = None,
326
+ _headers: Optional[Dict[StrictStr, Any]] = None,
327
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
328
+ ) -> SmartAccount:
329
+ """Create
330
+
331
+ Creates the smart account resource
332
+
333
+ :param create_smart_account_request: (required)
334
+ :type create_smart_account_request: CreateSmartAccountRequest
335
+ :param _request_timeout: timeout setting for this request. If one
336
+ number provided, it will be total request
337
+ timeout. It can also be a pair (tuple) of
338
+ (connection, read) timeouts.
339
+ :type _request_timeout: int, tuple(int, int), optional
340
+ :param _request_auth: set to override the auth_settings for an a single
341
+ request; this effectively ignores the
342
+ authentication in the spec for a single request.
343
+ :type _request_auth: dict, optional
344
+ :param _content_type: force content-type for the request.
345
+ :type _content_type: str, Optional
346
+ :param _headers: set to override the headers for a single
347
+ request; this effectively ignores the headers
348
+ in the spec for a single request.
349
+ :type _headers: dict, optional
350
+ :param _host_index: set to override the host_index for a single
351
+ request; this effectively ignores the host_index
352
+ in the spec for a single request.
353
+ :type _host_index: int, optional
354
+ :return: Returns the result object.
355
+ """ # noqa: E501
356
+
357
+ _param = self._smart_account_create_serialize(
358
+ create_smart_account_request=create_smart_account_request,
359
+ _request_auth=_request_auth,
360
+ _content_type=_content_type,
361
+ _headers=_headers,
362
+ _host_index=_host_index
363
+ )
364
+
365
+ _response_types_map: Dict[str, Optional[str]] = {
366
+ '200': "SmartAccount",
367
+ '400': "GlobalErrorResponse",
368
+ }
369
+ response_data = self.api_client.call_api(
370
+ *_param,
371
+ _request_timeout=_request_timeout
372
+ )
373
+ response_data.read()
374
+ return self.api_client.response_deserialize(
375
+ response_data=response_data,
376
+ response_types_map=_response_types_map,
377
+ ).data
378
+
379
+
380
+ @validate_call
381
+ def smart_account_create_with_http_info(
382
+ self,
383
+ create_smart_account_request: CreateSmartAccountRequest,
384
+ _request_timeout: Union[
385
+ None,
386
+ Annotated[StrictFloat, Field(gt=0)],
387
+ Tuple[
388
+ Annotated[StrictFloat, Field(gt=0)],
389
+ Annotated[StrictFloat, Field(gt=0)]
390
+ ]
391
+ ] = None,
392
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
393
+ _content_type: Optional[StrictStr] = None,
394
+ _headers: Optional[Dict[StrictStr, Any]] = None,
395
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
396
+ ) -> ApiResponse[SmartAccount]:
397
+ """Create
398
+
399
+ Creates the smart account resource
400
+
401
+ :param create_smart_account_request: (required)
402
+ :type create_smart_account_request: CreateSmartAccountRequest
403
+ :param _request_timeout: timeout setting for this request. If one
404
+ number provided, it will be total request
405
+ timeout. It can also be a pair (tuple) of
406
+ (connection, read) timeouts.
407
+ :type _request_timeout: int, tuple(int, int), optional
408
+ :param _request_auth: set to override the auth_settings for an a single
409
+ request; this effectively ignores the
410
+ authentication in the spec for a single request.
411
+ :type _request_auth: dict, optional
412
+ :param _content_type: force content-type for the request.
413
+ :type _content_type: str, Optional
414
+ :param _headers: set to override the headers for a single
415
+ request; this effectively ignores the headers
416
+ in the spec for a single request.
417
+ :type _headers: dict, optional
418
+ :param _host_index: set to override the host_index for a single
419
+ request; this effectively ignores the host_index
420
+ in the spec for a single request.
421
+ :type _host_index: int, optional
422
+ :return: Returns the result object.
423
+ """ # noqa: E501
424
+
425
+ _param = self._smart_account_create_serialize(
426
+ create_smart_account_request=create_smart_account_request,
427
+ _request_auth=_request_auth,
428
+ _content_type=_content_type,
429
+ _headers=_headers,
430
+ _host_index=_host_index
431
+ )
432
+
433
+ _response_types_map: Dict[str, Optional[str]] = {
434
+ '200': "SmartAccount",
435
+ '400': "GlobalErrorResponse",
436
+ }
437
+ response_data = self.api_client.call_api(
438
+ *_param,
439
+ _request_timeout=_request_timeout
440
+ )
441
+ response_data.read()
442
+ return self.api_client.response_deserialize(
443
+ response_data=response_data,
444
+ response_types_map=_response_types_map,
445
+ )
446
+
447
+
448
+ @validate_call
449
+ def smart_account_create_without_preload_content(
450
+ self,
451
+ create_smart_account_request: CreateSmartAccountRequest,
452
+ _request_timeout: Union[
453
+ None,
454
+ Annotated[StrictFloat, Field(gt=0)],
455
+ Tuple[
456
+ Annotated[StrictFloat, Field(gt=0)],
457
+ Annotated[StrictFloat, Field(gt=0)]
458
+ ]
459
+ ] = None,
460
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
461
+ _content_type: Optional[StrictStr] = None,
462
+ _headers: Optional[Dict[StrictStr, Any]] = None,
463
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
464
+ ) -> RESTResponseType:
465
+ """Create
466
+
467
+ Creates the smart account resource
468
+
469
+ :param create_smart_account_request: (required)
470
+ :type create_smart_account_request: CreateSmartAccountRequest
471
+ :param _request_timeout: timeout setting for this request. If one
472
+ number provided, it will be total request
473
+ timeout. It can also be a pair (tuple) of
474
+ (connection, read) timeouts.
475
+ :type _request_timeout: int, tuple(int, int), optional
476
+ :param _request_auth: set to override the auth_settings for an a single
477
+ request; this effectively ignores the
478
+ authentication in the spec for a single request.
479
+ :type _request_auth: dict, optional
480
+ :param _content_type: force content-type for the request.
481
+ :type _content_type: str, Optional
482
+ :param _headers: set to override the headers for a single
483
+ request; this effectively ignores the headers
484
+ in the spec for a single request.
485
+ :type _headers: dict, optional
486
+ :param _host_index: set to override the host_index for a single
487
+ request; this effectively ignores the host_index
488
+ in the spec for a single request.
489
+ :type _host_index: int, optional
490
+ :return: Returns the result object.
491
+ """ # noqa: E501
492
+
493
+ _param = self._smart_account_create_serialize(
494
+ create_smart_account_request=create_smart_account_request,
495
+ _request_auth=_request_auth,
496
+ _content_type=_content_type,
497
+ _headers=_headers,
498
+ _host_index=_host_index
499
+ )
500
+
501
+ _response_types_map: Dict[str, Optional[str]] = {
502
+ '200': "SmartAccount",
503
+ '400': "GlobalErrorResponse",
504
+ }
505
+ response_data = self.api_client.call_api(
506
+ *_param,
507
+ _request_timeout=_request_timeout
508
+ )
509
+ return response_data.response
510
+
511
+
512
+ def _smart_account_create_serialize(
513
+ self,
514
+ create_smart_account_request,
515
+ _request_auth,
516
+ _content_type,
517
+ _headers,
518
+ _host_index,
519
+ ) -> RequestSerialized:
520
+
521
+ _host = None
522
+
523
+ _collection_formats: Dict[str, str] = {
524
+ }
525
+
526
+ _path_params: Dict[str, str] = {}
527
+ _query_params: List[Tuple[str, str]] = []
528
+ _header_params: Dict[str, Optional[str]] = _headers or {}
529
+ _form_params: List[Tuple[str, str]] = []
530
+ _files: Dict[
531
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
532
+ ] = {}
533
+ _body_params: Optional[bytes] = None
534
+
535
+ # process the path parameters
536
+ # process the query parameters
537
+ # process the header parameters
538
+ # process the form parameters
539
+ # process the body parameter
540
+ if create_smart_account_request is not None:
541
+ _body_params = create_smart_account_request
542
+
543
+
544
+ # set the HTTP header `Accept`
545
+ if 'Accept' not in _header_params:
546
+ _header_params['Accept'] = self.api_client.select_header_accept(
547
+ [
548
+ 'application/json'
549
+ ]
550
+ )
551
+
552
+ # set the HTTP header `Content-Type`
553
+ if _content_type:
554
+ _header_params['Content-Type'] = _content_type
555
+ else:
556
+ _default_content_type = (
557
+ self.api_client.select_header_content_type(
558
+ [
559
+ 'application/json'
560
+ ]
561
+ )
562
+ )
563
+ if _default_content_type is not None:
564
+ _header_params['Content-Type'] = _default_content_type
565
+
566
+ # authentication setting
567
+ _auth_settings: List[str] = [
568
+ 'default'
569
+ ]
570
+
571
+ return self.api_client.param_serialize(
572
+ method='POST',
573
+ resource_path='/payments/smart-accounts',
574
+ path_params=_path_params,
575
+ query_params=_query_params,
576
+ header_params=_header_params,
577
+ body=_body_params,
578
+ post_params=_form_params,
579
+ files=_files,
580
+ auth_settings=_auth_settings,
581
+ collection_formats=_collection_formats,
582
+ _host=_host,
583
+ _request_auth=_request_auth
584
+ )
585
+
586
+
587
+
588
+
589
+ @validate_call
590
+ def smart_account_retrieve(
591
+ self,
592
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
593
+ _request_timeout: Union[
594
+ None,
595
+ Annotated[StrictFloat, Field(gt=0)],
596
+ Tuple[
597
+ Annotated[StrictFloat, Field(gt=0)],
598
+ Annotated[StrictFloat, Field(gt=0)]
599
+ ]
600
+ ] = None,
601
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
602
+ _content_type: Optional[StrictStr] = None,
603
+ _headers: Optional[Dict[StrictStr, Any]] = None,
604
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
605
+ ) -> SmartAccount:
606
+ """Retrieve
607
+
608
+ Recovers the smart account resource by its id
609
+
610
+ :param id: Smart account primary identifier (required)
611
+ :type id: str
612
+ :param _request_timeout: timeout setting for this request. If one
613
+ number provided, it will be total request
614
+ timeout. It can also be a pair (tuple) of
615
+ (connection, read) timeouts.
616
+ :type _request_timeout: int, tuple(int, int), optional
617
+ :param _request_auth: set to override the auth_settings for an a single
618
+ request; this effectively ignores the
619
+ authentication in the spec for a single request.
620
+ :type _request_auth: dict, optional
621
+ :param _content_type: force content-type for the request.
622
+ :type _content_type: str, Optional
623
+ :param _headers: set to override the headers for a single
624
+ request; this effectively ignores the headers
625
+ in the spec for a single request.
626
+ :type _headers: dict, optional
627
+ :param _host_index: set to override the host_index for a single
628
+ request; this effectively ignores the host_index
629
+ in the spec for a single request.
630
+ :type _host_index: int, optional
631
+ :return: Returns the result object.
632
+ """ # noqa: E501
633
+
634
+ _param = self._smart_account_retrieve_serialize(
635
+ id=id,
636
+ _request_auth=_request_auth,
637
+ _content_type=_content_type,
638
+ _headers=_headers,
639
+ _host_index=_host_index
640
+ )
641
+
642
+ _response_types_map: Dict[str, Optional[str]] = {
643
+ '200': "SmartAccount",
644
+ '404': "GlobalErrorResponse",
645
+ }
646
+ response_data = self.api_client.call_api(
647
+ *_param,
648
+ _request_timeout=_request_timeout
649
+ )
650
+ response_data.read()
651
+ return self.api_client.response_deserialize(
652
+ response_data=response_data,
653
+ response_types_map=_response_types_map,
654
+ ).data
655
+
656
+
657
+ @validate_call
658
+ def smart_account_retrieve_with_http_info(
659
+ self,
660
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
661
+ _request_timeout: Union[
662
+ None,
663
+ Annotated[StrictFloat, Field(gt=0)],
664
+ Tuple[
665
+ Annotated[StrictFloat, Field(gt=0)],
666
+ Annotated[StrictFloat, Field(gt=0)]
667
+ ]
668
+ ] = None,
669
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
670
+ _content_type: Optional[StrictStr] = None,
671
+ _headers: Optional[Dict[StrictStr, Any]] = None,
672
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
673
+ ) -> ApiResponse[SmartAccount]:
674
+ """Retrieve
675
+
676
+ Recovers the smart account resource by its id
677
+
678
+ :param id: Smart account primary identifier (required)
679
+ :type id: str
680
+ :param _request_timeout: timeout setting for this request. If one
681
+ number provided, it will be total request
682
+ timeout. It can also be a pair (tuple) of
683
+ (connection, read) timeouts.
684
+ :type _request_timeout: int, tuple(int, int), optional
685
+ :param _request_auth: set to override the auth_settings for an a single
686
+ request; this effectively ignores the
687
+ authentication in the spec for a single request.
688
+ :type _request_auth: dict, optional
689
+ :param _content_type: force content-type for the request.
690
+ :type _content_type: str, Optional
691
+ :param _headers: set to override the headers for a single
692
+ request; this effectively ignores the headers
693
+ in the spec for a single request.
694
+ :type _headers: dict, optional
695
+ :param _host_index: set to override the host_index for a single
696
+ request; this effectively ignores the host_index
697
+ in the spec for a single request.
698
+ :type _host_index: int, optional
699
+ :return: Returns the result object.
700
+ """ # noqa: E501
701
+
702
+ _param = self._smart_account_retrieve_serialize(
703
+ id=id,
704
+ _request_auth=_request_auth,
705
+ _content_type=_content_type,
706
+ _headers=_headers,
707
+ _host_index=_host_index
708
+ )
709
+
710
+ _response_types_map: Dict[str, Optional[str]] = {
711
+ '200': "SmartAccount",
712
+ '404': "GlobalErrorResponse",
713
+ }
714
+ response_data = self.api_client.call_api(
715
+ *_param,
716
+ _request_timeout=_request_timeout
717
+ )
718
+ response_data.read()
719
+ return self.api_client.response_deserialize(
720
+ response_data=response_data,
721
+ response_types_map=_response_types_map,
722
+ )
723
+
724
+
725
+ @validate_call
726
+ def smart_account_retrieve_without_preload_content(
727
+ self,
728
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
729
+ _request_timeout: Union[
730
+ None,
731
+ Annotated[StrictFloat, Field(gt=0)],
732
+ Tuple[
733
+ Annotated[StrictFloat, Field(gt=0)],
734
+ Annotated[StrictFloat, Field(gt=0)]
735
+ ]
736
+ ] = None,
737
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
738
+ _content_type: Optional[StrictStr] = None,
739
+ _headers: Optional[Dict[StrictStr, Any]] = None,
740
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
741
+ ) -> RESTResponseType:
742
+ """Retrieve
743
+
744
+ Recovers the smart account resource by its id
745
+
746
+ :param id: Smart account primary identifier (required)
747
+ :type id: str
748
+ :param _request_timeout: timeout setting for this request. If one
749
+ number provided, it will be total request
750
+ timeout. It can also be a pair (tuple) of
751
+ (connection, read) timeouts.
752
+ :type _request_timeout: int, tuple(int, int), optional
753
+ :param _request_auth: set to override the auth_settings for an a single
754
+ request; this effectively ignores the
755
+ authentication in the spec for a single request.
756
+ :type _request_auth: dict, optional
757
+ :param _content_type: force content-type for the request.
758
+ :type _content_type: str, Optional
759
+ :param _headers: set to override the headers for a single
760
+ request; this effectively ignores the headers
761
+ in the spec for a single request.
762
+ :type _headers: dict, optional
763
+ :param _host_index: set to override the host_index for a single
764
+ request; this effectively ignores the host_index
765
+ in the spec for a single request.
766
+ :type _host_index: int, optional
767
+ :return: Returns the result object.
768
+ """ # noqa: E501
769
+
770
+ _param = self._smart_account_retrieve_serialize(
771
+ id=id,
772
+ _request_auth=_request_auth,
773
+ _content_type=_content_type,
774
+ _headers=_headers,
775
+ _host_index=_host_index
776
+ )
777
+
778
+ _response_types_map: Dict[str, Optional[str]] = {
779
+ '200': "SmartAccount",
780
+ '404': "GlobalErrorResponse",
781
+ }
782
+ response_data = self.api_client.call_api(
783
+ *_param,
784
+ _request_timeout=_request_timeout
785
+ )
786
+ return response_data.response
787
+
788
+
789
+ def _smart_account_retrieve_serialize(
790
+ self,
791
+ id,
792
+ _request_auth,
793
+ _content_type,
794
+ _headers,
795
+ _host_index,
796
+ ) -> RequestSerialized:
797
+
798
+ _host = None
799
+
800
+ _collection_formats: Dict[str, str] = {
801
+ }
802
+
803
+ _path_params: Dict[str, str] = {}
804
+ _query_params: List[Tuple[str, str]] = []
805
+ _header_params: Dict[str, Optional[str]] = _headers or {}
806
+ _form_params: List[Tuple[str, str]] = []
807
+ _files: Dict[
808
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
809
+ ] = {}
810
+ _body_params: Optional[bytes] = None
811
+
812
+ # process the path parameters
813
+ if id is not None:
814
+ _path_params['id'] = id
815
+ # process the query parameters
816
+ # process the header parameters
817
+ # process the form parameters
818
+ # process the body parameter
819
+
820
+
821
+ # set the HTTP header `Accept`
822
+ if 'Accept' not in _header_params:
823
+ _header_params['Accept'] = self.api_client.select_header_accept(
824
+ [
825
+ 'application/json'
826
+ ]
827
+ )
828
+
829
+
830
+ # authentication setting
831
+ _auth_settings: List[str] = [
832
+ 'default'
833
+ ]
834
+
835
+ return self.api_client.param_serialize(
836
+ method='GET',
837
+ resource_path='/payments/smart-accounts/{id}',
838
+ path_params=_path_params,
839
+ query_params=_query_params,
840
+ header_params=_header_params,
841
+ body=_body_params,
842
+ post_params=_form_params,
843
+ files=_files,
844
+ auth_settings=_auth_settings,
845
+ collection_formats=_collection_formats,
846
+ _host=_host,
847
+ _request_auth=_request_auth
848
+ )
849
+
850
+
851
+
852
+
853
+ @validate_call
854
+ def smart_account_transfer(
855
+ self,
856
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
857
+ transfer_id: Annotated[StrictStr, Field(description="Transfer primary identifier")],
858
+ _request_timeout: Union[
859
+ None,
860
+ Annotated[StrictFloat, Field(gt=0)],
861
+ Tuple[
862
+ Annotated[StrictFloat, Field(gt=0)],
863
+ Annotated[StrictFloat, Field(gt=0)]
864
+ ]
865
+ ] = None,
866
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
867
+ _content_type: Optional[StrictStr] = None,
868
+ _headers: Optional[Dict[StrictStr, Any]] = None,
869
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
870
+ ) -> SmartAccountTransfer:
871
+ """Retrieve Transfer
872
+
873
+ Get a transfer from the smart account
874
+
875
+ :param id: Smart account primary identifier (required)
876
+ :type id: str
877
+ :param transfer_id: Transfer primary identifier (required)
878
+ :type transfer_id: str
879
+ :param _request_timeout: timeout setting for this request. If one
880
+ number provided, it will be total request
881
+ timeout. It can also be a pair (tuple) of
882
+ (connection, read) timeouts.
883
+ :type _request_timeout: int, tuple(int, int), optional
884
+ :param _request_auth: set to override the auth_settings for an a single
885
+ request; this effectively ignores the
886
+ authentication in the spec for a single request.
887
+ :type _request_auth: dict, optional
888
+ :param _content_type: force content-type for the request.
889
+ :type _content_type: str, Optional
890
+ :param _headers: set to override the headers for a single
891
+ request; this effectively ignores the headers
892
+ in the spec for a single request.
893
+ :type _headers: dict, optional
894
+ :param _host_index: set to override the host_index for a single
895
+ request; this effectively ignores the host_index
896
+ in the spec for a single request.
897
+ :type _host_index: int, optional
898
+ :return: Returns the result object.
899
+ """ # noqa: E501
900
+
901
+ _param = self._smart_account_transfer_serialize(
902
+ id=id,
903
+ transfer_id=transfer_id,
904
+ _request_auth=_request_auth,
905
+ _content_type=_content_type,
906
+ _headers=_headers,
907
+ _host_index=_host_index
908
+ )
909
+
910
+ _response_types_map: Dict[str, Optional[str]] = {
911
+ '200': "SmartAccountTransfer",
912
+ '404': "GlobalErrorResponse",
913
+ '400': "GlobalErrorResponse",
914
+ }
915
+ response_data = self.api_client.call_api(
916
+ *_param,
917
+ _request_timeout=_request_timeout
918
+ )
919
+ response_data.read()
920
+ return self.api_client.response_deserialize(
921
+ response_data=response_data,
922
+ response_types_map=_response_types_map,
923
+ ).data
924
+
925
+
926
+ @validate_call
927
+ def smart_account_transfer_with_http_info(
928
+ self,
929
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
930
+ transfer_id: Annotated[StrictStr, Field(description="Transfer primary identifier")],
931
+ _request_timeout: Union[
932
+ None,
933
+ Annotated[StrictFloat, Field(gt=0)],
934
+ Tuple[
935
+ Annotated[StrictFloat, Field(gt=0)],
936
+ Annotated[StrictFloat, Field(gt=0)]
937
+ ]
938
+ ] = None,
939
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
940
+ _content_type: Optional[StrictStr] = None,
941
+ _headers: Optional[Dict[StrictStr, Any]] = None,
942
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
943
+ ) -> ApiResponse[SmartAccountTransfer]:
944
+ """Retrieve Transfer
945
+
946
+ Get a transfer from the smart account
947
+
948
+ :param id: Smart account primary identifier (required)
949
+ :type id: str
950
+ :param transfer_id: Transfer primary identifier (required)
951
+ :type transfer_id: str
952
+ :param _request_timeout: timeout setting for this request. If one
953
+ number provided, it will be total request
954
+ timeout. It can also be a pair (tuple) of
955
+ (connection, read) timeouts.
956
+ :type _request_timeout: int, tuple(int, int), optional
957
+ :param _request_auth: set to override the auth_settings for an a single
958
+ request; this effectively ignores the
959
+ authentication in the spec for a single request.
960
+ :type _request_auth: dict, optional
961
+ :param _content_type: force content-type for the request.
962
+ :type _content_type: str, Optional
963
+ :param _headers: set to override the headers for a single
964
+ request; this effectively ignores the headers
965
+ in the spec for a single request.
966
+ :type _headers: dict, optional
967
+ :param _host_index: set to override the host_index for a single
968
+ request; this effectively ignores the host_index
969
+ in the spec for a single request.
970
+ :type _host_index: int, optional
971
+ :return: Returns the result object.
972
+ """ # noqa: E501
973
+
974
+ _param = self._smart_account_transfer_serialize(
975
+ id=id,
976
+ transfer_id=transfer_id,
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': "SmartAccountTransfer",
985
+ '404': "GlobalErrorResponse",
986
+ '400': "GlobalErrorResponse",
987
+ }
988
+ response_data = self.api_client.call_api(
989
+ *_param,
990
+ _request_timeout=_request_timeout
991
+ )
992
+ response_data.read()
993
+ return self.api_client.response_deserialize(
994
+ response_data=response_data,
995
+ response_types_map=_response_types_map,
996
+ )
997
+
998
+
999
+ @validate_call
1000
+ def smart_account_transfer_without_preload_content(
1001
+ self,
1002
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
1003
+ transfer_id: Annotated[StrictStr, Field(description="Transfer primary identifier")],
1004
+ _request_timeout: Union[
1005
+ None,
1006
+ Annotated[StrictFloat, Field(gt=0)],
1007
+ Tuple[
1008
+ Annotated[StrictFloat, Field(gt=0)],
1009
+ Annotated[StrictFloat, Field(gt=0)]
1010
+ ]
1011
+ ] = None,
1012
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1013
+ _content_type: Optional[StrictStr] = None,
1014
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1015
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1016
+ ) -> RESTResponseType:
1017
+ """Retrieve Transfer
1018
+
1019
+ Get a transfer from the smart account
1020
+
1021
+ :param id: Smart account primary identifier (required)
1022
+ :type id: str
1023
+ :param transfer_id: Transfer primary identifier (required)
1024
+ :type transfer_id: str
1025
+ :param _request_timeout: timeout setting for this request. If one
1026
+ number provided, it will be total request
1027
+ timeout. It can also be a pair (tuple) of
1028
+ (connection, read) timeouts.
1029
+ :type _request_timeout: int, tuple(int, int), optional
1030
+ :param _request_auth: set to override the auth_settings for an a single
1031
+ request; this effectively ignores the
1032
+ authentication in the spec for a single request.
1033
+ :type _request_auth: dict, optional
1034
+ :param _content_type: force content-type for the request.
1035
+ :type _content_type: str, Optional
1036
+ :param _headers: set to override the headers for a single
1037
+ request; this effectively ignores the headers
1038
+ in the spec for a single request.
1039
+ :type _headers: dict, optional
1040
+ :param _host_index: set to override the host_index for a single
1041
+ request; this effectively ignores the host_index
1042
+ in the spec for a single request.
1043
+ :type _host_index: int, optional
1044
+ :return: Returns the result object.
1045
+ """ # noqa: E501
1046
+
1047
+ _param = self._smart_account_transfer_serialize(
1048
+ id=id,
1049
+ transfer_id=transfer_id,
1050
+ _request_auth=_request_auth,
1051
+ _content_type=_content_type,
1052
+ _headers=_headers,
1053
+ _host_index=_host_index
1054
+ )
1055
+
1056
+ _response_types_map: Dict[str, Optional[str]] = {
1057
+ '200': "SmartAccountTransfer",
1058
+ '404': "GlobalErrorResponse",
1059
+ '400': "GlobalErrorResponse",
1060
+ }
1061
+ response_data = self.api_client.call_api(
1062
+ *_param,
1063
+ _request_timeout=_request_timeout
1064
+ )
1065
+ return response_data.response
1066
+
1067
+
1068
+ def _smart_account_transfer_serialize(
1069
+ self,
1070
+ id,
1071
+ transfer_id,
1072
+ _request_auth,
1073
+ _content_type,
1074
+ _headers,
1075
+ _host_index,
1076
+ ) -> RequestSerialized:
1077
+
1078
+ _host = None
1079
+
1080
+ _collection_formats: Dict[str, str] = {
1081
+ }
1082
+
1083
+ _path_params: Dict[str, str] = {}
1084
+ _query_params: List[Tuple[str, str]] = []
1085
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1086
+ _form_params: List[Tuple[str, str]] = []
1087
+ _files: Dict[
1088
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1089
+ ] = {}
1090
+ _body_params: Optional[bytes] = None
1091
+
1092
+ # process the path parameters
1093
+ if id is not None:
1094
+ _path_params['id'] = id
1095
+ if transfer_id is not None:
1096
+ _path_params['transfer_id'] = transfer_id
1097
+ # process the query parameters
1098
+ # process the header parameters
1099
+ # process the form parameters
1100
+ # process the body parameter
1101
+
1102
+
1103
+ # set the HTTP header `Accept`
1104
+ if 'Accept' not in _header_params:
1105
+ _header_params['Accept'] = self.api_client.select_header_accept(
1106
+ [
1107
+ 'application/json'
1108
+ ]
1109
+ )
1110
+
1111
+
1112
+ # authentication setting
1113
+ _auth_settings: List[str] = [
1114
+ 'default'
1115
+ ]
1116
+
1117
+ return self.api_client.param_serialize(
1118
+ method='GET',
1119
+ resource_path='/payments/smart-accounts/{id}/transfers/{transfer_id}',
1120
+ path_params=_path_params,
1121
+ query_params=_query_params,
1122
+ header_params=_header_params,
1123
+ body=_body_params,
1124
+ post_params=_form_params,
1125
+ files=_files,
1126
+ auth_settings=_auth_settings,
1127
+ collection_formats=_collection_formats,
1128
+ _host=_host,
1129
+ _request_auth=_request_auth
1130
+ )
1131
+
1132
+
1133
+
1134
+
1135
+ @validate_call
1136
+ def smart_account_transfer_create(
1137
+ self,
1138
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
1139
+ create_smart_account_transfer_request: CreateSmartAccountTransferRequest,
1140
+ _request_timeout: Union[
1141
+ None,
1142
+ Annotated[StrictFloat, Field(gt=0)],
1143
+ Tuple[
1144
+ Annotated[StrictFloat, Field(gt=0)],
1145
+ Annotated[StrictFloat, Field(gt=0)]
1146
+ ]
1147
+ ] = None,
1148
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1149
+ _content_type: Optional[StrictStr] = None,
1150
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1151
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1152
+ ) -> SmartAccountTransfer:
1153
+ """Create Transfer
1154
+
1155
+ Creates the smart account transfer resource
1156
+
1157
+ :param id: Smart account primary identifier (required)
1158
+ :type id: str
1159
+ :param create_smart_account_transfer_request: (required)
1160
+ :type create_smart_account_transfer_request: CreateSmartAccountTransferRequest
1161
+ :param _request_timeout: timeout setting for this request. If one
1162
+ number provided, it will be total request
1163
+ timeout. It can also be a pair (tuple) of
1164
+ (connection, read) timeouts.
1165
+ :type _request_timeout: int, tuple(int, int), optional
1166
+ :param _request_auth: set to override the auth_settings for an a single
1167
+ request; this effectively ignores the
1168
+ authentication in the spec for a single request.
1169
+ :type _request_auth: dict, optional
1170
+ :param _content_type: force content-type for the request.
1171
+ :type _content_type: str, Optional
1172
+ :param _headers: set to override the headers for a single
1173
+ request; this effectively ignores the headers
1174
+ in the spec for a single request.
1175
+ :type _headers: dict, optional
1176
+ :param _host_index: set to override the host_index for a single
1177
+ request; this effectively ignores the host_index
1178
+ in the spec for a single request.
1179
+ :type _host_index: int, optional
1180
+ :return: Returns the result object.
1181
+ """ # noqa: E501
1182
+
1183
+ _param = self._smart_account_transfer_create_serialize(
1184
+ id=id,
1185
+ create_smart_account_transfer_request=create_smart_account_transfer_request,
1186
+ _request_auth=_request_auth,
1187
+ _content_type=_content_type,
1188
+ _headers=_headers,
1189
+ _host_index=_host_index
1190
+ )
1191
+
1192
+ _response_types_map: Dict[str, Optional[str]] = {
1193
+ '200': "SmartAccountTransfer",
1194
+ '400': "GlobalErrorResponse",
1195
+ }
1196
+ response_data = self.api_client.call_api(
1197
+ *_param,
1198
+ _request_timeout=_request_timeout
1199
+ )
1200
+ response_data.read()
1201
+ return self.api_client.response_deserialize(
1202
+ response_data=response_data,
1203
+ response_types_map=_response_types_map,
1204
+ ).data
1205
+
1206
+
1207
+ @validate_call
1208
+ def smart_account_transfer_create_with_http_info(
1209
+ self,
1210
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
1211
+ create_smart_account_transfer_request: CreateSmartAccountTransferRequest,
1212
+ _request_timeout: Union[
1213
+ None,
1214
+ Annotated[StrictFloat, Field(gt=0)],
1215
+ Tuple[
1216
+ Annotated[StrictFloat, Field(gt=0)],
1217
+ Annotated[StrictFloat, Field(gt=0)]
1218
+ ]
1219
+ ] = None,
1220
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1221
+ _content_type: Optional[StrictStr] = None,
1222
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1223
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1224
+ ) -> ApiResponse[SmartAccountTransfer]:
1225
+ """Create Transfer
1226
+
1227
+ Creates the smart account transfer resource
1228
+
1229
+ :param id: Smart account primary identifier (required)
1230
+ :type id: str
1231
+ :param create_smart_account_transfer_request: (required)
1232
+ :type create_smart_account_transfer_request: CreateSmartAccountTransferRequest
1233
+ :param _request_timeout: timeout setting for this request. If one
1234
+ number provided, it will be total request
1235
+ timeout. It can also be a pair (tuple) of
1236
+ (connection, read) timeouts.
1237
+ :type _request_timeout: int, tuple(int, int), optional
1238
+ :param _request_auth: set to override the auth_settings for an a single
1239
+ request; this effectively ignores the
1240
+ authentication in the spec for a single request.
1241
+ :type _request_auth: dict, optional
1242
+ :param _content_type: force content-type for the request.
1243
+ :type _content_type: str, Optional
1244
+ :param _headers: set to override the headers for a single
1245
+ request; this effectively ignores the headers
1246
+ in the spec for a single request.
1247
+ :type _headers: dict, optional
1248
+ :param _host_index: set to override the host_index for a single
1249
+ request; this effectively ignores the host_index
1250
+ in the spec for a single request.
1251
+ :type _host_index: int, optional
1252
+ :return: Returns the result object.
1253
+ """ # noqa: E501
1254
+
1255
+ _param = self._smart_account_transfer_create_serialize(
1256
+ id=id,
1257
+ create_smart_account_transfer_request=create_smart_account_transfer_request,
1258
+ _request_auth=_request_auth,
1259
+ _content_type=_content_type,
1260
+ _headers=_headers,
1261
+ _host_index=_host_index
1262
+ )
1263
+
1264
+ _response_types_map: Dict[str, Optional[str]] = {
1265
+ '200': "SmartAccountTransfer",
1266
+ '400': "GlobalErrorResponse",
1267
+ }
1268
+ response_data = self.api_client.call_api(
1269
+ *_param,
1270
+ _request_timeout=_request_timeout
1271
+ )
1272
+ response_data.read()
1273
+ return self.api_client.response_deserialize(
1274
+ response_data=response_data,
1275
+ response_types_map=_response_types_map,
1276
+ )
1277
+
1278
+
1279
+ @validate_call
1280
+ def smart_account_transfer_create_without_preload_content(
1281
+ self,
1282
+ id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
1283
+ create_smart_account_transfer_request: CreateSmartAccountTransferRequest,
1284
+ _request_timeout: Union[
1285
+ None,
1286
+ Annotated[StrictFloat, Field(gt=0)],
1287
+ Tuple[
1288
+ Annotated[StrictFloat, Field(gt=0)],
1289
+ Annotated[StrictFloat, Field(gt=0)]
1290
+ ]
1291
+ ] = None,
1292
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1293
+ _content_type: Optional[StrictStr] = None,
1294
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1295
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1296
+ ) -> RESTResponseType:
1297
+ """Create Transfer
1298
+
1299
+ Creates the smart account transfer resource
1300
+
1301
+ :param id: Smart account primary identifier (required)
1302
+ :type id: str
1303
+ :param create_smart_account_transfer_request: (required)
1304
+ :type create_smart_account_transfer_request: CreateSmartAccountTransferRequest
1305
+ :param _request_timeout: timeout setting for this request. If one
1306
+ number provided, it will be total request
1307
+ timeout. It can also be a pair (tuple) of
1308
+ (connection, read) timeouts.
1309
+ :type _request_timeout: int, tuple(int, int), optional
1310
+ :param _request_auth: set to override the auth_settings for an a single
1311
+ request; this effectively ignores the
1312
+ authentication in the spec for a single request.
1313
+ :type _request_auth: dict, optional
1314
+ :param _content_type: force content-type for the request.
1315
+ :type _content_type: str, Optional
1316
+ :param _headers: set to override the headers for a single
1317
+ request; this effectively ignores the headers
1318
+ in the spec for a single request.
1319
+ :type _headers: dict, optional
1320
+ :param _host_index: set to override the host_index for a single
1321
+ request; this effectively ignores the host_index
1322
+ in the spec for a single request.
1323
+ :type _host_index: int, optional
1324
+ :return: Returns the result object.
1325
+ """ # noqa: E501
1326
+
1327
+ _param = self._smart_account_transfer_create_serialize(
1328
+ id=id,
1329
+ create_smart_account_transfer_request=create_smart_account_transfer_request,
1330
+ _request_auth=_request_auth,
1331
+ _content_type=_content_type,
1332
+ _headers=_headers,
1333
+ _host_index=_host_index
1334
+ )
1335
+
1336
+ _response_types_map: Dict[str, Optional[str]] = {
1337
+ '200': "SmartAccountTransfer",
1338
+ '400': "GlobalErrorResponse",
1339
+ }
1340
+ response_data = self.api_client.call_api(
1341
+ *_param,
1342
+ _request_timeout=_request_timeout
1343
+ )
1344
+ return response_data.response
1345
+
1346
+
1347
+ def _smart_account_transfer_create_serialize(
1348
+ self,
1349
+ id,
1350
+ create_smart_account_transfer_request,
1351
+ _request_auth,
1352
+ _content_type,
1353
+ _headers,
1354
+ _host_index,
1355
+ ) -> RequestSerialized:
1356
+
1357
+ _host = None
1358
+
1359
+ _collection_formats: Dict[str, str] = {
1360
+ }
1361
+
1362
+ _path_params: Dict[str, str] = {}
1363
+ _query_params: List[Tuple[str, str]] = []
1364
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1365
+ _form_params: List[Tuple[str, str]] = []
1366
+ _files: Dict[
1367
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1368
+ ] = {}
1369
+ _body_params: Optional[bytes] = None
1370
+
1371
+ # process the path parameters
1372
+ if id is not None:
1373
+ _path_params['id'] = id
1374
+ # process the query parameters
1375
+ # process the header parameters
1376
+ # process the form parameters
1377
+ # process the body parameter
1378
+ if create_smart_account_transfer_request is not None:
1379
+ _body_params = create_smart_account_transfer_request
1380
+
1381
+
1382
+ # set the HTTP header `Accept`
1383
+ if 'Accept' not in _header_params:
1384
+ _header_params['Accept'] = self.api_client.select_header_accept(
1385
+ [
1386
+ 'application/json'
1387
+ ]
1388
+ )
1389
+
1390
+ # set the HTTP header `Content-Type`
1391
+ if _content_type:
1392
+ _header_params['Content-Type'] = _content_type
1393
+ else:
1394
+ _default_content_type = (
1395
+ self.api_client.select_header_content_type(
1396
+ [
1397
+ 'application/json'
1398
+ ]
1399
+ )
1400
+ )
1401
+ if _default_content_type is not None:
1402
+ _header_params['Content-Type'] = _default_content_type
1403
+
1404
+ # authentication setting
1405
+ _auth_settings: List[str] = [
1406
+ 'default'
1407
+ ]
1408
+
1409
+ return self.api_client.param_serialize(
1410
+ method='POST',
1411
+ resource_path='/payments/smart-accounts/{id}/transfers',
1412
+ path_params=_path_params,
1413
+ query_params=_query_params,
1414
+ header_params=_header_params,
1415
+ body=_body_params,
1416
+ post_params=_form_params,
1417
+ files=_files,
1418
+ auth_settings=_auth_settings,
1419
+ collection_formats=_collection_formats,
1420
+ _host=_host,
1421
+ _request_auth=_request_auth
1422
+ )
1423
+
1424
+
1425
+
1426
+
1427
+ @validate_call
1428
+ def smart_accounts_list(
1429
+ self,
1430
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
1431
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
1432
+ _request_timeout: Union[
1433
+ None,
1434
+ Annotated[StrictFloat, Field(gt=0)],
1435
+ Tuple[
1436
+ Annotated[StrictFloat, Field(gt=0)],
1437
+ Annotated[StrictFloat, Field(gt=0)]
1438
+ ]
1439
+ ] = None,
1440
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1441
+ _content_type: Optional[StrictStr] = None,
1442
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1443
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1444
+ ) -> SmartAccountsList200Response:
1445
+ """List
1446
+
1447
+ Recovers all created smart accounts
1448
+
1449
+ :param page_size: Page size for the paging request, default: 20
1450
+ :type page_size: float
1451
+ :param page: Page number for the paging request, default: 1
1452
+ :type page: float
1453
+ :param _request_timeout: timeout setting for this request. If one
1454
+ number provided, it will be total request
1455
+ timeout. It can also be a pair (tuple) of
1456
+ (connection, read) timeouts.
1457
+ :type _request_timeout: int, tuple(int, int), optional
1458
+ :param _request_auth: set to override the auth_settings for an a single
1459
+ request; this effectively ignores the
1460
+ authentication in the spec for a single request.
1461
+ :type _request_auth: dict, optional
1462
+ :param _content_type: force content-type for the request.
1463
+ :type _content_type: str, Optional
1464
+ :param _headers: set to override the headers for a single
1465
+ request; this effectively ignores the headers
1466
+ in the spec for a single request.
1467
+ :type _headers: dict, optional
1468
+ :param _host_index: set to override the host_index for a single
1469
+ request; this effectively ignores the host_index
1470
+ in the spec for a single request.
1471
+ :type _host_index: int, optional
1472
+ :return: Returns the result object.
1473
+ """ # noqa: E501
1474
+
1475
+ _param = self._smart_accounts_list_serialize(
1476
+ page_size=page_size,
1477
+ page=page,
1478
+ _request_auth=_request_auth,
1479
+ _content_type=_content_type,
1480
+ _headers=_headers,
1481
+ _host_index=_host_index
1482
+ )
1483
+
1484
+ _response_types_map: Dict[str, Optional[str]] = {
1485
+ '200': "SmartAccountsList200Response",
1486
+ }
1487
+ response_data = self.api_client.call_api(
1488
+ *_param,
1489
+ _request_timeout=_request_timeout
1490
+ )
1491
+ response_data.read()
1492
+ return self.api_client.response_deserialize(
1493
+ response_data=response_data,
1494
+ response_types_map=_response_types_map,
1495
+ ).data
1496
+
1497
+
1498
+ @validate_call
1499
+ def smart_accounts_list_with_http_info(
1500
+ self,
1501
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
1502
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
1503
+ _request_timeout: Union[
1504
+ None,
1505
+ Annotated[StrictFloat, Field(gt=0)],
1506
+ Tuple[
1507
+ Annotated[StrictFloat, Field(gt=0)],
1508
+ Annotated[StrictFloat, Field(gt=0)]
1509
+ ]
1510
+ ] = None,
1511
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1512
+ _content_type: Optional[StrictStr] = None,
1513
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1514
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1515
+ ) -> ApiResponse[SmartAccountsList200Response]:
1516
+ """List
1517
+
1518
+ Recovers all created smart accounts
1519
+
1520
+ :param page_size: Page size for the paging request, default: 20
1521
+ :type page_size: float
1522
+ :param page: Page number for the paging request, default: 1
1523
+ :type page: float
1524
+ :param _request_timeout: timeout setting for this request. If one
1525
+ number provided, it will be total request
1526
+ timeout. It can also be a pair (tuple) of
1527
+ (connection, read) timeouts.
1528
+ :type _request_timeout: int, tuple(int, int), optional
1529
+ :param _request_auth: set to override the auth_settings for an a single
1530
+ request; this effectively ignores the
1531
+ authentication in the spec for a single request.
1532
+ :type _request_auth: dict, optional
1533
+ :param _content_type: force content-type for the request.
1534
+ :type _content_type: str, Optional
1535
+ :param _headers: set to override the headers for a single
1536
+ request; this effectively ignores the headers
1537
+ in the spec for a single request.
1538
+ :type _headers: dict, optional
1539
+ :param _host_index: set to override the host_index for a single
1540
+ request; this effectively ignores the host_index
1541
+ in the spec for a single request.
1542
+ :type _host_index: int, optional
1543
+ :return: Returns the result object.
1544
+ """ # noqa: E501
1545
+
1546
+ _param = self._smart_accounts_list_serialize(
1547
+ page_size=page_size,
1548
+ page=page,
1549
+ _request_auth=_request_auth,
1550
+ _content_type=_content_type,
1551
+ _headers=_headers,
1552
+ _host_index=_host_index
1553
+ )
1554
+
1555
+ _response_types_map: Dict[str, Optional[str]] = {
1556
+ '200': "SmartAccountsList200Response",
1557
+ }
1558
+ response_data = self.api_client.call_api(
1559
+ *_param,
1560
+ _request_timeout=_request_timeout
1561
+ )
1562
+ response_data.read()
1563
+ return self.api_client.response_deserialize(
1564
+ response_data=response_data,
1565
+ response_types_map=_response_types_map,
1566
+ )
1567
+
1568
+
1569
+ @validate_call
1570
+ def smart_accounts_list_without_preload_content(
1571
+ self,
1572
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
1573
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
1574
+ _request_timeout: Union[
1575
+ None,
1576
+ Annotated[StrictFloat, Field(gt=0)],
1577
+ Tuple[
1578
+ Annotated[StrictFloat, Field(gt=0)],
1579
+ Annotated[StrictFloat, Field(gt=0)]
1580
+ ]
1581
+ ] = None,
1582
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1583
+ _content_type: Optional[StrictStr] = None,
1584
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1585
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1586
+ ) -> RESTResponseType:
1587
+ """List
1588
+
1589
+ Recovers all created smart accounts
1590
+
1591
+ :param page_size: Page size for the paging request, default: 20
1592
+ :type page_size: float
1593
+ :param page: Page number for the paging request, default: 1
1594
+ :type page: float
1595
+ :param _request_timeout: timeout setting for this request. If one
1596
+ number provided, it will be total request
1597
+ timeout. It can also be a pair (tuple) of
1598
+ (connection, read) timeouts.
1599
+ :type _request_timeout: int, tuple(int, int), optional
1600
+ :param _request_auth: set to override the auth_settings for an a single
1601
+ request; this effectively ignores the
1602
+ authentication in the spec for a single request.
1603
+ :type _request_auth: dict, optional
1604
+ :param _content_type: force content-type for the request.
1605
+ :type _content_type: str, Optional
1606
+ :param _headers: set to override the headers for a single
1607
+ request; this effectively ignores the headers
1608
+ in the spec for a single request.
1609
+ :type _headers: dict, optional
1610
+ :param _host_index: set to override the host_index for a single
1611
+ request; this effectively ignores the host_index
1612
+ in the spec for a single request.
1613
+ :type _host_index: int, optional
1614
+ :return: Returns the result object.
1615
+ """ # noqa: E501
1616
+
1617
+ _param = self._smart_accounts_list_serialize(
1618
+ page_size=page_size,
1619
+ page=page,
1620
+ _request_auth=_request_auth,
1621
+ _content_type=_content_type,
1622
+ _headers=_headers,
1623
+ _host_index=_host_index
1624
+ )
1625
+
1626
+ _response_types_map: Dict[str, Optional[str]] = {
1627
+ '200': "SmartAccountsList200Response",
1628
+ }
1629
+ response_data = self.api_client.call_api(
1630
+ *_param,
1631
+ _request_timeout=_request_timeout
1632
+ )
1633
+ return response_data.response
1634
+
1635
+
1636
+ def _smart_accounts_list_serialize(
1637
+ self,
1638
+ page_size,
1639
+ page,
1640
+ _request_auth,
1641
+ _content_type,
1642
+ _headers,
1643
+ _host_index,
1644
+ ) -> RequestSerialized:
1645
+
1646
+ _host = None
1647
+
1648
+ _collection_formats: Dict[str, str] = {
1649
+ }
1650
+
1651
+ _path_params: Dict[str, str] = {}
1652
+ _query_params: List[Tuple[str, str]] = []
1653
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1654
+ _form_params: List[Tuple[str, str]] = []
1655
+ _files: Dict[
1656
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1657
+ ] = {}
1658
+ _body_params: Optional[bytes] = None
1659
+
1660
+ # process the path parameters
1661
+ # process the query parameters
1662
+ if page_size is not None:
1663
+
1664
+ _query_params.append(('pageSize', page_size))
1665
+
1666
+ if page is not None:
1667
+
1668
+ _query_params.append(('page', page))
1669
+
1670
+ # process the header parameters
1671
+ # process the form parameters
1672
+ # process the body parameter
1673
+
1674
+
1675
+ # set the HTTP header `Accept`
1676
+ if 'Accept' not in _header_params:
1677
+ _header_params['Accept'] = self.api_client.select_header_accept(
1678
+ [
1679
+ 'application/json'
1680
+ ]
1681
+ )
1682
+
1683
+
1684
+ # authentication setting
1685
+ _auth_settings: List[str] = [
1686
+ 'default'
1687
+ ]
1688
+
1689
+ return self.api_client.param_serialize(
1690
+ method='GET',
1691
+ resource_path='/payments/smart-accounts',
1692
+ path_params=_path_params,
1693
+ query_params=_query_params,
1694
+ header_params=_header_params,
1695
+ body=_body_params,
1696
+ post_params=_form_params,
1697
+ files=_files,
1698
+ auth_settings=_auth_settings,
1699
+ collection_formats=_collection_formats,
1700
+ _host=_host,
1701
+ _request_auth=_request_auth
1702
+ )
1703
+
1704
+