Skip to content

Commit

Permalink
Merge pull request #25 from PaymentRails/PR-3869_update-batch-class-type
Browse files Browse the repository at this point in the history
Update batch class type
  • Loading branch information
fronugget authored Nov 8, 2021
2 parents 66a2db5 + f7c8671 commit df50d88
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
13 changes: 11 additions & 2 deletions lib/Batch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,16 @@ export class Batch {
completedAt: string = "";
createdAt: string = "";
updatedAt: string = "";
payments?: Payment[] = [];
payments: {
payments: Payment[];
} & types.Serializer.WithMeta = {
payments: [],
meta: {
records: 0,
page: 0,
pages: 0,
},
};
quoteExpiredAt?: string;

/**
Expand Down Expand Up @@ -162,7 +171,7 @@ export class Batch {
}

private _initialize(account: types.Batch.Batch) {
Object.keys(account).forEach(k => {
Object.keys(account).forEach((k) => {
(this as any)[k] = (account as any)[k];
});
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "paymentrails",
"version": "0.10.2",
"version": "0.10.3",
"description": "",
"main": "./dist/index",
"types": "./dist/index",
Expand Down

0 comments on commit df50d88

Please sign in to comment.