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