pluggy-sdk 1.0.0.post4__py3-none-any.whl → 1.0.0.post6__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.
@@ -21,7 +21,9 @@ from pydantic import Field, StrictStr
21
21
  from typing_extensions import Annotated
22
22
  from pluggy_sdk.models.create_payment_request import CreatePaymentRequest
23
23
  from pluggy_sdk.models.create_pix_qr_payment_request import CreatePixQrPaymentRequest
24
+ from pluggy_sdk.models.payment_receipt import PaymentReceipt
24
25
  from pluggy_sdk.models.payment_request import PaymentRequest
26
+ from pluggy_sdk.models.payment_request_receipt_list200_response import PaymentRequestReceiptList200Response
25
27
  from pluggy_sdk.models.payment_requests_list200_response import PaymentRequestsList200Response
26
28
  from pluggy_sdk.models.update_payment_request import UpdatePaymentRequest
27
29
 
@@ -846,6 +848,805 @@ class PaymentRequestApi:
846
848
 
847
849
 
848
850
 
851
+ @validate_call
852
+ def payment_request_receipt_create(
853
+ self,
854
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
855
+ _request_timeout: Union[
856
+ None,
857
+ Annotated[StrictFloat, Field(gt=0)],
858
+ Tuple[
859
+ Annotated[StrictFloat, Field(gt=0)],
860
+ Annotated[StrictFloat, Field(gt=0)]
861
+ ]
862
+ ] = None,
863
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
864
+ _content_type: Optional[StrictStr] = None,
865
+ _headers: Optional[Dict[StrictStr, Any]] = None,
866
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
867
+ ) -> PaymentReceipt:
868
+ """Create
869
+
870
+ Creates the payment receipt resource
871
+
872
+ :param id: Payment request primary identifier (required)
873
+ :type id: str
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_request_receipt_create_serialize(
897
+ id=id,
898
+ _request_auth=_request_auth,
899
+ _content_type=_content_type,
900
+ _headers=_headers,
901
+ _host_index=_host_index
902
+ )
903
+
904
+ _response_types_map: Dict[str, Optional[str]] = {
905
+ '200': "PaymentReceipt",
906
+ }
907
+ response_data = self.api_client.call_api(
908
+ *_param,
909
+ _request_timeout=_request_timeout
910
+ )
911
+ response_data.read()
912
+ return self.api_client.response_deserialize(
913
+ response_data=response_data,
914
+ response_types_map=_response_types_map,
915
+ ).data
916
+
917
+
918
+ @validate_call
919
+ def payment_request_receipt_create_with_http_info(
920
+ self,
921
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
922
+ _request_timeout: Union[
923
+ None,
924
+ Annotated[StrictFloat, Field(gt=0)],
925
+ Tuple[
926
+ Annotated[StrictFloat, Field(gt=0)],
927
+ Annotated[StrictFloat, Field(gt=0)]
928
+ ]
929
+ ] = None,
930
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
931
+ _content_type: Optional[StrictStr] = None,
932
+ _headers: Optional[Dict[StrictStr, Any]] = None,
933
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
934
+ ) -> ApiResponse[PaymentReceipt]:
935
+ """Create
936
+
937
+ Creates the payment receipt resource
938
+
939
+ :param id: Payment request primary identifier (required)
940
+ :type id: str
941
+ :param _request_timeout: timeout setting for this request. If one
942
+ number provided, it will be total request
943
+ timeout. It can also be a pair (tuple) of
944
+ (connection, read) timeouts.
945
+ :type _request_timeout: int, tuple(int, int), optional
946
+ :param _request_auth: set to override the auth_settings for an a single
947
+ request; this effectively ignores the
948
+ authentication in the spec for a single request.
949
+ :type _request_auth: dict, optional
950
+ :param _content_type: force content-type for the request.
951
+ :type _content_type: str, Optional
952
+ :param _headers: set to override the headers for a single
953
+ request; this effectively ignores the headers
954
+ in the spec for a single request.
955
+ :type _headers: dict, optional
956
+ :param _host_index: set to override the host_index for a single
957
+ request; this effectively ignores the host_index
958
+ in the spec for a single request.
959
+ :type _host_index: int, optional
960
+ :return: Returns the result object.
961
+ """ # noqa: E501
962
+
963
+ _param = self._payment_request_receipt_create_serialize(
964
+ id=id,
965
+ _request_auth=_request_auth,
966
+ _content_type=_content_type,
967
+ _headers=_headers,
968
+ _host_index=_host_index
969
+ )
970
+
971
+ _response_types_map: Dict[str, Optional[str]] = {
972
+ '200': "PaymentReceipt",
973
+ }
974
+ response_data = self.api_client.call_api(
975
+ *_param,
976
+ _request_timeout=_request_timeout
977
+ )
978
+ response_data.read()
979
+ return self.api_client.response_deserialize(
980
+ response_data=response_data,
981
+ response_types_map=_response_types_map,
982
+ )
983
+
984
+
985
+ @validate_call
986
+ def payment_request_receipt_create_without_preload_content(
987
+ self,
988
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
989
+ _request_timeout: Union[
990
+ None,
991
+ Annotated[StrictFloat, Field(gt=0)],
992
+ Tuple[
993
+ Annotated[StrictFloat, Field(gt=0)],
994
+ Annotated[StrictFloat, Field(gt=0)]
995
+ ]
996
+ ] = None,
997
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
998
+ _content_type: Optional[StrictStr] = None,
999
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1000
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1001
+ ) -> RESTResponseType:
1002
+ """Create
1003
+
1004
+ Creates the payment receipt resource
1005
+
1006
+ :param id: Payment request primary identifier (required)
1007
+ :type id: str
1008
+ :param _request_timeout: timeout setting for this request. If one
1009
+ number provided, it will be total request
1010
+ timeout. It can also be a pair (tuple) of
1011
+ (connection, read) timeouts.
1012
+ :type _request_timeout: int, tuple(int, int), optional
1013
+ :param _request_auth: set to override the auth_settings for an a single
1014
+ request; this effectively ignores the
1015
+ authentication in the spec for a single request.
1016
+ :type _request_auth: dict, optional
1017
+ :param _content_type: force content-type for the request.
1018
+ :type _content_type: str, Optional
1019
+ :param _headers: set to override the headers for a single
1020
+ request; this effectively ignores the headers
1021
+ in the spec for a single request.
1022
+ :type _headers: dict, optional
1023
+ :param _host_index: set to override the host_index for a single
1024
+ request; this effectively ignores the host_index
1025
+ in the spec for a single request.
1026
+ :type _host_index: int, optional
1027
+ :return: Returns the result object.
1028
+ """ # noqa: E501
1029
+
1030
+ _param = self._payment_request_receipt_create_serialize(
1031
+ id=id,
1032
+ _request_auth=_request_auth,
1033
+ _content_type=_content_type,
1034
+ _headers=_headers,
1035
+ _host_index=_host_index
1036
+ )
1037
+
1038
+ _response_types_map: Dict[str, Optional[str]] = {
1039
+ '200': "PaymentReceipt",
1040
+ }
1041
+ response_data = self.api_client.call_api(
1042
+ *_param,
1043
+ _request_timeout=_request_timeout
1044
+ )
1045
+ return response_data.response
1046
+
1047
+
1048
+ def _payment_request_receipt_create_serialize(
1049
+ self,
1050
+ id,
1051
+ _request_auth,
1052
+ _content_type,
1053
+ _headers,
1054
+ _host_index,
1055
+ ) -> RequestSerialized:
1056
+
1057
+ _host = None
1058
+
1059
+ _collection_formats: Dict[str, str] = {
1060
+ }
1061
+
1062
+ _path_params: Dict[str, str] = {}
1063
+ _query_params: List[Tuple[str, str]] = []
1064
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1065
+ _form_params: List[Tuple[str, str]] = []
1066
+ _files: Dict[str, Union[str, bytes]] = {}
1067
+ _body_params: Optional[bytes] = None
1068
+
1069
+ # process the path parameters
1070
+ if id is not None:
1071
+ _path_params['id'] = id
1072
+ # process the query parameters
1073
+ # process the header parameters
1074
+ # process the form parameters
1075
+ # process the body parameter
1076
+
1077
+
1078
+ # set the HTTP header `Accept`
1079
+ _header_params['Accept'] = self.api_client.select_header_accept(
1080
+ [
1081
+ 'application/json'
1082
+ ]
1083
+ )
1084
+
1085
+ # set the HTTP header `Content-Type`
1086
+ if _content_type:
1087
+ _header_params['Content-Type'] = _content_type
1088
+ else:
1089
+ _default_content_type = (
1090
+ self.api_client.select_header_content_type(
1091
+ [
1092
+ 'application/json'
1093
+ ]
1094
+ )
1095
+ )
1096
+ if _default_content_type is not None:
1097
+ _header_params['Content-Type'] = _default_content_type
1098
+
1099
+ # authentication setting
1100
+ _auth_settings: List[str] = [
1101
+ ]
1102
+
1103
+ return self.api_client.param_serialize(
1104
+ method='POST',
1105
+ resource_path='/payments/requests/{id}/receipts',
1106
+ path_params=_path_params,
1107
+ query_params=_query_params,
1108
+ header_params=_header_params,
1109
+ body=_body_params,
1110
+ post_params=_form_params,
1111
+ files=_files,
1112
+ auth_settings=_auth_settings,
1113
+ collection_formats=_collection_formats,
1114
+ _host=_host,
1115
+ _request_auth=_request_auth
1116
+ )
1117
+
1118
+
1119
+
1120
+
1121
+ @validate_call
1122
+ def payment_request_receipt_list(
1123
+ self,
1124
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
1125
+ _request_timeout: Union[
1126
+ None,
1127
+ Annotated[StrictFloat, Field(gt=0)],
1128
+ Tuple[
1129
+ Annotated[StrictFloat, Field(gt=0)],
1130
+ Annotated[StrictFloat, Field(gt=0)]
1131
+ ]
1132
+ ] = None,
1133
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1134
+ _content_type: Optional[StrictStr] = None,
1135
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1136
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1137
+ ) -> PaymentRequestReceiptList200Response:
1138
+ """List
1139
+
1140
+ Recovers all created payment receipts for the payment request provided
1141
+
1142
+ :param id: Payment request primary identifier (required)
1143
+ :type id: str
1144
+ :param _request_timeout: timeout setting for this request. If one
1145
+ number provided, it will be total request
1146
+ timeout. It can also be a pair (tuple) of
1147
+ (connection, read) timeouts.
1148
+ :type _request_timeout: int, tuple(int, int), optional
1149
+ :param _request_auth: set to override the auth_settings for an a single
1150
+ request; this effectively ignores the
1151
+ authentication in the spec for a single request.
1152
+ :type _request_auth: dict, optional
1153
+ :param _content_type: force content-type for the request.
1154
+ :type _content_type: str, Optional
1155
+ :param _headers: set to override the headers for a single
1156
+ request; this effectively ignores the headers
1157
+ in the spec for a single request.
1158
+ :type _headers: dict, optional
1159
+ :param _host_index: set to override the host_index for a single
1160
+ request; this effectively ignores the host_index
1161
+ in the spec for a single request.
1162
+ :type _host_index: int, optional
1163
+ :return: Returns the result object.
1164
+ """ # noqa: E501
1165
+
1166
+ _param = self._payment_request_receipt_list_serialize(
1167
+ id=id,
1168
+ _request_auth=_request_auth,
1169
+ _content_type=_content_type,
1170
+ _headers=_headers,
1171
+ _host_index=_host_index
1172
+ )
1173
+
1174
+ _response_types_map: Dict[str, Optional[str]] = {
1175
+ '200': "PaymentRequestReceiptList200Response",
1176
+ }
1177
+ response_data = self.api_client.call_api(
1178
+ *_param,
1179
+ _request_timeout=_request_timeout
1180
+ )
1181
+ response_data.read()
1182
+ return self.api_client.response_deserialize(
1183
+ response_data=response_data,
1184
+ response_types_map=_response_types_map,
1185
+ ).data
1186
+
1187
+
1188
+ @validate_call
1189
+ def payment_request_receipt_list_with_http_info(
1190
+ self,
1191
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
1192
+ _request_timeout: Union[
1193
+ None,
1194
+ Annotated[StrictFloat, Field(gt=0)],
1195
+ Tuple[
1196
+ Annotated[StrictFloat, Field(gt=0)],
1197
+ Annotated[StrictFloat, Field(gt=0)]
1198
+ ]
1199
+ ] = None,
1200
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1201
+ _content_type: Optional[StrictStr] = None,
1202
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1203
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1204
+ ) -> ApiResponse[PaymentRequestReceiptList200Response]:
1205
+ """List
1206
+
1207
+ Recovers all created payment receipts for the payment request provided
1208
+
1209
+ :param id: Payment request primary identifier (required)
1210
+ :type id: str
1211
+ :param _request_timeout: timeout setting for this request. If one
1212
+ number provided, it will be total request
1213
+ timeout. It can also be a pair (tuple) of
1214
+ (connection, read) timeouts.
1215
+ :type _request_timeout: int, tuple(int, int), optional
1216
+ :param _request_auth: set to override the auth_settings for an a single
1217
+ request; this effectively ignores the
1218
+ authentication in the spec for a single request.
1219
+ :type _request_auth: dict, optional
1220
+ :param _content_type: force content-type for the request.
1221
+ :type _content_type: str, Optional
1222
+ :param _headers: set to override the headers for a single
1223
+ request; this effectively ignores the headers
1224
+ in the spec for a single request.
1225
+ :type _headers: dict, optional
1226
+ :param _host_index: set to override the host_index for a single
1227
+ request; this effectively ignores the host_index
1228
+ in the spec for a single request.
1229
+ :type _host_index: int, optional
1230
+ :return: Returns the result object.
1231
+ """ # noqa: E501
1232
+
1233
+ _param = self._payment_request_receipt_list_serialize(
1234
+ id=id,
1235
+ _request_auth=_request_auth,
1236
+ _content_type=_content_type,
1237
+ _headers=_headers,
1238
+ _host_index=_host_index
1239
+ )
1240
+
1241
+ _response_types_map: Dict[str, Optional[str]] = {
1242
+ '200': "PaymentRequestReceiptList200Response",
1243
+ }
1244
+ response_data = self.api_client.call_api(
1245
+ *_param,
1246
+ _request_timeout=_request_timeout
1247
+ )
1248
+ response_data.read()
1249
+ return self.api_client.response_deserialize(
1250
+ response_data=response_data,
1251
+ response_types_map=_response_types_map,
1252
+ )
1253
+
1254
+
1255
+ @validate_call
1256
+ def payment_request_receipt_list_without_preload_content(
1257
+ self,
1258
+ id: Annotated[StrictStr, Field(description="Payment request primary identifier")],
1259
+ _request_timeout: Union[
1260
+ None,
1261
+ Annotated[StrictFloat, Field(gt=0)],
1262
+ Tuple[
1263
+ Annotated[StrictFloat, Field(gt=0)],
1264
+ Annotated[StrictFloat, Field(gt=0)]
1265
+ ]
1266
+ ] = None,
1267
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1268
+ _content_type: Optional[StrictStr] = None,
1269
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1270
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1271
+ ) -> RESTResponseType:
1272
+ """List
1273
+
1274
+ Recovers all created payment receipts for the payment request provided
1275
+
1276
+ :param id: Payment request primary identifier (required)
1277
+ :type id: str
1278
+ :param _request_timeout: timeout setting for this request. If one
1279
+ number provided, it will be total request
1280
+ timeout. It can also be a pair (tuple) of
1281
+ (connection, read) timeouts.
1282
+ :type _request_timeout: int, tuple(int, int), optional
1283
+ :param _request_auth: set to override the auth_settings for an a single
1284
+ request; this effectively ignores the
1285
+ authentication in the spec for a single request.
1286
+ :type _request_auth: dict, optional
1287
+ :param _content_type: force content-type for the request.
1288
+ :type _content_type: str, Optional
1289
+ :param _headers: set to override the headers for a single
1290
+ request; this effectively ignores the headers
1291
+ in the spec for a single request.
1292
+ :type _headers: dict, optional
1293
+ :param _host_index: set to override the host_index for a single
1294
+ request; this effectively ignores the host_index
1295
+ in the spec for a single request.
1296
+ :type _host_index: int, optional
1297
+ :return: Returns the result object.
1298
+ """ # noqa: E501
1299
+
1300
+ _param = self._payment_request_receipt_list_serialize(
1301
+ id=id,
1302
+ _request_auth=_request_auth,
1303
+ _content_type=_content_type,
1304
+ _headers=_headers,
1305
+ _host_index=_host_index
1306
+ )
1307
+
1308
+ _response_types_map: Dict[str, Optional[str]] = {
1309
+ '200': "PaymentRequestReceiptList200Response",
1310
+ }
1311
+ response_data = self.api_client.call_api(
1312
+ *_param,
1313
+ _request_timeout=_request_timeout
1314
+ )
1315
+ return response_data.response
1316
+
1317
+
1318
+ def _payment_request_receipt_list_serialize(
1319
+ self,
1320
+ id,
1321
+ _request_auth,
1322
+ _content_type,
1323
+ _headers,
1324
+ _host_index,
1325
+ ) -> RequestSerialized:
1326
+
1327
+ _host = None
1328
+
1329
+ _collection_formats: Dict[str, str] = {
1330
+ }
1331
+
1332
+ _path_params: Dict[str, str] = {}
1333
+ _query_params: List[Tuple[str, str]] = []
1334
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1335
+ _form_params: List[Tuple[str, str]] = []
1336
+ _files: Dict[str, Union[str, bytes]] = {}
1337
+ _body_params: Optional[bytes] = None
1338
+
1339
+ # process the path parameters
1340
+ if id is not None:
1341
+ _path_params['id'] = id
1342
+ # process the query parameters
1343
+ # process the header parameters
1344
+ # process the form parameters
1345
+ # process the body parameter
1346
+
1347
+
1348
+ # set the HTTP header `Accept`
1349
+ _header_params['Accept'] = self.api_client.select_header_accept(
1350
+ [
1351
+ 'application/json'
1352
+ ]
1353
+ )
1354
+
1355
+
1356
+ # authentication setting
1357
+ _auth_settings: List[str] = [
1358
+ ]
1359
+
1360
+ return self.api_client.param_serialize(
1361
+ method='GET',
1362
+ resource_path='/payments/requests/{id}/receipts',
1363
+ path_params=_path_params,
1364
+ query_params=_query_params,
1365
+ header_params=_header_params,
1366
+ body=_body_params,
1367
+ post_params=_form_params,
1368
+ files=_files,
1369
+ auth_settings=_auth_settings,
1370
+ collection_formats=_collection_formats,
1371
+ _host=_host,
1372
+ _request_auth=_request_auth
1373
+ )
1374
+
1375
+
1376
+
1377
+
1378
+ @validate_call
1379
+ def payment_request_receipt_retrieve(
1380
+ self,
1381
+ payment_request_id: StrictStr,
1382
+ payment_receipt_id: StrictStr,
1383
+ _request_timeout: Union[
1384
+ None,
1385
+ Annotated[StrictFloat, Field(gt=0)],
1386
+ Tuple[
1387
+ Annotated[StrictFloat, Field(gt=0)],
1388
+ Annotated[StrictFloat, Field(gt=0)]
1389
+ ]
1390
+ ] = None,
1391
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1392
+ _content_type: Optional[StrictStr] = None,
1393
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1394
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1395
+ ) -> PaymentReceipt:
1396
+ """Retrieve
1397
+
1398
+ Recovers the payment receipt resource by its id
1399
+
1400
+ :param payment_request_id: (required)
1401
+ :type payment_request_id: str
1402
+ :param payment_receipt_id: (required)
1403
+ :type payment_receipt_id: str
1404
+ :param _request_timeout: timeout setting for this request. If one
1405
+ number provided, it will be total request
1406
+ timeout. It can also be a pair (tuple) of
1407
+ (connection, read) timeouts.
1408
+ :type _request_timeout: int, tuple(int, int), optional
1409
+ :param _request_auth: set to override the auth_settings for an a single
1410
+ request; this effectively ignores the
1411
+ authentication in the spec for a single request.
1412
+ :type _request_auth: dict, optional
1413
+ :param _content_type: force content-type for the request.
1414
+ :type _content_type: str, Optional
1415
+ :param _headers: set to override the headers for a single
1416
+ request; this effectively ignores the headers
1417
+ in the spec for a single request.
1418
+ :type _headers: dict, optional
1419
+ :param _host_index: set to override the host_index for a single
1420
+ request; this effectively ignores the host_index
1421
+ in the spec for a single request.
1422
+ :type _host_index: int, optional
1423
+ :return: Returns the result object.
1424
+ """ # noqa: E501
1425
+
1426
+ _param = self._payment_request_receipt_retrieve_serialize(
1427
+ payment_request_id=payment_request_id,
1428
+ payment_receipt_id=payment_receipt_id,
1429
+ _request_auth=_request_auth,
1430
+ _content_type=_content_type,
1431
+ _headers=_headers,
1432
+ _host_index=_host_index
1433
+ )
1434
+
1435
+ _response_types_map: Dict[str, Optional[str]] = {
1436
+ '200': "PaymentReceipt",
1437
+ }
1438
+ response_data = self.api_client.call_api(
1439
+ *_param,
1440
+ _request_timeout=_request_timeout
1441
+ )
1442
+ response_data.read()
1443
+ return self.api_client.response_deserialize(
1444
+ response_data=response_data,
1445
+ response_types_map=_response_types_map,
1446
+ ).data
1447
+
1448
+
1449
+ @validate_call
1450
+ def payment_request_receipt_retrieve_with_http_info(
1451
+ self,
1452
+ payment_request_id: StrictStr,
1453
+ payment_receipt_id: StrictStr,
1454
+ _request_timeout: Union[
1455
+ None,
1456
+ Annotated[StrictFloat, Field(gt=0)],
1457
+ Tuple[
1458
+ Annotated[StrictFloat, Field(gt=0)],
1459
+ Annotated[StrictFloat, Field(gt=0)]
1460
+ ]
1461
+ ] = None,
1462
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1463
+ _content_type: Optional[StrictStr] = None,
1464
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1465
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1466
+ ) -> ApiResponse[PaymentReceipt]:
1467
+ """Retrieve
1468
+
1469
+ Recovers the payment receipt resource by its id
1470
+
1471
+ :param payment_request_id: (required)
1472
+ :type payment_request_id: str
1473
+ :param payment_receipt_id: (required)
1474
+ :type payment_receipt_id: str
1475
+ :param _request_timeout: timeout setting for this request. If one
1476
+ number provided, it will be total request
1477
+ timeout. It can also be a pair (tuple) of
1478
+ (connection, read) timeouts.
1479
+ :type _request_timeout: int, tuple(int, int), optional
1480
+ :param _request_auth: set to override the auth_settings for an a single
1481
+ request; this effectively ignores the
1482
+ authentication in the spec for a single request.
1483
+ :type _request_auth: dict, optional
1484
+ :param _content_type: force content-type for the request.
1485
+ :type _content_type: str, Optional
1486
+ :param _headers: set to override the headers for a single
1487
+ request; this effectively ignores the headers
1488
+ in the spec for a single request.
1489
+ :type _headers: dict, optional
1490
+ :param _host_index: set to override the host_index for a single
1491
+ request; this effectively ignores the host_index
1492
+ in the spec for a single request.
1493
+ :type _host_index: int, optional
1494
+ :return: Returns the result object.
1495
+ """ # noqa: E501
1496
+
1497
+ _param = self._payment_request_receipt_retrieve_serialize(
1498
+ payment_request_id=payment_request_id,
1499
+ payment_receipt_id=payment_receipt_id,
1500
+ _request_auth=_request_auth,
1501
+ _content_type=_content_type,
1502
+ _headers=_headers,
1503
+ _host_index=_host_index
1504
+ )
1505
+
1506
+ _response_types_map: Dict[str, Optional[str]] = {
1507
+ '200': "PaymentReceipt",
1508
+ }
1509
+ response_data = self.api_client.call_api(
1510
+ *_param,
1511
+ _request_timeout=_request_timeout
1512
+ )
1513
+ response_data.read()
1514
+ return self.api_client.response_deserialize(
1515
+ response_data=response_data,
1516
+ response_types_map=_response_types_map,
1517
+ )
1518
+
1519
+
1520
+ @validate_call
1521
+ def payment_request_receipt_retrieve_without_preload_content(
1522
+ self,
1523
+ payment_request_id: StrictStr,
1524
+ payment_receipt_id: StrictStr,
1525
+ _request_timeout: Union[
1526
+ None,
1527
+ Annotated[StrictFloat, Field(gt=0)],
1528
+ Tuple[
1529
+ Annotated[StrictFloat, Field(gt=0)],
1530
+ Annotated[StrictFloat, Field(gt=0)]
1531
+ ]
1532
+ ] = None,
1533
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1534
+ _content_type: Optional[StrictStr] = None,
1535
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1536
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1537
+ ) -> RESTResponseType:
1538
+ """Retrieve
1539
+
1540
+ Recovers the payment receipt resource by its id
1541
+
1542
+ :param payment_request_id: (required)
1543
+ :type payment_request_id: str
1544
+ :param payment_receipt_id: (required)
1545
+ :type payment_receipt_id: str
1546
+ :param _request_timeout: timeout setting for this request. If one
1547
+ number provided, it will be total request
1548
+ timeout. It can also be a pair (tuple) of
1549
+ (connection, read) timeouts.
1550
+ :type _request_timeout: int, tuple(int, int), optional
1551
+ :param _request_auth: set to override the auth_settings for an a single
1552
+ request; this effectively ignores the
1553
+ authentication in the spec for a single request.
1554
+ :type _request_auth: dict, optional
1555
+ :param _content_type: force content-type for the request.
1556
+ :type _content_type: str, Optional
1557
+ :param _headers: set to override the headers for a single
1558
+ request; this effectively ignores the headers
1559
+ in the spec for a single request.
1560
+ :type _headers: dict, optional
1561
+ :param _host_index: set to override the host_index for a single
1562
+ request; this effectively ignores the host_index
1563
+ in the spec for a single request.
1564
+ :type _host_index: int, optional
1565
+ :return: Returns the result object.
1566
+ """ # noqa: E501
1567
+
1568
+ _param = self._payment_request_receipt_retrieve_serialize(
1569
+ payment_request_id=payment_request_id,
1570
+ payment_receipt_id=payment_receipt_id,
1571
+ _request_auth=_request_auth,
1572
+ _content_type=_content_type,
1573
+ _headers=_headers,
1574
+ _host_index=_host_index
1575
+ )
1576
+
1577
+ _response_types_map: Dict[str, Optional[str]] = {
1578
+ '200': "PaymentReceipt",
1579
+ }
1580
+ response_data = self.api_client.call_api(
1581
+ *_param,
1582
+ _request_timeout=_request_timeout
1583
+ )
1584
+ return response_data.response
1585
+
1586
+
1587
+ def _payment_request_receipt_retrieve_serialize(
1588
+ self,
1589
+ payment_request_id,
1590
+ payment_receipt_id,
1591
+ _request_auth,
1592
+ _content_type,
1593
+ _headers,
1594
+ _host_index,
1595
+ ) -> RequestSerialized:
1596
+
1597
+ _host = None
1598
+
1599
+ _collection_formats: Dict[str, str] = {
1600
+ }
1601
+
1602
+ _path_params: Dict[str, str] = {}
1603
+ _query_params: List[Tuple[str, str]] = []
1604
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1605
+ _form_params: List[Tuple[str, str]] = []
1606
+ _files: Dict[str, Union[str, bytes]] = {}
1607
+ _body_params: Optional[bytes] = None
1608
+
1609
+ # process the path parameters
1610
+ if payment_request_id is not None:
1611
+ _path_params['payment-request-id'] = payment_request_id
1612
+ if payment_receipt_id is not None:
1613
+ _path_params['payment-receipt-id'] = payment_receipt_id
1614
+ # process the query parameters
1615
+ # process the header parameters
1616
+ # process the form parameters
1617
+ # process the body parameter
1618
+
1619
+
1620
+ # set the HTTP header `Accept`
1621
+ _header_params['Accept'] = self.api_client.select_header_accept(
1622
+ [
1623
+ 'application/json'
1624
+ ]
1625
+ )
1626
+
1627
+
1628
+ # authentication setting
1629
+ _auth_settings: List[str] = [
1630
+ ]
1631
+
1632
+ return self.api_client.param_serialize(
1633
+ method='GET',
1634
+ resource_path='/payments/requests/{payment-request-id}/receipts/{payment-receipt-id}',
1635
+ path_params=_path_params,
1636
+ query_params=_query_params,
1637
+ header_params=_header_params,
1638
+ body=_body_params,
1639
+ post_params=_form_params,
1640
+ files=_files,
1641
+ auth_settings=_auth_settings,
1642
+ collection_formats=_collection_formats,
1643
+ _host=_host,
1644
+ _request_auth=_request_auth
1645
+ )
1646
+
1647
+
1648
+
1649
+
849
1650
  @validate_call
850
1651
  def payment_request_retrieve(
851
1652
  self,