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