Skip to content

Commit d0e9473

Browse files
[balancewebhooks] Automated update from Adyen/adyen-openapi@0a007ce
1 parent bae04c8 commit d0e9473

File tree

7 files changed

+314
-1
lines changed

7 files changed

+314
-1
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* The version of the OpenAPI document: v1
3+
*
4+
*
5+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
6+
* https://openapi-generator.tech
7+
* Do not edit this class manually.
8+
*/
9+
10+
11+
export class Amount {
12+
/**
13+
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the amount.
14+
*/
15+
"currency": string;
16+
/**
17+
* The numeric value of the amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
18+
*/
19+
"value": number;
20+
21+
static readonly discriminator: string | undefined = undefined;
22+
23+
static readonly mapping: {[index: string]: string} | undefined = undefined;
24+
25+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
26+
{
27+
"name": "currency",
28+
"baseName": "currency",
29+
"type": "string",
30+
"format": ""
31+
},
32+
{
33+
"name": "value",
34+
"baseName": "value",
35+
"type": "number",
36+
"format": "int64"
37+
} ];
38+
39+
static getAttributeTypeMap() {
40+
return Amount.attributeTypeMap;
41+
}
42+
43+
public constructor() {
44+
}
45+
}
46+

src/typings/balanceWebhooks/balanceWebhooksHandler.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ import { balanceWebhooks } from "..";
1414
* Allows generic handling of configuration-related webhook events.
1515
*/
1616
export type GenericWebhook =
17-
| balanceWebhooks.BalanceAccountBalanceNotificationRequest;
17+
| balanceWebhooks.BalanceAccountBalanceNotificationRequest
18+
| balanceWebhooks.ReleasedBlockedBalanceNotificationRequest;
1819

1920
/**
2021
* Handler for processing BalanceWebhooks.
@@ -43,6 +44,10 @@ export class BalanceWebhooksHandler {
4344
return this.getBalanceAccountBalanceNotificationRequest();
4445
}
4546

47+
if(Object.values(balanceWebhooks.ReleasedBlockedBalanceNotificationRequest.TypeEnum).includes(type)) {
48+
return this.getReleasedBlockedBalanceNotificationRequest();
49+
}
50+
4651
throw new Error("Could not parse the json payload: " + this.payload);
4752

4853
}
@@ -56,4 +61,13 @@ export class BalanceWebhooksHandler {
5661
return balanceWebhooks.ObjectSerializer.deserialize(this.payload, "BalanceAccountBalanceNotificationRequest");
5762
}
5863

64+
/**
65+
* Deserialize the webhook payload into a ReleasedBlockedBalanceNotificationRequest
66+
*
67+
* @returns Deserialized ReleasedBlockedBalanceNotificationRequest object.
68+
*/
69+
public getReleasedBlockedBalanceNotificationRequest(): balanceWebhooks.ReleasedBlockedBalanceNotificationRequest {
70+
return balanceWebhooks.ObjectSerializer.deserialize(this.payload, "ReleasedBlockedBalanceNotificationRequest");
71+
}
72+
5973
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
export * from "./amount"
12
export * from "./balanceAccountBalanceNotificationRequest"
23
export * from "./balanceNotificationData"
34
export * from "./balancePlatformNotificationResponse"
45
export * from "./balances"
6+
export * from "./releaseBlockedBalanceNotificationData"
7+
export * from "./releasedBlockedBalanceNotificationRequest"
8+
export * from "./resourceReference"
59

610
// serializing and deserializing typed objects
711
export * from "./objectSerializer"

src/typings/balanceWebhooks/objectSerializer.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
export * from "./models";
22

3+
import { Amount } from "./amount";
34
import { BalanceAccountBalanceNotificationRequest } from "./balanceAccountBalanceNotificationRequest";
45
import { BalanceNotificationData } from "./balanceNotificationData";
56
import { BalancePlatformNotificationResponse } from "./balancePlatformNotificationResponse";
67
import { Balances } from "./balances";
8+
import { ReleaseBlockedBalanceNotificationData } from "./releaseBlockedBalanceNotificationData";
9+
import { ReleasedBlockedBalanceNotificationRequest } from "./releasedBlockedBalanceNotificationRequest";
10+
import { ResourceReference } from "./resourceReference";
711

