Skip to content
Closed
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
34 changes: 9 additions & 25 deletions Adyen/services/paymentsApp/payments_app_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,59 +13,43 @@
self.service = "paymentsApp"
self.baseUrl = "https://management-live.adyen.com/v1"

def generate_payments_app_boarding_token_for_merchant(
self, request, merchantId, idempotency_key=None, **kwargs
):
def generate_payments_app_boarding_token_for_merchant(self, request, merchantId, idempotency_key=None, **kwargs):

Check warning on line 16 in Adyen/services/paymentsApp/payments_app_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "merchantId" 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=AZ0K0uv4WfhKdAtO6XWb&open=AZ0K0uv4WfhKdAtO6XWb&pullRequest=450
"""
Create a boarding token - merchant level
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/generatePaymentsAppBoardingToken"
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 generate_payments_app_boarding_token_for_store(
self, request, merchantId, storeId, idempotency_key=None, **kwargs
):
def generate_payments_app_boarding_token_for_store(self, request, merchantId, storeId, idempotency_key=None, **kwargs):

Check warning on line 24 in Adyen/services/paymentsApp/payments_app_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "merchantId" 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=AZ0K0uv4WfhKdAtO6XWc&open=AZ0K0uv4WfhKdAtO6XWc&pullRequest=450

Check warning on line 24 in Adyen/services/paymentsApp/payments_app_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this parameter "storeId" 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=AZ0K0uv4WfhKdAtO6XWd&open=AZ0K0uv4WfhKdAtO6XWd&pullRequest=450
"""
Create a boarding token - store level
"""
endpoint = (
self.baseUrl
+ f"/merchants/{merchantId}/stores/{storeId}/generatePaymentsAppBoardingToken"
)
endpoint = self.baseUrl + f"/merchants/{merchantId}/stores/{storeId}/generatePaymentsAppBoardingToken"
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_payments_app_for_merchant(self, merchantId, idempotency_key=None, **kwargs):
"""
Get a list of Payments Apps - merchant level
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/paymentsApps"
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_payments_app_for_store(self, merchantId, storeId, idempotency_key=None, **kwargs):
"""
Get a list of Payments Apps - store level
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/stores/{storeId}/paymentsApps"
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 revoke_payments_app(self, merchantId, installationId, idempotency_key=None, **kwargs):
"""
Revoke Payments App instance authentication
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/paymentsApps/{installationId}/revoke"
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)

Loading