-
Notifications
You must be signed in to change notification settings - Fork 47
[disputes] Code generation: update services and models #452
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,48 +17,39 @@ | |||||||||
| """ | ||||||||||
| Accept a dispute | ||||||||||
| """ | ||||||||||
| endpoint = self.baseUrl + "/acceptDispute" | ||||||||||
| endpoint = self.baseUrl + f"/acceptDispute" | ||||||||||
|
Check warning on line 20 in Adyen/services/disputes/disputes_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) | ||||||||||
|
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. This line has become excessively long (over 100 characters), which harms readability and violates common Python style guidelines like PEP 8. The previous multi-line formatting was preferable. Please consider reformatting this call to span multiple lines.
Suggested change
|
||||||||||
|
|
||||||||||
| def defend_dispute(self, request, idempotency_key=None, **kwargs): | ||||||||||
| """ | ||||||||||
| Defend a dispute | ||||||||||
| """ | ||||||||||
| endpoint = self.baseUrl + "/defendDispute" | ||||||||||
| endpoint = self.baseUrl + f"/defendDispute" | ||||||||||
|
Check warning on line 28 in Adyen/services/disputes/disputes_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
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) | ||||||||||
|
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. This line has become excessively long (over 100 characters), which harms readability and violates common Python style guidelines like PEP 8. The previous multi-line formatting was preferable. Please consider reformatting this call to span multiple lines.
Suggested change
|
||||||||||
|
|
||||||||||
| def delete_dispute_defense_document(self, request, idempotency_key=None, **kwargs): | ||||||||||
| """ | ||||||||||
| Delete a defense document | ||||||||||
| """ | ||||||||||
| endpoint = self.baseUrl + "/deleteDisputeDefenseDocument" | ||||||||||
| endpoint = self.baseUrl + f"/deleteDisputeDefenseDocument" | ||||||||||
|
Check warning on line 36 in Adyen/services/disputes/disputes_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
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) | ||||||||||
|
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. This line has become excessively long (over 100 characters), which harms readability and violates common Python style guidelines like PEP 8. The previous multi-line formatting was preferable. Please consider reformatting this call to span multiple lines.
Suggested change
|
||||||||||
|
|
||||||||||
| def retrieve_applicable_defense_reasons(self, request, idempotency_key=None, **kwargs): | ||||||||||
| """ | ||||||||||
| Get applicable defense reasons | ||||||||||
| """ | ||||||||||
| endpoint = self.baseUrl + "/retrieveApplicableDefenseReasons" | ||||||||||
| endpoint = self.baseUrl + f"/retrieveApplicableDefenseReasons" | ||||||||||
|
Check warning on line 44 in Adyen/services/disputes/disputes_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
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) | ||||||||||
|
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. This line has become excessively long (over 100 characters), which harms readability and violates common Python style guidelines like PEP 8. The previous multi-line formatting was preferable. Please consider reformatting this call to span multiple lines.
Suggested change
|
||||||||||
|
|
||||||||||
| def supply_defense_document(self, request, idempotency_key=None, **kwargs): | ||||||||||
| """ | ||||||||||
| Supply a defense document | ||||||||||
| """ | ||||||||||
| endpoint = self.baseUrl + "/supplyDefenseDocument" | ||||||||||
| endpoint = self.baseUrl + f"/supplyDefenseDocument" | ||||||||||
|
Check warning on line 52 in Adyen/services/disputes/disputes_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
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) | ||||||||||
|
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. This line has become excessively long (over 100 characters), which harms readability and violates common Python style guidelines like PEP 8. The previous multi-line formatting was preferable. Please consider reformatting this call to span multiple lines.
Suggested change
|
||||||||||
|
|
||||||||||
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
fprefix on this string literal is redundant as there are no expressions to interpolate. This can be confusing for developers. For constructing URLs, it's more idiomatic to include the base URL variable within the f-string itself for better readability.