Skip to content
Open
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
14 changes: 14 additions & 0 deletions Adyen/services/management/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
from .api_credentials_merchant_level_api import APICredentialsMerchantLevelApi
from .api_key_company_level_api import APIKeyCompanyLevelApi
from .api_key_merchant_level_api import APIKeyMerchantLevelApi
from .client_certificates_company_level_api import ClientCertificatesCompanyLevelApi
from .client_key_company_level_api import ClientKeyCompanyLevelApi
from .client_key_merchant_level_api import ClientKeyMerchantLevelApi
from .donation_campaigns_api import DonationCampaignsApi
from .my_api_credential_api import MyAPICredentialApi
from .payment_methods_merchant_level_api import PaymentMethodsMerchantLevelApi
from .payout_settings_merchant_level_api import PayoutSettingsMerchantLevelApi
Expand All @@ -23,6 +25,10 @@
from .terminal_settings_merchant_level_api import TerminalSettingsMerchantLevelApi
from .terminal_settings_store_level_api import TerminalSettingsStoreLevelApi
from .terminal_settings_terminal_level_api import TerminalSettingsTerminalLevelApi
from .terminal_themes_company_level_api import TerminalThemesCompanyLevelApi
from .terminal_themes_merchant_level_api import TerminalThemesMerchantLevelApi
from .terminal_themes_store_level_api import TerminalThemesStoreLevelApi
from .terminal_themes_terminal_level_api import TerminalThemesTerminalLevelApi
from .terminals_terminal_level_api import TerminalsTerminalLevelApi
from .users_company_level_api import UsersCompanyLevelApi
from .users_merchant_level_api import UsersMerchantLevelApi
Expand All @@ -49,8 +55,12 @@ def __init__(self, client=None):
self.allowed_origins_company_level_api = AllowedOriginsCompanyLevelApi(client=client)
self.allowed_origins_merchant_level_api = AllowedOriginsMerchantLevelApi(client=client)
self.android_files_company_level_api = AndroidFilesCompanyLevelApi(client=client)
self.client_certificates_company_level_api = ClientCertificatesCompanyLevelApi(
client=client
)
self.client_key_company_level_api = ClientKeyCompanyLevelApi(client=client)
self.client_key_merchant_level_api = ClientKeyMerchantLevelApi(client=client)
self.donation_campaigns_api = DonationCampaignsApi(client=client)
self.my_api_credential_api = MyAPICredentialApi(client=client)
self.payment_methods_merchant_level_api = PaymentMethodsMerchantLevelApi(client=client)
self.payout_settings_merchant_level_api = PayoutSettingsMerchantLevelApi(client=client)
Expand All @@ -65,6 +75,10 @@ def __init__(self, client=None):
self.terminal_settings_merchant_level_api = TerminalSettingsMerchantLevelApi(client=client)
self.terminal_settings_store_level_api = TerminalSettingsStoreLevelApi(client=client)
self.terminal_settings_terminal_level_api = TerminalSettingsTerminalLevelApi(client=client)
self.terminal_themes_company_level_api = TerminalThemesCompanyLevelApi(client=client)
self.terminal_themes_merchant_level_api = TerminalThemesMerchantLevelApi(client=client)
self.terminal_themes_store_level_api = TerminalThemesStoreLevelApi(client=client)
self.terminal_themes_terminal_level_api = TerminalThemesTerminalLevelApi(client=client)
self.terminals_terminal_level_api = TerminalsTerminalLevelApi(client=client)
self.users_company_level_api = UsersCompanyLevelApi(client=client)
self.users_merchant_level_api = UsersMerchantLevelApi(client=client)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def upload_android_app(self, companyId, idempotency_key=None, **kwargs):

def upload_android_certificate(self, companyId, idempotency_key=None, **kwargs):
"""
Upload Android Certificate
Upload Android certificate
"""
endpoint = self.baseUrl + f"/companies/{companyId}/androidCertificates"
method = "POST"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from ..base import AdyenServiceBase


