Skip to content

Commit 65ea833

Browse files
committed
Fix cashflow response
1 parent c495231 commit 65ea833

File tree

2 files changed

+28
-24
lines changed

2 files changed

+28
-24
lines changed

FinancialModelingPrepApi/Model/CompanyValuation/CashFlowResponse.cs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,40 +23,40 @@ public class CashFlowResponse
2323
public string Period { get; set; }
2424

2525
[JsonPropertyName("netIncome")]
26-
public long NetIncome { get; set; }
26+
public double NetIncome { get; set; }
2727

2828
[JsonPropertyName("depreciationAndAmortization")]
29-
public long DepreciationAndAmortization { get; set; }
29+
public double DepreciationAndAmortization { get; set; }
3030

3131
[JsonPropertyName("deferredIncomeTax")]
32-
public long DeferredIncomeTax { get; set; }
32+
public double DeferredIncomeTax { get; set; }
3333

3434
[JsonPropertyName("stockBasedCompensation")]
35-
public long StockBasedCompensation { get; set; }
35+
public double StockBasedCompensation { get; set; }
3636

3737
[JsonPropertyName("changeInWorkingCapital")]
38-
public long ChangeInWorkingCapital { get; set; }
38+
public double ChangeInWorkingCapital { get; set; }
3939

4040
[JsonPropertyName("accountsReceivables")]
4141
public double AccountsReceivables { get; set; }
4242

4343
[JsonPropertyName("inventory")]
44-
public long Inventory { get; set; }
44+
public double Inventory { get; set; }
4545

4646
[JsonPropertyName("accountsPayables")]
47-
public long AccountsPayables { get; set; }
47+
public double AccountsPayables { get; set; }
4848

4949
[JsonPropertyName("otherWorkingCapital")]
50-
public long OtherWorkingCapital { get; set; }
50+
public double OtherWorkingCapital { get; set; }
5151

5252
[JsonPropertyName("otherNonCashItems")]
53-
public long OtherNonCashItems { get; set; }
53+
public double OtherNonCashItems { get; set; }
5454

5555
[JsonPropertyName("netCashProvidedByOperatingActivities")]
56-
public long NetCashProvidedByOperatingActivities { get; set; }
56+
public double NetCashProvidedByOperatingActivities { get; set; }
5757

5858
[JsonPropertyName("investmentsInPropertyPlantAndEquipment")]
59-
public long InvestmentsInPropertyPlantAndEquipment { get; set; }
59+
public double InvestmentsInPropertyPlantAndEquipment { get; set; }
6060

6161
[JsonPropertyName("acquisitionsNet")]
6262
public double AcquisitionsNet { get; set; }
@@ -65,7 +65,7 @@ public class CashFlowResponse
6565
public double PurchasesOfInvestments { get; set; }
6666

6767
[JsonPropertyName("salesMaturitiesOfInvestments")]
68-
public long SalesMaturitiesOfInvestments { get; set; }
68+
public double SalesMaturitiesOfInvestments { get; set; }
6969

7070
[JsonPropertyName("otherInvestingActivites")]
7171
public double OtherInvestingActivites { get; set; }
@@ -80,7 +80,7 @@ public class CashFlowResponse
8080
public double CommonStockIssued { get; set; }
8181

8282
[JsonPropertyName("commonStockRepurchased")]
83-
public long CommonStockRepurchased { get; set; }
83+
public double CommonStockRepurchased { get; set; }
8484

8585
[JsonPropertyName("dividendsPaid")]
8686
public double DividendsPaid { get; set; }
@@ -89,28 +89,28 @@ public class CashFlowResponse
8989
public double OtherFinancingActivites { get; set; }
9090

9191
[JsonPropertyName("netCashUsedProvidedByFinancingActivities")]
92-
public long NetCashUsedProvidedByFinancingActivities { get; set; }
92+
public double NetCashUsedProvidedByFinancingActivities { get; set; }
9393

9494
[JsonPropertyName("effectOfForexChangesOnCash")]
9595
public double EffectOfForexChangesOnCash { get; set; }
9696

9797
[JsonPropertyName("netChangeInCash")]
98-
public long NetChangeInCash { get; set; }
98+
public double NetChangeInCash { get; set; }
9999

100100
[JsonPropertyName("cashAtEndOfPeriod")]
101-
public long CashAtEndOfPeriod { get; set; }
101+
public double CashAtEndOfPeriod { get; set; }
102102

103103
[JsonPropertyName("cashAtBeginningOfPeriod")]
104-
public long CashAtBeginningOfPeriod { get; set; }
104+
public double CashAtBeginningOfPeriod { get; set; }
105105

106106
[JsonPropertyName("operatingCashFlow")]
107-
public long OperatingCashFlow { get; set; }
107+
public double OperatingCashFlow { get; set; }
108108

109109
[JsonPropertyName("capitalExpenditure")]
110-
public long CapitalExpenditure { get; set; }
110+
public double CapitalExpenditure { get; set; }
111111

112112
[JsonPropertyName("freeCashFlow")]
113-
public long FreeCashFlow { get; set; }
113+
public double FreeCashFlow { get; set; }
114114

115115
[JsonPropertyName("link")]
116116
public string Link { get; set; }

Tests/CompanyValuation/CompanyValuationTests.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,19 @@ public async Task GetIncomeStatement(string symbol)
9595
Assert.All(result.Data, data => Assert.Equal(symbol, data.Symbol));
9696
}
9797

98-
[Fact]
99-
public async Task GetCashFlowStatement()
98+
[Theory]
99+
[InlineData("AAPL")]
100+
[InlineData("O")]
101+
[InlineData("AGS.BR")]
102+
[InlineData("PPL.TO")]
103+
public async Task GetCashFlowStatement(string symbol)
100104
{
101-
var result = await api.GetCashFlowStatementAsync("AAPL", Period.Annual, 5);
105+
var result = await api.GetCashFlowStatementAsync(symbol, Period.Annual, 5);
102106

103107
result.AssertNoErrors();
104108
Assert.NotEmpty(result.Data);
105109
Assert.Equal(5, result.Data.Count);
106-
Assert.All(result.Data, data => Assert.Equal("AAPL", data.Symbol));
110+
Assert.All(result.Data, data => Assert.Equal(symbol, data.Symbol));
107111
}
108112

109113
[Fact]

0 commit comments

Comments
 (0)