Skip to content

Commit b55ca69

Browse files
[payment] Automated update from Adyen/adyen-openapi@6f2bb26
1 parent ff7647e commit b55ca69

2 files changed

Lines changed: 29 additions & 53 deletions

File tree

Adyen/services/payments/modifications_api.py

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,80 +17,65 @@ def adjust_authorisation(self, request, idempotency_key=None, **kwargs):
1717
"""
1818
Change the authorised amount
1919
"""
20-
endpoint = self.baseUrl + "/adjustAuthorisation"
20+
endpoint = self.baseUrl + f"/adjustAuthorisation"
2121
method = "POST"
22-
return self.client.call_adyen_api(
23-
request, self.service, method, endpoint, idempotency_key, **kwargs
24-
)
22+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
2523

2624
def cancel(self, request, idempotency_key=None, **kwargs):
2725
"""
2826
Cancel an authorisation
2927
"""
30-
endpoint = self.baseUrl + "/cancel"
28+
endpoint = self.baseUrl + f"/cancel"
3129
method = "POST"
32-
return self.client.call_adyen_api(
33-
request, self.service, method, endpoint, idempotency_key, **kwargs
34-
)
30+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
3531

3632
def cancel_or_refund(self, request, idempotency_key=None, **kwargs):
3733
"""
3834
Cancel or refund a payment
3935
"""
40-
endpoint = self.baseUrl + "/cancelOrRefund"
36+
endpoint = self.baseUrl + f"/cancelOrRefund"
4137
method = "POST"
42-
return self.client.call_adyen_api(
43-
request, self.service, method, endpoint, idempotency_key, **kwargs
44-
)
38+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
4539

4640
def capture(self, request, idempotency_key=None, **kwargs):
4741
"""
4842
Capture an authorisation
4943
"""
50-
endpoint = self.baseUrl + "/capture"
44+
endpoint = self.baseUrl + f"/capture"
5145
method = "POST"
52-
return self.client.call_adyen_api(
53-
request, self.service, method, endpoint, idempotency_key, **kwargs
54-
)
46+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
5547

5648
def donate(self, request, idempotency_key=None, **kwargs):
5749
"""
5850
Create a donation
5951
60-
Deprecated
52+
Deprecated
6153
"""
62-
endpoint = self.baseUrl + "/donate"
54+
endpoint = self.baseUrl + f"/donate"
6355
method = "POST"
64-
return self.client.call_adyen_api(
65-
request, self.service, method, endpoint, idempotency_key, **kwargs
66-
)
56+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
6757

6858
def refund(self, request, idempotency_key=None, **kwargs):
6959
"""
7060
Refund a captured payment
7161
"""
72-
endpoint = self.baseUrl + "/refund"
62+
endpoint = self.baseUrl + f"/refund"
7363
method = "POST"
74-
return self.client.call_adyen_api(
75-
request, self.service, method, endpoint, idempotency_key, **kwargs
76-
)
64+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
7765

7866
def technical_cancel(self, request, idempotency_key=None, **kwargs):
7967
"""
8068
Cancel an authorisation using your reference
8169
"""
82-
endpoint = self.baseUrl + "/technicalCancel"
70+
endpoint = self.baseUrl + f"/technicalCancel"
8371
method = "POST"
84-
return self.client.call_adyen_api(
85-
request, self.service, method, endpoint, idempotency_key, **kwargs
86-
)
72+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
8773

8874
def void_pending_refund(self, request, idempotency_key=None, **kwargs):
8975
"""
9076
Cancel an in-person refund
9177
"""
92-
endpoint = self.baseUrl + "/voidPendingRefund"
78+
endpoint = self.baseUrl + f"/voidPendingRefund"
9379
method = "POST"
94-
return self.client.call_adyen_api(
95-
request, self.service, method, endpoint, idempotency_key, **kwargs
96-
)
80+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
81+

Adyen/services/payments/payments_api.py

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,48 +17,39 @@ def authorise(self, request, idempotency_key=None, **kwargs):
1717
"""
1818
Create an authorisation
1919
"""
20-
endpoint = self.baseUrl + "/authorise"
20+
endpoint = self.baseUrl + f"/authorise"
2121
method = "POST"
22-
return self.client.call_adyen_api(
23-
request, self.service, method, endpoint, idempotency_key, **kwargs
24-
)
22+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
2523

2624
def authorise3d(self, request, idempotency_key=None, **kwargs):
2725
"""
2826
Complete a 3DS authorisation
2927
"""
30-
endpoint = self.baseUrl + "/authorise3d"
28+
endpoint = self.baseUrl + f"/authorise3d"
3129
method = "POST"
32-
return self.client.call_adyen_api(
33-
request, self.service, method, endpoint, idempotency_key, **kwargs
34-
)
30+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
3531

3632
def authorise3ds2(self, request, idempotency_key=None, **kwargs):
3733
"""
3834
Complete a 3DS2 authorisation
3935
"""
40-
endpoint = self.baseUrl + "/authorise3ds2"
36+
endpoint = self.baseUrl + f"/authorise3ds2"
4137
method = "POST"
42-
return self.client.call_adyen_api(
43-
request, self.service, method, endpoint, idempotency_key, **kwargs
44-
)
38+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
4539

4640
def get_authentication_result(self, request, idempotency_key=None, **kwargs):
4741
"""
4842
Get the 3DS authentication result
4943
"""
50-
endpoint = self.baseUrl + "/getAuthenticationResult"
44+
endpoint = self.baseUrl + f"/getAuthenticationResult"
5145
method = "POST"
52-
return self.client.call_adyen_api(
53-
request, self.service, method, endpoint, idempotency_key, **kwargs
54-
)
46+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
5547

5648
def retrieve3ds2_result(self, request, idempotency_key=None, **kwargs):
5749
"""
5850
Get the 3DS2 authentication result
5951
"""
60-
endpoint = self.baseUrl + "/retrieve3ds2Result"
52+
endpoint = self.baseUrl + f"/retrieve3ds2Result"
6153
method = "POST"
62-
return self.client.call_adyen_api(
63-
request, self.service, method, endpoint, idempotency_key, **kwargs
64-
)
54+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
55+

0 commit comments

Comments
 (0)