diff --git a/package.json b/package.json index 303a3c6..c8e1a09 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "paynl-sdk", - "version": "2.0.2", + "version": "2.0.3", "repository": { "type": "git", "url": "https://github.com/paynl/nodejs-sdk.git" diff --git a/src/order/Order.ts b/src/order/Order.ts index b769718..cfa923f 100644 --- a/src/order/Order.ts +++ b/src/order/Order.ts @@ -3,8 +3,10 @@ import { Payment } from './Payment.ts'; import { NewAddress } from './Address.ts'; import { Company } from './Customer.ts'; import { Stats } from '../shared/index.ts'; +import { SplitPayment } from './SplitPayment.ts'; export type Order = { + id: string; type: string; serviceId: string; description: string | null; @@ -22,6 +24,7 @@ export type Order = { pointOfInteraction: string | null; test: boolean; }; + splitPayments: SplitPayment[]; stats: Stats; transferData: Record; amount: ResponseAmount; diff --git a/src/order/SplitPayment.ts b/src/order/SplitPayment.ts new file mode 100644 index 0000000..ab57d76 --- /dev/null +++ b/src/order/SplitPayment.ts @@ -0,0 +1,7 @@ +import { ResponseAmount } from './Amount.ts'; + +export type SplitPayment = { + serviceId: string; + amount: ResponseAmount; + fee: string; +}; diff --git a/tests/support/fakeOrder.ts b/tests/support/fakeOrder.ts index 09157ec..a11bc57 100644 --- a/tests/support/fakeOrder.ts +++ b/tests/support/fakeOrder.ts @@ -1,6 +1,7 @@ import { Order } from '../../src/index.ts'; export const orderCreateResponse: Order = { + id: 'ord_test', type: 'sale', serviceId: 'SL-####-####', description: 'Instore Terminal Order #27', @@ -18,6 +19,7 @@ export const orderCreateResponse: Order = { pointOfInteraction: null, test: false, }, + splitPayments: [], stats: { extra1: 'extra1', extra2: 'extra2',