From 541145c54dd8dbee6aba00ad8e019aea2813b1b2 Mon Sep 17 00:00:00 2001 From: Daniel Granerud <42067409+NullableInt@users.noreply.github.com> Date: Mon, 22 Mar 2021 13:33:22 +0100 Subject: [PATCH] fix: 0 errors when running build --- src/Services/PaymentOrder/PaymentOrder.ts | 12 ++++++++---- .../PaymentOrder/models/PaymentOrderRequest.d.ts | 3 +-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Services/PaymentOrder/PaymentOrder.ts b/src/Services/PaymentOrder/PaymentOrder.ts index b42c9922..6d1ede98 100644 --- a/src/Services/PaymentOrder/PaymentOrder.ts +++ b/src/Services/PaymentOrder/PaymentOrder.ts @@ -25,12 +25,16 @@ export class PaymentOrder extends SwedbankBase { } async createPurchase(item: PurchaseInput): Promise { - const response = await this.create({ + let request = { paymentorder: { operation: 'Purchase', - ...item, - }, - }); + ...item + } + } as PaymentOrderRequest; + + const response = await this.create( + request + ); return new Purchase(this.config, response); } diff --git a/src/Services/PaymentOrder/models/PaymentOrderRequest.d.ts b/src/Services/PaymentOrder/models/PaymentOrderRequest.d.ts index 3ecbc36a..87fc1625 100644 --- a/src/Services/PaymentOrder/models/PaymentOrderRequest.d.ts +++ b/src/Services/PaymentOrder/models/PaymentOrderRequest.d.ts @@ -2,7 +2,6 @@ import { RiskIndicator } from "./RiskIndicator"; import { OrderItem } from "./OrderItem"; import { PayeeInfo } from "./PayeeInfo"; import { PayerInfo } from "./PayerInfo"; -import { SwedbankBase } from "../../../SwedbankBase"; import { Urls } from "../../CardPayment/models/Payment/Urls"; export interface PaymentOrderRequest { @@ -10,7 +9,7 @@ export interface PaymentOrderRequest { } -export interface PaymentOrderRequestResource extends SwedbankBase { +export interface PaymentOrderRequestResource { /** * Determines the initial operation, that defines the type card payment * created.