Skip to content

Commit

Permalink
Merge pull request #1268 from Adyen/automation/release
Browse files Browse the repository at this point in the history
Release v15.0.0-beta
  • Loading branch information
AdyenAutomationBot committed Oct 23, 2023
2 parents 3e8e162 + b928568 commit ddbb4b4
Show file tree
Hide file tree
Showing 378 changed files with 3,017 additions and 1,260 deletions.
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,20 @@ terminalManagement: spec=TfmAPIService-v1
payment: spec=PaymentService-v68
recurring: spec=RecurringService-v68
payout: spec=PayoutService-v68
management: spec=ManagementService-v1
management: spec=ManagementService-v3
legalEntityManagement: spec=LegalEntityService-v3
platformsAccount: spec=AccountService-v6
platformsFund: spec=FundService-v6
platformsNotificationConfiguration: spec=NotificationConfigurationService-v6
platformsHostedOnboardingPage: spec=HopService-v6
transfers: spec=TransferService-v3

transfers: spec=TransferService-v4
# BalanceWebhooks
acsWebhooks: spec=BalancePlatformAcsNotification-v1
configurationWebhooks: spec=BalancePlatformConfigurationNotification-v1
reportWebhooks: spec=BalancePlatformReportNotification-v1
transferWebhooks: spec=BalancePlatformTransferNotification-v3
transferWebhooks: spec=BalancePlatformTransferNotification-v4
# ManagementWebhooks
managementWebhooks: spec=ManagementNotificationService-v1
managementWebhooks: spec=ManagementNotificationService-v3

