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,1414 @@
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[
262
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
263
+ ] = {}
264
+ _body_params: Optional[bytes] = None
265
+
266
+ # process the path parameters
267
+ # process the query parameters
268
+ # process the header parameters
269
+ # process the form parameters
270
+ # process the body parameter
271
+ if create_payment_customer_request_body is not None:
272
+ _body_params = create_payment_customer_request_body
273
+
274
+
275
+ # set the HTTP header `Accept`
276
+ if 'Accept' not in _header_params:
277
+ _header_params['Accept'] = self.api_client.select_header_accept(
278
+ [
279
+ 'application/json'
280
+ ]
281
+ )
282
+
283
+ # set the HTTP header `Content-Type`
284
+ if _content_type:
285
+ _header_params['Content-Type'] = _content_type
286
+ else:
287
+ _default_content_type = (
288
+ self.api_client.select_header_content_type(
289
+ [
290
+ 'application/json'
291
+ ]
292
+ )
293
+ )
294
+ if _default_content_type is not None:
295
+ _header_params['Content-Type'] = _default_content_type
296
+
297
+ # authentication setting
298
+ _auth_settings: List[str] = [
299
+ 'default'
300
+ ]
301
+
302
+ return self.api_client.param_serialize(
303
+ method='POST',
304
+ resource_path='/payments/customers',
305
+ path_params=_path_params,
306
+ query_params=_query_params,
307
+ header_params=_header_params,
308
+ body=_body_params,
309
+ post_params=_form_params,
310
+ files=_files,
311
+ auth_settings=_auth_settings,
312
+ collection_formats=_collection_formats,
313
+ _host=_host,
314
+ _request_auth=_request_auth
315
+ )
316
+
317
+
318
+
319
+
320
+ @validate_call
321
+ def payment_customer_delete(
322
+ self,
323
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
324
+ _request_timeout: Union[
325
+ None,
326
+ Annotated[StrictFloat, Field(gt=0)],
327
+ Tuple[
328
+ Annotated[StrictFloat, Field(gt=0)],
329
+ Annotated[StrictFloat, Field(gt=0)]
330
+ ]
331
+ ] = None,
332
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
333
+ _content_type: Optional[StrictStr] = None,
334
+ _headers: Optional[Dict[StrictStr, Any]] = None,
335
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
336
+ ) -> None:
337
+ """Delete
338
+
339
+ Deletes the payment customer resource by its id
340
+
341
+ :param id: Payment customer primary identifier (required)
342
+ :type id: str
343
+ :param _request_timeout: timeout setting for this request. If one
344
+ number provided, it will be total request
345
+ timeout. It can also be a pair (tuple) of
346
+ (connection, read) timeouts.
347
+ :type _request_timeout: int, tuple(int, int), optional
348
+ :param _request_auth: set to override the auth_settings for an a single
349
+ request; this effectively ignores the
350
+ authentication in the spec for a single request.
351
+ :type _request_auth: dict, optional
352
+ :param _content_type: force content-type for the request.
353
+ :type _content_type: str, Optional
354
+ :param _headers: set to override the headers for a single
355
+ request; this effectively ignores the headers
356
+ in the spec for a single request.
357
+ :type _headers: dict, optional
358
+ :param _host_index: set to override the host_index for a single
359
+ request; this effectively ignores the host_index
360
+ in the spec for a single request.
361
+ :type _host_index: int, optional
362
+ :return: Returns the result object.
363
+ """ # noqa: E501
364
+
365
+ _param = self._payment_customer_delete_serialize(
366
+ id=id,
367
+ _request_auth=_request_auth,
368
+ _content_type=_content_type,
369
+ _headers=_headers,
370
+ _host_index=_host_index
371
+ )
372
+
373
+ _response_types_map: Dict[str, Optional[str]] = {
374
+ '200': None,
375
+ '404': "GlobalErrorResponse",
376
+ }
377
+ response_data = self.api_client.call_api(
378
+ *_param,
379
+ _request_timeout=_request_timeout
380
+ )
381
+ response_data.read()
382
+ return self.api_client.response_deserialize(
383
+ response_data=response_data,
384
+ response_types_map=_response_types_map,
385
+ ).data
386
+
387
+
388
+ @validate_call
389
+ def payment_customer_delete_with_http_info(
390
+ self,
391
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
392
+ _request_timeout: Union[
393
+ None,
394
+ Annotated[StrictFloat, Field(gt=0)],
395
+ Tuple[
396
+ Annotated[StrictFloat, Field(gt=0)],
397
+ Annotated[StrictFloat, Field(gt=0)]
398
+ ]
399
+ ] = None,
400
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
401
+ _content_type: Optional[StrictStr] = None,
402
+ _headers: Optional[Dict[StrictStr, Any]] = None,
403
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
404
+ ) -> ApiResponse[None]:
405
+ """Delete
406
+
407
+ Deletes the payment customer resource by its id
408
+
409
+ :param id: Payment customer primary identifier (required)
410
+ :type id: str
411
+ :param _request_timeout: timeout setting for this request. If one
412
+ number provided, it will be total request
413
+ timeout. It can also be a pair (tuple) of
414
+ (connection, read) timeouts.
415
+ :type _request_timeout: int, tuple(int, int), optional
416
+ :param _request_auth: set to override the auth_settings for an a single
417
+ request; this effectively ignores the
418
+ authentication in the spec for a single request.
419
+ :type _request_auth: dict, optional
420
+ :param _content_type: force content-type for the request.
421
+ :type _content_type: str, Optional
422
+ :param _headers: set to override the headers for a single
423
+ request; this effectively ignores the headers
424
+ in the spec for a single request.
425
+ :type _headers: dict, optional
426
+ :param _host_index: set to override the host_index for a single
427
+ request; this effectively ignores the host_index
428
+ in the spec for a single request.
429
+ :type _host_index: int, optional
430
+ :return: Returns the result object.
431
+ """ # noqa: E501
432
+
433
+ _param = self._payment_customer_delete_serialize(
434
+ id=id,
435
+ _request_auth=_request_auth,
436
+ _content_type=_content_type,
437
+ _headers=_headers,
438
+ _host_index=_host_index
439
+ )
440
+
441
+ _response_types_map: Dict[str, Optional[str]] = {
442
+ '200': None,
443
+ '404': "GlobalErrorResponse",
444
+ }
445
+ response_data = self.api_client.call_api(
446
+ *_param,
447
+ _request_timeout=_request_timeout
448
+ )
449
+ response_data.read()
450
+ return self.api_client.response_deserialize(
451
+ response_data=response_data,
452
+ response_types_map=_response_types_map,
453
+ )
454
+
455
+
456
+ @validate_call
457
+ def payment_customer_delete_without_preload_content(
458
+ self,
459
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
460
+ _request_timeout: Union[
461
+ None,
462
+ Annotated[StrictFloat, Field(gt=0)],
463
+ Tuple[
464
+ Annotated[StrictFloat, Field(gt=0)],
465
+ Annotated[StrictFloat, Field(gt=0)]
466
+ ]
467
+ ] = None,
468
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
469
+ _content_type: Optional[StrictStr] = None,
470
+ _headers: Optional[Dict[StrictStr, Any]] = None,
471
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
472
+ ) -> RESTResponseType:
473
+ """Delete
474
+
475
+ Deletes the payment customer resource by its id
476
+
477
+ :param id: Payment customer primary identifier (required)
478
+ :type id: str
479
+ :param _request_timeout: timeout setting for this request. If one
480
+ number provided, it will be total request
481
+ timeout. It can also be a pair (tuple) of
482
+ (connection, read) timeouts.
483
+ :type _request_timeout: int, tuple(int, int), optional
484
+ :param _request_auth: set to override the auth_settings for an a single
485
+ request; this effectively ignores the
486
+ authentication in the spec for a single request.
487
+ :type _request_auth: dict, optional
488
+ :param _content_type: force content-type for the request.
489
+ :type _content_type: str, Optional
490
+ :param _headers: set to override the headers for a single
491
+ request; this effectively ignores the headers
492
+ in the spec for a single request.
493
+ :type _headers: dict, optional
494
+ :param _host_index: set to override the host_index for a single
495
+ request; this effectively ignores the host_index
496
+ in the spec for a single request.
497
+ :type _host_index: int, optional
498
+ :return: Returns the result object.
499
+ """ # noqa: E501
500
+
501
+ _param = self._payment_customer_delete_serialize(
502
+ id=id,
503
+ _request_auth=_request_auth,
504
+ _content_type=_content_type,
505
+ _headers=_headers,
506
+ _host_index=_host_index
507
+ )
508
+
509
+ _response_types_map: Dict[str, Optional[str]] = {
510
+ '200': None,
511
+ '404': "GlobalErrorResponse",
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_customer_delete_serialize(
521
+ self,
522
+ id,
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
+ if id is not None:
545
+ _path_params['id'] = id
546
+ # process the query parameters
547
+ # process the header parameters
548
+ # process the form parameters
549
+ # process the body parameter
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
+
561
+ # authentication setting
562
+ _auth_settings: List[str] = [
563
+ 'default'
564
+ ]
565
+
566
+ return self.api_client.param_serialize(
567
+ method='DELETE',
568
+ resource_path='/payments/customers/{id}',
569
+ path_params=_path_params,
570
+ query_params=_query_params,
571
+ header_params=_header_params,
572
+ body=_body_params,
573
+ post_params=_form_params,
574
+ files=_files,
575
+ auth_settings=_auth_settings,
576
+ collection_formats=_collection_formats,
577
+ _host=_host,
578
+ _request_auth=_request_auth
579
+ )
580
+
581
+
582
+
583
+
584
+ @validate_call
585
+ def payment_customer_retrieve(
586
+ self,
587
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
588
+ _request_timeout: Union[
589
+ None,
590
+ Annotated[StrictFloat, Field(gt=0)],
591
+ Tuple[
592
+ Annotated[StrictFloat, Field(gt=0)],
593
+ Annotated[StrictFloat, Field(gt=0)]
594
+ ]
595
+ ] = None,
596
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
597
+ _content_type: Optional[StrictStr] = None,
598
+ _headers: Optional[Dict[StrictStr, Any]] = None,
599
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
600
+ ) -> PaymentCustomer:
601
+ """Retrieve
602
+
603
+ Recovers the payment customer resource by its id
604
+
605
+ :param id: Payment customer primary identifier (required)
606
+ :type id: str
607
+ :param _request_timeout: timeout setting for this request. If one
608
+ number provided, it will be total request
609
+ timeout. It can also be a pair (tuple) of
610
+ (connection, read) timeouts.
611
+ :type _request_timeout: int, tuple(int, int), optional
612
+ :param _request_auth: set to override the auth_settings for an a single
613
+ request; this effectively ignores the
614
+ authentication in the spec for a single request.
615
+ :type _request_auth: dict, optional
616
+ :param _content_type: force content-type for the request.
617
+ :type _content_type: str, Optional
618
+ :param _headers: set to override the headers for a single
619
+ request; this effectively ignores the headers
620
+ in the spec for a single request.
621
+ :type _headers: dict, optional
622
+ :param _host_index: set to override the host_index for a single
623
+ request; this effectively ignores the host_index
624
+ in the spec for a single request.
625
+ :type _host_index: int, optional
626
+ :return: Returns the result object.
627
+ """ # noqa: E501
628
+
629
+ _param = self._payment_customer_retrieve_serialize(
630
+ id=id,
631
+ _request_auth=_request_auth,
632
+ _content_type=_content_type,
633
+ _headers=_headers,
634
+ _host_index=_host_index
635
+ )
636
+
637
+ _response_types_map: Dict[str, Optional[str]] = {
638
+ '200': "PaymentCustomer",
639
+ '404': "GlobalErrorResponse",
640
+ }
641
+ response_data = self.api_client.call_api(
642
+ *_param,
643
+ _request_timeout=_request_timeout
644
+ )
645
+ response_data.read()
646
+ return self.api_client.response_deserialize(
647
+ response_data=response_data,
648
+ response_types_map=_response_types_map,
649
+ ).data
650
+
651
+
652
+ @validate_call
653
+ def payment_customer_retrieve_with_http_info(
654
+ self,
655
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
656
+ _request_timeout: Union[
657
+ None,
658
+ Annotated[StrictFloat, Field(gt=0)],
659
+ Tuple[
660
+ Annotated[StrictFloat, Field(gt=0)],
661
+ Annotated[StrictFloat, Field(gt=0)]
662
+ ]
663
+ ] = None,
664
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
665
+ _content_type: Optional[StrictStr] = None,
666
+ _headers: Optional[Dict[StrictStr, Any]] = None,
667
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
668
+ ) -> ApiResponse[PaymentCustomer]:
669
+ """Retrieve
670
+
671
+ Recovers the payment customer resource by its id
672
+
673
+ :param id: Payment customer primary identifier (required)
674
+ :type id: str
675
+ :param _request_timeout: timeout setting for this request. If one
676
+ number provided, it will be total request
677
+ timeout. It can also be a pair (tuple) of
678
+ (connection, read) timeouts.
679
+ :type _request_timeout: int, tuple(int, int), optional
680
+ :param _request_auth: set to override the auth_settings for an a single
681
+ request; this effectively ignores the
682
+ authentication in the spec for a single request.
683
+ :type _request_auth: dict, optional
684
+ :param _content_type: force content-type for the request.
685
+ :type _content_type: str, Optional
686
+ :param _headers: set to override the headers for a single
687
+ request; this effectively ignores the headers
688
+ in the spec for a single request.
689
+ :type _headers: dict, optional
690
+ :param _host_index: set to override the host_index for a single
691
+ request; this effectively ignores the host_index
692
+ in the spec for a single request.
693
+ :type _host_index: int, optional
694
+ :return: Returns the result object.
695
+ """ # noqa: E501
696
+
697
+ _param = self._payment_customer_retrieve_serialize(
698
+ id=id,
699
+ _request_auth=_request_auth,
700
+ _content_type=_content_type,
701
+ _headers=_headers,
702
+ _host_index=_host_index
703
+ )
704
+
705
+ _response_types_map: Dict[str, Optional[str]] = {
706
+ '200': "PaymentCustomer",
707
+ '404': "GlobalErrorResponse",
708
+ }
709
+ response_data = self.api_client.call_api(
710
+ *_param,
711
+ _request_timeout=_request_timeout
712
+ )
713
+ response_data.read()
714
+ return self.api_client.response_deserialize(
715
+ response_data=response_data,
716
+ response_types_map=_response_types_map,
717
+ )
718
+
719
+
720
+ @validate_call
721
+ def payment_customer_retrieve_without_preload_content(
722
+ self,
723
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
724
+ _request_timeout: Union[
725
+ None,
726
+ Annotated[StrictFloat, Field(gt=0)],
727
+ Tuple[
728
+ Annotated[StrictFloat, Field(gt=0)],
729
+ Annotated[StrictFloat, Field(gt=0)]
730
+ ]
731
+ ] = None,
732
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
733
+ _content_type: Optional[StrictStr] = None,
734
+ _headers: Optional[Dict[StrictStr, Any]] = None,
735
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
736
+ ) -> RESTResponseType:
737
+ """Retrieve
738
+
739
+ Recovers the payment customer resource by its id
740
+
741
+ :param id: Payment customer primary identifier (required)
742
+ :type id: str
743
+ :param _request_timeout: timeout setting for this request. If one
744
+ number provided, it will be total request
745
+ timeout. It can also be a pair (tuple) of
746
+ (connection, read) timeouts.
747
+ :type _request_timeout: int, tuple(int, int), optional
748
+ :param _request_auth: set to override the auth_settings for an a single
749
+ request; this effectively ignores the
750
+ authentication in the spec for a single request.
751
+ :type _request_auth: dict, optional
752
+ :param _content_type: force content-type for the request.
753
+ :type _content_type: str, Optional
754
+ :param _headers: set to override the headers for a single
755
+ request; this effectively ignores the headers
756
+ in the spec for a single request.
757
+ :type _headers: dict, optional
758
+ :param _host_index: set to override the host_index for a single
759
+ request; this effectively ignores the host_index
760
+ in the spec for a single request.
761
+ :type _host_index: int, optional
762
+ :return: Returns the result object.
763
+ """ # noqa: E501
764
+
765
+ _param = self._payment_customer_retrieve_serialize(
766
+ id=id,
767
+ _request_auth=_request_auth,
768
+ _content_type=_content_type,
769
+ _headers=_headers,
770
+ _host_index=_host_index
771
+ )
772
+
773
+ _response_types_map: Dict[str, Optional[str]] = {
774
+ '200': "PaymentCustomer",
775
+ '404': "GlobalErrorResponse",
776
+ }
777
+ response_data = self.api_client.call_api(
778
+ *_param,
779
+ _request_timeout=_request_timeout
780
+ )
781
+ return response_data.response
782
+
783
+
784
+ def _payment_customer_retrieve_serialize(
785
+ self,
786
+ id,
787
+ _request_auth,
788
+ _content_type,
789
+ _headers,
790
+ _host_index,
791
+ ) -> RequestSerialized:
792
+
793
+ _host = None
794
+
795
+ _collection_formats: Dict[str, str] = {
796
+ }
797
+
798
+ _path_params: Dict[str, str] = {}
799
+ _query_params: List[Tuple[str, str]] = []
800
+ _header_params: Dict[str, Optional[str]] = _headers or {}
801
+ _form_params: List[Tuple[str, str]] = []
802
+ _files: Dict[
803
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
804
+ ] = {}
805
+ _body_params: Optional[bytes] = None
806
+
807
+ # process the path parameters
808
+ if id is not None:
809
+ _path_params['id'] = id
810
+ # process the query parameters
811
+ # process the header parameters
812
+ # process the form parameters
813
+ # process the body parameter
814
+
815
+
816
+ # set the HTTP header `Accept`
817
+ if 'Accept' not in _header_params:
818
+ _header_params['Accept'] = self.api_client.select_header_accept(
819
+ [
820
+ 'application/json'
821
+ ]
822
+ )
823
+
824
+
825
+ # authentication setting
826
+ _auth_settings: List[str] = [
827
+ 'default'
828
+ ]
829
+
830
+ return self.api_client.param_serialize(
831
+ method='GET',
832
+ resource_path='/payments/customers/{id}',
833
+ path_params=_path_params,
834
+ query_params=_query_params,
835
+ header_params=_header_params,
836
+ body=_body_params,
837
+ post_params=_form_params,
838
+ files=_files,
839
+ auth_settings=_auth_settings,
840
+ collection_formats=_collection_formats,
841
+ _host=_host,
842
+ _request_auth=_request_auth
843
+ )
844
+
845
+
846
+
847
+
848
+ @validate_call
849
+ def payment_customer_update(
850
+ self,
851
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
852
+ create_or_update_payment_customer: CreateOrUpdatePaymentCustomer,
853
+ _request_timeout: Union[
854
+ None,
855
+ Annotated[StrictFloat, Field(gt=0)],
856
+ Tuple[
857
+ Annotated[StrictFloat, Field(gt=0)],
858
+ Annotated[StrictFloat, Field(gt=0)]
859
+ ]
860
+ ] = None,
861
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
862
+ _content_type: Optional[StrictStr] = None,
863
+ _headers: Optional[Dict[StrictStr, Any]] = None,
864
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
865
+ ) -> PaymentCustomer:
866
+ """Update
867
+
868
+ Updates the payment customer resource
869
+
870
+ :param id: Payment customer primary identifier (required)
871
+ :type id: str
872
+ :param create_or_update_payment_customer: (required)
873
+ :type create_or_update_payment_customer: CreateOrUpdatePaymentCustomer
874
+ :param _request_timeout: timeout setting for this request. If one
875
+ number provided, it will be total request
876
+ timeout. It can also be a pair (tuple) of
877
+ (connection, read) timeouts.
878
+ :type _request_timeout: int, tuple(int, int), optional
879
+ :param _request_auth: set to override the auth_settings for an a single
880
+ request; this effectively ignores the
881
+ authentication in the spec for a single request.
882
+ :type _request_auth: dict, optional
883
+ :param _content_type: force content-type for the request.
884
+ :type _content_type: str, Optional
885
+ :param _headers: set to override the headers for a single
886
+ request; this effectively ignores the headers
887
+ in the spec for a single request.
888
+ :type _headers: dict, optional
889
+ :param _host_index: set to override the host_index for a single
890
+ request; this effectively ignores the host_index
891
+ in the spec for a single request.
892
+ :type _host_index: int, optional
893
+ :return: Returns the result object.
894
+ """ # noqa: E501
895
+
896
+ _param = self._payment_customer_update_serialize(
897
+ id=id,
898
+ create_or_update_payment_customer=create_or_update_payment_customer,
899
+ _request_auth=_request_auth,
900
+ _content_type=_content_type,
901
+ _headers=_headers,
902
+ _host_index=_host_index
903
+ )
904
+
905
+ _response_types_map: Dict[str, Optional[str]] = {
906
+ '200': "PaymentCustomer",
907
+ }
908
+ response_data = self.api_client.call_api(
909
+ *_param,
910
+ _request_timeout=_request_timeout
911
+ )
912
+ response_data.read()
913
+ return self.api_client.response_deserialize(
914
+ response_data=response_data,
915
+ response_types_map=_response_types_map,
916
+ ).data
917
+
918
+
919
+ @validate_call
920
+ def payment_customer_update_with_http_info(
921
+ self,
922
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
923
+ create_or_update_payment_customer: CreateOrUpdatePaymentCustomer,
924
+ _request_timeout: Union[
925
+ None,
926
+ Annotated[StrictFloat, Field(gt=0)],
927
+ Tuple[
928
+ Annotated[StrictFloat, Field(gt=0)],
929
+ Annotated[StrictFloat, Field(gt=0)]
930
+ ]
931
+ ] = None,
932
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
933
+ _content_type: Optional[StrictStr] = None,
934
+ _headers: Optional[Dict[StrictStr, Any]] = None,
935
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
936
+ ) -> ApiResponse[PaymentCustomer]:
937
+ """Update
938
+
939
+ Updates the payment customer resource
940
+
941
+ :param id: Payment customer primary identifier (required)
942
+ :type id: str
943
+ :param create_or_update_payment_customer: (required)
944
+ :type create_or_update_payment_customer: CreateOrUpdatePaymentCustomer
945
+ :param _request_timeout: timeout setting for this request. If one
946
+ number provided, it will be total request
947
+ timeout. It can also be a pair (tuple) of
948
+ (connection, read) timeouts.
949
+ :type _request_timeout: int, tuple(int, int), optional
950
+ :param _request_auth: set to override the auth_settings for an a single
951
+ request; this effectively ignores the
952
+ authentication in the spec for a single request.
953
+ :type _request_auth: dict, optional
954
+ :param _content_type: force content-type for the request.
955
+ :type _content_type: str, Optional
956
+ :param _headers: set to override the headers for a single
957
+ request; this effectively ignores the headers
958
+ in the spec for a single request.
959
+ :type _headers: dict, optional
960
+ :param _host_index: set to override the host_index for a single
961
+ request; this effectively ignores the host_index
962
+ in the spec for a single request.
963
+ :type _host_index: int, optional
964
+ :return: Returns the result object.
965
+ """ # noqa: E501
966
+
967
+ _param = self._payment_customer_update_serialize(
968
+ id=id,
969
+ create_or_update_payment_customer=create_or_update_payment_customer,
970
+ _request_auth=_request_auth,
971
+ _content_type=_content_type,
972
+ _headers=_headers,
973
+ _host_index=_host_index
974
+ )
975
+
976
+ _response_types_map: Dict[str, Optional[str]] = {
977
+ '200': "PaymentCustomer",
978
+ }
979
+ response_data = self.api_client.call_api(
980
+ *_param,
981
+ _request_timeout=_request_timeout
982
+ )
983
+ response_data.read()
984
+ return self.api_client.response_deserialize(
985
+ response_data=response_data,
986
+ response_types_map=_response_types_map,
987
+ )
988
+
989
+
990
+ @validate_call
991
+ def payment_customer_update_without_preload_content(
992
+ self,
993
+ id: Annotated[StrictStr, Field(description="Payment customer primary identifier")],
994
+ create_or_update_payment_customer: CreateOrUpdatePaymentCustomer,
995
+ _request_timeout: Union[
996
+ None,
997
+ Annotated[StrictFloat, Field(gt=0)],
998
+ Tuple[
999
+ Annotated[StrictFloat, Field(gt=0)],
1000
+ Annotated[StrictFloat, Field(gt=0)]
1001
+ ]
1002
+ ] = None,
1003
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1004
+ _content_type: Optional[StrictStr] = None,
1005
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1006
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1007
+ ) -> RESTResponseType:
1008
+ """Update
1009
+
1010
+ Updates the payment customer resource
1011
+
1012
+ :param id: Payment customer primary identifier (required)
1013
+ :type id: str
1014
+ :param create_or_update_payment_customer: (required)
1015
+ :type create_or_update_payment_customer: CreateOrUpdatePaymentCustomer
1016
+ :param _request_timeout: timeout setting for this request. If one
1017
+ number provided, it will be total request
1018
+ timeout. It can also be a pair (tuple) of
1019
+ (connection, read) timeouts.
1020
+ :type _request_timeout: int, tuple(int, int), optional
1021
+ :param _request_auth: set to override the auth_settings for an a single
1022
+ request; this effectively ignores the
1023
+ authentication in the spec for a single request.
1024
+ :type _request_auth: dict, optional
1025
+ :param _content_type: force content-type for the request.
1026
+ :type _content_type: str, Optional
1027
+ :param _headers: set to override the headers for a single
1028
+ request; this effectively ignores the headers
1029
+ in the spec for a single request.
1030
+ :type _headers: dict, optional
1031
+ :param _host_index: set to override the host_index for a single
1032
+ request; this effectively ignores the host_index
1033
+ in the spec for a single request.
1034
+ :type _host_index: int, optional
1035
+ :return: Returns the result object.
1036
+ """ # noqa: E501
1037
+
1038
+ _param = self._payment_customer_update_serialize(
1039
+ id=id,
1040
+ create_or_update_payment_customer=create_or_update_payment_customer,
1041
+ _request_auth=_request_auth,
1042
+ _content_type=_content_type,
1043
+ _headers=_headers,
1044
+ _host_index=_host_index
1045
+ )
1046
+
1047
+ _response_types_map: Dict[str, Optional[str]] = {
1048
+ '200': "PaymentCustomer",
1049
+ }
1050
+ response_data = self.api_client.call_api(
1051
+ *_param,
1052
+ _request_timeout=_request_timeout
1053
+ )
1054
+ return response_data.response
1055
+
1056
+
1057
+ def _payment_customer_update_serialize(
1058
+ self,
1059
+ id,
1060
+ create_or_update_payment_customer,
1061
+ _request_auth,
1062
+ _content_type,
1063
+ _headers,
1064
+ _host_index,
1065
+ ) -> RequestSerialized:
1066
+
1067
+ _host = None
1068
+
1069
+ _collection_formats: Dict[str, str] = {
1070
+ }
1071
+
1072
+ _path_params: Dict[str, str] = {}
1073
+ _query_params: List[Tuple[str, str]] = []
1074
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1075
+ _form_params: List[Tuple[str, str]] = []
1076
+ _files: Dict[
1077
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1078
+ ] = {}
1079
+ _body_params: Optional[bytes] = None
1080
+
1081
+ # process the path parameters
1082
+ if id is not None:
1083
+ _path_params['id'] = id
1084
+ # process the query parameters
1085
+ # process the header parameters
1086
+ # process the form parameters
1087
+ # process the body parameter
1088
+ if create_or_update_payment_customer is not None:
1089
+ _body_params = create_or_update_payment_customer
1090
+
1091
+
1092
+ # set the HTTP header `Accept`
1093
+ if 'Accept' not in _header_params:
1094
+ _header_params['Accept'] = self.api_client.select_header_accept(
1095
+ [
1096
+ 'application/json'
1097
+ ]
1098
+ )
1099
+
1100
+ # set the HTTP header `Content-Type`
1101
+ if _content_type:
1102
+ _header_params['Content-Type'] = _content_type
1103
+ else:
1104
+ _default_content_type = (
1105
+ self.api_client.select_header_content_type(
1106
+ [
1107
+ 'application/json'
1108
+ ]
1109
+ )
1110
+ )
1111
+ if _default_content_type is not None:
1112
+ _header_params['Content-Type'] = _default_content_type
1113
+
1114
+ # authentication setting
1115
+ _auth_settings: List[str] = [
1116
+ 'default'
1117
+ ]
1118
+
1119
+ return self.api_client.param_serialize(
1120
+ method='PATCH',
1121
+ resource_path='/payments/customers/{id}',
1122
+ path_params=_path_params,
1123
+ query_params=_query_params,
1124
+ header_params=_header_params,
1125
+ body=_body_params,
1126
+ post_params=_form_params,
1127
+ files=_files,
1128
+ auth_settings=_auth_settings,
1129
+ collection_formats=_collection_formats,
1130
+ _host=_host,
1131
+ _request_auth=_request_auth
1132
+ )
1133
+
1134
+
1135
+
1136
+
1137
+ @validate_call
1138
+ def payment_customers_list(
1139
+ self,
1140
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
1141
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
1142
+ _request_timeout: Union[
1143
+ None,
1144
+ Annotated[StrictFloat, Field(gt=0)],
1145
+ Tuple[
1146
+ Annotated[StrictFloat, Field(gt=0)],
1147
+ Annotated[StrictFloat, Field(gt=0)]
1148
+ ]
1149
+ ] = None,
1150
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1151
+ _content_type: Optional[StrictStr] = None,
1152
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1153
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1154
+ ) -> PaymentCustomersList200Response:
1155
+ """List
1156
+
1157
+ Recovers all created payment customers
1158
+
1159
+ :param page_size: Page size for the paging request, default: 20
1160
+ :type page_size: float
1161
+ :param page: Page number for the paging request, default: 1
1162
+ :type page: float
1163
+ :param _request_timeout: timeout setting for this request. If one
1164
+ number provided, it will be total request
1165
+ timeout. It can also be a pair (tuple) of
1166
+ (connection, read) timeouts.
1167
+ :type _request_timeout: int, tuple(int, int), optional
1168
+ :param _request_auth: set to override the auth_settings for an a single
1169
+ request; this effectively ignores the
1170
+ authentication in the spec for a single request.
1171
+ :type _request_auth: dict, optional
1172
+ :param _content_type: force content-type for the request.
1173
+ :type _content_type: str, Optional
1174
+ :param _headers: set to override the headers for a single
1175
+ request; this effectively ignores the headers
1176
+ in the spec for a single request.
1177
+ :type _headers: dict, optional
1178
+ :param _host_index: set to override the host_index for a single
1179
+ request; this effectively ignores the host_index
1180
+ in the spec for a single request.
1181
+ :type _host_index: int, optional
1182
+ :return: Returns the result object.
1183
+ """ # noqa: E501
1184
+
1185
+ _param = self._payment_customers_list_serialize(
1186
+ page_size=page_size,
1187
+ page=page,
1188
+ _request_auth=_request_auth,
1189
+ _content_type=_content_type,
1190
+ _headers=_headers,
1191
+ _host_index=_host_index
1192
+ )
1193
+
1194
+ _response_types_map: Dict[str, Optional[str]] = {
1195
+ '200': "PaymentCustomersList200Response",
1196
+ }
1197
+ response_data = self.api_client.call_api(
1198
+ *_param,
1199
+ _request_timeout=_request_timeout
1200
+ )
1201
+ response_data.read()
1202
+ return self.api_client.response_deserialize(
1203
+ response_data=response_data,
1204
+ response_types_map=_response_types_map,
1205
+ ).data
1206
+
1207
+
1208
+ @validate_call
1209
+ def payment_customers_list_with_http_info(
1210
+ self,
1211
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
1212
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
1213
+ _request_timeout: Union[
1214
+ None,
1215
+ Annotated[StrictFloat, Field(gt=0)],
1216
+ Tuple[
1217
+ Annotated[StrictFloat, Field(gt=0)],
1218
+ Annotated[StrictFloat, Field(gt=0)]
1219
+ ]
1220
+ ] = None,
1221
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1222
+ _content_type: Optional[StrictStr] = None,
1223
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1224
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1225
+ ) -> ApiResponse[PaymentCustomersList200Response]:
1226
+ """List
1227
+
1228
+ Recovers all created payment customers
1229
+
1230
+ :param page_size: Page size for the paging request, default: 20
1231
+ :type page_size: float
1232
+ :param page: Page number for the paging request, default: 1
1233
+ :type page: float
1234
+ :param _request_timeout: timeout setting for this request. If one
1235
+ number provided, it will be total request
1236
+ timeout. It can also be a pair (tuple) of
1237
+ (connection, read) timeouts.
1238
+ :type _request_timeout: int, tuple(int, int), optional
1239
+ :param _request_auth: set to override the auth_settings for an a single
1240
+ request; this effectively ignores the
1241
+ authentication in the spec for a single request.
1242
+ :type _request_auth: dict, optional
1243
+ :param _content_type: force content-type for the request.
1244
+ :type _content_type: str, Optional
1245
+ :param _headers: set to override the headers for a single
1246
+ request; this effectively ignores the headers
1247
+ in the spec for a single request.
1248
+ :type _headers: dict, optional
1249
+ :param _host_index: set to override the host_index for a single
1250
+ request; this effectively ignores the host_index
1251
+ in the spec for a single request.
1252
+ :type _host_index: int, optional
1253
+ :return: Returns the result object.
1254
+ """ # noqa: E501
1255
+
1256
+ _param = self._payment_customers_list_serialize(
1257
+ page_size=page_size,
1258
+ page=page,
1259
+ _request_auth=_request_auth,
1260
+ _content_type=_content_type,
1261
+ _headers=_headers,
1262
+ _host_index=_host_index
1263
+ )
1264
+
1265
+ _response_types_map: Dict[str, Optional[str]] = {
1266
+ '200': "PaymentCustomersList200Response",
1267
+ }
1268
+ response_data = self.api_client.call_api(
1269
+ *_param,
1270
+ _request_timeout=_request_timeout
1271
+ )
1272
+ response_data.read()
1273
+ return self.api_client.response_deserialize(
1274
+ response_data=response_data,
1275
+ response_types_map=_response_types_map,
1276
+ )
1277
+
1278
+
1279
+ @validate_call
1280
+ def payment_customers_list_without_preload_content(
1281
+ self,
1282
+ page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
1283
+ page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
1284
+ _request_timeout: Union[
1285
+ None,
1286
+ Annotated[StrictFloat, Field(gt=0)],
1287
+ Tuple[
1288
+ Annotated[StrictFloat, Field(gt=0)],
1289
+ Annotated[StrictFloat, Field(gt=0)]
1290
+ ]
1291
+ ] = None,
1292
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1293
+ _content_type: Optional[StrictStr] = None,
1294
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1295
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1296
+ ) -> RESTResponseType:
1297
+ """List
1298
+
1299
+ Recovers all created payment customers
1300
+
1301
+ :param page_size: Page size for the paging request, default: 20
1302
+ :type page_size: float
1303
+ :param page: Page number for the paging request, default: 1
1304
+ :type page: float
1305
+ :param _request_timeout: timeout setting for this request. If one
1306
+ number provided, it will be total request
1307
+ timeout. It can also be a pair (tuple) of
1308
+ (connection, read) timeouts.
1309
+ :type _request_timeout: int, tuple(int, int), optional
1310
+ :param _request_auth: set to override the auth_settings for an a single
1311
+ request; this effectively ignores the
1312
+ authentication in the spec for a single request.
1313
+ :type _request_auth: dict, optional
1314
+ :param _content_type: force content-type for the request.
1315
+ :type _content_type: str, Optional
1316
+ :param _headers: set to override the headers for a single
1317
+ request; this effectively ignores the headers
1318
+ in the spec for a single request.
1319
+ :type _headers: dict, optional
1320
+ :param _host_index: set to override the host_index for a single
1321
+ request; this effectively ignores the host_index
1322
+ in the spec for a single request.
1323
+ :type _host_index: int, optional
1324
+ :return: Returns the result object.
1325
+ """ # noqa: E501
1326
+
1327
+ _param = self._payment_customers_list_serialize(
1328
+ page_size=page_size,
1329
+ page=page,
1330
+ _request_auth=_request_auth,
1331
+ _content_type=_content_type,
1332
+ _headers=_headers,
1333
+ _host_index=_host_index
1334
+ )
1335
+
1336
+ _response_types_map: Dict[str, Optional[str]] = {
1337
+ '200': "PaymentCustomersList200Response",
1338
+ }
1339
+ response_data = self.api_client.call_api(
1340
+ *_param,
1341
+ _request_timeout=_request_timeout
1342
+ )
1343
+ return response_data.response
1344
+
1345
+
1346
+ def _payment_customers_list_serialize(
1347
+ self,
1348
+ page_size,
1349
+ page,
1350
+ _request_auth,
1351
+ _content_type,
1352
+ _headers,
1353
+ _host_index,
1354
+ ) -> RequestSerialized:
1355
+
1356
+ _host = None
1357
+
1358
+ _collection_formats: Dict[str, str] = {
1359
+ }
1360
+
1361
+ _path_params: Dict[str, str] = {}
1362
+ _query_params: List[Tuple[str, str]] = []
1363
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1364
+ _form_params: List[Tuple[str, str]] = []
1365
+ _files: Dict[
1366
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1367
+ ] = {}
1368
+ _body_params: Optional[bytes] = None
1369
+
1370
+ # process the path parameters
1371
+ # process the query parameters
1372
+ if page_size is not None:
1373
+
1374
+ _query_params.append(('pageSize', page_size))
1375
+
1376
+ if page is not None:
1377
+
1378
+ _query_params.append(('page', page))
1379
+
1380
+ # process the header parameters
1381
+ # process the form parameters
1382
+ # process the body parameter
1383
+
1384
+
1385
+ # set the HTTP header `Accept`
1386
+ if 'Accept' not in _header_params:
1387
+ _header_params['Accept'] = self.api_client.select_header_accept(
1388
+ [
1389
+ 'application/json'
1390
+ ]
1391
+ )
1392
+
1393
+
1394
+ # authentication setting
1395
+ _auth_settings: List[str] = [
1396
+ 'default'
1397
+ ]
1398
+
1399
+ return self.api_client.param_serialize(
1400
+ method='GET',
1401
+ resource_path='/payments/customers',
1402
+ path_params=_path_params,
1403
+ query_params=_query_params,
1404
+ header_params=_header_params,
1405
+ body=_body_params,
1406
+ post_params=_form_params,
1407
+ files=_files,
1408
+ auth_settings=_auth_settings,
1409
+ collection_formats=_collection_formats,
1410
+ _host=_host,
1411
+ _request_auth=_request_auth
1412
+ )
1413
+
1414
+