class ClientCertificatesCompanyLevelApi(AdyenServiceBase):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech

Do not edit the class manually.
"""

def __init__(self, client=None):
super().__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"

def generate_client_certificate(self, request, companyId, idempotency_key=None, **kwargs):

Check warning on line 16 in Adyen/services/management/client_certificates_company_level_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AaDOPL0cG-LzG3EJfHph&open=AaDOPL0cG-LzG3EJfHph&pullRequest=497
"""
Generate a client certificate
"""
endpoint = self.baseUrl + f"/companies/{companyId}/clientCertificates"
method = "POST"
return self.client.call_adyen_api(
request, self.service, method, endpoint, idempotency_key, **kwargs
)

def list_client_certificates(self, companyId, idempotency_key=None, **kwargs):

Check warning on line 26 in Adyen/services/management/client_certificates_company_level_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AaDOPL0cG-LzG3EJfHpi&open=AaDOPL0cG-LzG3EJfHpi&pullRequest=497
"""
Retrieve all valid client certificates for this company
"""
endpoint = self.baseUrl + f"/companies/{companyId}/clientCertificates"
method = "GET"
return self.client.call_adyen_api(
None, self.service, method, endpoint, idempotency_key, **kwargs
)
88 changes: 88 additions & 0 deletions Adyen/services/management/donation_campaigns_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
from ..base import AdyenServiceBase


class DonationCampaignsApi(AdyenServiceBase):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

A new API class DonationCampaignsApi has been introduced with several new endpoints, but no corresponding unit tests have been added to test/ManagementTest.py. To ensure correctness and prevent future regressions, please add unit tests covering these new methods (e.g., verifying the correct HTTP method, endpoint URL construction, and request body handling).

"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech

Do not edit the class manually.
"""

def __init__(self, client=None):
super().__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"

def create_donation_campaign(self, request, companyId, idempotency_key=None, **kwargs):

Check warning on line 16 in Adyen/services/management/donation_campaigns_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AZ9b3NcUKJyKTmB7Ns0c&open=AZ9b3NcUKJyKTmB7Ns0c&pullRequest=497
"""
Create a donation campaign
"""
endpoint = self.baseUrl + f"/companies/{companyId}/campaignManagement"
Comment thread
poojah-adyen marked this conversation as resolved.
method = "POST"
return self.client.call_adyen_api(
request, self.service, method, endpoint, idempotency_key, **kwargs
)

def delete_donation_campaign(
self, companyId, donationCampaignId, idempotency_key=None, **kwargs

Check warning on line 27 in Adyen/services/management/donation_campaigns_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AZ9b3NcUKJyKTmB7Ns0d&open=AZ9b3NcUKJyKTmB7Ns0d&pullRequest=497

Check warning on line 27 in Adyen/services/management/donation_campaigns_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "donationCampaignId" 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=AZ9b3NcUKJyKTmB7Ns0e&open=AZ9b3NcUKJyKTmB7Ns0e&pullRequest=497
):
"""
Delete a donation campaign
"""
endpoint = self.baseUrl + f"/companies/{companyId}/campaignManagement/{donationCampaignId}"
Comment thread
poojah-adyen marked this conversation as resolved.
method = "DELETE"
return self.client.call_adyen_api(
None, self.service, method, endpoint, idempotency_key, **kwargs
)

def list_donation_campaigns_for_account_holder(
self, companyId, accountHolderId, idempotency_key=None, **kwargs

Check warning on line 39 in Adyen/services/management/donation_campaigns_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AZ9b3NcUKJyKTmB7Ns0g&open=AZ9b3NcUKJyKTmB7Ns0g&pullRequest=497

Check warning on line 39 in Adyen/services/management/donation_campaigns_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "accountHolderId" 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=AZ9b3NcUKJyKTmB7Ns0f&open=AZ9b3NcUKJyKTmB7Ns0f&pullRequest=497
):
"""
Get the donation campaigns for an account holder
"""
endpoint = (
self.baseUrl
+ f"/companies/{companyId}/campaignManagement/accountHolders/{accountHolderId}"
)
method = "GET"
return self.client.call_adyen_api(
None, self.service, method, endpoint, idempotency_key, **kwargs
)

