-
Notifications
You must be signed in to change notification settings - Fork 47
[PW-7634] - Generate BinLookup #208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fb0ba37
Generate BinLookup
antolo-arch 6cf92e1
fix unit test
antolo-arch 2d06ce9
Merge branch 'develop' into PW-7634
antolo-arch e945501
Update Adyen/services/binLookup.py
antolo-arch 5ef90a7
Update Adyen/services/binLookup.py
antolo-arch b23e161
update names in unit tests
antolo-arch 90905c6
Merge branch 'develop' into PW-7634
antolo-arch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,42 @@ | ||
from .base import AdyenServiceBase | ||
""" | ||
Adyen BinLookup API | ||
|
||
The BIN Lookup API provides endpoints for retrieving information, such as cost estimates, and 3D Secure supported version based on a given BIN. ## Authentication You need an [API credential](https://docs.adyen.com/development-resources/api-credentials) to authenticate to the API. If using an API key, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication, for example: ``` curl -U \"ws@Company.YOUR_COMPANY_ACCOUNT\":\"YOUR_BASIC_AUTHENTICATION_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` ## Versioning The BinLookup API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://pal-test.adyen.com/pal/servlet/BinLookup/v52/get3dsAvailability ```## Going live To authneticate to the live endpoints, you need an [API credential](https://docs.adyen.com/development-resources/api-credentials) from your live Customer Area. The live endpoint URLs contain a prefix which is unique to your company account: ``` https://{PREFIX}-pal-live.adyenpayments.com/pal/servlet/BinLookup/v52/get3dsAvailability ``` Get your `{PREFIX}` from your live Customer Area under **Developers** > **API URLs** > **Prefix**. # noqa: E501 | ||
|
||
The version of the OpenAPI document: 52 | ||
Contact: developer-experience@adyen.com | ||
Generated by: https://openapi-generator.tech | ||
""" | ||
|
||
from .base import AdyenServiceBase | ||
|
||
class AdyenBinLookup(AdyenServiceBase): | ||
"""This represents the Adyen API Bin Lookup service. | ||
|
||
API call currently implemented: getCostEstimate. | ||
Please refer to the Bin Lookup Manual for specifics around the API. | ||
https://docs.adyen.com/api-explorer/#/BinLookup/ | ||
class AdyenBinlookupApi(AdyenServiceBase): | ||
"""NOTE: This class is auto generated by OpenAPI Generator | ||
Ref: https://openapi-generator.tech | ||
|
||
Args: | ||
client (AdyenAPIClient, optional): An API client for the service to | ||
use. If not provided, a new API client will be created. | ||
Do not edit the class manually. | ||
""" | ||
|
||
def __init__(self, client=None): | ||
super(AdyenBinLookup, self).__init__(client=client) | ||
self.service = "BinLookup" | ||
super(AdyenBinlookupApi, self).__init__(client=client) | ||
self.service = "binlookup" | ||
|
||
def get_cost_estimate(self, request="", **kwargs): | ||
def get_3ds_availability(self, request, idempotency_key=None, **kwargs): | ||
""" | ||
Check if 3D Secure is available | ||
""" | ||
endpoint = f"/get3dsAvailability" | ||
endpoint = endpoint.replace('/', '', 1) | ||
method = "POST" | ||
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) | ||
|
||
action = "getCostEstimate" | ||
def get_cost_estimate(self, request, idempotency_key=None, **kwargs): | ||
""" | ||
Get a fees cost estimate | ||
""" | ||
endpoint = f"/getCostEstimate" | ||
endpoint = endpoint.replace('/', '', 1) | ||
method = "POST" | ||
return self.client.call_adyen_api(request, self.service, method, action, **kwargs) | ||
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.