Skip to content

Commit 75b0a60

Browse files
Merge pull request #266 from Adyen/automation/release
Release v9.1.0
2 parents e827bad + 8f2d1c6 commit 75b0a60

15 files changed

+324
-19
lines changed

Adyen/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
AdyenTransfersApi,
2828
AdyenStoredValueApi,
2929
AdyenBalancePlatformApi,
30+
AdyenDisputesApi,
3031
)
3132

3233
from .httpclient import HTTPClient
@@ -47,6 +48,7 @@ def __init__(self, **kwargs):
4748
self.transfers = AdyenTransfersApi(client=self.client)
4849
self.storedValue = AdyenStoredValueApi(client=self.client)
4950
self.balancePlatform = AdyenBalancePlatformApi(client=self.client)
51+
self.disputes = AdyenDisputesApi(client=self.client)
5052

5153

5254
_base_adyen_obj = Adyen()
@@ -62,3 +64,4 @@ def __init__(self, **kwargs):
6264
transfers = _base_adyen_obj.transfers
6365
storedValue = _base_adyen_obj.storedValue
6466
balancePlatform = _base_adyen_obj.balancePlatform
67+
disputes = _base_adyen_obj.disputes

Adyen/client.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def __init__(
9595
api_transfers_version=None,
9696
api_stored_value_version=None,
9797
api_balance_platform_version=None,
98+
api_disputes_version=None,
9899

99100
):
100101
self.username = username
@@ -127,6 +128,7 @@ def __init__(
127128
self.api_transfers_version = api_transfers_version
128129
self.api_stored_value_version = api_stored_value_version
129130
self.api_balance_platform_version = api_balance_platform_version
131+
self.api_disputes_version = api_disputes_version
130132

131133
def _determine_api_url(self, platform, endpoint):
132134
if platform == "test":
@@ -274,7 +276,9 @@ def _set_url_version(self, service, endpoint):
274276
"dataProtection": self.api_data_protection_version,
275277
"transfers": self.api_transfers_version,
276278
"storedValue": self.api_stored_value_version,
277-
"balancePlatform": self.api_balance_platform_version}
279+
"balancePlatform": self.api_balance_platform_version,
280+
"disputes": self.api_disputes_version
281+
}
278282

279283
new_version = f"v{version_lookup[service]}"
280284
endpoint = re.sub(r'\.com/v\d{1,2}', f".com/{new_version}", endpoint)
@@ -328,7 +332,8 @@ def call_adyen_api(
328332
self.api_data_protection_version,
329333
self.api_transfers_version,
330334
self.api_stored_value_version,
331-
self.api_balance_platform_version]
335+
self.api_balance_platform_version,
336+
self.api_disputes_version]
332337
if any(versions):
333338
endpoint = self._set_url_version(service, endpoint)
334339

Adyen/services/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
from .transfers import AdyenTransfersApi
1212
from .storedValue import AdyenStoredValueApi
1313
from .balancePlatform import AdyenBalancePlatformApi
14+
from .disputes import AdyenDisputesApi

Adyen/services/disputes.py

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
from .base import AdyenServiceBase
2+
3+
4+
class AdyenDisputesApi(AdyenServiceBase):
5+
"""NOTE: This class is auto generated by OpenAPI Generator
6+
Ref: https://openapi-generator.tech
7+
8+
Do not edit the class manually.
9+
"""
10+
11+
def __init__(self, client=None):
12+
super(AdyenDisputesApi, self).__init__(client=client)
13+
self.service = "disputes"
14+
self.baseUrl = "https://ca-test.adyen.com/ca/services/DisputeService/v30"
15+
16+
def accept_dispute(self, request, idempotency_key=None, **kwargs):
17+
"""
18+
Accept a dispute
19+
"""
20+
endpoint = self.baseUrl + f"/acceptDispute"
21+
method = "POST"
22+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
23+
24+
def defend_dispute(self, request, idempotency_key=None, **kwargs):
25+
"""
26+
Defend a dispute
27+
"""
28+
endpoint = self.baseUrl + f"/defendDispute"
29+
method = "POST"
30+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
31+
32+
def delete_dispute_defense_document(self, request, idempotency_key=None, **kwargs):
33+
"""
34+
Delete a defense document
35+
"""
36+
endpoint = self.baseUrl + f"/deleteDisputeDefenseDocument"
37+
method = "POST"
38+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
39+
40+
def download_dispute_defense_document(self, request, idempotency_key=None, **kwargs):
41+
"""
42+
Download a defense document
43+
"""
44+
endpoint = self.baseUrl + f"/downloadDisputeDefenseDocument"
45+
method = "POST"
46+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
47+
48+
def retrieve_applicable_defense_reasons(self, request, idempotency_key=None, **kwargs):
49+
"""
50+
Get applicable defense reasons
51+
"""
52+
endpoint = self.baseUrl + f"/retrieveApplicableDefenseReasons"
53+
method = "POST"
54+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
55+
56+
def supply_defense_document(self, request, idempotency_key=None, **kwargs):
57+
"""
58+
Supply a defense document
59+
"""
60+
endpoint = self.baseUrl + f"/supplyDefenseDocument"
61+
method = "POST"
62+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
63+

