Skip to content

Commit

Permalink
Finish remaining credit assessment stuff
Browse files Browse the repository at this point in the history
- Export sdk functions and types
- Add remaining functions: cancelSigning, accept and decline
  • Loading branch information
boscar committed Jan 26, 2021
1 parent df1f3a1 commit c39e748
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/credit-assessment/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ export const newCase = (request: ICreditAssessmentInquiry) => {
return api.newCase(request);
};

export const getStatus = (caseId: string) => {
return api.getStatus(caseId);
};
export const getStatus = (caseId: string) => api.getStatus(caseId);

export const signCase = (request: ICreditAssessmentSignRequest) => {
return api
export const signCase = (request: ICreditAssessmentSignRequest) =>
api
.signCase(request)
.then(
(response) =>
new CreditAssessmentSignResponse(response, request.method)
);
};

export const cancelSigning = (caseId: string) => api.cancelSigning(caseId);

export const accept = (caseId: string) => api.accept(caseId);

export const decline = (caseId: string) => api.decline(caseId);
11 changes: 11 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as orders from "./orders/index";
import * as payments from "./payments/index";
import * as vehicles from "./vehicles/index";
import * as bankid from "./bankid/index";
import * as creditAssessment from "./credit-assessment/index";

export { config };
export { customers };
Expand All @@ -13,6 +14,7 @@ export { orders };
export { payments };
export { vehicles };
export { bankid };
export { creditAssessment };

export {
IConfiguration,
Expand Down Expand Up @@ -74,3 +76,12 @@ export {
AuthStatus,
IBankIdCancelRequest,
} from "./bankid/types";
export {
MaritalStatus,
Employment,
ICreditAssessmentSignRequest,
ICreditAssessmentStatus,
ICreditAssessmentInquiry,
ICreditAssessmentCase,
ICreditAssessmentSignResponse,
} from "./credit-assessment/types";

0 comments on commit c39e748

Please sign in to comment.