Skip to content

Commit 10fd154

Browse files
authored
Merge pull request #138 from companieshouse/ncs-89-adding-cs-next-made-up-to-to-company-profile
NCS-89 Adding last_made_up_to and next_made_up_to Confirmation Statem…
2 parents 154aa2a + 1802774 commit 10fd154

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

src/services/company-profile/service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ export default class CompanyProfileService {
7373
overdue: acc?.overdue
7474
},
7575
confirmationStatement: {
76+
lastMadeUpTo: confirmationStatement?.last_made_up_to,
7677
nextDue: confirmationStatement?.next_due,
78+
nextMadeUpTo: confirmationStatement?.next_made_up_to,
7779
overdue: confirmationStatement?.overdue
7880
},
7981
links: {

src/services/company-profile/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ export interface NextAccountsResource {
4444
}
4545

4646
export interface ConfirmationStatementResource {
47+
last_made_up_to?: string;
4748
next_due: string;
49+
next_made_up_to?: string;
4850
overdue: boolean;
4951
}
5052

@@ -76,7 +78,9 @@ export interface NextAccounts {
7678
}
7779

7880
export interface ConfirmationStatement {
81+
lastMadeUpTo?: string;
7982
nextDue: string;
83+
nextMadeUpTo?: string;
8084
overdue: boolean;
8185
}
8286

test/services/company-profile/service.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ describe("company-profile", () => {
7070
overdue: true
7171
},
7272
confirmation_statement: {
73+
last_made_up_to: "2018-08-24",
7374
next_due: "2019-08-24",
75+
next_made_up_to: "2019-07-20",
7476
overdue: true
7577
},
7678
links: {
@@ -113,7 +115,9 @@ describe("company-profile", () => {
113115
expect(data.resource.accounts.nextAccounts.periodStartOn).to.equal(mockResponseBody.accounts.next_accounts.period_start_on);
114116
expect(data.resource.accounts.nextDue).to.equal(mockResponseBody.accounts.next_due);
115117
expect(data.resource.accounts.overdue).to.equal(mockResponseBody.accounts.overdue);
118+
expect(data.resource.confirmationStatement.lastMadeUpTo).to.equal(mockResponseBody.confirmation_statement.last_made_up_to);
116119
expect(data.resource.confirmationStatement.nextDue).to.equal(mockResponseBody.confirmation_statement.next_due);
120+
expect(data.resource.confirmationStatement.nextMadeUpTo).to.equal(mockResponseBody.confirmation_statement.next_made_up_to);
117121
expect(data.resource.confirmationStatement.overdue).to.equal(mockResponseBody.confirmation_statement.overdue);
118122
expect(data.resource.links.filingHistory).to.equal(mockResponseBody.links.filing_history);
119123
});
@@ -171,7 +175,9 @@ describe("company-profile", () => {
171175
expect(data.resource.accounts.nextAccounts.periodStartOn).to.be.undefined;
172176
expect(data.resource.accounts.nextDue).to.be.undefined;
173177
expect(data.resource.accounts.overdue).to.be.undefined;
178+
expect(data.resource.confirmationStatement.lastMadeUpTo).to.be.undefined;
174179
expect(data.resource.confirmationStatement.nextDue).to.be.undefined;
180+
expect(data.resource.confirmationStatement.nextMadeUpTo).to.be.undefined;
175181
expect(data.resource.confirmationStatement.overdue).to.be.undefined;
176182
expect(data.resource.links.filingHistory).to.be.undefined;
177183
expect(data.resource.hasSuperSecurePscs).to.be.undefined;

0 commit comments

Comments
 (0)