pluggy-sdk 1.0.0.post2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. pluggy_sdk/__init__.py +183 -0
  2. pluggy_sdk/api/__init__.py +26 -0
  3. pluggy_sdk/api/account_api.py +582 -0
  4. pluggy_sdk/api/acquirer_anticipation_api.py +658 -0
  5. pluggy_sdk/api/acquirer_receivable_api.py +658 -0
  6. pluggy_sdk/api/acquirer_sale_api.py +658 -0
  7. pluggy_sdk/api/auth_api.py +599 -0
  8. pluggy_sdk/api/bill_api.py +561 -0
  9. pluggy_sdk/api/bulk_payment_api.py +854 -0
  10. pluggy_sdk/api/category_api.py +1084 -0
  11. pluggy_sdk/api/connector_api.py +970 -0
  12. pluggy_sdk/api/identity_api.py +575 -0
  13. pluggy_sdk/api/income_report_api.py +308 -0
  14. pluggy_sdk/api/investment_api.py +909 -0
  15. pluggy_sdk/api/items_api.py +1441 -0
  16. pluggy_sdk/api/loan_api.py +561 -0
  17. pluggy_sdk/api/payment_customer_api.py +1399 -0
  18. pluggy_sdk/api/payment_intent_api.py +833 -0
  19. pluggy_sdk/api/payment_recipient_api.py +1976 -0
  20. pluggy_sdk/api/payment_request_api.py +1636 -0
  21. pluggy_sdk/api/portfolio_yield_api.py +574 -0
  22. pluggy_sdk/api/smart_account_api.py +1116 -0
  23. pluggy_sdk/api/transaction_api.py +954 -0
  24. pluggy_sdk/api/webhook_api.py +1391 -0
  25. pluggy_sdk/api_client.py +769 -0
  26. pluggy_sdk/api_response.py +21 -0
  27. pluggy_sdk/configuration.py +466 -0
  28. pluggy_sdk/exceptions.py +200 -0
  29. pluggy_sdk/models/__init__.py +145 -0
  30. pluggy_sdk/models/account.py +134 -0
  31. pluggy_sdk/models/accounts_list200_response.py +102 -0
  32. pluggy_sdk/models/acquirer_anticipation.py +117 -0
  33. pluggy_sdk/models/acquirer_anticipation_data.py +101 -0
  34. pluggy_sdk/models/acquirer_data.py +113 -0
  35. pluggy_sdk/models/acquirer_receivable.py +143 -0
  36. pluggy_sdk/models/acquirer_receivable_data.py +108 -0
  37. pluggy_sdk/models/acquirer_receivable_data_establishment.py +96 -0
  38. pluggy_sdk/models/acquirer_receivable_destination_account.py +92 -0
  39. pluggy_sdk/models/acquirer_receivable_related_sale.py +99 -0
  40. pluggy_sdk/models/acquirer_sale.py +171 -0
  41. pluggy_sdk/models/acquirer_sale_data.py +150 -0
  42. pluggy_sdk/models/acquirer_sale_installment.py +93 -0
  43. pluggy_sdk/models/acquirer_sale_installment_data.py +95 -0
  44. pluggy_sdk/models/address.py +110 -0
  45. pluggy_sdk/models/aggregated_portfolio.py +120 -0
  46. pluggy_sdk/models/aggregated_portfolio_response.py +102 -0
  47. pluggy_sdk/models/asset_distribution.py +88 -0
  48. pluggy_sdk/models/auth_request.py +90 -0
  49. pluggy_sdk/models/auth_response.py +88 -0
  50. pluggy_sdk/models/bank_data.py +92 -0
  51. pluggy_sdk/models/bill.py +109 -0
  52. pluggy_sdk/models/bill_finance_charge.py +103 -0
  53. pluggy_sdk/models/bills_list200_response.py +102 -0
  54. pluggy_sdk/models/bulk_payment.py +128 -0
  55. pluggy_sdk/models/bulk_payments_list200_response.py +102 -0
  56. pluggy_sdk/models/category.py +96 -0
  57. pluggy_sdk/models/client_category_rule.py +94 -0
  58. pluggy_sdk/models/company.py +90 -0
  59. pluggy_sdk/models/connect_token_request.py +94 -0
  60. pluggy_sdk/models/connect_token_response.py +88 -0
  61. pluggy_sdk/models/connector.py +141 -0
  62. pluggy_sdk/models/connector_credential.py +121 -0
  63. pluggy_sdk/models/connector_health.py +96 -0
  64. pluggy_sdk/models/connector_health_details.py +90 -0
  65. pluggy_sdk/models/connector_list_response.py +102 -0
  66. pluggy_sdk/models/connector_user_action.py +93 -0
  67. pluggy_sdk/models/create_bulk_payment.py +96 -0
  68. pluggy_sdk/models/create_client_category_rule.py +92 -0
  69. pluggy_sdk/models/create_item.py +111 -0
  70. pluggy_sdk/models/create_item_parameters.py +144 -0
  71. pluggy_sdk/models/create_or_update_payment_customer.py +105 -0
  72. pluggy_sdk/models/create_payment_customer_request_body.py +103 -0
  73. pluggy_sdk/models/create_payment_intent.py +94 -0
  74. pluggy_sdk/models/create_payment_recipient.py +100 -0
  75. pluggy_sdk/models/create_payment_request.py +102 -0
  76. pluggy_sdk/models/create_pix_qr_payment_request.py +96 -0
  77. pluggy_sdk/models/create_smart_account_request.py +102 -0
  78. pluggy_sdk/models/create_webhook.py +99 -0
  79. pluggy_sdk/models/credential_select_option.py +90 -0
  80. pluggy_sdk/models/credit_card_metadata.py +101 -0
  81. pluggy_sdk/models/credit_data.py +127 -0
  82. pluggy_sdk/models/document.py +100 -0
  83. pluggy_sdk/models/email.py +100 -0
  84. pluggy_sdk/models/global_error_response.py +94 -0
  85. pluggy_sdk/models/i_count_response.py +88 -0
  86. pluggy_sdk/models/identity_relation.py +102 -0
  87. pluggy_sdk/models/identity_response.py +149 -0
  88. pluggy_sdk/models/income_report.py +90 -0
  89. pluggy_sdk/models/income_reports_response.py +102 -0
  90. pluggy_sdk/models/investment.py +192 -0
  91. pluggy_sdk/models/investment_expenses.py +108 -0
  92. pluggy_sdk/models/investment_metadata.py +99 -0
  93. pluggy_sdk/models/investment_transaction.py +124 -0
  94. pluggy_sdk/models/investments_list200_response.py +102 -0
  95. pluggy_sdk/models/item.py +148 -0
  96. pluggy_sdk/models/item_creation_error_response.py +102 -0
  97. pluggy_sdk/models/item_error.py +94 -0
  98. pluggy_sdk/models/item_options.py +90 -0
  99. pluggy_sdk/models/loan.py +199 -0
  100. pluggy_sdk/models/loan_contracted_fee.py +118 -0
  101. pluggy_sdk/models/loan_contracted_finance_charge.py +92 -0
  102. pluggy_sdk/models/loan_installment_balloon_payment.py +95 -0
  103. pluggy_sdk/models/loan_installment_balloon_payment_amount.py +90 -0
  104. pluggy_sdk/models/loan_installments.py +130 -0
  105. pluggy_sdk/models/loan_interest_rate.py +136 -0
  106. pluggy_sdk/models/loan_payment_release.py +103 -0
  107. pluggy_sdk/models/loan_payment_release_over_parcel.py +106 -0
  108. pluggy_sdk/models/loan_payment_release_over_parcel_charge.py +92 -0
  109. pluggy_sdk/models/loan_payment_release_over_parcel_fee.py +92 -0
  110. pluggy_sdk/models/loan_payments.py +98 -0
  111. pluggy_sdk/models/loan_warranty.py +94 -0
  112. pluggy_sdk/models/loans_list200_response.py +102 -0
  113. pluggy_sdk/models/merchant.py +96 -0
  114. pluggy_sdk/models/monthly_portfolio.py +100 -0
  115. pluggy_sdk/models/monthly_portfolio_response.py +102 -0
  116. pluggy_sdk/models/not_authenticated_response.py +90 -0
  117. pluggy_sdk/models/page_response_acquirer_anticipations.py +102 -0
  118. pluggy_sdk/models/page_response_acquirer_receivables.py +102 -0
  119. pluggy_sdk/models/page_response_acquirer_sales.py +102 -0
  120. pluggy_sdk/models/page_response_category_rules.py +102 -0
  121. pluggy_sdk/models/page_response_investment_transactions.py +102 -0
  122. pluggy_sdk/models/page_response_transactions.py +102 -0
  123. pluggy_sdk/models/parameter_validation_error.py +92 -0
  124. pluggy_sdk/models/parameter_validation_response.py +98 -0
  125. pluggy_sdk/models/payment_customer.py +105 -0
  126. pluggy_sdk/models/payment_customers_list200_response.py +102 -0
  127. pluggy_sdk/models/payment_data.py +105 -0
  128. pluggy_sdk/models/payment_data_participant.py +101 -0
  129. pluggy_sdk/models/payment_institution.py +101 -0
  130. pluggy_sdk/models/payment_intent.py +145 -0
  131. pluggy_sdk/models/payment_intents_list200_response.py +102 -0
  132. pluggy_sdk/models/payment_recipient.py +106 -0
  133. pluggy_sdk/models/payment_recipient_account.py +99 -0
  134. pluggy_sdk/models/payment_recipients_institution_list200_response.py +102 -0
  135. pluggy_sdk/models/payment_recipients_list200_response.py +102 -0
  136. pluggy_sdk/models/payment_request.py +118 -0
  137. pluggy_sdk/models/payment_request_callback_urls.py +92 -0
  138. pluggy_sdk/models/payment_requests_list200_response.py +102 -0
  139. pluggy_sdk/models/percentage_over_index.py +90 -0
  140. pluggy_sdk/models/phone_number.py +100 -0
  141. pluggy_sdk/models/pix_data.py +90 -0
  142. pluggy_sdk/models/smart_account.py +107 -0
  143. pluggy_sdk/models/smart_account_address.py +112 -0
  144. pluggy_sdk/models/smart_account_balance.py +95 -0
  145. pluggy_sdk/models/smart_accounts_list200_response.py +102 -0
  146. pluggy_sdk/models/status_detail.py +142 -0
  147. pluggy_sdk/models/status_detail_product.py +101 -0
  148. pluggy_sdk/models/status_detail_product_warning.py +92 -0
  149. pluggy_sdk/models/transaction.py +145 -0
  150. pluggy_sdk/models/update_item.py +109 -0
  151. pluggy_sdk/models/update_item_parameters.py +144 -0
  152. pluggy_sdk/models/update_payment_recipient.py +100 -0
  153. pluggy_sdk/models/update_payment_request.py +102 -0
  154. pluggy_sdk/models/update_transaction.py +88 -0
  155. pluggy_sdk/models/webhook.py +106 -0
  156. pluggy_sdk/models/webhook_creation_error_response.py +90 -0
  157. pluggy_sdk/models/webhooks_list200_response.py +102 -0
  158. pluggy_sdk/py.typed +0 -0
  159. pluggy_sdk/rest.py +258 -0
  160. pluggy_sdk-1.0.0.post2.dist-info/METADATA +336 -0
  161. pluggy_sdk-1.0.0.post2.dist-info/RECORD +163 -0
  162. pluggy_sdk-1.0.0.post2.dist-info/WHEEL +5 -0
  163. pluggy_sdk-1.0.0.post2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1399 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pluggy API
