-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathtransferData.ts
More file actions
507 lines (498 loc) · 20.1 KB
/
transferData.ts
File metadata and controls
507 lines (498 loc) · 20.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
/*
* The version of the OpenAPI document: v4
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit this class manually.
*/
import { Amount } from "./amount";
import { BalanceMutation } from "./balanceMutation";
import { DirectDebitInformation } from "./directDebitInformation";
import { ExecutionDate } from "./executionDate";
import { ExternalReason } from "./externalReason";
import { PaymentInstrument } from "./paymentInstrument";
import { ResourceReference } from "./resourceReference";
import { TransactionRulesResult } from "./transactionRulesResult";
import { TransferDataCategoryData } from "./transferDataCategoryData";
import { TransferDataTracking } from "./transferDataTracking";
import { TransferEvent } from "./transferEvent";
import { TransferNotificationCounterParty } from "./transferNotificationCounterParty";
import { TransferReview } from "./transferReview";
export class TransferData {
"accountHolder"?: ResourceReference | null;
"amount": Amount;
"balanceAccount"?: ResourceReference | null;
/**
* The unique identifier of the balance platform.
*/
"balancePlatform"?: string;
/**
* The list of the latest balance statuses in the transfer.
*/
"balances"?: Array<BalanceMutation>;
/**
* The category of the transfer. Possible values: - **bank**: A transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-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#responses-200-id) within your platform. - **issuedCard**: A transfer initiated by an 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.
*/
"category": TransferData.CategoryEnum;
"categoryData"?: TransferDataCategoryData | null;
"counterparty"?: TransferNotificationCounterParty | null;
/**
* The date and time when the transfer was created, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.
*/
"createdAt"?: Date;
/**
* The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.
*
* @deprecated since Transfer webhooks v3
* Use createdAt or updatedAt
*/
"creationDate"?: Date;
/**
* 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] & $ % # @** **~ = + - _ \' \" ! ?**
*/
"description"?: string;
"directDebitInformation"?: DirectDebitInformation | null;
/**
* The direction of the transfer. Possible values: **incoming**, **outgoing**.
*/
"direction"?: TransferData.DirectionEnum;
/**
* The unique identifier of the latest transfer event. Included only when the `category` is **issuedCard**.
*/
"eventId"?: string;
/**
* The list of events leading up to the current status of the transfer.
*/
"events"?: Array<TransferEvent>;
"executionDate"?: ExecutionDate | null;
"externalReason"?: ExternalReason | null;
/**
* The ID of the resource.
*/
"id"?: string;
"paymentInstrument"?: PaymentInstrument | null;
/**
* Additional information about the status of the transfer.
*/
"reason"?: TransferData.ReasonEnum;
/**
* Your reference for the transfer, used internally within your platform. If you don\'t provide this in the request, Adyen generates a unique reference.
*/
"reference"?: string;
/**
* 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.
*/
"referenceForBeneficiary"?: string;
"review"?: TransferReview | null;
/**
* 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.
*/
"sequenceNumber"?: number;
/**
* The result of the transfer. For example: - **received**: an outgoing transfer request is created. - **refused**: the transfer request is rejected by Adyen for one of the following reasons: - Lack of funds in the balance account. - Transfer limit exceeded. - Transaction rule requirements violated. - **authorised**: the transfer request is authorized and the funds are reserved. - **booked**: the funds are deducted from your user\'s balance account. - **failed**: the transfer is rejected by the counterparty\'s bank. - **returned**: the transfer is returned by the counterparty\'s bank.
*/
"status": TransferData.StatusEnum;
"tracking"?: TransferDataTracking | null;
"transactionRulesResult"?: TransactionRulesResult | null;
/**
* The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**.
*/
"type"?: TransferData.TypeEnum;
/**
* The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.
*/
"updatedAt"?: Date;
static readonly discriminator: string | undefined = undefined;
static readonly mapping: {[index: string]: string} | undefined = undefined;
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
{
"name": "accountHolder",
"baseName": "accountHolder",
"type": "ResourceReference | null",
"format": ""
},
{
"name": "amount",
"baseName": "amount",
"type": "Amount",
"format": ""
},
{
"name": "balanceAccount",
"baseName": "balanceAccount",
"type": "ResourceReference | null",
"format": ""
},
{
"name": "balancePlatform",
"baseName": "balancePlatform",
"type": "string",
"format": ""
},
{
"name": "balances",
"baseName": "balances",
"type": "Array<BalanceMutation>",
"format": ""
},
{
"name": "category",
"baseName": "category",
"type": "TransferData.CategoryEnum",
"format": ""
},
{
"name": "categoryData",
"baseName": "categoryData",
"type": "TransferDataCategoryData | null",
"format": ""
},
{
"name": "counterparty",
"baseName": "counterparty",
"type": "TransferNotificationCounterParty | null",
"format": ""
},
{
"name": "createdAt",
"baseName": "createdAt",
"type": "Date",
"format": "date-time"
},
{
"name": "creationDate",
"baseName": "creationDate",
"type": "Date",
"format": "date-time"
},
{
"name": "description",
"baseName": "description",
"type": "string",
"format": ""
},
{
"name": "directDebitInformation",
"baseName": "directDebitInformation",
"type": "DirectDebitInformation | null",
"format": ""
},
{
"name": "direction",
"baseName": "direction",
"type": "TransferData.DirectionEnum",
"format": ""
},
{
"name": "eventId",
"baseName": "eventId",
"type": "string",
"format": ""
},
{
"name": "events",
"baseName": "events",
"type": "Array<TransferEvent>",
"format": ""
},
{
"name": "executionDate",
"baseName": "executionDate",
"type": "ExecutionDate | null",
"format": ""
},
{
"name": "externalReason",
"baseName": "externalReason",
"type": "ExternalReason | null",
"format": ""
},
{
"name": "id",
"baseName": "id",
"type": "string",
"format": ""
},
{
"name": "paymentInstrument",
"baseName": "paymentInstrument",
"type": "PaymentInstrument | null",
"format": ""
},
{
"name": "reason",
"baseName": "reason",
"type": "TransferData.ReasonEnum",
"format": ""
},
{
"name": "reference",
"baseName": "reference",
"type": "string",
"format": ""
},
{
"name": "referenceForBeneficiary",
"baseName": "referenceForBeneficiary",
"type": "string",
"format": ""
},
{
"name": "review",
"baseName": "review",
"type": "TransferReview | null",
"format": ""
},
{
"name": "sequenceNumber",
"baseName": "sequenceNumber",
"type": "number",
"format": "int32"
},
{
"name": "status",
"baseName": "status",
"type": "TransferData.StatusEnum",
"format": ""
},
{
"name": "tracking",
"baseName": "tracking",
"type": "TransferDataTracking | null",
"format": ""
},
{
"name": "transactionRulesResult",
"baseName": "transactionRulesResult",
"type": "TransactionRulesResult | null",
"format": ""
},
{
"name": "type",
"baseName": "type",
"type": "TransferData.TypeEnum",
"format": ""
},
{
"name": "updatedAt",
"baseName": "updatedAt",
"type": "Date",
"format": "date-time"
} ];
static getAttributeTypeMap() {
return TransferData.attributeTypeMap;
}
public constructor() {
}
}
export namespace TransferData {
export enum CategoryEnum {
Bank = 'bank',
Card = 'card',
Internal = 'internal',
IssuedCard = 'issuedCard',
PlatformPayment = 'platformPayment',
TopUp = 'topUp'
}
export enum DirectionEnum {
Incoming = 'incoming',
Outgoing = 'outgoing'
}
export enum ReasonEnum {
AccountHierarchyNotActive = 'accountHierarchyNotActive',
AmountLimitExceeded = 'amountLimitExceeded',
ApprovalExpired = 'approvalExpired',
Approved = 'approved',
AvsDeclined = 'avsDeclined',
BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule',
BlockCard = 'blockCard',
CallReferral = 'callReferral',
Cancelled = 'cancelled',
CaptureCard = 'captureCard',
CardExpired = 'cardExpired',
CardholderAuthenticationRequired = 'cardholderAuthenticationRequired',
CashbackAmountExceedsLimit = 'cashbackAmountExceedsLimit',
CavvDeclined = 'cavvDeclined',
ContactlessFallback = 'contactlessFallback',
ContactlessLimitReached = 'contactlessLimitReached',
CounterpartyAccountBlocked = 'counterpartyAccountBlocked',
CounterpartyAccountClosed = 'counterpartyAccountClosed',
CounterpartyAccountNotFound = 'counterpartyAccountNotFound',
CounterpartyAddressRequired = 'counterpartyAddressRequired',
CounterpartyBankTimedOut = 'counterpartyBankTimedOut',
CounterpartyBankUnavailable = 'counterpartyBankUnavailable',
CryptographicFailure = 'cryptographicFailure',
CvcDeclined = 'cvcDeclined',
Declined = 'declined',
DeclinedByBapValidation = 'declinedByBapValidation',
DeclinedByTransactionRule = 'declinedByTransactionRule',
DeclinedNonGeneric = 'declinedNonGeneric',
DirectDebitNotSupported = 'directDebitNotSupported',
DoNotHonor = 'doNotHonor',
DomesticDebitTransactionNotAllowed = 'domesticDebitTransactionNotAllowed',
DuplicateTransmissionDetected = 'duplicateTransmissionDetected',
Error = 'error',
FormatError = 'formatError',
Fraud = 'fraud',
FraudCancelled = 'fraudCancelled',
HonorWithId = 'honorWithId',
InternalTimeout = 'internalTimeout',
InvalidAccount = 'invalidAccount',
InvalidAmount = 'invalidAmount',
InvalidAuthorizationLifeCycle = 'invalidAuthorizationLifeCycle',
InvalidCard = 'invalidCard',
InvalidExpiryDate = 'invalidExpiryDate',
InvalidFromAccount = 'invalidFromAccount',
InvalidIssuer = 'invalidIssuer',
InvalidMerchant = 'invalidMerchant',
InvalidPin = 'invalidPin',
InvalidToAccount = 'invalidToAccount',
InvalidTransaction = 'invalidTransaction',
IssuerSuspectedFraud = 'issuerSuspectedFraud',
LostCard = 'lostCard',
MobilePinRequired = 'mobilePinRequired',
NoCheckingAccount = 'noCheckingAccount',
NoSavingsAccount = 'noSavingsAccount',
Not3dAuthenticated = 'not3dAuthenticated',
NotEnoughBalance = 'notEnoughBalance',
NotSubmitted = 'notSubmitted',
NotSupported = 'notSupported',
PartiallyApproved = 'partiallyApproved',
Pending = 'pending',
PendingApproval = 'pendingApproval',
PendingExecution = 'pendingExecution',
PinNotChanged = 'pinNotChanged',
PinRequired = 'pinRequired',
PinTriesExceeded = 'pinTriesExceeded',
PinValidationNotPossible = 'pinValidationNotPossible',
PurchaseAmountOnlyNoCashBack = 'purchaseAmountOnlyNoCashBack',
RefusedByCounterpartyBank = 'refusedByCounterpartyBank',
RefusedByCustomer = 'refusedByCustomer',
RestrictedCard = 'restrictedCard',
RevocationOfAuth = 'revocationOfAuth',
RouteNotFound = 'routeNotFound',
ScaAuthenticationRequired = 'scaAuthenticationRequired',
ScaFailed = 'scaFailed',
SchemeAdvice = 'schemeAdvice',
SecurityViolation = 'securityViolation',
ShopperCancelled = 'shopperCancelled',
StolenCard = 'stolenCard',
ThreedsDynamicLinkingMismatch = 'threedsDynamicLinkingMismatch',
TransactionNotPermitted = 'transactionNotPermitted',
TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist',
UnableToRouteTransaction = 'unableToRouteTransaction',
Unknown = 'unknown',
WithdrawalAmountExceeded = 'withdrawalAmountExceeded',
WithdrawalCountExceeded = 'withdrawalCountExceeded'
}
export enum StatusEnum {
ApprovalPending = 'approvalPending',
AtmWithdrawal = 'atmWithdrawal',
AtmWithdrawalReversalPending = 'atmWithdrawalReversalPending',
AtmWithdrawalReversed = 'atmWithdrawalReversed',
AuthAdjustmentAuthorised = 'authAdjustmentAuthorised',
AuthAdjustmentError = 'authAdjustmentError',
AuthAdjustmentRefused = 'authAdjustmentRefused',
Authorised = 'authorised',
BankTransfer = 'bankTransfer',
BankTransferPending = 'bankTransferPending',
Booked = 'booked',
BookingPending = 'bookingPending',
Cancelled = 'cancelled',
CapturePending = 'capturePending',
CaptureReversalPending = 'captureReversalPending',
CaptureReversed = 'captureReversed',
Captured = 'captured',
CapturedExternally = 'capturedExternally',
Chargeback = 'chargeback',
ChargebackExternally = 'chargebackExternally',
ChargebackPending = 'chargebackPending',
ChargebackReversalPending = 'chargebackReversalPending',
ChargebackReversed = 'chargebackReversed',
Credited = 'credited',
DepositCorrection = 'depositCorrection',
DepositCorrectionPending = 'depositCorrectionPending',
Dispute = 'dispute',
DisputeClosed = 'disputeClosed',
DisputeExpired = 'disputeExpired',
DisputeNeedsReview = 'disputeNeedsReview',
Error = 'error',
Expired = 'expired',
Failed = 'failed',
Fee = 'fee',
FeePending = 'feePending',
InternalTransfer = 'internalTransfer',
InternalTransferPending = 'internalTransferPending',
InvoiceDeduction = 'invoiceDeduction',
InvoiceDeductionPending = 'invoiceDeductionPending',
ManualCorrectionPending = 'manualCorrectionPending',
ManuallyCorrected = 'manuallyCorrected',
MatchedStatement = 'matchedStatement',
MatchedStatementPending = 'matchedStatementPending',
MerchantPayin = 'merchantPayin',
MerchantPayinPending = 'merchantPayinPending',
MerchantPayinReversed = 'merchantPayinReversed',
MerchantPayinReversedPending = 'merchantPayinReversedPending',
MiscCost = 'miscCost',
MiscCostPending = 'miscCostPending',
PaymentCost = 'paymentCost',
PaymentCostPending = 'paymentCostPending',
PendingApproval = 'pendingApproval',
PendingExecution = 'pendingExecution',
Received = 'received',
RefundPending = 'refundPending',
RefundReversalPending = 'refundReversalPending',
RefundReversed = 'refundReversed',
Refunded = 'refunded',
RefundedExternally = 'refundedExternally',
Refused = 'refused',
Rejected = 'rejected',
ReserveAdjustment = 'reserveAdjustment',
ReserveAdjustmentPending = 'reserveAdjustmentPending',
Returned = 'returned',
SecondChargeback = 'secondChargeback',
SecondChargebackPending = 'secondChargebackPending',
Undefined = 'undefined'
}
export enum TypeEnum {
Payment = 'payment',
Capture = 'capture',
CaptureReversal = 'captureReversal',
Refund = 'refund',
RefundReversal = 'refundReversal',
Chargeback = 'chargeback',
ChargebackCorrection = 'chargebackCorrection',
ChargebackReversal = 'chargebackReversal',
ChargebackReversalCorrection = 'chargebackReversalCorrection',
SecondChargeback = 'secondChargeback',
SecondChargebackCorrection = 'secondChargebackCorrection',
AtmWithdrawal = 'atmWithdrawal',
AtmWithdrawalReversal = 'atmWithdrawalReversal',
InternalTransfer = 'internalTransfer',
InternalDirectDebit = 'internalDirectDebit',
ManualCorrection = 'manualCorrection',
InvoiceDeduction = 'invoiceDeduction',
DepositCorrection = 'depositCorrection',
ReserveAdjustment = 'reserveAdjustment',
BankTransfer = 'bankTransfer',
BankDirectDebit = 'bankDirectDebit',
CardTransfer = 'cardTransfer',
MiscCost = 'miscCost',
PaymentCost = 'paymentCost',
Fee = 'fee',
Leftover = 'leftover',
Grant = 'grant',
CapitalFundsCollection = 'capitalFundsCollection',
CashOutInstruction = 'cashOutInstruction',
CashoutFee = 'cashoutFee',
CashoutRepayment = 'cashoutRepayment',
CashoutFunding = 'cashoutFunding',
Repayment = 'repayment',
Installment = 'installment',
InstallmentReversal = 'installmentReversal',
BalanceAdjustment = 'balanceAdjustment',
BalanceRollover = 'balanceRollover',
BalanceMigration = 'balanceMigration'
}
}