pluggy-sdk 1.0.0.post34__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 (221) hide show
  1. pluggy_sdk/__init__.py +200 -0
  2. pluggy_sdk/api/__init__.py +25 -0
  3. pluggy_sdk/api/account_api.py +588 -0
  4. pluggy_sdk/api/acquirer_anticipation_api.py +664 -0
  5. pluggy_sdk/api/acquirer_receivable_api.py +664 -0
  6. pluggy_sdk/api/acquirer_sale_api.py +664 -0
  7. pluggy_sdk/api/auth_api.py +605 -0
  8. pluggy_sdk/api/benefit_api.py +567 -0
  9. pluggy_sdk/api/bill_api.py +567 -0
  10. pluggy_sdk/api/bulk_payment_api.py +1127 -0
  11. pluggy_sdk/api/category_api.py +1096 -0
  12. pluggy_sdk/api/connector_api.py +979 -0
  13. pluggy_sdk/api/consent_api.py +576 -0
  14. pluggy_sdk/api/identity_api.py +581 -0
  15. pluggy_sdk/api/income_report_api.py +311 -0
  16. pluggy_sdk/api/investment_api.py +918 -0
  17. pluggy_sdk/api/items_api.py +1456 -0
  18. pluggy_sdk/api/loan_api.py +567 -0
  19. pluggy_sdk/api/payment_customer_api.py +1414 -0
  20. pluggy_sdk/api/payment_intent_api.py +842 -0
  21. pluggy_sdk/api/payment_receipts_api.py +842 -0
  22. pluggy_sdk/api/payment_recipient_api.py +1997 -0
  23. pluggy_sdk/api/payment_request_api.py +2739 -0
  24. pluggy_sdk/api/payment_schedule_api.py +823 -0
  25. pluggy_sdk/api/payroll_loan_api.py +561 -0
  26. pluggy_sdk/api/portfolio_yield_api.py +580 -0
  27. pluggy_sdk/api/smart_account_api.py +1704 -0
  28. pluggy_sdk/api/smart_account_transfer_api.py +610 -0
  29. pluggy_sdk/api/smart_transfer_api.py +1406 -0
  30. pluggy_sdk/api/transaction_api.py +963 -0
  31. pluggy_sdk/api/webhook_api.py +1406 -0
  32. pluggy_sdk/api_client.py +798 -0
  33. pluggy_sdk/api_response.py +21 -0
  34. pluggy_sdk/configuration.py +596 -0
  35. pluggy_sdk/exceptions.py +217 -0
  36. pluggy_sdk/models/__init__.py +163 -0
  37. pluggy_sdk/models/account.py +134 -0
  38. pluggy_sdk/models/accounts_list200_response.py +102 -0
  39. pluggy_sdk/models/acquirer_anticipation.py +117 -0
  40. pluggy_sdk/models/acquirer_anticipation_data.py +101 -0
  41. pluggy_sdk/models/acquirer_data.py +113 -0
  42. pluggy_sdk/models/acquirer_receivable.py +143 -0
  43. pluggy_sdk/models/acquirer_receivable_data.py +108 -0
  44. pluggy_sdk/models/acquirer_receivable_data_establishment.py +96 -0
  45. pluggy_sdk/models/acquirer_receivable_destination_account.py +92 -0
  46. pluggy_sdk/models/acquirer_receivable_related_sale.py +99 -0
  47. pluggy_sdk/models/acquirer_sale.py +171 -0
  48. pluggy_sdk/models/acquirer_sale_data.py +150 -0
  49. pluggy_sdk/models/acquirer_sale_installment.py +93 -0
  50. pluggy_sdk/models/acquirer_sale_installment_data.py +95 -0
  51. pluggy_sdk/models/address.py +110 -0
  52. pluggy_sdk/models/aggregated_portfolio.py +120 -0
  53. pluggy_sdk/models/aggregated_portfolio_response.py +102 -0
  54. pluggy_sdk/models/asset_distribution.py +88 -0
  55. pluggy_sdk/models/auth_request.py +90 -0
  56. pluggy_sdk/models/auth_response.py +88 -0
  57. pluggy_sdk/models/bank_data.py +92 -0
  58. pluggy_sdk/models/benefit_loan.py +121 -0
  59. pluggy_sdk/models/benefit_loan_client.py +102 -0
  60. pluggy_sdk/models/benefit_response.py +118 -0
  61. pluggy_sdk/models/benefit_response_paying_institution.py +94 -0
  62. pluggy_sdk/models/benefits_list200_response.py +102 -0
  63. pluggy_sdk/models/bill.py +109 -0
  64. pluggy_sdk/models/bill_finance_charge.py +103 -0
  65. pluggy_sdk/models/bills_list200_response.py +102 -0
  66. pluggy_sdk/models/boleto.py +121 -0
  67. pluggy_sdk/models/boleto_payer.py +90 -0
  68. pluggy_sdk/models/boleto_recipient.py +90 -0
  69. pluggy_sdk/models/bulk_payment.py +128 -0
  70. pluggy_sdk/models/bulk_payments_list200_response.py +102 -0
  71. pluggy_sdk/models/category.py +96 -0
  72. pluggy_sdk/models/client_category_rule.py +98 -0
  73. pluggy_sdk/models/company.py +90 -0
  74. pluggy_sdk/models/connect_token_request.py +94 -0
  75. pluggy_sdk/models/connect_token_response.py +88 -0
  76. pluggy_sdk/models/connector.py +145 -0
  77. pluggy_sdk/models/connector_credential.py +121 -0
  78. pluggy_sdk/models/connector_health.py +96 -0
  79. pluggy_sdk/models/connector_health_details.py +90 -0
  80. pluggy_sdk/models/connector_list_response.py +102 -0
  81. pluggy_sdk/models/connector_user_action.py +93 -0
  82. pluggy_sdk/models/consent.py +120 -0
  83. pluggy_sdk/models/create_boleto_payment_request.py +98 -0
  84. pluggy_sdk/models/create_bulk_payment.py +96 -0
  85. pluggy_sdk/models/create_client_category_rule.py +96 -0
  86. pluggy_sdk/models/create_item.py +115 -0
  87. pluggy_sdk/models/create_item_parameters.py +144 -0
  88. pluggy_sdk/models/create_or_update_payment_customer.py +105 -0
  89. pluggy_sdk/models/create_payment_customer_request_body.py +103 -0
  90. pluggy_sdk/models/create_payment_intent.py +110 -0
  91. pluggy_sdk/models/create_payment_recipient.py +104 -0
  92. pluggy_sdk/models/create_payment_request.py +115 -0
  93. pluggy_sdk/models/create_payment_request_schedule.py +189 -0
  94. pluggy_sdk/models/create_pix_qr_payment_request.py +96 -0
  95. pluggy_sdk/models/create_smart_account_request.py +104 -0
  96. pluggy_sdk/models/create_smart_account_transfer_request.py +92 -0
  97. pluggy_sdk/models/create_smart_transfer_payment.py +96 -0
  98. pluggy_sdk/models/create_smart_transfer_preauthorization.py +104 -0
  99. pluggy_sdk/models/create_webhook.py +99 -0
  100. pluggy_sdk/models/credential_select_option.py +90 -0
  101. pluggy_sdk/models/credit_card_metadata.py +101 -0
  102. pluggy_sdk/models/credit_data.py +127 -0
  103. pluggy_sdk/models/custom.py +100 -0
  104. pluggy_sdk/models/daily.py +101 -0
  105. pluggy_sdk/models/document.py +100 -0
  106. pluggy_sdk/models/email.py +100 -0
  107. pluggy_sdk/models/global_error_response.py +94 -0
  108. pluggy_sdk/models/i_count_response.py +88 -0
  109. pluggy_sdk/models/identity_relation.py +102 -0
  110. pluggy_sdk/models/identity_response.py +173 -0
  111. pluggy_sdk/models/identity_response_financial_relationships.py +111 -0
  112. pluggy_sdk/models/identity_response_financial_relationships_accounts_inner.py +98 -0
  113. pluggy_sdk/models/identity_response_financial_relationships_procurators_inner.py +101 -0
  114. pluggy_sdk/models/identity_response_qualifications.py +112 -0
  115. pluggy_sdk/models/identity_response_qualifications_informed_income.py +100 -0
  116. pluggy_sdk/models/identity_response_qualifications_informed_patrimony.py +90 -0
  117. pluggy_sdk/models/income_report.py +90 -0
  118. pluggy_sdk/models/income_reports_response.py +102 -0
  119. pluggy_sdk/models/investment.py +192 -0
  120. pluggy_sdk/models/investment_expenses.py +108 -0
  121. pluggy_sdk/models/investment_metadata.py +100 -0
  122. pluggy_sdk/models/investment_transaction.py +124 -0
  123. pluggy_sdk/models/investments_list200_response.py +102 -0
  124. pluggy_sdk/models/item.py +150 -0
  125. pluggy_sdk/models/item_creation_error_response.py +102 -0
  126. pluggy_sdk/models/item_error.py +94 -0
  127. pluggy_sdk/models/item_options.py +94 -0
  128. pluggy_sdk/models/loan.py +199 -0
  129. pluggy_sdk/models/loan_contracted_fee.py +118 -0
  130. pluggy_sdk/models/loan_contracted_finance_charge.py +92 -0
  131. pluggy_sdk/models/loan_installment_balloon_payment.py +95 -0
  132. pluggy_sdk/models/loan_installment_balloon_payment_amount.py +90 -0
  133. pluggy_sdk/models/loan_installments.py +130 -0
  134. pluggy_sdk/models/loan_interest_rate.py +136 -0
  135. pluggy_sdk/models/loan_payment_release.py +103 -0
  136. pluggy_sdk/models/loan_payment_release_over_parcel.py +106 -0
  137. pluggy_sdk/models/loan_payment_release_over_parcel_charge.py +92 -0
  138. pluggy_sdk/models/loan_payment_release_over_parcel_fee.py +92 -0
  139. pluggy_sdk/models/loan_payments.py +98 -0
  140. pluggy_sdk/models/loan_warranty.py +94 -0
  141. pluggy_sdk/models/loans_list200_response.py +102 -0
  142. pluggy_sdk/models/merchant.py +96 -0
  143. pluggy_sdk/models/monthly.py +103 -0
  144. pluggy_sdk/models/monthly_portfolio.py +100 -0
  145. pluggy_sdk/models/monthly_portfolio_response.py +102 -0
  146. pluggy_sdk/models/not_authenticated_response.py +90 -0
  147. pluggy_sdk/models/page_response_acquirer_anticipations.py +102 -0
  148. pluggy_sdk/models/page_response_acquirer_receivables.py +102 -0
  149. pluggy_sdk/models/page_response_acquirer_sales.py +102 -0
  150. pluggy_sdk/models/page_response_category_rules.py +102 -0
  151. pluggy_sdk/models/page_response_consents.py +102 -0
  152. pluggy_sdk/models/page_response_investment_transactions.py +102 -0
  153. pluggy_sdk/models/page_response_transactions.py +102 -0
  154. pluggy_sdk/models/parameter_validation_error.py +92 -0
  155. pluggy_sdk/models/parameter_validation_response.py +98 -0
  156. pluggy_sdk/models/payment_customer.py +105 -0
  157. pluggy_sdk/models/payment_customers_list200_response.py +102 -0
  158. pluggy_sdk/models/payment_data.py +111 -0
  159. pluggy_sdk/models/payment_data_boleto_metadata.py +98 -0
  160. pluggy_sdk/models/payment_data_participant.py +102 -0
  161. pluggy_sdk/models/payment_institution.py +101 -0
  162. pluggy_sdk/models/payment_intent.py +145 -0
  163. pluggy_sdk/models/payment_intent_parameter.py +90 -0
  164. pluggy_sdk/models/payment_intents_list200_response.py +102 -0
  165. pluggy_sdk/models/payment_receipt.py +120 -0
  166. pluggy_sdk/models/payment_receipt_bank_account.py +92 -0
  167. pluggy_sdk/models/payment_receipt_person.py +96 -0
  168. pluggy_sdk/models/payment_recipient.py +110 -0
  169. pluggy_sdk/models/payment_recipient_account.py +92 -0
  170. pluggy_sdk/models/payment_recipients_institution_list200_response.py +102 -0
  171. pluggy_sdk/models/payment_recipients_list200_response.py +102 -0
  172. pluggy_sdk/models/payment_request.py +132 -0
  173. pluggy_sdk/models/payment_request_callback_urls.py +92 -0
  174. pluggy_sdk/models/payment_request_receipt_list200_response.py +102 -0
  175. pluggy_sdk/models/payment_request_schedule.py +183 -0
  176. pluggy_sdk/models/payment_requests_list200_response.py +102 -0
  177. pluggy_sdk/models/payment_schedules_list200_response.py +102 -0
  178. pluggy_sdk/models/payroll_loan.py +121 -0
  179. pluggy_sdk/models/payroll_loan_client.py +102 -0
  180. pluggy_sdk/models/payroll_loan_response.py +125 -0
  181. pluggy_sdk/models/payroll_loan_response_client.py +102 -0
  182. pluggy_sdk/models/payroll_loans_list200_response.py +102 -0
  183. pluggy_sdk/models/percentage_over_index.py +90 -0
  184. pluggy_sdk/models/phone_number.py +100 -0
  185. pluggy_sdk/models/pix_data.py +90 -0
  186. pluggy_sdk/models/schedule_payment.py +102 -0
  187. pluggy_sdk/models/schedule_type_custom.py +100 -0
  188. pluggy_sdk/models/schedule_type_daily.py +101 -0
  189. pluggy_sdk/models/schedule_type_monthly.py +103 -0
  190. pluggy_sdk/models/schedule_type_single.py +98 -0
  191. pluggy_sdk/models/schedule_type_weekly.py +110 -0
  192. pluggy_sdk/models/single.py +98 -0
  193. pluggy_sdk/models/smart_account.py +107 -0
  194. pluggy_sdk/models/smart_account_address.py +112 -0
  195. pluggy_sdk/models/smart_account_balance.py +95 -0
  196. pluggy_sdk/models/smart_account_transfer.py +123 -0
  197. pluggy_sdk/models/smart_accounts_list200_response.py +102 -0
  198. pluggy_sdk/models/smart_tranfers_preauthorizations_list200_response.py +102 -0
  199. pluggy_sdk/models/smart_transfer_callback_urls.py +90 -0
  200. pluggy_sdk/models/smart_transfer_payment.py +116 -0
  201. pluggy_sdk/models/smart_transfer_preauthorization.py +128 -0
  202. pluggy_sdk/models/smart_transfer_preauthorization_parameter.py +90 -0
  203. pluggy_sdk/models/status_detail.py +127 -0
  204. pluggy_sdk/models/status_detail_product.py +101 -0
  205. pluggy_sdk/models/status_detail_product_warning.py +92 -0
  206. pluggy_sdk/models/transaction.py +141 -0
  207. pluggy_sdk/models/update_item.py +109 -0
  208. pluggy_sdk/models/update_item_parameters.py +144 -0
  209. pluggy_sdk/models/update_payment_recipient.py +102 -0
  210. pluggy_sdk/models/update_payment_request.py +102 -0
  211. pluggy_sdk/models/update_transaction.py +88 -0
  212. pluggy_sdk/models/webhook.py +106 -0
  213. pluggy_sdk/models/webhook_creation_error_response.py +90 -0
  214. pluggy_sdk/models/webhooks_list200_response.py +102 -0
  215. pluggy_sdk/models/weekly.py +110 -0
  216. pluggy_sdk/py.typed +0 -0
  217. pluggy_sdk/rest.py +258 -0
  218. pluggy_sdk-1.0.0.post34.dist-info/METADATA +373 -0
  219. pluggy_sdk-1.0.0.post34.dist-info/RECORD +221 -0
  220. pluggy_sdk-1.0.0.post34.dist-info/WHEEL +5 -0
  221. pluggy_sdk-1.0.0.post34.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2739 @@
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_boleto_payment_request import CreateBoletoPaymentRequest
23
+ from pluggy_sdk.models.create_payment_request import CreatePaymentRequest
24
+ from pluggy_sdk.models.create_pix_qr_payment_request import CreatePixQrPaymentRequest
25
+ from pluggy_sdk.models.payment_receipt import PaymentReceipt
26
+ from pluggy_sdk.models.payment_request import PaymentRequest
27
+ from pluggy_sdk.models.payment_request_receipt_list200_response import PaymentRequestReceiptList200Response
28
+ from pluggy_sdk.models.payment_requests_list200_response import PaymentRequestsList200Response
29
+ from pluggy_sdk.models.update_payment_request import UpdatePaymentRequest
30
+
31
+ from pluggy_sdk.api_client import ApiClient, RequestSerialized
32
+ from pluggy_sdk.api_response import ApiResponse
33
+ from pluggy_sdk.rest import RESTResponseType
34
+
35
+
36
+ class PaymentRequestApi:
37
+ """NOTE: This class is auto generated by OpenAPI Generator
38
+ Ref: https://openapi-generator.tech
39
+
40
+ Do not edit the class manually.
41
+ """
42
+
43
+ def __init__(self, api_client=None) -> None:
44
+ if api_client is None:
45
+ api_client = ApiClient.get_default()
46
+ self.api_client = api_client
47
+
48
+
49
+ @validate_call
50
+ def payment_request_create(
51
+ self,
52
+ create_payment_request: CreatePaymentRequest,
53
+ _request_timeout: Union[
54
+ None,
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Tuple[
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Annotated[StrictFloat, Field(gt=0)]
59
+ ]
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> PaymentRequest:
66
+ """Create
67
+
68
+ Creates the payment request resource
69
+
70
+ :param create_payment_request: (required)
71
+ :type create_payment_request: CreatePaymentRequest
72
+ :param _request_timeout: timeout setting for this request. If one
73
+ number provided, it will be total request
74
+ timeout. It can also be a pair (tuple) of
75
+ (connection, read) timeouts.
76
+ :type _request_timeout: int, tuple(int, int), optional
77
+ :param _request_auth: set to override the auth_settings for an a single
78
+ request; this effectively ignores the
79
+ authentication in the spec for a single request.
80
+ :type _request_auth: dict, optional
81
+ :param _content_type: force content-type for the request.
82
+ :type _content_type: str, Optional
83
+ :param _headers: set to override the headers for a single
84
+ request; this effectively ignores the headers
85
+ in the spec for a single request.
86
+ :type _headers: dict, optional
87
+ :param _host_index: set to override the host_index for a single
88
+ request; this effectively ignores the host_index
89
+ in the spec for a single request.
90
+ :type _host_index: int, optional
91
+ :return: Returns the result object.
92
+ """ # noqa: E501
93
+
94
+ _param = self._payment_request_create_serialize(
95
+ create_payment_request=create_payment_request,
96
+ _request_auth=_request_auth,
97
+ _content_type=_content_type,
98
+ _headers=_headers,
99
+ _host_index=_host_index
100
+ )
101
+
102
+ _response_types_map: Dict[str, Optional[str]] = {
103
+ '200': "PaymentRequest",
104
+ }
105
+ response_data = self.api_client.call_api(
106
+ *_param,
107
+ _request_timeout=_request_timeout
108
+ )
109
+ response_data.read()
110
+ return self.api_client.response_deserialize(
111
+ response_data=response_data,
112
+ response_types_map=_response_types_map,
113
+ ).data
114
+
115
+
116
+ @validate_call
117
+ def payment_request_create_with_http_info(
118
+ self,
119
+ create_payment_request: CreatePaymentRequest,
120
+ _request_timeout: Union[
121
+ None,
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Tuple[
124
+ Annotated[StrictFloat, Field(gt=0)],
125
+ Annotated[StrictFloat, Field(gt=0)]
126
+ ]
127
+ ] = None,
128
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
129
+ _content_type: Optional[StrictStr] = None,
130
+ _headers: Optional[Dict[StrictStr, Any]] = None,
131
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
132
+ ) -> ApiResponse[PaymentRequest]:
133
+ """Create
134
+
135
+ Creates the payment request resource
136
+
137
+ :param create_payment_request: (required)
138
+ :type create_payment_request: CreatePaymentRequest
139
+ :param _request_timeout: timeout setting for this request. If one
140
+ number provided, it will be total request
141
+ timeout. It can also be a pair (tuple) of
142
+ (connection, read) timeouts.
143
+ :type _request_timeout: int, tuple(int, int), optional
144
+ :param _request_auth: set to override the auth_settings for an a single
145
+ request; this effectively ignores the
146
+ authentication in the spec for a single request.
147
+ :type _request_auth: dict, optional
148
+ :param _content_type: force content-type for the request.
149
+ :type _content_type: str, Optional
150
+ :param _headers: set to override the headers for a single
151
+ request; this effectively ignores the headers
152
+ in the spec for a single request.
153
+ :type _headers: dict, optional
154
+ :param _host_index: set to override the host_index for a single
155
+ request; this effectively ignores the host_index
156
+ in the spec for a single request.
157
+ :type _host_index: int, optional
158
+ :return: Returns the result object.
159
+ """ # noqa: E501
160
+
161
+ _param = self._payment_request_create_serialize(
162
+ create_payment_request=create_payment_request,
163
+ _request_auth=_request_auth,
164
+ _content_type=_content_type,
165
+ _headers=_headers,
166
+ _host_index=_host_index
167
+ )
168
+
169
+ _response_types_map: Dict[str, Optional[str]] = {
170
+ '200': "PaymentRequest",
171
+ }
172
+ response_data = self.api_client.call_api(
173
+ *_param,
174
+ _request_timeout=_request_timeout
175
+ )
176
+ response_data.read()
177
+ return self.api_client.response_deserialize(
178
+ response_data=response_data,
179
+ response_types_map=_response_types_map,
180
+ )
181
+
182
+
183
+ @validate_call
184
+ def payment_request_create_without_preload_content(
185
+ self,
186
+ create_payment_request: CreatePaymentRequest,
187
+ _request_timeout: Union[
188
+ None,
189
+ Annotated[StrictFloat, Field(gt=0)],
190
+ Tuple[
191
+ Annotated[StrictFloat, Field(gt=0)],
192
+ Annotated[StrictFloat, Field(gt=0)]
193
+ ]
194
+ ] = None,
195
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
196
+ _content_type: Optional[StrictStr] = None,
197
+ _headers: Optional[Dict[StrictStr, Any]] = None,
198
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
199
+ ) -> RESTResponseType:
200
+ """Create
201
+
202
+ Creates the payment request resource
203
+
204
+ :param create_payment_request: (required)
205
+ :type create_payment_request: CreatePaymentRequest
206
+ :param _request_timeout: timeout setting for this request. If one
207
+ number provided, it will be total request
208
+ timeout. It can also be a pair (tuple) of
209
+ (connection, read) timeouts.
210
+ :type _request_timeout: int, tuple(int, int), optional
211
+ :param _request_auth: set to override the auth_settings for an a single
212
+ request; this effectively ignores the
213
+ authentication in the spec for a single request.
214
+ :type _request_auth: dict, optional
215
+ :param _content_type: force content-type for the request.
216
+ :type _content_type: str, Optional
217
+ :param _headers: set to override the headers for a single
218
+ request; this effectively ignores the headers
219
+ in the spec for a single request.
220
+ :type _headers: dict, optional
221
+ :param _host_index: set to override the host_index for a single
222
+ request; this effectively ignores the host_index
223
+ in the spec for a single request.
224
+ :type _host_index: int, optional
225
+ :return: Returns the result object.
226
+ """ # noqa: E501
227
+
228
+ _param = self._payment_request_create_serialize(
229
+ create_payment_request=create_payment_request,
230
+ _request_auth=_request_auth,
231
+ _content_type=_content_type,
232
+ _headers=_headers,
233
+ _host_index=_host_index
234
+ )
235
+
236
+ _response_types_map: Dict[str, Optional[str]] = {
237
+ '200': "PaymentRequest",
238
+ }
239
+ response_data = self.api_client.call_api(
240
+ *_param,
241
+ _request_timeout=_request_timeout
242
+ )
243
+ return response_data.response
244
+
245
+
246
+ def _payment_request_create_serialize(
247
+ self,
248
+ create_payment_request,
249
+ _request_auth,
250
+ _content_type,
251
+ _headers,
252
+ _host_index,
253
+ ) -> RequestSerialized:
254
+
255
+ _host = None
256
+
257
+ _collection_formats: Dict[str, str] = {
258
+ }
259
+
260
+ _path_params: Dict[str, str] = {}
261
+ _query_params: List[Tuple[str, str]] = []
262
+ _header_params: Dict[str, Optional[str]] = _headers or {}
263
+ _form_params: List[Tuple[str, str]] = []
264
+ _files: Dict[
265
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
266
+ ] = {}
267
+ _body_params: Optional[bytes] = None
268
+
269
+ # process the path parameters
270
+ # process the query parameters
271
+ # process the header parameters
272
+ # process the form parameters
273
+ # process the body parameter
274
+ if create_payment_request is not None:
275
+ _body_params = create_payment_request
276
+
277
+
278
+ # set the HTTP header `Accept`
279
+ if 'Accept' not in _header_params:
280
+ _header_params['Accept'] = self.api_client.select_header_accept(
281
+ [
282
+ 'application/json'
283
+ ]
284
+ )
285
+
286
+ # set the HTTP header `Content-Type`
287
+ if _content_type:
288
+ _header_params['Content-Type'] = _content_type
289
+ else:
290
+ _default_content_type = (
291
+ self.api_client.select_header_content_type(
292
+ [
293
+ 'application/json'
294
+ ]
295
+ )
296
+ )
297
+ if _default_content_type is not None:
298
+ _header_params['Content-Type'] = _default_content_type
299
+
300
+ # authentication setting
301
+ _auth_settings: List[str] = [
302
+ 'default'
303
+ ]
304
+
305
+ return self.api_client.param_serialize(
306
+ method='POST',
307
+ resource_path='/payments/requests',
308
+ path_params=_path_params,
309
+ query_params=_query_params,
310
+ header_params=_header_params,
311
+ body=_body_params,
312
+ post_params=_form_params,
313
+ files=_files,
314
+ auth_settings=_auth_settings,
315
+ collection_formats=_collection_formats,
316
+ _host=_host,
317
+ _request_auth=_request_auth
318
+ )
319
+
320
+
321
+
322
+
323
+ @validate_call
324
+ def payment_request_create_boleto(
325
+ self,
326
+ create_boleto_payment_request: CreateBoletoPaymentRequest,
327
+ _request_timeout: Union[
328
+ None,
329
+ Annotated[StrictFloat, Field(gt=0)],
330
+ Tuple[
331
+ Annotated[StrictFloat, Field(gt=0)],
332
+ Annotated[StrictFloat, Field(gt=0)]
333
+ ]
334
+ ] = None,
335
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
336
+ _content_type: Optional[StrictStr] = None,
337
+ _headers: Optional[Dict[StrictStr, Any]] = None,
338
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
339
+ ) -> PaymentRequest:
340
+ """Create boleto payment request
341
+
342
+ Creates the boleto payment request resource
343
+
344
+ :param create_boleto_payment_request: (required)
345
+ :type create_boleto_payment_request: CreateBoletoPaymentRequest
346
+ :param _request_timeout: timeout setting for this request. If one
347
+ number provided, it will be total request
348
+ timeout. It can also be a pair (tuple) of
349
+ (connection, read) timeouts.
350
+ :type _request_timeout: int, tuple(int, int), optional
351
+ :param _request_auth: set to override the auth_settings for an a single
352
+ request; this effectively ignores the
353
+ authentication in the spec for a single request.
354
+ :type _request_auth: dict, optional
355
+ :param _content_type: force content-type for the request.
356
+ :type _content_type: str, Optional
357
+ :param _headers: set to override the headers for a single
358
+ request; this effectively ignores the headers
359
+ in the spec for a single request.
360
+ :type _headers: dict, optional
361
+ :param _host_index: set to override the host_index for a single
362
+ request; this effectively ignores the host_index
363
+ in the spec for a single request.
364
+ :type _host_index: int, optional
365
+ :return: Returns the result object.
366
+ """ # noqa: E501
367
+
368
+ _param = self._payment_request_create_boleto_serialize(
369
+ create_boleto_payment_request=create_boleto_payment_request,
370
+ _request_auth=_request_auth,
371
+ _content_type=_content_type,
372
+ _headers=_headers,
373
+ _host_index=_host_index
374
+ )
375
+
376
+ _response_types_map: Dict[str, Optional[str]] = {
377
+ '200': "PaymentRequest",
378
+ }
379
+ response_data = self.api_client.call_api(
380
+ *_param,
381
+ _request_timeout=_request_timeout
382
+ )
383
+ response_data.read()
384
+ return self.api_client.response_deserialize(
385
+ response_data=response_data,
386
+ response_types_map=_response_types_map,
387
+ ).data
388
+
389
+
390
+ @validate_call
391
+ def payment_request_create_boleto_with_http_info(
392
+ self,
393
+ create_boleto_payment_request: CreateBoletoPaymentRequest,
394
+ _request_timeout: Union[
395
+ None,
396
+ Annotated[StrictFloat, Field(gt=0)],
397
+ Tuple[
398
+ Annotated[StrictFloat, Field(gt=0)],
399
+ Annotated[StrictFloat, Field(gt=0)]
400
+ ]
401
+ ] = None,
402
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
403
+ _content_type: Optional[StrictStr] = None,
404
+ _headers: Optional[Dict[StrictStr, Any]] = None,
405
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
406
+ ) -> ApiResponse[PaymentRequest]:
407
+ """Create boleto payment request
408
+
409
+ Creates the boleto payment request resource
410
+
411
+ :param create_boleto_payment_request: (required)
412
+ :type create_boleto_payment_request: CreateBoletoPaymentRequest
413
+ :param _request_timeout: timeout setting for this request. If one
414
+ number provided, it will be total request
415
+ timeout. It can also be a pair (tuple) of
416
+ (connection, read) timeouts.
417
+ :type _request_timeout: int, tuple(int, int), optional
418
+ :param _request_auth: set to override the auth_settings for an a single
419
+ request; this effectively ignores the
420
+ authentication in the spec for a single request.
421
+ :type _request_auth: dict, optional
422
+ :param _content_type: force content-type for the request.
423
+ :type _content_type: str, Optional
424
+ :param _headers: set to override the headers for a single
425
+ request; this effectively ignores the headers
426
+ in the spec for a single request.
427
+ :type _headers: dict, optional
428
+ :param _host_index: set to override the host_index for a single
429
+ request; this effectively ignores the host_index
430
+ in the spec for a single request.
431
+ :type _host_index: int, optional
432
+ :return: Returns the result object.
433
+ """ # noqa: E501
434
+
435
+ _param = self._payment_request_create_boleto_serialize(
436
+ create_boleto_payment_request=create_boleto_payment_request,
437
+ _request_auth=_request_auth,
438
+ _content_type=_content_type,
439
+ _headers=_headers,
440
+ _host_index=_host_index
441
+ )
442
+
443
+ _response_types_map: Dict[str, Optional[str]] = {
444
+ '200': "PaymentRequest",
445
+ }
446
+ response_data = self.api_client.call_api(
447
+ *_param,
448
+ _request_timeout=_request_timeout
449
+ )
450
+ response_data.read()
451
+ return self.api_client.response_deserialize(
452
+ response_data=response_data,
453
+ response_types_map=_response_types_map,
454
+ )
455
+
456
+
457
+ @validate_call
458
+ def payment_request_create_boleto_without_preload_content(
459
+ self,
460
+ create_boleto_payment_request: CreateBoletoPaymentRequest,
461
+ _request_timeout: Union[
462
+ None,
463
+ Annotated[StrictFloat, Field(gt=0)],
464
+ Tuple[
465
+ Annotated[StrictFloat, Field(gt=0)],
466
+ Annotated[StrictFloat, Field(gt=0)]
467
+ ]
468
+ ] = None,
469
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
470
+ _content_type: Optional[StrictStr] = None,
471
+ _headers: Optional[Dict[StrictStr, Any]] = None,
472
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
473
+ ) -> RESTResponseType:
474
+ """Create boleto payment request
475
+
476
+ Creates the boleto payment request resource
477
+
478
+ :param create_boleto_payment_request: (required)
479
+ :type create_boleto_payment_request: CreateBoletoPaymentRequest
480
+ :param _request_timeout: timeout setting for this request. If one
481
+ number provided, it will be total request
482
+ timeout. It can also be a pair (tuple) of
483
+ (connection, read) timeouts.
484
+ :type _request_timeout: int, tuple(int, int), optional
485
+ :param _request_auth: set to override the auth_settings for an a single
486
+ request; this effectively ignores the
487
+ authentication in the spec for a single request.
488
+ :type _request_auth: dict, optional
489
+ :param _content_type: force content-type for the request.
490
+ :type _content_type: str, Optional
491
+ :param _headers: set to override the headers for a single
492
+ request; this effectively ignores the headers
493
+ in the spec for a single request.
494
+ :type _headers: dict, optional
495
+ :param _host_index: set to override the host_index for a single
496
+ request; this effectively ignores the host_index
497
+ in the spec for a single request.
498
+ :type _host_index: int, optional
499
+ :return: Returns the result object.
500
+ """ # noqa: E501
501
+
502
+ _param = self._payment_request_create_boleto_serialize(
503
+ create_boleto_payment_request=create_boleto_payment_request,
504
+ _request_auth=_request_auth,
505
+ _content_type=_content_type,
506
+ _headers=_headers,
507
+ _host_index=_host_index
508
+ )
509
+
510
+ _response_types_map: Dict[str, Optional[str]] = {
511
+ '200': "PaymentRequest",
512
+ }
513
+ response_data = self.api_client.call_api(
514
+ *_param,
515
+ _request_timeout=_request_timeout
516
+ )
517
+ return response_data.response
518
+
519
+
520
+ def _payment_request_create_boleto_serialize(
521
+ self,
522
+ create_boleto_payment_request,
523
+ _request_auth,
524
+ _content_type,
525
+ _headers,
526
+ _host_index,
527
+ ) -> RequestSerialized:
528
+
529
+ _host = None
530
+
531
+ _collection_formats: Dict[str, str] = {
532
+ }
533
+
534
+ _path_params: Dict[str, str] = {}
535
+ _query_params: List[Tuple[str, str]] = []
536
+ _header_params: Dict[str, Optional[str]] = _headers or {}
537
+ _form_params: List[Tuple[str, str]] = []
538
+ _files: Dict[
539
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
540
+ ] = {}
541
+ _body_params: Optional[bytes] = None
542
+
543
+ # process the path parameters
544
+ # process the query parameters
545
+ # process the header parameters
546
+ # process the form parameters
547
+ # process the body parameter
548
+ if create_boleto_payment_request is not None:
549
+ _body_params = create_boleto_payment_request
550
+
551
+
552
+ # set the HTTP header `Accept`
553
+ if 'Accept' not in _header_params:
554
+ _header_params['Accept'] = self.api_client.select_header_accept(
555
+ [
556
+ 'application/json'
557
+ ]
558
+ )
559
+
560
+ # set the HTTP header `Content-Type`
561
+ if _content_type:
562
+ _header_params['Content-Type'] = _content_type
563
+ else:
564
+ _default_content_type = (
565
+ self.api_client.select_header_content_type(
566
+ [
567
+ 'application/json'
568
+ ]
569
+ )
570
+ )
571
+ if _default_content_type is not None:
572
+ _header_params['Content-Type'] = _default_content_type
573
+
574
+ # authentication setting
575
+ _auth_settings: List[str] = [
576
+ 'default'
577
+ ]
578
+
579
+ return self.api_client.param_serialize(
580
+ method='POST',
581
+ resource_path='/payments/requests/boleto',
582
+ path_params=_path_params,
583
+ query_params=_query_params,
584
+ header_params=_header_params,
585
+ body=_body_params,
586
+ post_params=_form_params,
587
+ files=_files,
588
+ auth_settings=_auth_settings,
589
+ collection_formats=_collection_formats,
590
+ _host=_host,
591
+ _request_auth=_request_auth
592
+ )
593
+
594
+
595
+
596
+
597
+ @validate_call
598
+ def payment_request_create_pix_qr(
599
+ self,
600
+ create_pix_qr_payment_request: CreatePixQrPaymentRequest,
601
+ _request_timeout: Union[
602
+ None,
603
+ Annotated[StrictFloat, Field(gt=0)],
604
+ Tuple[
605
+ Annotated[StrictFloat, Field(gt=0)],
606
+ Annotated[StrictFloat, Field(gt=0)]
607
+ ]
608
+ ] = None,
609
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
610
+ _content_type: Optional[StrictStr] = None,
611
+ _headers: Optional[Dict[StrictStr, Any]] = None,
612
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
613
+ ) -> PaymentRequest:
614
+ """Create PIX QR payment request
615
+
616
+ Creates the PIX QR payment request resource
617
+
618
+ :param create_pix_qr_payment_request: (required)
619
+ :type create_pix_qr_payment_request: CreatePixQrPaymentRequest
620
+ :param _request_timeout: timeout setting for this request. If one
621
+ number provided, it will be total request
622
+ timeout. It can also be a pair (tuple) of
623
+ (connection, read) timeouts.
624
+ :type _request_timeout: int, tuple(int, int), optional
625
+ :param _request_auth: set to override the auth_settings for an a single
626
+ request; this effectively ignores the
627
+ authentication in the spec for a single request.
628
+ :type _request_auth: dict, optional
629
+ :param _content_type: force content-type for the request.
630
+ :type _content_type: str, Optional
631
+ :param _headers: set to override the headers for a single
632
+ request; this effectively ignores the headers
633
+ in the spec for a single request.
634
+ :type _headers: dict, optional
635
+ :param _host_index: set to override the host_index for a single
636
+ request; this effectively ignores the host_index
637
+ in the spec for a single request.
638
+ :type _host_index: int, optional
639
+ :return: Returns the result object.
640
+ """ # noqa: E501
641
+
642
+ _param = self._payment_request_create_pix_qr_serialize(
643
+ create_pix_qr_payment_request=create_pix_qr_payment_request,
644
+ _request_auth=_request_auth,
645
+ _content_type=_content_type,
646
+ _headers=_headers,
647
+ _host_index=_host_index
648
+ )
649
+
650
+ _response_types_map: Dict[str, Optional[str]] = {
651
+ '200': "PaymentRequest",
652
+ }
653
+ response_data = self.api_client.call_api(
654
+ *_param,
655
+ _request_timeout=_request_timeout
656
+ )
657
+ response_data.read()
658
+ return self.api_client.response_deserialize(
659
+ response_data=response_data,
660
+ response_types_map=_response_types_map,
661
+ ).data
662
+
663
+
664
+ @validate_call
665
+ def payment_request_create_pix_qr_with_http_info(
666
+ self,
667
+ create_pix_qr_payment_request: CreatePixQrPaymentRequest,
668
+ _request_timeout: Union[
669
+ None,
670
+ Annotated[StrictFloat, Field(gt=0)],
671
+ Tuple[
672
+ Annotated[StrictFloat, Field(gt=0)],
673
+ Annotated[StrictFloat, Field(gt=0)]
674
+ ]
675
+ ] = None,
676
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
677
+ _content_type: Optional[StrictStr] = None,
678
+ _headers: Optional[Dict[StrictStr, Any]] = None,
679
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
680
+ ) -> ApiResponse[PaymentRequest]:
681
+ """Create PIX QR payment request
682
+
683
+ Creates the PIX QR payment request resource
684
+
685
+ :param create_pix_qr_payment_request: (required)
686
+ :type create_pix_qr_payment_request: CreatePixQrPaymentRequest
687
+ :param _request_timeout: timeout setting for this request. If one
688
+ number provided, it will be total request
689
+ timeout. It can also be a pair (tuple) of
690
+ (connection, read) timeouts.
691
+ :type _request_timeout: int, tuple(int, int), optional
692
+ :param _request_auth: set to override the auth_settings for an a single
693
+ request; this effectively ignores the
694
+ authentication in the spec for a single request.
695
+ :type _request_auth: dict, optional
696
+ :param _content_type: force content-type for the request.
697
+ :type _content_type: str, Optional
698
+ :param _headers: set to override the headers for a single
699
+ request; this effectively ignores the headers
700
+ in the spec for a single request.
701
+ :type _headers: dict, optional
702
+ :param _host_index: set to override the host_index for a single
703
+ request; this effectively ignores the host_index
704
+ in the spec for a single request.
705
+ :type _host_index: int, optional
706
+ :return: Returns the result object.
707
+ """ # noqa: E501
708
+
709
+ _param = self._payment_request_create_pix_qr_serialize(
710
+ create_pix_qr_payment_request=create_pix_qr_payment_request,
711
+ _request_auth=_request_auth,
712
+ _content_type=_content_type,
713
+ _headers=_headers,
714
+ _host_index=_host_index
715
+ )
716
+
717
+ _response_types_map: Dict[str, Optional[str]] = {
718
+ '200': "PaymentRequest",
719
+ }
720
+ response_data = self.api_client.call_api(
721
+ *_param,
722
+ _request_timeout=_request_timeout
723
+ )
724
+ response_data.read()
725
+ return self.api_client.response_deserialize(
726
+ response_data=response_data,
727
+ response_types_map=_response_types_map,
728
+ )
729
+
730
+
731
+ @validate_call
732
+ def payment_request_create_pix_qr_without_preload_content(
733
+ self,
734
+ create_pix_qr_payment_request: CreatePixQrPaymentRequest,
735
+ _request_timeout: Union[
736
+ None,
737
+ Annotated[StrictFloat, Field(gt=0)],
738
+ Tuple[
739
+ Annotated[StrictFloat, Field(gt=0)],
740
+ Annotated[StrictFloat, Field(gt=0)]
741
+ ]
742
+ ] = None,
743
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
744
+ _content_type: Optional[StrictStr] = None,
745
+ _headers: Optional[Dict[StrictStr, Any]] = None,
746
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
747
+ ) -> RESTResponseType:
748
+ """Create PIX QR payment request
749
+
750
+ Creates the PIX QR payment request resource
751
+
752
+ :param create_pix_qr_payment_request: (required)
753
+ :type create_pix_qr_payment_request: CreatePixQrPaymentRequest
754
+ :param _request_timeout: timeout setting for this request. If one
755
+ number provided, it will be total request
756
+ timeout. It can also be a pair (tuple) of
757
+ (connection, read) timeouts.
758
+ :type _request_timeout: int, tuple(int, int), optional
759
+ :param _request_auth: set to override the auth_settings for an a single
760
+ request; this effectively ignores the
761
+ authentication in the spec for a single request.
762
+ :type _request_auth: dict, optional
763
+ :param _content_type: force content-type for the request.
764
+ :type _content_type: str, Optional
765
+ :param _headers: set to override the headers for a single
766
+ request; this effectively ignores the headers
767
+ in the spec for a single request.
768
+ :type _headers: dict, optional
769
+ :param _host_index: set to override the host_index for a single
770
+ request; this effectively ignores the host_index
771
+ in the spec for a single request.
772
+ :type _host_index: int, optional
773
+ :return: Returns the result object.
774
+ """ # noqa: E501
775
+
776
+ _param = self._payment_request_create_pix_qr_serialize(
777
+ create_pix_qr_payment_request=create_pix_qr_payment_request,
778
+ _request_auth=_request_auth,
779
+ _content_type=_content_type,
780
+ _headers=_headers,
781
+ _host_index=_host_index
782
+ )
783
+
784
+ _response_types_map: Dict[str, Optional[str]] = {
785
+ '200': "PaymentRequest",
786
+ }
787
+ response_data = self.api_client.call_api(
788
+ *_param,
789
+ _request_timeout=_request_timeout
790
+ )
791
+ return response_data.response
792
+
793
+
794
+ def _payment_request_create_pix_qr_serialize(
795
+ self,
796
+ create_pix_qr_payment_request,
797
+ _request_auth,
798
+ _content_type,
799
+ _headers,
800
+ _host_index,
801
+ ) -> RequestSerialized:
802
+
803
+ _host = None
804
+
805
+ _collection_formats: Dict[str, str] = {
806
+ }
807
+
808
+ _path_params: Dict[str, str] = {}
809
+ _query_params: List[Tuple[str, str]] = []
810
+ _header_params: Dict[str, Optional[str]] = _headers or {}
811
+ _form_params: List[Tuple[str, str]] = []
812
+ _files: Dict[
813
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
814
+ ] = {}
815
+ _body_params: Optional[bytes] = None
816
+
817
+ # process the path parameters
818
+ # process the query parameters
819
+ # process the header parameters
820
+ # process the form parameters
821
+ # process the body parameter
822
+ if create_pix_qr_payment_request is not None:
823
+ _body_params = create_pix_qr_payment_request
824
+
825
+
826
+ # set the HTTP header `Accept`
827
+ if 'Accept' not in _header_params:
828
+ _header_params['Accept'] = self.api_client.select_header_accept(
829
+ [
830
+ 'application/json'
831
+ ]
832
+ )
833
+
834
+ # set the HTTP header `Content-Type`
835
+ if _content_type:
836
+ _header_params['Content-Type'] = _content_type
837
+ else:
838
+ _default_content_type = (
839
+ self.api_client.select_header_content_type(
840
+ [
841
+ 'application/json'
842
+ ]
843
+ )
844
+ )
845
+ if _default_content_type is not None:
846
+ _header_params['Content-Type'] = _default_content_type
847
+
848
+ # authentication setting
849
+ _auth_settings: List[str] = [
850
+ 'default'
851
+ ]
852
+
853
+ return self.api_client.param_serialize(
854
+ method='POST',
855
+ resource_path='/payments/requests/pix-qr',
856
+ path_params=_path_params,
857
+ query_params=_query_params,
858
+ header_params=_header_params,
859
+ body=_body_params,
860
+ post_params=_form_params,
861
+ files=_files,
862
+ auth_settings=_auth_settings,
863
+ collection_formats=_collection_formats,
864
+ _host=_host,
865
+ _request_auth=_request_auth
866
+ )
867
+
868
+
869
+
870
+
871
+ @validate_call
872
+ def payment_request_delete(
873
+ self,
874
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
875
+ _request_timeout: Union[
876
+ None,
877
+ Annotated[StrictFloat, Field(gt=0)],
878
+ Tuple[
879
+ Annotated[StrictFloat, Field(gt=0)],
880
+ Annotated[StrictFloat, Field(gt=0)]
881
+ ]
882
+ ] = None,
883
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
884
+ _content_type: Optional[StrictStr] = None,
885
+ _headers: Optional[Dict[StrictStr, Any]] = None,
886
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
887
+ ) -> None:
888
+ """Delete
889
+
890
+ Deletes the payment request resource by its id
891
+
892
+ :param id: Payment request primary identifier (required)
893
+ :type id: str
894
+ :param _request_timeout: timeout setting for this request. If one
895
+ number provided, it will be total request
896
+ timeout. It can also be a pair (tuple) of
897
+ (connection, read) timeouts.
898
+ :type _request_timeout: int, tuple(int, int), optional
899
+ :param _request_auth: set to override the auth_settings for an a single
900
+ request; this effectively ignores the
901
+ authentication in the spec for a single request.
902
+ :type _request_auth: dict, optional
903
+ :param _content_type: force content-type for the request.
904
+ :type _content_type: str, Optional
905
+ :param _headers: set to override the headers for a single
906
+ request; this effectively ignores the headers
907
+ in the spec for a single request.
908
+ :type _headers: dict, optional
909
+ :param _host_index: set to override the host_index for a single
910
+ request; this effectively ignores the host_index
911
+ in the spec for a single request.
912
+ :type _host_index: int, optional
913
+ :return: Returns the result object.
914
+ """ # noqa: E501
915
+
916
+ _param = self._payment_request_delete_serialize(
917
+ id=id,
918
+ _request_auth=_request_auth,
919
+ _content_type=_content_type,
920
+ _headers=_headers,
921
+ _host_index=_host_index
922
+ )
923
+
924
+ _response_types_map: Dict[str, Optional[str]] = {
925
+ '200': None,
926
+ '404': "GlobalErrorResponse",
927
+ }
928
+ response_data = self.api_client.call_api(
929
+ *_param,
930
+ _request_timeout=_request_timeout
931
+ )
932
+ response_data.read()
933
+ return self.api_client.response_deserialize(
934
+ response_data=response_data,
935
+ response_types_map=_response_types_map,
936
+ ).data
937
+
938
+
939
+ @validate_call
940
+ def payment_request_delete_with_http_info(
941
+ self,
942
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
943
+ _request_timeout: Union[
944
+ None,
945
+ Annotated[StrictFloat, Field(gt=0)],
946
+ Tuple[
947
+ Annotated[StrictFloat, Field(gt=0)],
948
+ Annotated[StrictFloat, Field(gt=0)]
949
+ ]
950
+ ] = None,
951
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
952
+ _content_type: Optional[StrictStr] = None,
953
+ _headers: Optional[Dict[StrictStr, Any]] = None,
954
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
955
+ ) -> ApiResponse[None]:
956
+ """Delete
957
+
958
+ Deletes the payment request resource by its id
959
+
960
+ :param id: Payment request primary identifier (required)
961
+ :type id: str
962
+ :param _request_timeout: timeout setting for this request. If one
963
+ number provided, it will be total request
964
+ timeout. It can also be a pair (tuple) of
965
+ (connection, read) timeouts.
966
+ :type _request_timeout: int, tuple(int, int), optional
967
+ :param _request_auth: set to override the auth_settings for an a single
968
+ request; this effectively ignores the
969
+ authentication in the spec for a single request.
970
+ :type _request_auth: dict, optional
971
+ :param _content_type: force content-type for the request.
972
+ :type _content_type: str, Optional
973
+ :param _headers: set to override the headers for a single
974
+ request; this effectively ignores the headers
975
+ in the spec for a single request.
976
+ :type _headers: dict, optional
977
+ :param _host_index: set to override the host_index for a single
978
+ request; this effectively ignores the host_index
979
+ in the spec for a single request.
980
+ :type _host_index: int, optional
981
+ :return: Returns the result object.
982
+ """ # noqa: E501
983
+
984
+ _param = self._payment_request_delete_serialize(
985
+ id=id,
986
+ _request_auth=_request_auth,
987
+ _content_type=_content_type,
988
+ _headers=_headers,
989
+ _host_index=_host_index
990
+ )
991
+
992
+ _response_types_map: Dict[str, Optional[str]] = {
993
+ '200': None,
994
+ '404': "GlobalErrorResponse",
995
+ }
996
+ response_data = self.api_client.call_api(
997
+ *_param,
998
+ _request_timeout=_request_timeout
999
+ )
1000
+ response_data.read()
1001
+ return self.api_client.response_deserialize(
1002
+ response_data=response_data,
1003
+ response_types_map=_response_types_map,
1004
+ )
1005
+
1006
+
1007
+ @validate_call
1008
+ def payment_request_delete_without_preload_content(
1009
+ self,
1010
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
1011
+ _request_timeout: Union[
1012
+ None,
1013
+ Annotated[StrictFloat, Field(gt=0)],
1014
+ Tuple[
1015
+ Annotated[StrictFloat, Field(gt=0)],
1016
+ Annotated[StrictFloat, Field(gt=0)]
1017
+ ]
1018
+ ] = None,
1019
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1020
+ _content_type: Optional[StrictStr] = None,
1021
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1022
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1023
+ ) -> RESTResponseType:
1024
+ """Delete
1025
+
1026
+ Deletes the payment request resource by its id
1027
+
1028
+ :param id: Payment request primary identifier (required)
1029
+ :type id: str
1030
+ :param _request_timeout: timeout setting for this request. If one
1031
+ number provided, it will be total request
1032
+ timeout. It can also be a pair (tuple) of
1033
+ (connection, read) timeouts.
1034
+ :type _request_timeout: int, tuple(int, int), optional
1035
+ :param _request_auth: set to override the auth_settings for an a single
1036
+ request; this effectively ignores the
1037
+ authentication in the spec for a single request.
1038
+ :type _request_auth: dict, optional
1039
+ :param _content_type: force content-type for the request.
1040
+ :type _content_type: str, Optional
1041
+ :param _headers: set to override the headers for a single
1042
+ request; this effectively ignores the headers
1043
+ in the spec for a single request.
1044
+ :type _headers: dict, optional
1045
+ :param _host_index: set to override the host_index for a single
1046
+ request; this effectively ignores the host_index
1047
+ in the spec for a single request.
1048
+ :type _host_index: int, optional
1049
+ :return: Returns the result object.
1050
+ """ # noqa: E501
1051
+
1052
+ _param = self._payment_request_delete_serialize(
1053
+ id=id,
1054
+ _request_auth=_request_auth,
1055
+ _content_type=_content_type,
1056
+ _headers=_headers,
1057
+ _host_index=_host_index
1058
+ )
1059
+
1060
+ _response_types_map: Dict[str, Optional[str]] = {
1061
+ '200': None,
1062
+ '404': "GlobalErrorResponse",
1063
+ }
1064
+ response_data = self.api_client.call_api(
1065
+ *_param,
1066
+ _request_timeout=_request_timeout
1067
+ )
1068
+ return response_data.response
1069
+
1070
+
1071
+ def _payment_request_delete_serialize(
1072
+ self,
1073
+ id,
1074
+ _request_auth,
1075
+ _content_type,
1076
+ _headers,
1077
+ _host_index,
1078
+ ) -> RequestSerialized:
1079
+
1080
+ _host = None
1081
+
1082
+ _collection_formats: Dict[str, str] = {
1083
+ }
1084
+
1085
+ _path_params: Dict[str, str] = {}
1086
+ _query_params: List[Tuple[str, str]] = []
1087
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1088
+ _form_params: List[Tuple[str, str]] = []
1089
+ _files: Dict[
1090
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1091
+ ] = {}
1092
+ _body_params: Optional[bytes] = None
1093
+
1094
+ # process the path parameters
1095
+ if id is not None:
1096
+ _path_params['id'] = id
1097
+ # process the query parameters
1098
+ # process the header parameters
1099
+ # process the form parameters
1100
+ # process the body parameter
1101
+
1102
+
1103
+ # set the HTTP header `Accept`
1104
+ if 'Accept' not in _header_params:
1105
+ _header_params['Accept'] = self.api_client.select_header_accept(
1106
+ [
1107
+ 'application/json'
1108
+ ]
1109
+ )
1110
+
1111
+
1112
+ # authentication setting
1113
+ _auth_settings: List[str] = [
1114
+ 'default'
1115
+ ]
1116
+
1117
+ return self.api_client.param_serialize(
1118
+ method='DELETE',
1119
+ resource_path='/payments/requests/{id}',
1120
+ path_params=_path_params,
1121
+ query_params=_query_params,
1122
+ header_params=_header_params,
1123
+ body=_body_params,
1124
+ post_params=_form_params,
1125
+ files=_files,
1126
+ auth_settings=_auth_settings,
1127
+ collection_formats=_collection_formats,
1128
+ _host=_host,
1129
+ _request_auth=_request_auth
1130
+ )
1131
+
1132
+
1133
+
1134
+
1135
+ @validate_call
1136
+ def payment_request_receipt_create(
1137
+ self,
1138
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
1139
+ _request_timeout: Union[
1140
+ None,
1141
+ Annotated[StrictFloat, Field(gt=0)],
1142
+ Tuple[
1143
+ Annotated[StrictFloat, Field(gt=0)],
1144
+ Annotated[StrictFloat, Field(gt=0)]
1145
+ ]
1146
+ ] = None,
1147
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1148
+ _content_type: Optional[StrictStr] = None,
1149
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1150
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1151
+ ) -> PaymentReceipt:
1152
+ """Create Payment Receipt
1153
+
1154
+ Creates the payment receipt resource
1155
+
1156
+ :param id: Payment request primary identifier (required)
1157
+ :type id: str
1158
+ :param _request_timeout: timeout setting for this request. If one
1159
+ number provided, it will be total request
1160
+ timeout. It can also be a pair (tuple) of
1161
+ (connection, read) timeouts.
1162
+ :type _request_timeout: int, tuple(int, int), optional
1163
+ :param _request_auth: set to override the auth_settings for an a single
1164
+ request; this effectively ignores the
1165
+ authentication in the spec for a single request.
1166
+ :type _request_auth: dict, optional
1167
+ :param _content_type: force content-type for the request.
1168
+ :type _content_type: str, Optional
1169
+ :param _headers: set to override the headers for a single
1170
+ request; this effectively ignores the headers
1171
+ in the spec for a single request.
1172
+ :type _headers: dict, optional
1173
+ :param _host_index: set to override the host_index for a single
1174
+ request; this effectively ignores the host_index
1175
+ in the spec for a single request.
1176
+ :type _host_index: int, optional
1177
+ :return: Returns the result object.
1178
+ """ # noqa: E501
1179
+
1180
+ _param = self._payment_request_receipt_create_serialize(
1181
+ id=id,
1182
+ _request_auth=_request_auth,
1183
+ _content_type=_content_type,
1184
+ _headers=_headers,
1185
+ _host_index=_host_index
1186
+ )
1187
+
1188
+ _response_types_map: Dict[str, Optional[str]] = {
1189
+ '200': "PaymentReceipt",
1190
+ }
1191
+ response_data = self.api_client.call_api(
1192
+ *_param,
1193
+ _request_timeout=_request_timeout
1194
+ )
1195
+ response_data.read()
1196
+ return self.api_client.response_deserialize(
1197
+ response_data=response_data,
1198
+ response_types_map=_response_types_map,
1199
+ ).data
1200
+
1201
+
1202
+ @validate_call
1203
+ def payment_request_receipt_create_with_http_info(
1204
+ self,
1205
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
1206
+ _request_timeout: Union[
1207
+ None,
1208
+ Annotated[StrictFloat, Field(gt=0)],
1209
+ Tuple[
1210
+ Annotated[StrictFloat, Field(gt=0)],
1211
+ Annotated[StrictFloat, Field(gt=0)]
1212
+ ]
1213
+ ] = None,
1214
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1215
+ _content_type: Optional[StrictStr] = None,
1216
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1217
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1218
+ ) -> ApiResponse[PaymentReceipt]:
1219
+ """Create Payment Receipt
1220
+
1221
+ Creates the payment receipt resource
1222
+
1223
+ :param id: Payment request primary identifier (required)
1224
+ :type id: str
1225
+ :param _request_timeout: timeout setting for this request. If one
1226
+ number provided, it will be total request
1227
+ timeout. It can also be a pair (tuple) of
1228
+ (connection, read) timeouts.
1229
+ :type _request_timeout: int, tuple(int, int), optional
1230
+ :param _request_auth: set to override the auth_settings for an a single
1231
+ request; this effectively ignores the
1232
+ authentication in the spec for a single request.
1233
+ :type _request_auth: dict, optional
1234
+ :param _content_type: force content-type for the request.
1235
+ :type _content_type: str, Optional
1236
+ :param _headers: set to override the headers for a single
1237
+ request; this effectively ignores the headers
1238
+ in the spec for a single request.
1239
+ :type _headers: dict, optional
1240
+ :param _host_index: set to override the host_index for a single
1241
+ request; this effectively ignores the host_index
1242
+ in the spec for a single request.
1243
+ :type _host_index: int, optional
1244
+ :return: Returns the result object.
1245
+ """ # noqa: E501
1246
+
1247
+ _param = self._payment_request_receipt_create_serialize(
1248
+ id=id,
1249
+ _request_auth=_request_auth,
1250
+ _content_type=_content_type,
1251
+ _headers=_headers,
1252
+ _host_index=_host_index
1253
+ )
1254
+
1255
+ _response_types_map: Dict[str, Optional[str]] = {
1256
+ '200': "PaymentReceipt",
1257
+ }
1258
+ response_data = self.api_client.call_api(
1259
+ *_param,
1260
+ _request_timeout=_request_timeout
1261
+ )
1262
+ response_data.read()
1263
+ return self.api_client.response_deserialize(
1264
+ response_data=response_data,
1265
+ response_types_map=_response_types_map,
1266
+ )
1267
+
1268
+
1269
+ @validate_call
1270
+ def payment_request_receipt_create_without_preload_content(
1271
+ self,
1272
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
1273
+ _request_timeout: Union[
1274
+ None,
1275
+ Annotated[StrictFloat, Field(gt=0)],
1276
+ Tuple[
1277
+ Annotated[StrictFloat, Field(gt=0)],
1278
+ Annotated[StrictFloat, Field(gt=0)]
1279
+ ]
1280
+ ] = None,
1281
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1282
+ _content_type: Optional[StrictStr] = None,
1283
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1284
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1285
+ ) -> RESTResponseType:
1286
+ """Create Payment Receipt
1287
+
1288
+ Creates the payment receipt resource
1289
+
1290
+ :param id: Payment request primary identifier (required)
1291
+ :type id: str
1292
+ :param _request_timeout: timeout setting for this request. If one
1293
+ number provided, it will be total request
1294
+ timeout. It can also be a pair (tuple) of
1295
+ (connection, read) timeouts.
1296
+ :type _request_timeout: int, tuple(int, int), optional
1297
+ :param _request_auth: set to override the auth_settings for an a single
1298
+ request; this effectively ignores the
1299
+ authentication in the spec for a single request.
1300
+ :type _request_auth: dict, optional
1301
+ :param _content_type: force content-type for the request.
1302
+ :type _content_type: str, Optional
1303
+ :param _headers: set to override the headers for a single
1304
+ request; this effectively ignores the headers
1305
+ in the spec for a single request.
1306
+ :type _headers: dict, optional
1307
+ :param _host_index: set to override the host_index for a single
1308
+ request; this effectively ignores the host_index
1309
+ in the spec for a single request.
1310
+ :type _host_index: int, optional
1311
+ :return: Returns the result object.
1312
+ """ # noqa: E501
1313
+
1314
+ _param = self._payment_request_receipt_create_serialize(
1315
+ id=id,
1316
+ _request_auth=_request_auth,
1317
+ _content_type=_content_type,
1318
+ _headers=_headers,
1319
+ _host_index=_host_index
1320
+ )
1321
+
1322
+ _response_types_map: Dict[str, Optional[str]] = {
1323
+ '200': "PaymentReceipt",
1324
+ }
1325
+ response_data = self.api_client.call_api(
1326
+ *_param,
1327
+ _request_timeout=_request_timeout
1328
+ )
1329
+ return response_data.response
1330
+
1331
+
1332
+ def _payment_request_receipt_create_serialize(
1333
+ self,
1334
+ id,
1335
+ _request_auth,
1336
+ _content_type,
1337
+ _headers,
1338
+ _host_index,
1339
+ ) -> RequestSerialized:
1340
+
1341
+ _host = None
1342
+
1343
+ _collection_formats: Dict[str, str] = {
1344
+ }
1345
+
1346
+ _path_params: Dict[str, str] = {}
1347
+ _query_params: List[Tuple[str, str]] = []
1348
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1349
+ _form_params: List[Tuple[str, str]] = []
1350
+ _files: Dict[
1351
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1352
+ ] = {}
1353
+ _body_params: Optional[bytes] = None
1354
+
1355
+ # process the path parameters
1356
+ if id is not None:
1357
+ _path_params['id'] = id
1358
+ # process the query parameters
1359
+ # process the header parameters
1360
+ # process the form parameters
1361
+ # process the body parameter
1362
+
1363
+
1364
+ # set the HTTP header `Accept`
1365
+ if 'Accept' not in _header_params:
1366
+ _header_params['Accept'] = self.api_client.select_header_accept(
1367
+ [
1368
+ 'application/json'
1369
+ ]
1370
+ )
1371
+
1372
+ # set the HTTP header `Content-Type`
1373
+ if _content_type:
1374
+ _header_params['Content-Type'] = _content_type
1375
+ else:
1376
+ _default_content_type = (
1377
+ self.api_client.select_header_content_type(
1378
+ [
1379
+ 'application/json'
1380
+ ]
1381
+ )
1382
+ )
1383
+ if _default_content_type is not None:
1384
+ _header_params['Content-Type'] = _default_content_type
1385
+
1386
+ # authentication setting
1387
+ _auth_settings: List[str] = [
1388
+ ]
1389
+
1390
+ return self.api_client.param_serialize(
1391
+ method='POST',
1392
+ resource_path='/payments/requests/{id}/receipts',
1393
+ path_params=_path_params,
1394
+ query_params=_query_params,
1395
+ header_params=_header_params,
1396
+ body=_body_params,
1397
+ post_params=_form_params,
1398
+ files=_files,
1399
+ auth_settings=_auth_settings,
1400
+ collection_formats=_collection_formats,
1401
+ _host=_host,
1402
+ _request_auth=_request_auth
1403
+ )
1404
+
1405
+
1406
+
1407
+
1408
+ @validate_call
1409
+ def payment_request_receipt_list(
1410
+ self,
1411
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
1412
+ _request_timeout: Union[
1413
+ None,
1414
+ Annotated[StrictFloat, Field(gt=0)],
1415
+ Tuple[
1416
+ Annotated[StrictFloat, Field(gt=0)],
1417
+ Annotated[StrictFloat, Field(gt=0)]
1418
+ ]
1419
+ ] = None,
1420
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1421
+ _content_type: Optional[StrictStr] = None,
1422
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1423
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1424
+ ) -> PaymentRequestReceiptList200Response:
1425
+ """List Payment Receipts
1426
+
1427
+ Recovers all created payment receipts for the payment request provided
1428
+
1429
+ :param id: Payment request primary identifier (required)
1430
+ :type id: str
1431
+ :param _request_timeout: timeout setting for this request. If one
1432
+ number provided, it will be total request
1433
+ timeout. It can also be a pair (tuple) of
1434
+ (connection, read) timeouts.
1435
+ :type _request_timeout: int, tuple(int, int), optional
1436
+ :param _request_auth: set to override the auth_settings for an a single
1437
+ request; this effectively ignores the
1438
+ authentication in the spec for a single request.
1439
+ :type _request_auth: dict, optional
1440
+ :param _content_type: force content-type for the request.
1441
+ :type _content_type: str, Optional
1442
+ :param _headers: set to override the headers for a single
1443
+ request; this effectively ignores the headers
1444
+ in the spec for a single request.
1445
+ :type _headers: dict, optional
1446
+ :param _host_index: set to override the host_index for a single
1447
+ request; this effectively ignores the host_index
1448
+ in the spec for a single request.
1449
+ :type _host_index: int, optional
1450
+ :return: Returns the result object.
1451
+ """ # noqa: E501
1452
+
1453
+ _param = self._payment_request_receipt_list_serialize(
1454
+ id=id,
1455
+ _request_auth=_request_auth,
1456
+ _content_type=_content_type,
1457
+ _headers=_headers,
1458
+ _host_index=_host_index
1459
+ )
1460
+
1461
+ _response_types_map: Dict[str, Optional[str]] = {
1462
+ '200': "PaymentRequestReceiptList200Response",
1463
+ }
1464
+ response_data = self.api_client.call_api(
1465
+ *_param,
1466
+ _request_timeout=_request_timeout
1467
+ )
1468
+ response_data.read()
1469
+ return self.api_client.response_deserialize(
1470
+ response_data=response_data,
1471
+ response_types_map=_response_types_map,
1472
+ ).data
1473
+
1474
+
1475
+ @validate_call
1476
+ def payment_request_receipt_list_with_http_info(
1477
+ self,
1478
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
1479
+ _request_timeout: Union[
1480
+ None,
1481
+ Annotated[StrictFloat, Field(gt=0)],
1482
+ Tuple[
1483
+ Annotated[StrictFloat, Field(gt=0)],
1484
+ Annotated[StrictFloat, Field(gt=0)]
1485
+ ]
1486
+ ] = None,
1487
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1488
+ _content_type: Optional[StrictStr] = None,
1489
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1490
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1491
+ ) -> ApiResponse[PaymentRequestReceiptList200Response]:
1492
+ """List Payment Receipts
1493
+
1494
+ Recovers all created payment receipts for the payment request provided
1495
+
1496
+ :param id: Payment request primary identifier (required)
1497
+ :type id: str
1498
+ :param _request_timeout: timeout setting for this request. If one
1499
+ number provided, it will be total request
1500
+ timeout. It can also be a pair (tuple) of
1501
+ (connection, read) timeouts.
1502
+ :type _request_timeout: int, tuple(int, int), optional
1503
+ :param _request_auth: set to override the auth_settings for an a single
1504
+ request; this effectively ignores the
1505
+ authentication in the spec for a single request.
1506
+ :type _request_auth: dict, optional
1507
+ :param _content_type: force content-type for the request.
1508
+ :type _content_type: str, Optional
1509
+ :param _headers: set to override the headers for a single
1510
+ request; this effectively ignores the headers
1511
+ in the spec for a single request.
1512
+ :type _headers: dict, optional
1513
+ :param _host_index: set to override the host_index for a single
1514
+ request; this effectively ignores the host_index
1515
+ in the spec for a single request.
1516
+ :type _host_index: int, optional
1517
+ :return: Returns the result object.
1518
+ """ # noqa: E501
1519
+
1520
+ _param = self._payment_request_receipt_list_serialize(
1521
+ id=id,
1522
+ _request_auth=_request_auth,
1523
+ _content_type=_content_type,
1524
+ _headers=_headers,
1525
+ _host_index=_host_index
1526
+ )
1527
+
1528
+ _response_types_map: Dict[str, Optional[str]] = {
1529
+ '200': "PaymentRequestReceiptList200Response",
1530
+ }
1531
+ response_data = self.api_client.call_api(
1532
+ *_param,
1533
+ _request_timeout=_request_timeout
1534
+ )
1535
+ response_data.read()
1536
+ return self.api_client.response_deserialize(
1537
+ response_data=response_data,
1538
+ response_types_map=_response_types_map,
1539
+ )
1540
+
1541
+
1542
+ @validate_call
1543
+ def payment_request_receipt_list_without_preload_content(
1544
+ self,
1545
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
1546
+ _request_timeout: Union[
1547
+ None,
1548
+ Annotated[StrictFloat, Field(gt=0)],
1549
+ Tuple[
1550
+ Annotated[StrictFloat, Field(gt=0)],
1551
+ Annotated[StrictFloat, Field(gt=0)]
1552
+ ]
1553
+ ] = None,
1554
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1555
+ _content_type: Optional[StrictStr] = None,
1556
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1557
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1558
+ ) -> RESTResponseType:
1559
+ """List Payment Receipts
1560
+
1561
+ Recovers all created payment receipts for the payment request provided
1562
+
1563
+ :param id: Payment request primary identifier (required)
1564
+ :type id: str
1565
+ :param _request_timeout: timeout setting for this request. If one
1566
+ number provided, it will be total request
1567
+ timeout. It can also be a pair (tuple) of
1568
+ (connection, read) timeouts.
1569
+ :type _request_timeout: int, tuple(int, int), optional
1570
+ :param _request_auth: set to override the auth_settings for an a single
1571
+ request; this effectively ignores the
1572
+ authentication in the spec for a single request.
1573
+ :type _request_auth: dict, optional
1574
+ :param _content_type: force content-type for the request.
1575
+ :type _content_type: str, Optional
1576
+ :param _headers: set to override the headers for a single
1577
+ request; this effectively ignores the headers
1578
+ in the spec for a single request.
1579
+ :type _headers: dict, optional
1580
+ :param _host_index: set to override the host_index for a single
1581
+ request; this effectively ignores the host_index
1582
+ in the spec for a single request.
1583
+ :type _host_index: int, optional
1584
+ :return: Returns the result object.
1585
+ """ # noqa: E501
1586
+
1587
+ _param = self._payment_request_receipt_list_serialize(
1588
+ id=id,
1589
+ _request_auth=_request_auth,
1590
+ _content_type=_content_type,
1591
+ _headers=_headers,
1592
+ _host_index=_host_index
1593
+ )
1594
+
1595
+ _response_types_map: Dict[str, Optional[str]] = {
1596
+ '200': "PaymentRequestReceiptList200Response",
1597
+ }
1598
+ response_data = self.api_client.call_api(
1599
+ *_param,
1600
+ _request_timeout=_request_timeout
1601
+ )
1602
+ return response_data.response
1603
+
1604
+
1605
+ def _payment_request_receipt_list_serialize(
1606
+ self,
1607
+ id,
1608
+ _request_auth,
1609
+ _content_type,
1610
+ _headers,
1611
+ _host_index,
1612
+ ) -> RequestSerialized:
1613
+
1614
+ _host = None
1615
+
1616
+ _collection_formats: Dict[str, str] = {
1617
+ }
1618
+
1619
+ _path_params: Dict[str, str] = {}
1620
+ _query_params: List[Tuple[str, str]] = []
1621
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1622
+ _form_params: List[Tuple[str, str]] = []
1623
+ _files: Dict[
1624
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1625
+ ] = {}
1626
+ _body_params: Optional[bytes] = None
1627
+
1628
+ # process the path parameters
1629
+ if id is not None:
1630
+ _path_params['id'] = id
1631
+ # process the query parameters
1632
+ # process the header parameters
1633
+ # process the form parameters
1634
+ # process the body parameter
1635
+
1636
+
1637
+ # set the HTTP header `Accept`
1638
+ if 'Accept' not in _header_params:
1639
+ _header_params['Accept'] = self.api_client.select_header_accept(
1640
+ [
1641
+ 'application/json'
1642
+ ]
1643
+ )
1644
+
1645
+
1646
+ # authentication setting
1647
+ _auth_settings: List[str] = [
1648
+ ]
1649
+
1650
+ return self.api_client.param_serialize(
1651
+ method='GET',
1652
+ resource_path='/payments/requests/{id}/receipts',
1653
+ path_params=_path_params,
1654
+ query_params=_query_params,
1655
+ header_params=_header_params,
1656
+ body=_body_params,
1657
+ post_params=_form_params,
1658
+ files=_files,
1659
+ auth_settings=_auth_settings,
1660
+ collection_formats=_collection_formats,
1661
+ _host=_host,
1662
+ _request_auth=_request_auth
1663
+ )
1664
+
1665
+
1666
+
1667
+
1668
+ @validate_call
1669
+ def payment_request_receipt_retrieve(
1670
+ self,
1671
+ payment_request_id: StrictStr,
1672
+ payment_receipt_id: StrictStr,
1673
+ _request_timeout: Union[
1674
+ None,
1675
+ Annotated[StrictFloat, Field(gt=0)],
1676
+ Tuple[
1677
+ Annotated[StrictFloat, Field(gt=0)],
1678
+ Annotated[StrictFloat, Field(gt=0)]
1679
+ ]
1680
+ ] = None,
1681
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1682
+ _content_type: Optional[StrictStr] = None,
1683
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1684
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1685
+ ) -> PaymentReceipt:
1686
+ """Retrieve Payment Receipt
1687
+
1688
+ Recovers the payment receipt resource by its id
1689
+
1690
+ :param payment_request_id: (required)
1691
+ :type payment_request_id: str
1692
+ :param payment_receipt_id: (required)
1693
+ :type payment_receipt_id: str
1694
+ :param _request_timeout: timeout setting for this request. If one
1695
+ number provided, it will be total request
1696
+ timeout. It can also be a pair (tuple) of
1697
+ (connection, read) timeouts.
1698
+ :type _request_timeout: int, tuple(int, int), optional
1699
+ :param _request_auth: set to override the auth_settings for an a single
1700
+ request; this effectively ignores the
1701
+ authentication in the spec for a single request.
1702
+ :type _request_auth: dict, optional
1703
+ :param _content_type: force content-type for the request.
1704
+ :type _content_type: str, Optional
1705
+ :param _headers: set to override the headers for a single
1706
+ request; this effectively ignores the headers
1707
+ in the spec for a single request.
1708
+ :type _headers: dict, optional
1709
+ :param _host_index: set to override the host_index for a single
1710
+ request; this effectively ignores the host_index
1711
+ in the spec for a single request.
1712
+ :type _host_index: int, optional
1713
+ :return: Returns the result object.
1714
+ """ # noqa: E501
1715
+
1716
+ _param = self._payment_request_receipt_retrieve_serialize(
1717
+ payment_request_id=payment_request_id,
1718
+ payment_receipt_id=payment_receipt_id,
1719
+ _request_auth=_request_auth,
1720
+ _content_type=_content_type,
1721
+ _headers=_headers,
1722
+ _host_index=_host_index
1723
+ )
1724
+
1725
+ _response_types_map: Dict[str, Optional[str]] = {
1726
+ '200': "PaymentReceipt",
1727
+ }
1728
+ response_data = self.api_client.call_api(
1729
+ *_param,
1730
+ _request_timeout=_request_timeout
1731
+ )
1732
+ response_data.read()
1733
+ return self.api_client.response_deserialize(
1734
+ response_data=response_data,
1735
+ response_types_map=_response_types_map,
1736
+ ).data
1737
+
1738
+
1739
+ @validate_call
1740
+ def payment_request_receipt_retrieve_with_http_info(
1741
+ self,
1742
+ payment_request_id: StrictStr,
1743
+ payment_receipt_id: StrictStr,
1744
+ _request_timeout: Union[
1745
+ None,
1746
+ Annotated[StrictFloat, Field(gt=0)],
1747
+ Tuple[
1748
+ Annotated[StrictFloat, Field(gt=0)],
1749
+ Annotated[StrictFloat, Field(gt=0)]
1750
+ ]
1751
+ ] = None,
1752
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1753
+ _content_type: Optional[StrictStr] = None,
1754
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1755
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1756
+ ) -> ApiResponse[PaymentReceipt]:
1757
+ """Retrieve Payment Receipt
1758
+
1759
+ Recovers the payment receipt resource by its id
1760
+
1761
+ :param payment_request_id: (required)
1762
+ :type payment_request_id: str
1763
+ :param payment_receipt_id: (required)
1764
+ :type payment_receipt_id: str
1765
+ :param _request_timeout: timeout setting for this request. If one
1766
+ number provided, it will be total request
1767
+ timeout. It can also be a pair (tuple) of
1768
+ (connection, read) timeouts.
1769
+ :type _request_timeout: int, tuple(int, int), optional
1770
+ :param _request_auth: set to override the auth_settings for an a single
1771
+ request; this effectively ignores the
1772
+ authentication in the spec for a single request.
1773
+ :type _request_auth: dict, optional
1774
+ :param _content_type: force content-type for the request.
1775
+ :type _content_type: str, Optional
1776
+ :param _headers: set to override the headers for a single
1777
+ request; this effectively ignores the headers
1778
+ in the spec for a single request.
1779
+ :type _headers: dict, optional
1780
+ :param _host_index: set to override the host_index for a single
1781
+ request; this effectively ignores the host_index
1782
+ in the spec for a single request.
1783
+ :type _host_index: int, optional
1784
+ :return: Returns the result object.
1785
+ """ # noqa: E501
1786
+
1787
+ _param = self._payment_request_receipt_retrieve_serialize(
1788
+ payment_request_id=payment_request_id,
1789
+ payment_receipt_id=payment_receipt_id,
1790
+ _request_auth=_request_auth,
1791
+ _content_type=_content_type,
1792
+ _headers=_headers,
1793
+ _host_index=_host_index
1794
+ )
1795
+
1796
+ _response_types_map: Dict[str, Optional[str]] = {
1797
+ '200': "PaymentReceipt",
1798
+ }
1799
+ response_data = self.api_client.call_api(
1800
+ *_param,
1801
+ _request_timeout=_request_timeout
1802
+ )
1803
+ response_data.read()
1804
+ return self.api_client.response_deserialize(
1805
+ response_data=response_data,
1806
+ response_types_map=_response_types_map,
1807
+ )
1808
+
1809
+
1810
+ @validate_call
1811
+ def payment_request_receipt_retrieve_without_preload_content(
1812
+ self,
1813
+ payment_request_id: StrictStr,
1814
+ payment_receipt_id: StrictStr,
1815
+ _request_timeout: Union[
1816
+ None,
1817
+ Annotated[StrictFloat, Field(gt=0)],
1818
+ Tuple[
1819
+ Annotated[StrictFloat, Field(gt=0)],
1820
+ Annotated[StrictFloat, Field(gt=0)]
1821
+ ]
1822
+ ] = None,
1823
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1824
+ _content_type: Optional[StrictStr] = None,
1825
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1826
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1827
+ ) -> RESTResponseType:
1828
+ """Retrieve Payment Receipt
1829
+
1830
+ Recovers the payment receipt resource by its id
1831
+
1832
+ :param payment_request_id: (required)
1833
+ :type payment_request_id: str
1834
+ :param payment_receipt_id: (required)
1835
+ :type payment_receipt_id: str
1836
+ :param _request_timeout: timeout setting for this request. If one
1837
+ number provided, it will be total request
1838
+ timeout. It can also be a pair (tuple) of
1839
+ (connection, read) timeouts.
1840
+ :type _request_timeout: int, tuple(int, int), optional
1841
+ :param _request_auth: set to override the auth_settings for an a single
1842
+ request; this effectively ignores the
1843
+ authentication in the spec for a single request.
1844
+ :type _request_auth: dict, optional
1845
+ :param _content_type: force content-type for the request.
1846
+ :type _content_type: str, Optional
1847
+ :param _headers: set to override the headers for a single
1848
+ request; this effectively ignores the headers
1849
+ in the spec for a single request.
1850
+ :type _headers: dict, optional
1851
+ :param _host_index: set to override the host_index for a single
1852
+ request; this effectively ignores the host_index
1853
+ in the spec for a single request.
1854
+ :type _host_index: int, optional
1855
+ :return: Returns the result object.
1856
+ """ # noqa: E501
1857
+
1858
+ _param = self._payment_request_receipt_retrieve_serialize(
1859
+ payment_request_id=payment_request_id,
1860
+ payment_receipt_id=payment_receipt_id,
1861
+ _request_auth=_request_auth,
1862
+ _content_type=_content_type,
1863
+ _headers=_headers,
1864
+ _host_index=_host_index
1865
+ )
1866
+
1867
+ _response_types_map: Dict[str, Optional[str]] = {
1868
+ '200': "PaymentReceipt",
1869
+ }
1870
+ response_data = self.api_client.call_api(
1871
+ *_param,
1872
+ _request_timeout=_request_timeout
1873
+ )
1874
+ return response_data.response
1875
+
1876
+
1877
+ def _payment_request_receipt_retrieve_serialize(
1878
+ self,
1879
+ payment_request_id,
1880
+ payment_receipt_id,
1881
+ _request_auth,
1882
+ _content_type,
1883
+ _headers,
1884
+ _host_index,
1885
+ ) -> RequestSerialized:
1886
+
1887
+ _host = None
1888
+
1889
+ _collection_formats: Dict[str, str] = {
1890
+ }
1891
+
1892
+ _path_params: Dict[str, str] = {}
1893
+ _query_params: List[Tuple[str, str]] = []
1894
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1895
+ _form_params: List[Tuple[str, str]] = []
1896
+ _files: Dict[
1897
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1898
+ ] = {}
1899
+ _body_params: Optional[bytes] = None
1900
+
1901
+ # process the path parameters
1902
+ if payment_request_id is not None:
1903
+ _path_params['payment-request-id'] = payment_request_id
1904
+ if payment_receipt_id is not None:
1905
+ _path_params['payment-receipt-id'] = payment_receipt_id
1906
+ # process the query parameters
1907
+ # process the header parameters
1908
+ # process the form parameters
1909
+ # process the body parameter
1910
+
1911
+
1912
+ # set the HTTP header `Accept`
1913
+ if 'Accept' not in _header_params:
1914
+ _header_params['Accept'] = self.api_client.select_header_accept(
1915
+ [
1916
+ 'application/json'
1917
+ ]
1918
+ )
1919
+
1920
+
1921
+ # authentication setting
1922
+ _auth_settings: List[str] = [
1923
+ ]
1924
+
1925
+ return self.api_client.param_serialize(
1926
+ method='GET',
1927
+ resource_path='/payments/requests/{payment-request-id}/receipts/{payment-receipt-id}',
1928
+ path_params=_path_params,
1929
+ query_params=_query_params,
1930
+ header_params=_header_params,
1931
+ body=_body_params,
1932
+ post_params=_form_params,
1933
+ files=_files,
1934
+ auth_settings=_auth_settings,
1935
+ collection_formats=_collection_formats,
1936
+ _host=_host,
1937
+ _request_auth=_request_auth
1938
+ )
1939
+
1940
+
1941
+
1942
+
1943
+ @validate_call
1944
+ def payment_request_retrieve(
1945
+ self,
1946
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
1947
+ _request_timeout: Union[
1948
+ None,
1949
+ Annotated[StrictFloat, Field(gt=0)],
1950
+ Tuple[
1951
+ Annotated[StrictFloat, Field(gt=0)],
1952
+ Annotated[StrictFloat, Field(gt=0)]
1953
+ ]
1954
+ ] = None,
1955
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1956
+ _content_type: Optional[StrictStr] = None,
1957
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1958
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1959
+ ) -> PaymentRequest:
1960
+ """Retrieve
1961
+
1962
+ Recovers the payment request resource by its id
1963
+
1964
+ :param id: Payment request primary identifier (required)
1965
+ :type id: str
1966
+ :param _request_timeout: timeout setting for this request. If one
1967
+ number provided, it will be total request
1968
+ timeout. It can also be a pair (tuple) of
1969
+ (connection, read) timeouts.
1970
+ :type _request_timeout: int, tuple(int, int), optional
1971
+ :param _request_auth: set to override the auth_settings for an a single
1972
+ request; this effectively ignores the
1973
+ authentication in the spec for a single request.
1974
+ :type _request_auth: dict, optional
1975
+ :param _content_type: force content-type for the request.
1976
+ :type _content_type: str, Optional
1977
+ :param _headers: set to override the headers for a single
1978
+ request; this effectively ignores the headers
1979
+ in the spec for a single request.
1980
+ :type _headers: dict, optional
1981
+ :param _host_index: set to override the host_index for a single
1982
+ request; this effectively ignores the host_index
1983
+ in the spec for a single request.
1984
+ :type _host_index: int, optional
1985
+ :return: Returns the result object.
1986
+ """ # noqa: E501
1987
+
1988
+ _param = self._payment_request_retrieve_serialize(
1989
+ id=id,
1990
+ _request_auth=_request_auth,
1991
+ _content_type=_content_type,
1992
+ _headers=_headers,
1993
+ _host_index=_host_index
1994
+ )
1995
+
1996
+ _response_types_map: Dict[str, Optional[str]] = {
1997
+ '200': "PaymentRequest",
1998
+ '404': "GlobalErrorResponse",
1999
+ }
2000
+ response_data = self.api_client.call_api(
2001
+ *_param,
2002
+ _request_timeout=_request_timeout
2003
+ )
2004
+ response_data.read()
2005
+ return self.api_client.response_deserialize(
2006
+ response_data=response_data,
2007
+ response_types_map=_response_types_map,
2008
+ ).data
2009
+
2010
+
2011
+ @validate_call
2012
+ def payment_request_retrieve_with_http_info(
2013
+ self,
2014
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
2015
+ _request_timeout: Union[
2016
+ None,
2017
+ Annotated[StrictFloat, Field(gt=0)],
2018
+ Tuple[
2019
+ Annotated[StrictFloat, Field(gt=0)],
2020
+ Annotated[StrictFloat, Field(gt=0)]
2021
+ ]
2022
+ ] = None,
2023
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2024
+ _content_type: Optional[StrictStr] = None,
2025
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2026
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2027
+ ) -> ApiResponse[PaymentRequest]:
2028
+ """Retrieve
2029
+
2030
+ Recovers the payment request resource by its id
2031
+
2032
+ :param id: Payment request primary identifier (required)
2033
+ :type id: str
2034
+ :param _request_timeout: timeout setting for this request. If one
2035
+ number provided, it will be total request
2036
+ timeout. It can also be a pair (tuple) of
2037
+ (connection, read) timeouts.
2038
+ :type _request_timeout: int, tuple(int, int), optional
2039
+ :param _request_auth: set to override the auth_settings for an a single
2040
+ request; this effectively ignores the
2041
+ authentication in the spec for a single request.
2042
+ :type _request_auth: dict, optional
2043
+ :param _content_type: force content-type for the request.
2044
+ :type _content_type: str, Optional
2045
+ :param _headers: set to override the headers for a single
2046
+ request; this effectively ignores the headers
2047
+ in the spec for a single request.
2048
+ :type _headers: dict, optional
2049
+ :param _host_index: set to override the host_index for a single
2050
+ request; this effectively ignores the host_index
2051
+ in the spec for a single request.
2052
+ :type _host_index: int, optional
2053
+ :return: Returns the result object.
2054
+ """ # noqa: E501
2055
+
2056
+ _param = self._payment_request_retrieve_serialize(
2057
+ id=id,
2058
+ _request_auth=_request_auth,
2059
+ _content_type=_content_type,
2060
+ _headers=_headers,
2061
+ _host_index=_host_index
2062
+ )
2063
+
2064
+ _response_types_map: Dict[str, Optional[str]] = {
2065
+ '200': "PaymentRequest",
2066
+ '404': "GlobalErrorResponse",
2067
+ }
2068
+ response_data = self.api_client.call_api(
2069
+ *_param,
2070
+ _request_timeout=_request_timeout
2071
+ )
2072
+ response_data.read()
2073
+ return self.api_client.response_deserialize(
2074
+ response_data=response_data,
2075
+ response_types_map=_response_types_map,
2076
+ )
2077
+
2078
+
2079
+ @validate_call
2080
+ def payment_request_retrieve_without_preload_content(
2081
+ self,
2082
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
2083
+ _request_timeout: Union[
2084
+ None,
2085
+ Annotated[StrictFloat, Field(gt=0)],
2086
+ Tuple[
2087
+ Annotated[StrictFloat, Field(gt=0)],
2088
+ Annotated[StrictFloat, Field(gt=0)]
2089
+ ]
2090
+ ] = None,
2091
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2092
+ _content_type: Optional[StrictStr] = None,
2093
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2094
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2095
+ ) -> RESTResponseType:
2096
+ """Retrieve
2097
+
2098
+ Recovers the payment request resource by its id
2099
+
2100
+ :param id: Payment request primary identifier (required)
2101
+ :type id: str
2102
+ :param _request_timeout: timeout setting for this request. If one
2103
+ number provided, it will be total request
2104
+ timeout. It can also be a pair (tuple) of
2105
+ (connection, read) timeouts.
2106
+ :type _request_timeout: int, tuple(int, int), optional
2107
+ :param _request_auth: set to override the auth_settings for an a single
2108
+ request; this effectively ignores the
2109
+ authentication in the spec for a single request.
2110
+ :type _request_auth: dict, optional
2111
+ :param _content_type: force content-type for the request.
2112
+ :type _content_type: str, Optional
2113
+ :param _headers: set to override the headers for a single
2114
+ request; this effectively ignores the headers
2115
+ in the spec for a single request.
2116
+ :type _headers: dict, optional
2117
+ :param _host_index: set to override the host_index for a single
2118
+ request; this effectively ignores the host_index
2119
+ in the spec for a single request.
2120
+ :type _host_index: int, optional
2121
+ :return: Returns the result object.
2122
+ """ # noqa: E501
2123
+
2124
+ _param = self._payment_request_retrieve_serialize(
2125
+ id=id,
2126
+ _request_auth=_request_auth,
2127
+ _content_type=_content_type,
2128
+ _headers=_headers,
2129
+ _host_index=_host_index
2130
+ )
2131
+
2132
+ _response_types_map: Dict[str, Optional[str]] = {
2133
+ '200': "PaymentRequest",
2134
+ '404': "GlobalErrorResponse",
2135
+ }
2136
+ response_data = self.api_client.call_api(
2137
+ *_param,
2138
+ _request_timeout=_request_timeout
2139
+ )
2140
+ return response_data.response
2141
+
2142
+
2143
+ def _payment_request_retrieve_serialize(
2144
+ self,
2145
+ id,
2146
+ _request_auth,
2147
+ _content_type,
2148
+ _headers,
2149
+ _host_index,
2150
+ ) -> RequestSerialized:
2151
+
2152
+ _host = None
2153
+
2154
+ _collection_formats: Dict[str, str] = {
2155
+ }
2156
+
2157
+ _path_params: Dict[str, str] = {}
2158
+ _query_params: List[Tuple[str, str]] = []
2159
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2160
+ _form_params: List[Tuple[str, str]] = []
2161
+ _files: Dict[
2162
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2163
+ ] = {}
2164
+ _body_params: Optional[bytes] = None
2165
+
2166
+ # process the path parameters
2167
+ if id is not None:
2168
+ _path_params['id'] = id
2169
+ # process the query parameters
2170
+ # process the header parameters
2171
+ # process the form parameters
2172
+ # process the body parameter
2173
+
2174
+
2175
+ # set the HTTP header `Accept`
2176
+ if 'Accept' not in _header_params:
2177
+ _header_params['Accept'] = self.api_client.select_header_accept(
2178
+ [
2179
+ 'application/json'
2180
+ ]
2181
+ )
2182
+
2183
+
2184
+ # authentication setting
2185
+ _auth_settings: List[str] = [
2186
+ 'default'
2187
+ ]
2188
+
2189
+ return self.api_client.param_serialize(
2190
+ method='GET',
2191
+ resource_path='/payments/requests/{id}',
2192
+ path_params=_path_params,
2193
+ query_params=_query_params,
2194
+ header_params=_header_params,
2195
+ body=_body_params,
2196
+ post_params=_form_params,
2197
+ files=_files,
2198
+ auth_settings=_auth_settings,
2199
+ collection_formats=_collection_formats,
2200
+ _host=_host,
2201
+ _request_auth=_request_auth
2202
+ )
2203
+
2204
+
2205
+
2206
+
2207
+ @validate_call
2208
+ def payment_request_update(
2209
+ self,
2210
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
2211
+ update_payment_request: UpdatePaymentRequest,
2212
+ _request_timeout: Union[
2213
+ None,
2214
+ Annotated[StrictFloat, Field(gt=0)],
2215
+ Tuple[
2216
+ Annotated[StrictFloat, Field(gt=0)],
2217
+ Annotated[StrictFloat, Field(gt=0)]
2218
+ ]
2219
+ ] = None,
2220
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2221
+ _content_type: Optional[StrictStr] = None,
2222
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2223
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2224
+ ) -> CreatePaymentRequest:
2225
+ """Update
2226
+
2227
+ Updates the payment request resource
2228
+
2229
+ :param id: Payment request primary identifier (required)
2230
+ :type id: str
2231
+ :param update_payment_request: (required)
2232
+ :type update_payment_request: UpdatePaymentRequest
2233
+ :param _request_timeout: timeout setting for this request. If one
2234
+ number provided, it will be total request
2235
+ timeout. It can also be a pair (tuple) of
2236
+ (connection, read) timeouts.
2237
+ :type _request_timeout: int, tuple(int, int), optional
2238
+ :param _request_auth: set to override the auth_settings for an a single
2239
+ request; this effectively ignores the
2240
+ authentication in the spec for a single request.
2241
+ :type _request_auth: dict, optional
2242
+ :param _content_type: force content-type for the request.
2243
+ :type _content_type: str, Optional
2244
+ :param _headers: set to override the headers for a single
2245
+ request; this effectively ignores the headers
2246
+ in the spec for a single request.
2247
+ :type _headers: dict, optional
2248
+ :param _host_index: set to override the host_index for a single
2249
+ request; this effectively ignores the host_index
2250
+ in the spec for a single request.
2251
+ :type _host_index: int, optional
2252
+ :return: Returns the result object.
2253
+ """ # noqa: E501
2254
+
2255
+ _param = self._payment_request_update_serialize(
2256
+ id=id,
2257
+ update_payment_request=update_payment_request,
2258
+ _request_auth=_request_auth,
2259
+ _content_type=_content_type,
2260
+ _headers=_headers,
2261
+ _host_index=_host_index
2262
+ )
2263
+
2264
+ _response_types_map: Dict[str, Optional[str]] = {
2265
+ '200': "CreatePaymentRequest",
2266
+ }
2267
+ response_data = self.api_client.call_api(
2268
+ *_param,
2269
+ _request_timeout=_request_timeout
2270
+ )
2271
+ response_data.read()
2272
+ return self.api_client.response_deserialize(
2273
+ response_data=response_data,
2274
+ response_types_map=_response_types_map,
2275
+ ).data
2276
+
2277
+
2278
+ @validate_call
2279
+ def payment_request_update_with_http_info(
2280
+ self,
2281
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
2282
+ update_payment_request: UpdatePaymentRequest,
2283
+ _request_timeout: Union[
2284
+ None,
2285
+ Annotated[StrictFloat, Field(gt=0)],
2286
+ Tuple[
2287
+ Annotated[StrictFloat, Field(gt=0)],
2288
+ Annotated[StrictFloat, Field(gt=0)]
2289
+ ]
2290
+ ] = None,
2291
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2292
+ _content_type: Optional[StrictStr] = None,
2293
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2294
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2295
+ ) -> ApiResponse[CreatePaymentRequest]:
2296
+ """Update
2297
+
2298
+ Updates the payment request resource
2299
+
2300
+ :param id: Payment request primary identifier (required)
2301
+ :type id: str
2302
+ :param update_payment_request: (required)
2303
+ :type update_payment_request: UpdatePaymentRequest
2304
+ :param _request_timeout: timeout setting for this request. If one
2305
+ number provided, it will be total request
2306
+ timeout. It can also be a pair (tuple) of
2307
+ (connection, read) timeouts.
2308
+ :type _request_timeout: int, tuple(int, int), optional
2309
+ :param _request_auth: set to override the auth_settings for an a single
2310
+ request; this effectively ignores the
2311
+ authentication in the spec for a single request.
2312
+ :type _request_auth: dict, optional
2313
+ :param _content_type: force content-type for the request.
2314
+ :type _content_type: str, Optional
2315
+ :param _headers: set to override the headers for a single
2316
+ request; this effectively ignores the headers
2317
+ in the spec for a single request.
2318
+ :type _headers: dict, optional
2319
+ :param _host_index: set to override the host_index for a single
2320
+ request; this effectively ignores the host_index
2321
+ in the spec for a single request.
2322
+ :type _host_index: int, optional
2323
+ :return: Returns the result object.
2324
+ """ # noqa: E501
2325
+
2326
+ _param = self._payment_request_update_serialize(
2327
+ id=id,
2328
+ update_payment_request=update_payment_request,
2329
+ _request_auth=_request_auth,
2330
+ _content_type=_content_type,
2331
+ _headers=_headers,
2332
+ _host_index=_host_index
2333
+ )
2334
+
2335
+ _response_types_map: Dict[str, Optional[str]] = {
2336
+ '200': "CreatePaymentRequest",
2337
+ }
2338
+ response_data = self.api_client.call_api(
2339
+ *_param,
2340
+ _request_timeout=_request_timeout
2341
+ )
2342
+ response_data.read()
2343
+ return self.api_client.response_deserialize(
2344
+ response_data=response_data,
2345
+ response_types_map=_response_types_map,
2346
+ )
2347
+
2348
+
2349
+ @validate_call
2350
+ def payment_request_update_without_preload_content(
2351
+ self,
2352
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
2353
+ update_payment_request: UpdatePaymentRequest,
2354
+ _request_timeout: Union[
2355
+ None,
2356
+ Annotated[StrictFloat, Field(gt=0)],
2357
+ Tuple[
2358
+ Annotated[StrictFloat, Field(gt=0)],
2359
+ Annotated[StrictFloat, Field(gt=0)]
2360
+ ]
2361
+ ] = None,
2362
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2363
+ _content_type: Optional[StrictStr] = None,
2364
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2365
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2366
+ ) -> RESTResponseType:
2367
+ """Update
2368
+
2369
+ Updates the payment request resource
2370
+
2371
+ :param id: Payment request primary identifier (required)
2372
+ :type id: str
2373
+ :param update_payment_request: (required)
2374
+ :type update_payment_request: UpdatePaymentRequest
2375
+ :param _request_timeout: timeout setting for this request. If one
2376
+ number provided, it will be total request
2377
+ timeout. It can also be a pair (tuple) of
2378
+ (connection, read) timeouts.
2379
+ :type _request_timeout: int, tuple(int, int), optional
2380
+ :param _request_auth: set to override the auth_settings for an a single
2381
+ request; this effectively ignores the
2382
+ authentication in the spec for a single request.
2383
+ :type _request_auth: dict, optional
2384
+ :param _content_type: force content-type for the request.
2385
+ :type _content_type: str, Optional
2386
+ :param _headers: set to override the headers for a single
2387
+ request; this effectively ignores the headers
2388
+ in the spec for a single request.
2389
+ :type _headers: dict, optional
2390
+ :param _host_index: set to override the host_index for a single
2391
+ request; this effectively ignores the host_index
2392
+ in the spec for a single request.
2393
+ :type _host_index: int, optional
2394
+ :return: Returns the result object.
2395
+ """ # noqa: E501
2396
+
2397
+ _param = self._payment_request_update_serialize(
2398
+ id=id,
2399
+ update_payment_request=update_payment_request,
2400
+ _request_auth=_request_auth,
2401
+ _content_type=_content_type,
2402
+ _headers=_headers,
2403
+ _host_index=_host_index
2404
+ )
2405
+
2406
+ _response_types_map: Dict[str, Optional[str]] = {
2407
+ '200': "CreatePaymentRequest",
2408
+ }
2409
+ response_data = self.api_client.call_api(
2410
+ *_param,
2411
+ _request_timeout=_request_timeout
2412
+ )
2413
+ return response_data.response
2414
+
2415
+
2416
+ def _payment_request_update_serialize(
2417
+ self,
2418
+ id,
2419
+ update_payment_request,
2420
+ _request_auth,
2421
+ _content_type,
2422
+ _headers,
2423
+ _host_index,
2424
+ ) -> RequestSerialized:
2425
+
2426
+ _host = None
2427
+
2428
+ _collection_formats: Dict[str, str] = {
2429
+ }
2430
+
2431
+ _path_params: Dict[str, str] = {}
2432
+ _query_params: List[Tuple[str, str]] = []
2433
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2434
+ _form_params: List[Tuple[str, str]] = []
2435
+ _files: Dict[
2436
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2437
+ ] = {}
2438
+ _body_params: Optional[bytes] = None
2439
+
2440
+ # process the path parameters
2441
+ if id is not None:
2442
+ _path_params['id'] = id
2443
+ # process the query parameters
2444
+ # process the header parameters
2445
+ # process the form parameters
2446
+ # process the body parameter
2447
+ if update_payment_request is not None:
2448
+ _body_params = update_payment_request
2449
+
2450
+
2451
+ # set the HTTP header `Accept`
2452
+ if 'Accept' not in _header_params:
2453
+ _header_params['Accept'] = self.api_client.select_header_accept(
2454
+ [
2455
+ 'application/json'
2456
+ ]
2457
+ )
2458
+
2459
+ # set the HTTP header `Content-Type`
2460
+ if _content_type:
2461
+ _header_params['Content-Type'] = _content_type
2462
+ else:
2463
+ _default_content_type = (
2464
+ self.api_client.select_header_content_type(
2465
+ [
2466
+ 'application/json'
2467
+ ]
2468
+ )
2469
+ )
2470
+ if _default_content_type is not None:
2471
+ _header_params['Content-Type'] = _default_content_type
2472
+
2473
+ # authentication setting
2474
+ _auth_settings: List[str] = [
2475
+ 'default'
2476
+ ]
2477
+
2478
+ return self.api_client.param_serialize(
2479
+ method='PATCH',
2480
+ resource_path='/payments/requests/{id}',
2481
+ path_params=_path_params,
2482
+ query_params=_query_params,
2483
+ header_params=_header_params,
2484
+ body=_body_params,
2485
+ post_params=_form_params,
2486
+ files=_files,
2487
+ auth_settings=_auth_settings,
2488
+ collection_formats=_collection_formats,
2489
+ _host=_host,
2490
+ _request_auth=_request_auth
2491
+ )
2492
+
2493
+
2494
+
2495
+
2496
+ @validate_call
2497
+ def payment_requests_list(
2498
+ self,
2499
+ _request_timeout: Union[
2500
+ None,
2501
+ Annotated[StrictFloat, Field(gt=0)],
2502
+ Tuple[
2503
+ Annotated[StrictFloat, Field(gt=0)],
2504
+ Annotated[StrictFloat, Field(gt=0)]
2505
+ ]
2506
+ ] = None,
2507
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2508
+ _content_type: Optional[StrictStr] = None,
2509
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2510
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2511
+ ) -> PaymentRequestsList200Response:
2512
+ """List
2513
+
2514
+ Recovers all created payment requests
2515
+
2516
+ :param _request_timeout: timeout setting for this request. If one
2517
+ number provided, it will be total request
2518
+ timeout. It can also be a pair (tuple) of
2519
+ (connection, read) timeouts.
2520
+ :type _request_timeout: int, tuple(int, int), optional
2521
+ :param _request_auth: set to override the auth_settings for an a single
2522
+ request; this effectively ignores the
2523
+ authentication in the spec for a single request.
2524
+ :type _request_auth: dict, optional
2525
+ :param _content_type: force content-type for the request.
2526
+ :type _content_type: str, Optional
2527
+ :param _headers: set to override the headers for a single
2528
+ request; this effectively ignores the headers
2529
+ in the spec for a single request.
2530
+ :type _headers: dict, optional
2531
+ :param _host_index: set to override the host_index for a single
2532
+ request; this effectively ignores the host_index
2533
+ in the spec for a single request.
2534
+ :type _host_index: int, optional
2535
+ :return: Returns the result object.
2536
+ """ # noqa: E501
2537
+
2538
+ _param = self._payment_requests_list_serialize(
2539
+ _request_auth=_request_auth,
2540
+ _content_type=_content_type,
2541
+ _headers=_headers,
2542
+ _host_index=_host_index
2543
+ )
2544
+
2545
+ _response_types_map: Dict[str, Optional[str]] = {
2546
+ '200': "PaymentRequestsList200Response",
2547
+ }
2548
+ response_data = self.api_client.call_api(
2549
+ *_param,
2550
+ _request_timeout=_request_timeout
2551
+ )
2552
+ response_data.read()
2553
+ return self.api_client.response_deserialize(
2554
+ response_data=response_data,
2555
+ response_types_map=_response_types_map,
2556
+ ).data
2557
+
2558
+
2559
+ @validate_call
2560
+ def payment_requests_list_with_http_info(
2561
+ self,
2562
+ _request_timeout: Union[
2563
+ None,
2564
+ Annotated[StrictFloat, Field(gt=0)],
2565
+ Tuple[
2566
+ Annotated[StrictFloat, Field(gt=0)],
2567
+ Annotated[StrictFloat, Field(gt=0)]
2568
+ ]
2569
+ ] = None,
2570
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2571
+ _content_type: Optional[StrictStr] = None,
2572
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2573
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2574
+ ) -> ApiResponse[PaymentRequestsList200Response]:
2575
+ """List
2576
+
2577
+ Recovers all created payment requests
2578
+
2579
+ :param _request_timeout: timeout setting for this request. If one
2580
+ number provided, it will be total request
2581
+ timeout. It can also be a pair (tuple) of
2582
+ (connection, read) timeouts.
2583
+ :type _request_timeout: int, tuple(int, int), optional
2584
+ :param _request_auth: set to override the auth_settings for an a single
2585
+ request; this effectively ignores the
2586
+ authentication in the spec for a single request.
2587
+ :type _request_auth: dict, optional
2588
+ :param _content_type: force content-type for the request.
2589
+ :type _content_type: str, Optional
2590
+ :param _headers: set to override the headers for a single
2591
+ request; this effectively ignores the headers
2592
+ in the spec for a single request.
2593
+ :type _headers: dict, optional
2594
+ :param _host_index: set to override the host_index for a single
2595
+ request; this effectively ignores the host_index
2596
+ in the spec for a single request.
2597
+ :type _host_index: int, optional
2598
+ :return: Returns the result object.
2599
+ """ # noqa: E501
2600
+
2601
+ _param = self._payment_requests_list_serialize(
2602
+ _request_auth=_request_auth,
2603
+ _content_type=_content_type,
2604
+ _headers=_headers,
2605
+ _host_index=_host_index
2606
+ )
2607
+
2608
+ _response_types_map: Dict[str, Optional[str]] = {
2609
+ '200': "PaymentRequestsList200Response",
2610
+ }
2611
+ response_data = self.api_client.call_api(
2612
+ *_param,
2613
+ _request_timeout=_request_timeout
2614
+ )
2615
+ response_data.read()
2616
+ return self.api_client.response_deserialize(
2617
+ response_data=response_data,
2618
+ response_types_map=_response_types_map,
2619
+ )
2620
+
2621
+
2622
+ @validate_call
2623
+ def payment_requests_list_without_preload_content(
2624
+ self,
2625
+ _request_timeout: Union[
2626
+ None,
2627
+ Annotated[StrictFloat, Field(gt=0)],
2628
+ Tuple[
2629
+ Annotated[StrictFloat, Field(gt=0)],
2630
+ Annotated[StrictFloat, Field(gt=0)]
2631
+ ]
2632
+ ] = None,
2633
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2634
+ _content_type: Optional[StrictStr] = None,
2635
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2636
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2637
+ ) -> RESTResponseType:
2638
+ """List
2639
+
2640
+ Recovers all created payment requests
2641
+
2642
+ :param _request_timeout: timeout setting for this request. If one
2643
+ number provided, it will be total request
2644
+ timeout. It can also be a pair (tuple) of
2645
+ (connection, read) timeouts.
2646
+ :type _request_timeout: int, tuple(int, int), optional
2647
+ :param _request_auth: set to override the auth_settings for an a single
2648
+ request; this effectively ignores the
2649
+ authentication in the spec for a single request.
2650
+ :type _request_auth: dict, optional
2651
+ :param _content_type: force content-type for the request.
2652
+ :type _content_type: str, Optional
2653
+ :param _headers: set to override the headers for a single
2654
+ request; this effectively ignores the headers
2655
+ in the spec for a single request.
2656
+ :type _headers: dict, optional
2657
+ :param _host_index: set to override the host_index for a single
2658
+ request; this effectively ignores the host_index
2659
+ in the spec for a single request.
2660
+ :type _host_index: int, optional
2661
+ :return: Returns the result object.
2662
+ """ # noqa: E501
2663
+
2664
+ _param = self._payment_requests_list_serialize(
2665
+ _request_auth=_request_auth,
2666
+ _content_type=_content_type,
2667
+ _headers=_headers,
2668
+ _host_index=_host_index
2669
+ )
2670
+
2671
+ _response_types_map: Dict[str, Optional[str]] = {
2672
+ '200': "PaymentRequestsList200Response",
2673
+ }
2674
+ response_data = self.api_client.call_api(
2675
+ *_param,
2676
+ _request_timeout=_request_timeout
2677
+ )
2678
+ return response_data.response
2679
+
2680
+
2681
+ def _payment_requests_list_serialize(
2682
+ self,
2683
+ _request_auth,
2684
+ _content_type,
2685
+ _headers,
2686
+ _host_index,
2687
+ ) -> RequestSerialized:
2688
+
2689
+ _host = None
2690
+
2691
+ _collection_formats: Dict[str, str] = {
2692
+ }
2693
+
2694
+ _path_params: Dict[str, str] = {}
2695
+ _query_params: List[Tuple[str, str]] = []
2696
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2697
+ _form_params: List[Tuple[str, str]] = []
2698
+ _files: Dict[
2699
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2700
+ ] = {}
2701
+ _body_params: Optional[bytes] = None
2702
+
2703
+ # process the path parameters
2704
+ # process the query parameters
2705
+ # process the header parameters
2706
+ # process the form parameters
2707
+ # process the body parameter
2708
+
2709
+
2710
+ # set the HTTP header `Accept`
2711
+ if 'Accept' not in _header_params:
2712
+ _header_params['Accept'] = self.api_client.select_header_accept(
2713
+ [
2714
+ 'application/json'
2715
+ ]
2716
+ )
2717
+
2718
+
2719
+ # authentication setting
2720
+ _auth_settings: List[str] = [
2721
+ 'default'
2722
+ ]
2723
+
2724
+ return self.api_client.param_serialize(
2725
+ method='GET',
2726
+ resource_path='/payments/requests',
2727
+ path_params=_path_params,
2728
+ query_params=_query_params,
2729
+ header_params=_header_params,
2730
+ body=_body_params,
2731
+ post_params=_form_params,
2732
+ files=_files,
2733
+ auth_settings=_auth_settings,
2734
+ collection_formats=_collection_formats,
2735
+ _host=_host,
2736
+ _request_auth=_request_auth
2737
+ )
2738
+
2739
+