Skip to content

Commit

Permalink
fix: 0 errors when running build
Browse files Browse the repository at this point in the history
  • Loading branch information
NullableInt committed Mar 22, 2021
1 parent f454224 commit 541145c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 8 additions & 4 deletions src/Services/PaymentOrder/PaymentOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ export class PaymentOrder extends SwedbankBase {
}

async createPurchase(item: PurchaseInput): Promise<Purchase> {
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);
}
Expand Down
3 changes: 1 addition & 2 deletions src/Services/PaymentOrder/models/PaymentOrderRequest.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ 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 {
paymentorder: PaymentOrderRequestResource
}


export interface PaymentOrderRequestResource extends SwedbankBase {
export interface PaymentOrderRequestResource {
/**
* Determines the initial operation, that defines the type card payment
* created.
Expand Down

0 comments on commit 541145c

Please sign in to comment.