Skip to content

Commit d845a40

Browse files
committed
Add foreign company details and accounting requirements models to company profile. Closes Issue #217
1 parent 01d7898 commit d845a40

File tree

11 files changed

+181
-0
lines changed

11 files changed

+181
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using CompaniesHouse.JsonConverters;
2+
using Newtonsoft.Json;
3+
4+
namespace CompaniesHouse.Response.CompanyProfile;
5+
6+
public class AccountingRequirement
7+
{
8+
[JsonProperty("foreign_account_type")]
9+
[JsonConverter(typeof(OptionalStringEnumConverter<ForeignAccountType>), ForeignAccountType.None)]
10+
public ForeignAccountType ForeignAccountType { get; set; }
11+
12+
[JsonProperty("terms_of_account_publication")]
13+
[JsonConverter(typeof(OptionalStringEnumConverter<TermsOfAccountPublication>), TermsOfAccountPublication.None)]
14+
public TermsOfAccountPublication TermsOfAccountPublication { get; set; }
15+
}

src/CompaniesHouse/Response/CompanyProfile/CompanyProfile.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,8 @@ public class CompanyProfile
8787

8888
[JsonProperty(PropertyName = "branch_company_details")]
8989
public BranchCompanyDetails BranchCompanyDetails { get; set; }
90+
91+
[JsonProperty(PropertyName = "foreign_company_details")]
92+
public ForeignCompanyDetails ForeignCompanyDetails { get; set; }
9093
}
9194
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System.Runtime.Serialization;
2+
3+
namespace CompaniesHouse.Response.CompanyProfile;
4+
5+
public enum ForeignAccountType
6+
{
7+
[EnumMember(Value = "")]
8+
None = 0,
9+
10+
[EnumMember(Value = "accounting-requirements-of-originating-country-apply")]
11+
AccountingRequirementsOfOriginatingCountryApply,
12+
13+
[EnumMember(Value = "accounting-requirements-of-originating-country-do-not-apply")]
14+
AccountingRequirementsOfOriginatingCountryDoNotApply
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using Newtonsoft.Json;
2+
3+
namespace CompaniesHouse.Response.CompanyProfile;
4+
5+
public class ForeignCompanyAccounts
6+
{
7+
[JsonProperty("account_period_from:")]
8+
public ForeignCompanyPeriodFrom AccountPeriodFrom { get; set; }
9+
10+
[JsonProperty("account_period_to")]
11+
public ForeignCompanyPeriodTo AccountPeriodTo { get; set; }
12+
13+
[JsonProperty("must_file_within")]
14+
public MustFileWithin MustFileWithin { get; set; }
15+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using Newtonsoft.Json;
2+
3+
namespace CompaniesHouse.Response.CompanyProfile;
4+
5+
public class ForeignCompanyDetails
6+
{
7+
[JsonProperty("accounting_requirement")]
8+
public AccountingRequirement AccountingRequirement { get; set; }
9+
10+
[JsonProperty("accounts")]
11+
public ForeignCompanyAccounts Accounts { get; set; }
12+
13+
[JsonProperty("business_activity")]
14+
public string BusinessActivity { get; set; }
15+
16+
[JsonProperty("company_type")]
17+
public string CompanyType { get; set; }
18+
19+
[JsonProperty("governed_by")]
20+
public string GovernedBy { get; set; }
21+
22+
[JsonProperty("is_a_credit_finance_institution")]
23+
public bool? IsACreditFinanceInstitution { get; set; }
24+
25+
[JsonProperty("originating_registry")]
26+
public OriginatingRegistry OriginatingRegistry { get; set; }
27+
28+
[JsonProperty("registration_number")]
29+
public string RegistrationNumber { get; set; }
30+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using Newtonsoft.Json;
2+
3+
namespace CompaniesHouse.Response.CompanyProfile;
4+
5+
public class ForeignCompanyPeriodFrom
6+
{
7+
[JsonProperty("day")]
8+
public int? Day { get; set; }
9+
10+
[JsonProperty("month")]
11+
public int? Month { get; set; }
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using Newtonsoft.Json;
2+
3+
namespace CompaniesHouse.Response.CompanyProfile;
4+
5+
public class ForeignCompanyPeriodTo
6+
{
7+
[JsonProperty("day")]
8+
public int? Day { get; set; }
9+
10+
[JsonProperty("month")]
11+
public int? Month { get; set; }
12+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using Newtonsoft.Json;
2+
3+
namespace CompaniesHouse.Response.CompanyProfile;
4+
5+
public class MustFileWithin
6+
{
7+
[JsonProperty("months")]
8+
public int? Months { get; set; }
9+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using Newtonsoft.Json;
2+
3+
namespace CompaniesHouse.Response.CompanyProfile;
4+
5+
public class OriginatingRegistry
6+
{
7+
[JsonProperty("country")]
8+
public string Country { get; set; }
9+
10+
[JsonProperty("name")]
11+
public string Name { get; set; }
12+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System.Runtime.Serialization;
2+
3+
namespace CompaniesHouse.Response.CompanyProfile;
4+
5+
public enum TermsOfAccountPublication
6+
{
7+
[EnumMember(Value = "")]
8+
None = 0,
9+
[EnumMember(Value = "accounts-publication-date-supplied-by-company")]
10+
AccountsPublicationDateSuppliedByCompany,
11+
[EnumMember(Value = "accounting-publication-date-does-not-need-to-be-supplied-by-company")]
12+
AccountingPublicationDateDoesNotNeedToBeSuppliedByCompany,
13+
[EnumMember(Value = "accounting-reference-date-allocated-by-companies-house")]
14+
AccountingReferenceDateAllocatedByCompaniesHouse
15+
}

0 commit comments

Comments
 (0)