Skip to content

Commit bdf97c4

Browse files
authored
Merge pull request #818 from companieshouse/feature/company-profile-term
company-profile - add term
2 parents d058591 + eb9f3d5 commit bdf97c4

File tree

2 files changed

+105
-101
lines changed

2 files changed

+105
-101
lines changed

src/services/company-profile/service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ export default class CompanyProfileService {
118118
links: {
119119
filingHistory: links?.filing_history
120120
},
121-
subtype: body?.subtype
121+
subtype: body?.subtype,
122+
term: body?.term
122123
};
123124

124125
return resource;

src/services/company-profile/types.ts

Lines changed: 103 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -2,154 +2,157 @@
22
* CompanyProfileResource is what is returned from the api.
33
*/
44
export interface CompanyProfileResource {
5-
company_name: string;
6-
company_number: string;
7-
company_status: string;
8-
company_status_detail: string;
9-
date_of_creation: string;
10-
date_of_cessation?: string,
11-
jurisdiction: string;
12-
sic_codes: string[];
13-
has_been_liquidated: boolean;
14-
has_super_secure_pscs?: boolean;
15-
type: string;
16-
has_charges: boolean;
17-
has_insolvency_history: boolean;
18-
registered_office_address: RegisteredOfficeAddressResource;
19-
service_address?: ServiceAddressResource;
20-
accounts: AccountsResource;
21-
confirmation_statement?: ConfirmationStatementResource;
22-
foreign_company_details?: ForeignCompanyDetailsResource;
23-
is_on_register_in_country_formed_in?: string;
24-
links: LinksResource;
25-
subtype?: string;
5+
company_name: string;
6+
company_number: string;
7+
company_status: string;
8+
company_status_detail: string;
9+
date_of_creation: string;
10+
date_of_cessation?: string;
11+
jurisdiction: string;
12+
sic_codes: string[];
13+
has_been_liquidated: boolean;
14+
has_super_secure_pscs?: boolean;
15+
type: string;
16+
has_charges: boolean;
17+
has_insolvency_history: boolean;
18+
registered_office_address: RegisteredOfficeAddressResource;
19+
service_address?: ServiceAddressResource;
20+
accounts: AccountsResource;
21+
confirmation_statement?: ConfirmationStatementResource;
22+
foreign_company_details?: ForeignCompanyDetailsResource;
23+
is_on_register_in_country_formed_in?: string;
24+
links: LinksResource;
25+
subtype?: string;
26+
term?: string;
2627
}
2728

2829
export interface ForeignCompanyDetailsResource {
29-
business_activity?: string;
30-
governed_by?: string;
31-
originating_registry?: OriginatingRegistryResource;
32-
is_a_credit_finacial_institution?: boolean;
33-
legal_form?: string;
34-
registration_number?: string;
30+
business_activity?: string;
31+
governed_by?: string;
32+
originating_registry?: OriginatingRegistryResource;
33+
is_a_credit_finacial_institution?: boolean;
34+
legal_form?: string;
35+
registration_number?: string;
3536
}
3637

3738
export interface OriginatingRegistryResource {
38-
name?: string;
39-
country?: string
39+
name?: string;
40+
country?: string;
4041
}
4142

4243
export interface OfficeAddressResource {
43-
address_line_1: string;
44-
address_line_2: string;
45-
care_of: string;
46-
country: string;
47-
locality: string;
48-
po_box: string;
49-
postal_code: string;
50-
premises: string;
51-
region: string;
44+
address_line_1: string;
45+
address_line_2: string;
46+
care_of: string;
47+
country: string;
48+
locality: string;
49+
po_box: string;
50+
postal_code: string;
51+
premises: string;
52+
region: string;
5253
}
5354

54-
export interface RegisteredOfficeAddressResource extends OfficeAddressResource {};
55-
export interface ServiceAddressResource extends OfficeAddressResource {};
55+
export interface RegisteredOfficeAddressResource
56+
extends OfficeAddressResource {}
57+
export interface ServiceAddressResource extends OfficeAddressResource {}
5658

5759
export interface AccountsResource {
58-
next_accounts: NextAccountsResource;
59-
next_due: string;
60-
overdue: boolean;
60+
next_accounts: NextAccountsResource;
61+
next_due: string;
62+
overdue: boolean;
6163
}
6264

6365
export interface NextAccountsResource {
64-
period_end_on: string;
65-
period_start_on: string;
66+
period_end_on: string;
67+
period_start_on: string;
6668
}
6769

