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,909 @@
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, field_validator
21
+ from typing import Optional, Union
22
+ from typing_extensions import Annotated
23
+ from pluggy_sdk.models.investment import Investment
24
+ from pluggy_sdk.models.investments_list200_response import InvestmentsList200Response
25
+ from pluggy_sdk.models.page_response_investment_transactions import PageResponseInvestmentTransactions
26
+
27
+ from pluggy_sdk.api_client import ApiClient, RequestSerialized
28
+ from pluggy_sdk.api_response import ApiResponse
29
+ from pluggy_sdk.rest import RESTResponseType
30
+
31
+
32
+ class InvestmentApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+
45
+ @validate_call
46
+ def investment_transactions_list(
47
+ self,
48
+ id: Annotated[StrictStr, Field(description="Investment primary identifier")],
49
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
50
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
51
+ _request_timeout: Union[
52
+ None,
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Tuple[
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Annotated[StrictFloat, Field(gt=0)]
57
+ ]
58
+ ] = None,
59
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
60
+ _content_type: Optional[StrictStr] = None,
61
+ _headers: Optional[Dict[StrictStr, Any]] = None,
62
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
63
+ ) -> PageResponseInvestmentTransactions:
64
+ """List investment transactions
65
+
66
+ Recovers all investment transactions for the investment provided
67
+
68
+ :param id: Investment primary identifier (required)
69
+ :type id: str
70
+ :param page_size: Page size for the paging request, default: 20
71
+ :type page_size: float
72
+ :param page: Page number for the paging request, default: 1
73
+ :type page: float
74
+ :param _request_timeout: timeout setting for this request. If one
75
+ number provided, it will be total request
76
+ timeout. It can also be a pair (tuple) of
77
+ (connection, read) timeouts.
78
+ :type _request_timeout: int, tuple(int, int), optional
79
+ :param _request_auth: set to override the auth_settings for an a single
80
+ request; this effectively ignores the
81
+ authentication in the spec for a single request.
82
+ :type _request_auth: dict, optional
83
+ :param _content_type: force content-type for the request.
84
+ :type _content_type: str, Optional
85
+ :param _headers: set to override the headers for a single
86
+ request; this effectively ignores the headers
87
+ in the spec for a single request.
88
+ :type _headers: dict, optional
89
+ :param _host_index: set to override the host_index for a single
90
+ request; this effectively ignores the host_index
91
+ in the spec for a single request.
92
+ :type _host_index: int, optional
93
+ :return: Returns the result object.
94
+ """ # noqa: E501
95
+
96
+ _param = self._investment_transactions_list_serialize(
97
+ id=id,
98
+ page_size=page_size,
99
+ page=page,
100
+ _request_auth=_request_auth,
101
+ _content_type=_content_type,
102
+ _headers=_headers,
103
+ _host_index=_host_index
104
+ )
105
+
106
+ _response_types_map: Dict[str, Optional[str]] = {
107
+ '200': "PageResponseInvestmentTransactions",
108
+ '500': "GlobalErrorResponse",
109
+ }
110
+ response_data = self.api_client.call_api(
111
+ *_param,
112
+ _request_timeout=_request_timeout
113
+ )
114
+ response_data.read()
115
+ return self.api_client.response_deserialize(
116
+ response_data=response_data,
117
+ response_types_map=_response_types_map,
118
+ ).data
119
+
120
+
121
+ @validate_call
122
+ def investment_transactions_list_with_http_info(
123
+ self,
124
+ id: Annotated[StrictStr, Field(description="Investment primary identifier")],
125
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
126
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
127
+ _request_timeout: Union[
128
+ None,
129
+ Annotated[StrictFloat, Field(gt=0)],
130
+ Tuple[
131
+ Annotated[StrictFloat, Field(gt=0)],
132
+ Annotated[StrictFloat, Field(gt=0)]
133
+ ]
134
+ ] = None,
135
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
136
+ _content_type: Optional[StrictStr] = None,
137
+ _headers: Optional[Dict[StrictStr, Any]] = None,
138
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
139
+ ) -> ApiResponse[PageResponseInvestmentTransactions]:
140
+ """List investment transactions
141
+
142
+ Recovers all investment transactions for the investment provided
143
+
144
+ :param id: Investment primary identifier (required)
145
+ :type id: str
146
+ :param page_size: Page size for the paging request, default: 20
147
+ :type page_size: float
148
+ :param page: Page number for the paging request, default: 1
149
+ :type page: float
150
+ :param _request_timeout: timeout setting for this request. If one
151
+ number provided, it will be total request
152
+ timeout. It can also be a pair (tuple) of
153
+ (connection, read) timeouts.
154
+ :type _request_timeout: int, tuple(int, int), optional
155
+ :param _request_auth: set to override the auth_settings for an a single
156
+ request; this effectively ignores the
157
+ authentication in the spec for a single request.
158
+ :type _request_auth: dict, optional
159
+ :param _content_type: force content-type for the request.
160
+ :type _content_type: str, Optional
161
+ :param _headers: set to override the headers for a single
162
+ request; this effectively ignores the headers
163
+ in the spec for a single request.
164
+ :type _headers: dict, optional
165
+ :param _host_index: set to override the host_index for a single
166
+ request; this effectively ignores the host_index
167
+ in the spec for a single request.
168
+ :type _host_index: int, optional
169
+ :return: Returns the result object.
170
+ """ # noqa: E501
171
+
172
+ _param = self._investment_transactions_list_serialize(
173
+ id=id,
174
+ page_size=page_size,
175
+ page=page,
176
+ _request_auth=_request_auth,
177
+ _content_type=_content_type,
178
+ _headers=_headers,
179
+ _host_index=_host_index
180
+ )
181
+
182
+ _response_types_map: Dict[str, Optional[str]] = {
183
+ '200': "PageResponseInvestmentTransactions",
184
+ '500': "GlobalErrorResponse",
185
+ }
186
+ response_data = self.api_client.call_api(
187
+ *_param,
188
+ _request_timeout=_request_timeout
189
+ )
190
+ response_data.read()
191
+ return self.api_client.response_deserialize(
192
+ response_data=response_data,
193
+ response_types_map=_response_types_map,
194
+ )
195
+
196
+
197
+ @validate_call
198
+ def investment_transactions_list_without_preload_content(
199
+ self,
200
+ id: Annotated[StrictStr, Field(description="Investment primary identifier")],
201
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
202
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
203
+ _request_timeout: Union[
204
+ None,
205
+ Annotated[StrictFloat, Field(gt=0)],
206
+ Tuple[
207
+ Annotated[StrictFloat, Field(gt=0)],
208
+ Annotated[StrictFloat, Field(gt=0)]
209
+ ]
210
+ ] = None,
211
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
212
+ _content_type: Optional[StrictStr] = None,
213
+ _headers: Optional[Dict[StrictStr, Any]] = None,
214
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
215
+ ) -> RESTResponseType:
216
+ """List investment transactions
217
+
218
+ Recovers all investment transactions for the investment provided
219
+
220
+ :param id: Investment primary identifier (required)
221
+ :type id: str
222
+ :param page_size: Page size for the paging request, default: 20
223
+ :type page_size: float
224
+ :param page: Page number for the paging request, default: 1
225
+ :type page: float
226
+ :param _request_timeout: timeout setting for this request. If one
227
+ number provided, it will be total request
228
+ timeout. It can also be a pair (tuple) of
229
+ (connection, read) timeouts.
230
+ :type _request_timeout: int, tuple(int, int), optional
231
+ :param _request_auth: set to override the auth_settings for an a single
232
+ request; this effectively ignores the
233
+ authentication in the spec for a single request.
234
+ :type _request_auth: dict, optional
235
+ :param _content_type: force content-type for the request.
236
+ :type _content_type: str, Optional
237
+ :param _headers: set to override the headers for a single
238
+ request; this effectively ignores the headers
239
+ in the spec for a single request.
240
+ :type _headers: dict, optional
241
+ :param _host_index: set to override the host_index for a single
242
+ request; this effectively ignores the host_index
243
+ in the spec for a single request.
244
+ :type _host_index: int, optional
245
+ :return: Returns the result object.
246
+ """ # noqa: E501
247
+
248
+ _param = self._investment_transactions_list_serialize(
249
+ id=id,
250
+ page_size=page_size,
251
+ page=page,
252
+ _request_auth=_request_auth,
253
+ _content_type=_content_type,
254
+ _headers=_headers,
255
+ _host_index=_host_index
256
+ )
257
+
258
+ _response_types_map: Dict[str, Optional[str]] = {
259
+ '200': "PageResponseInvestmentTransactions",
260
+ '500': "GlobalErrorResponse",
261
+ }
262
+ response_data = self.api_client.call_api(
263
+ *_param,
264
+ _request_timeout=_request_timeout
265
+ )
266
+ return response_data.response
267
+
268
+
269
+ def _investment_transactions_list_serialize(
270
+ self,
271
+ id,
272
+ page_size,
273
+ page,
274
+ _request_auth,
275
+ _content_type,
276
+ _headers,
277
+ _host_index,
278
+ ) -> RequestSerialized:
279
+
280
+ _host = None
281
+
282
+ _collection_formats: Dict[str, str] = {
283
+ }
284
+
285
+ _path_params: Dict[str, str] = {}
286
+ _query_params: List[Tuple[str, str]] = []
287
+ _header_params: Dict[str, Optional[str]] = _headers or {}
288
+ _form_params: List[Tuple[str, str]] = []
289
+ _files: Dict[str, Union[str, bytes]] = {}
290
+ _body_params: Optional[bytes] = None
291
+
292
+ # process the path parameters
293
+ if id is not None:
294
+ _path_params['id'] = id
295
+ # process the query parameters
296
+ if page_size is not None:
297
+
298
+ _query_params.append(('pageSize', page_size))
299
+
300
+ if page is not None:
301
+
302
+ _query_params.append(('page', page))
303
+
304
+ # process the header parameters
305
+ # process the form parameters
306
+ # process the body parameter
307
+
308
+
309
+ # set the HTTP header `Accept`
310
+ _header_params['Accept'] = self.api_client.select_header_accept(
311
+ [
312
+ 'application/json'
313
+ ]
314
+ )
315
+
316
+
317
+ # authentication setting
318
+ _auth_settings: List[str] = [
319
+ 'default'
320
+ ]
321
+
322
+ return self.api_client.param_serialize(
323
+ method='GET',
324
+ resource_path='/investments/{id}/transactions',
325
+ path_params=_path_params,
326
+ query_params=_query_params,
327
+ header_params=_header_params,
328
+ body=_body_params,
329
+ post_params=_form_params,
330
+ files=_files,
331
+ auth_settings=_auth_settings,
332
+ collection_formats=_collection_formats,
333
+ _host=_host,
334
+ _request_auth=_request_auth
335
+ )
336
+
337
+
338
+
339
+
340
+ @validate_call
341
+ def investments_list(
342
+ self,
343
+ item_id: Annotated[StrictStr, Field(description="Item's primary identifier")],
344
+ type: Annotated[Optional[StrictStr], Field(description="Investment's type to filter")] = None,
345
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 500")] = None,
346
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
347
+ _request_timeout: Union[
348
+ None,
349
+ Annotated[StrictFloat, Field(gt=0)],
350
+ Tuple[
351
+ Annotated[StrictFloat, Field(gt=0)],
352
+ Annotated[StrictFloat, Field(gt=0)]
353
+ ]
354
+ ] = None,
355
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
356
+ _content_type: Optional[StrictStr] = None,
357
+ _headers: Optional[Dict[StrictStr, Any]] = None,
358
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
359
+ ) -> InvestmentsList200Response:
360
+ """List
361
+
362
+ Recovers all investments collected for the item provided
363
+
364
+ :param item_id: Item's primary identifier (required)
365
+ :type item_id: str
366
+ :param type: Investment's type to filter
367
+ :type type: str
368
+ :param page_size: Page size for the paging request, default: 500
369
+ :type page_size: float
370
+ :param page: Page number for the paging request, default: 1
371
+ :type page: float
372
+ :param _request_timeout: timeout setting for this request. If one
373
+ number provided, it will be total request
374
+ timeout. It can also be a pair (tuple) of
375
+ (connection, read) timeouts.
376
+ :type _request_timeout: int, tuple(int, int), optional
377
+ :param _request_auth: set to override the auth_settings for an a single
378
+ request; this effectively ignores the
379
+ authentication in the spec for a single request.
380
+ :type _request_auth: dict, optional
381
+ :param _content_type: force content-type for the request.
382
+ :type _content_type: str, Optional
383
+ :param _headers: set to override the headers for a single
384
+ request; this effectively ignores the headers
385
+ in the spec for a single request.
386
+ :type _headers: dict, optional
387
+ :param _host_index: set to override the host_index for a single
388
+ request; this effectively ignores the host_index
389
+ in the spec for a single request.
390
+ :type _host_index: int, optional
391
+ :return: Returns the result object.
392
+ """ # noqa: E501
393
+
394
+ _param = self._investments_list_serialize(
395
+ item_id=item_id,
396
+ type=type,
397
+ page_size=page_size,
398
+ page=page,
399
+ _request_auth=_request_auth,
400
+ _content_type=_content_type,
401
+ _headers=_headers,
402
+ _host_index=_host_index
403
+ )
404
+
405
+ _response_types_map: Dict[str, Optional[str]] = {
406
+ '200': "InvestmentsList200Response",
407
+ }
408
+ response_data = self.api_client.call_api(
409
+ *_param,
410
+ _request_timeout=_request_timeout
411
+ )
412
+ response_data.read()
413
+ return self.api_client.response_deserialize(
414
+ response_data=response_data,
415
+ response_types_map=_response_types_map,
416
+ ).data
417
+
418
+
419
+ @validate_call
420
+ def investments_list_with_http_info(
421
+ self,
422
+ item_id: Annotated[StrictStr, Field(description="Item's primary identifier")],
423
+ type: Annotated[Optional[StrictStr], Field(description="Investment's type to filter")] = None,
424
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 500")] = None,
425
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
426
+ _request_timeout: Union[
427
+ None,
428
+ Annotated[StrictFloat, Field(gt=0)],
429
+ Tuple[
430
+ Annotated[StrictFloat, Field(gt=0)],
431
+ Annotated[StrictFloat, Field(gt=0)]
432
+ ]
433
+ ] = None,
434
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
435
+ _content_type: Optional[StrictStr] = None,
436
+ _headers: Optional[Dict[StrictStr, Any]] = None,
437
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
438
+ ) -> ApiResponse[InvestmentsList200Response]:
439
+ """List
440
+
441
+ Recovers all investments collected for the item provided
442
+
443
+ :param item_id: Item's primary identifier (required)
444
+ :type item_id: str
445
+ :param type: Investment's type to filter
446
+ :type type: str
447
+ :param page_size: Page size for the paging request, default: 500
448
+ :type page_size: float
449
+ :param page: Page number for the paging request, default: 1
450
+ :type page: float
451
+ :param _request_timeout: timeout setting for this request. If one
452
+ number provided, it will be total request
453
+ timeout. It can also be a pair (tuple) of
454
+ (connection, read) timeouts.
455
+ :type _request_timeout: int, tuple(int, int), optional
456
+ :param _request_auth: set to override the auth_settings for an a single
457
+ request; this effectively ignores the
458
+ authentication in the spec for a single request.
459
+ :type _request_auth: dict, optional
460
+ :param _content_type: force content-type for the request.
461
+ :type _content_type: str, Optional
462
+ :param _headers: set to override the headers for a single
463
+ request; this effectively ignores the headers
464
+ in the spec for a single request.
465
+ :type _headers: dict, optional
466
+ :param _host_index: set to override the host_index for a single
467
+ request; this effectively ignores the host_index
468
+ in the spec for a single request.
469
+ :type _host_index: int, optional
470
+ :return: Returns the result object.
471
+ """ # noqa: E501
472
+
473
+ _param = self._investments_list_serialize(
474
+ item_id=item_id,
475
+ type=type,
476
+ page_size=page_size,
477
+ page=page,
478
+ _request_auth=_request_auth,
479
+ _content_type=_content_type,
480
+ _headers=_headers,
481
+ _host_index=_host_index
482
+ )
483
+
484
+ _response_types_map: Dict[str, Optional[str]] = {
485
+ '200': "InvestmentsList200Response",
486
+ }
487
+ response_data = self.api_client.call_api(
488
+ *_param,
489
+ _request_timeout=_request_timeout
490
+ )
491
+ response_data.read()
492
+ return self.api_client.response_deserialize(
493
+ response_data=response_data,
494
+ response_types_map=_response_types_map,
495
+ )
496
+
497
+
498
+ @validate_call
499
+ def investments_list_without_preload_content(
500
+ self,
501
+ item_id: Annotated[StrictStr, Field(description="Item's primary identifier")],
502
+ type: Annotated[Optional[StrictStr], Field(description="Investment's type to filter")] = None,
503
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 500")] = None,
504
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
505
+ _request_timeout: Union[
506
+ None,
507
+ Annotated[StrictFloat, Field(gt=0)],
508
+ Tuple[
509
+ Annotated[StrictFloat, Field(gt=0)],
510
+ Annotated[StrictFloat, Field(gt=0)]
511
+ ]
512
+ ] = None,
513
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
514
+ _content_type: Optional[StrictStr] = None,
515
+ _headers: Optional[Dict[StrictStr, Any]] = None,
516
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
517
+ ) -> RESTResponseType:
518
+ """List
519
+
520
+ Recovers all investments collected for the item provided
521
+
522
+ :param item_id: Item's primary identifier (required)
523
+ :type item_id: str
524
+ :param type: Investment's type to filter
525
+ :type type: str
526
+ :param page_size: Page size for the paging request, default: 500
527
+ :type page_size: float
528
+ :param page: Page number for the paging request, default: 1
529
+ :type page: float
530
+ :param _request_timeout: timeout setting for this request. If one
531
+ number provided, it will be total request
532
+ timeout. It can also be a pair (tuple) of
533
+ (connection, read) timeouts.
534
+ :type _request_timeout: int, tuple(int, int), optional
535
+ :param _request_auth: set to override the auth_settings for an a single
536
+ request; this effectively ignores the
537
+ authentication in the spec for a single request.
538
+ :type _request_auth: dict, optional
539
+ :param _content_type: force content-type for the request.
540
+ :type _content_type: str, Optional
541
+ :param _headers: set to override the headers for a single
542
+ request; this effectively ignores the headers
543
+ in the spec for a single request.
544
+ :type _headers: dict, optional
545
+ :param _host_index: set to override the host_index for a single
546
+ request; this effectively ignores the host_index
547
+ in the spec for a single request.
548
+ :type _host_index: int, optional
549
+ :return: Returns the result object.
550
+ """ # noqa: E501
551
+
552
+ _param = self._investments_list_serialize(
553
+ item_id=item_id,
554
+ type=type,
555
+ page_size=page_size,
556
+ page=page,
557
+ _request_auth=_request_auth,
558
+ _content_type=_content_type,
559
+ _headers=_headers,
560
+ _host_index=_host_index
561
+ )
562
+
563
+ _response_types_map: Dict[str, Optional[str]] = {
564
+ '200': "InvestmentsList200Response",
565
+ }
566
+ response_data = self.api_client.call_api(
567
+ *_param,
568
+ _request_timeout=_request_timeout
569
+ )
570
+ return response_data.response
571
+
572
+
573
+ def _investments_list_serialize(
574
+ self,
575
+ item_id,
576
+ type,
577
+ page_size,
578
+ page,
579
+ _request_auth,
580
+ _content_type,
581
+ _headers,
582
+ _host_index,
583
+ ) -> RequestSerialized:
584
+
585
+ _host = None
586
+
587
+ _collection_formats: Dict[str, str] = {
588
+ }
589
+
590
+ _path_params: Dict[str, str] = {}
591
+ _query_params: List[Tuple[str, str]] = []
592
+ _header_params: Dict[str, Optional[str]] = _headers or {}
593
+ _form_params: List[Tuple[str, str]] = []
594
+ _files: Dict[str, Union[str, bytes]] = {}
595
+ _body_params: Optional[bytes] = None
596
+
597
+ # process the path parameters
598
+ # process the query parameters
599
+ if item_id is not None:
600
+
601
+ _query_params.append(('itemId', item_id))
602
+
603
+ if type is not None:
604
+
605
+ _query_params.append(('type', type))
606
+
607
+ if page_size is not None:
608
+
609
+ _query_params.append(('pageSize', page_size))
610
+
611
+ if page is not None:
612
+
613
+ _query_params.append(('page', page))
614
+
615
+ # process the header parameters
616
+ # process the form parameters
617
+ # process the body parameter
618
+
619
+
620
+ # set the HTTP header `Accept`
621
+ _header_params['Accept'] = self.api_client.select_header_accept(
622
+ [
623
+ 'application/json'
624
+ ]
625
+ )
626
+
627
+
628
+ # authentication setting
629
+ _auth_settings: List[str] = [
630
+ 'default'
631
+ ]
632
+
633
+ return self.api_client.param_serialize(
634
+ method='GET',
635
+ resource_path='/investments',
636
+ path_params=_path_params,
637
+ query_params=_query_params,
638
+ header_params=_header_params,
639
+ body=_body_params,
640
+ post_params=_form_params,
641
+ files=_files,
642
+ auth_settings=_auth_settings,
643
+ collection_formats=_collection_formats,
644
+ _host=_host,
645
+ _request_auth=_request_auth
646
+ )
647
+
648
+
649
+
650
+
651
+ @validate_call
652
+ def investments_retrieve(
653
+ self,
654
+ id: Annotated[StrictStr, Field(description="investment primary identifier")],
655
+ _request_timeout: Union[
656
+ None,
657
+ Annotated[StrictFloat, Field(gt=0)],
658
+ Tuple[
659
+ Annotated[StrictFloat, Field(gt=0)],
660
+ Annotated[StrictFloat, Field(gt=0)]
661
+ ]
662
+ ] = None,
663
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
664
+ _content_type: Optional[StrictStr] = None,
665
+ _headers: Optional[Dict[StrictStr, Any]] = None,
666
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
667
+ ) -> Investment:
668
+ """Retrieve
669
+
670
+ Recovers the investment resource by its id
671
+
672
+ :param id: investment primary identifier (required)
673
+ :type id: str
674
+ :param _request_timeout: timeout setting for this request. If one
675
+ number provided, it will be total request
676
+ timeout. It can also be a pair (tuple) of
677
+ (connection, read) timeouts.
678
+ :type _request_timeout: int, tuple(int, int), optional
679
+ :param _request_auth: set to override the auth_settings for an a single
680
+ request; this effectively ignores the
681
+ authentication in the spec for a single request.
682
+ :type _request_auth: dict, optional
683
+ :param _content_type: force content-type for the request.
684
+ :type _content_type: str, Optional
685
+ :param _headers: set to override the headers for a single
686
+ request; this effectively ignores the headers
687
+ in the spec for a single request.
688
+ :type _headers: dict, optional
689
+ :param _host_index: set to override the host_index for a single
690
+ request; this effectively ignores the host_index
691
+ in the spec for a single request.
692
+ :type _host_index: int, optional
693
+ :return: Returns the result object.
694
+ """ # noqa: E501
695
+
696
+ _param = self._investments_retrieve_serialize(
697
+ id=id,
698
+ _request_auth=_request_auth,
699
+ _content_type=_content_type,
700
+ _headers=_headers,
701
+ _host_index=_host_index
702
+ )
703
+
704
+ _response_types_map: Dict[str, Optional[str]] = {
705
+ '200': "Investment",
706
+ '404': "GlobalErrorResponse",
707
+ }
708
+ response_data = self.api_client.call_api(
709
+ *_param,
710
+ _request_timeout=_request_timeout
711
+ )
712
+ response_data.read()
713
+ return self.api_client.response_deserialize(
714
+ response_data=response_data,
715
+ response_types_map=_response_types_map,
716
+ ).data
717
+
718
+
719
+ @validate_call
720
+ def investments_retrieve_with_http_info(
721
+ self,
722
+ id: Annotated[StrictStr, Field(description="investment primary identifier")],
723
+ _request_timeout: Union[
724
+ None,
725
+ Annotated[StrictFloat, Field(gt=0)],
726
+ Tuple[
727
+ Annotated[StrictFloat, Field(gt=0)],
728
+ Annotated[StrictFloat, Field(gt=0)]
729
+ ]
730
+ ] = None,
731
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
732
+ _content_type: Optional[StrictStr] = None,
733
+ _headers: Optional[Dict[StrictStr, Any]] = None,
734
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
735
+ ) -> ApiResponse[Investment]:
736
+ """Retrieve
737
+
738
+ Recovers the investment resource by its id
739
+
740
+ :param id: investment primary identifier (required)
741
+ :type id: str
742
+ :param _request_timeout: timeout setting for this request. If one
743
+ number provided, it will be total request
744
+ timeout. It can also be a pair (tuple) of
745
+ (connection, read) timeouts.
746
+ :type _request_timeout: int, tuple(int, int), optional
747
+ :param _request_auth: set to override the auth_settings for an a single
748
+ request; this effectively ignores the
749
+ authentication in the spec for a single request.
750
+ :type _request_auth: dict, optional
751
+ :param _content_type: force content-type for the request.
752
+ :type _content_type: str, Optional
753
+ :param _headers: set to override the headers for a single
754
+ request; this effectively ignores the headers
755
+ in the spec for a single request.
756
+ :type _headers: dict, optional
757
+ :param _host_index: set to override the host_index for a single
758
+ request; this effectively ignores the host_index
759
+ in the spec for a single request.
760
+ :type _host_index: int, optional
761
+ :return: Returns the result object.
762
+ """ # noqa: E501
763
+
764
+ _param = self._investments_retrieve_serialize(
765
+ id=id,
766
+ _request_auth=_request_auth,
767
+ _content_type=_content_type,
768
+ _headers=_headers,
769
+ _host_index=_host_index
770
+ )
771
+
772
+ _response_types_map: Dict[str, Optional[str]] = {
773
+ '200': "Investment",
774
+ '404': "GlobalErrorResponse",
775
+ }
776
+ response_data = self.api_client.call_api(
777
+ *_param,
778
+ _request_timeout=_request_timeout
779
+ )
780
+ response_data.read()
781
+ return self.api_client.response_deserialize(
782
+ response_data=response_data,
783
+ response_types_map=_response_types_map,
784
+ )
785
+
786
+
787
+ @validate_call
788
+ def investments_retrieve_without_preload_content(
789
+ self,
790
+ id: Annotated[StrictStr, Field(description="investment primary identifier")],
791
+ _request_timeout: Union[
792
+ None,
793
+ Annotated[StrictFloat, Field(gt=0)],
794
+ Tuple[
795
+ Annotated[StrictFloat, Field(gt=0)],
796
+ Annotated[StrictFloat, Field(gt=0)]
797
+ ]
798
+ ] = None,
799
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
800
+ _content_type: Optional[StrictStr] = None,
801
+ _headers: Optional[Dict[StrictStr, Any]] = None,
802
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
803
+ ) -> RESTResponseType:
804
+ """Retrieve
805
+
806
+ Recovers the investment resource by its id
807
+
808
+ :param id: investment primary identifier (required)
809
+ :type id: str
810
+ :param _request_timeout: timeout setting for this request. If one
811
+ number provided, it will be total request
812
+ timeout. It can also be a pair (tuple) of
813
+ (connection, read) timeouts.
814
+ :type _request_timeout: int, tuple(int, int), optional
815
+ :param _request_auth: set to override the auth_settings for an a single
816
+ request; this effectively ignores the
817
+ authentication in the spec for a single request.
818
+ :type _request_auth: dict, optional
819
+ :param _content_type: force content-type for the request.
820
+ :type _content_type: str, Optional
821
+ :param _headers: set to override the headers for a single
822
+ request; this effectively ignores the headers
823
+ in the spec for a single request.
824
+ :type _headers: dict, optional
825
+ :param _host_index: set to override the host_index for a single
826
+ request; this effectively ignores the host_index
827
+ in the spec for a single request.
828
+ :type _host_index: int, optional
829
+ :return: Returns the result object.
830
+ """ # noqa: E501
831
+
832
+ _param = self._investments_retrieve_serialize(
833
+ id=id,
834
+ _request_auth=_request_auth,
835
+ _content_type=_content_type,
836
+ _headers=_headers,
837
+ _host_index=_host_index
838
+ )
839
+
840
+ _response_types_map: Dict[str, Optional[str]] = {
841
+ '200': "Investment",
842
+ '404': "GlobalErrorResponse",
843
+ }
844
+ response_data = self.api_client.call_api(
845
+ *_param,
846
+ _request_timeout=_request_timeout
847
+ )
848
+ return response_data.response
849
+
850
+
851
+ def _investments_retrieve_serialize(
852
+ self,
853
+ id,
854
+ _request_auth,
855
+ _content_type,
856
+ _headers,
857
+ _host_index,
858
+ ) -> RequestSerialized:
859
+
860
+ _host = None
861
+
862
+ _collection_formats: Dict[str, str] = {
863
+ }
864
+
865
+ _path_params: Dict[str, str] = {}
866
+ _query_params: List[Tuple[str, str]] = []
867
+ _header_params: Dict[str, Optional[str]] = _headers or {}
868
+ _form_params: List[Tuple[str, str]] = []
869
+ _files: Dict[str, Union[str, bytes]] = {}
870
+ _body_params: Optional[bytes] = None
871
+
872
+ # process the path parameters
873
+ if id is not None:
874
+ _path_params['id'] = id
875
+ # process the query parameters
876
+ # process the header parameters
877
+ # process the form parameters
878
+ # process the body parameter
879
+
880
+
881
+ # set the HTTP header `Accept`
882
+ _header_params['Accept'] = self.api_client.select_header_accept(
883
+ [
884
+ 'application/json'
885
+ ]
886
+ )
887
+
888
+
889
+ # authentication setting
890
+ _auth_settings: List[str] = [
891
+ 'default'
892
+ ]
893
+
894
+ return self.api_client.param_serialize(
895
+ method='GET',
896
+ resource_path='/investments/{id}',
897
+ path_params=_path_params,
898
+ query_params=_query_params,
899
+ header_params=_header_params,
900
+ body=_body_params,
901
+ post_params=_form_params,
902
+ files=_files,
903
+ auth_settings=_auth_settings,
904
+ collection_formats=_collection_formats,
905
+ _host=_host,
906
+ _request_auth=_request_auth
907
+ )
908
+
909
+