pluggy-sdk 1.0.0.post15__py3-none-any.whl → 1.0.0.post17__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.
@@ -0,0 +1,817 @@
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.payment_schedules_list200_response import PaymentSchedulesList200Response
23
+
24
+ from pluggy_sdk.api_client import ApiClient, RequestSerialized
25
+ from pluggy_sdk.api_response import ApiResponse
26
+ from pluggy_sdk.rest import RESTResponseType
27
+
28
+
29
+ class PaymentScheduleApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+
42
+ @validate_call
43
+ def payment_schedules_cancel(
44
+ self,
45
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
46
+ _request_timeout: Union[
47
+ None,
48
+ Annotated[StrictFloat, Field(gt=0)],
49
+ Tuple[
50
+ Annotated[StrictFloat, Field(gt=0)],
51
+ Annotated[StrictFloat, Field(gt=0)]
52
+ ]
53
+ ] = None,
54
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
55
+ _content_type: Optional[StrictStr] = None,
56
+ _headers: Optional[Dict[StrictStr, Any]] = None,
57
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
58
+ ) -> None:
59
+ """Cancel Payment Schedule Authorization
60
+
61
+
62
+
63
+ :param id: Payment request primary identifier (required)
64
+ :type id: str
65
+ :param _request_timeout: timeout setting for this request. If one
66
+ number provided, it will be total request
67
+ timeout. It can also be a pair (tuple) of
68
+ (connection, read) timeouts.
69
+ :type _request_timeout: int, tuple(int, int), optional
70
+ :param _request_auth: set to override the auth_settings for an a single
71
+ request; this effectively ignores the
72
+ authentication in the spec for a single request.
73
+ :type _request_auth: dict, optional
74
+ :param _content_type: force content-type for the request.
75
+ :type _content_type: str, Optional
76
+ :param _headers: set to override the headers for a single
77
+ request; this effectively ignores the headers
78
+ in the spec for a single request.
79
+ :type _headers: dict, optional
80
+ :param _host_index: set to override the host_index for a single
81
+ request; this effectively ignores the host_index
82
+ in the spec for a single request.
83
+ :type _host_index: int, optional
84
+ :return: Returns the result object.
85
+ """ # noqa: E501
86
+
87
+ _param = self._payment_schedules_cancel_serialize(
88
+ id=id,
89
+ _request_auth=_request_auth,
90
+ _content_type=_content_type,
91
+ _headers=_headers,
92
+ _host_index=_host_index
93
+ )
94
+
95
+ _response_types_map: Dict[str, Optional[str]] = {
96
+ '204': None,
97
+ }
98
+ response_data = self.api_client.call_api(
99
+ *_param,
100
+ _request_timeout=_request_timeout
101
+ )
102
+ response_data.read()
103
+ return self.api_client.response_deserialize(
104
+ response_data=response_data,
105
+ response_types_map=_response_types_map,
106
+ ).data
107
+
108
+
109
+ @validate_call
110
+ def payment_schedules_cancel_with_http_info(
111
+ self,
112
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
113
+ _request_timeout: Union[
114
+ None,
115
+ Annotated[StrictFloat, Field(gt=0)],
116
+ Tuple[
117
+ Annotated[StrictFloat, Field(gt=0)],
118
+ Annotated[StrictFloat, Field(gt=0)]
119
+ ]
120
+ ] = None,
121
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
122
+ _content_type: Optional[StrictStr] = None,
123
+ _headers: Optional[Dict[StrictStr, Any]] = None,
124
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
125
+ ) -> ApiResponse[None]:
126
+ """Cancel Payment Schedule Authorization
127
+
128
+
129
+
130
+ :param id: Payment request primary identifier (required)
131
+ :type id: str
132
+ :param _request_timeout: timeout setting for this request. If one
133
+ number provided, it will be total request
134
+ timeout. It can also be a pair (tuple) of
135
+ (connection, read) timeouts.
136
+ :type _request_timeout: int, tuple(int, int), optional
137
+ :param _request_auth: set to override the auth_settings for an a single
138
+ request; this effectively ignores the
139
+ authentication in the spec for a single request.
140
+ :type _request_auth: dict, optional
141
+ :param _content_type: force content-type for the request.
142
+ :type _content_type: str, Optional
143
+ :param _headers: set to override the headers for a single
144
+ request; this effectively ignores the headers
145
+ in the spec for a single request.
146
+ :type _headers: dict, optional
147
+ :param _host_index: set to override the host_index for a single
148
+ request; this effectively ignores the host_index
149
+ in the spec for a single request.
150
+ :type _host_index: int, optional
151
+ :return: Returns the result object.
152
+ """ # noqa: E501
153
+
154
+ _param = self._payment_schedules_cancel_serialize(
155
+ id=id,
156
+ _request_auth=_request_auth,
157
+ _content_type=_content_type,
158
+ _headers=_headers,
159
+ _host_index=_host_index
160
+ )
161
+
162
+ _response_types_map: Dict[str, Optional[str]] = {
163
+ '204': None,
164
+ }
165
+ response_data = self.api_client.call_api(
166
+ *_param,
167
+ _request_timeout=_request_timeout
168
+ )
169
+ response_data.read()
170
+ return self.api_client.response_deserialize(
171
+ response_data=response_data,
172
+ response_types_map=_response_types_map,
173
+ )
174
+
175
+
176
+ @validate_call
177
+ def payment_schedules_cancel_without_preload_content(
178
+ self,
179
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
180
+ _request_timeout: Union[
181
+ None,
182
+ Annotated[StrictFloat, Field(gt=0)],
183
+ Tuple[
184
+ Annotated[StrictFloat, Field(gt=0)],
185
+ Annotated[StrictFloat, Field(gt=0)]
186
+ ]
187
+ ] = None,
188
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
189
+ _content_type: Optional[StrictStr] = None,
190
+ _headers: Optional[Dict[StrictStr, Any]] = None,
191
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
192
+ ) -> RESTResponseType:
193
+ """Cancel Payment Schedule Authorization
194
+
195
+
196
+
197
+ :param id: Payment request 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._payment_schedules_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
+ '204': None,
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 _payment_schedules_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[str, Union[str, bytes]] = {}
258
+ _body_params: Optional[bytes] = None
259
+
260
+ # process the path parameters
261
+ if id is not None:
262
+ _path_params['id'] = id
263
+ # process the query parameters
264
+ # process the header parameters
265
+ # process the form parameters
266
+ # process the body parameter
267
+
268
+
269
+
270
+
271
+ # authentication setting
272
+ _auth_settings: List[str] = [
273
+ 'default'
274
+ ]
275
+
276
+ return self.api_client.param_serialize(
277
+ method='POST',
278
+ resource_path='/payments/requests/{id}/schedules/cancel',
279
+ path_params=_path_params,
280
+ query_params=_query_params,
281
+ header_params=_header_params,
282
+ body=_body_params,
283
+ post_params=_form_params,
284
+ files=_files,
285
+ auth_settings=_auth_settings,
286
+ collection_formats=_collection_formats,
287
+ _host=_host,
288
+ _request_auth=_request_auth
289
+ )
290
+
291
+
292
+
293
+
294
+ @validate_call
295
+ def payment_schedules_cancel_specific(
296
+ self,
297
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
298
+ schedule_id: Annotated[StrictStr, Field(description="Payment schedule primary identifier")],
299
+ _request_timeout: Union[
300
+ None,
301
+ Annotated[StrictFloat, Field(gt=0)],
302
+ Tuple[
303
+ Annotated[StrictFloat, Field(gt=0)],
304
+ Annotated[StrictFloat, Field(gt=0)]
305
+ ]
306
+ ] = None,
307
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
308
+ _content_type: Optional[StrictStr] = None,
309
+ _headers: Optional[Dict[StrictStr, Any]] = None,
310
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
311
+ ) -> None:
312
+ """Cancel Payment Schedule Authorization
313
+
314
+
315
+
316
+ :param id: Payment request primary identifier (required)
317
+ :type id: str
318
+ :param schedule_id: Payment schedule primary identifier (required)
319
+ :type schedule_id: str
320
+ :param _request_timeout: timeout setting for this request. If one
321
+ number provided, it will be total request
322
+ timeout. It can also be a pair (tuple) of
323
+ (connection, read) timeouts.
324
+ :type _request_timeout: int, tuple(int, int), optional
325
+ :param _request_auth: set to override the auth_settings for an a single
326
+ request; this effectively ignores the
327
+ authentication in the spec for a single request.
328
+ :type _request_auth: dict, optional
329
+ :param _content_type: force content-type for the request.
330
+ :type _content_type: str, Optional
331
+ :param _headers: set to override the headers for a single
332
+ request; this effectively ignores the headers
333
+ in the spec for a single request.
334
+ :type _headers: dict, optional
335
+ :param _host_index: set to override the host_index for a single
336
+ request; this effectively ignores the host_index
337
+ in the spec for a single request.
338
+ :type _host_index: int, optional
339
+ :return: Returns the result object.
340
+ """ # noqa: E501
341
+
342
+ _param = self._payment_schedules_cancel_specific_serialize(
343
+ id=id,
344
+ schedule_id=schedule_id,
345
+ _request_auth=_request_auth,
346
+ _content_type=_content_type,
347
+ _headers=_headers,
348
+ _host_index=_host_index
349
+ )
350
+
351
+ _response_types_map: Dict[str, Optional[str]] = {
352
+ '204': None,
353
+ }
354
+ response_data = self.api_client.call_api(
355
+ *_param,
356
+ _request_timeout=_request_timeout
357
+ )
358
+ response_data.read()
359
+ return self.api_client.response_deserialize(
360
+ response_data=response_data,
361
+ response_types_map=_response_types_map,
362
+ ).data
363
+
364
+
365
+ @validate_call
366
+ def payment_schedules_cancel_specific_with_http_info(
367
+ self,
368
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
369
+ schedule_id: Annotated[StrictStr, Field(description="Payment schedule primary identifier")],
370
+ _request_timeout: Union[
371
+ None,
372
+ Annotated[StrictFloat, Field(gt=0)],
373
+ Tuple[
374
+ Annotated[StrictFloat, Field(gt=0)],
375
+ Annotated[StrictFloat, Field(gt=0)]
376
+ ]
377
+ ] = None,
378
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
379
+ _content_type: Optional[StrictStr] = None,
380
+ _headers: Optional[Dict[StrictStr, Any]] = None,
381
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
382
+ ) -> ApiResponse[None]:
383
+ """Cancel Payment Schedule Authorization
384
+
385
+
386
+
387
+ :param id: Payment request primary identifier (required)
388
+ :type id: str
389
+ :param schedule_id: Payment schedule primary identifier (required)
390
+ :type schedule_id: str
391
+ :param _request_timeout: timeout setting for this request. If one
392
+ number provided, it will be total request
393
+ timeout. It can also be a pair (tuple) of
394
+ (connection, read) timeouts.
395
+ :type _request_timeout: int, tuple(int, int), optional
396
+ :param _request_auth: set to override the auth_settings for an a single
397
+ request; this effectively ignores the
398
+ authentication in the spec for a single request.
399
+ :type _request_auth: dict, optional
400
+ :param _content_type: force content-type for the request.
401
+ :type _content_type: str, Optional
402
+ :param _headers: set to override the headers for a single
403
+ request; this effectively ignores the headers
404
+ in the spec for a single request.
405
+ :type _headers: dict, optional
406
+ :param _host_index: set to override the host_index for a single
407
+ request; this effectively ignores the host_index
408
+ in the spec for a single request.
409
+ :type _host_index: int, optional
410
+ :return: Returns the result object.
411
+ """ # noqa: E501
412
+
413
+ _param = self._payment_schedules_cancel_specific_serialize(
414
+ id=id,
415
+ schedule_id=schedule_id,
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
+ '204': None,
424
+ }
425
+ response_data = self.api_client.call_api(
426
+ *_param,
427
+ _request_timeout=_request_timeout
428
+ )
429
+ response_data.read()
430
+ return self.api_client.response_deserialize(
431
+ response_data=response_data,
432
+ response_types_map=_response_types_map,
433
+ )
434
+
435
+
436
+ @validate_call
437
+ def payment_schedules_cancel_specific_without_preload_content(
438
+ self,
439
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
440
+ schedule_id: Annotated[StrictStr, Field(description="Payment schedule primary identifier")],
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
+ """Cancel Payment Schedule Authorization
455
+
456
+
457
+
458
+ :param id: Payment request primary identifier (required)
459
+ :type id: str
460
+ :param schedule_id: Payment schedule primary identifier (required)
461
+ :type schedule_id: str
462
+ :param _request_timeout: timeout setting for this request. If one
463
+ number provided, it will be total request
464
+ timeout. It can also be a pair (tuple) of
465
+ (connection, read) timeouts.
466
+ :type _request_timeout: int, tuple(int, int), optional
467
+ :param _request_auth: set to override the auth_settings for an a single
468
+ request; this effectively ignores the
469
+ authentication in the spec for a single request.
470
+ :type _request_auth: dict, optional
471
+ :param _content_type: force content-type for the request.
472
+ :type _content_type: str, Optional
473
+ :param _headers: set to override the headers for a single
474
+ request; this effectively ignores the headers
475
+ in the spec for a single request.
476
+ :type _headers: dict, optional
477
+ :param _host_index: set to override the host_index for a single
478
+ request; this effectively ignores the host_index
479
+ in the spec for a single request.
480
+ :type _host_index: int, optional
481
+ :return: Returns the result object.
482
+ """ # noqa: E501
483
+
484
+ _param = self._payment_schedules_cancel_specific_serialize(
485
+ id=id,
486
+ schedule_id=schedule_id,
487
+ _request_auth=_request_auth,
488
+ _content_type=_content_type,
489
+ _headers=_headers,
490
+ _host_index=_host_index
491
+ )
492
+
493
+ _response_types_map: Dict[str, Optional[str]] = {
494
+ '204': None,
495
+ }
496
+ response_data = self.api_client.call_api(
497
+ *_param,
498
+ _request_timeout=_request_timeout
499
+ )
500
+ return response_data.response
501
+
502
+
503
+ def _payment_schedules_cancel_specific_serialize(
504
+ self,
505
+ id,
506
+ schedule_id,
507
+ _request_auth,
508
+ _content_type,
509
+ _headers,
510
+ _host_index,
511
+ ) -> RequestSerialized:
512
+
513
+ _host = None
514
+
515
+ _collection_formats: Dict[str, str] = {
516
+ }
517
+
518
+ _path_params: Dict[str, str] = {}
519
+ _query_params: List[Tuple[str, str]] = []
520
+ _header_params: Dict[str, Optional[str]] = _headers or {}
521
+ _form_params: List[Tuple[str, str]] = []
522
+ _files: Dict[str, Union[str, bytes]] = {}
523
+ _body_params: Optional[bytes] = None
524
+
525
+ # process the path parameters
526
+ if id is not None:
527
+ _path_params['id'] = id
528
+ if schedule_id is not None:
529
+ _path_params['scheduleId'] = schedule_id
530
+ # process the query parameters
531
+ # process the header parameters
532
+ # process the form parameters
533
+ # process the body parameter
534
+
535
+
536
+
537
+
538
+ # authentication setting
539
+ _auth_settings: List[str] = [
540
+ 'default'
541
+ ]
542
+
543
+ return self.api_client.param_serialize(
544
+ method='POST',
545
+ resource_path='/payments/requests/{id}/schedules/{scheduleId}/cancel',
546
+ path_params=_path_params,
547
+ query_params=_query_params,
548
+ header_params=_header_params,
549
+ body=_body_params,
550
+ post_params=_form_params,
551
+ files=_files,
552
+ auth_settings=_auth_settings,
553
+ collection_formats=_collection_formats,
554
+ _host=_host,
555
+ _request_auth=_request_auth
556
+ )
557
+
558
+
559
+
560
+
561
+ @validate_call
562
+ def payment_schedules_list(
563
+ self,
564
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
565
+ _request_timeout: Union[
566
+ None,
567
+ Annotated[StrictFloat, Field(gt=0)],
568
+ Tuple[
569
+ Annotated[StrictFloat, Field(gt=0)],
570
+ Annotated[StrictFloat, Field(gt=0)]
571
+ ]
572
+ ] = None,
573
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
574
+ _content_type: Optional[StrictStr] = None,
575
+ _headers: Optional[Dict[StrictStr, Any]] = None,
576
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
577
+ ) -> PaymentSchedulesList200Response:
578
+ """List Schedules
579
+
580
+ Recovers all scheduled payments from a payment request
581
+
582
+ :param id: Payment request primary identifier (required)
583
+ :type id: str
584
+ :param _request_timeout: timeout setting for this request. If one
585
+ number provided, it will be total request
586
+ timeout. It can also be a pair (tuple) of
587
+ (connection, read) timeouts.
588
+ :type _request_timeout: int, tuple(int, int), optional
589
+ :param _request_auth: set to override the auth_settings for an a single
590
+ request; this effectively ignores the
591
+ authentication in the spec for a single request.
592
+ :type _request_auth: dict, optional
593
+ :param _content_type: force content-type for the request.
594
+ :type _content_type: str, Optional
595
+ :param _headers: set to override the headers for a single
596
+ request; this effectively ignores the headers
597
+ in the spec for a single request.
598
+ :type _headers: dict, optional
599
+ :param _host_index: set to override the host_index for a single
600
+ request; this effectively ignores the host_index
601
+ in the spec for a single request.
602
+ :type _host_index: int, optional
603
+ :return: Returns the result object.
604
+ """ # noqa: E501
605
+
606
+ _param = self._payment_schedules_list_serialize(
607
+ id=id,
608
+ _request_auth=_request_auth,
609
+ _content_type=_content_type,
610
+ _headers=_headers,
611
+ _host_index=_host_index
612
+ )
613
+
614
+ _response_types_map: Dict[str, Optional[str]] = {
615
+ '200': "PaymentSchedulesList200Response",
616
+ }
617
+ response_data = self.api_client.call_api(
618
+ *_param,
619
+ _request_timeout=_request_timeout
620
+ )
621
+ response_data.read()
622
+ return self.api_client.response_deserialize(
623
+ response_data=response_data,
624
+ response_types_map=_response_types_map,
625
+ ).data
626
+
627
+
628
+ @validate_call
629
+ def payment_schedules_list_with_http_info(
630
+ self,
631
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
632
+ _request_timeout: Union[
633
+ None,
634
+ Annotated[StrictFloat, Field(gt=0)],
635
+ Tuple[
636
+ Annotated[StrictFloat, Field(gt=0)],
637
+ Annotated[StrictFloat, Field(gt=0)]
638
+ ]
639
+ ] = None,
640
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
641
+ _content_type: Optional[StrictStr] = None,
642
+ _headers: Optional[Dict[StrictStr, Any]] = None,
643
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
644
+ ) -> ApiResponse[PaymentSchedulesList200Response]:
645
+ """List Schedules
646
+
647
+ Recovers all scheduled payments from a payment request
648
+
649
+ :param id: Payment request primary identifier (required)
650
+ :type id: str
651
+ :param _request_timeout: timeout setting for this request. If one
652
+ number provided, it will be total request
653
+ timeout. It can also be a pair (tuple) of
654
+ (connection, read) timeouts.
655
+ :type _request_timeout: int, tuple(int, int), optional
656
+ :param _request_auth: set to override the auth_settings for an a single
657
+ request; this effectively ignores the
658
+ authentication in the spec for a single request.
659
+ :type _request_auth: dict, optional
660
+ :param _content_type: force content-type for the request.
661
+ :type _content_type: str, Optional
662
+ :param _headers: set to override the headers for a single
663
+ request; this effectively ignores the headers
664
+ in the spec for a single request.
665
+ :type _headers: dict, optional
666
+ :param _host_index: set to override the host_index for a single
667
+ request; this effectively ignores the host_index
668
+ in the spec for a single request.
669
+ :type _host_index: int, optional
670
+ :return: Returns the result object.
671
+ """ # noqa: E501
672
+
673
+ _param = self._payment_schedules_list_serialize(
674
+ id=id,
675
+ _request_auth=_request_auth,
676
+ _content_type=_content_type,
677
+ _headers=_headers,
678
+ _host_index=_host_index
679
+ )
680
+
681
+ _response_types_map: Dict[str, Optional[str]] = {
682
+ '200': "PaymentSchedulesList200Response",
683
+ }
684
+ response_data = self.api_client.call_api(
685
+ *_param,
686
+ _request_timeout=_request_timeout
687
+ )
688
+ response_data.read()
689
+ return self.api_client.response_deserialize(
690
+ response_data=response_data,
691
+ response_types_map=_response_types_map,
692
+ )
693
+
694
+
695
+ @validate_call
696
+ def payment_schedules_list_without_preload_content(
697
+ self,
698
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
699
+ _request_timeout: Union[
700
+ None,
701
+ Annotated[StrictFloat, Field(gt=0)],
702
+ Tuple[
703
+ Annotated[StrictFloat, Field(gt=0)],
704
+ Annotated[StrictFloat, Field(gt=0)]
705
+ ]
706
+ ] = None,
707
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
708
+ _content_type: Optional[StrictStr] = None,
709
+ _headers: Optional[Dict[StrictStr, Any]] = None,
710
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
711
+ ) -> RESTResponseType:
712
+ """List Schedules
713
+
714
+ Recovers all scheduled payments from a payment request
715
+
716
+ :param id: Payment request primary identifier (required)
717
+ :type id: str
718
+ :param _request_timeout: timeout setting for this request. If one
719
+ number provided, it will be total request
720
+ timeout. It can also be a pair (tuple) of
721
+ (connection, read) timeouts.
722
+ :type _request_timeout: int, tuple(int, int), optional
723
+ :param _request_auth: set to override the auth_settings for an a single
724
+ request; this effectively ignores the
725
+ authentication in the spec for a single request.
726
+ :type _request_auth: dict, optional
727
+ :param _content_type: force content-type for the request.
728
+ :type _content_type: str, Optional
729
+ :param _headers: set to override the headers for a single
730
+ request; this effectively ignores the headers
731
+ in the spec for a single request.
732
+ :type _headers: dict, optional
733
+ :param _host_index: set to override the host_index for a single
734
+ request; this effectively ignores the host_index
735
+ in the spec for a single request.
736
+ :type _host_index: int, optional
737
+ :return: Returns the result object.
738
+ """ # noqa: E501
739
+
740
+ _param = self._payment_schedules_list_serialize(
741
+ id=id,
742
+ _request_auth=_request_auth,
743
+ _content_type=_content_type,
744
+ _headers=_headers,
745
+ _host_index=_host_index
746
+ )
747
+
748
+ _response_types_map: Dict[str, Optional[str]] = {
749
+ '200': "PaymentSchedulesList200Response",
750
+ }
751
+ response_data = self.api_client.call_api(
752
+ *_param,
753
+ _request_timeout=_request_timeout
754
+ )
755
+ return response_data.response
756
+
757
+
758
+ def _payment_schedules_list_serialize(
759
+ self,
760
+ id,
761
+ _request_auth,
762
+ _content_type,
763
+ _headers,
764
+ _host_index,
765
+ ) -> RequestSerialized:
766
+
767
+ _host = None
768
+
769
+ _collection_formats: Dict[str, str] = {
770
+ }
771
+
772
+ _path_params: Dict[str, str] = {}
773
+ _query_params: List[Tuple[str, str]] = []
774
+ _header_params: Dict[str, Optional[str]] = _headers or {}
775
+ _form_params: List[Tuple[str, str]] = []
776
+ _files: Dict[str, Union[str, bytes]] = {}
777
+ _body_params: Optional[bytes] = None
778
+
779
+ # process the path parameters
780
+ if id is not None:
781
+ _path_params['id'] = id
782
+ # process the query parameters
783
+ # process the header parameters
784
+ # process the form parameters
785
+ # process the body parameter
786
+
787
+
788
+ # set the HTTP header `Accept`
789
+ if 'Accept' not in _header_params:
790
+ _header_params['Accept'] = self.api_client.select_header_accept(
791
+ [
792
+ 'application/json'
793
+ ]
794
+ )
795
+
796
+
797
+ # authentication setting
798
+ _auth_settings: List[str] = [
799
+ 'default'
800
+ ]
801
+
802
+ return self.api_client.param_serialize(
803
+ method='GET',
804
+ resource_path='/payments/requests/{id}/schedules',
805
+ path_params=_path_params,
806
+ query_params=_query_params,
807
+ header_params=_header_params,
808
+ body=_body_params,
809
+ post_params=_form_params,
810
+ files=_files,
811
+ auth_settings=_auth_settings,
812
+ collection_formats=_collection_formats,
813
+ _host=_host,
814
+ _request_auth=_request_auth
815
+ )
816
+
817
+