-
Notifications
You must be signed in to change notification settings - Fork 47
[payment] Code generation: update services and models #453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -17,80 +17,65 @@ | |||||
| """ | ||||||
| Change the authorised amount | ||||||
| """ | ||||||
| endpoint = self.baseUrl + "/adjustAuthorisation" | ||||||
| endpoint = self.baseUrl + f"/adjustAuthorisation" | ||||||
|
Check warning on line 20 in Adyen/services/payments/modifications_api.py
|
||||||
| method = "POST" | ||||||
| return self.client.call_adyen_api( | ||||||
| request, self.service, method, endpoint, idempotency_key, **kwargs | ||||||
| ) | ||||||
| return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) | ||||||
|
|
||||||
| def cancel(self, request, idempotency_key=None, **kwargs): | ||||||
| """ | ||||||
| Cancel an authorisation | ||||||
| """ | ||||||
| endpoint = self.baseUrl + "/cancel" | ||||||
| endpoint = self.baseUrl + f"/cancel" | ||||||
|
Check warning on line 28 in Adyen/services/payments/modifications_api.py
|
||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| method = "POST" | ||||||
| return self.client.call_adyen_api( | ||||||
| request, self.service, method, endpoint, idempotency_key, **kwargs | ||||||
| ) | ||||||
| return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) | ||||||
|
|
||||||
| def cancel_or_refund(self, request, idempotency_key=None, **kwargs): | ||||||
| """ | ||||||
| Cancel or refund a payment | ||||||
| """ | ||||||
| endpoint = self.baseUrl + "/cancelOrRefund" | ||||||
| endpoint = self.baseUrl + f"/cancelOrRefund" | ||||||
|
Check warning on line 36 in Adyen/services/payments/modifications_api.py
|
||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| method = "POST" | ||||||
| return self.client.call_adyen_api( | ||||||
| request, self.service, method, endpoint, idempotency_key, **kwargs | ||||||
| ) | ||||||
| return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) | ||||||
|
|
||||||
| def capture(self, request, idempotency_key=None, **kwargs): | ||||||
| """ | ||||||
| Capture an authorisation | ||||||
| """ | ||||||
| endpoint = self.baseUrl + "/capture" | ||||||
| endpoint = self.baseUrl + f"/capture" | ||||||
|
Check warning on line 44 in Adyen/services/payments/modifications_api.py
|
||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| method = "POST" | ||||||
| return self.client.call_adyen_api( | ||||||
| request, self.service, method, endpoint, idempotency_key, **kwargs | ||||||
| ) | ||||||
| return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) | ||||||
|
|
||||||
| def donate(self, request, idempotency_key=None, **kwargs): | ||||||
| """ | ||||||
| Create a donation | ||||||
|
|
||||||
| Deprecated | ||||||
| Deprecated | ||||||
| """ | ||||||
| endpoint = self.baseUrl + "/donate" | ||||||
| endpoint = self.baseUrl + f"/donate" | ||||||
|
Check warning on line 54 in Adyen/services/payments/modifications_api.py
|
||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| method = "POST" | ||||||
| return self.client.call_adyen_api( | ||||||
| request, self.service, method, endpoint, idempotency_key, **kwargs | ||||||
| ) | ||||||
| return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) | ||||||
|
|
||||||
| def refund(self, request, idempotency_key=None, **kwargs): | ||||||
| """ | ||||||
| Refund a captured payment | ||||||
| """ | ||||||
| endpoint = self.baseUrl + "/refund" | ||||||
| endpoint = self.baseUrl + f"/refund" | ||||||
|
Check warning on line 62 in Adyen/services/payments/modifications_api.py
|
||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| method = "POST" | ||||||
| return self.client.call_adyen_api( | ||||||
| request, self.service, method, endpoint, idempotency_key, **kwargs | ||||||
| ) | ||||||
| return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) | ||||||
|
|
||||||
| def technical_cancel(self, request, idempotency_key=None, **kwargs): | ||||||
| """ | ||||||
| Cancel an authorisation using your reference | ||||||
| """ | ||||||
| endpoint = self.baseUrl + "/technicalCancel" | ||||||
| endpoint = self.baseUrl + f"/technicalCancel" | ||||||
|
Check warning on line 70 in Adyen/services/payments/modifications_api.py
|
||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| method = "POST" | ||||||
| return self.client.call_adyen_api( | ||||||
| request, self.service, method, endpoint, idempotency_key, **kwargs | ||||||
| ) | ||||||
| return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) | ||||||
|
|
||||||
| def void_pending_refund(self, request, idempotency_key=None, **kwargs): | ||||||
| """ | ||||||
| Cancel an in-person refund | ||||||
| """ | ||||||
| endpoint = self.baseUrl + "/voidPendingRefund" | ||||||
| endpoint = self.baseUrl + f"/voidPendingRefund" | ||||||
|
Check warning on line 78 in Adyen/services/payments/modifications_api.py
|
||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The use of an f-string on a string literal without any embedded expressions is unnecessary. For cleaner and more idiomatic code, the entire URL should be constructed within a single f-string.
Suggested change
|
||||||
| method = "POST" | ||||||
| return self.client.call_adyen_api( | ||||||
| request, self.service, method, endpoint, idempotency_key, **kwargs | ||||||
| ) | ||||||
| return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -17,48 +17,39 @@ | |||||
| """ | ||||||
| Create an authorisation | ||||||
| """ | ||||||
| endpoint = self.baseUrl + "/authorise" | ||||||
| endpoint = self.baseUrl + f"/authorise" | ||||||
|
Check warning on line 20 in Adyen/services/payments/payments_api.py
|
||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| method = "POST" | ||||||
| return self.client.call_adyen_api( | ||||||
| request, self.service, method, endpoint, idempotency_key, **kwargs | ||||||
| ) | ||||||
| return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) | ||||||
|
|
||||||
| def authorise3d(self, request, idempotency_key=None, **kwargs): | ||||||
| """ | ||||||
| Complete a 3DS authorisation | ||||||
| """ | ||||||
| endpoint = self.baseUrl + "/authorise3d" | ||||||
| endpoint = self.baseUrl + f"/authorise3d" | ||||||
|
Check warning on line 28 in Adyen/services/payments/payments_api.py
|
||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| method = "POST" | ||||||
| return self.client.call_adyen_api( | ||||||
| request, self.service, method, endpoint, idempotency_key, **kwargs | ||||||
| ) | ||||||
| return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) | ||||||
|
|
||||||
| def authorise3ds2(self, request, idempotency_key=None, **kwargs): | ||||||
| """ | ||||||
| Complete a 3DS2 authorisation | ||||||
| """ | ||||||
| endpoint = self.baseUrl + "/authorise3ds2" | ||||||
| endpoint = self.baseUrl + f"/authorise3ds2" | ||||||
|
Check warning on line 36 in Adyen/services/payments/payments_api.py
|
||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| method = "POST" | ||||||
| return self.client.call_adyen_api( | ||||||
| request, self.service, method, endpoint, idempotency_key, **kwargs | ||||||
| ) | ||||||
| return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) | ||||||
|
|
||||||
| def get_authentication_result(self, request, idempotency_key=None, **kwargs): | ||||||
| """ | ||||||
| Get the 3DS authentication result | ||||||
| """ | ||||||
| endpoint = self.baseUrl + "/getAuthenticationResult" | ||||||
| endpoint = self.baseUrl + f"/getAuthenticationResult" | ||||||
|
Check warning on line 44 in Adyen/services/payments/payments_api.py
|
||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The use of an f-string on a string literal without any embedded expressions is unnecessary. For cleaner and more idiomatic code, the entire URL should be constructed within a single f-string.
Suggested change
|
||||||
| method = "POST" | ||||||
| return self.client.call_adyen_api( | ||||||
| request, self.service, method, endpoint, idempotency_key, **kwargs | ||||||
| ) | ||||||
| return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) | ||||||
|
|
||||||
| def retrieve3ds2_result(self, request, idempotency_key=None, **kwargs): | ||||||
| """ | ||||||
| Get the 3DS2 authentication result | ||||||
| """ | ||||||
| endpoint = self.baseUrl + "/retrieve3ds2Result" | ||||||
| endpoint = self.baseUrl + f"/retrieve3ds2Result" | ||||||
|
Check warning on line 52 in Adyen/services/payments/payments_api.py
|
||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The use of an f-string on a string literal without any embedded expressions is unnecessary. For cleaner and more idiomatic code, the entire URL should be constructed within a single f-string.
Suggested change
|
||||||
| method = "POST" | ||||||
| return self.client.call_adyen_api( | ||||||
| request, self.service, method, endpoint, idempotency_key, **kwargs | ||||||
| ) | ||||||
| return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of an f-string on a string literal without any embedded expressions is unnecessary. For cleaner and more idiomatic code, the entire URL should be constructed within a single f-string.