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,1636 @@
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_request import CreatePaymentRequest
23
+ from pluggy_sdk.models.create_pix_qr_payment_request import CreatePixQrPaymentRequest
24
+ from pluggy_sdk.models.payment_request import PaymentRequest
25
+ from pluggy_sdk.models.payment_requests_list200_response import PaymentRequestsList200Response
26
+ from pluggy_sdk.models.update_payment_request import UpdatePaymentRequest
27
+
28
+ from pluggy_sdk.api_client import ApiClient, RequestSerialized
29
+ from pluggy_sdk.api_response import ApiResponse
30
+ from pluggy_sdk.rest import RESTResponseType
31
+
32
+
33
+ class PaymentRequestApi:
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None) -> None:
41
+ if api_client is None:
42
+ api_client = ApiClient.get_default()
43
+ self.api_client = api_client
44
+
45
+
46
+ @validate_call
47
+ def payment_request_create(
48
+ self,
49
+ create_payment_request: CreatePaymentRequest,
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> PaymentRequest:
63
+ """Create
64
+
65
+ Creates the payment request resource
66
+
67
+ :param create_payment_request: (required)
68
+ :type create_payment_request: CreatePaymentRequest
69
+ :param _request_timeout: timeout setting for this request. If one
70
+ number provided, it will be total request
71
+ timeout. It can also be a pair (tuple) of
72
+ (connection, read) timeouts.
73
+ :type _request_timeout: int, tuple(int, int), optional
74
+ :param _request_auth: set to override the auth_settings for an a single
75
+ request; this effectively ignores the
76
+ authentication in the spec for a single request.
77
+ :type _request_auth: dict, optional
78
+ :param _content_type: force content-type for the request.
79
+ :type _content_type: str, Optional
80
+ :param _headers: set to override the headers for a single
81
+ request; this effectively ignores the headers
82
+ in the spec for a single request.
83
+ :type _headers: dict, optional
84
+ :param _host_index: set to override the host_index for a single
85
+ request; this effectively ignores the host_index
86
+ in the spec for a single request.
87
+ :type _host_index: int, optional
88
+ :return: Returns the result object.
89
+ """ # noqa: E501
90
+
91
+ _param = self._payment_request_create_serialize(
92
+ create_payment_request=create_payment_request,
93
+ _request_auth=_request_auth,
94
+ _content_type=_content_type,
95
+ _headers=_headers,
96
+ _host_index=_host_index
97
+ )
98
+
99
+ _response_types_map: Dict[str, Optional[str]] = {
100
+ '200': "PaymentRequest",
101
+ }
102
+ response_data = self.api_client.call_api(
103
+ *_param,
104
+ _request_timeout=_request_timeout
105
+ )
106
+ response_data.read()
107
+ return self.api_client.response_deserialize(
108
+ response_data=response_data,
109
+ response_types_map=_response_types_map,
110
+ ).data
111
+
112
+
113
+ @validate_call
114
+ def payment_request_create_with_http_info(
115
+ self,
116
+ create_payment_request: CreatePaymentRequest,
117
+ _request_timeout: Union[
118
+ None,
119
+ Annotated[StrictFloat, Field(gt=0)],
120
+ Tuple[
121
+ Annotated[StrictFloat, Field(gt=0)],
122
+ Annotated[StrictFloat, Field(gt=0)]
123
+ ]
124
+ ] = None,
125
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
126
+ _content_type: Optional[StrictStr] = None,
127
+ _headers: Optional[Dict[StrictStr, Any]] = None,
128
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
129
+ ) -> ApiResponse[PaymentRequest]:
130
+ """Create
131
+
132
+ Creates the payment request resource
133
+
134
+ :param create_payment_request: (required)
135
+ :type create_payment_request: CreatePaymentRequest
136
+ :param _request_timeout: timeout setting for this request. If one
137
+ number provided, it will be total request
138
+ timeout. It can also be a pair (tuple) of
139
+ (connection, read) timeouts.
140
+ :type _request_timeout: int, tuple(int, int), optional
141
+ :param _request_auth: set to override the auth_settings for an a single
142
+ request; this effectively ignores the
143
+ authentication in the spec for a single request.
144
+ :type _request_auth: dict, optional
145
+ :param _content_type: force content-type for the request.
146
+ :type _content_type: str, Optional
147
+ :param _headers: set to override the headers for a single
148
+ request; this effectively ignores the headers
149
+ in the spec for a single request.
150
+ :type _headers: dict, optional
151
+ :param _host_index: set to override the host_index for a single
152
+ request; this effectively ignores the host_index
153
+ in the spec for a single request.
154
+ :type _host_index: int, optional
155
+ :return: Returns the result object.
156
+ """ # noqa: E501
157
+
158
+ _param = self._payment_request_create_serialize(
159
+ create_payment_request=create_payment_request,
160
+ _request_auth=_request_auth,
161
+ _content_type=_content_type,
162
+ _headers=_headers,
163
+ _host_index=_host_index
164
+ )
165
+
166
+ _response_types_map: Dict[str, Optional[str]] = {
167
+ '200': "PaymentRequest",
168
+ }
169
+ response_data = self.api_client.call_api(
170
+ *_param,
171
+ _request_timeout=_request_timeout
172
+ )
173
+ response_data.read()
174
+ return self.api_client.response_deserialize(
175
+ response_data=response_data,
176
+ response_types_map=_response_types_map,
177
+ )
178
+
179
+
180
+ @validate_call
181
+ def payment_request_create_without_preload_content(
182
+ self,
183
+ create_payment_request: CreatePaymentRequest,
184
+ _request_timeout: Union[
185
+ None,
186
+ Annotated[StrictFloat, Field(gt=0)],
187
+ Tuple[
188
+ Annotated[StrictFloat, Field(gt=0)],
189
+ Annotated[StrictFloat, Field(gt=0)]
190
+ ]
191
+ ] = None,
192
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
193
+ _content_type: Optional[StrictStr] = None,
194
+ _headers: Optional[Dict[StrictStr, Any]] = None,
195
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
196
+ ) -> RESTResponseType:
197
+ """Create
198
+
199
+ Creates the payment request resource
200
+
201
+ :param create_payment_request: (required)
202
+ :type create_payment_request: CreatePaymentRequest
203
+ :param _request_timeout: timeout setting for this request. If one
204
+ number provided, it will be total request
205
+ timeout. It can also be a pair (tuple) of
206
+ (connection, read) timeouts.
207
+ :type _request_timeout: int, tuple(int, int), optional
208
+ :param _request_auth: set to override the auth_settings for an a single
209
+ request; this effectively ignores the
210
+ authentication in the spec for a single request.
211
+ :type _request_auth: dict, optional
212
+ :param _content_type: force content-type for the request.
213
+ :type _content_type: str, Optional
214
+ :param _headers: set to override the headers for a single
215
+ request; this effectively ignores the headers
216
+ in the spec for a single request.
217
+ :type _headers: dict, optional
218
+ :param _host_index: set to override the host_index for a single
219
+ request; this effectively ignores the host_index
220
+ in the spec for a single request.
221
+ :type _host_index: int, optional
222
+ :return: Returns the result object.
223
+ """ # noqa: E501
224
+
225
+ _param = self._payment_request_create_serialize(
226
+ create_payment_request=create_payment_request,
227
+ _request_auth=_request_auth,
228
+ _content_type=_content_type,
229
+ _headers=_headers,
230
+ _host_index=_host_index
231
+ )
232
+
233
+ _response_types_map: Dict[str, Optional[str]] = {
234
+ '200': "PaymentRequest",
235
+ }
236
+ response_data = self.api_client.call_api(
237
+ *_param,
238
+ _request_timeout=_request_timeout
239
+ )
240
+ return response_data.response
241
+
242
+
243
+ def _payment_request_create_serialize(
244
+ self,
245
+ create_payment_request,
246
+ _request_auth,
247
+ _content_type,
248
+ _headers,
249
+ _host_index,
250
+ ) -> RequestSerialized:
251
+
252
+ _host = None
253
+
254
+ _collection_formats: Dict[str, str] = {
255
+ }
256
+
257
+ _path_params: Dict[str, str] = {}
258
+ _query_params: List[Tuple[str, str]] = []
259
+ _header_params: Dict[str, Optional[str]] = _headers or {}
260
+ _form_params: List[Tuple[str, str]] = []
261
+ _files: Dict[str, Union[str, bytes]] = {}
262
+ _body_params: Optional[bytes] = None
263
+
264
+ # process the path parameters
265
+ # process the query parameters
266
+ # process the header parameters
267
+ # process the form parameters
268
+ # process the body parameter
269
+ if create_payment_request is not None:
270
+ _body_params = create_payment_request
271
+
272
+
273
+ # set the HTTP header `Accept`
274
+ _header_params['Accept'] = self.api_client.select_header_accept(
275
+ [
276
+ 'application/json'
277
+ ]
278
+ )
279
+
280
+ # set the HTTP header `Content-Type`
281
+ if _content_type:
282
+ _header_params['Content-Type'] = _content_type
283
+ else:
284
+ _default_content_type = (
285
+ self.api_client.select_header_content_type(
286
+ [
287
+ 'application/json'
288
+ ]
289
+ )
290
+ )
291
+ if _default_content_type is not None:
292
+ _header_params['Content-Type'] = _default_content_type
293
+
294
+ # authentication setting
295
+ _auth_settings: List[str] = [
296
+ 'default'
297
+ ]
298
+
299
+ return self.api_client.param_serialize(
300
+ method='POST',
301
+ resource_path='/payments/requests',
302
+ path_params=_path_params,
303
+ query_params=_query_params,
304
+ header_params=_header_params,
305
+ body=_body_params,
306
+ post_params=_form_params,
307
+ files=_files,
308
+ auth_settings=_auth_settings,
309
+ collection_formats=_collection_formats,
310
+ _host=_host,
311
+ _request_auth=_request_auth
312
+ )
313
+
314
+
315
+
316
+
317
+ @validate_call
318
+ def payment_request_create_pix_qr(
319
+ self,
320
+ create_pix_qr_payment_request: CreatePixQrPaymentRequest,
321
+ _request_timeout: Union[
322
+ None,
323
+ Annotated[StrictFloat, Field(gt=0)],
324
+ Tuple[
325
+ Annotated[StrictFloat, Field(gt=0)],
326
+ Annotated[StrictFloat, Field(gt=0)]
327
+ ]
328
+ ] = None,
329
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
330
+ _content_type: Optional[StrictStr] = None,
331
+ _headers: Optional[Dict[StrictStr, Any]] = None,
332
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
333
+ ) -> PaymentRequest:
334
+ """Create PIX QR payment request
335
+
336
+ Creates the PIX QR payment request resource
337
+
338
+ :param create_pix_qr_payment_request: (required)
339
+ :type create_pix_qr_payment_request: CreatePixQrPaymentRequest
340
+ :param _request_timeout: timeout setting for this request. If one
341
+ number provided, it will be total request
342
+ timeout. It can also be a pair (tuple) of
343
+ (connection, read) timeouts.
344
+ :type _request_timeout: int, tuple(int, int), optional
345
+ :param _request_auth: set to override the auth_settings for an a single
346
+ request; this effectively ignores the
347
+ authentication in the spec for a single request.
348
+ :type _request_auth: dict, optional
349
+ :param _content_type: force content-type for the request.
350
+ :type _content_type: str, Optional
351
+ :param _headers: set to override the headers for a single
352
+ request; this effectively ignores the headers
353
+ in the spec for a single request.
354
+ :type _headers: dict, optional
355
+ :param _host_index: set to override the host_index for a single
356
+ request; this effectively ignores the host_index
357
+ in the spec for a single request.
358
+ :type _host_index: int, optional
359
+ :return: Returns the result object.
360
+ """ # noqa: E501
361
+
362
+ _param = self._payment_request_create_pix_qr_serialize(
363
+ create_pix_qr_payment_request=create_pix_qr_payment_request,
364
+ _request_auth=_request_auth,
365
+ _content_type=_content_type,
366
+ _headers=_headers,
367
+ _host_index=_host_index
368
+ )
369
+
370
+ _response_types_map: Dict[str, Optional[str]] = {
371
+ '200': "PaymentRequest",
372
+ }
373
+ response_data = self.api_client.call_api(
374
+ *_param,
375
+ _request_timeout=_request_timeout
376
+ )
377
+ response_data.read()
378
+ return self.api_client.response_deserialize(
379
+ response_data=response_data,
380
+ response_types_map=_response_types_map,
381
+ ).data
382
+
383
+
384
+ @validate_call
385
+ def payment_request_create_pix_qr_with_http_info(
386
+ self,
387
+ create_pix_qr_payment_request: CreatePixQrPaymentRequest,
388
+ _request_timeout: Union[
389
+ None,
390
+ Annotated[StrictFloat, Field(gt=0)],
391
+ Tuple[
392
+ Annotated[StrictFloat, Field(gt=0)],
393
+ Annotated[StrictFloat, Field(gt=0)]
394
+ ]
395
+ ] = None,
396
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
397
+ _content_type: Optional[StrictStr] = None,
398
+ _headers: Optional[Dict[StrictStr, Any]] = None,
399
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
400
+ ) -> ApiResponse[PaymentRequest]:
401
+ """Create PIX QR payment request
402
+
403
+ Creates the PIX QR payment request resource
404
+
405
+ :param create_pix_qr_payment_request: (required)
406
+ :type create_pix_qr_payment_request: CreatePixQrPaymentRequest
407
+ :param _request_timeout: timeout setting for this request. If one
408
+ number provided, it will be total request
409
+ timeout. It can also be a pair (tuple) of
410
+ (connection, read) timeouts.
411
+ :type _request_timeout: int, tuple(int, int), optional
412
+ :param _request_auth: set to override the auth_settings for an a single
413
+ request; this effectively ignores the
414
+ authentication in the spec for a single request.
415
+ :type _request_auth: dict, optional
416
+ :param _content_type: force content-type for the request.
417
+ :type _content_type: str, Optional
418
+ :param _headers: set to override the headers for a single
419
+ request; this effectively ignores the headers
420
+ in the spec for a single request.
421
+ :type _headers: dict, optional
422
+ :param _host_index: set to override the host_index for a single
423
+ request; this effectively ignores the host_index
424
+ in the spec for a single request.
425
+ :type _host_index: int, optional
426
+ :return: Returns the result object.
427
+ """ # noqa: E501
428
+
429
+ _param = self._payment_request_create_pix_qr_serialize(
430
+ create_pix_qr_payment_request=create_pix_qr_payment_request,
431
+ _request_auth=_request_auth,
432
+ _content_type=_content_type,
433
+ _headers=_headers,
434
+ _host_index=_host_index
435
+ )
436
+
437
+ _response_types_map: Dict[str, Optional[str]] = {
438
+ '200': "PaymentRequest",
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_request_create_pix_qr_without_preload_content(
453
+ self,
454
+ create_pix_qr_payment_request: CreatePixQrPaymentRequest,
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
+ """Create PIX QR payment request
469
+
470
+ Creates the PIX QR payment request resource
471
+
472
+ :param create_pix_qr_payment_request: (required)
473
+ :type create_pix_qr_payment_request: CreatePixQrPaymentRequest
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_request_create_pix_qr_serialize(
497
+ create_pix_qr_payment_request=create_pix_qr_payment_request,
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': "PaymentRequest",
506
+ }
507
+ response_data = self.api_client.call_api(
508
+ *_param,
509
+ _request_timeout=_request_timeout
510
+ )
511
+ return response_data.response
512
+
513
+
514
+ def _payment_request_create_pix_qr_serialize(
515
+ self,
516
+ create_pix_qr_payment_request,
517
+ _request_auth,
518
+ _content_type,
519
+ _headers,
520
+ _host_index,
521
+ ) -> RequestSerialized:
522
+
523
+ _host = None
524
+
525
+ _collection_formats: Dict[str, str] = {
526
+ }
527
+
528
+ _path_params: Dict[str, str] = {}
529
+ _query_params: List[Tuple[str, str]] = []
530
+ _header_params: Dict[str, Optional[str]] = _headers or {}
531
+ _form_params: List[Tuple[str, str]] = []
532
+ _files: Dict[str, Union[str, bytes]] = {}
533
+ _body_params: Optional[bytes] = None
534
+
535
+ # process the path parameters
536
+ # process the query parameters
537
+ # process the header parameters
538
+ # process the form parameters
539
+ # process the body parameter
540
+ if create_pix_qr_payment_request is not None:
541
+ _body_params = create_pix_qr_payment_request
542
+
543
+
544
+ # set the HTTP header `Accept`
545
+ _header_params['Accept'] = self.api_client.select_header_accept(
546
+ [
547
+ 'application/json'
548
+ ]
549
+ )
550
+
551
+ # set the HTTP header `Content-Type`
552
+ if _content_type:
553
+ _header_params['Content-Type'] = _content_type
554
+ else:
555
+ _default_content_type = (
556
+ self.api_client.select_header_content_type(
557
+ [
558
+ 'application/json'
559
+ ]
560
+ )
561
+ )
562
+ if _default_content_type is not None:
563
+ _header_params['Content-Type'] = _default_content_type
564
+
565
+ # authentication setting
566
+ _auth_settings: List[str] = [
567
+ 'default'
568
+ ]
569
+
570
+ return self.api_client.param_serialize(
571
+ method='POST',
572
+ resource_path='/payments/requests/pix-qr',
573
+ path_params=_path_params,
574
+ query_params=_query_params,
575
+ header_params=_header_params,
576
+ body=_body_params,
577
+ post_params=_form_params,
578
+ files=_files,
579
+ auth_settings=_auth_settings,
580
+ collection_formats=_collection_formats,
581
+ _host=_host,
582
+ _request_auth=_request_auth
583
+ )
584
+
585
+
586
+
587
+
588
+ @validate_call
589
+ def payment_request_delete(
590
+ self,
591
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
592
+ _request_timeout: Union[
593
+ None,
594
+ Annotated[StrictFloat, Field(gt=0)],
595
+ Tuple[
596
+ Annotated[StrictFloat, Field(gt=0)],
597
+ Annotated[StrictFloat, Field(gt=0)]
598
+ ]
599
+ ] = None,
600
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
601
+ _content_type: Optional[StrictStr] = None,
602
+ _headers: Optional[Dict[StrictStr, Any]] = None,
603
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
604
+ ) -> None:
605
+ """Delete
606
+
607
+ Deletes the payment request resource by its id
608
+
609
+ :param id: Payment request primary identifier (required)
610
+ :type id: str
611
+ :param _request_timeout: timeout setting for this request. If one
612
+ number provided, it will be total request
613
+ timeout. It can also be a pair (tuple) of
614
+ (connection, read) timeouts.
615
+ :type _request_timeout: int, tuple(int, int), optional
616
+ :param _request_auth: set to override the auth_settings for an a single
617
+ request; this effectively ignores the
618
+ authentication in the spec for a single request.
619
+ :type _request_auth: dict, optional
620
+ :param _content_type: force content-type for the request.
621
+ :type _content_type: str, Optional
622
+ :param _headers: set to override the headers for a single
623
+ request; this effectively ignores the headers
624
+ in the spec for a single request.
625
+ :type _headers: dict, optional
626
+ :param _host_index: set to override the host_index for a single
627
+ request; this effectively ignores the host_index
628
+ in the spec for a single request.
629
+ :type _host_index: int, optional
630
+ :return: Returns the result object.
631
+ """ # noqa: E501
632
+
633
+ _param = self._payment_request_delete_serialize(
634
+ id=id,
635
+ _request_auth=_request_auth,
636
+ _content_type=_content_type,
637
+ _headers=_headers,
638
+ _host_index=_host_index
639
+ )
640
+
641
+ _response_types_map: Dict[str, Optional[str]] = {
642
+ '200': None,
643
+ '404': "GlobalErrorResponse",
644
+ }
645
+ response_data = self.api_client.call_api(
646
+ *_param,
647
+ _request_timeout=_request_timeout
648
+ )
649
+ response_data.read()
650
+ return self.api_client.response_deserialize(
651
+ response_data=response_data,
652
+ response_types_map=_response_types_map,
653
+ ).data
654
+
655
+
656
+ @validate_call
657
+ def payment_request_delete_with_http_info(
658
+ self,
659
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
660
+ _request_timeout: Union[
661
+ None,
662
+ Annotated[StrictFloat, Field(gt=0)],
663
+ Tuple[
664
+ Annotated[StrictFloat, Field(gt=0)],
665
+ Annotated[StrictFloat, Field(gt=0)]
666
+ ]
667
+ ] = None,
668
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
669
+ _content_type: Optional[StrictStr] = None,
670
+ _headers: Optional[Dict[StrictStr, Any]] = None,
671
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
672
+ ) -> ApiResponse[None]:
673
+ """Delete
674
+
675
+ Deletes the payment request resource by its id
676
+
677
+ :param id: Payment request primary identifier (required)
678
+ :type id: str
679
+ :param _request_timeout: timeout setting for this request. If one
680
+ number provided, it will be total request
681
+ timeout. It can also be a pair (tuple) of
682
+ (connection, read) timeouts.
683
+ :type _request_timeout: int, tuple(int, int), optional
684
+ :param _request_auth: set to override the auth_settings for an a single
685
+ request; this effectively ignores the
686
+ authentication in the spec for a single request.
687
+ :type _request_auth: dict, optional
688
+ :param _content_type: force content-type for the request.
689
+ :type _content_type: str, Optional
690
+ :param _headers: set to override the headers for a single
691
+ request; this effectively ignores the headers
692
+ in the spec for a single request.
693
+ :type _headers: dict, optional
694
+ :param _host_index: set to override the host_index for a single
695
+ request; this effectively ignores the host_index
696
+ in the spec for a single request.
697
+ :type _host_index: int, optional
698
+ :return: Returns the result object.
699
+ """ # noqa: E501
700
+
701
+ _param = self._payment_request_delete_serialize(
702
+ id=id,
703
+ _request_auth=_request_auth,
704
+ _content_type=_content_type,
705
+ _headers=_headers,
706
+ _host_index=_host_index
707
+ )
708
+
709
+ _response_types_map: Dict[str, Optional[str]] = {
710
+ '200': None,
711
+ '404': "GlobalErrorResponse",
712
+ }
713
+ response_data = self.api_client.call_api(
714
+ *_param,
715
+ _request_timeout=_request_timeout
716
+ )
717
+ response_data.read()
718
+ return self.api_client.response_deserialize(
719
+ response_data=response_data,
720
+ response_types_map=_response_types_map,
721
+ )
722
+
723
+
724
+ @validate_call
725
+ def payment_request_delete_without_preload_content(
726
+ self,
727
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
728
+ _request_timeout: Union[
729
+ None,
730
+ Annotated[StrictFloat, Field(gt=0)],
731
+ Tuple[
732
+ Annotated[StrictFloat, Field(gt=0)],
733
+ Annotated[StrictFloat, Field(gt=0)]
734
+ ]
735
+ ] = None,
736
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
737
+ _content_type: Optional[StrictStr] = None,
738
+ _headers: Optional[Dict[StrictStr, Any]] = None,
739
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
740
+ ) -> RESTResponseType:
741
+ """Delete
742
+
743
+ Deletes the payment request resource by its id
744
+
745
+ :param id: Payment request primary identifier (required)
746
+ :type id: str
747
+ :param _request_timeout: timeout setting for this request. If one
748
+ number provided, it will be total request
749
+ timeout. It can also be a pair (tuple) of
750
+ (connection, read) timeouts.
751
+ :type _request_timeout: int, tuple(int, int), optional
752
+ :param _request_auth: set to override the auth_settings for an a single
753
+ request; this effectively ignores the
754
+ authentication in the spec for a single request.
755
+ :type _request_auth: dict, optional
756
+ :param _content_type: force content-type for the request.
757
+ :type _content_type: str, Optional
758
+ :param _headers: set to override the headers for a single
759
+ request; this effectively ignores the headers
760
+ in the spec for a single request.
761
+ :type _headers: dict, optional
762
+ :param _host_index: set to override the host_index for a single
763
+ request; this effectively ignores the host_index
764
+ in the spec for a single request.
765
+ :type _host_index: int, optional
766
+ :return: Returns the result object.
767
+ """ # noqa: E501
768
+
769
+ _param = self._payment_request_delete_serialize(
770
+ id=id,
771
+ _request_auth=_request_auth,
772
+ _content_type=_content_type,
773
+ _headers=_headers,
774
+ _host_index=_host_index
775
+ )
776
+
777
+ _response_types_map: Dict[str, Optional[str]] = {
778
+ '200': None,
779
+ '404': "GlobalErrorResponse",
780
+ }
781
+ response_data = self.api_client.call_api(
782
+ *_param,
783
+ _request_timeout=_request_timeout
784
+ )
785
+ return response_data.response
786
+
787
+
788
+ def _payment_request_delete_serialize(
789
+ self,
790
+ id,
791
+ _request_auth,
792
+ _content_type,
793
+ _headers,
794
+ _host_index,
795
+ ) -> RequestSerialized:
796
+
797
+ _host = None
798
+
799
+ _collection_formats: Dict[str, str] = {
800
+ }
801
+
802
+ _path_params: Dict[str, str] = {}
803
+ _query_params: List[Tuple[str, str]] = []
804
+ _header_params: Dict[str, Optional[str]] = _headers or {}
805
+ _form_params: List[Tuple[str, str]] = []
806
+ _files: Dict[str, Union[str, bytes]] = {}
807
+ _body_params: Optional[bytes] = None
808
+
809
+ # process the path parameters
810
+ if id is not None:
811
+ _path_params['id'] = id
812
+ # process the query parameters
813
+ # process the header parameters
814
+ # process the form parameters
815
+ # process the body parameter
816
+
817
+
818
+ # set the HTTP header `Accept`
819
+ _header_params['Accept'] = self.api_client.select_header_accept(
820
+ [
821
+ 'application/json'
822
+ ]
823
+ )
824
+
825
+
826
+ # authentication setting
827
+ _auth_settings: List[str] = [
828
+ 'default'
829
+ ]
830
+
831
+ return self.api_client.param_serialize(
832
+ method='DELETE',
833
+ resource_path='/payments/requests/{id}',
834
+ path_params=_path_params,
835
+ query_params=_query_params,
836
+ header_params=_header_params,
837
+ body=_body_params,
838
+ post_params=_form_params,
839
+ files=_files,
840
+ auth_settings=_auth_settings,
841
+ collection_formats=_collection_formats,
842
+ _host=_host,
843
+ _request_auth=_request_auth
844
+ )
845
+
846
+
847
+
848
+
849
+ @validate_call
850
+ def payment_request_retrieve(
851
+ self,
852
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
853
+ _request_timeout: Union[
854
+ None,
855
+ Annotated[StrictFloat, Field(gt=0)],
856
+ Tuple[
857
+ Annotated[StrictFloat, Field(gt=0)],
858
+ Annotated[StrictFloat, Field(gt=0)]
859
+ ]
860
+ ] = None,
861
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
862
+ _content_type: Optional[StrictStr] = None,
863
+ _headers: Optional[Dict[StrictStr, Any]] = None,
864
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
865
+ ) -> PaymentRequest:
866
+ """Retrieve
867
+
868
+ Recovers the payment request resource by its id
869
+
870
+ :param id: Payment request primary identifier (required)
871
+ :type id: str
872
+ :param _request_timeout: timeout setting for this request. If one
873
+ number provided, it will be total request
874
+ timeout. It can also be a pair (tuple) of
875
+ (connection, read) timeouts.
876
+ :type _request_timeout: int, tuple(int, int), optional
877
+ :param _request_auth: set to override the auth_settings for an a single
878
+ request; this effectively ignores the
879
+ authentication in the spec for a single request.
880
+ :type _request_auth: dict, optional
881
+ :param _content_type: force content-type for the request.
882
+ :type _content_type: str, Optional
883
+ :param _headers: set to override the headers for a single
884
+ request; this effectively ignores the headers
885
+ in the spec for a single request.
886
+ :type _headers: dict, optional
887
+ :param _host_index: set to override the host_index for a single
888
+ request; this effectively ignores the host_index
889
+ in the spec for a single request.
890
+ :type _host_index: int, optional
891
+ :return: Returns the result object.
892
+ """ # noqa: E501
893
+
894
+ _param = self._payment_request_retrieve_serialize(
895
+ id=id,
896
+ _request_auth=_request_auth,
897
+ _content_type=_content_type,
898
+ _headers=_headers,
899
+ _host_index=_host_index
900
+ )
901
+
902
+ _response_types_map: Dict[str, Optional[str]] = {
903
+ '200': "PaymentRequest",
904
+ '404': "GlobalErrorResponse",
905
+ }
906
+ response_data = self.api_client.call_api(
907
+ *_param,
908
+ _request_timeout=_request_timeout
909
+ )
910
+ response_data.read()
911
+ return self.api_client.response_deserialize(
912
+ response_data=response_data,
913
+ response_types_map=_response_types_map,
914
+ ).data
915
+
916
+
917
+ @validate_call
918
+ def payment_request_retrieve_with_http_info(
919
+ self,
920
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
921
+ _request_timeout: Union[
922
+ None,
923
+ Annotated[StrictFloat, Field(gt=0)],
924
+ Tuple[
925
+ Annotated[StrictFloat, Field(gt=0)],
926
+ Annotated[StrictFloat, Field(gt=0)]
927
+ ]
928
+ ] = None,
929
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
930
+ _content_type: Optional[StrictStr] = None,
931
+ _headers: Optional[Dict[StrictStr, Any]] = None,
932
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
933
+ ) -> ApiResponse[PaymentRequest]:
934
+ """Retrieve
935
+
936
+ Recovers the payment request resource by its id
937
+
938
+ :param id: Payment request primary identifier (required)
939
+ :type id: str
940
+ :param _request_timeout: timeout setting for this request. If one
941
+ number provided, it will be total request
942
+ timeout. It can also be a pair (tuple) of
943
+ (connection, read) timeouts.
944
+ :type _request_timeout: int, tuple(int, int), optional
945
+ :param _request_auth: set to override the auth_settings for an a single
946
+ request; this effectively ignores the
947
+ authentication in the spec for a single request.
948
+ :type _request_auth: dict, optional
949
+ :param _content_type: force content-type for the request.
950
+ :type _content_type: str, Optional
951
+ :param _headers: set to override the headers for a single
952
+ request; this effectively ignores the headers
953
+ in the spec for a single request.
954
+ :type _headers: dict, optional
955
+ :param _host_index: set to override the host_index for a single
956
+ request; this effectively ignores the host_index
957
+ in the spec for a single request.
958
+ :type _host_index: int, optional
959
+ :return: Returns the result object.
960
+ """ # noqa: E501
961
+
962
+ _param = self._payment_request_retrieve_serialize(
963
+ id=id,
964
+ _request_auth=_request_auth,
965
+ _content_type=_content_type,
966
+ _headers=_headers,
967
+ _host_index=_host_index
968
+ )
969
+
970
+ _response_types_map: Dict[str, Optional[str]] = {
971
+ '200': "PaymentRequest",
972
+ '404': "GlobalErrorResponse",
973
+ }
974
+ response_data = self.api_client.call_api(
975
+ *_param,
976
+ _request_timeout=_request_timeout
977
+ )
978
+ response_data.read()
979
+ return self.api_client.response_deserialize(
980
+ response_data=response_data,
981
+ response_types_map=_response_types_map,
982
+ )
983
+
984
+
985
+ @validate_call
986
+ def payment_request_retrieve_without_preload_content(
987
+ self,
988
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
989
+ _request_timeout: Union[
990
+ None,
991
+ Annotated[StrictFloat, Field(gt=0)],
992
+ Tuple[
993
+ Annotated[StrictFloat, Field(gt=0)],
994
+ Annotated[StrictFloat, Field(gt=0)]
995
+ ]
996
+ ] = None,
997
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
998
+ _content_type: Optional[StrictStr] = None,
999
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1000
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1001
+ ) -> RESTResponseType:
1002
+ """Retrieve
1003
+
1004
+ Recovers the payment request resource by its id
1005
+
1006
+ :param id: Payment request primary identifier (required)
1007
+ :type id: str
1008
+ :param _request_timeout: timeout setting for this request. If one
1009
+ number provided, it will be total request
1010
+ timeout. It can also be a pair (tuple) of
1011
+ (connection, read) timeouts.
1012
+ :type _request_timeout: int, tuple(int, int), optional
1013
+ :param _request_auth: set to override the auth_settings for an a single
1014
+ request; this effectively ignores the
1015
+ authentication in the spec for a single request.
1016
+ :type _request_auth: dict, optional
1017
+ :param _content_type: force content-type for the request.
1018
+ :type _content_type: str, Optional
1019
+ :param _headers: set to override the headers for a single
1020
+ request; this effectively ignores the headers
1021
+ in the spec for a single request.
1022
+ :type _headers: dict, optional
1023
+ :param _host_index: set to override the host_index for a single
1024
+ request; this effectively ignores the host_index
1025
+ in the spec for a single request.
1026
+ :type _host_index: int, optional
1027
+ :return: Returns the result object.
1028
+ """ # noqa: E501
1029
+
1030
+ _param = self._payment_request_retrieve_serialize(
1031
+ id=id,
1032
+ _request_auth=_request_auth,
1033
+ _content_type=_content_type,
1034
+ _headers=_headers,
1035
+ _host_index=_host_index
1036
+ )
1037
+
1038
+ _response_types_map: Dict[str, Optional[str]] = {
1039
+ '200': "PaymentRequest",
1040
+ '404': "GlobalErrorResponse",
1041
+ }
1042
+ response_data = self.api_client.call_api(
1043
+ *_param,
1044
+ _request_timeout=_request_timeout
1045
+ )
1046
+ return response_data.response
1047
+
1048
+
1049
+ def _payment_request_retrieve_serialize(
1050
+ self,
1051
+ id,
1052
+ _request_auth,
1053
+ _content_type,
1054
+ _headers,
1055
+ _host_index,
1056
+ ) -> RequestSerialized:
1057
+
1058
+ _host = None
1059
+
1060
+ _collection_formats: Dict[str, str] = {
1061
+ }
1062
+
1063
+ _path_params: Dict[str, str] = {}
1064
+ _query_params: List[Tuple[str, str]] = []
1065
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1066
+ _form_params: List[Tuple[str, str]] = []
1067
+ _files: Dict[str, Union[str, bytes]] = {}
1068
+ _body_params: Optional[bytes] = None
1069
+
1070
+ # process the path parameters
1071
+ if id is not None:
1072
+ _path_params['id'] = id
1073
+ # process the query parameters
1074
+ # process the header parameters
1075
+ # process the form parameters
1076
+ # process the body parameter
1077
+
1078
+
1079
+ # set the HTTP header `Accept`
1080
+ _header_params['Accept'] = self.api_client.select_header_accept(
1081
+ [
1082
+ 'application/json'
1083
+ ]
1084
+ )
1085
+
1086
+
1087
+ # authentication setting
1088
+ _auth_settings: List[str] = [
1089
+ 'default'
1090
+ ]
1091
+
1092
+ return self.api_client.param_serialize(
1093
+ method='GET',
1094
+ resource_path='/payments/requests/{id}',
1095
+ path_params=_path_params,
1096
+ query_params=_query_params,
1097
+ header_params=_header_params,
1098
+ body=_body_params,
1099
+ post_params=_form_params,
1100
+ files=_files,
1101
+ auth_settings=_auth_settings,
1102
+ collection_formats=_collection_formats,
1103
+ _host=_host,
1104
+ _request_auth=_request_auth
1105
+ )
1106
+
1107
+
1108
+
1109
+
1110
+ @validate_call
1111
+ def payment_request_update(
1112
+ self,
1113
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
1114
+ update_payment_request: UpdatePaymentRequest,
1115
+ _request_timeout: Union[
1116
+ None,
1117
+ Annotated[StrictFloat, Field(gt=0)],
1118
+ Tuple[
1119
+ Annotated[StrictFloat, Field(gt=0)],
1120
+ Annotated[StrictFloat, Field(gt=0)]
1121
+ ]
1122
+ ] = None,
1123
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1124
+ _content_type: Optional[StrictStr] = None,
1125
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1126
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1127
+ ) -> CreatePaymentRequest:
1128
+ """Update
1129
+
1130
+ Updates the payment request resource
1131
+
1132
+ :param id: Payment request primary identifier (required)
1133
+ :type id: str
1134
+ :param update_payment_request: (required)
1135
+ :type update_payment_request: UpdatePaymentRequest
1136
+ :param _request_timeout: timeout setting for this request. If one
1137
+ number provided, it will be total request
1138
+ timeout. It can also be a pair (tuple) of
1139
+ (connection, read) timeouts.
1140
+ :type _request_timeout: int, tuple(int, int), optional
1141
+ :param _request_auth: set to override the auth_settings for an a single
1142
+ request; this effectively ignores the
1143
+ authentication in the spec for a single request.
1144
+ :type _request_auth: dict, optional
1145
+ :param _content_type: force content-type for the request.
1146
+ :type _content_type: str, Optional
1147
+ :param _headers: set to override the headers for a single
1148
+ request; this effectively ignores the headers
1149
+ in the spec for a single request.
1150
+ :type _headers: dict, optional
1151
+ :param _host_index: set to override the host_index for a single
1152
+ request; this effectively ignores the host_index
1153
+ in the spec for a single request.
1154
+ :type _host_index: int, optional
1155
+ :return: Returns the result object.
1156
+ """ # noqa: E501
1157
+
1158
+ _param = self._payment_request_update_serialize(
1159
+ id=id,
1160
+ update_payment_request=update_payment_request,
1161
+ _request_auth=_request_auth,
1162
+ _content_type=_content_type,
1163
+ _headers=_headers,
1164
+ _host_index=_host_index
1165
+ )
1166
+
1167
+ _response_types_map: Dict[str, Optional[str]] = {
1168
+ '200': "CreatePaymentRequest",
1169
+ }
1170
+ response_data = self.api_client.call_api(
1171
+ *_param,
1172
+ _request_timeout=_request_timeout
1173
+ )
1174
+ response_data.read()
1175
+ return self.api_client.response_deserialize(
1176
+ response_data=response_data,
1177
+ response_types_map=_response_types_map,
1178
+ ).data
1179
+
1180
+
1181
+ @validate_call
1182
+ def payment_request_update_with_http_info(
1183
+ self,
1184
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
1185
+ update_payment_request: UpdatePaymentRequest,
1186
+ _request_timeout: Union[
1187
+ None,
1188
+ Annotated[StrictFloat, Field(gt=0)],
1189
+ Tuple[
1190
+ Annotated[StrictFloat, Field(gt=0)],
1191
+ Annotated[StrictFloat, Field(gt=0)]
1192
+ ]
1193
+ ] = None,
1194
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1195
+ _content_type: Optional[StrictStr] = None,
1196
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1197
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1198
+ ) -> ApiResponse[CreatePaymentRequest]:
1199
+ """Update
1200
+
1201
+ Updates the payment request resource
1202
+
1203
+ :param id: Payment request primary identifier (required)
1204
+ :type id: str
1205
+ :param update_payment_request: (required)
1206
+ :type update_payment_request: UpdatePaymentRequest
1207
+ :param _request_timeout: timeout setting for this request. If one
1208
+ number provided, it will be total request
1209
+ timeout. It can also be a pair (tuple) of
1210
+ (connection, read) timeouts.
1211
+ :type _request_timeout: int, tuple(int, int), optional
1212
+ :param _request_auth: set to override the auth_settings for an a single
1213
+ request; this effectively ignores the
1214
+ authentication in the spec for a single request.
1215
+ :type _request_auth: dict, optional
1216
+ :param _content_type: force content-type for the request.
1217
+ :type _content_type: str, Optional
1218
+ :param _headers: set to override the headers for a single
1219
+ request; this effectively ignores the headers
1220
+ in the spec for a single request.
1221
+ :type _headers: dict, optional
1222
+ :param _host_index: set to override the host_index for a single
1223
+ request; this effectively ignores the host_index
1224
+ in the spec for a single request.
1225
+ :type _host_index: int, optional
1226
+ :return: Returns the result object.
1227
+ """ # noqa: E501
1228
+
1229
+ _param = self._payment_request_update_serialize(
1230
+ id=id,
1231
+ update_payment_request=update_payment_request,
1232
+ _request_auth=_request_auth,
1233
+ _content_type=_content_type,
1234
+ _headers=_headers,
1235
+ _host_index=_host_index
1236
+ )
1237
+
1238
+ _response_types_map: Dict[str, Optional[str]] = {
1239
+ '200': "CreatePaymentRequest",
1240
+ }
1241
+ response_data = self.api_client.call_api(
1242
+ *_param,
1243
+ _request_timeout=_request_timeout
1244
+ )
1245
+ response_data.read()
1246
+ return self.api_client.response_deserialize(
1247
+ response_data=response_data,
1248
+ response_types_map=_response_types_map,
1249
+ )
1250
+
1251
+
1252
+ @validate_call
1253
+ def payment_request_update_without_preload_content(
1254
+ self,
1255
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
1256
+ update_payment_request: UpdatePaymentRequest,
1257
+ _request_timeout: Union[
1258
+ None,
1259
+ Annotated[StrictFloat, Field(gt=0)],
1260
+ Tuple[
1261
+ Annotated[StrictFloat, Field(gt=0)],
1262
+ Annotated[StrictFloat, Field(gt=0)]
1263
+ ]
1264
+ ] = None,
1265
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1266
+ _content_type: Optional[StrictStr] = None,
1267
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1268
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1269
+ ) -> RESTResponseType:
1270
+ """Update
1271
+
1272
+ Updates the payment request resource
1273
+
1274
+ :param id: Payment request primary identifier (required)
1275
+ :type id: str
1276
+ :param update_payment_request: (required)
1277
+ :type update_payment_request: UpdatePaymentRequest
1278
+ :param _request_timeout: timeout setting for this request. If one
1279
+ number provided, it will be total request
1280
+ timeout. It can also be a pair (tuple) of
1281
+ (connection, read) timeouts.
1282
+ :type _request_timeout: int, tuple(int, int), optional
1283
+ :param _request_auth: set to override the auth_settings for an a single
1284
+ request; this effectively ignores the
1285
+ authentication in the spec for a single request.
1286
+ :type _request_auth: dict, optional
1287
+ :param _content_type: force content-type for the request.
1288
+ :type _content_type: str, Optional
1289
+ :param _headers: set to override the headers for a single
1290
+ request; this effectively ignores the headers
1291
+ in the spec for a single request.
1292
+ :type _headers: dict, optional
1293
+ :param _host_index: set to override the host_index for a single
1294
+ request; this effectively ignores the host_index
1295
+ in the spec for a single request.
1296
+ :type _host_index: int, optional
1297
+ :return: Returns the result object.
1298
+ """ # noqa: E501
1299
+
1300
+ _param = self._payment_request_update_serialize(
1301
+ id=id,
1302
+ update_payment_request=update_payment_request,
1303
+ _request_auth=_request_auth,
1304
+ _content_type=_content_type,
1305
+ _headers=_headers,
1306
+ _host_index=_host_index
1307
+ )
1308
+
1309
+ _response_types_map: Dict[str, Optional[str]] = {
1310
+ '200': "CreatePaymentRequest",
1311
+ }
1312
+ response_data = self.api_client.call_api(
1313
+ *_param,
1314
+ _request_timeout=_request_timeout
1315
+ )
1316
+ return response_data.response
1317
+
1318
+
1319
+ def _payment_request_update_serialize(
1320
+ self,
1321
+ id,
1322
+ update_payment_request,
1323
+ _request_auth,
1324
+ _content_type,
1325
+ _headers,
1326
+ _host_index,
1327
+ ) -> RequestSerialized:
1328
+
1329
+ _host = None
1330
+
1331
+ _collection_formats: Dict[str, str] = {
1332
+ }
1333
+
1334
+ _path_params: Dict[str, str] = {}
1335
+ _query_params: List[Tuple[str, str]] = []
1336
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1337
+ _form_params: List[Tuple[str, str]] = []
1338
+ _files: Dict[str, Union[str, bytes]] = {}
1339
+ _body_params: Optional[bytes] = None
1340
+
1341
+ # process the path parameters
1342
+ if id is not None:
1343
+ _path_params['id'] = id
1344
+ # process the query parameters
1345
+ # process the header parameters
1346
+ # process the form parameters
1347
+ # process the body parameter
1348
+ if update_payment_request is not None:
1349
+ _body_params = update_payment_request
1350
+
1351
+
1352
+ # set the HTTP header `Accept`
1353
+ _header_params['Accept'] = self.api_client.select_header_accept(
1354
+ [
1355
+ 'application/json'
1356
+ ]
1357
+ )
1358
+
1359
+ # set the HTTP header `Content-Type`
1360
+ if _content_type:
1361
+ _header_params['Content-Type'] = _content_type
1362
+ else:
1363
+ _default_content_type = (
1364
+ self.api_client.select_header_content_type(
1365
+ [
1366
+ 'application/json'
1367
+ ]
1368
+ )
1369
+ )
1370
+ if _default_content_type is not None:
1371
+ _header_params['Content-Type'] = _default_content_type
1372
+
1373
+ # authentication setting
1374
+ _auth_settings: List[str] = [
1375
+ 'default'
1376
+ ]
1377
+
1378
+ return self.api_client.param_serialize(
1379
+ method='PATCH',
1380
+ resource_path='/payments/requests/{id}',
1381
+ path_params=_path_params,
1382
+ query_params=_query_params,
1383
+ header_params=_header_params,
1384
+ body=_body_params,
1385
+ post_params=_form_params,
1386
+ files=_files,
1387
+ auth_settings=_auth_settings,
1388
+ collection_formats=_collection_formats,
1389
+ _host=_host,
1390
+ _request_auth=_request_auth
1391
+ )
1392
+
1393
+
1394
+
1395
+
1396
+ @validate_call
1397
+ def payment_requests_list(
1398
+ self,
1399
+ _request_timeout: Union[
1400
+ None,
1401
+ Annotated[StrictFloat, Field(gt=0)],
1402
+ Tuple[
1403
+ Annotated[StrictFloat, Field(gt=0)],
1404
+ Annotated[StrictFloat, Field(gt=0)]
1405
+ ]
1406
+ ] = None,
1407
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1408
+ _content_type: Optional[StrictStr] = None,
1409
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1410
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1411
+ ) -> PaymentRequestsList200Response:
1412
+ """List
1413
+
1414
+ Recovers all created payment requests
1415
+
1416
+ :param _request_timeout: timeout setting for this request. If one
1417
+ number provided, it will be total request
1418
+ timeout. It can also be a pair (tuple) of
1419
+ (connection, read) timeouts.
1420
+ :type _request_timeout: int, tuple(int, int), optional
1421
+ :param _request_auth: set to override the auth_settings for an a single
1422
+ request; this effectively ignores the
1423
+ authentication in the spec for a single request.
1424
+ :type _request_auth: dict, optional
1425
+ :param _content_type: force content-type for the request.
1426
+ :type _content_type: str, Optional
1427
+ :param _headers: set to override the headers for a single
1428
+ request; this effectively ignores the headers
1429
+ in the spec for a single request.
1430
+ :type _headers: dict, optional
1431
+ :param _host_index: set to override the host_index for a single
1432
+ request; this effectively ignores the host_index
1433
+ in the spec for a single request.
1434
+ :type _host_index: int, optional
1435
+ :return: Returns the result object.
1436
+ """ # noqa: E501
1437
+
1438
+ _param = self._payment_requests_list_serialize(
1439
+ _request_auth=_request_auth,
1440
+ _content_type=_content_type,
1441
+ _headers=_headers,
1442
+ _host_index=_host_index
1443
+ )
1444
+
1445
+ _response_types_map: Dict[str, Optional[str]] = {
1446
+ '200': "PaymentRequestsList200Response",
1447
+ }
1448
+ response_data = self.api_client.call_api(
1449
+ *_param,
1450
+ _request_timeout=_request_timeout
1451
+ )
1452
+ response_data.read()
1453
+ return self.api_client.response_deserialize(
1454
+ response_data=response_data,
1455
+ response_types_map=_response_types_map,
1456
+ ).data
1457
+
1458
+
1459
+ @validate_call
1460
+ def payment_requests_list_with_http_info(
1461
+ self,
1462
+ _request_timeout: Union[
1463
+ None,
1464
+ Annotated[StrictFloat, Field(gt=0)],
1465
+ Tuple[
1466
+ Annotated[StrictFloat, Field(gt=0)],
1467
+ Annotated[StrictFloat, Field(gt=0)]
1468
+ ]
1469
+ ] = None,
1470
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1471
+ _content_type: Optional[StrictStr] = None,
1472
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1473
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1474
+ ) -> ApiResponse[PaymentRequestsList200Response]:
1475
+ """List
1476
+
1477
+ Recovers all created payment requests
1478
+
1479
+ :param _request_timeout: timeout setting for this request. If one
1480
+ number provided, it will be total request
1481
+ timeout. It can also be a pair (tuple) of
1482
+ (connection, read) timeouts.
1483
+ :type _request_timeout: int, tuple(int, int), optional
1484
+ :param _request_auth: set to override the auth_settings for an a single
1485
+ request; this effectively ignores the
1486
+ authentication in the spec for a single request.
1487
+ :type _request_auth: dict, optional
1488
+ :param _content_type: force content-type for the request.
1489
+ :type _content_type: str, Optional
1490
+ :param _headers: set to override the headers for a single
1491
+ request; this effectively ignores the headers
1492
+ in the spec for a single request.
1493
+ :type _headers: dict, optional
1494
+ :param _host_index: set to override the host_index for a single
1495
+ request; this effectively ignores the host_index
1496
+ in the spec for a single request.
1497
+ :type _host_index: int, optional
1498
+ :return: Returns the result object.
1499
+ """ # noqa: E501
1500
+
1501
+ _param = self._payment_requests_list_serialize(
1502
+ _request_auth=_request_auth,
1503
+ _content_type=_content_type,
1504
+ _headers=_headers,
1505
+ _host_index=_host_index
1506
+ )
1507
+
1508
+ _response_types_map: Dict[str, Optional[str]] = {
1509
+ '200': "PaymentRequestsList200Response",
1510
+ }
1511
+ response_data = self.api_client.call_api(
1512
+ *_param,
1513
+ _request_timeout=_request_timeout
1514
+ )
1515
+ response_data.read()
1516
+ return self.api_client.response_deserialize(
1517
+ response_data=response_data,
1518
+ response_types_map=_response_types_map,
1519
+ )
1520
+
1521
+
1522
+ @validate_call
1523
+ def payment_requests_list_without_preload_content(
1524
+ self,
1525
+ _request_timeout: Union[
1526
+ None,
1527
+ Annotated[StrictFloat, Field(gt=0)],
1528
+ Tuple[
1529
+ Annotated[StrictFloat, Field(gt=0)],
1530
+ Annotated[StrictFloat, Field(gt=0)]
1531
+ ]
1532
+ ] = None,
1533
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1534
+ _content_type: Optional[StrictStr] = None,
1535
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1536
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1537
+ ) -> RESTResponseType:
1538
+ """List
1539
+
1540
+ Recovers all created payment requests
1541
+
1542
+ :param _request_timeout: timeout setting for this request. If one
1543
+ number provided, it will be total request
1544
+ timeout. It can also be a pair (tuple) of
1545
+ (connection, read) timeouts.
1546
+ :type _request_timeout: int, tuple(int, int), optional
1547
+ :param _request_auth: set to override the auth_settings for an a single
1548
+ request; this effectively ignores the
1549
+ authentication in the spec for a single request.
1550
+ :type _request_auth: dict, optional
1551
+ :param _content_type: force content-type for the request.
1552
+ :type _content_type: str, Optional
1553
+ :param _headers: set to override the headers for a single
1554
+ request; this effectively ignores the headers
1555
+ in the spec for a single request.
1556
+ :type _headers: dict, optional
1557
+ :param _host_index: set to override the host_index for a single
1558
+ request; this effectively ignores the host_index
1559
+ in the spec for a single request.
1560
+ :type _host_index: int, optional
1561
+ :return: Returns the result object.
1562
+ """ # noqa: E501
1563
+
1564
+ _param = self._payment_requests_list_serialize(
1565
+ _request_auth=_request_auth,
1566
+ _content_type=_content_type,
1567
+ _headers=_headers,
1568
+ _host_index=_host_index
1569
+ )
1570
+
1571
+ _response_types_map: Dict[str, Optional[str]] = {
1572
+ '200': "PaymentRequestsList200Response",
1573
+ }
1574
+ response_data = self.api_client.call_api(
1575
+ *_param,
1576
+ _request_timeout=_request_timeout
1577
+ )
1578
+ return response_data.response
1579
+
1580
+
1581
+ def _payment_requests_list_serialize(
1582
+ self,
1583
+ _request_auth,
1584
+ _content_type,
1585
+ _headers,
1586
+ _host_index,
1587
+ ) -> RequestSerialized:
1588
+
1589
+ _host = None
1590
+
1591
+ _collection_formats: Dict[str, str] = {
1592
+ }
1593
+
1594
+ _path_params: Dict[str, str] = {}
1595
+ _query_params: List[Tuple[str, str]] = []
1596
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1597
+ _form_params: List[Tuple[str, str]] = []
1598
+ _files: Dict[str, Union[str, bytes]] = {}
1599
+ _body_params: Optional[bytes] = None
1600
+
1601
+ # process the path parameters
1602
+ # process the query parameters
1603
+ # process the header parameters
1604
+ # process the form parameters
1605
+ # process the body parameter
1606
+
1607
+
1608
+ # set the HTTP header `Accept`
1609
+ _header_params['Accept'] = self.api_client.select_header_accept(
1610
+ [
1611
+ 'application/json'
1612
+ ]
1613
+ )
1614
+
1615
+
1616
+ # authentication setting
1617
+ _auth_settings: List[str] = [
1618
+ 'default'
1619
+ ]
1620
+
1621
+ return self.api_client.param_serialize(
1622
+ method='GET',
1623
+ resource_path='/payments/requests',
1624
+ path_params=_path_params,
1625
+ query_params=_query_params,
1626
+ header_params=_header_params,
1627
+ body=_body_params,
1628
+ post_params=_form_params,
1629
+ files=_files,
1630
+ auth_settings=_auth_settings,
1631
+ collection_formats=_collection_formats,
1632
+ _host=_host,
1633
+ _request_auth=_request_auth
1634
+ )
1635
+
1636
+