Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions Adyen/services/balancePlatform/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
from .balances_api import BalancesApi
from .bank_account_validation_api import BankAccountValidationApi
from .card_orders_api import CardOrdersApi
from .direct_debit_mandates_api import DirectDebitMandatesApi
from .grant_accounts_api import GrantAccountsApi
from .grant_offers_api import GrantOffersApi
from .manage_card_pin_api import ManageCardPINApi
from .manage_sca_devices_api import ManageSCADevicesApi
from .manage_card_pin_api import ManageCardPINApi
from .network_tokens_api import NetworkTokensApi
from .payment_instrument_groups_api import PaymentInstrumentGroupsApi
from .payment_instruments_api import PaymentInstrumentsApi
Expand Down Expand Up @@ -36,6 +37,7 @@ def __init__(self, client=None):
self.balances_api = BalancesApi(client=client)
self.bank_account_validation_api = BankAccountValidationApi(client=client)
self.card_orders_api = CardOrdersApi(client=client)
self.direct_debit_mandates_api = DirectDebitMandatesApi(client=client)
self.grant_accounts_api = GrantAccountsApi(client=client)
self.grant_offers_api = GrantOffersApi(client=client)
self.manage_sca_devices_api = ManageSCADevicesApi(client=client)
Expand All @@ -47,10 +49,6 @@ def __init__(self, client=None):
self.sca_association_management_api = SCAAssociationManagementApi(client=client)
self.sca_device_management_api = SCADeviceManagementApi(client=client)
self.transaction_rules_api = TransactionRulesApi(client=client)
self.transfer_limits_balance_account_level_api = TransferLimitsBalanceAccountLevelApi(
client=client
)
self.transfer_limits_balance_platform_level_api = TransferLimitsBalancePlatformLevelApi(
client=client
)
self.transfer_limits_balance_account_level_api = TransferLimitsBalanceAccountLevelApi(client=client)
self.transfer_limits_balance_platform_level_api = TransferLimitsBalancePlatformLevelApi(client=client)
self.transfer_routes_api = TransferRoutesApi(client=client)
35 changes: 16 additions & 19 deletions Adyen/services/balancePlatform/account_holders_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,58 +17,55 @@
"""
Create an account holder
"""
endpoint = self.baseUrl + "/accountHolders"
endpoint = self.baseUrl + f"/accountHolders"

Check warning on line 20 in Adyen/services/balancePlatform/account_holders_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add replacement fields or use a normal string instead of an f-string.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wvNWfhKdAtO6Xlz&open=AZ0K0wvNWfhKdAtO6Xlz&pullRequest=445
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_account_holder(self, id, idempotency_key=None, **kwargs):
"""
Get an account holder
"""
endpoint = self.baseUrl + f"/accountHolders/{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 get_all_balance_accounts_of_account_holder(self, id, idempotency_key=None, **kwargs):
"""
Get all balance accounts of an account holder
"""
endpoint = self.baseUrl + f"/accountHolders/{id}/balanceAccounts"
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_all_transaction_rules_for_account_holder(self, id, idempotency_key=None, **kwargs):
"""
Get all transaction rules for an account holder
"""
endpoint = self.baseUrl + f"/accountHolders/{id}/transactionRules"
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_tax_form(self, id, idempotency_key=None, **kwargs):
"""
Get a tax form
"""
endpoint = self.baseUrl + f"/accountHolders/{id}/taxForms"
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_tax_form_summary(self, id, idempotency_key=None, **kwargs):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The parameter name id shadows the Python built-in id(). While this is consistent with other methods in this auto-generated file, it's a good practice to avoid shadowing built-ins to improve clarity and prevent potential issues. If possible, consider using a more descriptive name like account_holder_id, which might require a change in the OpenAPI generator configuration.

"""
Get summary of tax forms for an account holder
"""
endpoint = self.baseUrl + f"/accountHolders/{id}/taxFormSummary"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

def update_account_holder(self, request, id, idempotency_key=None, **kwargs):
"""
Update an account holder
"""
endpoint = self.baseUrl + f"/accountHolders/{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)

25 changes: 7 additions & 18 deletions Adyen/services/balancePlatform/authorized_card_users_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,46 +13,35 @@
self.service = "balancePlatform"
self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"

def create_authorised_card_users(
self, request, paymentInstrumentId, idempotency_key=None, **kwargs
):
def create_authorised_card_users(self, request, paymentInstrumentId, idempotency_key=None, **kwargs):

Check warning on line 16 in Adyen/services/balancePlatform/authorized_card_users_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "paymentInstrumentId" to match the regular expression ^[_a-z][a-z0-9_]*$.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wskWfhKdAtO6Xlc&open=AZ0K0wskWfhKdAtO6Xlc&pullRequest=445
"""
Create authorized users for a card.
"""
endpoint = self.baseUrl + f"/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers"
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_authorised_card_users(self, paymentInstrumentId, idempotency_key=None, **kwargs):
"""
Delete the authorized users for a card.
"""
endpoint = self.baseUrl + f"/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers"
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_all_authorised_card_users(self, paymentInstrumentId, idempotency_key=None, **kwargs):
"""
Get authorized users for a card.
"""
endpoint = self.baseUrl + f"/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers"
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_authorised_card_users(
self, request, paymentInstrumentId, idempotency_key=None, **kwargs
):
def update_authorised_card_users(self, request, paymentInstrumentId, idempotency_key=None, **kwargs):

