mirror of
https://github.com/jlengrand/adyen-node-api-library.git
synced 2026-03-10 08:01:20 +00:00
created script to update additional data file and small check new parameter works
This commit is contained in:
16
Makefile
16
Makefile
@@ -1,6 +1,6 @@
|
||||
generator:=typescript-node
|
||||
openapi-generator-cli:=docker run --user $(shell id -u):$(shell id -g) --rm -v ${PWD}:/local -w /local openapitools/openapi-generator-cli:v5.4.0
|
||||
services:=binlookup checkout storedValue terminalManagement payments recurring payouts management legalEntityManagement balancePlatform platformsAccount platformsFund platformsNotificationConfiguration platformsHostedOnboardingPage transfer
|
||||
services:=binlookup checkout storedValue terminalManagement payments recurring payouts management legalEntityManagement balancePlatform platformsAccount platformsFund platformsNotificationConfiguration platformsHostedOnboardingPage transfer webhooks
|
||||
|
||||
# Generate models (for each service)
|
||||
models: $(services)
|
||||
@@ -20,16 +20,24 @@ platformsFund: spec=FundService-v6
|
||||
platformsNotificationConfiguration: spec=NotificationConfigurationService-v6
|
||||
platformsHostedOnboardingPage: spec=HopService-v6
|
||||
transfer: spec=TransferService-v3
|
||||
webhooks: spec=Webhooks-v1
|
||||
|
||||
$(services): build/spec
|
||||
$(services): build/spec
|
||||
rm -rf src/typings/$@ build/model
|
||||
$(openapi-generator-cli) generate \
|
||||
-i build/spec/json/$(spec).json \
|
||||
-g $(generator) \
|
||||
-t templates/typescript \
|
||||
-o build \
|
||||
--global-property models,supportingFiles
|
||||
mv build/model src/typings/$@
|
||||
--global-property models,supportingFiles \
|
||||
--skip-validate-spec
|
||||
@if [ "$@" = "webhooks" ]; then\
|
||||
mv build/model/notificationAdditionalData.ts src/typings/notification;\
|
||||
else\
|
||||
mv build/model src/typings/$@;\
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Checkout spec (and patch version)
|
||||
build/spec:
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"hmacSignature": "OzDjCMZIsdtDqrZ+cl\/FWC+WdESrorctXTzAzW33dXI=",
|
||||
"NAME2": " VALUE2 ",
|
||||
"fraudCheck-6-ShopperIpUsage": "10",
|
||||
"paymentLinkId": "ABCDEFG"
|
||||
"paymentLinkId": "ABCDEFG",
|
||||
"realtimeAccountUpdaterStatus": "status"
|
||||
},
|
||||
"amount": {
|
||||
"currency": "EUR",
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* #############
|
||||
* ############
|
||||
* Adyen NodeJS API Library
|
||||
* Copyright (c) 2020 Adyen B.V.
|
||||
* Copyright (c) 2022 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
@@ -38,6 +38,8 @@ describe("Notification Test", function (): void {
|
||||
expect(notificationRequestItem.success === SuccessEnum.True).toBeTruthy();
|
||||
expect(notificationRequestItem.pspReference).toEqual("123456789");
|
||||
expect(notificationRequestItem.additionalData!.paymentLinkId).toEqual("ABCDEFG");
|
||||
expect(notificationRequestItem.additionalData!.realtimeAccountUpdaterStatus).toEqual("status");
|
||||
|
||||
} else {
|
||||
fail();
|
||||
}
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
* Adyen NodeJS API Library
|
||||
* Copyright (c) 2021 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Notification API
|
||||
* Definition of Notification API Schema
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The additionalData object is a generic container that can hold extra fields. For more information, refer to NotificationRequestItem.additionalData .
|
||||
*/
|
||||
export class AdditionalData {
|
||||
/**
|
||||
* The ID that uniquely identifies the shopper. This shopperReference is the same as the shopperReference used in the initial payment.
|
||||
*/
|
||||
'shopperReference'?: string;
|
||||
/**
|
||||
* The shopper\'s email address.
|
||||
*/
|
||||
'shopperEmail'?: string;
|
||||
/**
|
||||
* Authorisation code: When the payment is authorised successfully, this field holds the authorisation code for the payment. When the payment is not authorised, this field is empty.
|
||||
*/
|
||||
'authCode'?: string;
|
||||
/**
|
||||
* Returns the last 4 digits of the credit card.
|
||||
*/
|
||||
'cardSummary'?: string;
|
||||
/**
|
||||
* Returns the card expiry date.
|
||||
*/
|
||||
'expiryDate'?: string;
|
||||
/**
|
||||
* Value of the amount authorised.
|
||||
*/
|
||||
'authorisedAmountValue'?: string;
|
||||
/**
|
||||
* Currency of the authorised amount.
|
||||
*/
|
||||
'authorisedAmountCurrency'?: string;
|
||||
/**
|
||||
* HMAC Key from customer area
|
||||
*/
|
||||
'hmacSignature'?: string;
|
||||
/**
|
||||
* A unique identifier for the payment link
|
||||
*/
|
||||
'paymentLinkId'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "shopperReference",
|
||||
"baseName": "shopperReference",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "shopperEmail",
|
||||
"baseName": "shopperEmail",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "authCode",
|
||||
"baseName": "authCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "cardSummary",
|
||||
"baseName": "cardSummary",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "expiryDate",
|
||||
"baseName": "expiryDate",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "authorisedAmountValue",
|
||||
"baseName": "authorisedAmountValue",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "authorisedAmountCurrency",
|
||||
"baseName": "authorisedAmountCurrency",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "hmacSignature",
|
||||
"baseName": "hmacSignature",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "paymentLinkId",
|
||||
"baseName": "paymentLinkId",
|
||||
"type": "string"
|
||||
}
|
||||
];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AdditionalData.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
|
||||
export * from './additionalData';
|
||||
export * from './notificationAdditionalData';
|
||||
export * from './amount';
|
||||
export * from './notification';
|
||||
export * from './notificationItem';
|
||||
@@ -36,7 +36,7 @@ export interface RequestDetailedFile {
|
||||
export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile;
|
||||
|
||||
|
||||
import { AdditionalData } from './additionalData';
|
||||
import { NotificationAdditionalData } from './notificationAdditionalData';
|
||||
import { Amount } from './amount';
|
||||
import { Notification } from './notification';
|
||||
import { NotificationItem } from './notificationItem';
|
||||
@@ -61,7 +61,7 @@ let enumsMap: {[index: string]: any} = {
|
||||
}
|
||||
|
||||
let typeMap: {[index: string]: any} = {
|
||||
"AdditionalData": AdditionalData,
|
||||
"AdditionalData": NotificationAdditionalData,
|
||||
"Amount": Amount,
|
||||
"Notification": Notification,
|
||||
"NotificationItem": NotificationItem,
|
||||
|
||||
1083
src/typings/notification/notificationAdditionalData.ts
Normal file
1083
src/typings/notification/notificationAdditionalData.ts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -29,11 +29,11 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { AdditionalData } from './additionalData';
|
||||
import { NotificationAdditionalData } from './notificationAdditionalData';
|
||||
import { Amount } from './amount';
|
||||
|
||||
export class NotificationRequestItem {
|
||||
'additionalData'?: AdditionalData;
|
||||
'additionalData'?: NotificationAdditionalData;
|
||||
'amount': Amount;
|
||||
/**
|
||||
* Adyen\'s 16-character unique reference associated with the transaction/the request. This value is globally unique; quote it when communicating with us about this request.
|
||||
|
||||
Reference in New Issue
Block a user