812
/* tslint:disable:no-unused-variable */
913
let primitives = [
@@ -19,13 +23,18 @@ let primitives = [
1923

2024
let enumsMap: Set<string> = new Set<string>([
2125
"BalanceAccountBalanceNotificationRequest.TypeEnum",
26+
"ReleasedBlockedBalanceNotificationRequest.TypeEnum",
2227
]);
2328

2429
let typeMap: {[index: string]: any} = {
30+
"Amount": Amount,
2531
"BalanceAccountBalanceNotificationRequest": BalanceAccountBalanceNotificationRequest,
2632
"BalanceNotificationData": BalanceNotificationData,
2733
"BalancePlatformNotificationResponse": BalancePlatformNotificationResponse,
2834
"Balances": Balances,
35+
"ReleaseBlockedBalanceNotificationData": ReleaseBlockedBalanceNotificationData,
36+
"ReleasedBlockedBalanceNotificationRequest": ReleasedBlockedBalanceNotificationRequest,
37+
"ResourceReference": ResourceReference,
2938
}
3039

3140
type MimeTypeDescriptor = {
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
/*
2+
* The version of the OpenAPI document: v1
3+
*
4+
*
5+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
6+
* https://openapi-generator.tech
7+
* Do not edit this class manually.
8+
*/
9+
10+
import { Amount } from "./amount";
11+
import { ResourceReference } from "./resourceReference";
12+
13+
14+
export class ReleaseBlockedBalanceNotificationData {
15+
"accountHolder": ResourceReference;
16+
"amount": Amount;
17+
"balanceAccount": ResourceReference;
18+
/**
19+
* The unique identifier of the balance platform.
20+
*/
21+
"balancePlatform"?: string;
22+
/**
23+
* The reference of the batch that was released.
24+
*/
25+
"batchReference"?: string;
26+
"blockedBalanceAfter"?: Amount | null;
27+
"blockedBalanceBefore"?: Amount | null;
28+
/**
29+
* The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**.
30+
*/
31+
"creationDate"?: Date;
32+
/**
33+
* The ID of the resource.
34+
*/
35+
"id"?: string;
36+
/**
37+
* The date and time when the amount was released, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**.
38+
*/
39+
"valueDate"?: Date;
40+
41+
static readonly discriminator: string | undefined = undefined;
42+
43+
static readonly mapping: {[index: string]: string} | undefined = undefined;
44+
45+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
46+
{
47+
"name": "accountHolder",
48+
"baseName": "accountHolder",
49+
"type": "ResourceReference",
50+
"format": ""
51+
},
52+
{
53+
"name": "amount",
54+
"baseName": "amount",
55+
"type": "Amount",
56+
"format": ""
57+
},
58+
{
59+
"name": "balanceAccount",
60+
"baseName": "balanceAccount",
61+
"type": "ResourceReference",
62+
"format": ""
63+
},
64+
{
65+
"name": "balancePlatform",
66+
"baseName": "balancePlatform",
67+
"type": "string",
68+
"format": ""
69+
},
70+
{
71+
"name": "batchReference",
72+
"baseName": "batchReference",
73+
"type": "string",
74+
"format": ""
75+
},
76+
{
77+
"name": "blockedBalanceAfter",
78+
"baseName": "blockedBalanceAfter",
79+
"type": "Amount | null",
80+
"format": ""
81+
},
82+
{
83+
"name": "blockedBalanceBefore",
84+
"baseName": "blockedBalanceBefore",
85+
"type": "Amount | null",
86+
"format": ""
87+
},
88+
{
89+
"name": "creationDate",
90+
"baseName": "creationDate",
91+
"type": "Date",
92+
"format": "date-time"
93+
},
94+
{
95+
"name": "id",
96+
"baseName": "id",
97+
"type": "string",
98+
"format": ""
99+
},
100+
{
101+
"name": "valueDate",
102+
"baseName": "valueDate",
103+
"type": "Date",
104+
"format": "date-time"
105+
} ];
106+
107+
static getAttributeTypeMap() {
108+
return ReleaseBlockedBalanceNotificationData.attributeTypeMap;
109+
}
110+
111+
public constructor() {
112+
}
113+
}
114+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/*
2+
* The version of the OpenAPI document: v1
3+
*
4+
*
5+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
6+
* https://openapi-generator.tech
7+
* Do not edit this class manually.
8+
*/
9+
10+
import { ReleaseBlockedBalanceNotificationData } from "./releaseBlockedBalanceNotificationData";
11+
12+
13+
export class ReleasedBlockedBalanceNotificationRequest {
14+
"data": ReleaseBlockedBalanceNotificationData;
15+
/**
16+
* The environment from which the webhook originated. Possible values: **test**, **live**.
17+
*/
18+
"environment": string;
19+
/**
20+
* When the event was queued.
21+
*/
22+
"timestamp"?: Date;
23+
/**
24+
* Type of webhook.
25+
*/
26+
"type": ReleasedBlockedBalanceNotificationRequest.TypeEnum;
27+
28+
static readonly discriminator: string | undefined = undefined;
29+
30+
static readonly mapping: {[index: string]: string} | undefined = undefined;
31+
32+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
33+
{
34+
"name": "data",
35+
"baseName": "data",
36+
"type": "ReleaseBlockedBalanceNotificationData",
37+
"format": ""
38+
},
39+
{
40+
"name": "environment",
41+
"baseName": "environment",
42+
"type": "string",
43+
"format": ""
44+
},
45+
{
46+
"name": "timestamp",
47+
"baseName": "timestamp",
48+
"type": "Date",
49+
"format": "date-time"
50+
},
51+
{
52+
"name": "type",
53+
"baseName": "type",
54+
"type": "ReleasedBlockedBalanceNotificationRequest.TypeEnum",
55+
"format": ""
56+
} ];
57+
58+
static getAttributeTypeMap() {
59+
return ReleasedBlockedBalanceNotificationRequest.attributeTypeMap;
60+
}
61+
62+
public constructor() {
63+
}
64+
}
65+
66+
export namespace ReleasedBlockedBalanceNotificationRequest {
67+
export enum TypeEnum {
68+
BalancePlatformBalanceAccountBalanceBlockReleased = 'balancePlatform.balanceAccount.balance.block.released'
69+
}
70+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* The version of the OpenAPI document: v1
3+
*
4+
*
5+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
6+
* https://openapi-generator.tech
7+
* Do not edit this class manually.
8+
*/
9+
10+
11+
export class ResourceReference {
12+
/**
13+
* The description of the resource.
14+
*/
15+
"description"?: string;
16+
/**
17+
* The unique identifier of the resource.
18+
*/
19+
"id"?: string;
20+
/**
21+
* The reference for the resource.
22+
*/
23+
"reference"?: string;
24+
25+
static readonly discriminator: string | undefined = undefined;
26+
27+
static readonly mapping: {[index: string]: string} | undefined = undefined;
28+
29+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
30+
{
31+
"name": "description",
32+
"baseName": "description",
33+
"type": "string",
34+
"format": ""
35+
},
36+
{
37+
"name": "id",
38+
"baseName": "id",
39+
"type": "string",
40+
"format": ""
41+
},
42+
{
43+
"name": "reference",
44+
"baseName": "reference",
45+
"type": "string",
46+
"format": ""
47+
} ];
48+
49+
static getAttributeTypeMap() {
50+
return ResourceReference.attributeTypeMap;
51+
}
52+
53+
public constructor() {
54+
}
55+
}
56+

0 commit comments

Comments
 (0)