Check warning on line 40 in Adyen/services/balancePlatform/authorized_card_users_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "paymentInstrumentId" to match the regular expression ^[_a-z][a-z0-9_]*$.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wskWfhKdAtO6Xld&open=AZ0K0wskWfhKdAtO6Xld&pullRequest=445
"""
Update the authorized users for a card.
"""
endpoint = self.baseUrl + f"/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers"
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)

43 changes: 12 additions & 31 deletions Adyen/services/balancePlatform/balance_accounts_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,98 +17,79 @@
"""
Create a balance account
"""
endpoint = self.baseUrl + "/balanceAccounts"
endpoint = self.baseUrl + f"/balanceAccounts"

Check warning on line 20 in Adyen/services/balancePlatform/balance_accounts_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add replacement fields or use a normal string instead of an f-string.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wuTWfhKdAtO6Xlw&open=AZ0K0wuTWfhKdAtO6Xlw&pullRequest=445
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 create_sweep(self, request, balanceAccountId, idempotency_key=None, **kwargs):
"""
Create a sweep
"""
endpoint = self.baseUrl + f"/balanceAccounts/{balanceAccountId}/sweeps"
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_sweep(self, balanceAccountId, sweepId, idempotency_key=None, **kwargs):
"""
Delete a sweep
"""
endpoint = self.baseUrl + f"/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"
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_all_sweeps_for_balance_account(self, balanceAccountId, idempotency_key=None, **kwargs):
"""
Get all sweeps for a balance account
"""
endpoint = self.baseUrl + f"/balanceAccounts/{balanceAccountId}/sweeps"
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_all_transaction_rules_for_balance_account(self, id, idempotency_key=None, **kwargs):
"""
Get all transaction rules for a balance account
"""
endpoint = self.baseUrl + f"/balanceAccounts/{id}/transactionRules"
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_balance_account(self, id, idempotency_key=None, **kwargs):
"""
Get a balance account
"""
endpoint = self.baseUrl + f"/balanceAccounts/{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 get_payment_instruments_linked_to_balance_account(self, id, idempotency_key=None, **kwargs):
"""
Get payment instruments linked to a balance account
"""
endpoint = self.baseUrl + f"/balanceAccounts/{id}/paymentInstruments"
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_sweep(self, balanceAccountId, sweepId, idempotency_key=None, **kwargs):
"""
Get a sweep
"""
endpoint = self.baseUrl + f"/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"
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_balance_account(self, request, id, idempotency_key=None, **kwargs):
"""
Update a balance account
"""
endpoint = self.baseUrl + f"/balanceAccounts/{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 update_sweep(self, request, balanceAccountId, sweepId, idempotency_key=None, **kwargs):
"""
Update a sweep
"""
endpoint = self.baseUrl + f"/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"
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)

64 changes: 16 additions & 48 deletions Adyen/services/balancePlatform/balances_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,75 +13,43 @@
self.service = "balancePlatform"
self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"

def create_webhook_setting(
self, request, balancePlatformId, webhookId, idempotency_key=None, **kwargs
):
def create_webhook_setting(self, request, balancePlatformId, webhookId, idempotency_key=None, **kwargs):

Check warning on line 16 in Adyen/services/balancePlatform/balances_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "webhookId" to match the regular expression ^[_a-z][a-z0-9_]*$.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wtuWfhKdAtO6Xlk&open=AZ0K0wtuWfhKdAtO6Xlk&pullRequest=445

Check warning on line 16 in Adyen/services/balancePlatform/balances_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "balancePlatformId" to match the regular expression ^[_a-z][a-z0-9_]*$.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wtuWfhKdAtO6Xlj&open=AZ0K0wtuWfhKdAtO6Xlj&pullRequest=445
"""
Create a balance webhook setting
"""
endpoint = (
self.baseUrl + f"/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings"
)
endpoint = self.baseUrl + f"/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings"
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_webhook_setting(
self, balancePlatformId, webhookId, settingId, idempotency_key=None, **kwargs
):
def delete_webhook_setting(self, balancePlatformId, webhookId, settingId, idempotency_key=None, **kwargs):

Check warning on line 24 in Adyen/services/balancePlatform/balances_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "settingId" to match the regular expression ^[_a-z][a-z0-9_]*$.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wtuWfhKdAtO6Xlm&open=AZ0K0wtuWfhKdAtO6Xlm&pullRequest=445

Check warning on line 24 in Adyen/services/balancePlatform/balances_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "webhookId" to match the regular expression ^[_a-z][a-z0-9_]*$.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wtuWfhKdAtO6Xln&open=AZ0K0wtuWfhKdAtO6Xln&pullRequest=445

