Skip to content

Commit

Permalink
Merge pull request #81 from buckaroo-it/BA-640-Update,Test&Release(1.…
Browse files Browse the repository at this point in the history
…4.1)

BA-640 - Update, Test & Release (1.4.1)
  • Loading branch information
ShuCh3n authored Nov 28, 2024
2 parents ce9d160 + bceb5f3 commit fe35ab5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@buckaroo/buckaroo_sdk",
"version": "1.4.0",
"version": "1.4.1",
"description": "Buckaroo payment SDK",
"main": "dist/buckaroo.cjs.js",
"module": "dist/buckaroo.esm.js",
Expand Down
21 changes: 20 additions & 1 deletion src/PaymentMethods/KlarnaKP/Models/IPay.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
import { IPaymentRequest, Person, ServiceParameter } from '../../../Models';
import { IArticle, IPaymentRequest, Person, ServiceParameter } from '../../../Models';
import Article, { IKlarnaKpArticle } from './Article';

export interface IPay extends IPaymentRequest {
reservationNumber?: string;
articles?: Partial<IKlarnaKpArticle>[];
}

export class Pay extends ServiceParameter {
set reservationNumber(value: string) {
this.set('reservationNumber', value);
}

set articles(articles: IArticle[]) {
this.set(
'articles',
articles.map((article) => new Article(article))
);
}

protected getGroups() {
return super.getGroups({
Articles: 'Article',
});
}

protected getCountable() {
return super.getCountable(['Articles']);
}
}

export class Customer extends Person {
Expand Down

0 comments on commit fe35ab5

Please sign in to comment.