Skip to content

Commit 6f39540

Browse files
committed
Add Surcharge
1 parent 45789cc commit 6f39540

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

src/typings/checkout/models.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ export * from './storedPaymentMethodResource';
196196
export * from './subInputDetail';
197197
export * from './subMerchant';
198198
export * from './subMerchantInfo';
199+
export * from './surcharge';
199200
export * from './taxTotal';
200201
export * from './threeDS2RequestData';
201202
export * from './threeDS2RequestFields';
@@ -408,6 +409,7 @@ import { StoredPaymentMethodResource } from './storedPaymentMethodResource';
408409
import { SubInputDetail } from './subInputDetail';
409410
import { SubMerchant } from './subMerchant';
410411
import { SubMerchantInfo } from './subMerchantInfo';
412+
import { Surcharge } from './surcharge';
411413
import { TaxTotal } from './taxTotal';
412414
import { ThreeDS2RequestData } from './threeDS2RequestData';
413415
import { ThreeDS2RequestFields } from './threeDS2RequestFields';
@@ -831,6 +833,7 @@ let typeMap: {[index: string]: any} = {
831833
"SubInputDetail": SubInputDetail,
832834
"SubMerchant": SubMerchant,
833835
"SubMerchantInfo": SubMerchantInfo,
836+
"Surcharge": Surcharge,
834837
"TaxTotal": TaxTotal,
835838
"ThreeDS2RequestData": ThreeDS2RequestData,
836839
"ThreeDS2RequestFields": ThreeDS2RequestFields,

src/typings/checkout/paymentRequest.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ import { SepaDirectDebitDetails } from './sepaDirectDebitDetails';
7474
import { Split } from './split';
7575
import { StoredPaymentMethodDetails } from './storedPaymentMethodDetails';
7676
import { SubMerchantInfo } from './subMerchantInfo';
77+
import { Surcharge } from './surcharge';
7778
import { ThreeDS2RequestFields } from './threeDS2RequestFields';
7879
import { ThreeDSecureData } from './threeDSecureData';
7980
import { TwintDetails } from './twintDetails';
@@ -294,6 +295,7 @@ export class PaymentRequest {
294295
* This field contains additional information on the submerchant, who is onboarded to an acquirer through a payment facilitator or aggregator
295296
*/
296297
'subMerchants'?: Array<SubMerchantInfo>;
298+
'surcharge'?: Surcharge | null;
297299
/**
298300
* The shopper\'s telephone number.
299301
*/
@@ -649,6 +651,11 @@ export class PaymentRequest {
649651
"baseName": "subMerchants",
650652
"type": "Array<SubMerchantInfo>"
651653
},
654+
{
655+
"name": "surcharge",
656+
"baseName": "surcharge",
657+
"type": "Surcharge | null"
658+
},
652659
{
653660
"name": "telephoneNumber",
654661
"baseName": "telephoneNumber",

src/typings/checkout/surcharge.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* The version of the OpenAPI document: v71
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 Surcharge {
12+
/**
13+
* The [surcharge](https://docs.adyen.com/online-payments/surcharge/) amount to apply to the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). When you apply surcharge, include the surcharge in the `amount.value` field. Review our [Surcharge compliance guide](https://docs.adyen.com/development-resources/surcharge-compliance/) to learn about how to comply with regulatory requirements when applying surcharge.
14+
*/
15+
'value': number;
16+
17+
static discriminator: string | undefined = undefined;
18+
19+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
20+
{
21+
"name": "value",
22+
"baseName": "value",
23+
"type": "number"
24+
} ];
25+
26+
static getAttributeTypeMap() {
27+
return Surcharge.attributeTypeMap;
28+
}
29+
}
30+

0 commit comments

Comments
 (0)