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