Skip to content

Commit 1898340

Browse files
committed
Add mapping
1 parent de8ef3f commit 1898340

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

src/typings/checkout/paymentResponseAction.ts

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,20 @@
77
* Do not edit this class manually.
88
*/
99

10-
import { CheckoutAwaitAction } from '../models/CheckoutAwaitAction';
11-
import { CheckoutBankTransferAction } from '../models/CheckoutBankTransferAction';
12-
import { CheckoutDelegatedAuthenticationAction } from '../models/CheckoutDelegatedAuthenticationAction';
13-
import { CheckoutNativeRedirectAction } from '../models/CheckoutNativeRedirectAction';
14-
import { CheckoutQrCodeAction } from '../models/CheckoutQrCodeAction';
15-
import { CheckoutRedirectAction } from '../models/CheckoutRedirectAction';
16-
import { CheckoutSDKAction } from '../models/CheckoutSDKAction';
17-
import { CheckoutThreeDS2Action } from '../models/CheckoutThreeDS2Action';
18-
import { CheckoutVoucherAction } from '../models/CheckoutVoucherAction';
10+
import { CheckoutAwaitAction } from './models';
11+
import { CheckoutBankTransferAction } from './models';
12+
import { CheckoutDelegatedAuthenticationAction } from './models';
13+
import { CheckoutNativeRedirectAction } from './models';
14+
import { CheckoutQrCodeAction } from './models';
15+
import { CheckoutRedirectAction } from './models';
16+
import { CheckoutSDKAction } from './models';
17+
import { CheckoutThreeDS2Action } from './models';
18+
import { CheckoutVoucherAction } from './models';
1919

2020
/**
2121
* Action to be taken for completing the payment.
2222
*/
23+
2324
/**
2425
* @type PaymentResponseAction
2526
* Type
@@ -33,9 +34,19 @@ export type PaymentResponseAction = CheckoutAwaitAction | CheckoutBankTransferAc
3334
* @export
3435
*/
3536
export class PaymentResponseActionClass {
36-
static readonly discriminator: string | undefined = undefined;
37-
38-
static readonly mapping: {[index: string]: string} | undefined = undefined;
37+
// static readonly discriminator: string | undefined = undefined;
38+
static readonly discriminator: string = "type";
39+
40+
//static readonly mapping: {[index: string]: string} | undefined = undefined;
41+
static readonly mapping: { [key: string]: string } = {
42+
"await": "CheckoutAwaitAction",
43+
"bankTransfer": "CheckoutBankTransferAction",
44+
"redirect": "CheckoutRedirectAction",
45+
"threeDS2": "CheckoutThreeDS2Action",
46+
"sdk": "CheckoutSDKAction",
47+
"voucher": "CheckoutVoucherAction",
48+
// Add all other action types...
49+
};
3950
}
4051

4152

0 commit comments

Comments
 (0)