5
+
6
+ Pluggy's main API to review data and execute connectors
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: hello@pluggy.ai
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from pydantic import Field, StrictFloat, StrictInt, StrictStr
21
+ from typing import Optional, Union
22
+ from typing_extensions import Annotated
23
+ from pluggy_sdk.models.create_or_update_payment_customer import CreateOrUpdatePaymentCustomer
24
+ from pluggy_sdk.models.create_payment_customer_request_body import CreatePaymentCustomerRequestBody
25
+ from pluggy_sdk.models.payment_customer import PaymentCustomer
26
+ from pluggy_sdk.models.payment_customers_list200_response import PaymentCustomersList200Response
27
+
28
+ from pluggy_sdk.api_client import ApiClient, RequestSerialized
29
+ from pluggy_sdk.api_response import ApiResponse
30
+ from pluggy_sdk.rest import RESTResponseType
31
+
32
+
33
+ class PaymentCustomerApi:
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None) -> None:
41
+ if api_client is None:
42
+ api_client = ApiClient.get_default()
43
+ self.api_client = api_client
44
+
45
+
46
+ @validate_call
47
+ def payment_customer_create(
48
+ self,
49
+ create_payment_customer_request_body: CreatePaymentCustomerRequestBody,
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> PaymentCustomer:
63
+ """Create
64
+
65
+
66
+ :param create_payment_customer_request_body: (required)
67
+ :type create_payment_customer_request_body: CreatePaymentCustomerRequestBody
68
+ :param _request_timeout: timeout setting for this request. If one
69
+ number provided, it will be total request
70
+ timeout. It can also be a pair (tuple) of
71
+ (connection, read) timeouts.
72
+ :type _request_timeout: int, tuple(int, int), optional
73
+ :param _request_auth: set to override the auth_settings for an a single
74
+ request; this effectively ignores the
75
+ authentication in the spec for a single request.
76
+ :type _request_auth: dict, optional
77
+ :param _content_type: force content-type for the request.
78
+ :type _content_type: str, Optional
79
+ :param _headers: set to override the headers for a single
80
+ request; this effectively ignores the headers
81
+ in the spec for a single request.
82
+ :type _headers: dict, optional
83
+ :param _host_index: set to override the host_index for a single
84
+ request; this effectively ignores the host_index
85
+ in the spec for a single request.
86
+ :type _host_index: int, optional
87
+ :return: Returns the result object.
88
+ """ # noqa: E501
89
+
90
+ _param = self._payment_customer_create_serialize(
91
+ create_payment_customer_request_body=create_payment_customer_request_body,
92
+ _request_auth=_request_auth,
93
+ _content_type=_content_type,
94
+ _headers=_headers,
95
+ _host_index=_host_index
96
+ )
97
+
98
+ _response_types_map: Dict[str, Optional[str]] = {
99
+ '200': "PaymentCustomer",
100
+ '400': "GlobalErrorResponse",
101
+ }
102
+ response_data = self.api_client.call_api(
103
+ *_param,
104
+ _request_timeout=_request_timeout
105
+ )
106
+ response_data.read()
107
+ return self.api_client.response_deserialize(
108
+ response_data=response_data,
109
+ response_types_map=_response_types_map,
110
+ ).data
111
+
112
+
113
+ @validate_call
114
+ def payment_customer_create_with_http_info(
115
+ self,
116
+ create_payment_customer_request_body: CreatePaymentCustomerRequestBody,
117
+ _request_timeout: Union[
118
+ None,
119
+ Annotated[StrictFloat, Field(gt=0)],
120
+ Tuple[
121
+ Annotated[StrictFloat, Field(gt=0)],
122
+ Annotated[StrictFloat, Field(gt=0)]
123
+ ]
124
+ ] = None,
125
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
126
+ _content_type: Optional[StrictStr] = None,
127
+ _headers: Optional[Dict[StrictStr, Any]] = None,
128
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
129
+ ) -> ApiResponse[PaymentCustomer]:
130
+ """Create
131
+
132
+
133
+ :param create_payment_customer_request_body: (required)
134
+ :type create_payment_customer_request_body: CreatePaymentCustomerRequestBody
135
+ :param _request_timeout: timeout setting for this request. If one
136
+ number provided, it will be total request
137
+ timeout. It can also be a pair (tuple) of
138
+ (connection, read) timeouts.
139
+ :type _request_timeout: int, tuple(int, int), optional
140
+ :param _request_auth: set to override the auth_settings for an a single
141
+ request; this effectively ignores the
142
+ authentication in the spec for a single request.
143
+ :type _request_auth: dict, optional
144
+ :param _content_type: force content-type for the request.
145
+ :type _content_type: str, Optional
146
+ :param _headers: set to override the headers for a single
147
+ request; this effectively ignores the headers
148
+ in the spec for a single request.
149
+ :type _headers: dict, optional
150
+ :param _host_index: set to override the host_index for a single
151
+ request; this effectively ignores the host_index
152
+ in the spec for a single request.
153
+ :type _host_index: int, optional
154
+ :return: Returns the result object.
155
+ """ # noqa: E501
156
+
157
+ _param = self._payment_customer_create_serialize(
158
+ create_payment_customer_request_body=create_payment_customer_request_body,
159
+ _request_auth=_request_auth,
160
+ _content_type=_content_type,
161
+ _headers=_headers,
162
+ _host_index=_host_index
163
+ )
164
+
165
+ _response_types_map: Dict[str, Optional[str]] = {
166
+ '200': "PaymentCustomer",
167
+ '400': "GlobalErrorResponse",
168
+ }
169
+ response_data = self.api_client.call_api(
170
+ *_param,
171
+ _request_timeout=_request_timeout
172
+ )
173
+ response_data.read()
174
+ return self.api_client.response_deserialize(
175
+ response_data=response_data,
176
+ response_types_map=_response_types_map,
177
+ )
178
+
179
+
180
+ @validate_call
181
+ def payment_customer_create_without_preload_content(
182
+ self,
183
+ create_payment_customer_request_body: CreatePaymentCustomerRequestBody,
184
+ _request_timeout: Union[
185
+ None,
186
+ Annotated[StrictFloat, Field(gt=0)],
187
+ Tuple[
188
+ Annotated[StrictFloat, Field(gt=0)],
189
+ Annotated[StrictFloat, Field(gt=0)]
190
+ ]
191
+ ] = None,
192
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
193
+ _content_type: Optional[StrictStr] = None,
194
+ _headers: Optional[Dict[StrictStr, Any]] = None,
195
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
196
+ ) -> RESTResponseType:
197
+ """Create
198
+
199
+
200
+ :param create_payment_customer_request_body: (required)
201
+ :type create_payment_customer_request_body: CreatePaymentCustomerRequestBody
202
+ :param _request_timeout: timeout setting for this request. If one
203
+ number provided, it will be total request
204
+ timeout. It can also be a pair (tuple) of
205
+ (connection, read) timeouts.
206
+ :type _request_timeout: int, tuple(int, int), optional
207
+ :param _request_auth: set to override the auth_settings for an a single
208
+ request; this effectively ignores the
209
+ authentication in the spec for a single request.
210
+ :type _request_auth: dict, optional
211
+ :param _content_type: force content-type for the request.
212
+ :type _content_type: str, Optional
213
+ :param _headers: set to override the headers for a single
214
+ request; this effectively ignores the headers
215
+ in the spec for a single request.
216
+ :type _headers: dict, optional
217
+ :param _host_index: set to override the host_index for a single
218
+ request; this effectively ignores the host_index
219
+ in the spec for a single request.
220
+ :type _host_index: int, optional
221
+ :return: Returns the result object.
222
+ """ # noqa: E501
223
+
224
+ _param = self._payment_customer_create_serialize(
225
+ create_payment_customer_request_body=create_payment_customer_request_body,
226
+ _request_auth=_request_auth,
227
+ _content_type=_content_type,
228
+ _headers=_headers,
229
+ _host_index=_host_index
230
+ )
231
+
232
+ _response_types_map: Dict[str, Optional[str]] = {
233
+ '200': "PaymentCustomer",
234
+ '400': "GlobalErrorResponse",
235
+ }
236
+ response_data = self.api_client.call_api(
237
+ *_param,
238
+ _request_timeout=_request_timeout
239
+ )
240
+ return response_data.response
241
+
242
+
243
+ def _payment_customer_create_serialize(
244
+ self,
245
+ create_payment_customer_request_body,
246
+ _request_auth,
247
+ _content_type,
248
+ _headers,
249
+ _host_index,
250
+ ) -> RequestSerialized:
251
+
252
+ _host = None
253
+
254
+ _collection_formats: Dict[str, str] = {
255
+ }
256
+
257
+ _path_params: Dict[str, str] = {}
258
+ _query_params: List[Tuple[str, str]] = []
259
+ _header_params: Dict[str, Optional[str]] = _headers or {}
260
+ _form_params: List[Tuple[str, str]] = []
261
+ _files: Dict[str, Union[str, bytes]] = {}
262
+ _body_params: Optional[bytes] = None
263
+
264
+ # process the path parameters
265
+ # process the query parameters
266
+ # process the header parameters
267
+ # process the form parameters
268
+ # process the body parameter
269
+ if create_payment_customer_request_body is not None:
270
+ _body_params = create_payment_customer_request_body
271
+
272
+
273
+ # set the HTTP header `Accept`
274
+ _header_params['Accept'] = self.api_client.select_header_accept(
275
+ [
276
+ 'application/json'
277
+ ]
278
+ )
279
+
280
+ # set the HTTP header `Content-Type`
281
+ if _content_type:
282
+ _header_params['Content-Type'] = _content_type
283
+ else:
284
+ _default_content_type = (
285
+ self.api_client.select_header_content_type(
286
+ [
287
+ 'application/json'
288
+ ]
289
+ )
290
+ )
291
+ if _default_content_type is not None:
292
+ _header_params['Content-Type'] = _default_content_type
293
+
294
+ # authentication setting
295
+ _auth_settings: List[str] = [
296
+ 'default'
297
+ ]
298
+
299
+ return self.api_client.param_serialize(
300
+ method='POST',
301
+ resource_path='/payments/customers',
302
+ path_params=_path_params,
303
+ query_params=_query_params,
304
+ header_params=_header_params,
305
+ body=_body_params,
306
+ post_params=_form_params,
307
+ files=_files,
308
+ auth_settings=_auth_settings,
309
+ collection_formats=_collection_formats,
310
+ _host=_host,
311
+ _request_auth=_request_auth
312
+ )
313
+
314
+
315
+
316
+
317
+ @validate_call
318
+ def payment_customer_delete(
319
+ self,
320
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
321
+ _request_timeout: Union[
322
+ None,
323
+ Annotated[StrictFloat, Field(gt=0)],
324
+ Tuple[
325
+ Annotated[StrictFloat, Field(gt=0)],
326
+ Annotated[StrictFloat, Field(gt=0)]
327
+ ]
328
+ ] = None,
329
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
330
+ _content_type: Optional[StrictStr] = None,
331
+ _headers: Optional[Dict[StrictStr, Any]] = None,
332
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
333
+ ) -> None:
334
+ """Delete
335
+
336
+ Deletes the payment customer resource by its id
337
+
338
+ :param id: Payment customer primary identifier (required)
339
+ :type id: str
340
+ :param _request_timeout: timeout setting for this request. If one
341
+ number provided, it will be total request
342
+ timeout. It can also be a pair (tuple) of
343
+ (connection, read) timeouts.
344
+ :type _request_timeout: int, tuple(int, int), optional
345
+ :param _request_auth: set to override the auth_settings for an a single
346
+ request; this effectively ignores the
347
+ authentication in the spec for a single request.
348
+ :type _request_auth: dict, optional
349
+ :param _content_type: force content-type for the request.
350
+ :type _content_type: str, Optional
351
+ :param _headers: set to override the headers for a single
352
+ request; this effectively ignores the headers
353
+ in the spec for a single request.
354
+ :type _headers: dict, optional
355
+ :param _host_index: set to override the host_index for a single
356
+ request; this effectively ignores the host_index
357
+ in the spec for a single request.
358
+ :type _host_index: int, optional
359
+ :return: Returns the result object.
360
+ """ # noqa: E501
361
+
362
+ _param = self._payment_customer_delete_serialize(
363
+ id=id,
364
+ _request_auth=_request_auth,
365
+ _content_type=_content_type,
366
+ _headers=_headers,
367
+ _host_index=_host_index
368
+ )
369
+
370
+ _response_types_map: Dict[str, Optional[str]] = {
371
+ '200': None,
372
+ '404': "GlobalErrorResponse",
373
+ }
374
+ response_data = self.api_client.call_api(
375
+ *_param,
376
+ _request_timeout=_request_timeout
377
+ )
378
+ response_data.read()
379
+ return self.api_client.response_deserialize(
380
+ response_data=response_data,
381
+ response_types_map=_response_types_map,
382
+ ).data
383
+
384
+
385
+ @validate_call
386
+ def payment_customer_delete_with_http_info(
387
+ self,
388
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
389
+ _request_timeout: Union[
390
+ None,
391
+ Annotated[StrictFloat, Field(gt=0)],
392
+ Tuple[
393
+ Annotated[StrictFloat, Field(gt=0)],
394
+ Annotated[StrictFloat, Field(gt=0)]
395
+ ]
396
+ ] = None,
397
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
398
+ _content_type: Optional[StrictStr] = None,
399
+ _headers: Optional[Dict[StrictStr, Any]] = None,
400
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
401
+ ) -> ApiResponse[None]:
402
+ """Delete
403
+
404
+ Deletes the payment customer resource by its id
405
+
406
+ :param id: Payment customer primary identifier (required)
407
+ :type id: str
408
+ :param _request_timeout: timeout setting for this request. If one
409
+ number provided, it will be total request
410
+ timeout. It can also be a pair (tuple) of
411
+ (connection, read) timeouts.
412
+ :type _request_timeout: int, tuple(int, int), optional
413
+ :param _request_auth: set to override the auth_settings for an a single
414
+ request; this effectively ignores the
415
+ authentication in the spec for a single request.
416
+ :type _request_auth: dict, optional
417
+ :param _content_type: force content-type for the request.
418
+ :type _content_type: str, Optional
419
+ :param _headers: set to override the headers for a single
420
+ request; this effectively ignores the headers
421
+ in the spec for a single request.
422
+ :type _headers: dict, optional
423
+ :param _host_index: set to override the host_index for a single
424
+ request; this effectively ignores the host_index
425
+ in the spec for a single request.
426
+ :type _host_index: int, optional
427
+ :return: Returns the result object.
428
+ """ # noqa: E501
429
+
430
+ _param = self._payment_customer_delete_serialize(
431
+ id=id,
432
+ _request_auth=_request_auth,
433
+ _content_type=_content_type,
434
+ _headers=_headers,
435
+ _host_index=_host_index
436
+ )
437
+
438
+ _response_types_map: Dict[str, Optional[str]] = {
439
+ '200': None,
440
+ '404': "GlobalErrorResponse",
441
+ }
442
+ response_data = self.api_client.call_api(
443
+ *_param,
444
+ _request_timeout=_request_timeout
445
+ )
446
+ response_data.read()
447
+ return self.api_client.response_deserialize(
448
+ response_data=response_data,
449
+ response_types_map=_response_types_map,
450
+ )
451
+
452
+
453
+ @validate_call
454
+ def payment_customer_delete_without_preload_content(
455
+ self,
456
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
457
+ _request_timeout: Union[
458
+ None,
459
+ Annotated[StrictFloat, Field(gt=0)],
460
+ Tuple[
461
+ Annotated[StrictFloat, Field(gt=0)],
462
+ Annotated[StrictFloat, Field(gt=0)]
463
+ ]
464
+ ] = None,
465
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
466
+ _content_type: Optional[StrictStr] = None,
467
+ _headers: Optional[Dict[StrictStr, Any]] = None,
468
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
469
+ ) -> RESTResponseType:
470
+ """Delete
471
+
472
+ Deletes the payment customer resource by its id
473
+
474
+ :param id: Payment customer primary identifier (required)
475
+ :type id: str
476
+ :param _request_timeout: timeout setting for this request. If one
477
+ number provided, it will be total request
478
+ timeout. It can also be a pair (tuple) of
479
+ (connection, read) timeouts.
480
+ :type _request_timeout: int, tuple(int, int), optional
481
+ :param _request_auth: set to override the auth_settings for an a single
482
+ request; this effectively ignores the
483
+ authentication in the spec for a single request.
484
+ :type _request_auth: dict, optional
485
+ :param _content_type: force content-type for the request.
486
+ :type _content_type: str, Optional
487
+ :param _headers: set to override the headers for a single
488
+ request; this effectively ignores the headers
489
+ in the spec for a single request.
490
+ :type _headers: dict, optional
491
+ :param _host_index: set to override the host_index for a single
492
+ request; this effectively ignores the host_index
493
+ in the spec for a single request.
494
+ :type _host_index: int, optional
495
+ :return: Returns the result object.
496
+ """ # noqa: E501
497
+
498
+ _param = self._payment_customer_delete_serialize(
499
+ id=id,
500
+ _request_auth=_request_auth,
501
+ _content_type=_content_type,
502
+ _headers=_headers,
503
+ _host_index=_host_index
504
+ )
505
+
506
+ _response_types_map: Dict[str, Optional[str]] = {
507
+ '200': None,
508
+ '404': "GlobalErrorResponse",
509
+ }
510
+ response_data = self.api_client.call_api(
511
+ *_param,
512
+ _request_timeout=_request_timeout
513
+ )
514
+ return response_data.response
515
+
516
+
517
+ def _payment_customer_delete_serialize(
518
+ self,
519
+ id,
520
+ _request_auth,
521
+ _content_type,
522
+ _headers,
523
+ _host_index,
524
+ ) -> RequestSerialized:
525
+
526
+ _host = None
527
+
528
+ _collection_formats: Dict[str, str] = {
529
+ }
530
+
531
+ _path_params: Dict[str, str] = {}
532
+ _query_params: List[Tuple[str, str]] = []
533
+ _header_params: Dict[str, Optional[str]] = _headers or {}
534
+ _form_params: List[Tuple[str, str]] = []
535
+ _files: Dict[str, Union[str, bytes]] = {}
536
+ _body_params: Optional[bytes] = None
537
+
538
+ # process the path parameters
539
+ if id is not None:
540
+ _path_params['id'] = id
541
+ # process the query parameters
542
+ # process the header parameters
543
+ # process the form parameters
544
+ # process the body parameter
545
+
546
+
547
+ # set the HTTP header `Accept`
548
+ _header_params['Accept'] = self.api_client.select_header_accept(
549
+ [
550
+ 'application/json'
551
+ ]
552
+ )
553
+
554
+
555
+ # authentication setting
556
+ _auth_settings: List[str] = [
557
+ 'default'
558
+ ]
559
+
560
+ return self.api_client.param_serialize(
561
+ method='DELETE',
562
+ resource_path='/payments/customers/{id}',
563
+ path_params=_path_params,
564
+ query_params=_query_params,
565
+ header_params=_header_params,
566
+ body=_body_params,
567
+ post_params=_form_params,
568
+ files=_files,
569
+ auth_settings=_auth_settings,
570
+ collection_formats=_collection_formats,
571
+ _host=_host,
572
+ _request_auth=_request_auth
573
+ )
574
+
575
+
576
+
577
+
578
+ @validate_call
579
+ def payment_customer_retrieve(
580
+ self,
581
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
582
+ _request_timeout: Union[
583
+ None,
584
+ Annotated[StrictFloat, Field(gt=0)],
585
+ Tuple[
586
+ Annotated[StrictFloat, Field(gt=0)],
587
+ Annotated[StrictFloat, Field(gt=0)]
588
+ ]
589
+ ] = None,
590
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
591
+ _content_type: Optional[StrictStr] = None,
592
+ _headers: Optional[Dict[StrictStr, Any]] = None,
593
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
594
+ ) -> PaymentCustomer:
595
+ """Retrieve
596
+
597
+ Recovers the payment customer resource by its id
598
+
599
+ :param id: Payment customer primary identifier (required)
600
+ :type id: str
601
+ :param _request_timeout: timeout setting for this request. If one
602
+ number provided, it will be total request
603
+ timeout. It can also be a pair (tuple) of
604
+ (connection, read) timeouts.
605
+ :type _request_timeout: int, tuple(int, int), optional
606
+ :param _request_auth: set to override the auth_settings for an a single
607
+ request; this effectively ignores the
608
+ authentication in the spec for a single request.
609
+ :type _request_auth: dict, optional
610
+ :param _content_type: force content-type for the request.
611
+ :type _content_type: str, Optional
612
+ :param _headers: set to override the headers for a single
613
+ request; this effectively ignores the headers
614
+ in the spec for a single request.
615
+ :type _headers: dict, optional
616
+ :param _host_index: set to override the host_index for a single
617
+ request; this effectively ignores the host_index
618
+ in the spec for a single request.
619
+ :type _host_index: int, optional
620
+ :return: Returns the result object.
621
+ """ # noqa: E501
622
+
623
+ _param = self._payment_customer_retrieve_serialize(
624
+ id=id,
625
+ _request_auth=_request_auth,
626
+ _content_type=_content_type,
627
+ _headers=_headers,
628
+ _host_index=_host_index
629
+ )
630
+
631
+ _response_types_map: Dict[str, Optional[str]] = {
632
+ '200': "PaymentCustomer",
633
+ '404': "GlobalErrorResponse",
634
+ }
635
+ response_data = self.api_client.call_api(
636
+ *_param,
637
+ _request_timeout=_request_timeout
638
+ )
639
+ response_data.read()
640
+ return self.api_client.response_deserialize(
641
+ response_data=response_data,
642
+ response_types_map=_response_types_map,
643
+ ).data
644
+
645
+
646
+ @validate_call
647
+ def payment_customer_retrieve_with_http_info(
648
+ self,
649
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
650
+ _request_timeout: Union[
651
+ None,
652
+ Annotated[StrictFloat, Field(gt=0)],
653
+ Tuple[
654
+ Annotated[StrictFloat, Field(gt=0)],
655
+ Annotated[StrictFloat, Field(gt=0)]
656
+ ]
657
+ ] = None,
658
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
659
+ _content_type: Optional[StrictStr] = None,
660
+ _headers: Optional[Dict[StrictStr, Any]] = None,
661
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
662
+ ) -> ApiResponse[PaymentCustomer]:
663
+ """Retrieve
664
+
665
+ Recovers the payment customer resource by its id
666
+
667
+ :param id: Payment customer primary identifier (required)
668
+ :type id: str
669
+ :param _request_timeout: timeout setting for this request. If one
670
+ number provided, it will be total request
671
+ timeout. It can also be a pair (tuple) of
672
+ (connection, read) timeouts.
673
+ :type _request_timeout: int, tuple(int, int), optional
674
+ :param _request_auth: set to override the auth_settings for an a single
675
+ request; this effectively ignores the
676
+ authentication in the spec for a single request.
677
+ :type _request_auth: dict, optional
678
+ :param _content_type: force content-type for the request.
679
+ :type _content_type: str, Optional
680
+ :param _headers: set to override the headers for a single
681
+ request; this effectively ignores the headers
682
+ in the spec for a single request.
683
+ :type _headers: dict, optional
684
+ :param _host_index: set to override the host_index for a single
685
+ request; this effectively ignores the host_index
686
+ in the spec for a single request.
687
+ :type _host_index: int, optional
688
+ :return: Returns the result object.
689
+ """ # noqa: E501
690
+
691
+ _param = self._payment_customer_retrieve_serialize(
692
+ id=id,
693
+ _request_auth=_request_auth,
694
+ _content_type=_content_type,
695
+ _headers=_headers,
696
+ _host_index=_host_index
697
+ )
698
+
699
+ _response_types_map: Dict[str, Optional[str]] = {
700
+ '200': "PaymentCustomer",
701
+ '404': "GlobalErrorResponse",
702
+ }
703
+ response_data = self.api_client.call_api(
704
+ *_param,
705
+ _request_timeout=_request_timeout
706
+ )
707
+ response_data.read()
708
+ return self.api_client.response_deserialize(
709
+ response_data=response_data,
710
+ response_types_map=_response_types_map,
711
+ )
712
+
713
+
714
+ @validate_call
715
+ def payment_customer_retrieve_without_preload_content(
716
+ self,
717
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
718
+ _request_timeout: Union[
719
+ None,
720
+ Annotated[StrictFloat, Field(gt=0)],
721
+ Tuple[
722
+ Annotated[StrictFloat, Field(gt=0)],
723
+ Annotated[StrictFloat, Field(gt=0)]
724
+ ]
725
+ ] = None,
726
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
727
+ _content_type: Optional[StrictStr] = None,
728
+ _headers: Optional[Dict[StrictStr, Any]] = None,
729
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
730
+ ) -> RESTResponseType:
731
+ """Retrieve
732
+
733
+ Recovers the payment customer resource by its id
734
+
735
+ :param id: Payment customer primary identifier (required)
736
+ :type id: str
737
+ :param _request_timeout: timeout setting for this request. If one
738
+ number provided, it will be total request
739
+ timeout. It can also be a pair (tuple) of
740
+ (connection, read) timeouts.
741
+ :type _request_timeout: int, tuple(int, int), optional
742
+ :param _request_auth: set to override the auth_settings for an a single
743
+ request; this effectively ignores the
744
+ authentication in the spec for a single request.
745
+ :type _request_auth: dict, optional
746
+ :param _content_type: force content-type for the request.
747
+ :type _content_type: str, Optional
748
+ :param _headers: set to override the headers for a single
749
+ request; this effectively ignores the headers
750
+ in the spec for a single request.
751
+ :type _headers: dict, optional
752
+ :param _host_index: set to override the host_index for a single
753
+ request; this effectively ignores the host_index
754
+ in the spec for a single request.
755
+ :type _host_index: int, optional
756
+ :return: Returns the result object.
757
+ """ # noqa: E501
758
+
759
+ _param = self._payment_customer_retrieve_serialize(
760
+ id=id,
761
+ _request_auth=_request_auth,
762
+ _content_type=_content_type,
763
+ _headers=_headers,
764
+ _host_index=_host_index
765
+ )
766
+
767
+ _response_types_map: Dict[str, Optional[str]] = {
768
+ '200': "PaymentCustomer",
769
+ '404': "GlobalErrorResponse",
770
+ }
771
+ response_data = self.api_client.call_api(
772
+ *_param,
773
+ _request_timeout=_request_timeout
774
+ )
775
+ return response_data.response
776
+
777
+
778
+ def _payment_customer_retrieve_serialize(
779
+ self,
780
+ id,
781
+ _request_auth,
782
+ _content_type,
783
+ _headers,
784
+ _host_index,
785
+ ) -> RequestSerialized:
786
+
787
+ _host = None
788
+
789
+ _collection_formats: Dict[str, str] = {
790
+ }
791
+
792
+ _path_params: Dict[str, str] = {}
793
+ _query_params: List[Tuple[str, str]] = []
794
+ _header_params: Dict[str, Optional[str]] = _headers or {}
795
+ _form_params: List[Tuple[str, str]] = []
796
+ _files: Dict[str, Union[str, bytes]] = {}
797
+ _body_params: Optional[bytes] = None
798
+
799
+ # process the path parameters
800
+ if id is not None:
801
+ _path_params['id'] = id
802
+ # process the query parameters
803
+ # process the header parameters
804
+ # process the form parameters
805
+ # process the body parameter
806
+
807
+
808
+ # set the HTTP header `Accept`
809
+ _header_params['Accept'] = self.api_client.select_header_accept(
810
+ [
811
+ 'application/json'
812
+ ]
813
+ )
814
+
815
+
816
+ # authentication setting
817
+ _auth_settings: List[str] = [
818
+ 'default'
819
+ ]
820
+
821
+ return self.api_client.param_serialize(
822
+ method='GET',
823
+ resource_path='/payments/customers/{id}',
824
+ path_params=_path_params,
825
+ query_params=_query_params,
826
+ header_params=_header_params,
827
+ body=_body_params,
828
+ post_params=_form_params,
829
+ files=_files,
830
+ auth_settings=_auth_settings,
831
+ collection_formats=_collection_formats,
832
+ _host=_host,
833
+ _request_auth=_request_auth
834
+ )
835
+
836
+
837
+
838
+
839
+ @validate_call
840
+ def payment_customer_update(
841
+ self,
842
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
843
+ create_or_update_payment_customer: CreateOrUpdatePaymentCustomer,
844
+ _request_timeout: Union[
845
+ None,
846
+ Annotated[StrictFloat, Field(gt=0)],
847
+ Tuple[
848
+ Annotated[StrictFloat, Field(gt=0)],
849
+ Annotated[StrictFloat, Field(gt=0)]
850
+ ]
851
+ ] = None,
852
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
853
+ _content_type: Optional[StrictStr] = None,
854
+ _headers: Optional[Dict[StrictStr, Any]] = None,
855
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
856
+ ) -> PaymentCustomer:
857
+ """Update
858
+
859
+ Updates the payment customer resource
860
+
861
+ :param id: Payment customer primary identifier (required)
862
+ :type id: str
863
+ :param create_or_update_payment_customer: (required)
864
+ :type create_or_update_payment_customer: CreateOrUpdatePaymentCustomer
865
+ :param _request_timeout: timeout setting for this request. If one
866
+ number provided, it will be total request
867
+ timeout. It can also be a pair (tuple) of
868
+ (connection, read) timeouts.
869
+ :type _request_timeout: int, tuple(int, int), optional
870
+ :param _request_auth: set to override the auth_settings for an a single
871
+ request; this effectively ignores the
872
+ authentication in the spec for a single request.
873
+ :type _request_auth: dict, optional
874
+ :param _content_type: force content-type for the request.
875
+ :type _content_type: str, Optional
876
+ :param _headers: set to override the headers for a single
877
+ request; this effectively ignores the headers
878
+ in the spec for a single request.
879
+ :type _headers: dict, optional
880
+ :param _host_index: set to override the host_index for a single
881
+ request; this effectively ignores the host_index
882
+ in the spec for a single request.
883
+ :type _host_index: int, optional
884
+ :return: Returns the result object.
885
+ """ # noqa: E501
886
+
887
+ _param = self._payment_customer_update_serialize(
888
+ id=id,
889
+ create_or_update_payment_customer=create_or_update_payment_customer,
890
+ _request_auth=_request_auth,
891
+ _content_type=_content_type,
892
+ _headers=_headers,
893
+ _host_index=_host_index
894
+ )
895
+
896
+ _response_types_map: Dict[str, Optional[str]] = {
897
+ '200': "PaymentCustomer",
898
+ }
899
+ response_data = self.api_client.call_api(
900
+ *_param,
901
+ _request_timeout=_request_timeout
902
+ )
903
+ response_data.read()
904
+ return self.api_client.response_deserialize(
905
+ response_data=response_data,
906
+ response_types_map=_response_types_map,
907
+ ).data
908
+
909
+
910
+ @validate_call
911
+ def payment_customer_update_with_http_info(
912
+ self,
913
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
914
+ create_or_update_payment_customer: CreateOrUpdatePaymentCustomer,
915
+ _request_timeout: Union[
916
+ None,
917
+ Annotated[StrictFloat, Field(gt=0)],
918
+ Tuple[
919
+ Annotated[StrictFloat, Field(gt=0)],
920
+ Annotated[StrictFloat, Field(gt=0)]
921
+ ]
922
+ ] = None,
923
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
924
+ _content_type: Optional[StrictStr] = None,
925
+ _headers: Optional[Dict[StrictStr, Any]] = None,
926
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
927
+ ) -> ApiResponse[PaymentCustomer]:
928
+ """Update
929
+
930
+ Updates the payment customer resource
931
+
932
+ :param id: Payment customer primary identifier (required)
933
+ :type id: str
934
+ :param create_or_update_payment_customer: (required)
935
+ :type create_or_update_payment_customer: CreateOrUpdatePaymentCustomer
936
+ :param _request_timeout: timeout setting for this request. If one
937
+ number provided, it will be total request
938
+ timeout. It can also be a pair (tuple) of
939
+ (connection, read) timeouts.
940
+ :type _request_timeout: int, tuple(int, int), optional
941
+ :param _request_auth: set to override the auth_settings for an a single
942
+ request; this effectively ignores the
943
+ authentication in the spec for a single request.
944
+ :type _request_auth: dict, optional
945
+ :param _content_type: force content-type for the request.
946
+ :type _content_type: str, Optional
947
+ :param _headers: set to override the headers for a single
948
+ request; this effectively ignores the headers
949
+ in the spec for a single request.
950
+ :type _headers: dict, optional
951
+ :param _host_index: set to override the host_index for a single
952
+ request; this effectively ignores the host_index
953
+ in the spec for a single request.
954
+ :type _host_index: int, optional
955
+ :return: Returns the result object.
956
+ """ # noqa: E501
957
+
958
+ _param = self._payment_customer_update_serialize(
959
+ id=id,
960
+ create_or_update_payment_customer=create_or_update_payment_customer,
961
+ _request_auth=_request_auth,
962
+ _content_type=_content_type,
963
+ _headers=_headers,
964
+ _host_index=_host_index
965
+ )
966
+
967
+ _response_types_map: Dict[str, Optional[str]] = {
968
+ '200': "PaymentCustomer",
969
+ }
970
+ response_data = self.api_client.call_api(
971
+ *_param,
972
+ _request_timeout=_request_timeout
973
+ )
974
+ response_data.read()
975
+ return self.api_client.response_deserialize(
976
+ response_data=response_data,
977
+ response_types_map=_response_types_map,
978
+ )
979
+
980
+
981
+ @validate_call
982
+ def payment_customer_update_without_preload_content(
983
+ self,
984
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
985
+ create_or_update_payment_customer: CreateOrUpdatePaymentCustomer,
986
+ _request_timeout: Union[
987
+ None,
988
+ Annotated[StrictFloat, Field(gt=0)],
989
+ Tuple[
990
+ Annotated[StrictFloat, Field(gt=0)],
991
+ Annotated[StrictFloat, Field(gt=0)]
992
+ ]
993
+ ] = None,
994
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
995
+ _content_type: Optional[StrictStr] = None,
996
+ _headers: Optional[Dict[StrictStr, Any]] = None,
997
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
998
+ ) -> RESTResponseType:
999
+ """Update
1000
+
1001
+ Updates the payment customer resource
1002
+
1003
+ :param id: Payment customer primary identifier (required)
1004
+ :type id: str
1005
+ :param create_or_update_payment_customer: (required)
1006
+ :type create_or_update_payment_customer: CreateOrUpdatePaymentCustomer
1007
+ :param _request_timeout: timeout setting for this request. If one
1008
+ number provided, it will be total request
1009
+ timeout. It can also be a pair (tuple) of
1010
+ (connection, read) timeouts.
1011
+ :type _request_timeout: int, tuple(int, int), optional
1012
+ :param _request_auth: set to override the auth_settings for an a single
1013
+ request; this effectively ignores the
1014
+ authentication in the spec for a single request.
1015
+ :type _request_auth: dict, optional
1016
+ :param _content_type: force content-type for the request.
1017
+ :type _content_type: str, Optional
1018
+ :param _headers: set to override the headers for a single
1019
+ request; this effectively ignores the headers
1020
+ in the spec for a single request.
1021
+ :type _headers: dict, optional
1022
+ :param _host_index: set to override the host_index for a single
1023
+ request; this effectively ignores the host_index
1024
+ in the spec for a single request.
1025
+ :type _host_index: int, optional
1026
+ :return: Returns the result object.
1027
+ """ # noqa: E501
1028
+
1029
+ _param = self._payment_customer_update_serialize(
1030
+ id=id,
1031
+ create_or_update_payment_customer=create_or_update_payment_customer,
1032
+ _request_auth=_request_auth,
1033
+ _content_type=_content_type,
1034
+ _headers=_headers,
1035
+ _host_index=_host_index
1036
+ )
1037
+
1038
+ _response_types_map: Dict[str, Optional[str]] = {
1039
+ '200': "PaymentCustomer",
1040
+ }
1041
+ response_data = self.api_client.call_api(
1042
+ *_param,
1043
+ _request_timeout=_request_timeout
1044
+ )
1045
+ return response_data.response
1046
+
1047
+
1048
+ def _payment_customer_update_serialize(
1049
+ self,
1050
+ id,
1051
+ create_or_update_payment_customer,
1052
+ _request_auth,
1053
+ _content_type,
1054
+ _headers,
1055
+ _host_index,
1056
+ ) -> RequestSerialized:
1057
+
1058
+ _host = None
1059
+
1060
+ _collection_formats: Dict[str, str] = {
1061
+ }
1062
+
1063
+ _path_params: Dict[str, str] = {}
1064
+ _query_params: List[Tuple[str, str]] = []
1065
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1066
+ _form_params: List[Tuple[str, str]] = []
1067
+ _files: Dict[str, Union[str, bytes]] = {}
1068
+ _body_params: Optional[bytes] = None
1069
+
1070
+ # process the path parameters
1071
+ if id is not None:
1072
+ _path_params['id'] = id
1073
+ # process the query parameters
1074
+ # process the header parameters
1075
+ # process the form parameters
1076
+ # process the body parameter
1077
+ if create_or_update_payment_customer is not None:
1078
+ _body_params = create_or_update_payment_customer
1079
+
1080
+
1081
+ # set the HTTP header `Accept`
1082
+ _header_params['Accept'] = self.api_client.select_header_accept(
1083
+ [
1084
+ 'application/json'
1085
+ ]
1086
+ )
1087
+
1088
+ # set the HTTP header `Content-Type`
1089
+ if _content_type:
1090
+ _header_params['Content-Type'] = _content_type
1091
+ else:
1092
+ _default_content_type = (
1093
+ self.api_client.select_header_content_type(
1094
+ [
1095
+ 'application/json'
1096
+ ]
1097
+ )
1098
+ )
1099
+ if _default_content_type is not None:
1100
+ _header_params['Content-Type'] = _default_content_type
1101
+
1102
+ # authentication setting
1103
+ _auth_settings: List[str] = [
1104
+ 'default'
1105
+ ]
1106
+
1107
+ return self.api_client.param_serialize(
1108
+ method='PATCH',
1109
+ resource_path='/payments/customers/{id}',
1110
+ path_params=_path_params,
1111
+ query_params=_query_params,
1112
+ header_params=_header_params,
1113
+ body=_body_params,
1114
+ post_params=_form_params,
1115
+ files=_files,
1116
+ auth_settings=_auth_settings,
1117
+ collection_formats=_collection_formats,
1118
+ _host=_host,
1119
+ _request_auth=_request_auth
1120
+ )
1121
+
1122
+
1123
+
1124
+
1125
+ @validate_call
1126
+ def payment_customers_list(
1127
+ self,
1128
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
1129
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
1130
+ _request_timeout: Union[
1131
+ None,
1132
+ Annotated[StrictFloat, Field(gt=0)],
1133
+ Tuple[
1134
+ Annotated[StrictFloat, Field(gt=0)],
1135
+ Annotated[StrictFloat, Field(gt=0)]
1136
+ ]
1137
+ ] = None,
1138
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1139
+ _content_type: Optional[StrictStr] = None,
1140
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1141
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1142
+ ) -> PaymentCustomersList200Response:
1143
+ """List
1144
+
1145
+ Recovers all created payment customers
1146
+
1147
+ :param page_size: Page size for the paging request, default: 20
1148
+ :type page_size: float
1149
+ :param page: Page number for the paging request, default: 1
1150
+ :type page: float
1151
+ :param _request_timeout: timeout setting for this request. If one
1152
+ number provided, it will be total request
1153
+ timeout. It can also be a pair (tuple) of
1154
+ (connection, read) timeouts.
1155
+ :type _request_timeout: int, tuple(int, int), optional
1156
+ :param _request_auth: set to override the auth_settings for an a single
1157
+ request; this effectively ignores the
1158
+ authentication in the spec for a single request.
1159
+ :type _request_auth: dict, optional
1160
+ :param _content_type: force content-type for the request.
1161
+ :type _content_type: str, Optional
1162
+ :param _headers: set to override the headers for a single
1163
+ request; this effectively ignores the headers
1164
+ in the spec for a single request.
1165
+ :type _headers: dict, optional
1166
+ :param _host_index: set to override the host_index for a single
1167
+ request; this effectively ignores the host_index
1168
+ in the spec for a single request.
1169
+ :type _host_index: int, optional
1170
+ :return: Returns the result object.
1171
+ """ # noqa: E501
1172
+
1173
+ _param = self._payment_customers_list_serialize(
1174
+ page_size=page_size,
1175
+ page=page,
1176
+ _request_auth=_request_auth,
1177
+ _content_type=_content_type,
1178
+ _headers=_headers,
1179
+ _host_index=_host_index
1180
+ )
1181
+
1182
+ _response_types_map: Dict[str, Optional[str]] = {
1183
+ '200': "PaymentCustomersList200Response",
1184
+ }
1185
+ response_data = self.api_client.call_api(
1186
+ *_param,
1187
+ _request_timeout=_request_timeout
1188
+ )
1189
+ response_data.read()
1190
+ return self.api_client.response_deserialize(
1191
+ response_data=response_data,
1192
+ response_types_map=_response_types_map,
1193
+ ).data
1194
+
1195
+
1196
+ @validate_call
1197
+ def payment_customers_list_with_http_info(
1198
+ self,
1199
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
1200
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
1201
+ _request_timeout: Union[
1202
+ None,
1203
+ Annotated[StrictFloat, Field(gt=0)],
1204
+ Tuple[
1205
+ Annotated[StrictFloat, Field(gt=0)],
1206
+ Annotated[StrictFloat, Field(gt=0)]
1207
+ ]
1208
+ ] = None,
1209
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1210
+ _content_type: Optional[StrictStr] = None,
1211
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1212
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1213
+ ) -> ApiResponse[PaymentCustomersList200Response]:
1214
+ """List
1215
+
1216
+ Recovers all created payment customers
1217
+
1218
+ :param page_size: Page size for the paging request, default: 20
1219
+ :type page_size: float
1220
+ :param page: Page number for the paging request, default: 1
1221
+ :type page: float
1222
+ :param _request_timeout: timeout setting for this request. If one
1223
+ number provided, it will be total request
1224
+ timeout. It can also be a pair (tuple) of
1225
+ (connection, read) timeouts.
1226
+ :type _request_timeout: int, tuple(int, int), optional
1227
+ :param _request_auth: set to override the auth_settings for an a single
1228
+ request; this effectively ignores the
1229
+ authentication in the spec for a single request.
1230
+ :type _request_auth: dict, optional
1231
+ :param _content_type: force content-type for the request.
1232
+ :type _content_type: str, Optional
1233
+ :param _headers: set to override the headers for a single
1234
+ request; this effectively ignores the headers
1235
+ in the spec for a single request.
1236
+ :type _headers: dict, optional
1237
+ :param _host_index: set to override the host_index for a single
1238
+ request; this effectively ignores the host_index
1239
+ in the spec for a single request.
1240
+ :type _host_index: int, optional
1241
+ :return: Returns the result object.
1242
+ """ # noqa: E501
1243
+
1244
+ _param = self._payment_customers_list_serialize(
1245
+ page_size=page_size,
1246
+ page=page,
1247
+ _request_auth=_request_auth,
1248
+ _content_type=_content_type,
1249
+ _headers=_headers,
1250
+ _host_index=_host_index
1251
+ )
1252
+
1253
+ _response_types_map: Dict[str, Optional[str]] = {
1254
+ '200': "PaymentCustomersList200Response",
1255
+ }
1256
+ response_data = self.api_client.call_api(
1257
+ *_param,
1258
+ _request_timeout=_request_timeout
1259
+ )
1260
+ response_data.read()
1261
+ return self.api_client.response_deserialize(
1262
+ response_data=response_data,
1263
+ response_types_map=_response_types_map,
1264
+ )
1265
+
1266
+
1267
+ @validate_call
1268
+ def payment_customers_list_without_preload_content(
1269
+ self,
1270
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
1271
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
1272
+ _request_timeout: Union[
1273
+ None,
1274
+ Annotated[StrictFloat, Field(gt=0)],
1275
+ Tuple[
1276
+ Annotated[StrictFloat, Field(gt=0)],
1277
+ Annotated[StrictFloat, Field(gt=0)]
1278
+ ]
1279
+ ] = None,
1280
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1281
+ _content_type: Optional[StrictStr] = None,
1282
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1283
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1284
+ ) -> RESTResponseType:
1285
+ """List
1286
+
1287
+ Recovers all created payment customers
1288
+
1289
+ :param page_size: Page size for the paging request, default: 20
1290
+ :type page_size: float
1291
+ :param page: Page number for the paging request, default: 1
1292
+ :type page: float
1293
+ :param _request_timeout: timeout setting for this request. If one
1294
+ number provided, it will be total request
1295
+ timeout. It can also be a pair (tuple) of
1296
+ (connection, read) timeouts.
1297
+ :type _request_timeout: int, tuple(int, int), optional
1298
+ :param _request_auth: set to override the auth_settings for an a single
1299
+ request; this effectively ignores the
1300
+ authentication in the spec for a single request.
1301
+ :type _request_auth: dict, optional
1302
+ :param _content_type: force content-type for the request.
1303
+ :type _content_type: str, Optional
1304
+ :param _headers: set to override the headers for a single
1305
+ request; this effectively ignores the headers
1306
+ in the spec for a single request.
1307
+ :type _headers: dict, optional
1308
+ :param _host_index: set to override the host_index for a single
1309
+ request; this effectively ignores the host_index
1310
+ in the spec for a single request.
1311
+ :type _host_index: int, optional
1312
+ :return: Returns the result object.
1313
+ """ # noqa: E501
1314
+
1315
+ _param = self._payment_customers_list_serialize(
1316
+ page_size=page_size,
1317
+ page=page,
1318
+ _request_auth=_request_auth,
1319
+ _content_type=_content_type,
1320
+ _headers=_headers,
1321
+ _host_index=_host_index
1322
+ )
1323
+
1324
+ _response_types_map: Dict[str, Optional[str]] = {
1325
+ '200': "PaymentCustomersList200Response",
1326
+ }
1327
+ response_data = self.api_client.call_api(
1328
+ *_param,
1329
+ _request_timeout=_request_timeout
1330
+ )
1331
+ return response_data.response
1332
+
1333
+
1334
+ def _payment_customers_list_serialize(
1335
+ self,
1336
+ page_size,
1337
+ page,
1338
+ _request_auth,
1339
+ _content_type,
1340
+ _headers,
1341
+ _host_index,
1342
+ ) -> RequestSerialized:
1343
+
1344
+ _host = None
1345
+
1346
+ _collection_formats: Dict[str, str] = {
1347
+ }
1348
+
1349
+ _path_params: Dict[str, str] = {}
1350
+ _query_params: List[Tuple[str, str]] = []
1351
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1352
+ _form_params: List[Tuple[str, str]] = []
1353
+ _files: Dict[str, Union[str, bytes]] = {}
1354
+ _body_params: Optional[bytes] = None
1355
+
1356
+ # process the path parameters
1357
+ # process the query parameters
1358
+ if page_size is not None:
1359
+
1360
+ _query_params.append(('pageSize', page_size))
1361
+
1362
+ if page is not None:
1363
+
1364
+ _query_params.append(('page', page))
1365
+
1366
+ # process the header parameters
1367
+ # process the form parameters
1368
+ # process the body parameter
1369
+
1370
+
1371
+ # set the HTTP header `Accept`
1372
+ _header_params['Accept'] = self.api_client.select_header_accept(
1373
+ [
1374
+ 'application/json'
1375
+ ]
1376
+ )
1377
+
1378
+
1379
+ # authentication setting
1380
+ _auth_settings: List[str] = [
1381
+ 'default'
1382
+ ]
1383
+
1384
+ return self.api_client.param_serialize(
1385
+ method='GET',
1386
+ resource_path='/payments/customers',
1387
+ path_params=_path_params,
1388
+ query_params=_query_params,
1389
+ header_params=_header_params,
1390
+ body=_body_params,
1391
+ post_params=_form_params,
1392
+ files=_files,
1393
+ auth_settings=_auth_settings,
1394
+ collection_formats=_collection_formats,
1395
+ _host=_host,
1396
+ _request_auth=_request_auth
1397
+ )
1398
+
1399
+