Skip to content

Commit aecbca8

Browse files
committed
Add isAdr, isFund properties
1 parent f594820 commit aecbca8

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

FinancialModelingPrepApi/Model/CompanyValuation/CompanyProfileResponse.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ public class CompanyProfileResponse
103103
[JsonPropertyName("isEtf")]
104104
public bool IsEtf { get; set; }
105105

106+
[JsonPropertyName("isAdr")]
107+
public bool IsAdr { get; set; }
108+
109+
[JsonPropertyName("isFund")]
110+
public bool IsFund { get; set; }
111+
106112
[JsonPropertyName("isActivelyTrading")]
107113
public bool IsActivelyTrading { get; set; }
108114
}

Tests/CompanyValuation/CompanyValuationTests.cs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,39 @@ public async Task GetCompanyProfileTests(string symbol)
3333
Assert.Equal(symbol, result.Data.Symbol);
3434
}
3535

36+
[Theory]
37+
[InlineData("AAPL", false)]
38+
[InlineData("BST", true)]
39+
public async Task GetCompanyProfile_IsFund_Tests(string symbol, bool isFund)
40+
{
41+
var result = await api.GetCompanyProfileAsync(symbol);
42+
43+
result.AssertNoErrors();
44+
Assert.Equal(isFund, result.Data.IsFund);
45+
}
46+
47+
[Theory]
48+
[InlineData("AAPL", false)]
49+
[InlineData("BABA", true)]
50+
public async Task GetCompanyProfile_IsAdr_Tests(string symbol, bool isAdr)
51+
{
52+
var result = await api.GetCompanyProfileAsync(symbol);
53+
54+
result.AssertNoErrors();
55+
Assert.Equal(isAdr, result.Data.IsAdr);
56+
}
57+
58+
[Theory]
59+
[InlineData("AAPL", false)]
60+
[InlineData("SPY", true)]
61+
public async Task GetCompanyProfile_IsEtf_Tests(string symbol, bool isEtf)
62+
{
63+
var result = await api.GetCompanyProfileAsync(symbol);
64+
65+
result.AssertNoErrors();
66+
Assert.Equal(isEtf, result.Data.IsEtf);
67+
}
68+
3669
[Fact]
3770
public async Task GetCompanyProfile_Unknown_Symbol_Returns_HasError_True()
3871
{

0 commit comments

Comments
 (0)