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
2 changes: 1 addition & 1 deletion Adyen/services/recurring/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ class AdyenRecurringApi(AdyenServiceBase):
"""

def __init__(self, client=None):
super().__init__(client=client)
super(AdyenRecurringApi, self).__init__(client=client)
self.recurring_api = RecurringApi(client=client)
41 changes: 15 additions & 26 deletions Adyen/services/recurring/recurring_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,70 +9,59 @@
"""

def __init__(self, client=None):
super().__init__(client=client)
super(RecurringApi, self).__init__(client=client)
self.service = "recurring"
self.baseUrl = "https://paltokenization-test.adyen.com/pal/servlet/Recurring/v68"
self.baseUrl = "https://paltokenization-test.adyen.com/paltokenization/servlet/Recurring/v68"

def create_permit(self, request, idempotency_key=None, **kwargs):
"""
Create new permits linked to a recurring contract.

Deprecated since Adyen Recurring API v68
"""
endpoint = self.baseUrl + "/createPermit"
endpoint = self.baseUrl + f"/createPermit"

Check warning on line 22 in Adyen/services/recurring/recurring_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=AZy_ESkG3rRGJkHAbF1c&open=AZy_ESkG3rRGJkHAbF1c&pullRequest=420
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 disable(self, request, idempotency_key=None, **kwargs):
"""
Disable stored payment details
"""
endpoint = self.baseUrl + "/disable"
endpoint = self.baseUrl + f"/disable"

Check warning on line 30 in Adyen/services/recurring/recurring_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=AZy_ESkG3rRGJkHAbF1d&open=AZy_ESkG3rRGJkHAbF1d&pullRequest=420
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 disable_permit(self, request, idempotency_key=None, **kwargs):
"""
Disable an existing permit.

Deprecated since Adyen Recurring API v68
"""
endpoint = self.baseUrl + "/disablePermit"
endpoint = self.baseUrl + f"/disablePermit"

Check warning on line 40 in Adyen/services/recurring/recurring_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=AZy_ESkG3rRGJkHAbF1e&open=AZy_ESkG3rRGJkHAbF1e&pullRequest=420
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 list_recurring_details(self, request, idempotency_key=None, **kwargs):
"""
Get stored payment details
"""
endpoint = self.baseUrl + "/listRecurringDetails"
endpoint = self.baseUrl + f"/listRecurringDetails"

Check warning on line 48 in Adyen/services/recurring/recurring_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=AZy_ESkG3rRGJkHAbF1f&open=AZy_ESkG3rRGJkHAbF1f&pullRequest=420
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 notify_shopper(self, request, idempotency_key=None, **kwargs):
"""
Ask issuer to notify the shopper
"""
endpoint = self.baseUrl + "/notifyShopper"
endpoint = self.baseUrl + f"/notifyShopper"

Check warning on line 56 in Adyen/services/recurring/recurring_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=AZy_ESkG3rRGJkHAbF1g&open=AZy_ESkG3rRGJkHAbF1g&pullRequest=420
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 schedule_account_updater(self, request, idempotency_key=None, **kwargs):
"""
Schedule running the Account Updater
"""
endpoint = self.baseUrl + "/scheduleAccountUpdater"
endpoint = self.baseUrl + f"/scheduleAccountUpdater"

Check warning on line 64 in Adyen/services/recurring/recurring_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=AZy_ESkG3rRGJkHAbF1h&open=AZy_ESkG3rRGJkHAbF1h&pullRequest=420
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)

Loading