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,658 @@
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.acquirer_sale import AcquirerSale
25
+ from pluggy_sdk.models.page_response_acquirer_sales import PageResponseAcquirerSales
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 AcquirerSaleApi:
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 acquirer_sales_list(
47
+ self,
48
+ item_id: Annotated[StrictStr, Field(description="Item primary identifier")],
49
+ var_from: Annotated[Optional[datetime], Field(description="Filter greater than date. Format (yyyy-mm-dd)")] = None,
50
+ to: Annotated[Optional[datetime], Field(description="Filter lower than date. Format (yyyy-mm-dd)")] = None,
51
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
52
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
53
+ _request_timeout: Union[
54
+ None,
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Tuple[
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Annotated[StrictFloat, Field(gt=0)]
59
+ ]
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> PageResponseAcquirerSales:
66
+ """List
67
+
68
+ Recovers all acquirer sales collected for the item provided
69
+
70
+ :param item_id: Item primary identifier (required)
71
+ :type item_id: str
72
+ :param var_from: Filter greater than date. Format (yyyy-mm-dd)
73
+ :type var_from: datetime
74
+ :param to: Filter lower than date. Format (yyyy-mm-dd)
75
+ :type to: datetime
76
+ :param page_size: Page size for the paging request, default: 20
77
+ :type page_size: float
78
+ :param page: Page number for the paging request, default: 1
79
+ :type page: float
80
+ :param _request_timeout: timeout setting for this request. If one
81
+ number provided, it will be total request
82
+ timeout. It can also be a pair (tuple) of
83
+ (connection, read) timeouts.
84
+ :type _request_timeout: int, tuple(int, int), optional
85
+ :param _request_auth: set to override the auth_settings for an a single
86
+ request; this effectively ignores the
87
+ authentication in the spec for a single request.
88
+ :type _request_auth: dict, optional
89
+ :param _content_type: force content-type for the request.
90
+ :type _content_type: str, Optional
91
+ :param _headers: set to override the headers for a single
92
+ request; this effectively ignores the headers
93
+ in the spec for a single request.
94
+ :type _headers: dict, optional
95
+ :param _host_index: set to override the host_index for a single
96
+ request; this effectively ignores the host_index
97
+ in the spec for a single request.
98
+ :type _host_index: int, optional
99
+ :return: Returns the result object.
100
+ """ # noqa: E501
101
+
102
+ _param = self._acquirer_sales_list_serialize(
103
+ item_id=item_id,
104
+ var_from=var_from,
105
+ to=to,
106
+ page_size=page_size,
107
+ page=page,
108
+ _request_auth=_request_auth,
109
+ _content_type=_content_type,
110
+ _headers=_headers,
111
+ _host_index=_host_index
112
+ )
113
+
114
+ _response_types_map: Dict[str, Optional[str]] = {
115
+ '200': "PageResponseAcquirerSales",
116
+ '400': "GlobalErrorResponse",
117
+ '500': "GlobalErrorResponse",
118
+ }
119
+ response_data = self.api_client.call_api(
120
+ *_param,
121
+ _request_timeout=_request_timeout
122
+ )
123
+ response_data.read()
124
+ return self.api_client.response_deserialize(
125
+ response_data=response_data,
126
+ response_types_map=_response_types_map,
127
+ ).data
128
+
129
+
130
+ @validate_call
131
+ def acquirer_sales_list_with_http_info(
132
+ self,
133
+ item_id: Annotated[StrictStr, Field(description="Item primary identifier")],
134
+ var_from: Annotated[Optional[datetime], Field(description="Filter greater than date. Format (yyyy-mm-dd)")] = None,
135
+ to: Annotated[Optional[datetime], Field(description="Filter lower than date. Format (yyyy-mm-dd)")] = None,
136
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
137
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
138
+ _request_timeout: Union[
139
+ None,
140
+ Annotated[StrictFloat, Field(gt=0)],
141
+ Tuple[
142
+ Annotated[StrictFloat, Field(gt=0)],
143
+ Annotated[StrictFloat, Field(gt=0)]
144
+ ]
145
+ ] = None,
146
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
147
+ _content_type: Optional[StrictStr] = None,
148
+ _headers: Optional[Dict[StrictStr, Any]] = None,
149
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
150
+ ) -> ApiResponse[PageResponseAcquirerSales]:
151
+ """List
152
+
153
+ Recovers all acquirer sales collected for the item provided
154
+
155
+ :param item_id: Item primary identifier (required)
156
+ :type item_id: str
157
+ :param var_from: Filter greater than date. Format (yyyy-mm-dd)
158
+ :type var_from: datetime
159
+ :param to: Filter lower than date. Format (yyyy-mm-dd)
160
+ :type to: datetime
161
+ :param page_size: Page size for the paging request, default: 20
162
+ :type page_size: float
163
+ :param page: Page number for the paging request, default: 1
164
+ :type page: float
165
+ :param _request_timeout: timeout setting for this request. If one
166
+ number provided, it will be total request
167
+ timeout. It can also be a pair (tuple) of
168
+ (connection, read) timeouts.
169
+ :type _request_timeout: int, tuple(int, int), optional
170
+ :param _request_auth: set to override the auth_settings for an a single
171
+ request; this effectively ignores the
172
+ authentication in the spec for a single request.
173
+ :type _request_auth: dict, optional
174
+ :param _content_type: force content-type for the request.
175
+ :type _content_type: str, Optional
176
+ :param _headers: set to override the headers for a single
177
+ request; this effectively ignores the headers
178
+ in the spec for a single request.
179
+ :type _headers: dict, optional
180
+ :param _host_index: set to override the host_index for a single
181
+ request; this effectively ignores the host_index
182
+ in the spec for a single request.
183
+ :type _host_index: int, optional
184
+ :return: Returns the result object.
185
+ """ # noqa: E501
186
+
187
+ _param = self._acquirer_sales_list_serialize(
188
+ item_id=item_id,
189
+ var_from=var_from,
190
+ to=to,
191
+ page_size=page_size,
192
+ page=page,
193
+ _request_auth=_request_auth,
194
+ _content_type=_content_type,
195
+ _headers=_headers,
196
+ _host_index=_host_index
197
+ )
198
+
199
+ _response_types_map: Dict[str, Optional[str]] = {
200
+ '200': "PageResponseAcquirerSales",
201
+ '400': "GlobalErrorResponse",
202
+ '500': "GlobalErrorResponse",
203
+ }
204
+ response_data = self.api_client.call_api(
205
+ *_param,
206
+ _request_timeout=_request_timeout
207
+ )
208
+ response_data.read()
209
+ return self.api_client.response_deserialize(
210
+ response_data=response_data,
211
+ response_types_map=_response_types_map,
212
+ )
213
+
214
+
215
+ @validate_call
216
+ def acquirer_sales_list_without_preload_content(
217
+ self,
218
+ item_id: Annotated[StrictStr, Field(description="Item primary identifier")],
219
+ var_from: Annotated[Optional[datetime], Field(description="Filter greater than date. Format (yyyy-mm-dd)")] = None,
220
+ to: Annotated[Optional[datetime], Field(description="Filter lower than date. Format (yyyy-mm-dd)")] = None,
221
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
222
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
223
+ _request_timeout: Union[
224
+ None,
225
+ Annotated[StrictFloat, Field(gt=0)],
226
+ Tuple[
227
+ Annotated[StrictFloat, Field(gt=0)],
228
+ Annotated[StrictFloat, Field(gt=0)]
229
+ ]
230
+ ] = None,
231
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
232
+ _content_type: Optional[StrictStr] = None,
233
+ _headers: Optional[Dict[StrictStr, Any]] = None,
234
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
235
+ ) -> RESTResponseType:
236
+ """List
237
+
238
+ Recovers all acquirer sales collected for the item provided
239
+
240
+ :param item_id: Item primary identifier (required)
241
+ :type item_id: str
242
+ :param var_from: Filter greater than date. Format (yyyy-mm-dd)
243
+ :type var_from: datetime
244
+ :param to: Filter lower than date. Format (yyyy-mm-dd)
245
+ :type to: datetime
246
+ :param page_size: Page size for the paging request, default: 20
247
+ :type page_size: float
248
+ :param page: Page number for the paging request, default: 1
249
+ :type page: float
250
+ :param _request_timeout: timeout setting for this request. If one
251
+ number provided, it will be total request
252
+ timeout. It can also be a pair (tuple) of
253
+ (connection, read) timeouts.
254
+ :type _request_timeout: int, tuple(int, int), optional
255
+ :param _request_auth: set to override the auth_settings for an a single
256
+ request; this effectively ignores the
257
+ authentication in the spec for a single request.
258
+ :type _request_auth: dict, optional
259
+ :param _content_type: force content-type for the request.
260
+ :type _content_type: str, Optional
261
+ :param _headers: set to override the headers for a single
262
+ request; this effectively ignores the headers
263
+ in the spec for a single request.
264
+ :type _headers: dict, optional
265
+ :param _host_index: set to override the host_index for a single
266
+ request; this effectively ignores the host_index
267
+ in the spec for a single request.
268
+ :type _host_index: int, optional
269
+ :return: Returns the result object.
270
+ """ # noqa: E501
271
+
272
+ _param = self._acquirer_sales_list_serialize(
273
+ item_id=item_id,
274
+ var_from=var_from,
275
+ to=to,
276
+ page_size=page_size,
277
+ page=page,
278
+ _request_auth=_request_auth,
279
+ _content_type=_content_type,
280
+ _headers=_headers,
281
+ _host_index=_host_index
282
+ )
283
+
284
+ _response_types_map: Dict[str, Optional[str]] = {
285
+ '200': "PageResponseAcquirerSales",
286
+ '400': "GlobalErrorResponse",
287
+ '500': "GlobalErrorResponse",
288
+ }
289
+ response_data = self.api_client.call_api(
290
+ *_param,
291
+ _request_timeout=_request_timeout
292
+ )
293
+ return response_data.response
294
+
295
+
296
+ def _acquirer_sales_list_serialize(
297
+ self,
298
+ item_id,
299
+ var_from,
300
+ to,
301
+ page_size,
302
+ page,
303
+ _request_auth,
304
+ _content_type,
305
+ _headers,
306
+ _host_index,
307
+ ) -> RequestSerialized:
308
+
309
+ _host = None
310
+
311
+ _collection_formats: Dict[str, str] = {
312
+ }
313
+
314
+ _path_params: Dict[str, str] = {}
315
+ _query_params: List[Tuple[str, str]] = []
316
+ _header_params: Dict[str, Optional[str]] = _headers or {}
317
+ _form_params: List[Tuple[str, str]] = []
318
+ _files: Dict[str, Union[str, bytes]] = {}
319
+ _body_params: Optional[bytes] = None
320
+
321
+ # process the path parameters
322
+ # process the query parameters
323
+ if item_id is not None:
324
+
325
+ _query_params.append(('itemId', item_id))
326
+
327
+ if var_from is not None:
328
+ if isinstance(var_from, datetime):
329
+ _query_params.append(
330
+ (
331
+ 'from',
332
+ var_from.strftime(
333
+ self.api_client.configuration.datetime_format
334
+ )
335
+ )
336
+ )
337
+ else:
338
+ _query_params.append(('from', var_from))
339
+
340
+ if to is not None:
341
+ if isinstance(to, datetime):
342
+ _query_params.append(
343
+ (
344
+ 'to',
345
+ to.strftime(
346
+ self.api_client.configuration.datetime_format
347
+ )
348
+ )
349
+ )
350
+ else:
351
+ _query_params.append(('to', to))
352
+
353
+ if page_size is not None:
354
+
355
+ _query_params.append(('pageSize', page_size))
356
+
357
+ if page is not None:
358
+
359
+ _query_params.append(('page', page))
360
+
361
+ # process the header parameters
362
+ # process the form parameters
363
+ # process the body parameter
364
+
365
+
366
+ # set the HTTP header `Accept`
367
+ _header_params['Accept'] = self.api_client.select_header_accept(
368
+ [
369
+ 'application/json'
370
+ ]
371
+ )
372
+
373
+
374
+ # authentication setting
375
+ _auth_settings: List[str] = [
376
+ 'default'
377
+ ]
378
+
379
+ return self.api_client.param_serialize(
380
+ method='GET',
381
+ resource_path='/acquirer-sales',
382
+ path_params=_path_params,
383
+ query_params=_query_params,
384
+ header_params=_header_params,
385
+ body=_body_params,
386
+ post_params=_form_params,
387
+ files=_files,
388
+ auth_settings=_auth_settings,
389
+ collection_formats=_collection_formats,
390
+ _host=_host,
391
+ _request_auth=_request_auth
392
+ )
393
+
394
+
395
+
396
+
397
+ @validate_call
398
+ def acquirer_sales_retrieve(
399
+ self,
400
+ id: Annotated[StrictStr, Field(description="Acquirer sale primary identifier")],
401
+ _request_timeout: Union[
402
+ None,
403
+ Annotated[StrictFloat, Field(gt=0)],
404
+ Tuple[
405
+ Annotated[StrictFloat, Field(gt=0)],
406
+ Annotated[StrictFloat, Field(gt=0)]
407
+ ]
408
+ ] = None,
409
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
410
+ _content_type: Optional[StrictStr] = None,
411
+ _headers: Optional[Dict[StrictStr, Any]] = None,
412
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
413
+ ) -> AcquirerSale:
414
+ """Retrieve
415
+
416
+ Recovers the acquirer sale resource by it's id
417
+
418
+ :param id: Acquirer sale primary identifier (required)
419
+ :type id: str
420
+ :param _request_timeout: timeout setting for this request. If one
421
+ number provided, it will be total request
422
+ timeout. It can also be a pair (tuple) of
423
+ (connection, read) timeouts.
424
+ :type _request_timeout: int, tuple(int, int), optional
425
+ :param _request_auth: set to override the auth_settings for an a single
426
+ request; this effectively ignores the
427
+ authentication in the spec for a single request.
428
+ :type _request_auth: dict, optional
429
+ :param _content_type: force content-type for the request.
430
+ :type _content_type: str, Optional
431
+ :param _headers: set to override the headers for a single
432
+ request; this effectively ignores the headers
433
+ in the spec for a single request.
434
+ :type _headers: dict, optional
435
+ :param _host_index: set to override the host_index for a single
436
+ request; this effectively ignores the host_index
437
+ in the spec for a single request.
438
+ :type _host_index: int, optional
439
+ :return: Returns the result object.
440
+ """ # noqa: E501
441
+
442
+ _param = self._acquirer_sales_retrieve_serialize(
443
+ id=id,
444
+ _request_auth=_request_auth,
445
+ _content_type=_content_type,
446
+ _headers=_headers,
447
+ _host_index=_host_index
448
+ )
449
+
450
+ _response_types_map: Dict[str, Optional[str]] = {
451
+ '200': "AcquirerSale",
452
+ '404': "GlobalErrorResponse",
453
+ '500': "GlobalErrorResponse",
454
+ }
455
+ response_data = self.api_client.call_api(
456
+ *_param,
457
+ _request_timeout=_request_timeout
458
+ )
459
+ response_data.read()
460
+ return self.api_client.response_deserialize(
461
+ response_data=response_data,
462
+ response_types_map=_response_types_map,
463
+ ).data
464
+
465
+
466
+ @validate_call
467
+ def acquirer_sales_retrieve_with_http_info(
468
+ self,
469
+ id: Annotated[StrictStr, Field(description="Acquirer sale primary identifier")],
470
+ _request_timeout: Union[
471
+ None,
472
+ Annotated[StrictFloat, Field(gt=0)],
473
+ Tuple[
474
+ Annotated[StrictFloat, Field(gt=0)],
475
+ Annotated[StrictFloat, Field(gt=0)]
476
+ ]
477
+ ] = None,
478
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
479
+ _content_type: Optional[StrictStr] = None,
480
+ _headers: Optional[Dict[StrictStr, Any]] = None,
481
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
482
+ ) -> ApiResponse[AcquirerSale]:
483
+ """Retrieve
484
+
485
+ Recovers the acquirer sale resource by it's id
486
+
487
+ :param id: Acquirer sale primary identifier (required)
488
+ :type id: str
489
+ :param _request_timeout: timeout setting for this request. If one
490
+ number provided, it will be total request
491
+ timeout. It can also be a pair (tuple) of
492
+ (connection, read) timeouts.
493
+ :type _request_timeout: int, tuple(int, int), optional
494
+ :param _request_auth: set to override the auth_settings for an a single
495
+ request; this effectively ignores the
496
+ authentication in the spec for a single request.
497
+ :type _request_auth: dict, optional
498
+ :param _content_type: force content-type for the request.
499
+ :type _content_type: str, Optional
500
+ :param _headers: set to override the headers for a single
501
+ request; this effectively ignores the headers
502
+ in the spec for a single request.
503
+ :type _headers: dict, optional
504
+ :param _host_index: set to override the host_index for a single
505
+ request; this effectively ignores the host_index
506
+ in the spec for a single request.
507
+ :type _host_index: int, optional
508
+ :return: Returns the result object.
509
+ """ # noqa: E501
510
+
511
+ _param = self._acquirer_sales_retrieve_serialize(
512
+ id=id,
513
+ _request_auth=_request_auth,
514
+ _content_type=_content_type,
515
+ _headers=_headers,
516
+ _host_index=_host_index
517
+ )
518
+
519
+ _response_types_map: Dict[str, Optional[str]] = {
520
+ '200': "AcquirerSale",
521
+ '404': "GlobalErrorResponse",
522
+ '500': "GlobalErrorResponse",
523
+ }
524
+ response_data = self.api_client.call_api(
525
+ *_param,
526
+ _request_timeout=_request_timeout
527
+ )
528
+ response_data.read()
529
+ return self.api_client.response_deserialize(
530
+ response_data=response_data,
531
+ response_types_map=_response_types_map,
532
+ )
533
+
534
+
535
+ @validate_call
536
+ def acquirer_sales_retrieve_without_preload_content(
537
+ self,
538
+ id: Annotated[StrictStr, Field(description="Acquirer sale primary identifier")],
539
+ _request_timeout: Union[
540
+ None,
541
+ Annotated[StrictFloat, Field(gt=0)],
542
+ Tuple[
543
+ Annotated[StrictFloat, Field(gt=0)],
544
+ Annotated[StrictFloat, Field(gt=0)]
545
+ ]
546
+ ] = None,
547
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
548
+ _content_type: Optional[StrictStr] = None,
549
+ _headers: Optional[Dict[StrictStr, Any]] = None,
550
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
551
+ ) -> RESTResponseType:
552
+ """Retrieve
553
+
554
+ Recovers the acquirer sale resource by it's id
555
+
556
+ :param id: Acquirer sale primary identifier (required)
557
+ :type id: str
558
+ :param _request_timeout: timeout setting for this request. If one
559
+ number provided, it will be total request
560
+ timeout. It can also be a pair (tuple) of
561
+ (connection, read) timeouts.
562
+ :type _request_timeout: int, tuple(int, int), optional
563
+ :param _request_auth: set to override the auth_settings for an a single
564
+ request; this effectively ignores the
565
+ authentication in the spec for a single request.
566
+ :type _request_auth: dict, optional
567
+ :param _content_type: force content-type for the request.
568
+ :type _content_type: str, Optional
569
+ :param _headers: set to override the headers for a single
570
+ request; this effectively ignores the headers
571
+ in the spec for a single request.
572
+ :type _headers: dict, optional
573
+ :param _host_index: set to override the host_index for a single
574
+ request; this effectively ignores the host_index
575
+ in the spec for a single request.
576
+ :type _host_index: int, optional
577
+ :return: Returns the result object.
578
+ """ # noqa: E501
579
+
580
+ _param = self._acquirer_sales_retrieve_serialize(
581
+ id=id,
582
+ _request_auth=_request_auth,
583
+ _content_type=_content_type,
584
+ _headers=_headers,
585
+ _host_index=_host_index
586
+ )
587
+
588
+ _response_types_map: Dict[str, Optional[str]] = {
589
+ '200': "AcquirerSale",
590
+ '404': "GlobalErrorResponse",
591
+ '500': "GlobalErrorResponse",
592
+ }
593
+ response_data = self.api_client.call_api(
594
+ *_param,
595
+ _request_timeout=_request_timeout
596
+ )
597
+ return response_data.response
598
+
599
+
600
+ def _acquirer_sales_retrieve_serialize(
601
+ self,
602
+ id,
603
+ _request_auth,
604
+ _content_type,
605
+ _headers,
606
+ _host_index,
607
+ ) -> RequestSerialized:
608
+
609
+ _host = None
610
+
611
+ _collection_formats: Dict[str, str] = {
612
+ }
613
+
614
+ _path_params: Dict[str, str] = {}
615
+ _query_params: List[Tuple[str, str]] = []
616
+ _header_params: Dict[str, Optional[str]] = _headers or {}
617
+ _form_params: List[Tuple[str, str]] = []
618
+ _files: Dict[str, Union[str, bytes]] = {}
619
+ _body_params: Optional[bytes] = None
620
+
621
+ # process the path parameters
622
+ if id is not None:
623
+ _path_params['id'] = id
624
+ # process the query parameters
625
+ # process the header parameters
626
+ # process the form parameters
627
+ # process the body parameter
628
+
629
+
630
+ # set the HTTP header `Accept`
631
+ _header_params['Accept'] = self.api_client.select_header_accept(
632
+ [
633
+ 'application/json'
634
+ ]
635
+ )
636
+
637
+
638
+ # authentication setting
639
+ _auth_settings: List[str] = [
640
+ 'default'
641
+ ]
642
+
643
+ return self.api_client.param_serialize(
644
+ method='GET',
645
+ resource_path='/acquirer-sales/{id}',
646
+ path_params=_path_params,
647
+ query_params=_query_params,
648
+ header_params=_header_params,
649
+ body=_body_params,
650
+ post_params=_form_params,
651
+ files=_files,
652
+ auth_settings=_auth_settings,
653
+ collection_formats=_collection_formats,
654
+ _host=_host,
655
+ _request_auth=_request_auth
656
+ )
657
+
658
+