Check warning on line 24 in Adyen/services/balancePlatform/balances_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "balancePlatformId" to match the regular expression ^[_a-z][a-z0-9_]*$.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wtuWfhKdAtO6Xll&open=AZ0K0wtuWfhKdAtO6Xll&pullRequest=445
"""
Delete a balance webhook setting by id
"""
endpoint = (
self.baseUrl
+ f"/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}"
)
endpoint = self.baseUrl + f"/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}"
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_all_webhook_settings(
self, balancePlatformId, webhookId, idempotency_key=None, **kwargs
):
def get_all_webhook_settings(self, balancePlatformId, webhookId, idempotency_key=None, **kwargs):

Check warning on line 32 in Adyen/services/balancePlatform/balances_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "balancePlatformId" to match the regular expression ^[_a-z][a-z0-9_]*$.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wtuWfhKdAtO6Xlo&open=AZ0K0wtuWfhKdAtO6Xlo&pullRequest=445

Check warning on line 32 in Adyen/services/balancePlatform/balances_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "webhookId" to match the regular expression ^[_a-z][a-z0-9_]*$.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wtuWfhKdAtO6Xlp&open=AZ0K0wtuWfhKdAtO6Xlp&pullRequest=445
"""
Get all balance webhook settings
"""
endpoint = (
self.baseUrl + f"/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings"
)
endpoint = self.baseUrl + f"/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings"
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_webhook_setting(
self, balancePlatformId, webhookId, settingId, idempotency_key=None, **kwargs
):
def get_webhook_setting(self, balancePlatformId, webhookId, settingId, idempotency_key=None, **kwargs):

Check warning on line 40 in Adyen/services/balancePlatform/balances_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "balancePlatformId" to match the regular expression ^[_a-z][a-z0-9_]*$.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wtuWfhKdAtO6Xlq&open=AZ0K0wtuWfhKdAtO6Xlq&pullRequest=445

Check warning on line 40 in Adyen/services/balancePlatform/balances_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "webhookId" to match the regular expression ^[_a-z][a-z0-9_]*$.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wtuWfhKdAtO6Xls&open=AZ0K0wtuWfhKdAtO6Xls&pullRequest=445

Check warning on line 40 in Adyen/services/balancePlatform/balances_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "settingId" to match the regular expression ^[_a-z][a-z0-9_]*$.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wtuWfhKdAtO6Xlr&open=AZ0K0wtuWfhKdAtO6Xlr&pullRequest=445
"""
Get a balance webhook setting by id
"""
endpoint = (
self.baseUrl
+ f"/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}"
)
endpoint = self.baseUrl + f"/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}"
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_webhook_setting(
self, request, balancePlatformId, webhookId, settingId, idempotency_key=None, **kwargs
):
def update_webhook_setting(self, request, balancePlatformId, webhookId, settingId, idempotency_key=None, **kwargs):

Check warning on line 48 in Adyen/services/balancePlatform/balances_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "webhookId" to match the regular expression ^[_a-z][a-z0-9_]*$.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wtuWfhKdAtO6Xlv&open=AZ0K0wtuWfhKdAtO6Xlv&pullRequest=445

Check warning on line 48 in Adyen/services/balancePlatform/balances_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "settingId" to match the regular expression ^[_a-z][a-z0-9_]*$.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wtuWfhKdAtO6Xlu&open=AZ0K0wtuWfhKdAtO6Xlu&pullRequest=445

Check warning on line 48 in Adyen/services/balancePlatform/balances_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "balancePlatformId" to match the regular expression ^[_a-z][a-z0-9_]*$.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wtuWfhKdAtO6Xlt&open=AZ0K0wtuWfhKdAtO6Xlt&pullRequest=445
"""
Update a balance webhook setting by id
"""
endpoint = (
self.baseUrl
+ f"/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}"
)
endpoint = self.baseUrl + f"/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}"
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
Expand Up @@ -17,8 +17,7 @@
"""
Validate a bank account
"""
endpoint = self.baseUrl + "/validateBankAccountIdentification"
endpoint = self.baseUrl + f"/validateBankAccountIdentification"

Check warning on line 20 in Adyen/services/balancePlatform/bank_account_validation_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add replacement fields or use a normal string instead of an f-string.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wu7WfhKdAtO6Xly&open=AZ0K0wu7WfhKdAtO6Xly&pullRequest=445
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)

11 changes: 4 additions & 7 deletions Adyen/services/balancePlatform/card_orders_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@
"""
endpoint = self.baseUrl + f"/cardorders/{id}/items"
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_card_orders(self, idempotency_key=None, **kwargs):
"""
Get a list of card orders
"""
endpoint = self.baseUrl + "/cardorders"
endpoint = self.baseUrl + f"/cardorders"

Check warning on line 28 in Adyen/services/balancePlatform/card_orders_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add replacement fields or use a normal string instead of an f-string.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0wpaWfhKdAtO6XlO&open=AZ0K0wpaWfhKdAtO6XlO&pullRequest=445
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)

Loading
Loading