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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. pluggy_sdk/__init__.py +183 -0
  2. pluggy_sdk/api/__init__.py +26 -0
  3. pluggy_sdk/api/account_api.py +582 -0
  4. pluggy_sdk/api/acquirer_anticipation_api.py +658 -0
  5. pluggy_sdk/api/acquirer_receivable_api.py +658 -0
  6. pluggy_sdk/api/acquirer_sale_api.py +658 -0
  7. pluggy_sdk/api/auth_api.py +599 -0
  8. pluggy_sdk/api/bill_api.py +561 -0
  9. pluggy_sdk/api/bulk_payment_api.py +854 -0
  10. pluggy_sdk/api/category_api.py +1084 -0
  11. pluggy_sdk/api/connector_api.py +970 -0
  12. pluggy_sdk/api/identity_api.py +575 -0
  13. pluggy_sdk/api/income_report_api.py +308 -0
  14. pluggy_sdk/api/investment_api.py +909 -0
  15. pluggy_sdk/api/items_api.py +1441 -0
  16. pluggy_sdk/api/loan_api.py +561 -0
  17. pluggy_sdk/api/payment_customer_api.py +1399 -0
  18. pluggy_sdk/api/payment_intent_api.py +833 -0
  19. pluggy_sdk/api/payment_recipient_api.py +1976 -0
  20. pluggy_sdk/api/payment_request_api.py +1636 -0
  21. pluggy_sdk/api/portfolio_yield_api.py +574 -0
  22. pluggy_sdk/api/smart_account_api.py +1116 -0
  23. pluggy_sdk/api/transaction_api.py +954 -0
  24. pluggy_sdk/api/webhook_api.py +1391 -0
  25. pluggy_sdk/api_client.py +769 -0
  26. pluggy_sdk/api_response.py +21 -0
  27. pluggy_sdk/configuration.py +466 -0
  28. pluggy_sdk/exceptions.py +200 -0
  29. pluggy_sdk/models/__init__.py +145 -0
  30. pluggy_sdk/models/account.py +134 -0
  31. pluggy_sdk/models/accounts_list200_response.py +102 -0
  32. pluggy_sdk/models/acquirer_anticipation.py +117 -0
  33. pluggy_sdk/models/acquirer_anticipation_data.py +101 -0
  34. pluggy_sdk/models/acquirer_data.py +113 -0
  35. pluggy_sdk/models/acquirer_receivable.py +143 -0
  36. pluggy_sdk/models/acquirer_receivable_data.py +108 -0
  37. pluggy_sdk/models/acquirer_receivable_data_establishment.py +96 -0
  38. pluggy_sdk/models/acquirer_receivable_destination_account.py +92 -0
  39. pluggy_sdk/models/acquirer_receivable_related_sale.py +99 -0
  40. pluggy_sdk/models/acquirer_sale.py +171 -0
  41. pluggy_sdk/models/acquirer_sale_data.py +150 -0
  42. pluggy_sdk/models/acquirer_sale_installment.py +93 -0
  43. pluggy_sdk/models/acquirer_sale_installment_data.py +95 -0
  44. pluggy_sdk/models/address.py +110 -0
  45. pluggy_sdk/models/aggregated_portfolio.py +120 -0
  46. pluggy_sdk/models/aggregated_portfolio_response.py +102 -0
  47. pluggy_sdk/models/asset_distribution.py +88 -0
  48. pluggy_sdk/models/auth_request.py +90 -0
  49. pluggy_sdk/models/auth_response.py +88 -0
  50. pluggy_sdk/models/bank_data.py +92 -0
  51. pluggy_sdk/models/bill.py +109 -0
  52. pluggy_sdk/models/bill_finance_charge.py +103 -0
  53. pluggy_sdk/models/bills_list200_response.py +102 -0
  54. pluggy_sdk/models/bulk_payment.py +128 -0
  55. pluggy_sdk/models/bulk_payments_list200_response.py +102 -0
  56. pluggy_sdk/models/category.py +96 -0
  57. pluggy_sdk/models/client_category_rule.py +94 -0
  58. pluggy_sdk/models/company.py +90 -0
  59. pluggy_sdk/models/connect_token_request.py +94 -0
  60. pluggy_sdk/models/connect_token_response.py +88 -0
  61. pluggy_sdk/models/connector.py +141 -0
  62. pluggy_sdk/models/connector_credential.py +121 -0
  63. pluggy_sdk/models/connector_health.py +96 -0
  64. pluggy_sdk/models/connector_health_details.py +90 -0
  65. pluggy_sdk/models/connector_list_response.py +102 -0
  66. pluggy_sdk/models/connector_user_action.py +93 -0
  67. pluggy_sdk/models/create_bulk_payment.py +96 -0
  68. pluggy_sdk/models/create_client_category_rule.py +92 -0
  69. pluggy_sdk/models/create_item.py +111 -0
  70. pluggy_sdk/models/create_item_parameters.py +144 -0
  71. pluggy_sdk/models/create_or_update_payment_customer.py +105 -0
  72. pluggy_sdk/models/create_payment_customer_request_body.py +103 -0
  73. pluggy_sdk/models/create_payment_intent.py +94 -0
  74. pluggy_sdk/models/create_payment_recipient.py +100 -0
  75. pluggy_sdk/models/create_payment_request.py +102 -0
  76. pluggy_sdk/models/create_pix_qr_payment_request.py +96 -0
  77. pluggy_sdk/models/create_smart_account_request.py +102 -0
  78. pluggy_sdk/models/create_webhook.py +99 -0
  79. pluggy_sdk/models/credential_select_option.py +90 -0
  80. pluggy_sdk/models/credit_card_metadata.py +101 -0
  81. pluggy_sdk/models/credit_data.py +127 -0
  82. pluggy_sdk/models/document.py +100 -0
  83. pluggy_sdk/models/email.py +100 -0
  84. pluggy_sdk/models/global_error_response.py +94 -0
  85. pluggy_sdk/models/i_count_response.py +88 -0
  86. pluggy_sdk/models/identity_relation.py +102 -0
  87. pluggy_sdk/models/identity_response.py +149 -0
  88. pluggy_sdk/models/income_report.py +90 -0
  89. pluggy_sdk/models/income_reports_response.py +102 -0
  90. pluggy_sdk/models/investment.py +192 -0
  91. pluggy_sdk/models/investment_expenses.py +108 -0
  92. pluggy_sdk/models/investment_metadata.py +99 -0
  93. pluggy_sdk/models/investment_transaction.py +124 -0
  94. pluggy_sdk/models/investments_list200_response.py +102 -0
  95. pluggy_sdk/models/item.py +148 -0
  96. pluggy_sdk/models/item_creation_error_response.py +102 -0
  97. pluggy_sdk/models/item_error.py +94 -0
  98. pluggy_sdk/models/item_options.py +90 -0
  99. pluggy_sdk/models/loan.py +199 -0
  100. pluggy_sdk/models/loan_contracted_fee.py +118 -0
  101. pluggy_sdk/models/loan_contracted_finance_charge.py +92 -0
  102. pluggy_sdk/models/loan_installment_balloon_payment.py +95 -0
  103. pluggy_sdk/models/loan_installment_balloon_payment_amount.py +90 -0
  104. pluggy_sdk/models/loan_installments.py +130 -0
  105. pluggy_sdk/models/loan_interest_rate.py +136 -0
  106. pluggy_sdk/models/loan_payment_release.py +103 -0
  107. pluggy_sdk/models/loan_payment_release_over_parcel.py +106 -0
  108. pluggy_sdk/models/loan_payment_release_over_parcel_charge.py +92 -0
  109. pluggy_sdk/models/loan_payment_release_over_parcel_fee.py +92 -0
  110. pluggy_sdk/models/loan_payments.py +98 -0
  111. pluggy_sdk/models/loan_warranty.py +94 -0
  112. pluggy_sdk/models/loans_list200_response.py +102 -0
  113. pluggy_sdk/models/merchant.py +96 -0
  114. pluggy_sdk/models/monthly_portfolio.py +100 -0
  115. pluggy_sdk/models/monthly_portfolio_response.py +102 -0
  116. pluggy_sdk/models/not_authenticated_response.py +90 -0
  117. pluggy_sdk/models/page_response_acquirer_anticipations.py +102 -0
  118. pluggy_sdk/models/page_response_acquirer_receivables.py +102 -0
  119. pluggy_sdk/models/page_response_acquirer_sales.py +102 -0
  120. pluggy_sdk/models/page_response_category_rules.py +102 -0
  121. pluggy_sdk/models/page_response_investment_transactions.py +102 -0
  122. pluggy_sdk/models/page_response_transactions.py +102 -0
  123. pluggy_sdk/models/parameter_validation_error.py +92 -0
  124. pluggy_sdk/models/parameter_validation_response.py +98 -0
  125. pluggy_sdk/models/payment_customer.py +105 -0
  126. pluggy_sdk/models/payment_customers_list200_response.py +102 -0
  127. pluggy_sdk/models/payment_data.py +105 -0
  128. pluggy_sdk/models/payment_data_participant.py +101 -0
  129. pluggy_sdk/models/payment_institution.py +101 -0
  130. pluggy_sdk/models/payment_intent.py +145 -0
  131. pluggy_sdk/models/payment_intents_list200_response.py +102 -0
  132. pluggy_sdk/models/payment_recipient.py +106 -0
  133. pluggy_sdk/models/payment_recipient_account.py +99 -0
  134. pluggy_sdk/models/payment_recipients_institution_list200_response.py +102 -0
  135. pluggy_sdk/models/payment_recipients_list200_response.py +102 -0
  136. pluggy_sdk/models/payment_request.py +118 -0
  137. pluggy_sdk/models/payment_request_callback_urls.py +92 -0
  138. pluggy_sdk/models/payment_requests_list200_response.py +102 -0
  139. pluggy_sdk/models/percentage_over_index.py +90 -0
  140. pluggy_sdk/models/phone_number.py +100 -0
  141. pluggy_sdk/models/pix_data.py +90 -0
  142. pluggy_sdk/models/smart_account.py +107 -0
  143. pluggy_sdk/models/smart_account_address.py +112 -0
  144. pluggy_sdk/models/smart_account_balance.py +95 -0
  145. pluggy_sdk/models/smart_accounts_list200_response.py +102 -0
  146. pluggy_sdk/models/status_detail.py +142 -0
  147. pluggy_sdk/models/status_detail_product.py +101 -0
  148. pluggy_sdk/models/status_detail_product_warning.py +92 -0
  149. pluggy_sdk/models/transaction.py +145 -0
  150. pluggy_sdk/models/update_item.py +109 -0
  151. pluggy_sdk/models/update_item_parameters.py +144 -0
  152. pluggy_sdk/models/update_payment_recipient.py +100 -0
  153. pluggy_sdk/models/update_payment_request.py +102 -0
  154. pluggy_sdk/models/update_transaction.py +88 -0
  155. pluggy_sdk/models/webhook.py +106 -0
  156. pluggy_sdk/models/webhook_creation_error_response.py +90 -0
  157. pluggy_sdk/models/webhooks_list200_response.py +102 -0
  158. pluggy_sdk/py.typed +0 -0
  159. pluggy_sdk/rest.py +258 -0
  160. pluggy_sdk-1.0.0.post2.dist-info/METADATA +336 -0
  161. pluggy_sdk-1.0.0.post2.dist-info/RECORD +163 -0
  162. pluggy_sdk-1.0.0.post2.dist-info/WHEEL +5 -0
  163. pluggy_sdk-1.0.0.post2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,954 @@
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 datetime import datetime
21
+ from pydantic import Field, StrictFloat, StrictInt, StrictStr
22
+ from typing import Optional, Union
23
+ from typing_extensions import Annotated
24
+ from pluggy_sdk.models.page_response_transactions import PageResponseTransactions
25
+ from pluggy_sdk.models.transaction import Transaction
26
+ from pluggy_sdk.models.update_transaction import UpdateTransaction
27
+
28
+ from pluggy_sdk.api_client import ApiClient, RequestSerialized
29
+ from pluggy_sdk.api_response import ApiResponse
30
+ from pluggy_sdk.rest import RESTResponseType
31
+
32
+
33
+ class TransactionApi:
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None) -> None:
41
+ if api_client is None:
42
+ api_client = ApiClient.get_default()
43
+ self.api_client = api_client
44
+
45
+
46
+ @validate_call
47
+ def transactions_list(
48
+ self,
49
+ account_id: Annotated[StrictStr, Field(description="Account primary identifier")],
50
+ var_from: Annotated[Optional[datetime], Field(description="Filter greater than date. Format (yyyy-mm-dd)")] = None,
51
+ to: Annotated[Optional[datetime], Field(description="Filter lower than date. Format (yyyy-mm-dd)")] = None,
52
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
53
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
54
+ _request_timeout: Union[
55
+ None,
56
+ Annotated[StrictFloat, Field(gt=0)],
57
+ Tuple[
58
+ Annotated[StrictFloat, Field(gt=0)],
59
+ Annotated[StrictFloat, Field(gt=0)]
60
+ ]
61
+ ] = None,
62
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
63
+ _content_type: Optional[StrictStr] = None,
64
+ _headers: Optional[Dict[StrictStr, Any]] = None,
65
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
66
+ ) -> PageResponseTransactions:
67
+ """List
68
+
69
+ Recovers all transactions collected for the acount provided
70
+
71
+ :param account_id: Account primary identifier (required)
72
+ :type account_id: str
73
+ :param var_from: Filter greater than date. Format (yyyy-mm-dd)
74
+ :type var_from: datetime
75
+ :param to: Filter lower than date. Format (yyyy-mm-dd)
76
+ :type to: datetime
77
+ :param page_size: Page size for the paging request, default: 20
78
+ :type page_size: float
79
+ :param page: Page number for the paging request, default: 1
80
+ :type page: float
81
+ :param _request_timeout: timeout setting for this request. If one
82
+ number provided, it will be total request
83
+ timeout. It can also be a pair (tuple) of
84
+ (connection, read) timeouts.
85
+ :type _request_timeout: int, tuple(int, int), optional
86
+ :param _request_auth: set to override the auth_settings for an a single
87
+ request; this effectively ignores the
88
+ authentication in the spec for a single request.
89
+ :type _request_auth: dict, optional
90
+ :param _content_type: force content-type for the request.
91
+ :type _content_type: str, Optional
92
+ :param _headers: set to override the headers for a single
93
+ request; this effectively ignores the headers
94
+ in the spec for a single request.
95
+ :type _headers: dict, optional
96
+ :param _host_index: set to override the host_index for a single
97
+ request; this effectively ignores the host_index
98
+ in the spec for a single request.
99
+ :type _host_index: int, optional
100
+ :return: Returns the result object.
101
+ """ # noqa: E501
102
+
103
+ _param = self._transactions_list_serialize(
104
+ account_id=account_id,
105
+ var_from=var_from,
106
+ to=to,
107
+ page_size=page_size,
108
+ page=page,
109
+ _request_auth=_request_auth,
110
+ _content_type=_content_type,
111
+ _headers=_headers,
112
+ _host_index=_host_index
113
+ )
114
+
115
+ _response_types_map: Dict[str, Optional[str]] = {
116
+ '200': "PageResponseTransactions",
117
+ '400': "GlobalErrorResponse",
118
+ '500': "GlobalErrorResponse",
119
+ }
120
+ response_data = self.api_client.call_api(
121
+ *_param,
122
+ _request_timeout=_request_timeout
123
+ )
124
+ response_data.read()
125
+ return self.api_client.response_deserialize(
126
+ response_data=response_data,
127
+ response_types_map=_response_types_map,
128
+ ).data
129
+
130
+
131
+ @validate_call
132
+ def transactions_list_with_http_info(
133
+ self,
134
+ account_id: Annotated[StrictStr, Field(description="Account primary identifier")],
135
+ var_from: Annotated[Optional[datetime], Field(description="Filter greater than date. Format (yyyy-mm-dd)")] = None,
136
+ to: Annotated[Optional[datetime], Field(description="Filter lower than date. Format (yyyy-mm-dd)")] = None,
137
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
138
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
139
+ _request_timeout: Union[
140
+ None,
141
+ Annotated[StrictFloat, Field(gt=0)],
142
+ Tuple[
143
+ Annotated[StrictFloat, Field(gt=0)],
144
+ Annotated[StrictFloat, Field(gt=0)]
145
+ ]
146
+ ] = None,
147
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
148
+ _content_type: Optional[StrictStr] = None,
149
+ _headers: Optional[Dict[StrictStr, Any]] = None,
150
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
151
+ ) -> ApiResponse[PageResponseTransactions]:
152
+ """List
153
+
154
+ Recovers all transactions collected for the acount provided
155
+
156
+ :param account_id: Account primary identifier (required)
157
+ :type account_id: str
158
+ :param var_from: Filter greater than date. Format (yyyy-mm-dd)
159
+ :type var_from: datetime
160
+ :param to: Filter lower than date. Format (yyyy-mm-dd)
161
+ :type to: datetime
162
+ :param page_size: Page size for the paging request, default: 20
163
+ :type page_size: float
164
+ :param page: Page number for the paging request, default: 1
165
+ :type page: float
166
+ :param _request_timeout: timeout setting for this request. If one
167
+ number provided, it will be total request
168
+ timeout. It can also be a pair (tuple) of
169
+ (connection, read) timeouts.
170
+ :type _request_timeout: int, tuple(int, int), optional
171
+ :param _request_auth: set to override the auth_settings for an a single
172
+ request; this effectively ignores the
173
+ authentication in the spec for a single request.
174
+ :type _request_auth: dict, optional
175
+ :param _content_type: force content-type for the request.
176
+ :type _content_type: str, Optional
177
+ :param _headers: set to override the headers for a single
178
+ request; this effectively ignores the headers
179
+ in the spec for a single request.
180
+ :type _headers: dict, optional
181
+ :param _host_index: set to override the host_index for a single
182
+ request; this effectively ignores the host_index
183
+ in the spec for a single request.
184
+ :type _host_index: int, optional
185
+ :return: Returns the result object.
186
+ """ # noqa: E501
187
+
188
+ _param = self._transactions_list_serialize(
189
+ account_id=account_id,
190
+ var_from=var_from,
191
+ to=to,
192
+ page_size=page_size,
193
+ page=page,
194
+ _request_auth=_request_auth,
195
+ _content_type=_content_type,
196
+ _headers=_headers,
197
+ _host_index=_host_index
198
+ )
199
+
200
+ _response_types_map: Dict[str, Optional[str]] = {
201
+ '200': "PageResponseTransactions",
202
+ '400': "GlobalErrorResponse",
203
+ '500': "GlobalErrorResponse",
204
+ }
205
+ response_data = self.api_client.call_api(
206
+ *_param,
207
+ _request_timeout=_request_timeout
208
+ )
209
+ response_data.read()
210
+ return self.api_client.response_deserialize(
211
+ response_data=response_data,
212
+ response_types_map=_response_types_map,
213
+ )
214
+
215
+
216
+ @validate_call
217
+ def transactions_list_without_preload_content(
218
+ self,
219
+ account_id: Annotated[StrictStr, Field(description="Account primary identifier")],
220
+ var_from: Annotated[Optional[datetime], Field(description="Filter greater than date. Format (yyyy-mm-dd)")] = None,
221
+ to: Annotated[Optional[datetime], Field(description="Filter lower than date. Format (yyyy-mm-dd)")] = None,
222
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
223
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
224
+ _request_timeout: Union[
225
+ None,
226
+ Annotated[StrictFloat, Field(gt=0)],
227
+ Tuple[
228
+ Annotated[StrictFloat, Field(gt=0)],
229
+ Annotated[StrictFloat, Field(gt=0)]
230
+ ]
231
+ ] = None,
232
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
233
+ _content_type: Optional[StrictStr] = None,
234
+ _headers: Optional[Dict[StrictStr, Any]] = None,
235
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
236
+ ) -> RESTResponseType:
237
+ """List
238
+
239
+ Recovers all transactions collected for the acount provided
240
+
241
+ :param account_id: Account primary identifier (required)
242
+ :type account_id: str
243
+ :param var_from: Filter greater than date. Format (yyyy-mm-dd)
244
+ :type var_from: datetime
245
+ :param to: Filter lower than date. Format (yyyy-mm-dd)
246
+ :type to: datetime
247
+ :param page_size: Page size for the paging request, default: 20
248
+ :type page_size: float
249
+ :param page: Page number for the paging request, default: 1
250
+ :type page: float
251
+ :param _request_timeout: timeout setting for this request. If one
252
+ number provided, it will be total request
253
+ timeout. It can also be a pair (tuple) of
254
+ (connection, read) timeouts.
255
+ :type _request_timeout: int, tuple(int, int), optional
256
+ :param _request_auth: set to override the auth_settings for an a single
257
+ request; this effectively ignores the
258
+ authentication in the spec for a single request.
259
+ :type _request_auth: dict, optional
260
+ :param _content_type: force content-type for the request.
261
+ :type _content_type: str, Optional
262
+ :param _headers: set to override the headers for a single
263
+ request; this effectively ignores the headers
264
+ in the spec for a single request.
265
+ :type _headers: dict, optional
266
+ :param _host_index: set to override the host_index for a single
267
+ request; this effectively ignores the host_index
268
+ in the spec for a single request.
269
+ :type _host_index: int, optional
270
+ :return: Returns the result object.
271
+ """ # noqa: E501
272
+
273
+ _param = self._transactions_list_serialize(
274
+ account_id=account_id,
275
+ var_from=var_from,
276
+ to=to,
277
+ page_size=page_size,
278
+ page=page,
279
+ _request_auth=_request_auth,
280
+ _content_type=_content_type,
281
+ _headers=_headers,
282
+ _host_index=_host_index
283
+ )
284
+
285
+ _response_types_map: Dict[str, Optional[str]] = {
286
+ '200': "PageResponseTransactions",
287
+ '400': "GlobalErrorResponse",
288
+ '500': "GlobalErrorResponse",
289
+ }
290
+ response_data = self.api_client.call_api(
291
+ *_param,
292
+ _request_timeout=_request_timeout
293
+ )
294
+ return response_data.response
295
+
296
+
297
+ def _transactions_list_serialize(
298
+ self,
299
+ account_id,
300
+ var_from,
301
+ to,
302
+ page_size,
303
+ page,
304
+ _request_auth,
305
+ _content_type,
306
+ _headers,
307
+ _host_index,
308
+ ) -> RequestSerialized:
309
+
310
+ _host = None
311
+
312
+ _collection_formats: Dict[str, str] = {
313
+ }
314
+
315
+ _path_params: Dict[str, str] = {}
316
+ _query_params: List[Tuple[str, str]] = []
317
+ _header_params: Dict[str, Optional[str]] = _headers or {}
318
+ _form_params: List[Tuple[str, str]] = []
319
+ _files: Dict[str, Union[str, bytes]] = {}
320
+ _body_params: Optional[bytes] = None
321
+
322
+ # process the path parameters
323
+ # process the query parameters
324
+ if account_id is not None:
325
+
326
+ _query_params.append(('accountId', account_id))
327
+
328
+ if var_from is not None:
329
+ if isinstance(var_from, datetime):
330
+ _query_params.append(
331
+ (
332
+ 'from',
333
+ var_from.strftime(
334
+ self.api_client.configuration.datetime_format
335
+ )
336
+ )
337
+ )
338
+ else:
339
+ _query_params.append(('from', var_from))
340
+
341
+ if to is not None:
342
+ if isinstance(to, datetime):
343
+ _query_params.append(
344
+ (
345
+ 'to',
346
+ to.strftime(
347
+ self.api_client.configuration.datetime_format
348
+ )
349
+ )
350
+ )
351
+ else:
352
+ _query_params.append(('to', to))
353
+
354
+ if page_size is not None:
355
+
356
+ _query_params.append(('pageSize', page_size))
357
+
358
+ if page is not None:
359
+
360
+ _query_params.append(('page', page))
361
+
362
+ # process the header parameters
363
+ # process the form parameters
364
+ # process the body parameter
365
+
366
+
367
+ # set the HTTP header `Accept`
368
+ _header_params['Accept'] = self.api_client.select_header_accept(
369
+ [
370
+ 'application/json'
371
+ ]
372
+ )
373
+
374
+
375
+ # authentication setting
376
+ _auth_settings: List[str] = [
377
+ 'default'
378
+ ]
379
+
380
+ return self.api_client.param_serialize(
381
+ method='GET',
382
+ resource_path='/transactions',
383
+ path_params=_path_params,
384
+ query_params=_query_params,
385
+ header_params=_header_params,
386
+ body=_body_params,
387
+ post_params=_form_params,
388
+ files=_files,
389
+ auth_settings=_auth_settings,
390
+ collection_formats=_collection_formats,
391
+ _host=_host,
392
+ _request_auth=_request_auth
393
+ )
394
+
395
+
396
+
397
+
398
+ @validate_call
399
+ def transactions_retrieve(
400
+ self,
401
+ id: Annotated[StrictStr, Field(description="transaction primary identifier")],
402
+ _request_timeout: Union[
403
+ None,
404
+ Annotated[StrictFloat, Field(gt=0)],
405
+ Tuple[
406
+ Annotated[StrictFloat, Field(gt=0)],
407
+ Annotated[StrictFloat, Field(gt=0)]
408
+ ]
409
+ ] = None,
410
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
411
+ _content_type: Optional[StrictStr] = None,
412
+ _headers: Optional[Dict[StrictStr, Any]] = None,
413
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
414
+ ) -> Transaction:
415
+ """Retrieve
416
+
417
+ Recovers the transaction resource by it's id
418
+
419
+ :param id: transaction primary identifier (required)
420
+ :type id: str
421
+ :param _request_timeout: timeout setting for this request. If one
422
+ number provided, it will be total request
423
+ timeout. It can also be a pair (tuple) of
424
+ (connection, read) timeouts.
425
+ :type _request_timeout: int, tuple(int, int), optional
426
+ :param _request_auth: set to override the auth_settings for an a single
427
+ request; this effectively ignores the
428
+ authentication in the spec for a single request.
429
+ :type _request_auth: dict, optional
430
+ :param _content_type: force content-type for the request.
431
+ :type _content_type: str, Optional
432
+ :param _headers: set to override the headers for a single
433
+ request; this effectively ignores the headers
434
+ in the spec for a single request.
435
+ :type _headers: dict, optional
436
+ :param _host_index: set to override the host_index for a single
437
+ request; this effectively ignores the host_index
438
+ in the spec for a single request.
439
+ :type _host_index: int, optional
440
+ :return: Returns the result object.
441
+ """ # noqa: E501
442
+
443
+ _param = self._transactions_retrieve_serialize(
444
+ id=id,
445
+ _request_auth=_request_auth,
446
+ _content_type=_content_type,
447
+ _headers=_headers,
448
+ _host_index=_host_index
449
+ )
450
+
451
+ _response_types_map: Dict[str, Optional[str]] = {
452
+ '200': "Transaction",
453
+ '404': "GlobalErrorResponse",
454
+ '500': "GlobalErrorResponse",
455
+ }
456
+ response_data = self.api_client.call_api(
457
+ *_param,
458
+ _request_timeout=_request_timeout
459
+ )
460
+ response_data.read()
461
+ return self.api_client.response_deserialize(
462
+ response_data=response_data,
463
+ response_types_map=_response_types_map,
464
+ ).data
465
+
466
+
467
+ @validate_call
468
+ def transactions_retrieve_with_http_info(
469
+ self,
470
+ id: Annotated[StrictStr, Field(description="transaction primary identifier")],
471
+ _request_timeout: Union[
472
+ None,
473
+ Annotated[StrictFloat, Field(gt=0)],
474
+ Tuple[
475
+ Annotated[StrictFloat, Field(gt=0)],
476
+ Annotated[StrictFloat, Field(gt=0)]
477
+ ]
478
+ ] = None,
479
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
480
+ _content_type: Optional[StrictStr] = None,
481
+ _headers: Optional[Dict[StrictStr, Any]] = None,
482
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
483
+ ) -> ApiResponse[Transaction]:
484
+ """Retrieve
485
+
486
+ Recovers the transaction resource by it's id
487
+
488
+ :param id: transaction primary identifier (required)
489
+ :type id: str
490
+ :param _request_timeout: timeout setting for this request. If one
491
+ number provided, it will be total request
492
+ timeout. It can also be a pair (tuple) of
493
+ (connection, read) timeouts.
494
+ :type _request_timeout: int, tuple(int, int), optional
495
+ :param _request_auth: set to override the auth_settings for an a single
496
+ request; this effectively ignores the
497
+ authentication in the spec for a single request.
498
+ :type _request_auth: dict, optional
499
+ :param _content_type: force content-type for the request.
500
+ :type _content_type: str, Optional
501
+ :param _headers: set to override the headers for a single
502
+ request; this effectively ignores the headers
503
+ in the spec for a single request.
504
+ :type _headers: dict, optional
505
+ :param _host_index: set to override the host_index for a single
506
+ request; this effectively ignores the host_index
507
+ in the spec for a single request.
508
+ :type _host_index: int, optional
509
+ :return: Returns the result object.
510
+ """ # noqa: E501
511
+
512
+ _param = self._transactions_retrieve_serialize(
513
+ id=id,
514
+ _request_auth=_request_auth,
515
+ _content_type=_content_type,
516
+ _headers=_headers,
517
+ _host_index=_host_index
518
+ )
519
+
520
+ _response_types_map: Dict[str, Optional[str]] = {
521
+ '200': "Transaction",
522
+ '404': "GlobalErrorResponse",
523
+ '500': "GlobalErrorResponse",
524
+ }
525
+ response_data = self.api_client.call_api(
526
+ *_param,
527
+ _request_timeout=_request_timeout
528
+ )
529
+ response_data.read()
530
+ return self.api_client.response_deserialize(
531
+ response_data=response_data,
532
+ response_types_map=_response_types_map,
533
+ )
534
+
535
+
536
+ @validate_call
537
+ def transactions_retrieve_without_preload_content(
538
+ self,
539
+ id: Annotated[StrictStr, Field(description="transaction primary identifier")],
540
+ _request_timeout: Union[
541
+ None,
542
+ Annotated[StrictFloat, Field(gt=0)],
543
+ Tuple[
544
+ Annotated[StrictFloat, Field(gt=0)],
545
+ Annotated[StrictFloat, Field(gt=0)]
546
+ ]
547
+ ] = None,
548
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
549
+ _content_type: Optional[StrictStr] = None,
550
+ _headers: Optional[Dict[StrictStr, Any]] = None,
551
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
552
+ ) -> RESTResponseType:
553
+ """Retrieve
554
+
555
+ Recovers the transaction resource by it's id
556
+
557
+ :param id: transaction primary identifier (required)
558
+ :type id: str
559
+ :param _request_timeout: timeout setting for this request. If one
560
+ number provided, it will be total request
561
+ timeout. It can also be a pair (tuple) of
562
+ (connection, read) timeouts.
563
+ :type _request_timeout: int, tuple(int, int), optional
564
+ :param _request_auth: set to override the auth_settings for an a single
565
+ request; this effectively ignores the
566
+ authentication in the spec for a single request.
567
+ :type _request_auth: dict, optional
568
+ :param _content_type: force content-type for the request.
569
+ :type _content_type: str, Optional
570
+ :param _headers: set to override the headers for a single
571
+ request; this effectively ignores the headers
572
+ in the spec for a single request.
573
+ :type _headers: dict, optional
574
+ :param _host_index: set to override the host_index for a single
575
+ request; this effectively ignores the host_index
576
+ in the spec for a single request.
577
+ :type _host_index: int, optional
578
+ :return: Returns the result object.
579
+ """ # noqa: E501
580
+
581
+ _param = self._transactions_retrieve_serialize(
582
+ id=id,
583
+ _request_auth=_request_auth,
584
+ _content_type=_content_type,
585
+ _headers=_headers,
586
+ _host_index=_host_index
587
+ )
588
+
589
+ _response_types_map: Dict[str, Optional[str]] = {
590
+ '200': "Transaction",
591
+ '404': "GlobalErrorResponse",
592
+ '500': "GlobalErrorResponse",
593
+ }
594
+ response_data = self.api_client.call_api(
595
+ *_param,
596
+ _request_timeout=_request_timeout
597
+ )
598
+ return response_data.response
599
+
600
+
601
+ def _transactions_retrieve_serialize(
602
+ self,
603
+ id,
604
+ _request_auth,
605
+ _content_type,
606
+ _headers,
607
+ _host_index,
608
+ ) -> RequestSerialized:
609
+
610
+ _host = None
611
+
612
+ _collection_formats: Dict[str, str] = {
613
+ }
614
+
615
+ _path_params: Dict[str, str] = {}
616
+ _query_params: List[Tuple[str, str]] = []
617
+ _header_params: Dict[str, Optional[str]] = _headers or {}
618
+ _form_params: List[Tuple[str, str]] = []
619
+ _files: Dict[str, Union[str, bytes]] = {}
620
+ _body_params: Optional[bytes] = None
621
+
622
+ # process the path parameters
623
+ if id is not None:
624
+ _path_params['id'] = id
625
+ # process the query parameters
626
+ # process the header parameters
627
+ # process the form parameters
628
+ # process the body parameter
629
+
630
+
631
+ # set the HTTP header `Accept`
632
+ _header_params['Accept'] = self.api_client.select_header_accept(
633
+ [
634
+ 'application/json'
635
+ ]
636
+ )
637
+
638
+
639
+ # authentication setting
640
+ _auth_settings: List[str] = [
641
+ 'default'
642
+ ]
643
+
644
+ return self.api_client.param_serialize(
645
+ method='GET',
646
+ resource_path='/transactions/{id}',
647
+ path_params=_path_params,
648
+ query_params=_query_params,
649
+ header_params=_header_params,
650
+ body=_body_params,
651
+ post_params=_form_params,
652
+ files=_files,
653
+ auth_settings=_auth_settings,
654
+ collection_formats=_collection_formats,
655
+ _host=_host,
656
+ _request_auth=_request_auth
657
+ )
658
+
659
+
660
+
661
+
662
+ @validate_call
663
+ def transactions_update(
664
+ self,
665
+ id: Annotated[StrictStr, Field(description="transaction primary identifier")],
666
+ update_transaction: Annotated[UpdateTransaction, Field(description="New category identifier")],
667
+ _request_timeout: Union[
668
+ None,
669
+ Annotated[StrictFloat, Field(gt=0)],
670
+ Tuple[
671
+ Annotated[StrictFloat, Field(gt=0)],
672
+ Annotated[StrictFloat, Field(gt=0)]
673
+ ]
674
+ ] = None,
675
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
676
+ _content_type: Optional[StrictStr] = None,
677
+ _headers: Optional[Dict[StrictStr, Any]] = None,
678
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
679
+ ) -> Transaction:
680
+ """Update
681
+
682
+ Update the transaction's category by it's id
683
+
684
+ :param id: transaction primary identifier (required)
685
+ :type id: str
686
+ :param update_transaction: New category identifier (required)
687
+ :type update_transaction: UpdateTransaction
688
+ :param _request_timeout: timeout setting for this request. If one
689
+ number provided, it will be total request
690
+ timeout. It can also be a pair (tuple) of
691
+ (connection, read) timeouts.
692
+ :type _request_timeout: int, tuple(int, int), optional
693
+ :param _request_auth: set to override the auth_settings for an a single
694
+ request; this effectively ignores the
695
+ authentication in the spec for a single request.
696
+ :type _request_auth: dict, optional
697
+ :param _content_type: force content-type for the request.
698
+ :type _content_type: str, Optional
699
+ :param _headers: set to override the headers for a single
700
+ request; this effectively ignores the headers
701
+ in the spec for a single request.
702
+ :type _headers: dict, optional
703
+ :param _host_index: set to override the host_index for a single
704
+ request; this effectively ignores the host_index
705
+ in the spec for a single request.
706
+ :type _host_index: int, optional
707
+ :return: Returns the result object.
708
+ """ # noqa: E501
709
+
710
+ _param = self._transactions_update_serialize(
711
+ id=id,
712
+ update_transaction=update_transaction,
713
+ _request_auth=_request_auth,
714
+ _content_type=_content_type,
715
+ _headers=_headers,
716
+ _host_index=_host_index
717
+ )
718
+
719
+ _response_types_map: Dict[str, Optional[str]] = {
720
+ '200': "Transaction",
721
+ '400': "GlobalErrorResponse",
722
+ '404': "GlobalErrorResponse",
723
+ '500': "GlobalErrorResponse",
724
+ }
725
+ response_data = self.api_client.call_api(
726
+ *_param,
727
+ _request_timeout=_request_timeout
728
+ )
729
+ response_data.read()
730
+ return self.api_client.response_deserialize(
731
+ response_data=response_data,
732
+ response_types_map=_response_types_map,
733
+ ).data
734
+
735
+
736
+ @validate_call
737
+ def transactions_update_with_http_info(
738
+ self,
739
+ id: Annotated[StrictStr, Field(description="transaction primary identifier")],
740
+ update_transaction: Annotated[UpdateTransaction, Field(description="New category identifier")],
741
+ _request_timeout: Union[
742
+ None,
743
+ Annotated[StrictFloat, Field(gt=0)],
744
+ Tuple[
745
+ Annotated[StrictFloat, Field(gt=0)],
746
+ Annotated[StrictFloat, Field(gt=0)]
747
+ ]
748
+ ] = None,
749
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
750
+ _content_type: Optional[StrictStr] = None,
751
+ _headers: Optional[Dict[StrictStr, Any]] = None,
752
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
753
+ ) -> ApiResponse[Transaction]:
754
+ """Update
755
+
756
+ Update the transaction's category by it's id
757
+
758
+ :param id: transaction primary identifier (required)
759
+ :type id: str
760
+ :param update_transaction: New category identifier (required)
761
+ :type update_transaction: UpdateTransaction
762
+ :param _request_timeout: timeout setting for this request. If one
763
+ number provided, it will be total request
764
+ timeout. It can also be a pair (tuple) of
765
+ (connection, read) timeouts.
766
+ :type _request_timeout: int, tuple(int, int), optional
767
+ :param _request_auth: set to override the auth_settings for an a single
768
+ request; this effectively ignores the
769
+ authentication in the spec for a single request.
770
+ :type _request_auth: dict, optional
771
+ :param _content_type: force content-type for the request.
772
+ :type _content_type: str, Optional
773
+ :param _headers: set to override the headers for a single
774
+ request; this effectively ignores the headers
775
+ in the spec for a single request.
776
+ :type _headers: dict, optional
777
+ :param _host_index: set to override the host_index for a single
778
+ request; this effectively ignores the host_index
779
+ in the spec for a single request.
780
+ :type _host_index: int, optional
781
+ :return: Returns the result object.
782
+ """ # noqa: E501
783
+
784
+ _param = self._transactions_update_serialize(
785
+ id=id,
786
+ update_transaction=update_transaction,
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': "Transaction",
795
+ '400': "GlobalErrorResponse",
796
+ '404': "GlobalErrorResponse",
797
+ '500': "GlobalErrorResponse",
798
+ }
799
+ response_data = self.api_client.call_api(
800
+ *_param,
801
+ _request_timeout=_request_timeout
802
+ )
803
+ response_data.read()
804
+ return self.api_client.response_deserialize(
805
+ response_data=response_data,
806
+ response_types_map=_response_types_map,
807
+ )
808
+
809
+
810
+ @validate_call
811
+ def transactions_update_without_preload_content(
812
+ self,
813
+ id: Annotated[StrictStr, Field(description="transaction primary identifier")],
814
+ update_transaction: Annotated[UpdateTransaction, Field(description="New category identifier")],
815
+ _request_timeout: Union[
816
+ None,
817
+ Annotated[StrictFloat, Field(gt=0)],
818
+ Tuple[
819
+ Annotated[StrictFloat, Field(gt=0)],
820
+ Annotated[StrictFloat, Field(gt=0)]
821
+ ]
822
+ ] = None,
823
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
824
+ _content_type: Optional[StrictStr] = None,
825
+ _headers: Optional[Dict[StrictStr, Any]] = None,
826
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
827
+ ) -> RESTResponseType:
828
+ """Update
829
+
830
+ Update the transaction's category by it's id
831
+
832
+ :param id: transaction primary identifier (required)
833
+ :type id: str
834
+ :param update_transaction: New category identifier (required)
835
+ :type update_transaction: UpdateTransaction
836
+ :param _request_timeout: timeout setting for this request. If one
837
+ number provided, it will be total request
838
+ timeout. It can also be a pair (tuple) of
839
+ (connection, read) timeouts.
840
+ :type _request_timeout: int, tuple(int, int), optional
841
+ :param _request_auth: set to override the auth_settings for an a single
842
+ request; this effectively ignores the
843
+ authentication in the spec for a single request.
844
+ :type _request_auth: dict, optional
845
+ :param _content_type: force content-type for the request.
846
+ :type _content_type: str, Optional
847
+ :param _headers: set to override the headers for a single
848
+ request; this effectively ignores the headers
849
+ in the spec for a single request.
850
+ :type _headers: dict, optional
851
+ :param _host_index: set to override the host_index for a single
852
+ request; this effectively ignores the host_index
853
+ in the spec for a single request.
854
+ :type _host_index: int, optional
855
+ :return: Returns the result object.
856
+ """ # noqa: E501
857
+
858
+ _param = self._transactions_update_serialize(
859
+ id=id,
860
+ update_transaction=update_transaction,
861
+ _request_auth=_request_auth,
862
+ _content_type=_content_type,
863
+ _headers=_headers,
864
+ _host_index=_host_index
865
+ )
866
+
867
+ _response_types_map: Dict[str, Optional[str]] = {
868
+ '200': "Transaction",
869
+ '400': "GlobalErrorResponse",
870
+ '404': "GlobalErrorResponse",
871
+ '500': "GlobalErrorResponse",
872
+ }
873
+ response_data = self.api_client.call_api(
874
+ *_param,
875
+ _request_timeout=_request_timeout
876
+ )
877
+ return response_data.response
878
+
879
+
880
+ def _transactions_update_serialize(
881
+ self,
882
+ id,
883
+ update_transaction,
884
+ _request_auth,
885
+ _content_type,
886
+ _headers,
887
+ _host_index,
888
+ ) -> RequestSerialized:
889
+
890
+ _host = None
891
+
892
+ _collection_formats: Dict[str, str] = {
893
+ }
894
+
895
+ _path_params: Dict[str, str] = {}
896
+ _query_params: List[Tuple[str, str]] = []
897
+ _header_params: Dict[str, Optional[str]] = _headers or {}
898
+ _form_params: List[Tuple[str, str]] = []
899
+ _files: Dict[str, Union[str, bytes]] = {}
900
+ _body_params: Optional[bytes] = None
901
+
902
+ # process the path parameters
903
+ if id is not None:
904
+ _path_params['id'] = id
905
+ # process the query parameters
906
+ # process the header parameters
907
+ # process the form parameters
908
+ # process the body parameter
909
+ if update_transaction is not None:
910
+ _body_params = update_transaction
911
+
912
+
913
+ # set the HTTP header `Accept`
914
+ _header_params['Accept'] = self.api_client.select_header_accept(
915
+ [
916
+ 'application/json'
917
+ ]
918
+ )
919
+
920
+ # set the HTTP header `Content-Type`
921
+ if _content_type:
922
+ _header_params['Content-Type'] = _content_type
923
+ else:
924
+ _default_content_type = (
925
+ self.api_client.select_header_content_type(
926
+ [
927
+ 'application/json'
928
+ ]
929
+ )
930
+ )
931
+ if _default_content_type is not None:
932
+ _header_params['Content-Type'] = _default_content_type
933
+
934
+ # authentication setting
935
+ _auth_settings: List[str] = [
936
+ 'default'
937
+ ]
938
+
939
+ return self.api_client.param_serialize(
940
+ method='PATCH',
941
+ resource_path='/transactions/{id}',
942
+ path_params=_path_params,
943
+ query_params=_query_params,
944
+ header_params=_header_params,
945
+ body=_body_params,
946
+ post_params=_form_params,
947
+ files=_files,
948
+ auth_settings=_auth_settings,
949
+ collection_formats=_collection_formats,
950
+ _host=_host,
951
+ _request_auth=_request_auth
952
+ )
953
+
954
+