Adyen/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
LIB_NAME = "adyen-python-api-library"
2-
LIB_VERSION = "9.0.3"
2+
LIB_VERSION = "9.1.0"

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ openapi-generator-jar:=build/openapi-generator-cli.jar
1515
openapi-generator-cli:=java -jar $(openapi-generator-jar)
1616
output:=build/out
1717
services:=balancePlatform checkout legalEntityManagement management payments payouts transfers
18-
smallServices:=binlookup dataProtection recurring storedValue terminal
18+
smallServices:=binlookup dataProtection recurring storedValue terminal disputes
1919

2020
all: $(services) $(smallServices)
2121

@@ -36,6 +36,7 @@ platformsNotificationConfiguration: spec=NotificationConfigurationService-v6
3636
platformsHostedOnboardingPage: spec=HopService-v6
3737
transfers: spec=TransferService-v3
3838
balanceControlService: spec=BalanceControlService-v1
39+
disputes: spec=DisputeService-v30
3940

4041
$(services): build/spec $(openapi-generator-jar)
4142
rm -rf Adyen/services/$@ $(output)

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,21 @@
77
This is the officially supported Python library for using Adyen's APIs.
88

99
## Supported API versions
10-
| API | Description | Service Name | Supported version |
11-
| --- | ----------- | ------------ | ----------------- |
12-
|[BIN lookup API](https://docs.adyen.com/api-explorer/BinLookup/52/overview) | The BIN Lookup API provides endpoints for retrieving information based on a given BIN. | binLookup | **v52** |
13-
| [Balance Platform API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | The Balance Platform API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | balancePlatform | **v2** |
14-
| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/70/overview)| Our latest integration for accepting online payments. | checkout | **v70** |
15-
| [Data Protection API](https://docs.adyen.com/development-resources/data-protection-api) | Endpoint for requesting data erasure. | dataProtection | **v1** |
16-
| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | Endpoint to manage legal entities | legalEntityManagement | **v3** |
17-
| [Management API](https://docs.adyen.com/api-explorer/Management/1/overview)| Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | management | **v1** |
18-
| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview)| Our classic integration for online payments. | payments | **v68** |
19-
| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview)| Endpoints for sending funds to your customers. | payouts | **v68** |
20-
| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview)| Endpoints for managing your point-of-sale payment terminals. | terminal | **v1** |
21-
| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview)| Endpoints for managing saved payment details. | recurring | **v68** |
22-
| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | Endpoints for managing gift cards. | storedValue | **v46** |
23-
| [Transfers API](https://docs.adyen.com/api-explorer/transfers/3/overview) | Endpoints for managing transfers, getting information about transactions or moving fund | transfers | **v3** |
10+
| API | Description | Service Name | Supported version |
11+
|-------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|-------------------|
12+
| [BIN lookup API](https://docs.adyen.com/api-explorer/BinLookup/52/overview) | The BIN Lookup API provides endpoints for retrieving information based on a given BIN. | binLookup | **v52** |
13+
| [Balance Platform API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | The Balance Platform API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | balancePlatform | **v2** |
14+
| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/70/overview) | Our latest integration for accepting online payments. | checkout | **v70** |
15+
| [Data Protection API](https://docs.adyen.com/development-resources/data-protection-api) | Endpoint for requesting data erasure. | dataProtection | **v1** |
16+
| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | Endpoint to manage legal entities | legalEntityManagement | **v3** |
17+
| [Management API](https://docs.adyen.com/api-explorer/Management/1/overview) | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | management | **v1** |
18+
| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | Our classic integration for online payments. | payments | **v68** |
19+
| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview) | Endpoints for sending funds to your customers. | payouts | **v68** |
20+
| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | Endpoints for managing your point-of-sale payment terminals. | terminal | **v1** |
21+
| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | Endpoints for managing saved payment details. | recurring | **v68** |
22+
| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | Endpoints for managing gift cards. | storedValue | **v46** |
23+
| [Transfers API](https://docs.adyen.com/api-explorer/transfers/3/overview) | Endpoints for managing transfers, getting information about transactions or moving fund | transfers | **v3** |
24+
| [Disputes API](https://docs.adyen.com/api-explorer/Disputes/30/overview) | You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. | disputes | **v30** |
2425

2526
For more information, refer to our [documentation](https://docs.adyen.com/) or the [API Explorer](https://docs.adyen.com/api-explorer/).
2627

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name='Adyen',
55
packages=find_packages(include="Adyen*"),
6-
version='9.0.3',
6+
version='9.1.0',
77
maintainer='Adyen',
88
maintainer_email='support@adyen.com',
99
description='Adyen Python Api',

0 commit comments

Comments
 (0)