id
int64 0
843k
| repository_name
stringlengths 7
55
| file_path
stringlengths 9
332
| class_name
stringlengths 3
290
| human_written_code
stringlengths 12
4.36M
| class_skeleton
stringlengths 19
2.2M
| total_program_units
int64 1
9.57k
| total_doc_str
int64 0
4.2k
| AvgCountLine
float64 0
7.89k
| AvgCountLineBlank
float64 0
300
| AvgCountLineCode
float64 0
7.89k
| AvgCountLineComment
float64 0
7.89k
| AvgCyclomatic
float64 0
130
| CommentToCodeRatio
float64 0
176
| CountClassBase
float64 0
48
| CountClassCoupled
float64 0
589
| CountClassCoupledModified
float64 0
581
| CountClassDerived
float64 0
5.37k
| CountDeclInstanceMethod
float64 0
4.2k
| CountDeclInstanceVariable
float64 0
299
| CountDeclMethod
float64 0
4.2k
| CountDeclMethodAll
float64 0
4.2k
| CountLine
float64 1
115k
| CountLineBlank
float64 0
9.01k
| CountLineCode
float64 0
94.4k
| CountLineCodeDecl
float64 0
46.1k
| CountLineCodeExe
float64 0
91.3k
| CountLineComment
float64 0
27k
| CountStmt
float64 1
93.2k
| CountStmtDecl
float64 0
46.1k
| CountStmtExe
float64 0
90.2k
| MaxCyclomatic
float64 0
759
| MaxInheritanceTree
float64 0
16
| MaxNesting
float64 0
34
| SumCyclomatic
float64 0
6k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3,100 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/exceptions.py
|
Adyen.exceptions.AdyenAPIInvalidPermission
|
class AdyenAPIInvalidPermission(AdyenAPIResponseError):
pass
|
class AdyenAPIInvalidPermission(AdyenAPIResponseError):
pass
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
3,101 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/exceptions.py
|
Adyen.exceptions.AdyenAPIResponseError
|
class AdyenAPIResponseError(AdyenError):
def __init__(self,
message,
*args,
**kwargs):
super(AdyenAPIResponseError, self).__init__(message, *args, **kwargs)
|
class AdyenAPIResponseError(AdyenError):
def __init__(self,
message,
*args,
**kwargs):
pass
| 2 | 0 | 5 | 0 | 5 | 0 | 1 | 0 | 1 | 1 | 0 | 6 | 1 | 0 | 1 | 14 | 6 | 0 | 6 | 5 | 1 | 0 | 3 | 2 | 1 | 1 | 4 | 0 | 1 |
3,102 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/client.py
|
Adyen.client.AdyenClient
|
class AdyenClient(object):
IDEMPOTENCY_HEADER_NAME = 'Idempotency-Key'
APPLICATION_INFO_HEADER_NAME = 'adyen-library-name'
APPLICATION_VERSION_HEADER_NAME = 'adyen-library-version'
"""A requesting client that interacts with Adyen. This class holds the
adyen logic of Adyen HTTP API communication. This is the object that can
maintain its own username, password and hmac.
When these values aren't within this object, the root adyen module
variables will be used.
The public methods and call_api only return AdyenResult objects.
Otherwise raising various validation and communication errors.
Args:
username (str, optional): Username of webservice user
password (str, optional): Password of webservice user
merchant_account (str, optional): Merchant account for requests to be
placed through
platform (str, optional): Defaults "test". The Adyen platform to make
requests against.
hmac (str, optional): Hmac key that is used for signature calculation.
http_timeout (int, optional): The timeout in seconds for HTTP calls,
default 30.
"""
def __init__(
self,
username=None,
password=None,
xapikey=None,
review_payout_username=None,
review_payout_password=None,
store_payout_username=None, store_payout_password=None,
platform="test", merchant_account=None,
merchant_specific_url=None,
hmac=None,
http_force=None,
live_endpoint_prefix=None,
http_timeout=30,
api_bin_lookup_version=None,
api_checkout_version=None,
api_management_version=None,
api_payment_version=None,
api_payout_version=None,
api_recurring_version=None,
api_terminal_version=None,
api_legal_entity_management_version=None,
api_data_protection_version=None,
api_transfers_version=None,
api_stored_value_version=None,
api_balance_platform_version=None,
api_disputes_version=None,
):
self.username = username
self.password = password
self.xapikey = xapikey
self.review_payout_username = review_payout_username
self.review_payout_password = review_payout_password
self.store_payout_username = store_payout_username
self.store_payout_password = store_payout_password
self.platform = platform
self.merchant_specific_url = merchant_specific_url
self.hmac = hmac
self.merchant_account = merchant_account
self.psp_list = []
self.LIB_VERSION = settings.LIB_VERSION
self.USER_AGENT_SUFFIX = settings.LIB_NAME + "/"
self.http_init = False
self.http_force = http_force
self.live_endpoint_prefix = live_endpoint_prefix
self.http_timeout = http_timeout
self.api_bin_lookup_version = api_bin_lookup_version
self.api_checkout_version = api_checkout_version
self.api_management_version = api_management_version
self.api_payment_version = api_payment_version
self.api_payout_version = api_payout_version
self.api_recurring_version = api_recurring_version
self.api_terminal_version = api_terminal_version
self.api_legal_entity_management_version = api_legal_entity_management_version
self.api_data_protection_version = api_data_protection_version
self.api_transfers_version = api_transfers_version
self.api_stored_value_version = api_stored_value_version
self.api_balance_platform_version = api_balance_platform_version
self.api_disputes_version = api_disputes_version
def _determine_api_url(self, platform, endpoint):
if platform == "test":
# Replace live with test in base url is configured with live url by default
return endpoint.replace("-live", "-test")
if "pal-" in endpoint:
if self.live_endpoint_prefix is None:
error_string = "Please set your live suffix. You can set it by running " \
"adyen.client.live_endpoint_prefix = 'Your live suffix'"
raise AdyenEndpointInvalidFormat(error_string)
endpoint = endpoint.replace("https://pal-test.adyen.com/pal/servlet/",
"https://" + self.live_endpoint_prefix + "-pal-live.adyenpayments.com/pal/servlet/")
elif "checkout-" in endpoint:
if self.live_endpoint_prefix is None:
error_string = "Please set your live suffix. You can set it by running " \
"adyen.client.live_endpoint_prefix = 'Your live suffix'"
raise AdyenEndpointInvalidFormat(error_string)
endpoint = endpoint.replace("https://checkout-test.adyen.com/",
"https://" + self.live_endpoint_prefix + "-checkout-live.adyenpayments.com/checkout/")
endpoint = endpoint.replace("-test", "-live")
return endpoint
def _review_payout_username(self, **kwargs):
if 'username' in kwargs:
return kwargs['username']
elif self.review_payout_username:
return self.review_payout_username
errorstring = "Please set your review payout " \
"webservice username. You can do this by running " \
"Adyen.review_payout_username = 'Your payout username'"
raise AdyenInvalidRequestError(errorstring)
def _review_payout_pass(self, **kwargs):
if 'password' in kwargs:
return kwargs["password"]
elif self.review_payout_password:
return self.review_payout_password
errorstring = "Please set your review payout " \
"webservice password. You can do this by running " \
"Adyen.review_payout_password = 'Your payout password"
raise AdyenInvalidRequestError(errorstring)
def _store_payout_username(self, **kwargs):
if 'username' in kwargs:
return kwargs['username']
elif self.store_payout_username:
return self.store_payout_username
errorstring = "Please set your review payout " \
"webservice username. You can do this by running " \
"Adyen.review_payout_username = 'Your payout username'"
raise AdyenInvalidRequestError(errorstring)
def _store_payout_pass(self, **kwargs):
if 'password' in kwargs:
return kwargs["password"]
elif self.store_payout_password:
return self.store_payout_password
errorstring = "Please set your review payout " \
"webservice password. You can do this by running " \
"Adyen.review_payout_password = 'Your payout password"
raise AdyenInvalidRequestError(errorstring)
def _set_credentials(self, service, endpoint, **kwargs):
xapikey = None
username = None
password = None
# username at self object has highest priority. fallback to root module
# and ensure that it is set.
if self.xapikey:
xapikey = self.xapikey
elif 'xapikey' in kwargs:
xapikey = kwargs.pop("xapikey")
if self.username:
username = self.username
elif 'username' in kwargs:
username = kwargs.pop("username")
if service == "Payout":
if any(substring in endpoint for substring in
["store", "submit"]):
username = self._store_payout_username(**kwargs)
else:
username = self._review_payout_username(**kwargs)
if not username and not xapikey:
errorstring = "Please set your webservice username.You can do this by running " \
"Adyen.username = 'Your username'"
raise AdyenInvalidRequestError(errorstring)
# password at self object has highest priority.
# fallback to root module
# and ensure that it is set.
if self.password and not xapikey:
password = self.password
elif 'password' in kwargs:
password = kwargs.pop("password")
if service == "Payout":
if any(substring in endpoint for substring in
["store", "submit"]):
password = self._store_payout_pass(**kwargs)
else:
password = self._review_payout_pass(**kwargs)
if not password and not xapikey:
errorstring = "Please set your webservice password.You can do this by running " \
"Adyen.password = 'Your password'"
raise AdyenInvalidRequestError(errorstring)
# xapikey at self object has highest priority.
# fallback to root module
# and ensure that it is set.
return xapikey, username, password, kwargs
def _set_platform(self, **kwargs):
# platform at self object has highest priority. fallback to root module
# and ensure that it is set to either 'live' or 'test'.
platform = None
if self.platform:
platform = self.platform
elif 'platform' in kwargs:
platform = kwargs.pop('platform')
if not isinstance(platform, str):
errorstring = "'platform' value must be type of string"
raise TypeError(errorstring)
elif platform.lower() not in ['live', 'test']:
errorstring = "'platform' must be the value of 'live' or 'test'"
raise ValueError(errorstring)
return platform
def _set_url_version(self, service, endpoint):
version_lookup = {"binlookup": self.api_bin_lookup_version,
"checkout": self.api_checkout_version,
"management": self.api_management_version,
"payments": self.api_payment_version,
"payouts": self.api_payout_version,
"recurring": self.api_recurring_version,
"terminal": self.api_terminal_version,
"legalEntityManagement": self.api_legal_entity_management_version,
"dataProtection": self.api_data_protection_version,
"transfers": self.api_transfers_version,
"storedValue": self.api_stored_value_version,
"balancePlatform": self.api_balance_platform_version,
"disputes": self.api_disputes_version
}
new_version = f"v{version_lookup[service]}"
endpoint = re.sub(r'\.com/v\d{1,2}', f".com/{new_version}", endpoint)
return endpoint
def call_adyen_api(
self,
request_data,
service,
method,
endpoint,
idempotency_key=None,
**kwargs
):
"""This will call the adyen api. username, password,
and platform are pulled from root module level and or self object.
AdyenResult will be returned on 200 response. Otherwise, an exception
is raised.
Args:
idempotency_key: https://docs.adyen.com/development-resources
/api-idempotency
request_data (dict): The dictionary of the request to place. This
should be in the structure of the Adyen API.
https://docs.adyen.com/api-explorer
service (str): This is the API service to be called.
method (str): This is the method used to send the request to an endpoint.
endpoint (str): The specific endpoint of the API service to be called
Returns:
AdyenResult: The AdyenResult is returned when a request was
successful.
"""
# Initialize http client
if not self.http_init:
self._init_http_client()
# Set credentials
xapikey, username, password, kwargs = self._set_credentials(service, endpoint, **kwargs)
# Set platform
platform = self._set_platform(**kwargs)
message = request_data
# Set version (if not default one)
versions = [self.api_bin_lookup_version,
self.api_checkout_version,
self.api_management_version,
self.api_payment_version,
self.api_payout_version,
self.api_recurring_version,
self.api_terminal_version,
self.api_legal_entity_management_version,
self.api_data_protection_version,
self.api_transfers_version,
self.api_stored_value_version,
self.api_balance_platform_version,
self.api_disputes_version]
if any(versions):
endpoint = self._set_url_version(service, endpoint)
headers = {
self.APPLICATION_INFO_HEADER_NAME: settings.LIB_NAME,
self.APPLICATION_VERSION_HEADER_NAME: settings.LIB_VERSION
}
# Adyen requires this header to be set and uses the combination of
# merchant account and merchant reference to determine uniqueness.
if idempotency_key:
headers[self.IDEMPOTENCY_HEADER_NAME] = idempotency_key
# Additional headers provided via the `header_parameters` keyword argument
# Pass as a keyword argument in the method call.
if 'header_parameters' in kwargs:
headers.update(kwargs['header_parameters'])
kwargs.pop('header_parameters')
url = self._determine_api_url(platform, endpoint)
if 'query_parameters' in kwargs:
url = url + util.get_query(kwargs['query_parameters'])
kwargs.pop('query_parameters')
if xapikey:
raw_response, raw_request, status_code, headers = \
self.http_client.request(method, url, json=request_data,
xapikey=xapikey, headers=headers,
**kwargs)
else:
raw_response, raw_request, status_code, headers = \
self.http_client.request(method, url, json=message, username=username,
password=password,
headers=headers,
**kwargs)
# Creates AdyenResponse if request was successful, raises error if not.
adyen_result = self._handle_response(url, raw_response, raw_request,
status_code, headers)
return adyen_result
def _init_http_client(self):
self.http_client = HTTPClient(
user_agent_suffix=self.USER_AGENT_SUFFIX,
lib_version=self.LIB_VERSION,
force_request=self.http_force,
timeout=self.http_timeout,
)
self.http_init = True
def _handle_response(self, url, raw_response, raw_request,
status_code, headers):
"""This parses the content from raw communication, raising an error if
anything other than 2xx was returned.
Args:
url (str): URL where request was made
raw_response (str): The raw communication sent to Adyen
raw_request (str): The raw response returned by Adyen
status_code (int): The HTTP status code
headers (dict): Key/Value of the headers.
Returns:
AdyenResult: Result object if successful.
"""
try:
response = json_lib.loads(raw_response)
except json_lib.JSONDecodeError:
response = {}
if status_code not in [200, 201, 202, 204]:
self._raise_http_error(url, response, status_code,
headers.get('pspReference'),
raw_request, raw_response,
headers)
else:
psp = self._get_psp(response, headers)
return AdyenResult(message=response, status_code=status_code,
psp=psp, raw_request=raw_request,
raw_response=raw_response)
@staticmethod
def _raise_http_error(url, response_obj, status_code, psp_ref,
raw_request, raw_response, headers):
"""This function handles the non 2xx responses from Adyen, raising an
error that should provide more information.
Args:
url (str): url of the request
response_obj (dict): Dict containing the parsed JSON response from
Adyen
status_code (int): HTTP status code of the request
psp_ref (str): Psp reference of the request attempt
raw_request (str): The raw request placed to Adyen
raw_response (str): The raw response(body) returned by Adyen
headers(dict): headers of the response
Returns:
None: It never returns
"""
if response_obj == {}:
message = raw_response
else:
message = response_obj
error_code = response_obj.get("errorCode")
if status_code == 404:
raise AdyenAPICommunicationError(message, raw_request, raw_response, url, psp_ref, headers, status_code,
error_code)
elif status_code == 400:
raise AdyenAPIValidationError(message, raw_request, raw_response, url, psp_ref, headers, status_code,
error_code)
elif status_code == 401:
raise AdyenAPIAuthenticationError(message, raw_request, raw_response, url, psp_ref, headers, status_code,
error_code)
elif status_code == 403:
raise AdyenAPIInvalidPermission(message, raw_request, raw_response, url, psp_ref, headers, status_code,
error_code)
elif status_code == 422:
raise AdyenAPIUnprocessableEntity(message, raw_request, raw_response, url, psp_ref, headers, status_code,
error_code)
elif status_code == 500:
raise AdyenAPICommunicationError(message, raw_request, raw_response, url, psp_ref, headers, status_code,
error_code)
raise AdyenAPIResponseError(message, raw_request, raw_response, url, psp_ref, headers, status_code,
error_code)
@staticmethod
def _get_psp(response, headers):
psp_ref = response.get('pspReference')
if psp_ref is None:
psp_ref = headers.get('pspReference')
return psp_ref
|
class AdyenClient(object):
def __init__(
self,
username=None,
password=None,
xapikey=None,
review_payout_username=None,
review_payout_password=None,
store_payout_username=None, store_payout_password=None,
platform="test", merchant_account=None,
merchant_specific_url=None,
hmac=None,
http_force=None,
live_endpoint_prefix=None,
http_timeout=30,
api_bin_lookup_version=None,
api_checkout_version=None,
api_management_version=None,
api_payment_version=None,
api_payout_version=None,
api_recurring_version=None,
api_terminal_version=None,
api_legal_entity_management_version=None,
api_data_protection_version=None,
api_transfers_version=None,
api_stored_value_version=None,
api_balance_platform_version=None,
api_disputes_version=None,
):
pass
def _determine_api_url(self, platform, endpoint):
pass
def _review_payout_username(self, **kwargs):
pass
def _review_payout_pass(self, **kwargs):
pass
def _store_payout_username(self, **kwargs):
pass
def _store_payout_pass(self, **kwargs):
pass
def _set_credentials(self, service, endpoint, **kwargs):
pass
def _set_platform(self, **kwargs):
pass
def _set_url_version(self, service, endpoint):
pass
def call_adyen_api(
self,
request_data,
service,
method,
endpoint,
idempotency_key=None,
**kwargs
):
'''This will call the adyen api. username, password,
and platform are pulled from root module level and or self object.
AdyenResult will be returned on 200 response. Otherwise, an exception
is raised.
Args:
idempotency_key: https://docs.adyen.com/development-resources
/api-idempotency
request_data (dict): The dictionary of the request to place. This
should be in the structure of the Adyen API.
https://docs.adyen.com/api-explorer
service (str): This is the API service to be called.
method (str): This is the method used to send the request to an endpoint.
endpoint (str): The specific endpoint of the API service to be called
Returns:
AdyenResult: The AdyenResult is returned when a request was
successful.
'''
pass
def _init_http_client(self):
pass
def _handle_response(self, url, raw_response, raw_request,
status_code, headers):
'''This parses the content from raw communication, raising an error if
anything other than 2xx was returned.
Args:
url (str): URL where request was made
raw_response (str): The raw communication sent to Adyen
raw_request (str): The raw response returned by Adyen
status_code (int): The HTTP status code
headers (dict): Key/Value of the headers.
Returns:
AdyenResult: Result object if successful.
'''
pass
@staticmethod
def _raise_http_error(url, response_obj, status_code, psp_ref,
raw_request, raw_response, headers):
'''This function handles the non 2xx responses from Adyen, raising an
error that should provide more information.
Args:
url (str): url of the request
response_obj (dict): Dict containing the parsed JSON response from
Adyen
status_code (int): HTTP status code of the request
psp_ref (str): Psp reference of the request attempt
raw_request (str): The raw request placed to Adyen
raw_response (str): The raw response(body) returned by Adyen
headers(dict): headers of the response
Returns:
None: It never returns
'''
pass
@staticmethod
def _get_psp(response, headers):
pass
| 17 | 3 | 28 | 2 | 21 | 4 | 4 | 0.27 | 1 | 14 | 10 | 0 | 12 | 32 | 14 | 14 | 430 | 50 | 300 | 115 | 246 | 80 | 172 | 76 | 157 | 13 | 1 | 2 | 59 |
3,103 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/exceptions.py
|
Adyen.exceptions.AdyenAPIUnprocessableEntity
|
class AdyenAPIUnprocessableEntity(AdyenAPIResponseError):
pass
|
class AdyenAPIUnprocessableEntity(AdyenAPIResponseError):
pass
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
3,104 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/exceptions.py
|
Adyen.exceptions.AdyenAPIValidationError
|
class AdyenAPIValidationError(AdyenAPIResponseError):
pass
|
class AdyenAPIValidationError(AdyenAPIResponseError):
pass
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
3,105 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/exceptions.py
|
Adyen.exceptions.AdyenEndpointInvalidFormat
|
class AdyenEndpointInvalidFormat(AdyenError):
pass
|
class AdyenEndpointInvalidFormat(AdyenError):
pass
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
3,106 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/exceptions.py
|
Adyen.exceptions.AdyenError
|
class AdyenError(Exception):
def __init__(self,
message,
raw_request="",
raw_response="",
url="",
psp="",
headers="",
status_code="",
error_code=""):
self.message = message
self.raw_request = raw_request
self.raw_response = raw_response
self.url = url
self.psp = psp
self.headers = headers
self.status_code = status_code
self.error_code = error_code
def __str__(self):
return "{}:{}".format(self.__class__.__name__, self.message)
def debug(self):
return ("class: {}\nmessage: {}\nHTTP status_code:{}\nerror_code:{}\nurl: {}\n"
"request: {}\nresponse: {}\nheaders: {}"
.format(self.__class__.__name__, self.message,
self.status_code, self.error_code, self.url, self.raw_request,
self.raw_response, self.headers))
|
class AdyenError(Exception):
def __init__(self,
message,
raw_request="",
raw_response="",
url="",
psp="",
headers="",
status_code="",
error_code=""):
pass
def __str__(self):
pass
def debug(self):
pass
| 4 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 1 | 0 | 0 | 3 | 3 | 8 | 3 | 13 | 28 | 2 | 26 | 20 | 14 | 0 | 14 | 12 | 10 | 1 | 3 | 0 | 3 |
3,107 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/exceptions.py
|
Adyen.exceptions.AdyenInvalidRequestError
|
class AdyenInvalidRequestError(AdyenError):
pass
|
class AdyenInvalidRequestError(AdyenError):
pass
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
3,108 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/balanceControl.py
|
Adyen.services.balanceControl.AdyenBalanceControlApi
|
class AdyenBalanceControlApi(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(AdyenBalanceControlApi, self).__init__(client=client)
self.service = "balanceControl"
self.baseUrl = "https://pal-test.adyen.com/pal/servlet/BalanceControl/v1"
def balance_transfer(self, request, idempotency_key=None, **kwargs):
"""
Start a balance transfer
"""
endpoint = self.baseUrl + f"/balanceTransfer"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class AdyenBalanceControlApi(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):
pass
def balance_transfer(self, request, idempotency_key=None, **kwargs):
'''
Start a balance transfer
'''
pass
| 3 | 2 | 6 | 0 | 4 | 2 | 1 | 0.78 | 1 | 1 | 0 | 0 | 2 | 2 | 2 | 5 | 19 | 3 | 9 | 7 | 6 | 7 | 9 | 7 | 6 | 1 | 3 | 0 | 2 |
3,109 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/balancePlatform/__init__.py
|
Adyen.services.balancePlatform.AdyenBalancePlatformApi
|
class AdyenBalancePlatformApi(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(AdyenBalancePlatformApi, self).__init__(client=client)
self.account_holders_api = AccountHoldersApi(client=client)
self.balance_accounts_api = BalanceAccountsApi(client=client)
self.bank_account_validation_api = BankAccountValidationApi(client=client)
self.card_orders_api = CardOrdersApi(client=client)
self.grant_accounts_api = GrantAccountsApi(client=client)
self.grant_offers_api = GrantOffersApi(client=client)
self.manage_sca_devices_api = ManageSCADevicesApi(client=client)
self.manage_card_pin_api = ManageCardPINApi(client=client)
self.network_tokens_api = NetworkTokensApi(client=client)
self.payment_instrument_groups_api = PaymentInstrumentGroupsApi(client=client)
self.payment_instruments_api = PaymentInstrumentsApi(client=client)
self.platform_api = PlatformApi(client=client)
self.transaction_rules_api = TransactionRulesApi(client=client)
self.transfer_routes_api = TransferRoutesApi(client=client)
|
class AdyenBalancePlatformApi(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):
pass
| 2 | 1 | 16 | 0 | 16 | 0 | 1 | 0.24 | 1 | 15 | 14 | 0 | 1 | 14 | 1 | 4 | 23 | 2 | 17 | 16 | 15 | 4 | 17 | 16 | 15 | 1 | 3 | 0 | 1 |
3,110 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/balancePlatform/account_holders_api.py
|
Adyen.services.balancePlatform.account_holders_api.AccountHoldersApi
|
class AccountHoldersApi(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(AccountHoldersApi, self).__init__(client=client)
self.service = "balancePlatform"
self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"
def create_account_holder(self, request, idempotency_key=None, **kwargs):
"""
Create an account holder
"""
endpoint = self.baseUrl + f"/accountHolders"
method = "POST"
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)
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)
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)
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)
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)
|
class AccountHoldersApi(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):
pass
def create_account_holder(self, request, idempotency_key=None, **kwargs):
'''
Create an account holder
'''
pass
def get_account_holder(self, id, idempotency_key=None, **kwargs):
'''
Get an account holder
'''
pass
def get_all_balance_accounts_of_account_holder(self, id, idempotency_key=None, **kwargs):
'''
Get all balance accounts of an account holder
'''
pass
def get_all_transaction_rules_for_account_holder(self, id, idempotency_key=None, **kwargs):
'''
Get all transaction rules for an account holder
'''
pass
def get_tax_form(self, id, idempotency_key=None, **kwargs):
'''
Get a tax form
'''
pass
def update_account_holder(self, request, id, idempotency_key=None, **kwargs):
'''
Update an account holder
'''
pass
| 8 | 7 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 7 | 2 | 7 | 10 | 59 | 8 | 29 | 22 | 21 | 22 | 29 | 22 | 21 | 1 | 3 | 0 | 7 |
3,111 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/balancePlatform/balance_accounts_api.py
|
Adyen.services.balancePlatform.balance_accounts_api.BalanceAccountsApi
|
class BalanceAccountsApi(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(BalanceAccountsApi, self).__init__(client=client)
self.service = "balancePlatform"
self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"
def create_balance_account(self, request, idempotency_key=None, **kwargs):
"""
Create a balance account
"""
endpoint = self.baseUrl + f"/balanceAccounts"
method = "POST"
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)
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)
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)
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)
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)
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)
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)
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)
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)
|
class BalanceAccountsApi(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):
pass
def create_balance_account(self, request, idempotency_key=None, **kwargs):
'''
Create a balance account
'''
pass
def create_sweep(self, request, balanceAccountId, idempotency_key=None, **kwargs):
'''
Create a sweep
'''
pass
def delete_sweep(self, balanceAccountId, sweepId, idempotency_key=None, **kwargs):
'''
Delete a sweep
'''
pass
def get_all_sweeps_for_balance_account(self, balanceAccountId, idempotency_key=None, **kwargs):
'''
Get all sweeps for a balance account
'''
pass
def get_all_transaction_rules_for_balance_account(self, id, idempotency_key=None, **kwargs):
'''
Get all transaction rules for a balance account
'''
pass
def get_balance_account(self, id, idempotency_key=None, **kwargs):
'''
Get a balance account
'''
pass
def get_payment_instruments_linked_to_balance_account(self, id, idempotency_key=None, **kwargs):
'''
Get payment instruments linked to a balance account
'''
pass
def get_sweep(self, balanceAccountId, sweepId, idempotency_key=None, **kwargs):
'''
Get a sweep
'''
pass
def update_balance_account(self, request, id, idempotency_key=None, **kwargs):
'''
Update a balance account
'''
pass
def update_sweep(self, request, balanceAccountId, sweepId, idempotency_key=None, **kwargs):
'''
Update a sweep
'''
pass
| 12 | 11 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 11 | 2 | 11 | 14 | 91 | 12 | 45 | 34 | 33 | 34 | 45 | 34 | 33 | 1 | 3 | 0 | 11 |
3,112 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/balancePlatform/bank_account_validation_api.py
|
Adyen.services.balancePlatform.bank_account_validation_api.BankAccountValidationApi
|
class BankAccountValidationApi(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(BankAccountValidationApi, self).__init__(client=client)
self.service = "balancePlatform"
self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"
def validate_bank_account_identification(self, request, idempotency_key=None, **kwargs):
"""
Validate a bank account
"""
endpoint = self.baseUrl + f"/validateBankAccountIdentification"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class BankAccountValidationApi(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):
pass
def validate_bank_account_identification(self, request, idempotency_key=None, **kwargs):
'''
Validate a bank account
'''
pass
| 3 | 2 | 6 | 0 | 4 | 2 | 1 | 0.78 | 1 | 1 | 0 | 0 | 2 | 2 | 2 | 5 | 19 | 3 | 9 | 7 | 6 | 7 | 9 | 7 | 6 | 1 | 3 | 0 | 2 |
3,113 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/balancePlatform/card_orders_api.py
|
Adyen.services.balancePlatform.card_orders_api.CardOrdersApi
|
class CardOrdersApi(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(CardOrdersApi, self).__init__(client=client)
self.service = "balancePlatform"
self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"
def get_card_order_items(self, id, idempotency_key=None, **kwargs):
"""
Get card order items
"""
endpoint = self.baseUrl + f"/cardorders/{id}/items"
method = "GET"
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 + f"/cardorders"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
|
class CardOrdersApi(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):
pass
def get_card_order_items(self, id, idempotency_key=None, **kwargs):
'''
Get card order items
'''
pass
def list_card_orders(self, idempotency_key=None, **kwargs):
'''
Get a list of card orders
'''
pass
| 4 | 3 | 6 | 0 | 4 | 2 | 1 | 0.77 | 1 | 1 | 0 | 0 | 3 | 2 | 3 | 6 | 27 | 4 | 13 | 10 | 9 | 10 | 13 | 10 | 9 | 1 | 3 | 0 | 3 |
3,114 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/__init__.py
|
Adyen.Adyen
|
class Adyen(AdyenBase):
def __init__(self, **kwargs):
self.client = AdyenClient(**kwargs)
self.payment = AdyenPaymentsApi(client=self.client)
self.binlookup = AdyenBinlookupApi(client=self.client)
self.payout = AdyenPayoutsApi(client=self.client)
self.recurring = AdyenRecurringApi(client=self.client)
self.checkout = AdyenCheckoutApi(client=self.client)
self.terminal = AdyenTerminalApi(client=self.client)
self.management = AdyenManagementApi(client=self.client)
self.legalEntityManagement = AdyenLegalEntityManagementApi(client=self.client)
self.dataProtection = AdyenDataProtectionApi(client=self.client)
self.transfers = AdyenTransfersApi(client=self.client)
self.storedValue = AdyenStoredValueApi(client=self.client)
self.balancePlatform = AdyenBalancePlatformApi(client=self.client)
self.disputes = AdyenDisputesApi(client=self.client)
|
class Adyen(AdyenBase):
def __init__(self, **kwargs):
pass
| 2 | 0 | 15 | 0 | 15 | 0 | 1 | 0 | 1 | 14 | 14 | 0 | 1 | 14 | 1 | 3 | 16 | 0 | 16 | 16 | 14 | 0 | 16 | 16 | 14 | 1 | 2 | 0 | 1 |
3,115 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/balancePlatform/manage_card_pin_api.py
|
Adyen.services.balancePlatform.manage_card_pin_api.ManageCardPINApi
|
class ManageCardPINApi(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(ManageCardPINApi, self).__init__(client=client)
self.service = "balancePlatform"
self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"
def change_card_pin(self, request, idempotency_key=None, **kwargs):
"""
Change a card PIN
"""
endpoint = self.baseUrl + f"/pins/change"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def public_key(self, idempotency_key=None, **kwargs):
"""
Get an RSA public key
"""
endpoint = self.baseUrl + f"/publicKey"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def reveal_card_pin(self, request, idempotency_key=None, **kwargs):
"""
Reveal a card PIN
"""
endpoint = self.baseUrl + f"/pins/reveal"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class ManageCardPINApi(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):
pass
def change_card_pin(self, request, idempotency_key=None, **kwargs):
'''
Change a card PIN
'''
pass
def public_key(self, idempotency_key=None, **kwargs):
'''
Get an RSA public key
'''
pass
def reveal_card_pin(self, request, idempotency_key=None, **kwargs):
'''
Reveal a card PIN
'''
pass
| 5 | 4 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 4 | 2 | 4 | 7 | 35 | 5 | 17 | 13 | 12 | 13 | 17 | 13 | 12 | 1 | 3 | 0 | 4 |
3,116 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/balancePlatform/manage_sca_devices_api.py
|
Adyen.services.balancePlatform.manage_sca_devices_api.ManageSCADevicesApi
|
class ManageSCADevicesApi(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(ManageSCADevicesApi, self).__init__(client=client)
self.service = "balancePlatform"
self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"
def complete_association_between_sca_device_and_resource(self, request, deviceId, idempotency_key=None, **kwargs):
"""
Complete an association between an SCA device and a resource
"""
endpoint = self.baseUrl + f"/registeredDevices/{deviceId}/associations"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def complete_registration_of_sca_device(self, request, id, idempotency_key=None, **kwargs):
"""
Complete the registration of an SCA device
"""
endpoint = self.baseUrl + f"/registeredDevices/{id}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def delete_registration_of_sca_device(self, id, idempotency_key=None, **kwargs):
"""
Delete a registration of an SCA device
"""
endpoint = self.baseUrl + f"/registeredDevices/{id}"
method = "DELETE"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def initiate_association_between_sca_device_and_resource(self, request, deviceId, idempotency_key=None, **kwargs):
"""
Initiate an association between an SCA device and a resource
"""
endpoint = self.baseUrl + f"/registeredDevices/{deviceId}/associations"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def initiate_registration_of_sca_device(self, request, idempotency_key=None, **kwargs):
"""
Initiate the registration of an SCA device
"""
endpoint = self.baseUrl + f"/registeredDevices"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def list_registered_sca_devices(self, idempotency_key=None, **kwargs):
"""
Get a list of registered SCA devices
"""
endpoint = self.baseUrl + f"/registeredDevices"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
|
class ManageSCADevicesApi(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):
pass
def complete_association_between_sca_device_and_resource(self, request, deviceId, idempotency_key=None, **kwargs):
'''
Complete an association between an SCA device and a resource
'''
pass
def complete_registration_of_sca_device(self, request, id, idempotency_key=None, **kwargs):
'''
Complete the registration of an SCA device
'''
pass
def delete_registration_of_sca_device(self, id, idempotency_key=None, **kwargs):
'''
Delete a registration of an SCA device
'''
pass
def initiate_association_between_sca_device_and_resource(self, request, deviceId, idempotency_key=None, **kwargs):
'''
Initiate an association between an SCA device and a resource
'''
pass
def initiate_registration_of_sca_device(self, request, idempotency_key=None, **kwargs):
'''
Initiate the registration of an SCA device
'''
pass
def list_registered_sca_devices(self, idempotency_key=None, **kwargs):
'''
Get a list of registered SCA devices
'''
pass
| 8 | 7 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 7 | 2 | 7 | 10 | 59 | 8 | 29 | 22 | 21 | 22 | 29 | 22 | 21 | 1 | 3 | 0 | 7 |
3,117 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/balancePlatform/network_tokens_api.py
|
Adyen.services.balancePlatform.network_tokens_api.NetworkTokensApi
|
class NetworkTokensApi(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(NetworkTokensApi, self).__init__(client=client)
self.service = "balancePlatform"
self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"
def get_network_token(self, networkTokenId, idempotency_key=None, **kwargs):
"""
Get a network token
"""
endpoint = self.baseUrl + f"/networkTokens/{networkTokenId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def update_network_token(self, request, networkTokenId, idempotency_key=None, **kwargs):
"""
Update a network token
"""
endpoint = self.baseUrl + f"/networkTokens/{networkTokenId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class NetworkTokensApi(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):
pass
def get_network_token(self, networkTokenId, idempotency_key=None, **kwargs):
'''
Get a network token
'''
pass
def update_network_token(self, request, networkTokenId, idempotency_key=None, **kwargs):
'''
Update a network token
'''
pass
| 4 | 3 | 6 | 0 | 4 | 2 | 1 | 0.77 | 1 | 1 | 0 | 0 | 3 | 2 | 3 | 6 | 27 | 4 | 13 | 10 | 9 | 10 | 13 | 10 | 9 | 1 | 3 | 0 | 3 |
3,118 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/balancePlatform/payment_instrument_groups_api.py
|
Adyen.services.balancePlatform.payment_instrument_groups_api.PaymentInstrumentGroupsApi
|
class PaymentInstrumentGroupsApi(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(PaymentInstrumentGroupsApi, self).__init__(client=client)
self.service = "balancePlatform"
self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"
def create_payment_instrument_group(self, request, idempotency_key=None, **kwargs):
"""
Create a payment instrument group
"""
endpoint = self.baseUrl + f"/paymentInstrumentGroups"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_all_transaction_rules_for_payment_instrument_group(self, id, idempotency_key=None, **kwargs):
"""
Get all transaction rules for a payment instrument group
"""
endpoint = self.baseUrl + f"/paymentInstrumentGroups/{id}/transactionRules"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_payment_instrument_group(self, id, idempotency_key=None, **kwargs):
"""
Get a payment instrument group
"""
endpoint = self.baseUrl + f"/paymentInstrumentGroups/{id}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
|
class PaymentInstrumentGroupsApi(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):
pass
def create_payment_instrument_group(self, request, idempotency_key=None, **kwargs):
'''
Create a payment instrument group
'''
pass
def get_all_transaction_rules_for_payment_instrument_group(self, id, idempotency_key=None, **kwargs):
'''
Get all transaction rules for a payment instrument group
'''
pass
def get_payment_instrument_group(self, id, idempotency_key=None, **kwargs):
'''
Get a payment instrument group
'''
pass
| 5 | 4 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 4 | 2 | 4 | 7 | 35 | 5 | 17 | 13 | 12 | 13 | 17 | 13 | 12 | 1 | 3 | 0 | 4 |
3,119 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/balancePlatform/payment_instruments_api.py
|
Adyen.services.balancePlatform.payment_instruments_api.PaymentInstrumentsApi
|
class PaymentInstrumentsApi(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(PaymentInstrumentsApi, self).__init__(client=client)
self.service = "balancePlatform"
self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"
def create_payment_instrument(self, request, idempotency_key=None, **kwargs):
"""
Create a payment instrument
"""
endpoint = self.baseUrl + f"/paymentInstruments"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_all_transaction_rules_for_payment_instrument(self, id, idempotency_key=None, **kwargs):
"""
Get all transaction rules for a payment instrument
"""
endpoint = self.baseUrl + f"/paymentInstruments/{id}/transactionRules"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_pan_of_payment_instrument(self, id, idempotency_key=None, **kwargs):
"""
Get the PAN of a payment instrument
"""
endpoint = self.baseUrl + f"/paymentInstruments/{id}/reveal"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_payment_instrument(self, id, idempotency_key=None, **kwargs):
"""
Get a payment instrument
"""
endpoint = self.baseUrl + f"/paymentInstruments/{id}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_network_tokens(self, id, idempotency_key=None, **kwargs):
"""
List network tokens
"""
endpoint = self.baseUrl + f"/paymentInstruments/{id}/networkTokens"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def reveal_data_of_payment_instrument(self, request, idempotency_key=None, **kwargs):
"""
Reveal the data of a payment instrument
"""
endpoint = self.baseUrl + f"/paymentInstruments/reveal"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def update_payment_instrument(self, request, id, idempotency_key=None, **kwargs):
"""
Update a payment instrument
"""
endpoint = self.baseUrl + f"/paymentInstruments/{id}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class PaymentInstrumentsApi(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):
pass
def create_payment_instrument(self, request, idempotency_key=None, **kwargs):
'''
Create a payment instrument
'''
pass
def get_all_transaction_rules_for_payment_instrument(self, id, idempotency_key=None, **kwargs):
'''
Get all transaction rules for a payment instrument
'''
pass
def get_pan_of_payment_instrument(self, id, idempotency_key=None, **kwargs):
'''
Get the PAN of a payment instrument
'''
pass
def get_payment_instrument(self, id, idempotency_key=None, **kwargs):
'''
Get a payment instrument
'''
pass
def list_network_tokens(self, id, idempotency_key=None, **kwargs):
'''
List network tokens
'''
pass
def reveal_data_of_payment_instrument(self, request, idempotency_key=None, **kwargs):
'''
Reveal the data of a payment instrument
'''
pass
def update_payment_instrument(self, request, id, idempotency_key=None, **kwargs):
'''
Update a payment instrument
'''
pass
| 9 | 8 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 8 | 2 | 8 | 11 | 67 | 9 | 33 | 25 | 24 | 25 | 33 | 25 | 24 | 1 | 3 | 0 | 8 |
3,120 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/balancePlatform/platform_api.py
|
Adyen.services.balancePlatform.platform_api.PlatformApi
|
class PlatformApi(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(PlatformApi, self).__init__(client=client)
self.service = "balancePlatform"
self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"
def get_all_account_holders_under_balance_platform(self, id, idempotency_key=None, **kwargs):
"""
Get all account holders under a balance platform
"""
endpoint = self.baseUrl + f"/balancePlatforms/{id}/accountHolders"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_all_transaction_rules_for_balance_platform(self, id, idempotency_key=None, **kwargs):
"""
Get all transaction rules for a balance platform
"""
endpoint = self.baseUrl + f"/balancePlatforms/{id}/transactionRules"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_balance_platform(self, id, idempotency_key=None, **kwargs):
"""
Get a balance platform
"""
endpoint = self.baseUrl + f"/balancePlatforms/{id}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
|
class PlatformApi(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):
pass
def get_all_account_holders_under_balance_platform(self, id, idempotency_key=None, **kwargs):
'''
Get all account holders under a balance platform
'''
pass
def get_all_transaction_rules_for_balance_platform(self, id, idempotency_key=None, **kwargs):
'''
Get all transaction rules for a balance platform
'''
pass
def get_balance_platform(self, id, idempotency_key=None, **kwargs):
'''
Get a balance platform
'''
pass
| 5 | 4 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 4 | 2 | 4 | 7 | 35 | 5 | 17 | 13 | 12 | 13 | 17 | 13 | 12 | 1 | 3 | 0 | 4 |
3,121 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/balancePlatform/transaction_rules_api.py
|
Adyen.services.balancePlatform.transaction_rules_api.TransactionRulesApi
|
class TransactionRulesApi(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(TransactionRulesApi, self).__init__(client=client)
self.service = "balancePlatform"
self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"
def create_transaction_rule(self, request, idempotency_key=None, **kwargs):
"""
Create a transaction rule
"""
endpoint = self.baseUrl + f"/transactionRules"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def delete_transaction_rule(self, transactionRuleId, idempotency_key=None, **kwargs):
"""
Delete a transaction rule
"""
endpoint = self.baseUrl + f"/transactionRules/{transactionRuleId}"
method = "DELETE"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_transaction_rule(self, transactionRuleId, idempotency_key=None, **kwargs):
"""
Get a transaction rule
"""
endpoint = self.baseUrl + f"/transactionRules/{transactionRuleId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def update_transaction_rule(self, request, transactionRuleId, idempotency_key=None, **kwargs):
"""
Update a transaction rule
"""
endpoint = self.baseUrl + f"/transactionRules/{transactionRuleId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class TransactionRulesApi(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):
pass
def create_transaction_rule(self, request, idempotency_key=None, **kwargs):
'''
Create a transaction rule
'''
pass
def delete_transaction_rule(self, transactionRuleId, idempotency_key=None, **kwargs):
'''
Delete a transaction rule
'''
pass
def get_transaction_rule(self, transactionRuleId, idempotency_key=None, **kwargs):
'''
Get a transaction rule
'''
pass
def update_transaction_rule(self, request, transactionRuleId, idempotency_key=None, **kwargs):
'''
Update a transaction rule
'''
pass
| 6 | 5 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 5 | 2 | 5 | 8 | 43 | 6 | 21 | 16 | 15 | 16 | 21 | 16 | 15 | 1 | 3 | 0 | 5 |
3,122 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/legalEntityManagement/documents_api.py
|
Adyen.services.legalEntityManagement.documents_api.DocumentsApi
|
class DocumentsApi(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(DocumentsApi, self).__init__(client=client)
self.service = "legalEntityManagement"
self.baseUrl = "https://kyc-test.adyen.com/lem/v3"
def delete_document(self, id, idempotency_key=None, **kwargs):
"""
Delete a document
"""
endpoint = self.baseUrl + f"/documents/{id}"
method = "DELETE"
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)
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)
def upload_document_for_verification_checks(self, request, idempotency_key=None, **kwargs):
"""
Upload a document for verification checks
"""
endpoint = self.baseUrl + f"/documents"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class DocumentsApi(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):
pass
def delete_document(self, id, idempotency_key=None, **kwargs):
'''
Delete a document
'''
pass
def get_document(self, id, idempotency_key=None, **kwargs):
'''
Get a document
'''
pass
def update_document(self, request, id, idempotency_key=None, **kwargs):
'''
Update a document
'''
pass
def upload_document_for_verification_checks(self, request, idempotency_key=None, **kwargs):
'''
Upload a document for verification checks
'''
pass
| 6 | 5 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 5 | 2 | 5 | 8 | 43 | 6 | 21 | 16 | 15 | 16 | 21 | 16 | 15 | 1 | 3 | 0 | 5 |
3,123 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/legalEntityManagement/hosted_onboarding_api.py
|
Adyen.services.legalEntityManagement.hosted_onboarding_api.HostedOnboardingApi
|
class HostedOnboardingApi(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(HostedOnboardingApi, self).__init__(client=client)
self.service = "legalEntityManagement"
self.baseUrl = "https://kyc-test.adyen.com/lem/v3"
def get_link_to_adyenhosted_onboarding_page(self, request, id, idempotency_key=None, **kwargs):
"""
Get a link to an Adyen-hosted onboarding page
"""
endpoint = self.baseUrl + f"/legalEntities/{id}/onboardingLinks"
method = "POST"
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)
def list_hosted_onboarding_page_themes(self, idempotency_key=None, **kwargs):
"""
Get a list of hosted onboarding page themes
"""
endpoint = self.baseUrl + f"/themes"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
|
class HostedOnboardingApi(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):
pass
def get_link_to_adyenhosted_onboarding_page(self, request, id, idempotency_key=None, **kwargs):
'''
Get a link to an Adyen-hosted onboarding page
'''
pass
def get_onboarding_link_theme(self, id, idempotency_key=None, **kwargs):
'''
Get an onboarding link theme
'''
pass
def list_hosted_onboarding_page_themes(self, idempotency_key=None, **kwargs):
'''
Get a list of hosted onboarding page themes
'''
pass
| 5 | 4 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 4 | 2 | 4 | 7 | 35 | 5 | 17 | 13 | 12 | 13 | 17 | 13 | 12 | 1 | 3 | 0 | 4 |
3,124 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/legalEntityManagement/pci_questionnaires_api.py
|
Adyen.services.legalEntityManagement.pci_questionnaires_api.PCIQuestionnairesApi
|
class PCIQuestionnairesApi(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(PCIQuestionnairesApi, self).__init__(client=client)
self.service = "legalEntityManagement"
self.baseUrl = "https://kyc-test.adyen.com/lem/v3"
def calculate_pci_status_of_legal_entity(self, request, id, idempotency_key=None, **kwargs):
"""
Calculate PCI status of a legal entity
"""
endpoint = self.baseUrl + f"/legalEntities/{id}/pciQuestionnaires/signingRequired"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def generate_pci_questionnaire(self, request, id, idempotency_key=None, **kwargs):
"""
Generate PCI questionnaire
"""
endpoint = self.baseUrl + f"/legalEntities/{id}/pciQuestionnaires/generatePciTemplates"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_pci_questionnaire(self, id, pciid, idempotency_key=None, **kwargs):
"""
Get PCI questionnaire
"""
endpoint = self.baseUrl + f"/legalEntities/{id}/pciQuestionnaires/{pciid}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_pci_questionnaire_details(self, id, idempotency_key=None, **kwargs):
"""
Get PCI questionnaire details
"""
endpoint = self.baseUrl + f"/legalEntities/{id}/pciQuestionnaires"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def sign_pci_questionnaire(self, request, id, idempotency_key=None, **kwargs):
"""
Sign PCI questionnaire
"""
endpoint = self.baseUrl + f"/legalEntities/{id}/pciQuestionnaires/signPciTemplates"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class PCIQuestionnairesApi(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):
pass
def calculate_pci_status_of_legal_entity(self, request, id, idempotency_key=None, **kwargs):
'''
Calculate PCI status of a legal entity
'''
pass
def generate_pci_questionnaire(self, request, id, idempotency_key=None, **kwargs):
'''
Generate PCI questionnaire
'''
pass
def get_pci_questionnaire(self, id, pciid, idempotency_key=None, **kwargs):
'''
Get PCI questionnaire
'''
pass
def get_pci_questionnaire_details(self, id, idempotency_key=None, **kwargs):
'''
Get PCI questionnaire details
'''
pass
def sign_pci_questionnaire(self, request, id, idempotency_key=None, **kwargs):
'''
Sign PCI questionnaire
'''
pass
| 7 | 6 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 6 | 2 | 6 | 9 | 51 | 7 | 25 | 19 | 18 | 19 | 25 | 19 | 18 | 1 | 3 | 0 | 6 |
3,125 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/payouts/reviewing_api.py
|
Adyen.services.payouts.reviewing_api.ReviewingApi
|
class ReviewingApi(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(ReviewingApi, self).__init__(client=client)
self.service = "payouts"
self.baseUrl = "https://pal-test.adyen.com/pal/servlet/Payout/v68"
def confirm_third_party(self, request, idempotency_key=None, **kwargs):
"""
Confirm a payout
"""
endpoint = self.baseUrl + f"/confirmThirdParty"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def decline_third_party(self, request, idempotency_key=None, **kwargs):
"""
Cancel a payout
"""
endpoint = self.baseUrl + f"/declineThirdParty"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class ReviewingApi(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):
pass
def confirm_third_party(self, request, idempotency_key=None, **kwargs):
'''
Confirm a payout
'''
pass
def decline_third_party(self, request, idempotency_key=None, **kwargs):
'''
Cancel a payout
'''
pass
| 4 | 3 | 6 | 0 | 4 | 2 | 1 | 0.77 | 1 | 1 | 0 | 0 | 3 | 2 | 3 | 6 | 27 | 4 | 13 | 10 | 9 | 10 | 13 | 10 | 9 | 1 | 3 | 0 | 3 |
3,126 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/payouts/instant_payouts_api.py
|
Adyen.services.payouts.instant_payouts_api.InstantPayoutsApi
|
class InstantPayoutsApi(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(InstantPayoutsApi, self).__init__(client=client)
self.service = "payouts"
self.baseUrl = "https://pal-test.adyen.com/pal/servlet/Payout/v68"
def payout(self, request, idempotency_key=None, **kwargs):
"""
Make an instant card payout
"""
endpoint = self.baseUrl + f"/payout"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class InstantPayoutsApi(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):
pass
def payout(self, request, idempotency_key=None, **kwargs):
'''
Make an instant card payout
'''
pass
| 3 | 2 | 6 | 0 | 4 | 2 | 1 | 0.78 | 1 | 1 | 0 | 0 | 2 | 2 | 2 | 5 | 19 | 3 | 9 | 7 | 6 | 7 | 9 | 7 | 6 | 1 | 3 | 0 | 2 |
3,127 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/payouts/initialization_api.py
|
Adyen.services.payouts.initialization_api.InitializationApi
|
class InitializationApi(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(InitializationApi, self).__init__(client=client)
self.service = "payouts"
self.baseUrl = "https://pal-test.adyen.com/pal/servlet/Payout/v68"
def store_detail(self, request, idempotency_key=None, **kwargs):
"""
Store payout details
"""
endpoint = self.baseUrl + f"/storeDetail"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def store_detail_and_submit_third_party(self, request, idempotency_key=None, **kwargs):
"""
Store details and submit a payout
"""
endpoint = self.baseUrl + f"/storeDetailAndSubmitThirdParty"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def submit_third_party(self, request, idempotency_key=None, **kwargs):
"""
Submit a payout
"""
endpoint = self.baseUrl + f"/submitThirdParty"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class InitializationApi(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):
pass
def store_detail(self, request, idempotency_key=None, **kwargs):
'''
Store payout details
'''
pass
def store_detail_and_submit_third_party(self, request, idempotency_key=None, **kwargs):
'''
Store details and submit a payout
'''
pass
def submit_third_party(self, request, idempotency_key=None, **kwargs):
'''
Submit a payout
'''
pass
| 5 | 4 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 4 | 2 | 4 | 7 | 35 | 5 | 17 | 13 | 12 | 13 | 17 | 13 | 12 | 1 | 3 | 0 | 4 |
3,128 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/payouts/__init__.py
|
Adyen.services.payouts.AdyenPayoutsApi
|
class AdyenPayoutsApi(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(AdyenPayoutsApi, self).__init__(client=client)
self.initialization_api = InitializationApi(client=client)
self.instant_payouts_api = InstantPayoutsApi(client=client)
self.reviewing_api = ReviewingApi(client=client)
|
class AdyenPayoutsApi(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):
pass
| 2 | 1 | 5 | 0 | 5 | 0 | 1 | 0.67 | 1 | 4 | 3 | 0 | 1 | 3 | 1 | 4 | 12 | 2 | 6 | 5 | 4 | 4 | 6 | 5 | 4 | 1 | 3 | 0 | 1 |
3,129 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/paymentsApp/payments_app_api.py
|
Adyen.services.paymentsApp.payments_app_api.PaymentsAppApi
|
class PaymentsAppApi(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(PaymentsAppApi, self).__init__(client=client)
self.service = "paymentsApp"
self.baseUrl = "https://management-live.adyen.com/v1"
def generate_payments_app_boarding_token_for_merchant(self, request, merchantId, boardingTokenRequest, idempotency_key=None, **kwargs):
"""
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)
def generate_payments_app_boarding_token_for_store(self, request, merchantId, storeId, boardingTokenRequest, idempotency_key=None, **kwargs):
"""
Create a boarding token - store level
"""
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)
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)
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)
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)
|
class PaymentsAppApi(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):
pass
def generate_payments_app_boarding_token_for_merchant(self, request, merchantId, boardingTokenRequest, idempotency_key=None, **kwargs):
'''
Create a boarding token - merchant level
'''
pass
def generate_payments_app_boarding_token_for_store(self, request, merchantId, storeId, boardingTokenRequest, idempotency_key=None, **kwargs):
'''
Create a boarding token - store level
'''
pass
def list_payments_app_for_merchant(self, merchantId, idempotency_key=None, **kwargs):
'''
Get a list of Payments Apps - merchant level
'''
pass
def list_payments_app_for_store(self, merchantId, storeId, idempotency_key=None, **kwargs):
'''
Get a list of Payments Apps - store level
'''
pass
def revoke_payments_app(self, merchantId, installationId, idempotency_key=None, **kwargs):
'''
Revoke Payments App instance authentication
'''
pass
| 7 | 6 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 6 | 2 | 6 | 9 | 51 | 7 | 25 | 19 | 18 | 19 | 25 | 19 | 18 | 1 | 3 | 0 | 6 |
3,130 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/paymentsApp/__init__.py
|
Adyen.services.paymentsApp.AdyenPaymentsAppApi
|
class AdyenPaymentsAppApi(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(AdyenPaymentsAppApi, self).__init__(client=client)
self.payments_app_api = PaymentsAppApi(client=client)
|
class AdyenPaymentsAppApi(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):
pass
| 2 | 1 | 3 | 0 | 3 | 0 | 1 | 1 | 1 | 2 | 1 | 0 | 1 | 1 | 1 | 4 | 10 | 2 | 4 | 3 | 2 | 4 | 4 | 3 | 2 | 1 | 3 | 0 | 1 |
3,131 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/payments/payments_api.py
|
Adyen.services.payments.payments_api.PaymentsApi
|
class PaymentsApi(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(PaymentsApi, self).__init__(client=client)
self.service = "payments"
self.baseUrl = "https://pal-test.adyen.com/pal/servlet/Payment/v68"
def authorise(self, request, idempotency_key=None, **kwargs):
"""
Create an authorisation
"""
endpoint = self.baseUrl + f"/authorise"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def authorise3d(self, request, idempotency_key=None, **kwargs):
"""
Complete a 3DS authorisation
"""
endpoint = self.baseUrl + f"/authorise3d"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def authorise3ds2(self, request, idempotency_key=None, **kwargs):
"""
Complete a 3DS2 authorisation
"""
endpoint = self.baseUrl + f"/authorise3ds2"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_authentication_result(self, request, idempotency_key=None, **kwargs):
"""
Get the 3DS authentication result
"""
endpoint = self.baseUrl + f"/getAuthenticationResult"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def retrieve3ds2_result(self, request, idempotency_key=None, **kwargs):
"""
Get the 3DS2 authentication result
"""
endpoint = self.baseUrl + f"/retrieve3ds2Result"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class PaymentsApi(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):
pass
def authorise(self, request, idempotency_key=None, **kwargs):
'''
Create an authorisation
'''
pass
def authorise3d(self, request, idempotency_key=None, **kwargs):
'''
Complete a 3DS authorisation
'''
pass
def authorise3ds2(self, request, idempotency_key=None, **kwargs):
'''
Complete a 3DS2 authorisation
'''
pass
def get_authentication_result(self, request, idempotency_key=None, **kwargs):
'''
Get the 3DS authentication result
'''
pass
def retrieve3ds2_result(self, request, idempotency_key=None, **kwargs):
'''
Get the 3DS2 authentication result
'''
pass
| 7 | 6 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 6 | 2 | 6 | 9 | 51 | 7 | 25 | 19 | 18 | 19 | 25 | 19 | 18 | 1 | 3 | 0 | 6 |
3,132 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/payments/modifications_api.py
|
Adyen.services.payments.modifications_api.ModificationsApi
|
class ModificationsApi(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(ModificationsApi, self).__init__(client=client)
self.service = "payments"
self.baseUrl = "https://pal-test.adyen.com/pal/servlet/Payment/v68"
def adjust_authorisation(self, request, idempotency_key=None, **kwargs):
"""
Change the authorised amount
"""
endpoint = self.baseUrl + f"/adjustAuthorisation"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def cancel(self, request, idempotency_key=None, **kwargs):
"""
Cancel an authorisation
"""
endpoint = self.baseUrl + f"/cancel"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def cancel_or_refund(self, request, idempotency_key=None, **kwargs):
"""
Cancel or refund a payment
"""
endpoint = self.baseUrl + f"/cancelOrRefund"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def capture(self, request, idempotency_key=None, **kwargs):
"""
Capture an authorisation
"""
endpoint = self.baseUrl + f"/capture"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def donate(self, request, idempotency_key=None, **kwargs):
"""
Create a donation
Deprecated
"""
endpoint = self.baseUrl + f"/donate"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def refund(self, request, idempotency_key=None, **kwargs):
"""
Refund a captured payment
"""
endpoint = self.baseUrl + f"/refund"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def technical_cancel(self, request, idempotency_key=None, **kwargs):
"""
Cancel an authorisation using your reference
"""
endpoint = self.baseUrl + f"/technicalCancel"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def void_pending_refund(self, request, idempotency_key=None, **kwargs):
"""
Cancel an in-person refund
"""
endpoint = self.baseUrl + f"/voidPendingRefund"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class ModificationsApi(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):
pass
def adjust_authorisation(self, request, idempotency_key=None, **kwargs):
'''
Change the authorised amount
'''
pass
def cancel(self, request, idempotency_key=None, **kwargs):
'''
Cancel an authorisation
'''
pass
def cancel_or_refund(self, request, idempotency_key=None, **kwargs):
'''
Cancel or refund a payment
'''
pass
def capture(self, request, idempotency_key=None, **kwargs):
'''
Capture an authorisation
'''
pass
def donate(self, request, idempotency_key=None, **kwargs):
'''
Create a donation
Deprecated
'''
pass
def refund(self, request, idempotency_key=None, **kwargs):
'''
Refund a captured payment
'''
pass
def technical_cancel(self, request, idempotency_key=None, **kwargs):
'''
Cancel an authorisation using your reference
'''
pass
def void_pending_refund(self, request, idempotency_key=None, **kwargs):
'''
Cancel an in-person refund
'''
pass
| 10 | 9 | 7 | 0 | 4 | 3 | 1 | 0.78 | 1 | 1 | 0 | 0 | 9 | 2 | 9 | 12 | 77 | 11 | 37 | 28 | 27 | 29 | 37 | 28 | 27 | 1 | 3 | 0 | 9 |
3,133 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/payments/__init__.py
|
Adyen.services.payments.AdyenPaymentsApi
|
class AdyenPaymentsApi(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(AdyenPaymentsApi, self).__init__(client=client)
self.modifications_api = ModificationsApi(client=client)
self.payments_api = PaymentsApi(client=client)
|
class AdyenPaymentsApi(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):
pass
| 2 | 1 | 4 | 0 | 4 | 0 | 1 | 0.8 | 1 | 3 | 2 | 0 | 1 | 2 | 1 | 4 | 11 | 2 | 5 | 4 | 3 | 4 | 5 | 4 | 3 | 1 | 3 | 0 | 1 |
3,134 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/webhooks_merchant_level_api.py
|
Adyen.services.management.webhooks_merchant_level_api.WebhooksMerchantLevelApi
|
class WebhooksMerchantLevelApi(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(WebhooksMerchantLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def generate_hmac_key(self, merchantId, webhookId, idempotency_key=None, **kwargs):
"""
Generate an HMAC key
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/webhooks/{webhookId}/generateHmac"
method = "POST"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_webhook(self, merchantId, webhookId, idempotency_key=None, **kwargs):
"""
Get a webhook
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/webhooks/{webhookId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_all_webhooks(self, merchantId, idempotency_key=None, **kwargs):
"""
List all webhooks
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/webhooks"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def remove_webhook(self, merchantId, webhookId, idempotency_key=None, **kwargs):
"""
Remove a webhook
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/webhooks/{webhookId}"
method = "DELETE"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def set_up_webhook(self, request, merchantId, idempotency_key=None, **kwargs):
"""
Set up a webhook
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/webhooks"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def test_webhook(self, request, merchantId, webhookId, idempotency_key=None, **kwargs):
"""
Test a webhook
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/webhooks/{webhookId}/test"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def update_webhook(self, request, merchantId, webhookId, idempotency_key=None, **kwargs):
"""
Update a webhook
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/webhooks/{webhookId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class WebhooksMerchantLevelApi(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):
pass
def generate_hmac_key(self, merchantId, webhookId, idempotency_key=None, **kwargs):
'''
Generate an HMAC key
'''
pass
def get_webhook(self, merchantId, webhookId, idempotency_key=None, **kwargs):
'''
Get a webhook
'''
pass
def list_all_webhooks(self, merchantId, idempotency_key=None, **kwargs):
'''
List all webhooks
'''
pass
def remove_webhook(self, merchantId, webhookId, idempotency_key=None, **kwargs):
'''
Remove a webhook
'''
pass
def set_up_webhook(self, request, merchantId, idempotency_key=None, **kwargs):
'''
Set up a webhook
'''
pass
def test_webhook(self, request, merchantId, webhookId, idempotency_key=None, **kwargs):
'''
Test a webhook
'''
pass
def update_webhook(self, request, merchantId, webhookId, idempotency_key=None, **kwargs):
'''
Update a webhook
'''
pass
| 9 | 8 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 8 | 2 | 8 | 11 | 67 | 9 | 33 | 25 | 24 | 25 | 33 | 25 | 24 | 1 | 3 | 0 | 8 |
3,135 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/webhooks_company_level_api.py
|
Adyen.services.management.webhooks_company_level_api.WebhooksCompanyLevelApi
|
class WebhooksCompanyLevelApi(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(WebhooksCompanyLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def generate_hmac_key(self, companyId, webhookId, idempotency_key=None, **kwargs):
"""
Generate an HMAC key
"""
endpoint = self.baseUrl + f"/companies/{companyId}/webhooks/{webhookId}/generateHmac"
method = "POST"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_webhook(self, companyId, webhookId, idempotency_key=None, **kwargs):
"""
Get a webhook
"""
endpoint = self.baseUrl + f"/companies/{companyId}/webhooks/{webhookId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_all_webhooks(self, companyId, idempotency_key=None, **kwargs):
"""
List all webhooks
"""
endpoint = self.baseUrl + f"/companies/{companyId}/webhooks"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def remove_webhook(self, companyId, webhookId, idempotency_key=None, **kwargs):
"""
Remove a webhook
"""
endpoint = self.baseUrl + f"/companies/{companyId}/webhooks/{webhookId}"
method = "DELETE"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def set_up_webhook(self, request, companyId, idempotency_key=None, **kwargs):
"""
Set up a webhook
"""
endpoint = self.baseUrl + f"/companies/{companyId}/webhooks"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def test_webhook(self, request, companyId, webhookId, idempotency_key=None, **kwargs):
"""
Test a webhook
"""
endpoint = self.baseUrl + f"/companies/{companyId}/webhooks/{webhookId}/test"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def update_webhook(self, request, companyId, webhookId, idempotency_key=None, **kwargs):
"""
Update a webhook
"""
endpoint = self.baseUrl + f"/companies/{companyId}/webhooks/{webhookId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class WebhooksCompanyLevelApi(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):
pass
def generate_hmac_key(self, companyId, webhookId, idempotency_key=None, **kwargs):
'''
Generate an HMAC key
'''
pass
def get_webhook(self, companyId, webhookId, idempotency_key=None, **kwargs):
'''
Get a webhook
'''
pass
def list_all_webhooks(self, companyId, idempotency_key=None, **kwargs):
'''
List all webhooks
'''
pass
def remove_webhook(self, companyId, webhookId, idempotency_key=None, **kwargs):
'''
Remove a webhook
'''
pass
def set_up_webhook(self, request, companyId, idempotency_key=None, **kwargs):
'''
Set up a webhook
'''
pass
def test_webhook(self, request, companyId, webhookId, idempotency_key=None, **kwargs):
'''
Test a webhook
'''
pass
def update_webhook(self, request, companyId, webhookId, idempotency_key=None, **kwargs):
'''
Update a webhook
'''
pass
| 9 | 8 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 8 | 2 | 8 | 11 | 67 | 9 | 33 | 25 | 24 | 25 | 33 | 25 | 24 | 1 | 3 | 0 | 8 |
3,136 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/users_merchant_level_api.py
|
Adyen.services.management.users_merchant_level_api.UsersMerchantLevelApi
|
class UsersMerchantLevelApi(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(UsersMerchantLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def create_new_user(self, request, merchantId, idempotency_key=None, **kwargs):
"""
Create a new user
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/users"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_user_details(self, merchantId, userId, idempotency_key=None, **kwargs):
"""
Get user details
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/users/{userId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_users(self, merchantId, idempotency_key=None, **kwargs):
"""
Get a list of users
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/users"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def update_user(self, request, merchantId, userId, idempotency_key=None, **kwargs):
"""
Update a user
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/users/{userId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class UsersMerchantLevelApi(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):
pass
def create_new_user(self, request, merchantId, idempotency_key=None, **kwargs):
'''
Create a new user
'''
pass
def get_user_details(self, merchantId, userId, idempotency_key=None, **kwargs):
'''
Get user details
'''
pass
def list_users(self, merchantId, idempotency_key=None, **kwargs):
'''
Get a list of users
'''
pass
def update_user(self, request, merchantId, userId, idempotency_key=None, **kwargs):
'''
Update a user
'''
pass
| 6 | 5 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 5 | 2 | 5 | 8 | 43 | 6 | 21 | 16 | 15 | 16 | 21 | 16 | 15 | 1 | 3 | 0 | 5 |
3,137 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/users_company_level_api.py
|
Adyen.services.management.users_company_level_api.UsersCompanyLevelApi
|
class UsersCompanyLevelApi(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(UsersCompanyLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def create_new_user(self, request, companyId, idempotency_key=None, **kwargs):
"""
Create a new user
"""
endpoint = self.baseUrl + f"/companies/{companyId}/users"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_user_details(self, companyId, userId, idempotency_key=None, **kwargs):
"""
Get user details
"""
endpoint = self.baseUrl + f"/companies/{companyId}/users/{userId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_users(self, companyId, idempotency_key=None, **kwargs):
"""
Get a list of users
"""
endpoint = self.baseUrl + f"/companies/{companyId}/users"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def update_user_details(self, request, companyId, userId, idempotency_key=None, **kwargs):
"""
Update user details
"""
endpoint = self.baseUrl + f"/companies/{companyId}/users/{userId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class UsersCompanyLevelApi(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):
pass
def create_new_user(self, request, companyId, idempotency_key=None, **kwargs):
'''
Create a new user
'''
pass
def get_user_details(self, companyId, userId, idempotency_key=None, **kwargs):
'''
Get user details
'''
pass
def list_users(self, companyId, idempotency_key=None, **kwargs):
'''
Get a list of users
'''
pass
def update_user_details(self, request, companyId, userId, idempotency_key=None, **kwargs):
'''
Update user details
'''
pass
| 6 | 5 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 5 | 2 | 5 | 8 | 43 | 6 | 21 | 16 | 15 | 16 | 21 | 16 | 15 | 1 | 3 | 0 | 5 |
3,138 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/terminals_terminal_level_api.py
|
Adyen.services.management.terminals_terminal_level_api.TerminalsTerminalLevelApi
|
class TerminalsTerminalLevelApi(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(TerminalsTerminalLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def list_terminals(self, idempotency_key=None, **kwargs):
"""
Get a list of terminals
"""
endpoint = self.baseUrl + f"/terminals"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def reassign_terminal(self, request, terminalId, idempotency_key=None, **kwargs):
"""
Reassign a terminal
"""
endpoint = self.baseUrl + f"/terminals/{terminalId}/reassign"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class TerminalsTerminalLevelApi(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):
pass
def list_terminals(self, idempotency_key=None, **kwargs):
'''
Get a list of terminals
'''
pass
def reassign_terminal(self, request, terminalId, idempotency_key=None, **kwargs):
'''
Reassign a terminal
'''
pass
| 4 | 3 | 6 | 0 | 4 | 2 | 1 | 0.77 | 1 | 1 | 0 | 0 | 3 | 2 | 3 | 6 | 27 | 4 | 13 | 10 | 9 | 10 | 13 | 10 | 9 | 1 | 3 | 0 | 3 |
3,139 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/posMobile.py
|
Adyen.services.posMobile.AdyenPosMobileApi
|
class AdyenPosMobileApi(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(AdyenPosMobileApi, self).__init__(client=client)
self.service = "posMobile"
self.baseUrl = "https://checkout-test.adyen.com/checkout/possdk/v68"
def create_communication_session(self, request, idempotency_key=None, **kwargs):
"""
Create a communication session
"""
endpoint = self.baseUrl + f"/sessions"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class AdyenPosMobileApi(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):
pass
def create_communication_session(self, request, idempotency_key=None, **kwargs):
'''
Create a communication session
'''
pass
| 3 | 2 | 6 | 0 | 4 | 2 | 1 | 0.78 | 1 | 1 | 0 | 0 | 2 | 2 | 2 | 5 | 19 | 3 | 9 | 7 | 6 | 7 | 9 | 7 | 6 | 1 | 3 | 0 | 2 |
3,140 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/terminal_settings_terminal_level_api.py
|
Adyen.services.management.terminal_settings_terminal_level_api.TerminalSettingsTerminalLevelApi
|
class TerminalSettingsTerminalLevelApi(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(TerminalSettingsTerminalLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def get_terminal_logo(self, terminalId, idempotency_key=None, **kwargs):
"""
Get the terminal logo
"""
endpoint = self.baseUrl + f"/terminals/{terminalId}/terminalLogos"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_terminal_settings(self, terminalId, idempotency_key=None, **kwargs):
"""
Get terminal settings
"""
endpoint = self.baseUrl + f"/terminals/{terminalId}/terminalSettings"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def update_logo(self, request, terminalId, idempotency_key=None, **kwargs):
"""
Update the logo
"""
endpoint = self.baseUrl + f"/terminals/{terminalId}/terminalLogos"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def update_terminal_settings(self, request, terminalId, idempotency_key=None, **kwargs):
"""
Update terminal settings
"""
endpoint = self.baseUrl + f"/terminals/{terminalId}/terminalSettings"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class TerminalSettingsTerminalLevelApi(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):
pass
def get_terminal_logo(self, terminalId, idempotency_key=None, **kwargs):
'''
Get the terminal logo
'''
pass
def get_terminal_settings(self, terminalId, idempotency_key=None, **kwargs):
'''
Get terminal settings
'''
pass
def update_logo(self, request, terminalId, idempotency_key=None, **kwargs):
'''
Update the logo
'''
pass
def update_terminal_settings(self, request, terminalId, idempotency_key=None, **kwargs):
'''
Update terminal settings
'''
pass
| 6 | 5 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 5 | 2 | 5 | 8 | 43 | 6 | 21 | 16 | 15 | 16 | 21 | 16 | 15 | 1 | 3 | 0 | 5 |
3,141 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/terminal_settings_merchant_level_api.py
|
Adyen.services.management.terminal_settings_merchant_level_api.TerminalSettingsMerchantLevelApi
|
class TerminalSettingsMerchantLevelApi(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(TerminalSettingsMerchantLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def get_terminal_logo(self, merchantId, idempotency_key=None, **kwargs):
"""
Get the terminal logo
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/terminalLogos"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_terminal_settings(self, merchantId, idempotency_key=None, **kwargs):
"""
Get terminal settings
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/terminalSettings"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def update_terminal_logo(self, request, merchantId, idempotency_key=None, **kwargs):
"""
Update the terminal logo
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/terminalLogos"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def update_terminal_settings(self, request, merchantId, idempotency_key=None, **kwargs):
"""
Update terminal settings
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/terminalSettings"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class TerminalSettingsMerchantLevelApi(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):
pass
def get_terminal_logo(self, merchantId, idempotency_key=None, **kwargs):
'''
Get the terminal logo
'''
pass
def get_terminal_settings(self, merchantId, idempotency_key=None, **kwargs):
'''
Get terminal settings
'''
pass
def update_terminal_logo(self, request, merchantId, idempotency_key=None, **kwargs):
'''
Update the terminal logo
'''
pass
def update_terminal_settings(self, request, merchantId, idempotency_key=None, **kwargs):
'''
Update terminal settings
'''
pass
| 6 | 5 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 5 | 2 | 5 | 8 | 43 | 6 | 21 | 16 | 15 | 16 | 21 | 16 | 15 | 1 | 3 | 0 | 5 |
3,142 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/terminal_settings_company_level_api.py
|
Adyen.services.management.terminal_settings_company_level_api.TerminalSettingsCompanyLevelApi
|
class TerminalSettingsCompanyLevelApi(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(TerminalSettingsCompanyLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def get_terminal_logo(self, companyId, idempotency_key=None, **kwargs):
"""
Get the terminal logo
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalLogos"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_terminal_settings(self, companyId, idempotency_key=None, **kwargs):
"""
Get terminal settings
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalSettings"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def update_terminal_logo(self, request, companyId, idempotency_key=None, **kwargs):
"""
Update the terminal logo
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalLogos"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def update_terminal_settings(self, request, companyId, idempotency_key=None, **kwargs):
"""
Update terminal settings
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalSettings"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class TerminalSettingsCompanyLevelApi(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):
pass
def get_terminal_logo(self, companyId, idempotency_key=None, **kwargs):
'''
Get the terminal logo
'''
pass
def get_terminal_settings(self, companyId, idempotency_key=None, **kwargs):
'''
Get terminal settings
'''
pass
def update_terminal_logo(self, request, companyId, idempotency_key=None, **kwargs):
'''
Update the terminal logo
'''
pass
def update_terminal_settings(self, request, companyId, idempotency_key=None, **kwargs):
'''
Update terminal settings
'''
pass
| 6 | 5 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 5 | 2 | 5 | 8 | 43 | 6 | 21 | 16 | 15 | 16 | 21 | 16 | 15 | 1 | 3 | 0 | 5 |
3,143 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/terminal_orders_merchant_level_api.py
|
Adyen.services.management.terminal_orders_merchant_level_api.TerminalOrdersMerchantLevelApi
|
class TerminalOrdersMerchantLevelApi(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(TerminalOrdersMerchantLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def cancel_order(self, merchantId, orderId, idempotency_key=None, **kwargs):
"""
Cancel an order
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/terminalOrders/{orderId}/cancel"
method = "POST"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def create_order(self, request, merchantId, idempotency_key=None, **kwargs):
"""
Create an order
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/terminalOrders"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def create_shipping_location(self, request, merchantId, idempotency_key=None, **kwargs):
"""
Create a shipping location
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/shippingLocations"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_order(self, merchantId, orderId, idempotency_key=None, **kwargs):
"""
Get an order
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/terminalOrders/{orderId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_billing_entities(self, merchantId, idempotency_key=None, **kwargs):
"""
Get a list of billing entities
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/billingEntities"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_orders(self, merchantId, idempotency_key=None, **kwargs):
"""
Get a list of orders
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/terminalOrders"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_shipping_locations(self, merchantId, idempotency_key=None, **kwargs):
"""
Get a list of shipping locations
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/shippingLocations"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_terminal_models(self, merchantId, idempotency_key=None, **kwargs):
"""
Get a list of terminal models
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/terminalModels"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_terminal_products(self, merchantId, idempotency_key=None, **kwargs):
"""
Get a list of terminal products
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/terminalProducts"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def update_order(self, request, merchantId, orderId, idempotency_key=None, **kwargs):
"""
Update an order
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/terminalOrders/{orderId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class TerminalOrdersMerchantLevelApi(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):
pass
def cancel_order(self, merchantId, orderId, idempotency_key=None, **kwargs):
'''
Cancel an order
'''
pass
def create_order(self, request, merchantId, idempotency_key=None, **kwargs):
'''
Create an order
'''
pass
def create_shipping_location(self, request, merchantId, idempotency_key=None, **kwargs):
'''
Create a shipping location
'''
pass
def get_order(self, merchantId, orderId, idempotency_key=None, **kwargs):
'''
Get an order
'''
pass
def list_billing_entities(self, merchantId, idempotency_key=None, **kwargs):
'''
Get a list of billing entities
'''
pass
def list_orders(self, merchantId, idempotency_key=None, **kwargs):
'''
Get a list of orders
'''
pass
def list_shipping_locations(self, merchantId, idempotency_key=None, **kwargs):
'''
Get a list of shipping locations
'''
pass
def list_terminal_models(self, merchantId, idempotency_key=None, **kwargs):
'''
Get a list of terminal models
'''
pass
def list_terminal_products(self, merchantId, idempotency_key=None, **kwargs):
'''
Get a list of terminal products
'''
pass
def update_order(self, request, merchantId, orderId, idempotency_key=None, **kwargs):
'''
Update an order
'''
pass
| 12 | 11 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 11 | 2 | 11 | 14 | 91 | 12 | 45 | 34 | 33 | 34 | 45 | 34 | 33 | 1 | 3 | 0 | 11 |
3,144 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/terminal_orders_company_level_api.py
|
Adyen.services.management.terminal_orders_company_level_api.TerminalOrdersCompanyLevelApi
|
class TerminalOrdersCompanyLevelApi(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(TerminalOrdersCompanyLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def cancel_order(self, companyId, orderId, idempotency_key=None, **kwargs):
"""
Cancel an order
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalOrders/{orderId}/cancel"
method = "POST"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def create_order(self, request, companyId, idempotency_key=None, **kwargs):
"""
Create an order
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalOrders"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def create_shipping_location(self, request, companyId, idempotency_key=None, **kwargs):
"""
Create a shipping location
"""
endpoint = self.baseUrl + f"/companies/{companyId}/shippingLocations"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_order(self, companyId, orderId, idempotency_key=None, **kwargs):
"""
Get an order
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalOrders/{orderId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_billing_entities(self, companyId, idempotency_key=None, **kwargs):
"""
Get a list of billing entities
"""
endpoint = self.baseUrl + f"/companies/{companyId}/billingEntities"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_orders(self, companyId, idempotency_key=None, **kwargs):
"""
Get a list of orders
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalOrders"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_shipping_locations(self, companyId, idempotency_key=None, **kwargs):
"""
Get a list of shipping locations
"""
endpoint = self.baseUrl + f"/companies/{companyId}/shippingLocations"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_terminal_models(self, companyId, idempotency_key=None, **kwargs):
"""
Get a list of terminal models
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalModels"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_terminal_products(self, companyId, idempotency_key=None, **kwargs):
"""
Get a list of terminal products
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalProducts"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def update_order(self, request, companyId, orderId, idempotency_key=None, **kwargs):
"""
Update an order
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalOrders/{orderId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class TerminalOrdersCompanyLevelApi(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):
pass
def cancel_order(self, companyId, orderId, idempotency_key=None, **kwargs):
'''
Cancel an order
'''
pass
def create_order(self, request, companyId, idempotency_key=None, **kwargs):
'''
Create an order
'''
pass
def create_shipping_location(self, request, companyId, idempotency_key=None, **kwargs):
'''
Create a shipping location
'''
pass
def get_order(self, companyId, orderId, idempotency_key=None, **kwargs):
'''
Get an order
'''
pass
def list_billing_entities(self, companyId, idempotency_key=None, **kwargs):
'''
Get a list of billing entities
'''
pass
def list_orders(self, companyId, idempotency_key=None, **kwargs):
'''
Get a list of orders
'''
pass
def list_shipping_locations(self, companyId, idempotency_key=None, **kwargs):
'''
Get a list of shipping locations
'''
pass
def list_terminal_models(self, companyId, idempotency_key=None, **kwargs):
'''
Get a list of terminal models
'''
pass
def list_terminal_products(self, companyId, idempotency_key=None, **kwargs):
'''
Get a list of terminal products
'''
pass
def update_order(self, request, companyId, orderId, idempotency_key=None, **kwargs):
'''
Update an order
'''
pass
| 12 | 11 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 11 | 2 | 11 | 14 | 91 | 12 | 45 | 34 | 33 | 34 | 45 | 34 | 33 | 1 | 3 | 0 | 11 |
3,145 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/terminal_actions_terminal_level_api.py
|
Adyen.services.management.terminal_actions_terminal_level_api.TerminalActionsTerminalLevelApi
|
class TerminalActionsTerminalLevelApi(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(TerminalActionsTerminalLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def create_terminal_action(self, request, idempotency_key=None, **kwargs):
"""
Create a terminal action
"""
endpoint = self.baseUrl + f"/terminals/scheduleActions"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class TerminalActionsTerminalLevelApi(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):
pass
def create_terminal_action(self, request, idempotency_key=None, **kwargs):
'''
Create a terminal action
'''
pass
| 3 | 2 | 6 | 0 | 4 | 2 | 1 | 0.78 | 1 | 1 | 0 | 0 | 2 | 2 | 2 | 5 | 19 | 3 | 9 | 7 | 6 | 7 | 9 | 7 | 6 | 1 | 3 | 0 | 2 |
3,146 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/terminal_actions_company_level_api.py
|
Adyen.services.management.terminal_actions_company_level_api.TerminalActionsCompanyLevelApi
|
class TerminalActionsCompanyLevelApi(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(TerminalActionsCompanyLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def get_terminal_action(self, companyId, actionId, idempotency_key=None, **kwargs):
"""
Get terminal action
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalActions/{actionId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_terminal_actions(self, companyId, idempotency_key=None, **kwargs):
"""
Get a list of terminal actions
"""
endpoint = self.baseUrl + f"/companies/{companyId}/terminalActions"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
|
class TerminalActionsCompanyLevelApi(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):
pass
def get_terminal_action(self, companyId, actionId, idempotency_key=None, **kwargs):
'''
Get terminal action
'''
pass
def list_terminal_actions(self, companyId, idempotency_key=None, **kwargs):
'''
Get a list of terminal actions
'''
pass
| 4 | 3 | 6 | 0 | 4 | 2 | 1 | 0.77 | 1 | 1 | 0 | 0 | 3 | 2 | 3 | 6 | 27 | 4 | 13 | 10 | 9 | 10 | 13 | 10 | 9 | 1 | 3 | 0 | 3 |
3,147 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/payout_settings_merchant_level_api.py
|
Adyen.services.management.payout_settings_merchant_level_api.PayoutSettingsMerchantLevelApi
|
class PayoutSettingsMerchantLevelApi(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(PayoutSettingsMerchantLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def add_payout_setting(self, request, merchantId, idempotency_key=None, **kwargs):
"""
Add a payout setting
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/payoutSettings"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def delete_payout_setting(self, merchantId, payoutSettingsId, idempotency_key=None, **kwargs):
"""
Delete a payout setting
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"
method = "DELETE"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_payout_setting(self, merchantId, payoutSettingsId, idempotency_key=None, **kwargs):
"""
Get a payout setting
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_payout_settings(self, merchantId, idempotency_key=None, **kwargs):
"""
Get a list of payout settings
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/payoutSettings"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def update_payout_setting(self, request, merchantId, payoutSettingsId, idempotency_key=None, **kwargs):
"""
Update a payout setting
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class PayoutSettingsMerchantLevelApi(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):
pass
def add_payout_setting(self, request, merchantId, idempotency_key=None, **kwargs):
'''
Add a payout setting
'''
pass
def delete_payout_setting(self, merchantId, payoutSettingsId, idempotency_key=None, **kwargs):
'''
Delete a payout setting
'''
pass
def get_payout_setting(self, merchantId, payoutSettingsId, idempotency_key=None, **kwargs):
'''
Get a payout setting
'''
pass
def list_payout_settings(self, merchantId, idempotency_key=None, **kwargs):
'''
Get a list of payout settings
'''
pass
def update_payout_setting(self, request, merchantId, payoutSettingsId, idempotency_key=None, **kwargs):
'''
Update a payout setting
'''
pass
| 7 | 6 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 6 | 2 | 6 | 9 | 51 | 7 | 25 | 19 | 18 | 19 | 25 | 19 | 18 | 1 | 3 | 0 | 6 |
3,148 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/payment_methods_merchant_level_api.py
|
Adyen.services.management.payment_methods_merchant_level_api.PaymentMethodsMerchantLevelApi
|
class PaymentMethodsMerchantLevelApi(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(PaymentMethodsMerchantLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def add_apple_pay_domain(self, request, merchantId, paymentMethodId, idempotency_key=None, **kwargs):
"""
Add an Apple Pay domain
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_all_payment_methods(self, merchantId, idempotency_key=None, **kwargs):
"""
Get all payment methods
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/paymentMethodSettings"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_apple_pay_domains(self, merchantId, paymentMethodId, idempotency_key=None, **kwargs):
"""
Get Apple Pay domains
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/getApplePayDomains"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_payment_method_details(self, merchantId, paymentMethodId, idempotency_key=None, **kwargs):
"""
Get payment method details
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def request_payment_method(self, request, merchantId, idempotency_key=None, **kwargs):
"""
Request a payment method
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/paymentMethodSettings"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def update_payment_method(self, request, merchantId, paymentMethodId, idempotency_key=None, **kwargs):
"""
Update a payment method
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class PaymentMethodsMerchantLevelApi(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):
pass
def add_apple_pay_domain(self, request, merchantId, paymentMethodId, idempotency_key=None, **kwargs):
'''
Add an Apple Pay domain
'''
pass
def get_all_payment_methods(self, merchantId, idempotency_key=None, **kwargs):
'''
Get all payment methods
'''
pass
def get_apple_pay_domains(self, merchantId, paymentMethodId, idempotency_key=None, **kwargs):
'''
Get Apple Pay domains
'''
pass
def get_payment_method_details(self, merchantId, paymentMethodId, idempotency_key=None, **kwargs):
'''
Get payment method details
'''
pass
def request_payment_method(self, request, merchantId, idempotency_key=None, **kwargs):
'''
Request a payment method
'''
pass
def update_payment_method(self, request, merchantId, paymentMethodId, idempotency_key=None, **kwargs):
'''
Update a payment method
'''
pass
| 8 | 7 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 7 | 2 | 7 | 10 | 59 | 8 | 29 | 22 | 21 | 22 | 29 | 22 | 21 | 1 | 3 | 0 | 7 |
3,149 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/my_api_credential_api.py
|
Adyen.services.management.my_api_credential_api.MyAPICredentialApi
|
class MyAPICredentialApi(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(MyAPICredentialApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def add_allowed_origin(self, request, idempotency_key=None, **kwargs):
"""
Add allowed origin
"""
endpoint = self.baseUrl + f"/me/allowedOrigins"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def generate_client_key(self, idempotency_key=None, **kwargs):
"""
Generate a client key
"""
endpoint = self.baseUrl + f"/me/generateClientKey"
method = "POST"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_allowed_origin_details(self, originId, idempotency_key=None, **kwargs):
"""
Get allowed origin details
"""
endpoint = self.baseUrl + f"/me/allowedOrigins/{originId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_allowed_origins(self, idempotency_key=None, **kwargs):
"""
Get allowed origins
"""
endpoint = self.baseUrl + f"/me/allowedOrigins"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_api_credential_details(self, idempotency_key=None, **kwargs):
"""
Get API credential details
"""
endpoint = self.baseUrl + f"/me"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def remove_allowed_origin(self, originId, idempotency_key=None, **kwargs):
"""
Remove allowed origin
"""
endpoint = self.baseUrl + f"/me/allowedOrigins/{originId}"
method = "DELETE"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
|
class MyAPICredentialApi(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):
pass
def add_allowed_origin(self, request, idempotency_key=None, **kwargs):
'''
Add allowed origin
'''
pass
def generate_client_key(self, idempotency_key=None, **kwargs):
'''
Generate a client key
'''
pass
def get_allowed_origin_details(self, originId, idempotency_key=None, **kwargs):
'''
Get allowed origin details
'''
pass
def get_allowed_origins(self, idempotency_key=None, **kwargs):
'''
Get allowed origins
'''
pass
def get_api_credential_details(self, idempotency_key=None, **kwargs):
'''
Get API credential details
'''
pass
def remove_allowed_origin(self, originId, idempotency_key=None, **kwargs):
'''
Remove allowed origin
'''
pass
| 8 | 7 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 7 | 2 | 7 | 10 | 59 | 8 | 29 | 22 | 21 | 22 | 29 | 22 | 21 | 1 | 3 | 0 | 7 |
3,150 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/client_key_merchant_level_api.py
|
Adyen.services.management.client_key_merchant_level_api.ClientKeyMerchantLevelApi
|
class ClientKeyMerchantLevelApi(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(ClientKeyMerchantLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def generate_new_client_key(self, merchantId, apiCredentialId, idempotency_key=None, **kwargs):
"""
Generate new client key
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/generateClientKey"
method = "POST"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
|
class ClientKeyMerchantLevelApi(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):
pass
def generate_new_client_key(self, merchantId, apiCredentialId, idempotency_key=None, **kwargs):
'''
Generate new client key
'''
pass
| 3 | 2 | 6 | 0 | 4 | 2 | 1 | 0.78 | 1 | 1 | 0 | 0 | 2 | 2 | 2 | 5 | 19 | 3 | 9 | 7 | 6 | 7 | 9 | 7 | 6 | 1 | 3 | 0 | 2 |
3,151 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/client_key_company_level_api.py
|
Adyen.services.management.client_key_company_level_api.ClientKeyCompanyLevelApi
|
class ClientKeyCompanyLevelApi(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(ClientKeyCompanyLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def generate_new_client_key(self, companyId, apiCredentialId, idempotency_key=None, **kwargs):
"""
Generate new client key
"""
endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/generateClientKey"
method = "POST"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
|
class ClientKeyCompanyLevelApi(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):
pass
def generate_new_client_key(self, companyId, apiCredentialId, idempotency_key=None, **kwargs):
'''
Generate new client key
'''
pass
| 3 | 2 | 6 | 0 | 4 | 2 | 1 | 0.78 | 1 | 1 | 0 | 0 | 2 | 2 | 2 | 5 | 19 | 3 | 9 | 7 | 6 | 7 | 9 | 7 | 6 | 1 | 3 | 0 | 2 |
3,152 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/api_key_merchant_level_api.py
|
Adyen.services.management.api_key_merchant_level_api.APIKeyMerchantLevelApi
|
class APIKeyMerchantLevelApi(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(APIKeyMerchantLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def generate_new_api_key(self, merchantId, apiCredentialId, idempotency_key=None, **kwargs):
"""
Generate new API key
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/generateApiKey"
method = "POST"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
|
class APIKeyMerchantLevelApi(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):
pass
def generate_new_api_key(self, merchantId, apiCredentialId, idempotency_key=None, **kwargs):
'''
Generate new API key
'''
pass
| 3 | 2 | 6 | 0 | 4 | 2 | 1 | 0.78 | 1 | 1 | 0 | 0 | 2 | 2 | 2 | 5 | 19 | 3 | 9 | 7 | 6 | 7 | 9 | 7 | 6 | 1 | 3 | 0 | 2 |
3,153 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/api_key_company_level_api.py
|
Adyen.services.management.api_key_company_level_api.APIKeyCompanyLevelApi
|
class APIKeyCompanyLevelApi(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(APIKeyCompanyLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def generate_new_api_key(self, companyId, apiCredentialId, idempotency_key=None, **kwargs):
"""
Generate new API key
"""
endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/generateApiKey"
method = "POST"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
|
class APIKeyCompanyLevelApi(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):
pass
def generate_new_api_key(self, companyId, apiCredentialId, idempotency_key=None, **kwargs):
'''
Generate new API key
'''
pass
| 3 | 2 | 6 | 0 | 4 | 2 | 1 | 0.78 | 1 | 1 | 0 | 0 | 2 | 2 | 2 | 5 | 19 | 3 | 9 | 7 | 6 | 7 | 9 | 7 | 6 | 1 | 3 | 0 | 2 |
3,154 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/api_credentials_merchant_level_api.py
|
Adyen.services.management.api_credentials_merchant_level_api.APICredentialsMerchantLevelApi
|
class APICredentialsMerchantLevelApi(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(APICredentialsMerchantLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def create_api_credential(self, request, merchantId, idempotency_key=None, **kwargs):
"""
Create an API credential
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_api_credential(self, merchantId, apiCredentialId, idempotency_key=None, **kwargs):
"""
Get an API credential
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_api_credentials(self, merchantId, idempotency_key=None, **kwargs):
"""
Get a list of API credentials
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def update_api_credential(self, request, merchantId, apiCredentialId, idempotency_key=None, **kwargs):
"""
Update an API credential
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class APICredentialsMerchantLevelApi(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):
pass
def create_api_credential(self, request, merchantId, idempotency_key=None, **kwargs):
'''
Create an API credential
'''
pass
def get_api_credential(self, merchantId, apiCredentialId, idempotency_key=None, **kwargs):
'''
Get an API credential
'''
pass
def list_api_credentials(self, merchantId, idempotency_key=None, **kwargs):
'''
Get a list of API credentials
'''
pass
def update_api_credential(self, request, merchantId, apiCredentialId, idempotency_key=None, **kwargs):
'''
Update an API credential
'''
pass
| 6 | 5 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 5 | 2 | 5 | 8 | 43 | 6 | 21 | 16 | 15 | 16 | 21 | 16 | 15 | 1 | 3 | 0 | 5 |
3,155 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/terminal_settings_store_level_api.py
|
Adyen.services.management.terminal_settings_store_level_api.TerminalSettingsStoreLevelApi
|
class TerminalSettingsStoreLevelApi(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(TerminalSettingsStoreLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def get_terminal_logo(self, merchantId, reference, idempotency_key=None, **kwargs):
"""
Get the terminal logo
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/stores/{reference}/terminalLogos"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_terminal_logo_by_store_id(self, storeId, idempotency_key=None, **kwargs):
"""
Get the terminal logo
"""
endpoint = self.baseUrl + f"/stores/{storeId}/terminalLogos"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_terminal_settings(self, merchantId, reference, idempotency_key=None, **kwargs):
"""
Get terminal settings
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/stores/{reference}/terminalSettings"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_terminal_settings_by_store_id(self, storeId, idempotency_key=None, **kwargs):
"""
Get terminal settings
"""
endpoint = self.baseUrl + f"/stores/{storeId}/terminalSettings"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def update_terminal_logo(self, request, merchantId, reference, idempotency_key=None, **kwargs):
"""
Update the terminal logo
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/stores/{reference}/terminalLogos"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def update_terminal_logo_by_store_id(self, request, storeId, idempotency_key=None, **kwargs):
"""
Update the terminal logo
"""
endpoint = self.baseUrl + f"/stores/{storeId}/terminalLogos"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def update_terminal_settings(self, request, merchantId, reference, idempotency_key=None, **kwargs):
"""
Update terminal settings
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/stores/{reference}/terminalSettings"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def update_terminal_settings_by_store_id(self, request, storeId, idempotency_key=None, **kwargs):
"""
Update terminal settings
"""
endpoint = self.baseUrl + f"/stores/{storeId}/terminalSettings"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class TerminalSettingsStoreLevelApi(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):
pass
def get_terminal_logo(self, merchantId, reference, idempotency_key=None, **kwargs):
'''
Get the terminal logo
'''
pass
def get_terminal_logo_by_store_id(self, storeId, idempotency_key=None, **kwargs):
'''
Get the terminal logo
'''
pass
def get_terminal_settings(self, merchantId, reference, idempotency_key=None, **kwargs):
'''
Get terminal settings
'''
pass
def get_terminal_settings_by_store_id(self, storeId, idempotency_key=None, **kwargs):
'''
Get terminal settings
'''
pass
def update_terminal_logo(self, request, merchantId, reference, idempotency_key=None, **kwargs):
'''
Update the terminal logo
'''
pass
def update_terminal_logo_by_store_id(self, request, storeId, idempotency_key=None, **kwargs):
'''
Update the terminal logo
'''
pass
def update_terminal_settings(self, request, merchantId, reference, idempotency_key=None, **kwargs):
'''
Update terminal settings
'''
pass
def update_terminal_settings_by_store_id(self, request, storeId, idempotency_key=None, **kwargs):
'''
Update terminal settings
'''
pass
| 10 | 9 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 9 | 2 | 9 | 12 | 75 | 10 | 37 | 28 | 27 | 28 | 37 | 28 | 27 | 1 | 3 | 0 | 9 |
3,156 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/recurring.py
|
Adyen.services.recurring.AdyenRecurringApi
|
class AdyenRecurringApi(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(AdyenRecurringApi, self).__init__(client=client)
self.service = "recurring"
self.baseUrl = "https://pal-test.adyen.com/pal/servlet/Recurring/v68"
def create_permit(self, request, idempotency_key=None, **kwargs):
"""
Create new permits linked to a recurring contract.
"""
endpoint = self.baseUrl + f"/createPermit"
method = "POST"
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 + f"/disable"
method = "POST"
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.
"""
endpoint = self.baseUrl + f"/disablePermit"
method = "POST"
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 + f"/listRecurringDetails"
method = "POST"
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 + f"/notifyShopper"
method = "POST"
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 + f"/scheduleAccountUpdater"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class AdyenRecurringApi(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):
pass
def create_permit(self, request, idempotency_key=None, **kwargs):
'''
Create new permits linked to a recurring contract.
'''
pass
def disable(self, request, idempotency_key=None, **kwargs):
'''
Disable stored payment details
'''
pass
def disable_permit(self, request, idempotency_key=None, **kwargs):
'''
Disable an existing permit.
'''
pass
def list_recurring_details(self, request, idempotency_key=None, **kwargs):
'''
Get stored payment details
'''
pass
def notify_shopper(self, request, idempotency_key=None, **kwargs):
'''
Ask issuer to notify the shopper
'''
pass
def schedule_account_updater(self, request, idempotency_key=None, **kwargs):
'''
Schedule running the Account Updater
'''
pass
| 8 | 7 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 7 | 2 | 7 | 10 | 59 | 8 | 29 | 22 | 21 | 22 | 29 | 22 | 21 | 1 | 3 | 0 | 7 |
3,157 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/storedValue.py
|
Adyen.services.storedValue.AdyenStoredValueApi
|
class AdyenStoredValueApi(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(AdyenStoredValueApi, self).__init__(client=client)
self.service = "storedValue"
self.baseUrl = "https://pal-test.adyen.com/pal/servlet/StoredValue/v46"
def change_status(self, request, idempotency_key=None, **kwargs):
"""
Changes the status of the payment method.
"""
endpoint = self.baseUrl + f"/changeStatus"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def check_balance(self, request, idempotency_key=None, **kwargs):
"""
Checks the balance.
"""
endpoint = self.baseUrl + f"/checkBalance"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def issue(self, request, idempotency_key=None, **kwargs):
"""
Issues a new card.
"""
endpoint = self.baseUrl + f"/issue"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def load(self, request, idempotency_key=None, **kwargs):
"""
Loads the payment method.
"""
endpoint = self.baseUrl + f"/load"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def merge_balance(self, request, idempotency_key=None, **kwargs):
"""
Merge the balance of two cards.
"""
endpoint = self.baseUrl + f"/mergeBalance"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def void_transaction(self, request, idempotency_key=None, **kwargs):
"""
Voids a transaction.
"""
endpoint = self.baseUrl + f"/voidTransaction"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class AdyenStoredValueApi(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):
pass
def change_status(self, request, idempotency_key=None, **kwargs):
'''
Changes the status of the payment method.
'''
pass
def check_balance(self, request, idempotency_key=None, **kwargs):
'''
Checks the balance.
'''
pass
def issue(self, request, idempotency_key=None, **kwargs):
'''
Issues a new card.
'''
pass
def load(self, request, idempotency_key=None, **kwargs):
'''
Loads the payment method.
'''
pass
def merge_balance(self, request, idempotency_key=None, **kwargs):
'''
Merge the balance of two cards.
'''
pass
def void_transaction(self, request, idempotency_key=None, **kwargs):
'''
Voids a transaction.
'''
pass
| 8 | 7 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 7 | 2 | 7 | 10 | 59 | 8 | 29 | 22 | 21 | 22 | 29 | 22 | 21 | 1 | 3 | 0 | 7 |
3,158 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/terminal.py
|
Adyen.services.terminal.AdyenTerminalApi
|
class AdyenTerminalApi(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(AdyenTerminalApi, self).__init__(client=client)
self.service = "terminal"
self.baseUrl = "https://postfmapi-test.adyen.com/postfmapi/terminal/v1"
def assign_terminals(self, request, idempotency_key=None, **kwargs):
"""
Assign terminals
Deprecated since POS Terminal Management API v1
Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).
"""
endpoint = self.baseUrl + f"/assignTerminals"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def find_terminal(self, request, idempotency_key=None, **kwargs):
"""
Get the account or store of a terminal
Deprecated since POS Terminal Management API v1
Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).
"""
endpoint = self.baseUrl + f"/findTerminal"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_stores_under_account(self, request, idempotency_key=None, **kwargs):
"""
Get the stores of an account
Deprecated since POS Terminal Management API v1
Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).
"""
endpoint = self.baseUrl + f"/getStoresUnderAccount"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_terminal_details(self, request, idempotency_key=None, **kwargs):
"""
Get the details of a terminal
Deprecated since POS Terminal Management API v1
Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).
"""
endpoint = self.baseUrl + f"/getTerminalDetails"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_terminals_under_account(self, request, idempotency_key=None, **kwargs):
"""
Get the list of terminals
Deprecated since POS Terminal Management API v1
Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).
"""
endpoint = self.baseUrl + f"/getTerminalsUnderAccount"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class AdyenTerminalApi(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):
pass
def assign_terminals(self, request, idempotency_key=None, **kwargs):
'''
Assign terminals
Deprecated since POS Terminal Management API v1
Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).
'''
pass
def find_terminal(self, request, idempotency_key=None, **kwargs):
'''
Get the account or store of a terminal
Deprecated since POS Terminal Management API v1
Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).
'''
pass
def get_stores_under_account(self, request, idempotency_key=None, **kwargs):
'''
Get the stores of an account
Deprecated since POS Terminal Management API v1
Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).
'''
pass
def get_terminal_details(self, request, idempotency_key=None, **kwargs):
'''
Get the details of a terminal
Deprecated since POS Terminal Management API v1
Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).
'''
pass
def get_terminals_under_account(self, request, idempotency_key=None, **kwargs):
'''
Get the list of terminals
Deprecated since POS Terminal Management API v1
Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).
'''
pass
| 7 | 6 | 9 | 1 | 4 | 4 | 1 | 1.16 | 1 | 1 | 0 | 0 | 6 | 2 | 6 | 9 | 66 | 12 | 25 | 19 | 18 | 29 | 25 | 19 | 18 | 1 | 3 | 0 | 6 |
3,159 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/UtilTest.py
|
test.UtilTest.UtilTest
|
class UtilTest(unittest.TestCase):
adyen = Adyen.Adyen()
client = adyen.client
def test_notification_request_item_hmac(self):
request = {
"pspReference": "7914073381342284",
"merchantReference": "TestPayment-1407325143704",
"merchantAccountCode": "TestMerchant",
"amount": {
"currency": "EUR",
"value": 1130
},
"eventCode": "AUTHORISATION",
"success": "true",
"eventDate": "2019-05-06T17:15:34.121+02:00",
"operations": [
"CANCEL",
"CAPTURE",
"REFUND"
],
"paymentMethod": "visa",
}
key = "44782DEF547AAA06C910C43932B1EB0C" \
"71FC68D9D0C057550C48EC2ACF6BA056"
hmac_calculation = generate_notification_sig(request, key)
hmac_calculation_str = hmac_calculation.decode("utf-8")
expected_hmac = "coqCmt/IZ4E3CzPvMY8zTjQVL5hYJUiBRg8UU+iCWo0="
self.assertTrue(hmac_calculation_str != "")
self.assertEqual(hmac_calculation_str, expected_hmac)
request['additionalData'] = {'hmacSignature': hmac_calculation_str}
hmac_validate = is_valid_hmac_notification(request, key)
self.assertIn('additionalData', request)
self.assertDictEqual(request['additionalData'],
{'hmacSignature': hmac_calculation_str})
self.assertTrue(hmac_validate)
def test_webhooks_with_slashes(self):
hmac_key = "74F490DD33F7327BAECC88B2947C011FC02D014A473AAA33A8EC93E4DC069174"
with open('test/mocks/util/backslash_notification.json') as file:
backslash_notification = load(file)
self.assertTrue(is_valid_hmac_notification(backslash_notification, hmac_key))
with open('test/mocks/util/colon_notification.json') as file:
colon_notification = load(file)
self.assertTrue(is_valid_hmac_notification(colon_notification, hmac_key))
with open('test/mocks/util/forwardslash_notification.json') as file:
forwardslash_notification = load(file)
self.assertTrue(is_valid_hmac_notification(forwardslash_notification, hmac_key))
with open('test/mocks/util/mixed_notification.json') as file:
mixed_notification = load(file)
self.assertTrue(is_valid_hmac_notification(mixed_notification, hmac_key))
def test_query_string_creation(self):
query_parameters = {
"pageSize": 7,
"pageNumber": 3
}
query_string = get_query(query_parameters)
self.assertEqual(query_string, '?pageSize=7&pageNumber=3')
def test_passing_xapikey_in_method(self):
request = {'merchantAccount': "YourMerchantAccount"}
self.test = BaseTest(self.adyen)
self.client.platform = "test"
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"paymentmethods"
"-success.json")
result = self.adyen.checkout.payments_api.payment_methods(request, xapikey="YourXapikey")
self.assertEqual("AliPay", result.message['paymentMethods'][0]['name'])
self.assertEqual("Credit Card",
result.message['paymentMethods'][2]['name'])
self.assertEqual("Credit Card via AsiaPay",
result.message['paymentMethods'][3]['name'])
def test_custom_version(self):
self.client.api_checkout_version = 60
request = {'merchantAccount': "YourMerchantAccount"}
self.test = BaseTest(self.adyen)
self.client.platform = "test"
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"paymentmethods"
"-success.json")
result = self.adyen.checkout.payments_api.payment_methods(request, xapikey="YourXapikey")
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'https://checkout-test.adyen.com/v{self.client.api_checkout_version}/paymentMethods',
headers={'adyen-library-name': settings.LIB_NAME, 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_is_valid_hmac_notification_removes_additional_data(self):
notification = {
"live": "false",
"notificationItems": [
{
"NotificationRequestItem": {
"additionalData": {
"hmacSignature": "11aa",
"fraudResultType": "GREEN",
"fraudManualReview": "false",
"totalFraudScore": "75"
},
"amount": {
"currency": "USD",
"value": 10000
},
"success": "true"
}
}
]}
is_valid_hmac_notification(notification, "11aa")
self.assertIsNotNone(notification['notificationItems'][0]['NotificationRequestItem']['additionalData'])
def test_is_valid_hmac_payload(self):
payload = '''
{
"type": "merchant.created",
"environment": "test",
"createdAt": "01-01-2024",
"data": {
"capabilities": {
"sendToTransferInstrument": {
"requested": true,
"requestedLevel": "notApplicable"
}
},
"companyId": "YOUR_COMPANY_ID",
"merchantId": "YOUR_MERCHANT_ACCOUNT",
"status": "PreActive"
}
}
'''
hmac_key = "44782DEF547AAA06C910C43932B1EB0C71FC68D9D0C057550C48EC2ACF6BA056"
expected_hmac = "fX74xUdztFmaXAn3IusMFFUBUSkLmDQUK0tm8xL6ZTU="
self.assertTrue(is_valid_hmac_payload(expected_hmac, hmac_key, payload.encode("utf-8")))
def test_is_invalid_hmac_payload(self):
payload = '''
{
"type": "merchant.created",
"environment": "test",
"createdAt": "01-01-2024",
"data": {
"capabilities": {
"sendToTransferInstrument": {
"requested": true,
"requestedLevel": "notApplicable"
}
},
"companyId": "YOUR_COMPANY_ID",
"merchantId": "YOUR_MERCHANT_ACCOUNT",
"status": "PreActive"
}
}
'''
hmac_key = "44782DEF547AAA06C910C43932B1EB0C71FC68D9D0C057550C48EC2ACF6BA056"
expected_hmac = "MismatchingHmacKey="
self.assertFalse(is_valid_hmac_payload(expected_hmac, hmac_key, payload.encode("utf-8")))
|
class UtilTest(unittest.TestCase):
def test_notification_request_item_hmac(self):
pass
def test_webhooks_with_slashes(self):
pass
def test_query_string_creation(self):
pass
def test_passing_xapikey_in_method(self):
pass
def test_custom_version(self):
pass
def test_is_valid_hmac_notification_removes_additional_data(self):
pass
def test_is_valid_hmac_payload(self):
pass
def test_is_invalid_hmac_payload(self):
pass
| 9 | 0 | 20 | 1 | 19 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 1 | 8 | 80 | 168 | 13 | 155 | 37 | 146 | 0 | 65 | 36 | 56 | 1 | 2 | 1 | 8 |
3,160 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/TransfersTest.py
|
test.TransfersTest.TestManagement
|
class TestManagement(unittest.TestCase):
adyen = Adyen.Adyen()
client = adyen.client
test = BaseTest(adyen)
client.xapikey = "YourXapikey"
client.platform = "test"
transfers_url = adyen.transfers.transfers_api.baseUrl
def test_transfer_fund(self):
request = {
"amount": {
"value": 110000,
"currency": "EUR"
},
"balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4",
"category": "bank",
"counterparty": {
"bankAccount": {
"accountHolder": {
"fullName": "A. Klaassen",
"address": {
"city": "San Francisco",
"country": "US",
"postalCode": "94678",
"stateOrProvince": "CA",
"street": "Brannan Street",
"street2": "274"
}
}
},
"accountIdentification": {
"type": "numberAndBic",
"accountNumber": "123456789",
"bic": "BOFAUS3NXXX"
}
},
"priority": "wire",
"referenceForBeneficiary": "Your reference sent to the beneficiary",
"reference": "Your internal reference for the transfer",
"description": "Your description for the transfer"
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/transfers/"
"make-transfer-response.json")
result = self.adyen.transfers.transfers_api.transfer_funds(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.transfers_url}/transfers',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_get_all_transactions(self):
self.adyen.client = self.test.create_client_from_file(200, None, "test/mocks/transfers/"
"get-all-transactions.json")
result = self.adyen.transfers.transactions_api.get_all_transactions()
self.adyen.client.http_client.request.assert_called_once_with(
'GET',
f'{self.transfers_url}/transactions',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=None,
xapikey="YourXapikey"
)
def test_get_transaction(self):
transacion_id="123"
self.adyen.client = self.test.create_client_from_file(200, None, "test/mocks/transfers/"
"get-transaction.json")
result = self.adyen.transfers.transactions_api.get_transaction(transacion_id)
self.adyen.client.http_client.request.assert_called_once_with(
'GET',
f'{self.transfers_url}/transactions/{transacion_id}',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=None,
xapikey="YourXapikey"
)
|
class TestManagement(unittest.TestCase):
def test_transfer_fund(self):
pass
def test_get_all_transactions(self):
pass
def test_get_transaction(self):
pass
| 4 | 0 | 23 | 1 | 22 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 3 | 0 | 3 | 75 | 80 | 6 | 74 | 13 | 70 | 0 | 21 | 13 | 17 | 1 | 2 | 0 | 3 |
3,161 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/ThirdPartyPayoutTest.py
|
test.ThirdPartyPayoutTest.TestThirdPartyPayout
|
class TestThirdPartyPayout(unittest.TestCase):
adyen = Adyen.Adyen()
client = adyen.client
test = BaseTest(adyen)
client.username = "YourWSUser"
client.password = "YourWSPassword"
client.platform = "test"
client.review_payout_username = "YourReviewPayoutUser"
client.review_payout_password = "YourReviewPayoutPassword"
client.store_payout_username = "YourStorePayoutUser"
client.store_payout_password = "YourStorePayoutPassword"
payout_url = adyen.payout.initialization_api.baseUrl
def test_confirm_success(self):
request = {
"merchantAccount": "YourMerchantAccount",
"originalReference": "YourReference"
}
resp = 'test/mocks/payout/confirm-success.json'
self.adyen.client = self.test.create_client_from_file(200, request, resp)
result = self.adyen.payout.reviewing_api.confirm_third_party(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.payout_url}/confirmThirdParty',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
username='YourWSUser',
password='YourWSPassword',
)
self.assertIsNotNone(result.message['pspReference'])
expected = "[payout-confirm-received]"
self.assertEqual(expected, result.message['resultCode'])
def test_confirm_missing_reference(self):
request = {
"merchantAccount": "YourMerchantAccount",
"originalReference": ""
}
resp = 'test/mocks/payout/confirm-missing-reference.json'
self.adyen.client = self.test.create_client_from_file(500, request, resp)
self.assertRaisesRegex(
Adyen.AdyenAPICommunicationError,
"AdyenAPICommunicationError:{'status': 500, 'errorCode': '702', 'message': \"Required field 'merchantAccount' is null\", 'errorType': 'validation'}",
self.adyen.payout.reviewing_api.confirm_third_party,
request
)
def test_decline_success(self):
request = {
"merchantAccount": "YourMerchantAccount",
"originalReference": "YourReference"
}
resp = 'test/mocks/payout/decline-success.json'
self.adyen.client = self.test.create_client_from_file(200, request, resp)
result = self.adyen.payout.reviewing_api.decline_third_party(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.payout_url}/declineThirdParty',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
username='YourWSUser',
password='YourWSPassword',
)
self.assertIsNotNone(result.message['pspReference'])
expected = "[payout-decline-received]"
self.assertEqual(expected, result.message['resultCode'])
def test_decline_missing_reference(self):
request = {
"merchantAccount": "YourMerchantAccount",
"originalReference": ""
}
resp = 'test/mocks/payout/decline-missing-reference.json'
self.adyen.client = self.test.create_client_from_file(500, request, resp)
self.assertRaisesRegex(
Adyen.AdyenAPICommunicationError,
"AdyenAPICommunicationError:{'status': 500, 'errorCode': '702', 'message': \"Required field 'merchantAccount' is null\", 'errorType': 'validation'}",
self.adyen.payout.reviewing_api.confirm_third_party,
request
)
def test_store_detail_bank_success(self):
request = {
"bank": {
"bankName": "AbnAmro",
"bic": "ABNANL2A",
"countryCode": "NL",
"iban": "NL32ABNA0515071439",
"ownerName": "Adyen",
"bankCity": "Amsterdam",
"taxId": "bankTaxId"
},
"merchantAccount": "YourMerchantAccount",
"recurring": {
"contract": "PAYOUT"
},
"shopperEmail": "ref@email.com",
"shopperReference": "ref"
}
resp = 'test/mocks/payout/storeDetail-success.json'
self.adyen.client = self.test.create_client_from_file(200, request, resp)
result = self.adyen.payout.initialization_api.store_detail(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.payout_url}/storeDetail',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
username='YourWSUser',
password='YourWSPassword'
)
self.assertIsNotNone(result.message['pspReference'])
self.assertIsNotNone(result.message['recurringDetailReference'])
expected = "Success"
self.assertEqual(expected, result.message['resultCode'])
def test_submit_success(self):
request = {
"amount": {
"value": "100000",
"currency": "EUR"
},
"reference": "payout-test", "recurring": {
"contract": "PAYOUT"
},
"merchantAccount": "YourMerchantAccount",
"shopperEmail": "ref@email.com",
"shopperReference": "ref",
"selectedRecurringDetailReference": "LATEST"
}
resp = 'test/mocks/payout/submit-success.json'
self.adyen.client = self.test.create_client_from_file(200, request, resp)
result = self.adyen.payout.initialization_api.submit_third_party(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.payout_url}/submitThirdParty',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
username='YourWSUser',
password='YourWSPassword'
)
self.assertIsNotNone(result.message['pspReference'])
expected = "[payout-submit-received]"
self.assertEqual(expected, result.message['resultCode'])
def test_submit_invalid_recurring_reference(self):
request = {
"amount": {
"value": "100000",
"currency": "EUR"
},
"reference": "payout-test", "recurring": {
"contract": "PAYOUT"
},
"merchantAccount": "YourMerchantAccount",
"shopperEmail": "ref@email.com",
"shopperReference": "ref",
"selectedRecurringDetailReference": "1234"
}
resp = 'test/mocks/payout/submit-invalid-reference.json'
self.adyen.client = self.test.create_client_from_file(422, request, resp)
self.assertRaisesRegex(
Adyen.AdyenAPIUnprocessableEntity,
"AdyenAPIUnprocessableEntity:{'status': 422, 'errorCode': '800',"
" 'message': 'Contract not found', 'errorType': 'validation'}",
self.adyen.payout.initialization_api.submit_third_party,
request
)
def test_store_detail_and_submit_missing_reference(self):
request = {
"amount": {
"value": "100000",
"currency": "EUR"
},
"merchantAccount": "YourMerchantAccount",
"recurring": {
"contract": "PAYOUT"
},
"shopperEmail": "ref@email.com",
"shopperReference": "ref",
"bank": {
"iban": "NL32ABNA0515071439",
"ownerName": "Adyen",
"countryCode": "NL",
}
}
resp = 'test/mocks/payout/submit-missing-reference.json'
self.adyen.client = self.test.create_client_from_file(422, request, resp)
self.assertRaisesRegex(
Adyen.AdyenAPIUnprocessableEntity,
"AdyenAPIUnprocessableEntity:{'status': 422, 'message': 'Contract not found',"
" 'errorCode': '800', 'errorType': 'validation'}",
self.adyen.payout.initialization_api.store_detail_and_submit_third_party,
request
)
def test_store_detail_and_submit_missing_payment(self):
request = {
"amount": {
"value": "100000",
"currency": "EUR"
},
"merchantAccount": "YourMerchantAccount",
"reference": "payout-test",
"recurring": {
"contract": "PAYOUT"
},
"shopperEmail": "ref@email.com",
"shopperReference": "ref"
}
resp = 'test/mocks/payout/storeDetailAndSubmit-missing-payment.json'
self.adyen.client = self.test.create_client_from_file(422, request, resp)
self.assertRaisesRegex(
Adyen.AdyenAPIUnprocessableEntity,
"AdyenAPIUnprocessableEntity:{'status': 422, 'errorCode': '000',"
" 'message': 'Please supply paymentDetails', 'errorType': 'validation'}",
self.adyen.payout.initialization_api.store_detail_and_submit_third_party,
request
)
def test_store_detail_and_submit_invalid_iban(self):
request = {
"amount": {
"value": "100000",
"currency": "EUR"
},
"merchantAccount": "YourMerchantAccount",
"reference": "payout-test",
"recurring": {
"contract": "PAYOUT"
},
"shopperEmail": "ref@email.com",
"shopperReference": "ref",
"bank": {
"countryCode": "NL",
"iban": "4111111111111111",
"ownerName": "Adyen",
}
}
resp = 'test/mocks/payout/storeDetailAndSubmit-invalid-iban.json'
self.adyen.client = self.test.create_client_from_file(422, request, resp)
self.assertRaisesRegex(
Adyen.AdyenAPIUnprocessableEntity,
"AdyenAPIUnprocessableEntity:{'status': 422, 'errorCode': '161',"
" 'message': 'Invalid iban', 'errorType': 'validation'}",
self.adyen.payout.initialization_api.store_detail_and_submit_third_party,
request
)
def test_store_detail_and_submit_card_success(self):
request = {
"amount": {
"value": "100000",
"currency": "EUR"
},
"merchantAccount": "YourMerchantAccount",
"reference": "payout-test",
"recurring": {
"contract": "PAYOUT"
},
"shopperEmail": "ref@email.com",
"shopperReference": "ref",
"card": {
"number": "4111111111111111",
"expiryMonth": "08",
"expiryYear": "2018",
"cvc": "737",
"holderName": "John Smith"
}
}
resp = 'test/mocks/payout/storeDetailAndSubmit-card-success.json'
self.adyen.client = self.test.create_client_from_file(200, request, resp)
result = self.adyen.payout.initialization_api.store_detail_and_submit_third_party(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.payout_url}/storeDetailAndSubmitThirdParty',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
username='YourWSUser',
password='YourWSPassword'
)
self.assertIsNotNone(result.message['pspReference'])
expected = "[payout-submit-received]"
self.assertEqual(expected, result.message['resultCode'])
def test_store_detail_and_submit_bank_success(self):
request = {
"amount": {
"value": "100000",
"currency": "EUR"
},
"bank": {
"countryCode": "NL",
"iban": "NL32ABNA0515071439",
"ownerName": "Adyen",
},
"merchantAccount": "YourMerchantAccount",
"recurring": {
"contract": "PAYOUT"
},
"reference": "YourReference",
"shopperEmail": "ref@email.com",
"shopperReference": "ref"
}
resp = 'test/mocks/payout/storeDetailAndSubmit-bank-success.json'
self.adyen.client = self.test.create_client_from_file(200, request, resp)
result = self.adyen.payout.initialization_api.store_detail_and_submit_third_party(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.payout_url}/storeDetailAndSubmitThirdParty',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
username='YourWSUser',
password='YourWSPassword'
)
self.assertIsNotNone(result.message['pspReference'])
expected = "[payout-submit-received]"
self.assertEqual(expected, result.message['resultCode'])
|
class TestThirdPartyPayout(unittest.TestCase):
def test_confirm_success(self):
pass
def test_confirm_missing_reference(self):
pass
def test_decline_success(self):
pass
def test_decline_missing_reference(self):
pass
def test_store_detail_bank_success(self):
pass
def test_submit_success(self):
pass
def test_submit_invalid_recurring_reference(self):
pass
def test_store_detail_and_submit_missing_reference(self):
pass
def test_store_detail_and_submit_missing_payment(self):
pass
def test_store_detail_and_submit_invalid_iban(self):
pass
def test_store_detail_and_submit_card_success(self):
pass
def test_store_detail_and_submit_bank_success(self):
pass
| 13 | 0 | 25 | 0 | 25 | 0 | 1 | 0 | 1 | 2 | 2 | 0 | 12 | 0 | 12 | 84 | 321 | 15 | 306 | 53 | 293 | 0 | 97 | 53 | 84 | 1 | 2 | 0 | 12 |
3,162 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/TerminalTest.py
|
test.TerminalTest.TestTerminal
|
class TestTerminal(unittest.TestCase):
adyen = Adyen.Adyen(username="YourWSUser",
password="YourWSPassword",
platform="test",
xapikey="YourXapikey")
test = BaseTest(adyen)
client = adyen.client
terminal_url = adyen.terminal.baseUrl
def test_assign_terminals(self):
request = {
"companyAccount": "YOUR_COMPANY_ACCOUNT",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"store": "YOUR_STORE",
"terminals": [
"P400Plus-275479597"
]
}
self.test.create_client_from_file(
200, request, "test/mocks/terminal/assignTerminals.json"
)
result = self.adyen.terminal.assign_terminals(request=request)
self.assertIn("P400Plus-275479597", result.message["results"])
self.client.http_client.request.assert_called_once_with(
"POST",
f"{self.terminal_url}/assignTerminals",
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json={
"companyAccount": "YOUR_COMPANY_ACCOUNT",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"store": "YOUR_STORE",
"terminals": [
"P400Plus-275479597"
]
},
xapikey="YourXapikey"
)
def test_assign_terminals_422(self):
request = {
"companyAccount": "YOUR_COMPANY_ACCOUNT",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"store": "YOUR_STORE",
"terminals": [
"P400Plus-123456789"
]
}
self.test.create_client_from_file(
200, request, "test/mocks/terminal/assignTerminals-422.json"
)
result = self.adyen.terminal.assign_terminals(request=request)
self.assertEqual(422, result.message["status"])
self.assertEqual("000", result.message["errorCode"])
self.assertEqual("Terminals not found: P400Plus-123456789", result.message["message"])
self.assertEqual("validation", result.message["errorType"])
def test_find_terminal(self):
request = {
"terminal": "P400Plus-275479597",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
}
self.test.create_client_from_file(
200, request, "test/mocks/terminal/findTerminal.json"
)
result = self.adyen.terminal.find_terminal(request=request)
self.assertIn("P400Plus-275479597", result.message["terminal"])
self.client.http_client.request.assert_called_once_with(
"POST",
f"{self.terminal_url}/findTerminal",
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json={
"terminal": "P400Plus-275479597",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
},
xapikey="YourXapikey"
)
def test_find_terminal_422(self):
request = {
"terminal": "P400Plus-123456789"
}
self.test.create_client_from_file(
200, request, "test/mocks/terminal/findTerminal-422.json"
)
result = self.adyen.terminal.find_terminal(request=request)
self.assertEqual(422, result.message["status"])
self.assertEqual("000", result.message["errorCode"])
self.assertEqual("Terminal not found", result.message["message"])
self.assertEqual("validation", result.message["errorType"])
def test_get_stores_under_account(self):
request = {
"companyAccount": "YOUR_COMPANY_ACCOUNT",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
}
self.test.create_client_from_file(
200, request, "test/mocks/terminal/getStoresUnderAccount.json"
)
result = self.adyen.terminal.get_stores_under_account(request=request)
self.assertEqual(result.message["stores"], [
{
"store": "YOUR_STORE",
"description": "YOUR_STORE",
"address": {
"city": "The City",
"countryCode": "NL",
"postalCode": "1234",
"streetAddress": "The Street"
},
"status": "Active",
"merchantAccountCode": "YOUR_MERCHANT_ACCOUNT"
}
])
self.client.http_client.request.assert_called_once_with(
"POST",
f"{self.terminal_url}/getStoresUnderAccount",
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json={
"companyAccount": "YOUR_COMPANY_ACCOUNT",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
},
xapikey="YourXapikey"
)
def test_get_terminal_details(self):
request = {
"terminal": "P400Plus-275479597",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
}
self.test.create_client_from_file(
200, request, "test/mocks/terminal/getTerminalDetails.json"
)
result = self.adyen.terminal.get_terminal_details(request=request)
self.assertEqual(result.message["deviceModel"], "P400Plus")
self.assertEqual(result.message["terminal"], "P400Plus-275479597")
self.client.http_client.request.assert_called_once_with(
"POST",
f"{self.terminal_url}/getTerminalDetails",
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json={
"terminal": "P400Plus-275479597",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
},
xapikey="YourXapikey"
)
def test_get_terminal_details_422(self):
request = {
"terminal": "P400Plus-123456789"
}
self.test.create_client_from_file(
200, request, "test/mocks/terminal/getTerminalDetails-422.json"
)
result = self.adyen.terminal.get_terminal_details(request=request)
self.assertEqual(422, result.message["status"])
self.assertEqual("000", result.message["errorCode"])
self.assertEqual("Terminal not found", result.message["message"])
self.assertEqual("validation", result.message["errorType"])
def test_get_terminals_under_account(self):
request = {
"companyAccount": "YOUR_COMPANY_ACCOUNT",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
}
self.test.create_client_from_file(
200, request, "test/mocks/terminal/getTerminalsUnderAccount.json"
)
result = self.adyen.terminal.get_terminals_under_account(request=request)
self.assertEqual(result.message["merchantAccounts"], [
{
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"inStoreTerminals": [
"P400Plus-275479597"
],
"stores": [
{
"store": "YOUR_STORE",
"inStoreTerminals": [
"M400-401972715"
]
}
]
}
])
self.client.http_client.request.assert_called_once_with(
"POST",
f"{self.terminal_url}/getTerminalsUnderAccount",
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json={
"companyAccount": "YOUR_COMPANY_ACCOUNT",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
},
xapikey="YourXapikey"
)
def test_get_terminals_under_account_store(self):
request = {
"companyAccount": "YOUR_COMPANY_ACCOUNT",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"store": "YOUR_STORE"
}
self.test.create_client_from_file(
200, request, "test/mocks/terminal/getTerminalsUnderAccount-store.json"
)
result = self.adyen.terminal.get_terminals_under_account(request=request)
self.assertEqual(result.message["merchantAccounts"], [
{
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"stores": [
{
"store": "YOUR_STORE",
"inStoreTerminals": [
"M400-401972715"
]
}
]
}
])
self.client.http_client.request.assert_called_once_with(
"POST",
f"{self.terminal_url}/getTerminalsUnderAccount",
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json={
"companyAccount": "YOUR_COMPANY_ACCOUNT",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"store": "YOUR_STORE",
},
xapikey="YourXapikey"
)
|
class TestTerminal(unittest.TestCase):
def test_assign_terminals(self):
pass
def test_assign_terminals_422(self):
pass
def test_find_terminal(self):
pass
def test_find_terminal_422(self):
pass
def test_get_stores_under_account(self):
pass
def test_get_terminal_details(self):
pass
def test_get_terminal_details_422(self):
pass
def test_get_terminals_under_account(self):
pass
def test_get_terminals_under_account_store(self):
pass
| 10 | 0 | 25 | 1 | 24 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 9 | 81 | 241 | 21 | 220 | 32 | 210 | 0 | 66 | 32 | 56 | 1 | 2 | 0 | 9 |
3,163 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/StoredValueTest.py
|
test.StoredValueTest.TestManagement
|
class TestManagement(unittest.TestCase):
adyen = Adyen.Adyen()
client = adyen.client
test = BaseTest(adyen)
client.xapikey = "YourXapikey"
client.platform = "test"
stored_value_url = adyen.storedValue.baseUrl
def issue(self):
request = {
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"store": "YOUR_STORE_ID",
"paymentMethod": {
"type": "valuelink"
},
"giftCardPromoCode": "1324",
"reference": "YOUR_REFERENCE"
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/storedValue/issue-giftcard.json")
result = self.adyen.storedValue.issue(request)
self.assertEqual(result.message['paymentMethod']['type'], 'givex')
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.stored_value_url}/issue',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_activate_giftcard(self):
request = {
"status": "active",
"amount": {
"currency": "USD",
"value": 1000
},
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"store": "YOUR_STORE_ID",
"paymentMethod": {
"type": "svs",
"number": "6006491286999921374",
"securityCode": "1111"
},
"reference": "YOUR_REFERENCE"
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/storedValue/activate-giftcards.json")
result = self.adyen.storedValue.change_status(request)
self.assertEqual(result.message['currentBalance']['value'], 1000)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.stored_value_url}/changeStatus',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_load_funds(self):
request = {
"amount": {
"currency": "USD",
"value": 2000
},
"loadType": "merchandiseReturn",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"store": "YOUR_STORE_ID",
"paymentMethod": {
"type": "svs",
"number": "6006491286999921374",
"securityCode": "1111"
},
"reference": "YOUR_REFERENCE"
}
self.adyen.client = self.test.create_client_from_file(200, request, "test/mocks/storedValue/load-funds.json")
result = self.adyen.storedValue.load(request)
self.assertEqual(result.message['resultCode'], 'Success')
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.stored_value_url}/load',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_check_balance(self):
request = {
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"store": "YOUR_STORE_ID",
"paymentMethod": {
"type": "svs",
"number": "603628672882001915092",
"securityCode": "5754"
},
"reference": "YOUR_REFERENCE"
}
self.adyen.client = self.test.create_client_from_file(200, request, "test/mocks/storedValue/check-balance.json")
result = self.adyen.storedValue.check_balance(request)
self.assertEqual(result.message['currentBalance']['value'], 5600)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.stored_value_url}/checkBalance',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_merge_balance(self):
request = {
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"store": "YOUR_STORE_ID",
"sourcePaymentMethod": {
"number": "7777182708544835",
"securityCode": "2329"
},
"paymentMethod": {
"type": "valuelink",
"number": "8888182708544836",
"securityCode": "2330"
},
"reference": "YOUR_REFERENCE"
}
self.adyen.client = self.test.create_client_from_file(200, request, "test/mocks/storedValue/merge-balance.json")
result = self.adyen.storedValue.merge_balance(request)
self.assertEqual(result.message['pspReference'], "881564657480267D")
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.stored_value_url}/mergeBalance',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_void_transaction(self):
request = {
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"originalReference": "851564654294247B",
"reference": "YOUR_REFERENCE"
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/storedValue/undo-transaction.json")
result = self.adyen.storedValue.void_transaction(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.stored_value_url}/voidTransaction',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
|
class TestManagement(unittest.TestCase):
def issue(self):
pass
def test_activate_giftcard(self):
pass
def test_load_funds(self):
pass
def test_check_balance(self):
pass
def test_merge_balance(self):
pass
def test_void_transaction(self):
pass
| 7 | 0 | 23 | 0 | 23 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 6 | 0 | 6 | 78 | 151 | 8 | 143 | 23 | 136 | 0 | 42 | 23 | 35 | 1 | 2 | 0 | 6 |
3,164 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/RecurringTest.py
|
test.RecurringTest.TestRecurring
|
class TestRecurring(unittest.TestCase):
adyen = Adyen.Adyen()
client = adyen.client
test = BaseTest(adyen)
client.username = "YourWSUser"
client.password = "YourWSPassword"
client.platform = "test"
baseUrl = adyen.recurring.baseUrl
def test_list_recurring_details(self):
request = {}
request['merchantAccount'] = "YourMerchantAccount"
request['reference'] = "YourReference"
request["shopperEmail"] = "ref@email.com"
request["shopperReference"] = "ref"
request['recurring'] = {}
request["recurring"]['contract'] = "RECURRING"
self.adyen.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'recurring/'
'listRecurring'
'Details-'
'success.json')
result = self.adyen.recurring.list_recurring_details(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.baseUrl}/listRecurringDetails',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
username='YourWSUser',
password='YourWSPassword'
)
self.assertEqual(1, len(result.message['details']))
self.assertEqual(1, len(result.message['details'][0]))
recurringDetail = result.message['details'][0]['RecurringDetail']
self.assertEqual("recurringReference",
recurringDetail['recurringDetailReference'])
self.assertEqual("cardAlias", recurringDetail['alias'])
self.assertEqual("1111", recurringDetail['card']['number'])
def test_disable(self):
request = {}
request["shopperEmail"] = "ref@email.com"
request["shopperReference"] = "ref"
request["recurringDetailReference"] = "12345678889"
self.adyen.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'recurring/'
'disable-success'
'.json')
result = self.adyen.recurring.disable(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.baseUrl}/disable',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
username='YourWSUser',
password='YourWSPassword',
)
self.assertEqual(1, len(result.message['details']))
self.assertEqual("[detail-successfully-disabled]",
result.message['response'])
def test_disable_803(self):
request = {}
request["shopperEmail"] = "ref@email.com"
request["shopperReference"] = "ref"
request["recurringDetailReference"] = "12345678889"
self.adyen.client = self.test.create_client_from_file(422, request,
'test/mocks/'
'recurring/'
'disable-error-803'
'.json')
self.assertRaisesRegex(
Adyen.AdyenAPIUnprocessableEntity,
"AdyenAPIUnprocessableEntity:{'status': 422, 'errorCode': '803', 'message': 'PaymentDetail not found', 'errorType': 'validation'}",
self.adyen.recurring.disable,
request
)
|
class TestRecurring(unittest.TestCase):
def test_list_recurring_details(self):
pass
def test_disable(self):
pass
def test_disable_803(self):
pass
| 4 | 0 | 23 | 0 | 23 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 3 | 0 | 3 | 75 | 79 | 3 | 76 | 14 | 72 | 0 | 42 | 14 | 38 | 1 | 2 | 0 | 3 |
3,165 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/PaymentTest.py
|
test.PaymentTest.TestPaymentsWithXapiKey
|
class TestPaymentsWithXapiKey(unittest.TestCase):
adyen = Adyen.Adyen()
client = adyen.client
test = BaseTest(adyen)
client.platform = "test"
client.username = "YourWSUser"
client.password = "YourWSPassword"
client.xapikey = ""
def test_authorise_success_mocked(self):
request = {}
request['merchantAccount'] = "YourMerchantAccount"
request['amount'] = {"value": "100000", "currency": "EUR"}
request['reference'] = "123456"
request['card'] = {
"number": "5136333333333335",
"expiryMonth": "08",
"expiryYear": "2018",
"cvc": "737",
"holderName": "John Doe"
}
self.adyen.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'authorise'
'-success'
'.json')
result = self.adyen.payment.payments_api.authorise(request)
self.assertEqual("Authorised", result.message['resultCode'])
self.assertEqual("8/2018",
result.message['additionalData']['expiryDate'])
self.assertEqual("411111",
result.message['additionalData']['cardBin'])
self.assertEqual("1111",
result.message['additionalData']['cardSummary'])
self.assertEqual("Holder",
result.message['additionalData']['cardHolderName'])
self.assertEqual("true",
result.message['additionalData']['threeDOffered'])
self.assertEqual("false",
result.message['additionalData']
['threeDAuthenticated'])
self.assertEqual("69746", result.message['authCode'])
self.assertEqual(11, len(result.message['fraudResult']['results']))
fraud_checks = result.message['fraudResult']['results']
fraud_check_result = fraud_checks[0]['FraudCheckResult']
self.assertEqual("CardChunkUsage", fraud_check_result['name'])
self.assertEqual(8, fraud_check_result['accountScore'])
self.assertEqual(2, fraud_check_result['checkId'])
def test_authorise_error010_mocked(self):
request = {}
request['merchantAccount'] = "testaccount"
request['amount'] = {"value": "100000", "currency": "EUR"}
request['reference'] = "123456"
request['card'] = {
"number": "5136333333333335",
"expiryMonth": "08",
"expiryYear": "2018",
"cvc": "737",
"holderName": "John Doe"
}
self.adyen.client = self.test.create_client_from_file(403, request,
'test/mocks/'
'authorise-error'
'-010'
'.json')
self.assertRaises(Adyen.AdyenAPIInvalidPermission,
self.adyen.payment.payments_api.authorise, request)
def test_authorise_error_cvc_declined_mocked(self):
request = {}
request['amount'] = {"value": "100000", "currency": "EUR"}
request['reference'] = "123456"
request['card'] = {
"number": "5136333333333335",
"expiryMonth": "08",
"expiryYear": "2018",
"cvc": "787",
"holderName": "John Doe"
}
self.adyen.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'authorise'
'-error-'
'cvc-declined'
'.json')
result = self.adyen.payment.payments_api.authorise(request)
self.assertEqual("Refused", result.message['resultCode'])
def test_authorise_success_3d_mocked(self):
request = {}
request['merchantAccount'] = "YourMerchantAccount"
request['amount'] = {"value": "100000", "currency": "EUR"}
request['reference'] = "123456"
request['card'] = {
"number": "5136333333333335",
"expiryMonth": "08",
"expiryYear": "2018",
"cvc": "787",
"holderName": "John Doe"
}
request['browserInfo'] = {
"userAgent": "YourUserAgent",
"acceptHeader": "YourAcceptHeader"
}
self.adyen.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'authorise'
'-success'
'-3d.json')
result = self.adyen.payment.payments_api.authorise(request)
self.assertEqual("RedirectShopper", result.message['resultCode'])
self.assertIsNotNone(result.message['md'])
self.assertIsNotNone(result.message['issuerUrl'])
self.assertIsNotNone(result.message['paRequest'])
def test_authorise_3d_success_mocked(self):
request = {}
request['merchantAccount'] = "YourMerchantAccount"
request['md'] = "testMD"
request['paResponse'] = "paresponsetest"
request['browserInfo'] = {
"userAgent": "YourUserAgent",
"acceptHeader": "YourAcceptHeader"
}
self.adyen.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'authorise3d-'
'success.json')
result = self.adyen.payment.payments_api.authorise3d(request)
self.assertEqual("Authorised", result.message['resultCode'])
self.assertIsNotNone(result.message['pspReference'])
def test_authorise_cse_success_mocked(self):
request = {}
request['amount'] = {"value": "1234", "currency": "EUR"}
request['merchantAccount'] = "YourMerchantAccount"
request['reference'] = "YourReference"
request['additionalData'] = {
"card.encrypted.json": "YourCSEToken"
}
self.adyen.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'authorise'
'-success'
'-cse.json')
result = self.adyen.payment.payments_api.authorise(request)
self.assertEqual("Authorised", result.message['resultCode'])
def test_authorise_cse_error_expired_mocked(self):
request = {}
request['amount'] = {"value": "1234", "currency": "EUR"}
request['merchantAccount'] = "YourMerchantAccount"
request['reference'] = "YourReference"
request['additionalData'] = {
"card.encrypted.json": "YourCSEToken"
}
self.adyen.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'authorise'
'-error-'
'expired.json')
result = self.adyen.payment.payments_api.authorise(request)
self.assertEqual("Refused", result.message['resultCode'])
self.assertEqual("DECLINED Expiry Incorrect",
result.message['additionalData']['refusalReasonRaw'])
def test_error_401_mocked(self):
request = {}
request['merchantAccount'] = "YourMerchantAccount"
request['amount'] = {"value": "100000", "currency": "EUR"}
request['reference'] = "123456"
request['card'] = {
"number": "5136333333333335",
"expiryMonth": "08",
"expiryYear": "2018",
"cvc": "787",
"holderName": "John Doe"
}
self.adyen.client = self.test.create_client_from_file(401, request,
'test/mocks/'
'authorise'
'-error-'
'010.json')
self.assertRaisesRegex(Adyen.AdyenAPIAuthenticationError,
"AdyenAPIAuthenticationError:{'status': 403, 'errorCode': '010',"
" 'message': 'Not allowed', 'errorType': 'security',"
" 'pspReference': '8514836072314693'}",
self.adyen.payment.payments_api.authorise, request)
|
class TestPaymentsWithXapiKey(unittest.TestCase):
def test_authorise_success_mocked(self):
pass
def test_authorise_error010_mocked(self):
pass
def test_authorise_error_cvc_declined_mocked(self):
pass
def test_authorise_success_3d_mocked(self):
pass
def test_authorise_3d_success_mocked(self):
pass
def test_authorise_cse_success_mocked(self):
pass
def test_authorise_cse_error_expired_mocked(self):
pass
def test_error_401_mocked(self):
pass
| 9 | 0 | 22 | 0 | 22 | 0 | 1 | 0 | 1 | 2 | 2 | 0 | 8 | 0 | 8 | 80 | 191 | 10 | 181 | 28 | 172 | 0 | 96 | 28 | 87 | 1 | 2 | 0 | 8 |
3,166 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/PaymentTest.py
|
test.PaymentTest.TestPayments
|
class TestPayments(unittest.TestCase):
adyen = Adyen.Adyen()
client = adyen.client
test = BaseTest(adyen)
client.username = "YourWSUser"
client.password = "YourWSPassword"
client.platform = "test"
client.xapikey = ""
def test_authorise_success_mocked(self):
request = {}
request['merchantAccount'] = "YourMerchantAccount"
request['amount'] = {"value": "100000", "currency": "EUR"}
request['reference'] = "123456"
request['card'] = {
"number": "5136333333333335",
"expiryMonth": "08",
"expiryYear": "2018",
"cvc": "737",
"holderName": "John Doe"
}
self.adyen.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'authorise'
'-success'
'.json')
result = self.adyen.payment.payments_api.authorise(request)
self.assertEqual("Authorised", result.message['resultCode'])
self.assertEqual("8/2018",
result.message['additionalData']['expiryDate'])
self.assertEqual("411111",
result.message['additionalData']['cardBin'])
self.assertEqual("1111",
result.message['additionalData']['cardSummary'])
self.assertEqual("Holder",
result.message['additionalData']['cardHolderName'])
self.assertEqual("true",
result.message['additionalData']['threeDOffered'])
self.assertEqual("false",
result.message['additionalData']
['threeDAuthenticated'])
self.assertEqual("69746", result.message['authCode'])
self.assertEqual(11, len(result.message['fraudResult']['results']))
fraud_checks = result.message['fraudResult']['results']
fraud_check_result = fraud_checks[0]['FraudCheckResult']
self.assertEqual("CardChunkUsage", fraud_check_result['name'])
self.assertEqual(8, fraud_check_result['accountScore'])
self.assertEqual(2, fraud_check_result['checkId'])
def test_authorise_error010_mocked(self):
request = {}
request['merchantAccount'] = "testaccount"
request['amount'] = {"value": "100000", "currency": "EUR"}
request['reference'] = "123456"
request['card'] = {
"number": "5136333333333335",
"expiryMonth": "08",
"expiryYear": "2018",
"cvc": "737",
"holderName": "John Doe"
}
self.adyen.client = self.test.create_client_from_file(403, request,
'test/mocks/'
'authorise-error'
'-010'
'.json')
self.assertRaises(Adyen.AdyenAPIInvalidPermission,
self.adyen.payment.payments_api.authorise, request)
def test_authorise_error_cvc_declined_mocked(self):
request = {}
request['amount'] = {"value": "100000", "currency": "EUR"}
request['reference'] = "123456"
request['card'] = {
"number": "5136333333333335",
"expiryMonth": "08",
"expiryYear": "2018",
"cvc": "787",
"holderName": "John Doe"
}
self.adyen.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'authorise'
'-error-'
'cvc-declined'
'.json')
result = self.adyen.payment.payments_api.authorise(request)
self.assertEqual("Refused", result.message['resultCode'])
def test_authorise_success_3d_mocked(self):
request = {}
request['merchantAccount'] = "YourMerchantAccount"
request['amount'] = {"value": "100000", "currency": "EUR"}
request['reference'] = "123456"
request['card'] = {
"number": "5136333333333335",
"expiryMonth": "08",
"expiryYear": "2018",
"cvc": "787",
"holderName": "John Doe"
}
request['browserInfo'] = {
"userAgent": "YourUserAgent",
"acceptHeader": "YourAcceptHeader"
}
self.adyen.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'authorise'
'-success'
'-3d.json')
result = self.adyen.payment.payments_api.authorise(request)
self.assertEqual("RedirectShopper", result.message['resultCode'])
self.assertIsNotNone(result.message['md'])
self.assertIsNotNone(result.message['issuerUrl'])
self.assertIsNotNone(result.message['paRequest'])
def test_authorise_3d_success_mocked(self):
request = {}
request['merchantAccount'] = "YourMerchantAccount"
request['md'] = "testMD"
request['paResponse'] = "paresponsetest"
request['browserInfo'] = {
"userAgent": "YourUserAgent",
"acceptHeader": "YourAcceptHeader"
}
self.adyen.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'authorise3d-'
'success.json')
result = self.adyen.payment.payments_api.authorise3d(request)
self.assertEqual("Authorised", result.message['resultCode'])
self.assertIsNotNone(result.message['pspReference'])
def test_authorise_cse_success_mocked(self):
request = {}
request['amount'] = {"value": "1234", "currency": "EUR"}
request['merchantAccount'] = "YourMerchantAccount"
request['reference'] = "YourReference"
request['additionalData'] = {
"card.encrypted.json": "YourCSEToken"
}
self.adyen.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'authorise'
'-success'
'-cse.json')
result = self.adyen.payment.payments_api.authorise(request)
self.assertEqual("Authorised", result.message['resultCode'])
def test_authorise_cse_error_expired_mocked(self):
request = {}
request['amount'] = {"value": "1234", "currency": "EUR"}
request['merchantAccount'] = "YourMerchantAccount"
request['reference'] = "YourReference"
request['additionalData'] = {
"card.encrypted.json": "YourCSEToken"
}
self.adyen.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'authorise'
'-error-'
'expired.json')
result = self.adyen.payment.payments_api.authorise(request)
self.assertEqual("Refused", result.message['resultCode'])
self.assertEqual("DECLINED Expiry Incorrect",
result.message['additionalData']['refusalReasonRaw'])
def test_error_401_mocked(self):
request = {}
request['merchantAccount'] = "YourMerchantAccount"
request['amount'] = {"value": "100000", "currency": "EUR"}
request['reference'] = "123456"
request['card'] = {
"number": "5136333333333335",
"expiryMonth": "08",
"expiryYear": "2018",
"cvc": "787",
"holderName": "John Doe"
}
self.adyen.client = self.test.create_client_from_file(401, request,
'test/mocks/'
'authorise'
'-error-'
'010.json')
self.assertRaisesRegex(Adyen.AdyenAPIAuthenticationError,
"AdyenAPIAuthenticationError:{'status': 403, 'errorCode': '010',"
" 'message': 'Not allowed', 'errorType': 'security',"
" 'pspReference': '8514836072314693'}",
self.adyen.payment.payments_api.authorise, request)
|
class TestPayments(unittest.TestCase):
def test_authorise_success_mocked(self):
pass
def test_authorise_error010_mocked(self):
pass
def test_authorise_error_cvc_declined_mocked(self):
pass
def test_authorise_success_3d_mocked(self):
pass
def test_authorise_3d_success_mocked(self):
pass
def test_authorise_cse_success_mocked(self):
pass
def test_authorise_cse_error_expired_mocked(self):
pass
def test_error_401_mocked(self):
pass
| 9 | 0 | 22 | 0 | 22 | 0 | 1 | 0 | 1 | 2 | 2 | 0 | 8 | 0 | 8 | 80 | 191 | 10 | 181 | 28 | 172 | 0 | 96 | 28 | 87 | 1 | 2 | 0 | 8 |
3,167 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/ModificationTest.py
|
test.ModificationTest.TestModifications
|
class TestModifications(unittest.TestCase):
ady = Adyen.Adyen()
client = ady.client
test = BaseTest(ady)
client.username = "YourWSUser"
client.password = "YourWSPassword"
client.platform = "test"
def test_capture_success(self):
request = {}
request['merchantAccount'] = "YourMerchantAccount"
request['reference'] = "YourReference"
request['modificationAmount'] = {"value": "1234", "currency": "EUR"}
request['originalReference'] = "YourOriginalReference"
self.ady.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'capture-success'
'.json')
result = self.ady.payment.modifications_api.capture(request)
self.assertEqual("[capture-received]", result.message['response'])
def test_capture_error_167(self):
request = {}
request['merchantAccount'] = "YourMerchantAccount"
request['reference'] = "YourReference"
request['modificationAmount'] = {"value": "1234", "currency": "EUR"}
request['originalReference'] = "YourOriginalReference"
self.ady.client = self.test.create_client_from_file(422, request,
'test/mocks/'
'capture-error-167'
'.json')
self.assertRaisesRegex(
Adyen.AdyenAPIUnprocessableEntity,
"AdyenAPIUnprocessableEntity:{'status': 422, 'errorCode': '167', 'message': 'Original pspReference required for this operation', 'errorType': 'validation'}",
self.ady.payment.modifications_api.capture,
request
)
def test_cancel_or_refund_received(self):
request = {}
request['merchantAccount'] = "YourMerchantAccount"
request['reference'] = "YourReference"
request['originalReference'] = "YourOriginalReference"
self.ady.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'cancelOrRefund'
'-received.json')
result = self.ady.payment.modifications_api.cancel_or_refund(request)
self.assertEqual("[cancelOrRefund-received]",
result.message['response'])
def test_refund_received(self):
request = {}
request['merchantAccount'] = "YourMerchantAccount"
request['reference'] = "YourReference"
request['originalReference'] = "YourOriginalReference"
request['modificationAmount'] = {"value": "1234", "currency": "EUR"}
self.ady.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'refund-received'
'.json')
result = self.ady.payment.modifications_api.refund(request)
self.assertEqual("[refund-received]", result.message['response'])
def test_cancel_received(self):
request = {}
request['merchantAccount'] = "YourMerchantAccount"
request['reference'] = "YourReference"
request['originalReference'] = "YourOriginalReference"
self.ady.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'cancel-received'
'.json')
result = self.ady.payment.modifications_api.cancel(request)
self.assertEqual("[cancel-received]", result.message['response'])
def test_adjust_authorisation_received(self):
request = {}
request['merchantAccount'] = "YourMerchantAccount"
request['reference'] = "YourReference"
request['modificationAmount'] = {"value": "1234", "currency": "EUR"}
request['originalReference'] = "YourOriginalReference"
self.ady.client = self.test.create_client_from_file(200, request,
'test/mocks/'
'adjust-'
'authorisation-'
'received.json')
result = self.ady.payment.modifications_api.adjust_authorisation(request)
self.assertEqual("[adjustAuthorisation-received]",
result.message['response'])
|
class TestModifications(unittest.TestCase):
def test_capture_success(self):
pass
def test_capture_error_167(self):
pass
def test_cancel_or_refund_received(self):
pass
def test_refund_received(self):
pass
def test_cancel_received(self):
pass
def test_adjust_authorisation_received(self):
pass
| 7 | 0 | 13 | 0 | 13 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 6 | 0 | 6 | 78 | 91 | 7 | 84 | 21 | 77 | 0 | 58 | 21 | 51 | 1 | 2 | 0 | 6 |
3,168 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/ManagementTest.py
|
test.ManagementTest.TestManagement
|
class TestManagement(unittest.TestCase):
adyen = Adyen.Adyen()
client = adyen.client
test = BaseTest(adyen)
client.xapikey = "YourXapikey"
client.platform = "test"
management_url = adyen.management.my_api_credential_api.baseUrl
def test_get_company_account(self):
request = None
company_id = "YOUR_COMPANY_ACCOUNT"
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"management/"
"get_company_account"
".json")
result = self.adyen.management.account_company_level_api.get_company_account(companyId=company_id)
self.assertEqual(company_id, result.message['id'])
self.adyen.client.http_client.request.assert_called_once_with(
'GET',
f'{self.management_url}/companies/{company_id}',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=None,
xapikey="YourXapikey"
)
def test_my_api_credential_api(self):
request = {"domain": "YOUR_DOMAIN"}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"management/"
"post_me_allowed"
"_origins.json")
result = self.adyen.management.my_api_credential_api.add_allowed_origin(request)
self.assertEqual("YOUR_DOMAIN", result.message['domain'])
def test_no_content(self):
self.adyen.client = self.test.create_client_from_file(204, {},
"test/mocks/"
"management/"
"no_content.json")
origin_id = 'YOUR_DOMAIN_ID'
self.adyen.management.my_api_credential_api.remove_allowed_origin(origin_id)
self.adyen.client.http_client.request.assert_called_once_with(
'DELETE',
f'{self.management_url}/me/allowedOrigins/{origin_id}',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=None,
xapikey="YourXapikey"
)
def test_update_store(self):
request = {
"address": {
"line1": "1776 West Pinewood Avenue",
"line2": "Heartland Building",
"line3": "",
"postalCode": "20251"
}
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"management/"
"update_a_store"
".json")
store_id = "YOUR_STORE_ID"
merchant_id = "YOUR_MERCHANT_ACCOUNT_ID"
result = self.adyen.management.account_store_level_api.update_store(request, merchant_id, store_id)
self.adyen.client.http_client.request.assert_called_once_with(
'PATCH',
f'{self.management_url}/merchants/{merchant_id}/stores/{store_id}',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
self.assertEqual(store_id, result.message['id'])
self.assertEqual("1776 West Pinewood Avenue", result.message['address']['line1'])
def test_reassign_terminal(self):
request = {
'storeId': 'ST123ABC',
'inventory': False,
}
self.adyen.client = self.test.create_client_from_file(200, request)
result = self.adyen.management.terminals_terminal_level_api.reassign_terminal(request, 'AMS1-2345')
self.assertEqual(200, result.status_code)
self.assertEqual({}, result.message)
self.assertEqual("", result.raw_response)
def test_create_a_user(self):
request = {
"name": {
"firstName": "John",
"lastName": "Smith"
},
"username": "johnsmith",
"email": "john.smith@example.com",
"timeZoneCode": "Europe/Amsterdam",
"roles": [
"Merchant standard role",
"Merchant admin"
],
"associatedMerchantAccounts": [
"YOUR_MERCHANT_ACCOUNT"
]
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"management/"
"create_a_user"
".json")
company_id = "YOUR_COMPANY_ACCOUNT"
result = self.adyen.management.users_company_level_api.create_new_user(request, company_id)
self.assertEqual(request['name']['firstName'], result.message['name']['firstName'])
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.management_url}/companies/{company_id}/users',
json=request,
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
xapikey="YourXapikey"
)
def test_get_list_of_android_apps(self):
request = {}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"management/"
"get_list_of"
"_android_apps"
".json")
company_id = "YOUR_COMPANY_ACCOUNT"
result = self.adyen.management.android_files_company_level_api.list_android_apps(company_id)
self.assertEqual("ANDA422LZ223223K5F694GCCF732K8", result.message['androidApps'][0]['id'])
def test_query_parameters(self):
request = {}
company_id = "YOUR_COMPANY_ACCOUNT"
query_parameters = {
'pageNumber': 1,
'pageSize': 10
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"management/"
"get_list_of_merchant_accounts.json")
self.adyen.management.account_company_level_api. \
list_merchant_accounts(company_id, query_parameters=query_parameters)
self.adyen.client.http_client.request.assert_called_once_with(
'GET',
f'{self.management_url}/companies/{company_id}/merchants?pageNumber=1&pageSize=10',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=None,
xapikey="YourXapikey"
)
|
class TestManagement(unittest.TestCase):
def test_get_company_account(self):
pass
def test_my_api_credential_api(self):
pass
def test_no_content(self):
pass
def test_update_store(self):
pass
def test_reassign_terminal(self):
pass
def test_create_a_user(self):
pass
def test_get_list_of_android_apps(self):
pass
def test_query_parameters(self):
pass
| 9 | 0 | 20 | 2 | 17 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 8 | 80 | 172 | 26 | 146 | 34 | 137 | 0 | 60 | 34 | 51 | 1 | 2 | 0 | 8 |
3,169 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/LegalEntityManagementTest.py
|
test.LegalEntityManagementTest.TestManagement
|
class TestManagement(unittest.TestCase):
adyen = Adyen.Adyen()
client = adyen.client
test = BaseTest(adyen)
client.xapikey = "YourXapikey"
client.platform = "test"
lem_url = adyen.legalEntityManagement.legal_entities_api.baseUrl
def test_creating_legal_entity(self):
request = {
"type": "individual",
"individual": {
"residentialAddress": {
"city": "Amsterdam",
"country": "NL",
"postalCode": "1011DJ",
"street": "Simon Carmiggeltstraat 6 - 50"
},
"name": {
"firstName": "Shelly",
"lastName": "Eller"
},
"birthData": {
"dateOfBirth": "1990-06-21"
},
"email": "s.eller@example.com"
}
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/legalEntityManagement/"
"individual_legal_entity_created.json")
result = self.adyen.legalEntityManagement.legal_entities_api.create_legal_entity(request)
self.assertEqual('Shelly', result.message['individual']['name']['firstName'])
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.lem_url}/legalEntities',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_get_transfer_instrument(self):
instrumentId = "SE322JV223222F5GNXSR89TMW"
self.adyen.client = self.test.create_client_from_file(200, None, "test/mocks/legalEntityManagement/"
"details_of_trainsfer_instrument.json")
result = self.adyen.legalEntityManagement.transfer_instruments_api.get_transfer_instrument(instrumentId)
self.assertEqual(instrumentId, result.message['id'])
self.adyen.client.http_client.request.assert_called_once_with(
'GET',
f'{self.lem_url}/transferInstruments/{instrumentId}',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=None,
xapikey="YourXapikey"
)
def test_update_business_line(self):
businessLineId = "SE322JV223222F5GVGMLNB83F"
request = {
"industryCode": "55",
"webData": [
{
"webAddress": "https://www.example.com"
}
]
}
self.adyen.client = self.test.create_client_from_file(200, request, "test/mocks/legalEntityManagement/"
"business_line_updated.json")
result = self.adyen.legalEntityManagement.business_lines_api.update_business_line(request, businessLineId)
self.assertEqual(businessLineId, result.message['id'])
self.adyen.client.http_client.request.assert_called_once_with(
'PATCH',
f'{self.lem_url}/businessLines/{businessLineId}',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_accept_terms_of_service(self):
legalEntityId = "legalId"
documentId = "documentId"
request = {
'acceptedBy': "UserId",
'ipAddress': "UserIpAddress"
}
self.adyen.client = self.test.create_client_from_file(204, request)
self.adyen.legalEntityManagement.terms_of_service_api.accept_terms_of_service(request, legalEntityId,
documentId)
self.adyen.client.http_client.request.assert_called_once_with(
'PATCH',
f'{self.lem_url}/legalEntities/{legalEntityId}/termsOfService/{documentId}',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
|
class TestManagement(unittest.TestCase):
def test_creating_legal_entity(self):
pass
def test_get_transfer_instrument(self):
pass
def test_update_business_line(self):
pass
def test_accept_terms_of_service(self):
pass
| 5 | 0 | 21 | 0 | 21 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 4 | 0 | 4 | 76 | 95 | 5 | 90 | 19 | 85 | 0 | 33 | 19 | 28 | 1 | 2 | 0 | 4 |
3,170 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/DisputesTest.py
|
test.DisputesTest.TestDisputes
|
class TestDisputes(unittest.TestCase):
adyen = Adyen.Adyen()
client = adyen.client
test = BaseTest(adyen)
client.xapikey = "YourXapikey"
client.platform = "test"
disputes_url = adyen.disputes.baseUrl
def test_accept_dispute(self):
request = {
"disputePspReference": "DZ4DPSHB4WD2WN82",
"merchantAccountCode": "YOUR_MERCHANT_ACCOUNT"
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/disputes/"
"post-acceptDispute-accept-dispute-200.json")
result = self.adyen.disputes.accept_dispute(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.disputes_url}/acceptDispute',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_defend_dispute(self):
request = {
"defenseReasonCode": "SupplyDefenseMaterial",
"disputePspReference": "DZ4DPSHB4WD2WN82",
"merchantAccountCode": "YOUR_MERCHANT_ACCOUNT"
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/disputes/"
"post-defendDispute-defend-dispute-200.json")
result = self.adyen.disputes.defend_dispute(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.disputes_url}/defendDispute',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_delete_defense_dispute_document(self):
request = {
"defenseDocumentType": "DefenseMaterial",
"disputePspReference": "DZ4DPSHB4WD2WN82",
"merchantAccountCode": "YOUR_MERCHANT_ACCOUNT"
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/disputes/"
"post-deleteDisputeDefenseDocument-delete-dispute-defense-document-200.json")
result = self.adyen.disputes.delete_dispute_defense_document(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.disputes_url}/deleteDisputeDefenseDocument',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_download_dispute_defense_document(self):
request = {
"disputePspReference": "DZ4DPSHB4WD2WN82",
"merchantAccountCode": "YOUR_MERCHANT_ACCOUNT"
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/disputes/"
"post-downloadDisputeDefenseDocument-download-dispute-defense-document-200.json")
result = self.adyen.disputes.delete_dispute_defense_document(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.disputes_url}/deleteDisputeDefenseDocument',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_retrieve_applicable_defense_reasons(self):
request = {
"disputePspReference": "DZ4DPSHB4WD2WN82",
"merchantAccountCode": "YOUR_MERCHANT_ACCOUNT"
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/disputes/"
"post-retrieveApplicableDefenseReasons-retrieve-defense-reasons-200.json")
result = self.adyen.disputes.retrieve_applicable_defense_reasons(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.disputes_url}/retrieveApplicableDefenseReasons',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_supply_defense_document(self):
request = {
"defenseDocuments": [
{
"content": "JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBv+f/ub0j6JPRX+E3EmC==",
"contentType": "application/pdf",
"defenseDocumentTypeCode": "DefenseMaterial"
}
],
"disputePspReference": "DZ4DPSHB4WD2WN82",
"merchantAccountCode": "YOUR_MERCHANT_ACCOUNT"
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/disputes/"
"post-supplyDefenseDocument-supply-defense-document-200.json")
result = self.adyen.disputes.supply_defense_document(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.disputes_url}/supplyDefenseDocument',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
|
class TestDisputes(unittest.TestCase):
def test_accept_dispute(self):
pass
def test_defend_dispute(self):
pass
def test_delete_defense_dispute_document(self):
pass
def test_download_dispute_defense_document(self):
pass
def test_retrieve_applicable_defense_reasons(self):
pass
def test_supply_defense_document(self):
pass
| 7 | 0 | 19 | 1 | 18 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 6 | 0 | 6 | 78 | 125 | 13 | 112 | 23 | 105 | 0 | 37 | 23 | 30 | 1 | 2 | 0 | 6 |
3,171 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/DetermineEndpointTest.py
|
test.DetermineEndpointTest.TestDetermineUrl
|
class TestDetermineUrl(unittest.TestCase):
adyen = Adyen.Adyen()
client = adyen.client
test = BaseTest(adyen)
client.xapikey = "YourXapikey"
checkout_url = adyen.checkout.payments_api.baseUrl
checkout_version = checkout_url.split('/')[-1]
payment_url = adyen.payment.payments_api.baseUrl
payment_version = payment_url.split('/')[-1]
binlookup_url = adyen.binlookup.baseUrl
management_url = adyen.management.account_merchant_level_api.baseUrl
def test_checkout_api_url_custom(self):
self.client.live_endpoint_prefix = "1797a841fbb37ca7-AdyenDemo"
url = self.adyen.client._determine_api_url("live", self.checkout_url + "/payments")
self.assertEqual("https://1797a841fbb37ca7-AdyenDemo-checkout-"
f"live.adyenpayments.com/checkout/{self.checkout_version}/payments", url)
def test_checkout_api_url(self):
self.client.live_endpoint_prefix = None
url = self.adyen.client._determine_api_url("test", self.checkout_url + "/payments/details")
self.assertEqual(url, f"{self.checkout_url}/payments/details")
def test_payments_invalid_platform(self):
request = {
'amount': {"value": "100000", "currency": "EUR"},
"reference": "Your order number",
'paymentMethod': {
"type": "scheme",
"number": "4111111111111111",
"expiryMonth": "08",
"expiryYear": "2018",
"holderName": "John Smith",
"cvc": "737"
},
'merchantAccount': "YourMerchantAccount",
'returnUrl': "https://your-company.com/..."
}
self.client.platform = "live"
self.client.live_endpoint_prefix = None
try:
self.adyen.checkout.payments_api.sessions(request)
except AdyenEndpointInvalidFormat as error:
self.assertIsNotNone(error)
def test_pal_url_live_endpoint_prefix_live_platform(self):
self.client.live_endpoint_prefix = "1797a841fbb37ca7-AdyenDemo"
url = self.adyen.client._determine_api_url(
"live", self.payment_url + "/payments"
)
self.assertEqual(
url,
("https://1797a841fbb37ca7-AdyenDemo-pal-"
f"live.adyenpayments.com/pal/servlet/Payment/{self.payment_version}/payments")
)
def test_pal_url_live_endpoint_prefix_test_platform(self):
self.client.live_endpoint_prefix = "1797a841fbb37ca7-AdyenDemo"
url = self.adyen.client._determine_api_url(
"test", self.payment_url + "/payments"
)
self.assertEqual(
url,
f"{self.payment_url}/payments")
def test_pal_url_no_live_endpoint_prefix_test_platform(self):
self.client.live_endpoint_prefix = None
url = self.adyen.client._determine_api_url(
"test", self.payment_url + "/payments"
)
self.assertEqual(
url,
f"{self.payment_url}/payments")
def test_binlookup_url_no_live_endpoint_prefix_test_platform(self):
self.client.live_endpoint_prefix = None
url = self.adyen.client._determine_api_url(
"test", self.binlookup_url + "/get3dsAvailability"
)
self.assertEqual(
url,
f"{self.binlookup_url}/get3dsAvailability"
)
def test_checkout_api_url_orders(self):
self.client.live_endpoint_prefix = None
url = self.adyen.client._determine_api_url("test", self.checkout_url +
"/orders")
self.assertEqual(url, f"{self.checkout_url}/orders")
def test_checkout_api_url_order_cancel(self):
self.client.live_endpoint_prefix = None
url = self.adyen.client._determine_api_url("test", self.checkout_url + "/orders/cancel")
self.assertEqual(url, f"{self.checkout_url}/orders/cancel")
def test_checkout_api_url_order_payment_methods_balance(self):
self.client.live_endpoint_prefix = None
url = self.adyen.client._determine_api_url("test", self.checkout_url + "/paymentMethods/balance")
self.assertEqual(url, f"{self.checkout_url}/paymentMethods/balance")
def test_checkout_api_url_sessions(self):
self.client.live_endpoint_prefix = None
url = self.adyen.client._determine_api_url("test", self.checkout_url + "/sessions")
self.assertEqual(url, f"{self.checkout_url}/sessions")
def test_management_api_url_companies(self):
companyId = "YOUR_COMPANY_ID"
url = self.adyen.client._determine_api_url("test", self.management_url + f'/companies/{companyId}/users')
self.assertEqual(url, f"{self.management_url}/companies/{companyId}/users")
|
class TestDetermineUrl(unittest.TestCase):
def test_checkout_api_url_custom(self):
pass
def test_checkout_api_url_custom(self):
pass
def test_payments_invalid_platform(self):
pass
def test_pal_url_live_endpoint_prefix_live_platform(self):
pass
def test_pal_url_live_endpoint_prefix_test_platform(self):
pass
def test_pal_url_no_live_endpoint_prefix_test_platform(self):
pass
def test_binlookup_url_no_live_endpoint_prefix_test_platform(self):
pass
def test_checkout_api_url_orders(self):
pass
def test_checkout_api_url_order_cancel(self):
pass
def test_checkout_api_url_order_payment_methods_balance(self):
pass
def test_checkout_api_url_sessions(self):
pass
def test_management_api_url_companies(self):
pass
| 13 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 12 | 0 | 12 | 84 | 113 | 16 | 97 | 36 | 84 | 0 | 63 | 35 | 50 | 2 | 2 | 1 | 13 |
3,172 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/DataProtectionTest.py
|
test.DataProtectionTest.TestCheckout
|
class TestCheckout(unittest.TestCase):
adyen = Adyen.Adyen()
client = adyen.client
test = BaseTest(adyen)
client.xapikey = "YourXapikey"
client.platform = "test"
data_protection_url = adyen.dataProtection.baseUrl
lib_version = settings.LIB_VERSION
def test_data_erasure(self):
request = {
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"pspReference": "9915520502347613",
"forceErasure": True
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/dataProtection/erasure-response.json")
result = self.adyen.dataProtection.request_subject_erasure(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.data_protection_url}'
'/requestSubjectErasure',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
xapikey="YourXapikey",
json=request
)
self.assertEqual("SUCCESS", result.message["result"])
|
class TestCheckout(unittest.TestCase):
def test_data_erasure(self):
pass
| 2 | 0 | 18 | 0 | 18 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 73 | 28 | 2 | 26 | 9 | 24 | 0 | 14 | 9 | 12 | 1 | 2 | 0 | 1 |
3,173 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/ClientTest.py
|
test.ClientTest.TestClient
|
class TestClient(unittest.TestCase):
adyen = Adyen.Adyen()
client = adyen.client
test = BaseTest(adyen)
client.xapikey = "YOUR_API_KEY"
client.platform = "test"
lib_version = settings.LIB_VERSION
|
class TestClient(unittest.TestCase):
pass
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 8 | 1 | 7 | 5 | 6 | 0 | 7 | 5 | 6 | 0 | 2 | 0 | 0 |
3,174 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/CheckoutUtilityTest.py
|
test.CheckoutUtilityTest.TestCheckoutUtility
|
class TestCheckoutUtility(unittest.TestCase):
ady = Adyen.Adyen()
client = ady.client
test = BaseTest(ady)
client.xapikey = "YourXapikey"
client.platform = "test"
checkout_url = ady.checkout.utility_api.baseUrl
def test_origin_keys_success_mocked(self):
request = {
"originDomains": {
"https://www.your-domain1.com",
"https://www.your-domain2.com",
"https://www.your-domain3.com"
}
}
self.ady.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkoututility/"
"originkeys"
"-success.json")
result = self.ady.checkout.utility_api.origin_keys(request)
self.assertEqual("pub.v2.7814286629520534.aHR0cHM6Ly93d3cu"
"eW91ci1kb21haW4xLmNvbQ.UEwIBmW9-c_uXo5wS"
"Er2w8Hz8hVIpujXPHjpcEse3xI",
result.message['originKeys']
['https://www.your-domain1.com'])
self.assertEqual("pub.v2.7814286629520534.aHR0cHM6Ly93d3cu"
"eW91ci1kb21haW4zLmNvbQ.fUvflu-YIdZSsLEH8"
"Qqmr7ksE4ag_NYiiMXK0s6aq_4",
result.message['originKeys']
['https://www.your-domain3.com'])
self.assertEqual("pub.v2.7814286629520534.aHR0cHM6Ly93d3cue"
"W91ci1kb21haW4yLmNvbQ.EP6eXBJKk0t7-QIUl6e_"
"b1qMuMHGepxG_SlUqxAYrfY",
result.message['originKeys']
['https://www.your-domain2.com'])
def test_checkout_utility_api_url_custom(self):
url = self.ady.client._determine_api_url("test", self.checkout_url + "/originKeys")
self.assertEqual(url, f"{self.checkout_url}/originKeys")
def test_applePay_session(self):
request = {
"displayName": "YOUR_MERCHANT_NAME",
"domainName": "YOUR_DOMAIN_NAME",
"merchantIdentifier": "YOUR_MERCHANT_ID"
}
self.ady.client = self.test.create_client_from_file(200, request, "test/mocks/"
"checkoututility/"
"applepay-sessions"
"-success.json")
result = self.ady.checkout.utility_api.get_apple_pay_session(request)
self.assertEqual("BASE_64_ENCODED_DATA", result.message['data'])
|
class TestCheckoutUtility(unittest.TestCase):
def test_origin_keys_success_mocked(self):
pass
def test_checkout_utility_api_url_custom(self):
pass
def test_applePay_session(self):
pass
| 4 | 0 | 16 | 2 | 15 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 3 | 0 | 3 | 75 | 60 | 9 | 51 | 13 | 47 | 0 | 22 | 13 | 18 | 1 | 2 | 0 | 3 |
3,175 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/CheckoutTest.py
|
test.CheckoutTest.TestCheckout
|
class TestCheckout(unittest.TestCase):
adyen = Adyen.Adyen()
client = adyen.client
test = BaseTest(adyen)
client.xapikey = "YourXapikey"
client.platform = "test"
baseUrl = adyen.checkout.payments_api.baseUrl
lib_version = settings.LIB_VERSION
def test_payment_methods_success_mocked(self):
request = {'merchantAccount': "YourMerchantAccount"}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"paymentmethods"
"-success.json")
result = self.adyen.checkout.payments_api.payment_methods(request)
self.assertEqual("AliPay", result.message['paymentMethods'][0]['name'])
self.assertEqual("Credit Card",
result.message['paymentMethods'][2]['name'])
self.assertEqual("Credit Card via AsiaPay",
result.message['paymentMethods'][3]['name'])
def test_payment_methods_error_mocked(self):
request = {'merchantAccount': "YourMerchantAccount"}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"paymentmethods-"
"error-forbidden"
"-403.json")
result = self.adyen.checkout.payments_api.payment_methods(request)
self.assertEqual(403, result.message['status'])
self.assertEqual("901", result.message['errorCode'])
self.assertEqual("Invalid Merchant Account", result.message['message'])
self.assertEqual("security", result.message['errorType'])
def test_payments_success_mocked(self):
request = {'amount': {"value": "100000", "currency": "EUR"},
'reference': "123456", 'paymentMethod': {
"type": "scheme",
"number": "4111111111111111",
"expiryMonth": "08",
"expiryYear": "2018",
"holderName": "John Smith",
"cvc": "737"
}, 'merchantAccount': "YourMerchantAccount",
'returnUrl': "https://your-company.com/..."}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"payments"
"-success"
".json")
result = self.adyen.checkout.payments_api.payments(request)
self.assertEqual("8535296650153317", result.message['pspReference'])
self.assertEqual("Authorised", result.message['resultCode'])
self.assertEqual("8/2018",
result.message["additionalData"]['expiryDate'])
self.assertEqual("GREEN",
result.message["additionalData"]['fraudResultType'])
def test_payments_error_mocked(self):
request = {'amount': {"value": "100000", "currency": "EUR"},
'reference': "54431", 'paymentMethod': {
"type": "scheme",
"number": "4111111111111111",
"expiryMonth": "08",
"expiryYear": "2018",
"holderName": "John Smith",
"cvc": "737"
}, 'merchantAccount': "YourMerchantAccount",
'returnUrl': "https://your-company.com/..."}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"payments-error"
"-invalid"
"-data-422"
".json")
result = self.adyen.checkout.payments_api.payments(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.baseUrl}/payments',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json={
'returnUrl': 'https://your-company.com/...',
'reference': '54431',
'merchantAccount': 'YourMerchantAccount',
'amount': {'currency': 'EUR', 'value': '100000'},
'paymentMethod': {
'expiryYear': '2018',
'holderName': 'John Smith',
'number': '4111111111111111',
'expiryMonth': '08',
'type': 'scheme',
'cvc': '737'
}
},
xapikey='YourXapikey'
)
self.assertEqual(422, result.message['status'])
self.assertEqual("130", result.message['errorCode'])
self.assertEqual("Reference Missing", result.message['message'])
self.assertEqual("validation", result.message['errorType'])
def test_payments_details_success_mocked(self):
request = {'paymentData': "Hee57361f99....", 'details': {
"MD": "sdfsdfsdf...",
"PaRes": "sdkfhskdjfsdf..."
}}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"paymentsdetails"
"-success.json")
result = self.adyen.checkout.payments_api.payments_details(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.baseUrl}/payments/details',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json={
'paymentData': 'Hee57361f99....',
'details': {'MD': 'sdfsdfsdf...', 'PaRes': 'sdkfhskdjfsdf...'}
},
xapikey='YourXapikey'
)
self.assertEqual("8515232733321252", result.message['pspReference'])
self.assertEqual("Authorised", result.message['resultCode'])
self.assertEqual("true",
result.message['additionalData']['liabilityShift'])
self.assertEqual("AUTHORISED",
result.message['additionalData']['refusalReasonRaw'])
def test_payments_details_error_mocked(self):
request = {'paymentData': "Hee57361f99....", 'details': {
"MD": "sdfsdfsdf...",
"PaRes": "sdkfhskdjfsdf..."
}}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"paymentsdetails"
"-error-invalid-"
"data-422.json")
result = self.adyen.checkout.payments_api.payments_details(request)
self.assertEqual(422, result.message['status'])
self.assertEqual("101", result.message['errorCode'])
self.assertEqual("Invalid card number", result.message['message'])
self.assertEqual("validation", result.message['errorType'])
def test_payments_cancels_without_reference(self):
requests = {
"paymentReference": "Payment123",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YourCancelReference",
}
self.adyen.client = self.test.create_client_from_file(200, requests,
"test/mocks/"
"checkout/"
"paymentscancel-"
"withoutreference-succes.json")
results = self.adyen.checkout.modifications_api.cancel_authorised_payment(requests)
self.assertIsNotNone(results.message['paymentReference'])
self.assertEqual("8412534564722331", results.message['pspReference'])
self.assertEqual("received", results.message['status'])
def test_payments_cancels_without_reference_error_mocked(self):
requests = {
"paymentReference": "Payment123",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YourCancelReference",
}
self.adyen.client = self.test.create_client_from_file(200, requests,
"test/mocks/"
"checkout/"
"paymentsresult"
"-error-invalid-"
"data-payload-"
"422.json")
result = self.adyen.checkout.modifications_api.cancel_authorised_payment(requests)
self.assertEqual(422, result.message['status'])
self.assertEqual("14_018", result.message['errorCode'])
self.assertEqual("Invalid payload provided", result.message['message'])
self.assertEqual("validation", result.message['errorType'])
def test_payments_cancels_success_mocked(self):
requests = {"reference": "Your wro order number", "merchantAccount": "YOUR_MERCHANT_ACCOUNT"}
reference_id = "8836183819713023"
self.adyen.client = self.test.create_client_from_file(200, requests,
"test/mocks/"
"checkout/"
"paymentscancels"
"-success.json")
result = self.adyen.checkout.modifications_api.refund_or_cancel_payment(requests, reference_id)
self.assertEqual(reference_id, result.message["paymentPspReference"])
self.assertEqual("received", result.message['status'])
def test_payments_cancels_error_mocked(self):
request = {"reference": "Your wro order number"}
psp_reference = "8836183819713023"
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"paymentsresult-error-invalid-"
"data-payload-422.json")
result = self.adyen.checkout.modifications_api.refund_or_cancel_payment(request, psp_reference)
self.assertEqual(422, result.message['status'])
self.assertEqual("14_018", result.message['errorCode'])
self.assertEqual("Invalid payload provided", result.message['message'])
self.assertEqual("validation", result.message['errorType'])
def test_payments_refunds_success_mocked(self):
requests = {
"paymentReference": "Payment123",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YourCancelReference",
}
psp_reference = "Payment123"
self.adyen.client = self.test.create_client_from_file(200, requests,
"test/mocks/"
"checkout/"
"paymentscancel-"
"withoutreference-succes.json")
result = self.adyen.checkout.modifications_api.refund_captured_payment(requests,psp_reference)
self.assertEqual(psp_reference, result.message["paymentReference"])
self.assertIsNotNone(result.message["pspReference"])
self.assertEqual("received", result.message['status'])
def test_payments_refunds_error_mocked(self):
requests = {
"paymentReference": "Payment123",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YourCancelReference",
}
reference_id = "Payment123"
self.adyen.client = self.test.create_client_from_file(200, requests,
"test/mocks/"
"checkout/"
"paymentsresult-error-invalid-"
"data-payload-422.json")
result = self.adyen.checkout.modifications_api.refund_captured_payment(requests, reference_id)
self.assertEqual(422, result.message['status'])
self.assertEqual("14_018", result.message['errorCode'])
self.assertEqual("Invalid payload provided", result.message['message'])
self.assertEqual("validation", result.message['errorType'])
def test_reversals_success_mocked(self):
requests = {
"reference": "YourReversalReference",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
}
psp_reference = "8836183819713023"
self.adyen.client = self.test.create_client_from_file(200, requests,
"test/mocks/"
"checkout/"
"paymentsreversals-"
"success.json")
result = self.adyen.checkout.modifications_api.refund_or_cancel_payment(requests, psp_reference)
self.assertEqual(psp_reference, result.message["paymentPspReference"])
self.assertIsNotNone(result.message["pspReference"])
self.assertEqual("received", result.message['status'])
def test_payments_reversals_failure_mocked(self):
requests = {
"reference": "YourReversalReference",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
}
psp_reference = "8836183819713023"
self.adyen.client = self.test.create_client_from_file(200, requests,
"test/mocks/"
"checkout/"
"paymentsresult-error-invalid-"
"data-payload-422.json")
result = self.adyen.checkout.modifications_api.refund_or_cancel_payment(requests,psp_reference)
self.assertEqual(422, result.message['status'])
self.assertEqual("14_018", result.message['errorCode'])
self.assertEqual("Invalid payload provided", result.message['message'])
self.assertEqual("validation", result.message['errorType'])
def test_payments_capture_success_mocked(self):
request = {
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"amount": {
"value": 2500,
"currency": "EUR"
},
"reference": "YOUR_UNIQUE_REFERENCE"
}
psp_reference = "8536214160615591"
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"paymentcapture-"
"success.json")
result = self.adyen.checkout.modifications_api.capture_authorised_payment(request, psp_reference)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.baseUrl}/payments/{psp_reference}/captures',
json=request,
xapikey='YourXapikey',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
)
self.assertEqual(psp_reference, result.message["paymentPspReference"])
self.assertIsNotNone(result.message["pspReference"])
self.assertEqual("received", result.message['status'])
self.assertEqual(2500, result.message['amount']['value'])
def test_payments_capture_error_mocked(self):
request = {
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"amount": {
"value": 2500,
"currency": "EUR"
},
"reference": "YOUR_UNIQUE_REFERENCE"
}
psp_reference = "8536214160615591"
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"paymentsresult-error-invalid-"
"data-payload-422.json")
result = self.adyen.checkout.modifications_api.capture_authorised_payment(request, psp_reference)
self.assertEqual(422, result.message['status'])
self.assertEqual("14_018", result.message['errorCode'])
self.assertEqual("Invalid payload provided", result.message['message'])
self.assertEqual("validation", result.message['errorType'])
def test_orders_success(self):
request = {'merchantAccount': "YourMerchantAccount"}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"orders"
"-success.json")
result = self.adyen.checkout.orders_api.orders(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.baseUrl}/orders',
json=request,
xapikey='YourXapikey',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
)
self.assertEqual("8515930288670953", result.message['pspReference'])
self.assertEqual("Success", result.message['resultCode'])
self.assertEqual("order reference", result.message['reference'])
self.assertEqual("EUR", result.message['remainingAmount']["currency"])
self.assertEqual(2500, result.message['remainingAmount']['value'])
def test_orders_cancel_success(self):
request = {'merchantAccount': "YourMerchantAccount"}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"orders-cancel"
"-success.json")
result = self.adyen.checkout.orders_api.cancel_order(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.baseUrl}/orders/cancel',
json=request,
xapikey='YourXapikey',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
)
self.assertEqual("8515931182066678", result.message['pspReference'])
self.assertEqual("Received", result.message['resultCode'])
def test_paymentmethods_balance_success(self):
request = {'merchantAccount': "YourMerchantAccount"}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"paymentmethods"
"-balance"
"-success.json")
result = self.adyen.checkout.orders_api.get_balance_of_gift_card(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.baseUrl}/paymentMethods/balance',
json=request,
xapikey='YourXapikey',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
)
self.assertEqual("851611111111713K", result.message['pspReference'])
self.assertEqual("Success", result.message['resultCode'])
self.assertEqual(100, result.message['balance']['value'])
self.assertEqual("EUR", result.message['balance']['currency'])
def test_sessions_success(self):
request = {'merchantAccount': "YourMerchantAccount"}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"sessions"
"-success.json")
result = self.adyen.checkout.payments_api.sessions(request)
self.assertEqual("session-test-id", result.message['id'])
self.assertEqual("TestReference", result.message['reference'])
self.assertEqual("http://test-url.com", result.message['returnUrl'])
def test_sessions_error(self):
request = {'merchantAccount': "YourMerchantAccount"}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"sessions"
"-error"
"-invalid"
"-data-422"
".json")
result = self.adyen.checkout.payments_api.sessions(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.baseUrl}/sessions',
json={'merchantAccount': 'YourMerchantAccount'},
xapikey='YourXapikey',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
)
self.assertEqual(422, result.message['status'])
self.assertEqual("130", result.message['errorCode'])
self.assertEqual("validation", result.message['errorType'])
def test_payment_link(self):
request = {
"reference": "YOUR_ORDER_NUMBER",
"amount": {
"value": 1250,
"currency": "BRL"
},
"countryCode": "BR",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"shopperReference": "YOUR_UNIQUE_SHOPPER_ID",
"shopperEmail": "test@email.com",
"shopperLocale": "pt-BR",
"billingAddress": {
"street": "Roque Petroni Jr",
"postalCode": "59000060",
"city": "São Paulo",
"houseNumberOrName": "999",
"country": "BR",
"stateOrProvince": "SP"
},
"deliveryAddress": {
"street": "Roque Petroni Jr",
"postalCode": "59000060",
"city": "São Paulo",
"houseNumberOrName": "999",
"country": "BR",
"stateOrProvince": "SP"
}
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/"
"checkout/"
"paymentlinks"
"-success"
".json")
result = self.adyen.checkout.payment_links_api.payment_links(request)
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.baseUrl}/paymentLinks',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
xapikey='YourXapikey',
json=request
)
self.assertEqual("YOUR_ORDER_NUMBER", result.message["reference"])
def test_get_payment_link(self):
id = "PL61C53A8B97E6915A"
self.adyen.client = self.test.create_client_from_file(200, None,
"test/mocks/"
"checkout/"
"getpaymenlinks"
"-succes.json")
result = self.adyen.checkout.payment_links_api.get_payment_link(id)
self.adyen.client.http_client.request.assert_called_once_with(
'GET',
f'{self.baseUrl}/paymentLinks/{id}',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
xapikey="YourXapikey",
json=None
)
self.assertEqual("TestMerchantCheckout", result.message["merchantAccount"])
def test_update_payment_link(self):
id = "PL61C53A8B97E6915A"
request = {
"status": "expired"
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/checkout"
"/updatepaymentlinks"
"-success.json")
result = self.adyen.checkout.payment_links_api.update_payment_link(request, id)
self.adyen.client.http_client.request.assert_called_once_with(
'PATCH',
f'{self.baseUrl}/paymentLinks/{id}',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
xapikey="YourXapikey",
json=request
)
self.assertEqual("expired",result.message["status"])
|
class TestCheckout(unittest.TestCase):
def test_payment_methods_success_mocked(self):
pass
def test_payment_methods_error_mocked(self):
pass
def test_payments_success_mocked(self):
pass
def test_payments_error_mocked(self):
pass
def test_payments_details_success_mocked(self):
pass
def test_payments_details_error_mocked(self):
pass
def test_payments_cancels_without_reference(self):
pass
def test_payments_cancels_without_reference_error_mocked(self):
pass
def test_payments_cancels_success_mocked(self):
pass
def test_payments_cancels_error_mocked(self):
pass
def test_payments_refunds_success_mocked(self):
pass
def test_payments_refunds_error_mocked(self):
pass
def test_reversals_success_mocked(self):
pass
def test_payments_reversals_failure_mocked(self):
pass
def test_payments_capture_success_mocked(self):
pass
def test_payments_capture_error_mocked(self):
pass
def test_orders_success(self):
pass
def test_orders_cancel_success(self):
pass
def test_paymentmethods_balance_success(self):
pass
def test_sessions_success(self):
pass
def test_sessions_error(self):
pass
def test_payment_link(self):
pass
def test_get_payment_link(self):
pass
def test_update_payment_link(self):
pass
| 25 | 0 | 20 | 1 | 20 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 24 | 0 | 24 | 96 | 520 | 41 | 479 | 85 | 454 | 0 | 201 | 85 | 176 | 1 | 2 | 0 | 24 |
3,176 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/transfers/__init__.py
|
Adyen.services.transfers.AdyenTransfersApi
|
class AdyenTransfersApi(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(AdyenTransfersApi, self).__init__(client=client)
self.capital_api = CapitalApi(client=client)
self.transactions_api = TransactionsApi(client=client)
self.transfers_api = TransfersApi(client=client)
|
class AdyenTransfersApi(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):
pass
| 2 | 1 | 5 | 0 | 5 | 0 | 1 | 0.67 | 1 | 4 | 3 | 0 | 1 | 3 | 1 | 4 | 12 | 2 | 6 | 5 | 4 | 4 | 6 | 5 | 4 | 1 | 3 | 0 | 1 |
3,177 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/transfers/transactions_api.py
|
Adyen.services.transfers.transactions_api.TransactionsApi
|
class TransactionsApi(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(TransactionsApi, self).__init__(client=client)
self.service = "transfers"
self.baseUrl = "https://balanceplatform-api-test.adyen.com/btl/v4"
def get_all_transactions(self, idempotency_key=None, **kwargs):
"""
Get all transactions
"""
endpoint = self.baseUrl + f"/transactions"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_transaction(self, id, idempotency_key=None, **kwargs):
"""
Get a transaction
"""
endpoint = self.baseUrl + f"/transactions/{id}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
|
class TransactionsApi(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):
pass
def get_all_transactions(self, idempotency_key=None, **kwargs):
'''
Get all transactions
'''
pass
def get_transaction(self, id, idempotency_key=None, **kwargs):
'''
Get a transaction
'''
pass
| 4 | 3 | 6 | 0 | 4 | 2 | 1 | 0.77 | 1 | 1 | 0 | 0 | 3 | 2 | 3 | 6 | 27 | 4 | 13 | 10 | 9 | 10 | 13 | 10 | 9 | 1 | 3 | 0 | 3 |
3,178 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/transfers/transfers_api.py
|
Adyen.services.transfers.transfers_api.TransfersApi
|
class TransfersApi(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(TransfersApi, self).__init__(client=client)
self.service = "transfers"
self.baseUrl = "https://balanceplatform-api-test.adyen.com/btl/v4"
def approve_initiated_transfers(self, request, idempotency_key=None, **kwargs):
"""
Approve initiated transfers
"""
endpoint = self.baseUrl + f"/transfers/approve"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def cancel_initiated_transfers(self, request, idempotency_key=None, **kwargs):
"""
Cancel initiated transfers
"""
endpoint = self.baseUrl + f"/transfers/cancel"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_all_transfers(self, idempotency_key=None, **kwargs):
"""
Get all transfers
"""
endpoint = self.baseUrl + f"/transfers"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_transfer(self, id, idempotency_key=None, **kwargs):
"""
Get a transfer
"""
endpoint = self.baseUrl + f"/transfers/{id}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def return_transfer(self, request, transferId, idempotency_key=None, **kwargs):
"""
Return a transfer
"""
endpoint = self.baseUrl + f"/transfers/{transferId}/returns"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def transfer_funds(self, request, idempotency_key=None, **kwargs):
"""
Transfer funds
"""
endpoint = self.baseUrl + f"/transfers"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class TransfersApi(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):
pass
def approve_initiated_transfers(self, request, idempotency_key=None, **kwargs):
'''
Approve initiated transfers
'''
pass
def cancel_initiated_transfers(self, request, idempotency_key=None, **kwargs):
'''
Cancel initiated transfers
'''
pass
def get_all_transfers(self, idempotency_key=None, **kwargs):
'''
Get all transfers
'''
pass
def get_transfer(self, id, idempotency_key=None, **kwargs):
'''
Get a transfer
'''
pass
def return_transfer(self, request, transferId, idempotency_key=None, **kwargs):
'''
Return a transfer
'''
pass
def transfer_funds(self, request, idempotency_key=None, **kwargs):
'''
Transfer funds
'''
pass
| 8 | 7 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 7 | 2 | 7 | 10 | 59 | 8 | 29 | 22 | 21 | 22 | 29 | 22 | 21 | 1 | 3 | 0 | 7 |
3,179 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/methodNamesTests/checkoutTest.py
|
checkoutTest.TestClassicCheckoutSDKApi
|
class TestClassicCheckoutSDKApi(unittest.TestCase):
client = checkout.classic_checkout_sdk_api
def test_payment_session(self):
self.assertIsNotNone(self.client.payment_session)
def test_verify_payment_result(self):
self.assertIsNotNone(self.client.verify_payment_result)
|
class TestClassicCheckoutSDKApi(unittest.TestCase):
def test_payment_session(self):
pass
def test_verify_payment_result(self):
pass
| 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 74 | 8 | 2 | 6 | 4 | 3 | 0 | 6 | 4 | 3 | 1 | 2 | 0 | 2 |
3,180 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/methodNamesTests/checkoutTest.py
|
checkoutTest.TestModificationsApi
|
class TestModificationsApi(unittest.TestCase):
client = checkout.modifications_api
def test_cancel_authorised_payment(self):
self.assertIsNotNone(self.client.cancel_authorised_payment)
def test_update_authorised_amount(self):
self.assertIsNotNone(self.client.update_authorised_amount)
def test_cancel_authorised_payment_by_psp_reference(self):
self.assertIsNotNone(self.client.cancel_authorised_payment_by_psp_reference)
def test_capture_authorised_payment(self):
self.assertIsNotNone(self.client.capture_authorised_payment)
def test_refund_captured_payment(self):
self.assertIsNotNone(self.client.refund_captured_payment)
def test_refund_or_cancel_payment(self):
self.assertIsNotNone(self.client.refund_or_cancel_payment)
|
class TestModificationsApi(unittest.TestCase):
def test_cancel_authorised_payment(self):
pass
def test_update_authorised_amount(self):
pass
def test_cancel_authorised_payment_by_psp_reference(self):
pass
def test_capture_authorised_payment(self):
pass
def test_refund_captured_payment(self):
pass
def test_refund_or_cancel_payment(self):
pass
| 7 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 6 | 0 | 6 | 78 | 20 | 6 | 14 | 8 | 7 | 0 | 14 | 8 | 7 | 1 | 2 | 0 | 6 |
3,181 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/api_credentials_company_level_api.py
|
Adyen.services.management.api_credentials_company_level_api.APICredentialsCompanyLevelApi
|
class APICredentialsCompanyLevelApi(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(APICredentialsCompanyLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def create_api_credential(self, request, companyId, idempotency_key=None, **kwargs):
"""
Create an API credential.
"""
endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_api_credential(self, companyId, apiCredentialId, idempotency_key=None, **kwargs):
"""
Get an API credential
"""
endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_api_credentials(self, companyId, idempotency_key=None, **kwargs):
"""
Get a list of API credentials
"""
endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def update_api_credential(self, request, companyId, apiCredentialId, idempotency_key=None, **kwargs):
"""
Update an API credential.
"""
endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class APICredentialsCompanyLevelApi(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):
pass
def create_api_credential(self, request, companyId, idempotency_key=None, **kwargs):
'''
Create an API credential.
'''
pass
def get_api_credential(self, companyId, apiCredentialId, idempotency_key=None, **kwargs):
'''
Get an API credential
'''
pass
def list_api_credentials(self, companyId, idempotency_key=None, **kwargs):
'''
Get a list of API credentials
'''
pass
def update_api_credential(self, request, companyId, apiCredentialId, idempotency_key=None, **kwargs):
'''
Update an API credential.
'''
pass
| 6 | 5 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 5 | 2 | 5 | 8 | 43 | 6 | 21 | 16 | 15 | 16 | 21 | 16 | 15 | 1 | 3 | 0 | 5 |
3,182 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/methodNamesTests/checkoutTest.py
|
checkoutTest.TestOrdersApi
|
class TestOrdersApi(unittest.TestCase):
client = checkout.orders_api
def test_orders(self):
self.assertIsNotNone(self.client.orders)
def test_cancel_order(self):
self.assertIsNotNone(self.client.cancel_order)
def test_get_balance_of_gift_card(self):
self.assertIsNotNone(self.client.get_balance_of_gift_card)
|
class TestOrdersApi(unittest.TestCase):
def test_orders(self):
pass
def test_cancel_order(self):
pass
def test_get_balance_of_gift_card(self):
pass
| 4 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 3 | 0 | 3 | 75 | 11 | 3 | 8 | 5 | 4 | 0 | 8 | 5 | 4 | 1 | 2 | 0 | 3 |
3,183 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/methodNamesTests/checkoutTest.py
|
checkoutTest.TestPaymentsApi
|
class TestPaymentsApi(unittest.TestCase):
client = checkout.payments_api
def test_card_details(self):
self.assertIsNotNone(self.client.card_details)
def test_donations(self):
self.assertIsNotNone(self.client.donations)
def test_payment_methods(self):
self.assertIsNotNone(self.client.payment_methods)
def test_payments(self):
self.assertIsNotNone(self.client.payments)
def test_payments_details(self):
self.assertIsNotNone(self.client.payments_details)
def test_sessions(self):
self.assertIsNotNone(self.client.sessions)
|
class TestPaymentsApi(unittest.TestCase):
def test_card_details(self):
pass
def test_donations(self):
pass
def test_payment_methods(self):
pass
def test_payments(self):
pass
def test_payments_details(self):
pass
def test_sessions(self):
pass
| 7 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 6 | 0 | 6 | 78 | 20 | 6 | 14 | 8 | 7 | 0 | 14 | 8 | 7 | 1 | 2 | 0 | 6 |
3,184 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/legalEntityManagement/legal_entities_api.py
|
Adyen.services.legalEntityManagement.legal_entities_api.LegalEntitiesApi
|
class LegalEntitiesApi(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(LegalEntitiesApi, self).__init__(client=client)
self.service = "legalEntityManagement"
self.baseUrl = "https://kyc-test.adyen.com/lem/v3"
def check_legal_entitys_verification_errors(self, id, idempotency_key=None, **kwargs):
"""
Check a legal entity's verification errors
"""
endpoint = self.baseUrl + f"/legalEntities/{id}/checkVerificationErrors"
method = "POST"
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)
def create_legal_entity(self, request, idempotency_key=None, **kwargs):
"""
Create a legal entity
"""
endpoint = self.baseUrl + f"/legalEntities"
method = "POST"
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)
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)
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)
|
class LegalEntitiesApi(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):
pass
def check_legal_entitys_verification_errors(self, id, idempotency_key=None, **kwargs):
'''
Check a legal entity's verification errors
'''
pass
def confirm_data_review(self, id, idempotency_key=None, **kwargs):
'''
Confirm data review
'''
pass
def create_legal_entity(self, request, idempotency_key=None, **kwargs):
'''
Create a legal entity
'''
pass
def get_all_business_lines_under_legal_entity(self, id, idempotency_key=None, **kwargs):
'''
Get all business lines under a legal entity
'''
pass
def get_legal_entity(self, id, idempotency_key=None, **kwargs):
'''
Get a legal entity
'''
pass
def update_legal_entity(self, request, id, idempotency_key=None, **kwargs):
'''
Update a legal entity
'''
pass
| 8 | 7 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 7 | 2 | 7 | 10 | 59 | 8 | 29 | 22 | 21 | 22 | 29 | 22 | 21 | 1 | 3 | 0 | 7 |
3,185 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/methodNamesTests/checkoutTest.py
|
checkoutTest.TestUtilityApi
|
class TestUtilityApi(unittest.TestCase):
client = checkout.utility_api
def test_get_apple_pay_session(self):
self.assertIsNotNone(self.client.get_apple_pay_session)
def test_origin_keys(self):
self.assertIsNotNone(self.client.origin_keys)
|
class TestUtilityApi(unittest.TestCase):
def test_get_apple_pay_session(self):
pass
def test_origin_keys(self):
pass
| 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 74 | 8 | 2 | 6 | 4 | 3 | 0 | 6 | 4 | 3 | 1 | 2 | 0 | 2 |
3,186 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/BalancePlatformTest.py
|
test.BalancePlatformTest.TestBalancePlatform
|
class TestBalancePlatform(unittest.TestCase):
adyen = Adyen.Adyen()
client = adyen.client
test = BaseTest(adyen)
client.xapikey = "YourXapikey"
client.platform = "test"
balance_platform_url = adyen.balancePlatform.platform_api.baseUrl
def test_creating_balance_account(self):
request = {
"accountHolderId": "AH32272223222B59K6ZKBBFNQ",
"description": "S.Hopper - Main balance account"
}
self.adyen.client = self.test.create_client_from_file(200, request,
"test/mocks/configuration/"
"balance-account-created.json")
result = self.adyen.balancePlatform.balance_accounts_api.create_balance_account(request)
self.assertEqual('AH32272223222B59K6ZKBBFNQ', result.message['accountHolderId'])
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.balance_platform_url}/balanceAccounts',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_creating_account_holder(self):
request = {
"description": "Liable account holder used for international payments and payouts",
"reference": "S.Eller-001",
"legalEntityId": "LE322JV223222D5GG42KN6869"
}
self.adyen.client = self.test.create_client_from_file(200, request, "test/mocks/configuration/"
"account-holder-created.json")
result = self.adyen.balancePlatform.account_holders_api.create_account_holder(request)
self.assertEqual("LE322JV223222D5GG42KN6869", result.message['legalEntityId'])
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.balance_platform_url}/accountHolders',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_get_balance_platform(self):
platform_id = "YOUR_BALANCE_PLATFORM"
self.adyen.client = self.test.create_client_from_file(200, None, "test/mocks/configuration/"
"balance-platform-retrieved.json")
result = self.adyen.balancePlatform.platform_api.get_balance_platform(platform_id)
self.assertEqual(platform_id, result.message['id'])
self.adyen.client.http_client.request.assert_called_once_with(
'GET',
f'{self.balance_platform_url}/balancePlatforms/{platform_id}',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=None,
xapikey="YourXapikey"
)
def test_creating_payment_instrument(self):
request = {
"type": "bankAccount",
"description": "YOUR_DESCRIPTION",
"balanceAccountId": "BA3227C223222B5CTBLR8BWJB",
"issuingCountryCode": "NL"
}
self.adyen.client = self.test.create_client_from_file(200, request, "test/mocks/configuration/"
"business-account-created.json")
result = self.adyen.balancePlatform.payment_instruments_api.create_payment_instrument(request)
self.assertEqual("BA3227C223222B5CTBLR8BWJB", result.message["balanceAccountId"])
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.balance_platform_url}/paymentInstruments',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_creating_payment_instrument_group(self):
request = {
"balancePlatform": "YOUR_BALANCE_PLATFORM",
"txVariant": "mc"
}
self.adyen.client = self.test.create_client_from_file(200, request, "test/mocks/configuration/"
"payment-instrument-group-created.json")
result = self.adyen.balancePlatform.payment_instrument_groups_api.create_payment_instrument_group(request)
self.assertEqual("YOUR_BALANCE_PLATFORM", result.message['balancePlatform'])
self.adyen.client.http_client.request.assert_called_once_with(
'POST',
f'{self.balance_platform_url}/paymentInstrumentGroups',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
def test_get_transaction_rule(self):
transactionRuleId = "TR32272223222B5CMD3V73HXG"
self.adyen.client = self.test.create_client_from_file(200, {}, "test/mocks/configuration/"
"transaction-rule-retrieved.json")
result = self.adyen.balancePlatform.transaction_rules_api.get_transaction_rule(transactionRuleId)
self.assertEqual(transactionRuleId, result.message['transactionRule']['id'])
self.adyen.client.http_client.request.assert_called_once_with(
'GET',
f'{self.balance_platform_url}/'
f'transactionRules/{transactionRuleId}',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=None,
xapikey="YourXapikey"
)
def test_update_network_token(self):
request = {
"status": "closed"
}
self.adyen.client = self.test.create_client_from_file(202, request)
result = self.adyen.balancePlatform.network_tokens_api.update_network_token(request, 'TK123ABC')
self.assertEqual(202, result.status_code)
self.assertEqual({}, result.message)
self.assertEqual("", result.raw_response)
self.adyen.client.http_client.request.assert_called_once_with(
'PATCH',
f'{self.balance_platform_url}/networkTokens/TK123ABC',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json=request,
xapikey="YourXapikey"
)
|
class TestBalancePlatform(unittest.TestCase):
def test_creating_balance_account(self):
pass
def test_creating_account_holder(self):
pass
def test_get_balance_platform(self):
pass
def test_creating_payment_instrument(self):
pass
def test_creating_payment_instrument_group(self):
pass
def test_get_transaction_rule(self):
pass
def test_update_network_token(self):
pass
| 8 | 0 | 16 | 0 | 16 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 7 | 0 | 7 | 79 | 128 | 10 | 118 | 26 | 110 | 0 | 51 | 26 | 43 | 1 | 2 | 0 | 7 |
3,187 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/BaseTest.py
|
test.BaseTest.BaseTest
|
class BaseTest:
def __init__(self, adyen):
self.ady = adyen
def create_client_from_file(self, status, request, filename=None):
if filename:
with open(filename) as data_file:
data = json.load(data_file)
st = open(filename)
strjson = st.read()
else:
data = {}
st = ""
strjson = ""
self.ady.client.http_client = httpclient.HTTPClient
self.ady.client.http_init = True
self.ady.client.http_client.request = mock.MagicMock(
return_value=[strjson, request, status, data])
mockclient = self.ady.client
if st:
st.close()
return mockclient
|
class BaseTest:
def __init__(self, adyen):
pass
def create_client_from_file(self, status, request, filename=None):
pass
| 3 | 0 | 11 | 1 | 10 | 0 | 2 | 0 | 0 | 1 | 1 | 0 | 2 | 1 | 2 | 2 | 24 | 3 | 21 | 9 | 18 | 0 | 19 | 8 | 16 | 3 | 0 | 2 | 4 |
3,188 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/BinLookupTest.py
|
test.BinLookupTest.TestBinLookup
|
class TestBinLookup(unittest.TestCase):
ady = Adyen.Adyen()
client = ady.client
test = BaseTest(ady)
client.username = "YourWSUser"
client.password = "YourWSPassword"
client.platform = "test"
binLookup_version = ady.binlookup.baseUrl.split('/')[-1]
def test_get_cost_estimate_success(self):
self.ady.client.http_client.request.reset_mock()
expected = {
'cardBin': {
'bin': '458012',
'commercial': False,
'fundingSource': 'CHARGE',
'fundsAvailability': 'N',
'issuingBank': 'Bank Of America',
'issuingCountry': 'US', 'issuingCurrency': 'USD',
'paymentMethod': 'Y',
'summary': '6789'
},
'costEstimateAmount': {
'currency': 'USD', 'value': 1234
},
'resultCode': 'Success',
'surchargeType': 'PASSTHROUGH'
}
self.ady.client = self.test.create_client_from_file(
status=200,
request=REQUEST_KWARGS,
filename='test/mocks/binlookup/getcostestimate-success.json'
)
result = self.ady.binlookup.get_cost_estimate(REQUEST_KWARGS)
self.assertEqual(expected, result.message)
self.ady.client.http_client.request.assert_called_once_with(
'POST',
'https://pal-test.adyen.com/pal/servlet/'
f'BinLookup/{self.binLookup_version}/getCostEstimate',
headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION},
json={
'merchantAccount': 'YourMerchantAccount',
'amount': '1000',
},
password='YourWSPassword',
username='YourWSUser'
)
def test_get_cost_estimate_error_mocked(self):
self.ady.client = self.test.create_client_from_file(
status=200,
request=REQUEST_KWARGS,
filename=(
"test/mocks/binlookup/"
"getcostestimate-error-invalid-data-422.json"
)
)
result = self.ady.binlookup.get_cost_estimate(REQUEST_KWARGS)
self.assertEqual(422, result.message['status'])
self.assertEqual("101", result.message['errorCode'])
self.assertEqual("Invalid card number", result.message['message'])
self.assertEqual("validation", result.message['errorType'])
|
class TestBinLookup(unittest.TestCase):
def test_get_cost_estimate_success(self):
pass
def test_get_cost_estimate_error_mocked(self):
pass
| 3 | 0 | 28 | 2 | 26 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 74 | 66 | 6 | 60 | 10 | 57 | 0 | 22 | 10 | 19 | 1 | 2 | 0 | 2 |
3,189 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/methodNamesTests/checkoutTest.py
|
checkoutTest.TestPaymentLinksApi
|
class TestPaymentLinksApi(unittest.TestCase):
client = checkout.payment_links_api
def test_get_payment_link(self):
self.assertIsNotNone(self.client.get_payment_link)
def test_update_payment_link(self):
self.assertIsNotNone(self.client.update_payment_link)
def test_payment_links(self):
self.assertIsNotNone(self.client.payment_links)
|
class TestPaymentLinksApi(unittest.TestCase):
def test_get_payment_link(self):
pass
def test_update_payment_link(self):
pass
def test_payment_links(self):
pass
| 4 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 3 | 0 | 3 | 75 | 11 | 3 | 8 | 5 | 4 | 0 | 8 | 5 | 4 | 1 | 2 | 0 | 3 |
3,190 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/android_files_company_level_api.py
|
Adyen.services.management.android_files_company_level_api.AndroidFilesCompanyLevelApi
|
class AndroidFilesCompanyLevelApi(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(AndroidFilesCompanyLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def get_android_app(self, companyId, id, idempotency_key=None, **kwargs):
"""
Get Android app
"""
endpoint = self.baseUrl + f"/companies/{companyId}/androidApps/{id}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_android_apps(self, companyId, idempotency_key=None, **kwargs):
"""
Get a list of Android apps
"""
endpoint = self.baseUrl + f"/companies/{companyId}/androidApps"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_android_certificates(self, companyId, idempotency_key=None, **kwargs):
"""
Get a list of Android certificates
"""
endpoint = self.baseUrl + f"/companies/{companyId}/androidCertificates"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def reprocess_android_app(self, companyId, id, idempotency_key=None, **kwargs):
"""
Reprocess Android App
"""
endpoint = self.baseUrl + f"/companies/{companyId}/androidApps/{id}"
method = "PATCH"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def upload_android_app(self, companyId, idempotency_key=None, **kwargs):
"""
Upload Android App
"""
endpoint = self.baseUrl + f"/companies/{companyId}/androidApps"
method = "POST"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def upload_android_certificate(self, companyId, idempotency_key=None, **kwargs):
"""
Upload Android Certificate
"""
endpoint = self.baseUrl + f"/companies/{companyId}/androidCertificates"
method = "POST"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
|
class AndroidFilesCompanyLevelApi(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):
pass
def get_android_app(self, companyId, id, idempotency_key=None, **kwargs):
'''
Get Android app
'''
pass
def list_android_apps(self, companyId, idempotency_key=None, **kwargs):
'''
Get a list of Android apps
'''
pass
def list_android_certificates(self, companyId, idempotency_key=None, **kwargs):
'''
Get a list of Android certificates
'''
pass
def reprocess_android_app(self, companyId, id, idempotency_key=None, **kwargs):
'''
Reprocess Android App
'''
pass
def upload_android_app(self, companyId, idempotency_key=None, **kwargs):
'''
Upload Android App
'''
pass
def upload_android_certificate(self, companyId, idempotency_key=None, **kwargs):
'''
Upload Android Certificate
'''
pass
| 8 | 7 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 7 | 2 | 7 | 10 | 59 | 8 | 29 | 22 | 21 | 22 | 29 | 22 | 21 | 1 | 3 | 0 | 7 |
3,191 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/test/methodNamesTests/checkoutTest.py
|
checkoutTest.TestRecurringApi
|
class TestRecurringApi(unittest.TestCase):
client = checkout.recurring_api
def test_delete_token_for_stored_payment_details(self):
self.assertIsNotNone(self.client.delete_token_for_stored_payment_details)
def test_get_tokens_for_stored_payment_details(self):
self.assertIsNotNone(self.client.get_tokens_for_stored_payment_details)
|
class TestRecurringApi(unittest.TestCase):
def test_delete_token_for_stored_payment_details(self):
pass
def test_get_tokens_for_stored_payment_details(self):
pass
| 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 74 | 8 | 2 | 6 | 4 | 3 | 0 | 6 | 4 | 3 | 1 | 2 | 0 | 2 |
3,192 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/allowed_origins_company_level_api.py
|
Adyen.services.management.allowed_origins_company_level_api.AllowedOriginsCompanyLevelApi
|
class AllowedOriginsCompanyLevelApi(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(AllowedOriginsCompanyLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def create_allowed_origin(self, request, companyId, apiCredentialId, idempotency_key=None, **kwargs):
"""
Create an allowed origin
"""
endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def delete_allowed_origin(self, companyId, apiCredentialId, originId, idempotency_key=None, **kwargs):
"""
Delete an allowed origin
"""
endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"
method = "DELETE"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_allowed_origin(self, companyId, apiCredentialId, originId, idempotency_key=None, **kwargs):
"""
Get an allowed origin
"""
endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_allowed_origins(self, companyId, apiCredentialId, idempotency_key=None, **kwargs):
"""
Get a list of allowed origins
"""
endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
|
class AllowedOriginsCompanyLevelApi(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):
pass
def create_allowed_origin(self, request, companyId, apiCredentialId, idempotency_key=None, **kwargs):
'''
Create an allowed origin
'''
pass
def delete_allowed_origin(self, companyId, apiCredentialId, originId, idempotency_key=None, **kwargs):
'''
Delete an allowed origin
'''
pass
def get_allowed_origin(self, companyId, apiCredentialId, originId, idempotency_key=None, **kwargs):
'''
Get an allowed origin
'''
pass
def list_allowed_origins(self, companyId, apiCredentialId, idempotency_key=None, **kwargs):
'''
Get a list of allowed origins
'''
pass
| 6 | 5 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 5 | 2 | 5 | 8 | 43 | 6 | 21 | 16 | 15 | 16 | 21 | 16 | 15 | 1 | 3 | 0 | 5 |
3,193 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/legalEntityManagement/tax_e_delivery_consent_api.py
|
Adyen.services.legalEntityManagement.tax_e_delivery_consent_api.TaxEDeliveryConsentApi
|
class TaxEDeliveryConsentApi(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(TaxEDeliveryConsentApi, self).__init__(client=client)
self.service = "legalEntityManagement"
self.baseUrl = "https://kyc-test.adyen.com/lem/v3"
def check_status_of_consent_for_electronic_delivery_of_tax_forms(self, id, idempotency_key=None, **kwargs):
"""
Check the status of consent for electronic delivery of tax forms
"""
endpoint = self.baseUrl + f"/legalEntities/{id}/checkTaxElectronicDeliveryConsent"
method = "POST"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def set_consent_status_for_electronic_delivery_of_tax_forms(self, request, id, idempotency_key=None, **kwargs):
"""
Set the consent status for electronic delivery of tax forms
"""
endpoint = self.baseUrl + f"/legalEntities/{id}/setTaxElectronicDeliveryConsent"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class TaxEDeliveryConsentApi(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):
pass
def check_status_of_consent_for_electronic_delivery_of_tax_forms(self, id, idempotency_key=None, **kwargs):
'''
Check the status of consent for electronic delivery of tax forms
'''
pass
def set_consent_status_for_electronic_delivery_of_tax_forms(self, request, id, idempotency_key=None, **kwargs):
'''
Set the consent status for electronic delivery of tax forms
'''
pass
| 4 | 3 | 6 | 0 | 4 | 2 | 1 | 0.77 | 1 | 1 | 0 | 0 | 3 | 2 | 3 | 6 | 27 | 4 | 13 | 10 | 9 | 10 | 13 | 10 | 9 | 1 | 3 | 0 | 3 |
3,194 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/legalEntityManagement/terms_of_service_api.py
|
Adyen.services.legalEntityManagement.terms_of_service_api.TermsOfServiceApi
|
class TermsOfServiceApi(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(TermsOfServiceApi, self).__init__(client=client)
self.service = "legalEntityManagement"
self.baseUrl = "https://kyc-test.adyen.com/lem/v3"
def accept_terms_of_service(self, request, id, termsofservicedocumentid, idempotency_key=None, **kwargs):
"""
Accept Terms of Service
"""
endpoint = self.baseUrl + f"/legalEntities/{id}/termsOfService/{termsofservicedocumentid}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_accepted_terms_of_service_document(self, id, termsofserviceacceptancereference, idempotency_key=None, **kwargs):
"""
Get accepted Terms of Service document
"""
endpoint = self.baseUrl + f"/legalEntities/{id}/acceptedTermsOfServiceDocument/{termsofserviceacceptancereference}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_terms_of_service_document(self, request, id, idempotency_key=None, **kwargs):
"""
Get Terms of Service document
"""
endpoint = self.baseUrl + f"/legalEntities/{id}/termsOfService"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_terms_of_service_information_for_legal_entity(self, id, idempotency_key=None, **kwargs):
"""
Get Terms of Service information for a legal entity
"""
endpoint = self.baseUrl + f"/legalEntities/{id}/termsOfServiceAcceptanceInfos"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_terms_of_service_status(self, id, idempotency_key=None, **kwargs):
"""
Get Terms of Service status
"""
endpoint = self.baseUrl + f"/legalEntities/{id}/termsOfServiceStatus"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
|
class TermsOfServiceApi(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):
pass
def accept_terms_of_service(self, request, id, termsofservicedocumentid, idempotency_key=None, **kwargs):
'''
Accept Terms of Service
'''
pass
def get_accepted_terms_of_service_document(self, id, termsofserviceacceptancereference, idempotency_key=None, **kwargs):
'''
Get accepted Terms of Service document
'''
pass
def get_terms_of_service_document(self, request, id, idempotency_key=None, **kwargs):
'''
Get Terms of Service document
'''
pass
def get_terms_of_service_information_for_legal_entity(self, id, idempotency_key=None, **kwargs):
'''
Get Terms of Service information for a legal entity
'''
pass
def get_terms_of_service_status(self, id, idempotency_key=None, **kwargs):
'''
Get Terms of Service status
'''
pass
| 7 | 6 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 6 | 2 | 6 | 9 | 51 | 7 | 25 | 19 | 18 | 19 | 25 | 19 | 18 | 1 | 3 | 0 | 6 |
3,195 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/allowed_origins_merchant_level_api.py
|
Adyen.services.management.allowed_origins_merchant_level_api.AllowedOriginsMerchantLevelApi
|
class AllowedOriginsMerchantLevelApi(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(AllowedOriginsMerchantLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def create_allowed_origin(self, request, merchantId, apiCredentialId, idempotency_key=None, **kwargs):
"""
Create an allowed origin
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def delete_allowed_origin(self, merchantId, apiCredentialId, originId, idempotency_key=None, **kwargs):
"""
Delete an allowed origin
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"
method = "DELETE"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_allowed_origin(self, merchantId, apiCredentialId, originId, idempotency_key=None, **kwargs):
"""
Get an allowed origin
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_allowed_origins(self, merchantId, apiCredentialId, idempotency_key=None, **kwargs):
"""
Get a list of allowed origins
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
|
class AllowedOriginsMerchantLevelApi(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):
pass
def create_allowed_origin(self, request, merchantId, apiCredentialId, idempotency_key=None, **kwargs):
'''
Create an allowed origin
'''
pass
def delete_allowed_origin(self, merchantId, apiCredentialId, originId, idempotency_key=None, **kwargs):
'''
Delete an allowed origin
'''
pass
def get_allowed_origin(self, merchantId, apiCredentialId, originId, idempotency_key=None, **kwargs):
'''
Get an allowed origin
'''
pass
def list_allowed_origins(self, merchantId, apiCredentialId, idempotency_key=None, **kwargs):
'''
Get a list of allowed origins
'''
pass
| 6 | 5 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 5 | 2 | 5 | 8 | 43 | 6 | 21 | 16 | 15 | 16 | 21 | 16 | 15 | 1 | 3 | 0 | 5 |
3,196 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/legalEntityManagement/transfer_instruments_api.py
|
Adyen.services.legalEntityManagement.transfer_instruments_api.TransferInstrumentsApi
|
class TransferInstrumentsApi(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(TransferInstrumentsApi, self).__init__(client=client)
self.service = "legalEntityManagement"
self.baseUrl = "https://kyc-test.adyen.com/lem/v3"
def create_transfer_instrument(self, request, idempotency_key=None, **kwargs):
"""
Create a transfer instrument
"""
endpoint = self.baseUrl + f"/transferInstruments"
method = "POST"
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)
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)
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)
|
class TransferInstrumentsApi(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):
pass
def create_transfer_instrument(self, request, idempotency_key=None, **kwargs):
'''
Create a transfer instrument
'''
pass
def delete_transfer_instrument(self, id, idempotency_key=None, **kwargs):
'''
Delete a transfer instrument
'''
pass
def get_transfer_instrument(self, id, idempotency_key=None, **kwargs):
'''
Get a transfer instrument
'''
pass
def update_transfer_instrument(self, request, id, idempotency_key=None, **kwargs):
'''
Update a transfer instrument
'''
pass
| 6 | 5 | 6 | 0 | 4 | 2 | 1 | 0.76 | 1 | 1 | 0 | 0 | 5 | 2 | 5 | 8 | 43 | 6 | 21 | 16 | 15 | 16 | 21 | 16 | 15 | 1 | 3 | 0 | 5 |
3,197 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/split_configuration_merchant_level_api.py
|
Adyen.services.management.split_configuration_merchant_level_api.SplitConfigurationMerchantLevelApi
|
class SplitConfigurationMerchantLevelApi(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(SplitConfigurationMerchantLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def create_rule(self, request, merchantId, splitConfigurationId, idempotency_key=None, **kwargs):
"""
Create a rule
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def create_split_configuration(self, request, merchantId, idempotency_key=None, **kwargs):
"""
Create a split configuration
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/splitConfigurations"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def delete_split_configuration(self, merchantId, splitConfigurationId, idempotency_key=None, **kwargs):
"""
Delete a split configuration
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}"
method = "DELETE"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def delete_split_configuration_rule(self, merchantId, splitConfigurationId, ruleId, idempotency_key=None, **kwargs):
"""
Delete a split configuration rule
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}"
method = "DELETE"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_split_configuration(self, merchantId, splitConfigurationId, idempotency_key=None, **kwargs):
"""
Get a split configuration
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_split_configurations(self, merchantId, idempotency_key=None, **kwargs):
"""
Get a list of split configurations
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/splitConfigurations"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def update_split_conditions(self, request, merchantId, splitConfigurationId, ruleId, idempotency_key=None, **kwargs):
"""
Update split conditions
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def update_split_configuration_description(self, request, merchantId, splitConfigurationId, idempotency_key=None, **kwargs):
"""
Update split configuration description
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def update_split_logic(self, request, merchantId, splitConfigurationId, ruleId, splitLogicId, idempotency_key=None, **kwargs):
"""
Update the split logic
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}/splitLogic/{splitLogicId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class SplitConfigurationMerchantLevelApi(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):
pass
def create_rule(self, request, merchantId, splitConfigurationId, idempotency_key=None, **kwargs):
'''
Create a rule
'''
pass
def create_split_configuration(self, request, merchantId, idempotency_key=None, **kwargs):
'''
Create a split configuration
'''
pass
def delete_split_configuration(self, merchantId, splitConfigurationId, idempotency_key=None, **kwargs):
'''
Delete a split configuration
'''
pass
def delete_split_configuration_rule(self, merchantId, splitConfigurationId, ruleId, idempotency_key=None, **kwargs):
'''
Delete a split configuration rule
'''
pass
def get_split_configuration(self, merchantId, splitConfigurationId, idempotency_key=None, **kwargs):
'''
Get a split configuration
'''
pass
def list_split_configurations(self, merchantId, idempotency_key=None, **kwargs):
'''
Get a list of split configurations
'''
pass
def update_split_conditions(self, request, merchantId, splitConfigurationId, ruleId, idempotency_key=None, **kwargs):
'''
Update split conditions
'''
pass
def update_split_configuration_description(self, request, merchantId, splitConfigurationId, idempotency_key=None, **kwargs):
'''
Update split configuration description
'''
pass
def update_split_logic(self, request, merchantId, splitConfigurationId, ruleId, splitLogicId, idempotency_key=None, **kwargs):
'''
Update the split logic
'''
pass
| 11 | 10 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 10 | 2 | 10 | 13 | 83 | 11 | 41 | 31 | 30 | 31 | 41 | 31 | 30 | 1 | 3 | 0 | 10 |
3,198 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/__init__.py
|
Adyen.services.management.AdyenManagementApi
|
class AdyenManagementApi(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(AdyenManagementApi, self).__init__(client=client)
self.api_credentials_company_level_api = APICredentialsCompanyLevelApi(client=client)
self.api_credentials_merchant_level_api = APICredentialsMerchantLevelApi(client=client)
self.api_key_company_level_api = APIKeyCompanyLevelApi(client=client)
self.api_key_merchant_level_api = APIKeyMerchantLevelApi(client=client)
self.account_company_level_api = AccountCompanyLevelApi(client=client)
self.account_merchant_level_api = AccountMerchantLevelApi(client=client)
self.account_store_level_api = AccountStoreLevelApi(client=client)
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_key_company_level_api = ClientKeyCompanyLevelApi(client=client)
self.client_key_merchant_level_api = ClientKeyMerchantLevelApi(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)
self.split_configuration_merchant_level_api = SplitConfigurationMerchantLevelApi(client=client)
self.terminal_actions_company_level_api = TerminalActionsCompanyLevelApi(client=client)
self.terminal_actions_terminal_level_api = TerminalActionsTerminalLevelApi(client=client)
self.terminal_orders_company_level_api = TerminalOrdersCompanyLevelApi(client=client)
self.terminal_orders_merchant_level_api = TerminalOrdersMerchantLevelApi(client=client)
self.terminal_settings_company_level_api = TerminalSettingsCompanyLevelApi(client=client)
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.terminals_terminal_level_api = TerminalsTerminalLevelApi(client=client)
self.users_company_level_api = UsersCompanyLevelApi(client=client)
self.users_merchant_level_api = UsersMerchantLevelApi(client=client)
self.webhooks_company_level_api = WebhooksCompanyLevelApi(client=client)
self.webhooks_merchant_level_api = WebhooksMerchantLevelApi(client=client)
|
class AdyenManagementApi(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):
pass
| 2 | 1 | 31 | 0 | 31 | 0 | 1 | 0.13 | 1 | 30 | 29 | 0 | 1 | 29 | 1 | 4 | 38 | 2 | 32 | 31 | 30 | 4 | 32 | 31 | 30 | 1 | 3 | 0 | 1 |
3,199 |
Adyen/adyen-python-api-library
|
Adyen_adyen-python-api-library/Adyen/services/management/account_store_level_api.py
|
Adyen.services.management.account_store_level_api.AccountStoreLevelApi
|
class AccountStoreLevelApi(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(AccountStoreLevelApi, self).__init__(client=client)
self.service = "management"
self.baseUrl = "https://management-test.adyen.com/v3"
def create_store(self, request, idempotency_key=None, **kwargs):
"""
Create a store
"""
endpoint = self.baseUrl + f"/stores"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def create_store_by_merchant_id(self, request, merchantId, idempotency_key=None, **kwargs):
"""
Create a store
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/stores"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def get_store(self, merchantId, storeId, idempotency_key=None, **kwargs):
"""
Get a store
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/stores/{storeId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def get_store_by_id(self, storeId, idempotency_key=None, **kwargs):
"""
Get a store
"""
endpoint = self.baseUrl + f"/stores/{storeId}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_stores(self, idempotency_key=None, **kwargs):
"""
Get a list of stores
"""
endpoint = self.baseUrl + f"/stores"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def list_stores_by_merchant_id(self, merchantId, idempotency_key=None, **kwargs):
"""
Get a list of stores
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/stores"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
def update_store(self, request, merchantId, storeId, idempotency_key=None, **kwargs):
"""
Update a store
"""
endpoint = self.baseUrl + f"/merchants/{merchantId}/stores/{storeId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
def update_store_by_id(self, request, storeId, idempotency_key=None, **kwargs):
"""
Update a store
"""
endpoint = self.baseUrl + f"/stores/{storeId}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
|
class AccountStoreLevelApi(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):
pass
def create_store(self, request, idempotency_key=None, **kwargs):
'''
Create a store
'''
pass
def create_store_by_merchant_id(self, request, merchantId, idempotency_key=None, **kwargs):
'''
Create a store
'''
pass
def get_store(self, merchantId, storeId, idempotency_key=None, **kwargs):
'''
Get a store
'''
pass
def get_store_by_id(self, storeId, idempotency_key=None, **kwargs):
'''
Get a store
'''
pass
def list_stores(self, idempotency_key=None, **kwargs):
'''
Get a list of stores
'''
pass
def list_stores_by_merchant_id(self, merchantId, idempotency_key=None, **kwargs):
'''
Get a list of stores
'''
pass
def update_store(self, request, merchantId, storeId, idempotency_key=None, **kwargs):
'''
Update a store
'''
pass
def update_store_by_id(self, request, storeId, idempotency_key=None, **kwargs):
'''
Update a store
'''
pass
| 10 | 9 | 7 | 0 | 4 | 3 | 1 | 0.76 | 1 | 1 | 0 | 0 | 9 | 2 | 9 | 12 | 75 | 10 | 37 | 28 | 27 | 28 | 37 | 28 | 27 | 1 | 3 | 0 | 9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.