Skip to content

Commit c8abed8

Browse files
committed
Generate Transfer webhooks
1 parent d23fa25 commit c8abed8

12 files changed

+67
-62
lines changed

src/typings/transferWebhooks/amountAdjustment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Amount } from "./amount";
1111

1212

1313
export class AmountAdjustment {
14-
"amount"?: Amount;
14+
"amount"?: Amount | null;
1515
/**
1616
* The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**.
1717
*/
@@ -29,7 +29,7 @@ export class AmountAdjustment {
2929
{
3030
"name": "amount",
3131
"baseName": "amount",
32-
"type": "Amount",
32+
"type": "Amount | null",
3333
"format": ""
3434
},
3535
{

src/typings/transferWebhooks/counterpartyV3.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ export class CounterpartyV3 {
1717
* The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id).
1818
*/
1919
"balanceAccountId"?: string;
20-
"bankAccount"?: BankAccountV3;
21-
"card"?: Card;
22-
"merchant"?: MerchantData;
20+
"bankAccount"?: BankAccountV3 | null;
21+
"card"?: Card | null;
22+
"merchant"?: MerchantData | null;
2323
/**
2424
* The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id).
2525
*/
@@ -39,19 +39,19 @@ export class CounterpartyV3 {
3939
{
4040
"name": "bankAccount",
4141
"baseName": "bankAccount",
42-
"type": "BankAccountV3",
42+
"type": "BankAccountV3 | null",
4343
"format": ""
4444
},
4545
{
4646
"name": "card",
4747
"baseName": "card",
48-
"type": "Card",
48+
"type": "Card | null",
4949
"format": ""
5050
},
5151
{
5252
"name": "merchant",
5353
"baseName": "merchant",
54-
"type": "MerchantData",
54+
"type": "MerchantData | null",
5555
"format": ""
5656
},
5757
{

src/typings/transferWebhooks/issuedCard.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class IssuedCard {
2424
* Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments.
2525
*/
2626
"processingType"?: IssuedCard.ProcessingTypeEnum;
27-
"relayedAuthorisationData"?: RelayedAuthorisationData;
27+
"relayedAuthorisationData"?: RelayedAuthorisationData | null;
2828
/**
2929
* The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments.
3030
*/
@@ -68,7 +68,7 @@ export class IssuedCard {
6868
{
6969
"name": "relayedAuthorisationData",
7070
"baseName": "relayedAuthorisationData",
71-
"type": "RelayedAuthorisationData",
71+
"type": "RelayedAuthorisationData | null",
7272
"format": ""
7373
},
7474
{

src/typings/transferWebhooks/merchantData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class MerchantData {
2323
* The unique identifier of the merchant.
2424
*/
2525
"merchantId"?: string;
26-
"nameLocation"?: NameLocation;
26+
"nameLocation"?: NameLocation | null;
2727
/**
2828
* The postal code of the merchant.
2929
*/
@@ -55,7 +55,7 @@ export class MerchantData {
5555
{
5656
"name": "nameLocation",
5757
"baseName": "nameLocation",
58-
"type": "NameLocation",
58+
"type": "NameLocation | null",
5959
"format": ""
6060
},
6161
{

src/typings/transferWebhooks/merchantPurchaseData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { Lodging } from "./lodging";
1212

1313

1414
export class MerchantPurchaseData {
15-
"airline"?: Airline;
15+
"airline"?: Airline | null;
1616
/**
1717
* Lodging information.
1818
*/
@@ -30,7 +30,7 @@ export class MerchantPurchaseData {
3030
{
3131
"name": "airline",
3232
"baseName": "airline",
33-
"type": "Airline",
33+
"type": "Airline | null",
3434
"format": ""
3535
},
3636
{

src/typings/transferWebhooks/numberAndBicAccountIdentification.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class NumberAndBicAccountIdentification {
1515
* The bank account number, without separators or whitespace. The length and format depends on the bank or country.
1616
*/
1717
"accountNumber": string;
18-
"additionalBankIdentification"?: AdditionalBankIdentification;
18+
"additionalBankIdentification"?: AdditionalBankIdentification | null;
1919
/**
2020
* The bank\'s 8- or 11-character BIC or SWIFT code.
2121
*/
@@ -39,7 +39,7 @@ export class NumberAndBicAccountIdentification {
3939
{
4040
"name": "additionalBankIdentification",
4141
"baseName": "additionalBankIdentification",
42-
"type": "AdditionalBankIdentification",
42+
"type": "AdditionalBankIdentification | null",
4343
"format": ""
4444
},
4545
{

src/typings/transferWebhooks/partyIdentification.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Address } from "./address";
1111

1212

1313
export class PartyIdentification {
14-
"address"?: Address;
14+
"address"?: Address | null;
1515
/**
1616
* The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**.
1717
*/
@@ -45,7 +45,7 @@ export class PartyIdentification {
4545
{
4646
"name": "address",
4747
"baseName": "address",
48-
"type": "Address",
48+
"type": "Address | null",
4949
"format": ""
5050
},
5151
{

src/typings/transferWebhooks/transactionEventViolation.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export class TransactionEventViolation {
1616
* An explanation about why the transaction rule failed.
1717
*/
1818
"reason"?: string;
19-
"transactionRule"?: TransactionRuleReference;
20-
"transactionRuleSource"?: TransactionRuleSource;
19+
"transactionRule"?: TransactionRuleReference | null;
20+
"transactionRuleSource"?: TransactionRuleSource | null;
2121

2222
static readonly discriminator: string | undefined = undefined;
2323

@@ -33,13 +33,13 @@ export class TransactionEventViolation {
3333
{
3434
"name": "transactionRule",
3535
"baseName": "transactionRule",
36-
"type": "TransactionRuleReference",
36+
"type": "TransactionRuleReference | null",
3737
"format": ""
3838
},
3939
{
4040
"name": "transactionRuleSource",
4141
"baseName": "transactionRuleSource",
42-
"type": "TransactionRuleSource",
42+
"type": "TransactionRuleSource | null",
4343
"format": ""
4444
} ];
4545

src/typings/transferWebhooks/transferData.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import { TransferReview } from "./transferReview";
2323

2424

2525
export class TransferData {
26-
"accountHolder"?: ResourceReference;
26+
"accountHolder"?: ResourceReference | null;
2727
"amount": Amount;
28-
"balanceAccount"?: ResourceReference;
28+
"balanceAccount"?: ResourceReference | null;
2929
/**
3030
* The unique identifier of the balance platform.
3131
*/
@@ -38,8 +38,8 @@ export class TransferData {
3838
* The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account.
3939
*/
4040
"category": TransferData.CategoryEnum;
41-
"categoryData"?: TransferDataCategoryData;
42-
"counterparty"?: TransferNotificationCounterParty;
41+
"categoryData"?: TransferDataCategoryData | null;
42+
"counterparty"?: TransferNotificationCounterParty | null;
4343
/**
4444
* The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.
4545
*/
@@ -48,7 +48,7 @@ export class TransferData {
4848
* Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , \' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ \' \" ! ?**
4949
*/
5050
"description"?: string;
51-
"directDebitInformation"?: DirectDebitInformation;
51+
"directDebitInformation"?: DirectDebitInformation | null;
5252
/**
5353
* The direction of the transfer. Possible values: **incoming**, **outgoing**.
5454
*/
@@ -61,13 +61,13 @@ export class TransferData {
6161
* The list of events leading up to the current status of the transfer.
6262
*/
6363
"events"?: Array<TransferEvent>;
64-
"executionDate"?: ExecutionDate;
65-
"externalReason"?: ExternalReason;
64+
"executionDate"?: ExecutionDate | null;
65+
"externalReason"?: ExternalReason | null;
6666
/**
6767
* The ID of the resource.
6868
*/
6969
"id"?: string;
70-
"paymentInstrument"?: PaymentInstrument;
70+
"paymentInstrument"?: PaymentInstrument | null;
7171
/**
7272
* Additional information about the status of the transfer.
7373
*/
@@ -80,7 +80,7 @@ export class TransferData {
8080
* A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others.
8181
*/
8282
"referenceForBeneficiary"?: string;
83-
"review"?: TransferReview;
83+
"review"?: TransferReview | null;
8484
/**
8585
* The sequence number of the transfer webhook. The numbers start from 1 and increase with each new webhook for a specific transfer. The sequence number can help you restore the correct sequence of events even if they arrive out of order.
8686
*/
@@ -89,8 +89,8 @@ export class TransferData {
8989
* The result of the transfer. For example, **authorised**, **refused**, or **error**.
9090
*/
9191
"status": TransferData.StatusEnum;
92-
"tracking"?: TransferDataTracking;
93-
"transactionRulesResult"?: TransactionRulesResult;
92+
"tracking"?: TransferDataTracking | null;
93+
"transactionRulesResult"?: TransactionRulesResult | null;
9494
/**
9595
* The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**.
9696
*/
@@ -104,7 +104,7 @@ export class TransferData {
104104
{
105105
"name": "accountHolder",
106106
"baseName": "accountHolder",
107-
"type": "ResourceReference",
107+
"type": "ResourceReference | null",
108108
"format": ""
109109
},
110110
{
@@ -116,7 +116,7 @@ export class TransferData {
116116
{
117117
"name": "balanceAccount",
118118
"baseName": "balanceAccount",
119-
"type": "ResourceReference",
119+
"type": "ResourceReference | null",
120120
"format": ""
121121
},
122122
{
@@ -140,13 +140,13 @@ export class TransferData {
140140
{
141141
"name": "categoryData",
142142
"baseName": "categoryData",
143-
"type": "TransferDataCategoryData",
143+
"type": "TransferDataCategoryData | null",
144144
"format": ""
145145
},
146146
{
147147
"name": "counterparty",
148148
"baseName": "counterparty",
149-
"type": "TransferNotificationCounterParty",
149+
"type": "TransferNotificationCounterParty | null",
150150
"format": ""
151151
},
152152
{
@@ -164,7 +164,7 @@ export class TransferData {
164164
{
165165
"name": "directDebitInformation",
166166
"baseName": "directDebitInformation",
167-
"type": "DirectDebitInformation",
167+
"type": "DirectDebitInformation | null",
168168
"format": ""
169169
},
170170
{
@@ -188,13 +188,13 @@ export class TransferData {
188188
{
189189
"name": "executionDate",
190190
"baseName": "executionDate",
191-
"type": "ExecutionDate",
191+
"type": "ExecutionDate | null",
192192
"format": ""
193193
},
194194
{
195195
"name": "externalReason",
196196
"baseName": "externalReason",
197-
"type": "ExternalReason",
197+
"type": "ExternalReason | null",
198198
"format": ""
199199
},
200200
{
@@ -206,7 +206,7 @@ export class TransferData {
206206
{
207207
"name": "paymentInstrument",
208208
"baseName": "paymentInstrument",
209-
"type": "PaymentInstrument",
209+
"type": "PaymentInstrument | null",
210210
"format": ""
211211
},
212212
{
@@ -230,7 +230,7 @@ export class TransferData {
230230
{
231231
"name": "review",
232232
"baseName": "review",
233-
"type": "TransferReview",
233+
"type": "TransferReview | null",
234234
"format": ""
235235
},
236236
{
@@ -248,13 +248,13 @@ export class TransferData {
248248
{
249249
"name": "tracking",
250250
"baseName": "tracking",
251-
"type": "TransferDataTracking",
251+
"type": "TransferDataTracking | null",
252252
"format": ""
253253
},
254254
{
255255
"name": "transactionRulesResult",
256256
"baseName": "transactionRulesResult",
257-
"type": "TransactionRulesResult",
257+
"type": "TransactionRulesResult | null",
258258
"format": ""
259259
},
260260
{

src/typings/transferWebhooks/transferDataTracking.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ export type TransferDataTracking = ConfirmationTrackingData | EstimationTracking
3030
*/
3131
export class TransferDataTrackingClass {
3232

33-
static readonly discriminator: string = "type";
33+
34+
static readonly discriminator: string | undefined = "type";
3435

35-
static readonly mapping: {[index: string]: string} | undefined = undefined;
36+
static readonly mapping: {[index: string]: string} | undefined = {
37+
"confirmation": "ConfirmationTrackingData",
38+
"estimation": "EstimationTrackingData",
39+
"internalReview": "InternalReviewTrackingData",
40+
};
3641
}

0 commit comments

Comments
 (0)