Skip to content

Commit 321284e

Browse files
authored
Prepare for release (#231)
1 parent 3b92e50 commit 321284e

File tree

11 files changed

+48
-173
lines changed

11 files changed

+48
-173
lines changed

Adyen/client.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -388,33 +388,6 @@ def call_adyen_api(
388388
platform = self._set_platform(**kwargs)
389389
message = request_data
390390

391-
with_app_info = [
392-
"/authorise",
393-
"/authorise3d",
394-
"/authorise3ds2",
395-
"/payments",
396-
"/paymentSession",
397-
"/paymentLinks",
398-
"/paymentMethods/balance",
399-
"/sessions"
400-
]
401-
402-
if endpoint in with_app_info and (method == 'POST' or method == 'PATCH'):
403-
if 'applicationInfo' in request_data:
404-
request_data['applicationInfo'].update({
405-
"adyenLibrary": {
406-
"name": settings.LIB_NAME,
407-
"version": settings.LIB_VERSION
408-
}
409-
})
410-
else:
411-
request_data['applicationInfo'] = {
412-
"adyenLibrary": {
413-
"name": settings.LIB_NAME,
414-
"version": settings.LIB_VERSION
415-
}
416-
}
417-
418391
headers = {
419392
self.APPLICATION_INFO_HEADER_NAME: settings.LIB_NAME,
420393
self.APPLICATION_VERSION_HEADER_NAME: settings.LIB_VERSION

Adyen/services/balancePlatform/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22
from .account_holders_api import AccountHoldersApi
33
from .balance_accounts_api import BalanceAccountsApi
44
from .bank_account_validation_api import BankAccountValidationApi
5-
from .documents_api import DocumentsApi
6-
from .legal_entities_api import LegalEntitiesApi
75
from .payment_instrument_groups_api import PaymentInstrumentGroupsApi
86
from .payment_instruments_api import PaymentInstrumentsApi
97
from .platform_api import PlatformApi
108
from .transaction_rules_api import TransactionRulesApi
11-
from .transfer_instruments_api import TransferInstrumentsApi
129

1310

1411
class AdyenBalancePlatformApi(AdyenServiceBase):
@@ -23,10 +20,7 @@ def __init__(self, client=None):
2320
self.account_holders_api = AccountHoldersApi(client=client)
2421
self.balance_accounts_api = BalanceAccountsApi(client=client)
2522
self.bank_account_validation_api = BankAccountValidationApi(client=client)
26-
self.documents_api = DocumentsApi(client=client)
27-
self.legal_entities_api = LegalEntitiesApi(client=client)
2823
self.payment_instrument_groups_api = PaymentInstrumentGroupsApi(client=client)
2924
self.payment_instruments_api = PaymentInstrumentsApi(client=client)
3025
self.platform_api = PlatformApi(client=client)
3126
self.transaction_rules_api = TransactionRulesApi(client=client)
32-
self.transfer_instruments_api = TransferInstrumentsApi(client=client)

Adyen/services/balancePlatform/balance_accounts_api.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,30 @@ def __init__(self, client=None):
1212
super(BalanceAccountsApi, self).__init__(client=client)
1313
self.service = "balancePlatform"
1414

15+
def delete_sweep(self, balanceAccountId, sweepId, idempotency_key=None, **kwargs):
16+
"""
17+
Delete a sweep
18+
"""
19+
endpoint = f"/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"
20+
method = "DELETE"
21+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
22+
23+
def get_all_sweeps_for_balance_account(self, balanceAccountId, idempotency_key=None, **kwargs):
24+
"""
25+
Get all sweeps for a balance account
26+
"""
27+
endpoint = f"/balanceAccounts/{balanceAccountId}/sweeps"
28+
method = "GET"
29+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
30+
31+
def get_sweep(self, balanceAccountId, sweepId, idempotency_key=None, **kwargs):
32+
"""
33+
Get a sweep
34+
"""
35+
endpoint = f"/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"
36+
method = "GET"
37+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
38+
1539
def get_balance_account(self, id, idempotency_key=None, **kwargs):
1640
"""
1741
Get a balance account
@@ -28,6 +52,14 @@ def get_all_payment_instruments_for_balance_account(self, id, idempotency_key=No
2852
method = "GET"
2953
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
3054

55+
def update_sweep(self, request, balanceAccountId, sweepId, idempotency_key=None, **kwargs):
56+
"""
57+
Update a sweep
58+
"""
59+
endpoint = f"/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"
60+
method = "PATCH"
61+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
62+
3163
def update_balance_account(self, request, id, idempotency_key=None, **kwargs):
3264
"""
3365
Update a balance account
@@ -44,3 +76,11 @@ def create_balance_account(self, request, idempotency_key=None, **kwargs):
4476
method = "POST"
4577
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
4678

79+
def create_sweep(self, request, balanceAccountId, idempotency_key=None, **kwargs):
80+
"""
81+
Create a sweep
82+
"""
83+
endpoint = f"/balanceAccounts/{balanceAccountId}/sweeps"
84+
method = "POST"
85+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
86+

Adyen/services/balancePlatform/documents_api.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

Adyen/services/balancePlatform/legal_entities_api.py

Lines changed: 0 additions & 38 deletions
This file was deleted.

Adyen/services/balancePlatform/transfer_instruments_api.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

Adyen/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
ENDPOINT_CHECKOUT_LIVE_SUFFIX = "https://{live_prefix}-checkout-live" \
1313
".adyenpayments.com/checkout"
1414
BASE_STORED_VALUE_URL = "https://pal-{}.adyen.com/pal/servlet/StoredValue"
15-
API_BALANCE_PLATFORM_VERSION = "v1"
15+
API_BALANCE_PLATFORM_VERSION = "v2"
1616
API_BIN_LOOKUP_VERSION = "v52"
1717
API_CHECKOUT_VERSION = "v70"
1818
API_CHECKOUT_UTILITY_VERSION = "v1"
@@ -22,7 +22,7 @@
2222
API_PAYMENT_VERSION = "v68"
2323
API_PAYOUT_VERSION = "v68"
2424
API_TERMINAL_VERSION = "v1"
25-
LIB_VERSION = "7.1.2"
25+
LIB_VERSION = "8.0.0"
2626
API_TRANSFERS_VERSION = "v3"
2727
API_LEGAL_ENTITY_MANAGEMENT_VERSION = "v2"
2828
API_STORED_VALUE_VERSION = "v46"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ recurring: spec=RecurringService-v68
2323
payouts: spec=PayoutService-v68
2424
management: spec=ManagementService-v1
2525
legalEntityManagement: spec=LegalEntityService-v2
26-
balancePlatform: spec=BalancePlatformService-v1
26+
balancePlatform: spec=BalancePlatformService-v2
2727
platformsAccount: spec=AccountService-v6
2828
platformsFund: spec=FundService-v6
2929
platformsNotificationConfiguration: spec=NotificationConfigurationService-v6

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
# Adyen APIs Library for Python
44

5-
[![version](https://img.shields.io/badge/version-7.1.1-blue.svg)](https://docs.adyen.com/development-resources/libraries)
5+
[![version](https://img.shields.io/badge/version-8.0.0-blue.svg)](https://docs.adyen.com/development-resources/libraries)
66

77
This is the officially supported Python library for using Adyen's APIs.
88

99
## Supported API versions
1010
| API | Description | Service Name | Supported version |
1111
| --- | ----------- | ------------ | ----------------- |
1212
|[BIN lookup API](https://docs.adyen.com/api-explorer/#/BinLookup/v52/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/1/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 | **v1** |
13+
| [Balance Platform API](https://docs.adyen.com/api-explorer/balanceplatform/1/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** |
1414
| [Checkout API](https://docs.adyen.com/api-explorer/#/CheckoutService/v69/overview)| Our latest integration for accepting online payments. | checkout | **v70** |
1515
| [Data Protection API](https://docs.adyen.com/development-resources/data-protection-api) | Endpoint for requesting data erasure. | dataProtection | **v1** |
1616
| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/latest/overview) | Endpoint to manage legal entities | legalEntityManagement | **v2** |

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='7.1.2',
6+
version='8.0.0',
77
maintainer='Adyen',
88
maintainer_email='support@adyen.com',
99
description='Adyen Python Api',

0 commit comments

Comments
 (0)