-
Notifications
You must be signed in to change notification settings - Fork 47
[legalentitymanagement] Code generation: update services and models #456
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 |
|---|---|---|
|
|
@@ -19,36 +19,29 @@ | |
| """ | ||
| endpoint = self.baseUrl + f"/documents/{id}" | ||
| method = "DELETE" | ||
| return self.client.call_adyen_api( | ||
| None, self.service, method, endpoint, idempotency_key, **kwargs | ||
| ) | ||
| return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) | ||
|
|
||
| def get_document(self, id, idempotency_key=None, **kwargs): | ||
| """ | ||
| Get a document | ||
| """ | ||
| endpoint = self.baseUrl + f"/documents/{id}" | ||
| method = "GET" | ||
| return self.client.call_adyen_api( | ||
| None, self.service, method, endpoint, idempotency_key, **kwargs | ||
| ) | ||
| return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) | ||
|
|
||
| def update_document(self, request, id, idempotency_key=None, **kwargs): | ||
| """ | ||
| Update a document | ||
| """ | ||
| endpoint = self.baseUrl + f"/documents/{id}" | ||
| method = "PATCH" | ||
| 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 upload_document_for_verification_checks(self, request, idempotency_key=None, **kwargs): | ||
| """ | ||
| Upload a document for verification checks | ||
| """ | ||
| endpoint = self.baseUrl + "/documents" | ||
| endpoint = self.baseUrl + f"/documents" | ||
|
Check warning on line 44 in Adyen/services/legalEntityManagement/documents_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) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,26 +19,21 @@ | |
| """ | ||
| endpoint = self.baseUrl + f"/legalEntities/{id}/onboardingLinks" | ||
| 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_onboarding_link_theme(self, id, idempotency_key=None, **kwargs): | ||
| """ | ||
| Get an onboarding link theme | ||
| """ | ||
| endpoint = self.baseUrl + f"/themes/{id}" | ||
| method = "GET" | ||
| return self.client.call_adyen_api( | ||
| None, self.service, method, endpoint, idempotency_key, **kwargs | ||
| ) | ||
| return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) | ||
|
|
||
| def list_hosted_onboarding_page_themes(self, idempotency_key=None, **kwargs): | ||
| """ | ||
| Get a list of hosted onboarding page themes | ||
| """ | ||
| endpoint = self.baseUrl + "/themes" | ||
| endpoint = self.baseUrl + f"/themes" | ||
|
Check warning on line 36 in Adyen/services/legalEntityManagement/hosted_onboarding_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 = "GET" | ||
| return self.client.call_adyen_api( | ||
| None, self.service, method, endpoint, idempotency_key, **kwargs | ||
| ) | ||
| return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,66 +19,53 @@ | |
| """ | ||
| endpoint = self.baseUrl + f"/legalEntities/{id}/checkVerificationErrors" | ||
| method = "POST" | ||
| return self.client.call_adyen_api( | ||
| None, self.service, method, endpoint, idempotency_key, **kwargs | ||
| ) | ||
| return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) | ||
|
|
||
| def confirm_data_review(self, id, idempotency_key=None, **kwargs): | ||
| """ | ||
| Confirm data review | ||
| """ | ||
| endpoint = self.baseUrl + f"/legalEntities/{id}/confirmDataReview" | ||
| method = "POST" | ||
| return self.client.call_adyen_api( | ||
| None, self.service, method, endpoint, idempotency_key, **kwargs | ||
| ) | ||
| return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) | ||
|
|
||
| def create_legal_entity(self, request, idempotency_key=None, **kwargs): | ||
| """ | ||
| Create a legal entity | ||
| """ | ||
| endpoint = self.baseUrl + "/legalEntities" | ||
| endpoint = self.baseUrl + f"/legalEntities" | ||
|
Check warning on line 36 in Adyen/services/legalEntityManagement/legal_entities_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_all_business_lines_under_legal_entity(self, id, idempotency_key=None, **kwargs): | ||
| """ | ||
| Get all business lines under a legal entity | ||
| """ | ||
| endpoint = self.baseUrl + f"/legalEntities/{id}/businessLines" | ||
| method = "GET" | ||
| return self.client.call_adyen_api( | ||
| None, self.service, method, endpoint, idempotency_key, **kwargs | ||
| ) | ||
| return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) | ||
|
|
||
| def get_legal_entity(self, id, idempotency_key=None, **kwargs): | ||
| """ | ||
| Get a legal entity | ||
| """ | ||
| endpoint = self.baseUrl + f"/legalEntities/{id}" | ||
| method = "GET" | ||
| return self.client.call_adyen_api( | ||
| None, self.service, method, endpoint, idempotency_key, **kwargs | ||
| ) | ||
| return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) | ||
|
|
||
| def request_periodic_review(self, id, idempotency_key=None, **kwargs): | ||
| """ | ||
| Request periodic data review. | ||
| """ | ||
| endpoint = self.baseUrl + f"/legalEntities/{id}/requestPeriodicReview" | ||
| method = "POST" | ||
| return self.client.call_adyen_api( | ||
| None, self.service, method, endpoint, idempotency_key, **kwargs | ||
| ) | ||
| return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) | ||
|
|
||
| def update_legal_entity(self, request, id, idempotency_key=None, **kwargs): | ||
| """ | ||
| Update a legal entity | ||
| """ | ||
| endpoint = self.baseUrl + f"/legalEntities/{id}" | ||
| method = "PATCH" | ||
| 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,38 +17,31 @@ | |||||
| """ | ||||||
| Create a transfer instrument | ||||||
| """ | ||||||
| endpoint = self.baseUrl + "/transferInstruments" | ||||||
| endpoint = self.baseUrl + f"/transferInstruments" | ||||||
|
Check warning on line 20 in Adyen/services/legalEntityManagement/transfer_instruments_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 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 delete_transfer_instrument(self, id, idempotency_key=None, **kwargs): | ||||||
| """ | ||||||
| Delete a transfer instrument | ||||||
| """ | ||||||
| endpoint = self.baseUrl + f"/transferInstruments/{id}" | ||||||
| method = "DELETE" | ||||||
| return self.client.call_adyen_api( | ||||||
| None, self.service, method, endpoint, idempotency_key, **kwargs | ||||||
| ) | ||||||
| return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) | ||||||
|
|
||||||
| def get_transfer_instrument(self, id, idempotency_key=None, **kwargs): | ||||||
| """ | ||||||
| Get a transfer instrument | ||||||
| """ | ||||||
| endpoint = self.baseUrl + f"/transferInstruments/{id}" | ||||||
| method = "GET" | ||||||
| return self.client.call_adyen_api( | ||||||
| None, self.service, method, endpoint, idempotency_key, **kwargs | ||||||
| ) | ||||||
| return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) | ||||||
|
|
||||||
| def update_transfer_instrument(self, request, id, idempotency_key=None, **kwargs): | ||||||
| """ | ||||||
| Update a transfer instrument | ||||||
| """ | ||||||
| endpoint = self.baseUrl + f"/transferInstruments/{id}" | ||||||
| method = "PATCH" | ||||||
| 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 f-string
f"/businessLines"is unnecessary as it doesn't contain any expressions. A more idiomatic way to construct the URL would be to use a single f-string for the entire expression.