6870
export interface ConfirmationStatementResource {
69-
last_made_up_to?: string;
70-
next_due: string;
71-
next_made_up_to: string;
72-
overdue: boolean;
71+
last_made_up_to?: string;
72+
next_due: string;
73+
next_made_up_to: string;
74+
overdue: boolean;
7375
}
7476

7577
export interface LinksResource {
76-
filing_history?: string;
78+
filing_history?: string;
7779
}
7880

7981
export interface OfficeAddress {
80-
addressLineOne: string;
81-
addressLineTwo: string;
82-
careOf: string;
83-
country: string;
84-
locality: string;
85-
poBox: string;
86-
postalCode: string;
87-
premises: string;
88-
region: string;
82+
addressLineOne: string;
83+
addressLineTwo: string;
84+
careOf: string;
85+
country: string;
86+
locality: string;
87+
poBox: string;
88+
postalCode: string;
89+
premises: string;
90+
region: string;
8991
}
9092

91-
export interface RegisteredOfficeAddress extends OfficeAddress {};
92-
export interface ServiceAddress extends OfficeAddress {};
93+
export interface RegisteredOfficeAddress extends OfficeAddress {}
94+
export interface ServiceAddress extends OfficeAddress {}
9395

9496
export interface Accounts {
95-
nextAccounts: NextAccounts;
96-
nextDue: string;
97-
overdue: boolean;
97+
nextAccounts: NextAccounts;
98+
nextDue: string;
99+
overdue: boolean;
98100
}
99101

100102
export interface NextAccounts {
101-
periodEndOn: string;
102-
periodStartOn: string;
103+
periodEndOn: string;
104+
periodStartOn: string;
103105
}
104106

105107
export interface ConfirmationStatement {
106-
lastMadeUpTo?: string;
107-
nextDue: string;
108-
nextMadeUpTo: string;
109-
overdue: boolean;
108+
lastMadeUpTo?: string;
109+
nextDue: string;
110+
nextMadeUpTo: string;
111+
overdue: boolean;
110112
}
111113

112114
export interface Links {
113-
filingHistory?: string;
115+
filingHistory?: string;
114116
}
115117

116118
export interface ForeignCompanyDetails {
117-
businessActivity?: string;
118-
governedBy?: string;
119-
originatingRegistry?: OriginatingRegistry;
120-
isACreditFinacialInstitution?: boolean;
121-
legalForm?: string;
122-
registrationNumber?: string;
119+
businessActivity?: string;
120+
governedBy?: string;
121+
originatingRegistry?: OriginatingRegistry;
122+
isACreditFinacialInstitution?: boolean;
123+
legalForm?: string;
124+
registrationNumber?: string;
123125
}
124126

125127
export interface OriginatingRegistry {
126-
name?: string;
127-
country?: string
128+
name?: string;
129+
country?: string;
128130
}
129131

130132
/**
131133
* CompanyProfile is the interface used within this SDK.
132134
*/
133135
export interface CompanyProfile {
134-
companyName: string;
135-
companyNumber: string;
136-
companyStatus: string;
137-
companyStatusDetail: string;
138-
dateOfCreation: string;
139-
dateOfCessation?: string,
140-
jurisdiction: string;
141-
sicCodes: string[];
142-
hasBeenLiquidated: boolean;
143-
hasSuperSecurePscs?: boolean;
144-
type: string;
145-
hasCharges: boolean;
146-
hasInsolvencyHistory: boolean;
147-
registeredOfficeAddress: RegisteredOfficeAddress;
148-
serviceAddress?: ServiceAddress;
149-
accounts: Accounts;
150-
confirmationStatement?: ConfirmationStatement;
151-
foreignCompanyDetails?: ForeignCompanyDetails;
152-
isOnRegisterInCountryFormedIn?: boolean;
153-
links: Links;
154-
subtype?: string;
136+
companyName: string;
137+
companyNumber: string;
138+
companyStatus: string;
139+
companyStatusDetail: string;
140+
dateOfCreation: string;
141+
dateOfCessation?: string;
142+
jurisdiction: string;
143+
sicCodes: string[];
144+
hasBeenLiquidated: boolean;
145+
hasSuperSecurePscs?: boolean;
146+
type: string;
147+
hasCharges: boolean;
148+
hasInsolvencyHistory: boolean;
149+
registeredOfficeAddress: RegisteredOfficeAddress;
150+
serviceAddress?: ServiceAddress;
151+
accounts: Accounts;
152+
confirmationStatement?: ConfirmationStatement;
153+
foreignCompanyDetails?: ForeignCompanyDetails;
154+
isOnRegisterInCountryFormedIn?: boolean;
155+
links: Links;
156+
subtype?: string;
157+
term?: string;
155158
}

0 commit comments

Comments
 (0)