$(services): build/spec $(openapi-generator-jar)
rm -rf src/typings/$@ build/model
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This library supports the following:
| [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | v1 | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | [DataProtection](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/dataProtectionApi.ts) |
| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | v3 | Manage legal entities that contain information required for verification. | [LegalEntityManagement](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/legalEntityManagement/index.ts) |
| [Local/Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/terminal-api-reference) | - | Our point-of-sale integration. | [TerminalLocalAPI](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/terminalLocalAPI.ts) or [TerminalCloudAPI](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/terminalCloudAPI.ts) |
| [Management API](https://docs.adyen.com/api-explorer/Management/1/overview) | v1 | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | [Management](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/management/index.ts) |
| [Management API](https://docs.adyen.com/api-explorer/Management/3/overview) | v3 | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | [Management](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/management/index.ts) |
| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | v68 | Our classic integration for online payments. | [ClassicIntegrationAPI](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/paymentApi.ts) |
| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview) | v68 | Endpoints for sending funds to your customers. | [Payout](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/payout/index.ts) |
| [Platforms APIs](https://docs.adyen.com/platforms/api) | - | Set of APIs when using Adyen for Platforms. This API is used for the classic integration. | [Platforms](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/platforms.ts) |
Expand All @@ -34,7 +34,7 @@ This library supports the following:
| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | v1 | Endpoints for managing your point-of-sale payment terminals. | [TerminalManagement](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/terminalManagementApi.ts) |
| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | v68 | Endpoints for managing saved payment details. | [Recurring](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/recurringApi.ts) |
| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | v46 | Manage both online and point-of-sale gift cards and other stored-value cards. | [StoredValue](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/storedValueApi.ts) |
| [Transfers API](https://docs.adyen.com/api-explorer/transfers/3/overview) | v3 | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | [Transfers](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/transfers/index.ts) |
| [Transfers API](https://docs.adyen.com/api-explorer/transfers/4/overview) | v4 | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | [Transfers](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/transfers/index.ts) |
| [Disputes API](https://docs.adyen.com/api-explorer/Disputes/30/overview) | v30 | 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](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/disputesApi.ts) |

## Supported Webhook versions
Expand All @@ -44,9 +44,9 @@ The library supports all webhooks under the following model directories:
|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------|-------------------|
| [Authentication Webhooks](https://docs.adyen.com/api-explorer/acs-webhook/1/overview) | Adyen sends this webhook when the process of cardholder authentication is finalized, whether it is completed successfully, fails, or expires. | [AcsWebhooks](src/typings/acsWebhooks) | **v1** |
| [Configuration Webhooks](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/1/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update internal statuses when the status of a capability is changed. | [ConfigurationNotification](src/typings/configurationWebhooks) | **v1** |
| [Transfer Webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/3/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds. | [TransferNotification](src/typings/transferWebhooks) | **v3** |
| [Transfer Webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/4/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds. | [TransferNotification](src/typings/transferWebhooks) | **v4** |
| [Report Webhooks](https://docs.adyen.com/api-explorer/report-webhooks/1/overview) | You can download reports programmatically by making an HTTP GET request, or manually from your Balance Platform Customer Area | [ReportNotification](src/typings/reportWebhooks) | **v1** |
| [Management Webhooks](https://docs.adyen.com/api-explorer/ManagementNotification/1/overview) | Adyen uses webhooks to inform your system about events that happen with your Adyen company and merchant accounts, stores, payment terminals, and payment methods when using Management API. | [ManagementWebhooks](src/typings/managementWebhooks) | **v1** |
| [Management Webhooks](https://docs.adyen.com/api-explorer/ManagementNotification/3/overview) | Adyen uses webhooks to inform your system about events that happen with your Adyen company and merchant accounts, stores, payment terminals, and payment methods when using Management API. | [ManagementWebhooks](src/typings/managementWebhooks) | **v3** |
| [Notification Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview) | We use webhooks to send you updates about payment status updates, newly available reports, and other events that you can subscribe to. For more information, refer to our documentation | [Notification](src/typings/notification) | **v1** |

For more information, refer to our [documentation](https://docs.adyen.com/) or the [API Explorer](https://docs.adyen.com/api-explorer/).
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adyen/api-library",
"version": "14.4.0",
"version": "15.0.0-beta",
"description": "The Adyen API Library for NodeJS enables you to work with Adyen APIs.",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/management.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ beforeEach((): void => {
nock.activate();
}
client = createClient();
scope = nock("https://management-test.adyen.com/v1");
scope = nock("https://management-test.adyen.com/v3");
managementService = new ManagementAPI(client);
});

Expand Down Expand Up @@ -678,7 +678,7 @@ describe("Management", (): void => {
...requests.createMerchantWebhookRequest,
communicationFormat: management.CreateMerchantWebhookRequest.CommunicationFormatEnum.Json,
networkType: management.CreateMerchantWebhookRequest.NetworkTypeEnum.Public,
sslVersion: management.CreateMerchantWebhookRequest.SslVersionEnum.Tlsv12
encryptionProtocol: management.CreateMerchantWebhookRequest.EncryptionProtocolEnum.Tlsv12
});

expect(response).toBeTruthy();
Expand Down Expand Up @@ -708,7 +708,7 @@ describe("Management", (): void => {
...requests.updateMerchantWebhookRequest,
communicationFormat: management.CreateMerchantWebhookRequest.CommunicationFormatEnum.Soap,
networkType: management.CreateMerchantWebhookRequest.NetworkTypeEnum.Local,
sslVersion: management.CreateMerchantWebhookRequest.SslVersionEnum.Tlsv13
encryptionProtocol: management.CreateMerchantWebhookRequest.EncryptionProtocolEnum.Tlsv13
});

expect(response).toBeTruthy();
Expand Down
25 changes: 25 additions & 0 deletions src/__tests__/notification.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import {
import {MerchantUpdatedNotificationRequest} from "../typings/managementWebhooks/merchantUpdatedNotificationRequest";
import {AuthenticationNotificationRequest} from "../typings/acsWebhooks/authenticationNotificationRequest";
import {TransferNotificationRequest} from "../typings/transferWebhooks/transferNotificationRequest";
import { PaymentMethodRequestRemovedNotificationRequest } from "../typings/managementWebhooks/paymentMethodRequestRemovedNotificationRequest";
import { PaymentMethodScheduledForRemovalNotificationRequest } from "../typings/managementWebhooks/paymentMethodScheduledForRemovalNotificationRequest";

describe("Notification Test", function (): void {

Expand Down Expand Up @@ -206,4 +208,27 @@ describe("Notification Test", function (): void {
expect(genericWebhook instanceof AccountHolderNotificationRequest).toBe(false)
expect(genericWebhook instanceof AuthenticationNotificationRequest).toBe(true)
});

it("should deserialize Management v3 Webhooks", function (): void {
const json = {
"type": "paymentMethod.requestRemoved",
"environment": "devl",
"createdAt": "2023-06-12T18:59:17+02:00",
"data": {
"id": "PM322WP223224M5HJ6PX77BW8",
"storeId": "TestStore",
"type": "amex",
"status": "dataRequired",
"merchantId": "TestMerchant",
"enabled": false
}
};
const jsonString = JSON.stringify(json);
let managementWebhookHandler = new ManagementWebhookHandler(jsonString);
const paymentMethodRequestRemoved: PaymentMethodRequestRemovedNotificationRequest = managementWebhookHandler.getPaymentMethodRequestRemovedNotificationRequest();
const genericWebhook = managementWebhookHandler.getGenericWebhook();
expect(genericWebhook instanceof PaymentMethodRequestRemovedNotificationRequest).toBe(true)
expect(genericWebhook instanceof PaymentMethodScheduledForRemovalNotificationRequest).toBe(false)
expect(paymentMethodRequestRemoved.type).toEqual(PaymentMethodRequestRemovedNotificationRequest.TypeEnum.PaymentMethodRequestRemoved)
});
});
2 changes: 1 addition & 1 deletion src/__tests__/transfers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ beforeEach((): void => {
}
client = createClient();
transfersAPI = new TransfersAPI(client);
scope = nock("https://balanceplatform-api-test.adyen.com/btl/v3");
scope = nock("https://balanceplatform-api-test.adyen.com/btl/v4");
});

afterEach(() => {
Expand Down

0 comments on commit ddbb4b4

Please sign in to comment.