def list_nonprofits(self, request, companyId, idempotency_key=None, **kwargs):

Check warning on line 53 in Adyen/services/management/donation_campaigns_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AZ9b3NcUKJyKTmB7Ns0h&open=AZ9b3NcUKJyKTmB7Ns0h&pullRequest=497
"""
Get a list of nonprofits
"""
endpoint = self.baseUrl + f"/companies/{companyId}/nonprofits"
method = "POST"
return self.client.call_adyen_api(
request, self.service, method, endpoint, idempotency_key, **kwargs
)

def update_donation_campaign(
self, request, companyId, donationCampaignId, idempotency_key=None, **kwargs

Check warning on line 64 in Adyen/services/management/donation_campaigns_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "donationCampaignId" 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=AZ9b3NcUKJyKTmB7Ns0j&open=AZ9b3NcUKJyKTmB7Ns0j&pullRequest=497

Check warning on line 64 in Adyen/services/management/donation_campaigns_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AZ9b3NcUKJyKTmB7Ns0i&open=AZ9b3NcUKJyKTmB7Ns0i&pullRequest=497
):
"""
Update a donation campaign
"""
endpoint = self.baseUrl + f"/companies/{companyId}/campaignManagement/{donationCampaignId}"
method = "PATCH"
return self.client.call_adyen_api(
request, self.service, method, endpoint, idempotency_key, **kwargs
)

def update_donation_campaign_status(
self, companyId, donationCampaignId, status, idempotency_key=None, **kwargs

Check warning on line 76 in Adyen/services/management/donation_campaigns_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "donationCampaignId" 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=AZ9b3NcUKJyKTmB7Ns0l&open=AZ9b3NcUKJyKTmB7Ns0l&pullRequest=497

Check warning on line 76 in Adyen/services/management/donation_campaigns_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AZ9b3NcUKJyKTmB7Ns0k&open=AZ9b3NcUKJyKTmB7Ns0k&pullRequest=497
):
"""
Activate or end a donation campaign
"""
endpoint = (
self.baseUrl
+ f"/companies/{companyId}/campaignManagement/{donationCampaignId}/status/{status}"
)
method = "POST"
return self.client.call_adyen_api(
None, self.service, method, endpoint, idempotency_key, **kwargs
)
118 changes: 118 additions & 0 deletions Adyen/services/management/terminal_themes_company_level_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
from ..base import AdyenServiceBase


class TerminalThemesCompanyLevelApi(AdyenServiceBase):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech

Do not edit the class manually.
"""

def __init__(self, client=None):
super().__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"

def add_terminal_theme_asset_for_company(self, companyId, id, idempotency_key=None, **kwargs):

Check warning on line 16 in Adyen/services/management/terminal_themes_company_level_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AaDOPL65G-LzG3EJfHpv&open=AaDOPL65G-LzG3EJfHpv&pullRequest=497
"""
Add an asset to a terminal theme
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalThemes/{id}/assets"
method = "POST"
return self.client.call_adyen_api(
None, self.service, method, endpoint, idempotency_key, **kwargs
)

def apply_terminal_theme_for_company(self, companyId, id, idempotency_key=None, **kwargs):

Check warning on line 26 in Adyen/services/management/terminal_themes_company_level_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AaDOPL65G-LzG3EJfHpw&open=AaDOPL65G-LzG3EJfHpw&pullRequest=497
"""
Apply a terminal theme
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalThemes/{id}/apply"
method = "POST"
return self.client.call_adyen_api(
None, self.service, method, endpoint, idempotency_key, **kwargs
)

def create_terminal_theme_for_company(self, request, companyId, idempotency_key=None, **kwargs):

Check warning on line 36 in Adyen/services/management/terminal_themes_company_level_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AaDOPL65G-LzG3EJfHpx&open=AaDOPL65G-LzG3EJfHpx&pullRequest=497
"""
Create a terminal theme
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalThemes"
method = "POST"
return self.client.call_adyen_api(
request, self.service, method, endpoint, idempotency_key, **kwargs
)

def delete_terminal_theme_asset_for_company(
self, companyId, id, idempotency_key=None, **kwargs

Check warning on line 47 in Adyen/services/management/terminal_themes_company_level_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AaDOPL65G-LzG3EJfHpy&open=AaDOPL65G-LzG3EJfHpy&pullRequest=497
):
"""
Delete an asset from a terminal theme
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalThemes/{id}/assets"
method = "DELETE"
return self.client.call_adyen_api(
None, self.service, method, endpoint, idempotency_key, **kwargs
)

def delete_terminal_theme_for_company(self, companyId, id, idempotency_key=None, **kwargs):

Check warning on line 58 in Adyen/services/management/terminal_themes_company_level_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AaDOPL65G-LzG3EJfHpz&open=AaDOPL65G-LzG3EJfHpz&pullRequest=497
"""
Delete a terminal theme
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalThemes/{id}"
method = "DELETE"
return self.client.call_adyen_api(
None, self.service, method, endpoint, idempotency_key, **kwargs
)

def edit_terminal_theme_asset_for_company(self, companyId, id, idempotency_key=None, **kwargs):

Check warning on line 68 in Adyen/services/management/terminal_themes_company_level_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AaDOPL65G-LzG3EJfHp0&open=AaDOPL65G-LzG3EJfHp0&pullRequest=497
"""
Replace a theme asset
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalThemes/{id}/assets/replace"
method = "POST"
return self.client.call_adyen_api(
None, self.service, method, endpoint, idempotency_key, **kwargs
)

def get_terminal_theme_by_id_for_company(self, companyId, id, idempotency_key=None, **kwargs):

Check warning on line 78 in Adyen/services/management/terminal_themes_company_level_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AaDOPL65G-LzG3EJfHp1&open=AaDOPL65G-LzG3EJfHp1&pullRequest=497
"""
Get a terminal theme
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalThemes/{id}"
method = "GET"
return self.client.call_adyen_api(
None, self.service, method, endpoint, idempotency_key, **kwargs
)

def list_terminal_themes_for_company(self, companyId, idempotency_key=None, **kwargs):

Check warning on line 88 in Adyen/services/management/terminal_themes_company_level_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AaDOPL65G-LzG3EJfHp2&open=AaDOPL65G-LzG3EJfHp2&pullRequest=497
"""
List terminal themes
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalThemes"
method = "GET"
return self.client.call_adyen_api(
None, self.service, method, endpoint, idempotency_key, **kwargs
)

def unapply_terminal_theme_for_company(self, companyId, idempotency_key=None, **kwargs):

Check warning on line 98 in Adyen/services/management/terminal_themes_company_level_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AaDOPL65G-LzG3EJfHp3&open=AaDOPL65G-LzG3EJfHp3&pullRequest=497
"""
Unapply a terminal theme
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalThemes/unapply"
method = "POST"
return self.client.call_adyen_api(
None, self.service, method, endpoint, idempotency_key, **kwargs
)

def update_terminal_theme_for_company(
self, request, companyId, id, idempotency_key=None, **kwargs

Check warning on line 109 in Adyen/services/management/terminal_themes_company_level_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "companyId" 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=AaDOPL65G-LzG3EJfHp4&open=AaDOPL65G-LzG3EJfHp4&pullRequest=497
):
"""
Update the metadata of a terminal theme
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalThemes/{id}"
method = "PATCH"
return self.client.call_adyen_api(
request, self.service, method, endpoint, idempotency_key, **kwargs
)
Loading
Loading