diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 2306868..44053d8 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -4,6 +4,8 @@ composer.json docs/Api/DefaultApi.md docs/Model/AggregateIndicators.md +docs/Model/AirlinePriceIndex.md +docs/Model/AirlinePriceIndexData.md docs/Model/BasicFinancials.md docs/Model/BondCandles.md docs/Model/BondProfile.md @@ -13,6 +15,7 @@ docs/Model/BondYieldCurveInfo.md docs/Model/BreakdownItem.md docs/Model/Company.md docs/Model/CompanyESG.md +docs/Model/CompanyESG2.md docs/Model/CompanyEarningsQualityScore.md docs/Model/CompanyEarningsQualityScoreData.md docs/Model/CompanyExecutive.md @@ -56,6 +59,7 @@ docs/Model/EconomicCode.md docs/Model/EconomicData.md docs/Model/EconomicDataInfo.md docs/Model/EconomicEvent.md +docs/Model/EmployeeCount.md docs/Model/ExcerptResponse.md docs/Model/FDAComitteeMeeting.md docs/Model/Filing.md @@ -68,6 +72,9 @@ docs/Model/ForexSymbol.md docs/Model/Forexrates.md docs/Model/FundOwnership.md docs/Model/FundOwnershipInfo.md +docs/Model/HistoricalCompanyESG.md +docs/Model/HistoricalEmployeeCount.md +docs/Model/HistoricalMarketCapData.md docs/Model/HistoricalNBBO.md docs/Model/IPOCalendar.md docs/Model/IPOEvent.md @@ -98,6 +105,7 @@ docs/Model/KeyCustomersSuppliers.md docs/Model/LastBidAsk.md docs/Model/LobbyingData.md docs/Model/LobbyingResult.md +docs/Model/MarketCapData.md docs/Model/MarketHoliday.md docs/Model/MarketHolidayData.md docs/Model/MarketNews.md @@ -165,6 +173,8 @@ lib/ApiException.php lib/Configuration.php lib/HeaderSelector.php lib/Model/AggregateIndicators.php +lib/Model/AirlinePriceIndex.php +lib/Model/AirlinePriceIndexData.php lib/Model/BasicFinancials.php lib/Model/BondCandles.php lib/Model/BondProfile.php @@ -174,6 +184,7 @@ lib/Model/BondYieldCurveInfo.php lib/Model/BreakdownItem.php lib/Model/Company.php lib/Model/CompanyESG.php +lib/Model/CompanyESG2.php lib/Model/CompanyEarningsQualityScore.php lib/Model/CompanyEarningsQualityScoreData.php lib/Model/CompanyExecutive.php @@ -217,6 +228,7 @@ lib/Model/EconomicCode.php lib/Model/EconomicData.php lib/Model/EconomicDataInfo.php lib/Model/EconomicEvent.php +lib/Model/EmployeeCount.php lib/Model/ExcerptResponse.php lib/Model/FDAComitteeMeeting.php lib/Model/Filing.php @@ -229,6 +241,9 @@ lib/Model/ForexSymbol.php lib/Model/Forexrates.php lib/Model/FundOwnership.php lib/Model/FundOwnershipInfo.php +lib/Model/HistoricalCompanyESG.php +lib/Model/HistoricalEmployeeCount.php +lib/Model/HistoricalMarketCapData.php lib/Model/HistoricalNBBO.php lib/Model/IPOCalendar.php lib/Model/IPOEvent.php @@ -259,6 +274,7 @@ lib/Model/KeyCustomersSuppliers.php lib/Model/LastBidAsk.php lib/Model/LobbyingData.php lib/Model/LobbyingResult.php +lib/Model/MarketCapData.php lib/Model/MarketHoliday.php lib/Model/MarketHolidayData.php lib/Model/MarketNews.php @@ -323,8 +339,11 @@ lib/Model/VisaApplication.php lib/Model/VisaApplicationResult.php lib/ObjectSerializer.php phpunit.xml.dist -test/Model/IndicesConstituentsBreakdownTest.php -test/Model/MarketHolidayDataTest.php -test/Model/MarketHolidayTest.php -test/Model/MarketStatusTest.php -test/Model/SentimentContentTest.php +test/Model/AirlinePriceIndexDataTest.php +test/Model/AirlinePriceIndexTest.php +test/Model/CompanyESG2Test.php +test/Model/EmployeeCountTest.php +test/Model/HistoricalCompanyESGTest.php +test/Model/HistoricalEmployeeCountTest.php +test/Model/HistoricalMarketCapDataTest.php +test/Model/MarketCapDataTest.php diff --git a/composer.json b/composer.json index e596c82..605940d 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "finnhub/client", - "version": "1.1.17", - "description": "Official Finnhub stock API PHP library. https://finnhub.io/", + "version": "1.1.18", + "description": "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)", "keywords": [ "openapitools", "openapi-generator", diff --git a/docs/Api/DefaultApi.md b/docs/Api/DefaultApi.md index dcd4d35..44ce465 100644 --- a/docs/Api/DefaultApi.md +++ b/docs/Api/DefaultApi.md @@ -5,6 +5,7 @@ All URIs are relative to https://finnhub.io/api/v1. Method | HTTP request | Description ------------- | ------------- | ------------- [**aggregateIndicator()**](DefaultApi.md#aggregateIndicator) | **GET** /scan/technical-indicator | Aggregate Indicators +[**airlinePriceIndex()**](DefaultApi.md#airlinePriceIndex) | **GET** /airline/price-index | Airline Price Index [**bondPrice()**](DefaultApi.md#bondPrice) | **GET** /bond/price | Bond price data [**bondProfile()**](DefaultApi.md#bondProfile) | **GET** /bond/profile | Bond Profile [**bondTick()**](DefaultApi.md#bondTick) | **GET** /bond/tick | Bond Tick Data @@ -17,6 +18,7 @@ Method | HTTP request | Description [**companyEpsEstimates()**](DefaultApi.md#companyEpsEstimates) | **GET** /stock/eps-estimate | Earnings Estimates [**companyEsgScore()**](DefaultApi.md#companyEsgScore) | **GET** /stock/esg | Company ESG Scores [**companyExecutive()**](DefaultApi.md#companyExecutive) | **GET** /stock/executive | Company Executive +[**companyHistoricalEsgScore()**](DefaultApi.md#companyHistoricalEsgScore) | **GET** /stock/historical-esg | Historical ESG Scores [**companyNews()**](DefaultApi.md#companyNews) | **GET** /company-news | Company News [**companyPeers()**](DefaultApi.md#companyPeers) | **GET** /stock/peers | Peers [**companyProfile()**](DefaultApi.md#companyProfile) | **GET** /stock/profile | Company Profile @@ -47,6 +49,8 @@ Method | HTTP request | Description [**forexRates()**](DefaultApi.md#forexRates) | **GET** /forex/rates | Forex rates [**forexSymbols()**](DefaultApi.md#forexSymbols) | **GET** /forex/symbol | Forex Symbol [**fundOwnership()**](DefaultApi.md#fundOwnership) | **GET** /stock/fund-ownership | Fund Ownership +[**historicalEmployeeCount()**](DefaultApi.md#historicalEmployeeCount) | **GET** /stock/historical-employee-count | Historical Employee Count +[**historicalMarketCap()**](DefaultApi.md#historicalMarketCap) | **GET** /stock/historical-market-cap | Historical Market Cap [**indicesConstituents()**](DefaultApi.md#indicesConstituents) | **GET** /index/constituents | Indices Constituents [**indicesHistoricalConstituents()**](DefaultApi.md#indicesHistoricalConstituents) | **GET** /index/historical-constituents | Indices Historical Constituents [**insiderSentiment()**](DefaultApi.md#insiderSentiment) | **GET** /stock/insider-sentiment | Insider Sentiment @@ -165,6 +169,72 @@ Name | Type | Description | Notes [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `airlinePriceIndex()` + +```php +airlinePriceIndex($airline, $from, $to): \Finnhub\Model\AirlinePriceIndexData +``` + +Airline Price Index + +
The Flight Ticket Price Index API provides comprehensive data on airline ticket prices, including the average daily ticket price and its percentage change (price index). This data, collected weekly and projected two weeks ahead, aggregates daily prices and indexes from the 50 busiest and largest airports across the USA. The dataset includes detailed information on airlines, dates, and average ticket prices, offering valuable insights for market analysis and pricing strategies.
The price index is calculated as percentage change of average daily ticket price from the previous weekly reading. Raw ticket prices data is available for Enterprise users. Contact us to inquire about the raw price data.
+ +### Example + +```php +setApiKey('token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Finnhub\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer'); + + +$apiInstance = new Finnhub\Api\DefaultApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$airline = 'airline_example'; // string | Filter data by airline. Accepted values:united
,delta
,american_airlines
,southwest
,southern_airways_express
,alaska_airlines
,frontier_airlines
,jetblue_airways
,spirit_airlines
,sun_country_airlines
,breeze_airways
,hawaiian_airlines
+$from = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | From date YYYY-MM-DD
.
+$to = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | To date YYYY-MM-DD
.
+
+try {
+ $result = $apiInstance->airlinePriceIndex($airline, $from, $to);
+ print_r($result);
+} catch (Exception $e) {
+ echo 'Exception when calling DefaultApi->airlinePriceIndex: ', $e->getMessage(), PHP_EOL;
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **airline** | **string**| Filter data by airline. Accepted values: <code>united</code>,<code>delta</code>,<code>american_airlines</code>,<code>southwest</code>,<code>southern_airways_express</code>,<code>alaska_airlines</code>,<code>frontier_airlines</code>,<code>jetblue_airways</code>,<code>spirit_airlines</code>,<code>sun_country_airlines</code>,<code>breeze_airways</code>,<code>hawaiian_airlines</code> |
+ **from** | **\DateTime**| From date <code>YYYY-MM-DD</code>. |
+ **to** | **\DateTime**| To date <code>YYYY-MM-DD</code>. |
+
+### Return type
+
+[**\Finnhub\Model\AirlinePriceIndexData**](../Model/AirlinePriceIndexData.md)
+
+### Authorization
+
+[api_key](../../README.md#api_key)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: `application/json`
+
+[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
+[[Back to Model list]](../../README.md#models)
+[[Back to README]](../../README.md)
+
## `bondPrice()`
```php
@@ -821,7 +891,7 @@ companyEsgScore($symbol): \Finnhub\Model\CompanyESG
Company ESG Scores
-This endpoint provides ESG scores and important indicators for 7000+ global companies. The data is collected through company's public ESG disclosure and public sources.
Our ESG scoring models takes into account more than 150 different inputs to calculate the level of ESG risks and how well a company is managing them. A higher score means lower ESG risk or better ESG management. ESG scores are in the the range of 0-100. Some key indicators might contain letter-grade score from C- to A+ with C- is the lowest score and A+ is the highest score.
Historical ESG data is available for Enterprise users. Contact us to learn more.
+This endpoint provides the latest ESG scores and important indicators for 7000+ global companies. The data is collected through company's public ESG disclosure and public sources.
Our ESG scoring models takes into account more than 150 different inputs to calculate the level of ESG risks and how well a company is managing them. A higher score means lower ESG risk or better ESG management. ESG scores are in the the range of 0-100. Some key indicators might contain letter-grade score from C- to A+ with C- is the lowest score and A+ is the highest score.
### Example @@ -937,6 +1007,68 @@ Name | Type | Description | Notes [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `companyHistoricalEsgScore()` + +```php +companyHistoricalEsgScore($symbol): \Finnhub\Model\HistoricalCompanyESG +``` + +Historical ESG Scores + +This endpoint provides historical ESG scores and important indicators for 7000+ global companies. The data is collected through company's public ESG disclosure and public sources.
Our ESG scoring models takes into account more than 150 different inputs to calculate the level of ESG risks and how well a company is managing them. A higher score means lower ESG risk or better ESG management. ESG scores are in the the range of 0-100. Some key indicators might contain letter-grade score from C- to A+ with C- is the lowest score and A+ is the highest score.
+ +### Example + +```php +setApiKey('token', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = Finnhub\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer'); + + +$apiInstance = new Finnhub\Api\DefaultApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$symbol = 'symbol_example'; // string | Symbol. + +try { + $result = $apiInstance->companyHistoricalEsgScore($symbol); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DefaultApi->companyHistoricalEsgScore: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **string**| Symbol. | + +### Return type + +[**\Finnhub\Model\HistoricalCompanyESG**](../Model/HistoricalCompanyESG.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `companyNews()` ```php @@ -2303,8 +2435,8 @@ $symbol = 'symbol_example'; // string | Symbol. Leavesymbol
,
$cik = 'cik_example'; // string | CIK.
$access_number = 'access_number_example'; // string | Access number of a specific report you want to retrieve data from.
$form = 'form_example'; // string | Filter by form. You can use this value NT 10-K
to find non-timely filings for a company.
-$from = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | From date: 2020-03-15.
-$to = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | To date: 2020-03-16.
+$from = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | From date: 2023-03-15.
+$to = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | To date: 2023-03-16.
try {
$result = $apiInstance->filings($symbol, $cik, $access_number, $form, $from, $to);
@@ -2322,8 +2454,8 @@ Name | Type | Description | Notes
**cik** | **string**| CIK. | [optional]
**access_number** | **string**| Access number of a specific report you want to retrieve data from. | [optional]
**form** | **string**| Filter by form. You can use this value <code>NT 10-K</code> to find non-timely filings for a company. | [optional]
- **from** | **\DateTime**| From date: 2020-03-15. | [optional]
- **to** | **\DateTime**| To date: 2020-03-16. | [optional]
+ **from** | **\DateTime**| From date: 2023-03-15. | [optional]
+ **to** | **\DateTime**| To date: 2023-03-16. | [optional]
### Return type
@@ -2859,6 +2991,138 @@ Name | Type | Description | Notes
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
+## `historicalEmployeeCount()`
+
+```php
+historicalEmployeeCount($symbol, $from, $to): \Finnhub\Model\HistoricalEmployeeCount
+```
+
+Historical Employee Count
+
+Get historical employee count for global companies.
+
+### Example
+
+```php
+setApiKey('token', 'YOUR_API_KEY');
+// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+// $config = Finnhub\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');
+
+
+$apiInstance = new Finnhub\Api\DefaultApi(
+ // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
+ // This is optional, `GuzzleHttp\Client` will be used as default.
+ new GuzzleHttp\Client(),
+ $config
+);
+$symbol = 'symbol_example'; // string | Company symbol.
+$from = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | From date YYYY-MM-DD
.
+$to = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | To date YYYY-MM-DD
.
+
+try {
+ $result = $apiInstance->historicalEmployeeCount($symbol, $from, $to);
+ print_r($result);
+} catch (Exception $e) {
+ echo 'Exception when calling DefaultApi->historicalEmployeeCount: ', $e->getMessage(), PHP_EOL;
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **symbol** | **string**| Company symbol. |
+ **from** | **\DateTime**| From date <code>YYYY-MM-DD</code>. |
+ **to** | **\DateTime**| To date <code>YYYY-MM-DD</code>. |
+
+### Return type
+
+[**\Finnhub\Model\HistoricalEmployeeCount**](../Model/HistoricalEmployeeCount.md)
+
+### Authorization
+
+[api_key](../../README.md#api_key)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: `application/json`
+
+[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
+[[Back to Model list]](../../README.md#models)
+[[Back to README]](../../README.md)
+
+## `historicalMarketCap()`
+
+```php
+historicalMarketCap($symbol, $from, $to): \Finnhub\Model\HistoricalMarketCapData
+```
+
+Historical Market Cap
+
+Get historical market cap data for global companies.
+
+### Example
+
+```php
+setApiKey('token', 'YOUR_API_KEY');
+// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+// $config = Finnhub\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');
+
+
+$apiInstance = new Finnhub\Api\DefaultApi(
+ // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
+ // This is optional, `GuzzleHttp\Client` will be used as default.
+ new GuzzleHttp\Client(),
+ $config
+);
+$symbol = 'symbol_example'; // string | Company symbol.
+$from = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | From date YYYY-MM-DD
.
+$to = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | To date YYYY-MM-DD
.
+
+try {
+ $result = $apiInstance->historicalMarketCap($symbol, $from, $to);
+ print_r($result);
+} catch (Exception $e) {
+ echo 'Exception when calling DefaultApi->historicalMarketCap: ', $e->getMessage(), PHP_EOL;
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **symbol** | **string**| Company symbol. |
+ **from** | **\DateTime**| From date <code>YYYY-MM-DD</code>. |
+ **to** | **\DateTime**| To date <code>YYYY-MM-DD</code>. |
+
+### Return type
+
+[**\Finnhub\Model\HistoricalMarketCapData**](../Model/HistoricalMarketCapData.md)
+
+### Authorization
+
+[api_key](../../README.md#api_key)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: `application/json`
+
+[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
+[[Back to Model list]](../../README.md#models)
+[[Back to README]](../../README.md)
+
## `indicesConstituents()`
```php
@@ -3057,7 +3321,7 @@ insiderTransactions($symbol, $from, $to): \Finnhub\Model\InsiderTransactions
Insider Transactions
-Company insider transactions data sourced from Form 3,4,5
, SEDI and relevant companies' filings. This endpoint covers US, Canada, Australia, and selected EU companies. Limit to 100 transactions per API call.
+Company insider transactions data sourced from Form 3,4,5
, SEDI and relevant companies' filings. This endpoint covers US, UK, Canada, Australia, India, and all major EU markets. Limit to 100 transactions per API call.
### Example
@@ -3314,12 +3578,12 @@ Name | Type | Description | Notes
## `internationalFilings()`
```php
-internationalFilings($symbol, $country): \Finnhub\Model\InternationalFiling[]
+internationalFilings($symbol, $country, $from, $to): \Finnhub\Model\InternationalFiling[]
```
International Filings
-List filings for international companies. Limit to 250 documents at a time. These are the documents we use to source our fundamental data. Only support SEDAR and UK Companies House for normal usage. Enterprise clients who need access to the full filings for global markets should contact us for the access.
+List filings for international companies. Limit to 500 documents at a time. These are the documents we use to source our fundamental data. Only support SEDAR and UK Companies House for normal usage. Enterprise clients who need access to the full filings for global markets should contact us for the access.
### Example
@@ -3342,9 +3606,11 @@ $apiInstance = new Finnhub\Api\DefaultApi(
);
$symbol = 'symbol_example'; // string | Symbol. Leave empty to list latest filings.
$country = 'country_example'; // string | Filter by country using country's 2-letter code.
+$from = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | From date: 2023-01-15.
+$to = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | To date: 2023-12-16.
try {
- $result = $apiInstance->internationalFilings($symbol, $country);
+ $result = $apiInstance->internationalFilings($symbol, $country, $from, $to);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->internationalFilings: ', $e->getMessage(), PHP_EOL;
@@ -3357,6 +3623,8 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**symbol** | **string**| Symbol. Leave empty to list latest filings. | [optional]
**country** | **string**| Filter by country using country's 2-letter code. | [optional]
+ **from** | **\DateTime**| From date: 2023-01-15. | [optional]
+ **to** | **\DateTime**| To date: 2023-12-16. | [optional]
### Return type
@@ -5433,7 +5701,7 @@ stockTick($symbol, $date, $limit, $skip): \Finnhub\Model\TickData
Tick Data
-Get historical tick data for global exchanges. You can send the request directly to our tick server at https://tick.finnhub.io/ with the same path and parameters or get redirected there if you call our main server.
For more historical tick data, you can visit our bulk download page in the Dashboard here to speed up the download process.
Exchange Segment Delay US CTA/UTP Full SIP End-of-day TSX - TSX
- TSX Venture
- Index
End-of-day LSE - London Stock Exchange (L)
- LSE International (L)
- LSE European (L)
15 minute Euronext - Euronext Paris (PA)
- Euronext Amsterdam (AS)
- Euronext Lisbon (LS)
- Euronext Brussels (BR)
- Euronext Oslo (OL)
- Euronext London (LN)
- Euronext Dublin (IR)
- Index
- Warrant
End-of-day Deutsche Börse - Frankfurt (F)
- Xetra (DE)
- Duesseldorf (DU)
- Hamburg (HM)
- Berlin (BE)
- Hanover (HA)
- Stoxx (SX)
- TradeGate (TG)
- Zertifikate (SC)
- Index
- Warrant
End-of-day
+Get historical tick data for global exchanges.
For more historical tick data, you can visit our bulk download page in the Dashboard here to speed up the download process.
Exchange Segment Delay US CTA/UTP Full SIP End-of-day TSX - TSX
- TSX Venture
- Index
End-of-day LSE - London Stock Exchange (L)
- LSE International (L)
- LSE European (L)
15 minute Euronext - Euronext Paris (PA)
- Euronext Amsterdam (AS)
- Euronext Lisbon (LS)
- Euronext Brussels (BR)
- Euronext Oslo (OL)
- Euronext London (LN)
- Euronext Dublin (IR)
- Index
- Warrant
End-of-day Deutsche Börse - Frankfurt (F)
- Xetra (DE)
- Duesseldorf (DU)
- Hamburg (HM)
- Berlin (BE)
- Hanover (HA)
- Stoxx (SX)
- TradeGate (TG)
- Zertifikate (SC)
- Index
- Warrant
End-of-day
### Example
@@ -5884,7 +6152,7 @@ Name | Type | Description | Notes
## `symbolSearch()`
```php
-symbolSearch($q): \Finnhub\Model\SymbolLookup
+symbolSearch($q, $exchange): \Finnhub\Model\SymbolLookup
```
Symbol Lookup
@@ -5911,9 +6179,10 @@ $apiInstance = new Finnhub\Api\DefaultApi(
$config
);
$q = 'q_example'; // string | Query text can be symbol, name, isin, or cusip.
+$exchange = 'exchange_example'; // string | Exchange limit.
try {
- $result = $apiInstance->symbolSearch($q);
+ $result = $apiInstance->symbolSearch($q, $exchange);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->symbolSearch: ', $e->getMessage(), PHP_EOL;
@@ -5925,6 +6194,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**q** | **string**| Query text can be symbol, name, isin, or cusip. |
+ **exchange** | **string**| Exchange limit. | [optional]
### Return type
diff --git a/docs/Model/AirlinePriceIndex.md b/docs/Model/AirlinePriceIndex.md
new file mode 100644
index 0000000..751856e
--- /dev/null
+++ b/docs/Model/AirlinePriceIndex.md
@@ -0,0 +1,11 @@
+# # AirlinePriceIndex
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**date** | **string** | Date | [optional]
+**price_index** | **float** | Price Index | [optional]
+**daily_avg_price** | **float** | Daily average ticket price. | [optional]
+
+[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/AirlinePriceIndexData.md b/docs/Model/AirlinePriceIndexData.md
new file mode 100644
index 0000000..5de8c5c
--- /dev/null
+++ b/docs/Model/AirlinePriceIndexData.md
@@ -0,0 +1,12 @@
+# # AirlinePriceIndexData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [**\Finnhub\Model\AirlinePriceIndex[]**](AirlinePriceIndex.md) | Array of price index. | [optional]
+**airline** | **string** | Airline name | [optional]
+**from** | **string** | From date | [optional]
+**to** | **string** | To date | [optional]
+
+[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/CompanyESG2.md b/docs/Model/CompanyESG2.md
new file mode 100644
index 0000000..36429f6
--- /dev/null
+++ b/docs/Model/CompanyESG2.md
@@ -0,0 +1,14 @@
+# # CompanyESG2
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**total_esg_score** | **float** | Total ESG Score | [optional]
+**environment_score** | **float** | Environment Score | [optional]
+**governance_score** | **float** | Governance Score | [optional]
+**social_score** | **float** | Social Score | [optional]
+**data** | **object** | | [optional]
+**period** | **string** | Period | [optional]
+
+[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/CompanyProfile.md b/docs/Model/CompanyProfile.md
index 128318d..19c73c5 100644
--- a/docs/Model/CompanyProfile.md
+++ b/docs/Model/CompanyProfile.md
@@ -21,6 +21,7 @@ Name | Type | Description | Notes
**gsubind** | **string** | Sub-industry. | [optional]
**isin** | **string** | ISIN number. | [optional]
**lei** | **string** | LEI number. | [optional]
+**ir_url** | **string** | Investor relations website. | [optional]
**naics_national_industry** | **string** | NAICS national industry. | [optional]
**naics** | **string** | NAICS industry. | [optional]
**naics_sector** | **string** | NAICS sector. | [optional]
diff --git a/docs/Model/ETFProfileData.md b/docs/Model/ETFProfileData.md
index 3aba4fc..2bf704d 100644
--- a/docs/Model/ETFProfileData.md
+++ b/docs/Model/ETFProfileData.md
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
**domicile** | **string** | ETF domicile. | [optional]
**inception_date** | [**\DateTime**](\DateTime.md) | Inception date. | [optional]
**website** | **string** | ETF's website. | [optional]
+**logo** | **string** | Logo. | [optional]
**isin** | **string** | ISIN. | [optional]
**cusip** | **string** | CUSIP. | [optional]
**price_to_earnings** | **float** | P/E. | [optional]
diff --git a/docs/Model/EmployeeCount.md b/docs/Model/EmployeeCount.md
new file mode 100644
index 0000000..9b5f39b
--- /dev/null
+++ b/docs/Model/EmployeeCount.md
@@ -0,0 +1,10 @@
+# # EmployeeCount
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**at_date** | **string** | Date of the reading | [optional]
+**employee** | **float** | Value | [optional]
+
+[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/FilingResponse.md b/docs/Model/FilingResponse.md
index 2c0be9e..e906576 100644
--- a/docs/Model/FilingResponse.md
+++ b/docs/Model/FilingResponse.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**symbol** | **object** | List of symbol associate with this filing | [optional]
**name** | **string** | Filer name | [optional]
**acceptance_date** | **string** | Date the filing is submitted. | [optional]
-**filed_date** | **string** | Date the filing is make available to the public | [optional]
+**filed_date** | **string** | Date the filing is made available to the public | [optional]
**report_date** | **string** | Date as which the filing is reported | [optional]
**form** | **string** | Filing Form | [optional]
**amend** | **bool** | Amendment | [optional]
diff --git a/docs/Model/HistoricalCompanyESG.md b/docs/Model/HistoricalCompanyESG.md
new file mode 100644
index 0000000..30e22b4
--- /dev/null
+++ b/docs/Model/HistoricalCompanyESG.md
@@ -0,0 +1,10 @@
+# # HistoricalCompanyESG
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**symbol** | **string** | symbol | [optional]
+**data** | [**\Finnhub\Model\CompanyESG2[]**](CompanyESG2.md) | Historical ESG data points. | [optional]
+
+[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/HistoricalEmployeeCount.md b/docs/Model/HistoricalEmployeeCount.md
new file mode 100644
index 0000000..eadf5f6
--- /dev/null
+++ b/docs/Model/HistoricalEmployeeCount.md
@@ -0,0 +1,10 @@
+# # HistoricalEmployeeCount
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [**\Finnhub\Model\EmployeeCount[]**](EmployeeCount.md) | Array of market data. | [optional]
+**symbol** | **string** | Symbol | [optional]
+
+[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/HistoricalMarketCapData.md b/docs/Model/HistoricalMarketCapData.md
new file mode 100644
index 0000000..adb21c0
--- /dev/null
+++ b/docs/Model/HistoricalMarketCapData.md
@@ -0,0 +1,11 @@
+# # HistoricalMarketCapData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [**\Finnhub\Model\MarketCapData[]**](MarketCapData.md) | Array of market data. | [optional]
+**symbol** | **string** | Symbol | [optional]
+**currency** | **string** | Currency | [optional]
+
+[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/MarketCapData.md b/docs/Model/MarketCapData.md
new file mode 100644
index 0000000..d603213
--- /dev/null
+++ b/docs/Model/MarketCapData.md
@@ -0,0 +1,10 @@
+# # MarketCapData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**at_date** | **string** | Date of the reading | [optional]
+**market_capitalization** | **float** | Value | [optional]
+
+[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/MarketStatus.md b/docs/Model/MarketStatus.md
index c9c85fe..6b511b4 100644
--- a/docs/Model/MarketStatus.md
+++ b/docs/Model/MarketStatus.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**exchange** | **string** | Exchange. | [optional]
**timezone** | **string** | Timezone. | [optional]
-**session** | **string** | Market session. | [optional]
+**session** | **string** | Market session. Can be 1 of the following values: <code>pre-market</code>,<code>regular</code>,<code>post-market</code> or <code>null</code> if the market is closed. | [optional]
**holiday** | **string** | Holiday event. | [optional]
**is_open** | **bool** | Whether the market is open at the moment. | [optional]
**t** | **int** | Current timestamp. | [optional]
diff --git a/docs/Model/PriceTarget.md b/docs/Model/PriceTarget.md
index a1c59c8..1ca9e11 100644
--- a/docs/Model/PriceTarget.md
+++ b/docs/Model/PriceTarget.md
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
**target_low** | **float** | Lowest analysts' target. | [optional]
**target_mean** | **float** | Mean of all analysts' targets. | [optional]
**target_median** | **float** | Median of all analysts' targets. | [optional]
+**number_analysts** | **int** | Number of Analysts. | [optional]
**last_updated** | **string** | Updated time of the data | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/lib/Api/DefaultApi.php b/lib/Api/DefaultApi.php
index da2ca0f..7b857a3 100644
--- a/lib/Api/DefaultApi.php
+++ b/lib/Api/DefaultApi.php
@@ -401,40 +401,40 @@ public function aggregateIndicatorRequest($symbol, $resolution)
}
/**
- * Operation bondPrice
+ * Operation airlinePriceIndex
*
- * Bond price data
+ * Airline Price Index
*
- * @param string $isin ISIN. (required)
- * @param int $from UNIX timestamp. Interval initial value. (required)
- * @param int $to UNIX timestamp. Interval end value. (required)
+ * @param string $airline Filter data by airline. Accepted values: <code>united</code>,<code>delta</code>,<code>american_airlines</code>,<code>southwest</code>,<code>southern_airways_express</code>,<code>alaska_airlines</code>,<code>frontier_airlines</code>,<code>jetblue_airways</code>,<code>spirit_airlines</code>,<code>sun_country_airlines</code>,<code>breeze_airways</code>,<code>hawaiian_airlines</code> (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\BondCandles
+ * @return \Finnhub\Model\AirlinePriceIndexData
*/
- public function bondPrice($isin, $from, $to)
+ public function airlinePriceIndex($airline, $from, $to)
{
- list($response) = $this->bondPriceWithHttpInfo($isin, $from, $to);
+ list($response) = $this->airlinePriceIndexWithHttpInfo($airline, $from, $to);
return $response;
}
/**
- * Operation bondPriceWithHttpInfo
+ * Operation airlinePriceIndexWithHttpInfo
*
- * Bond price data
+ * Airline Price Index
*
- * @param string $isin ISIN. (required)
- * @param int $from UNIX timestamp. Interval initial value. (required)
- * @param int $to UNIX timestamp. Interval end value. (required)
+ * @param string $airline Filter data by airline. Accepted values: <code>united</code>,<code>delta</code>,<code>american_airlines</code>,<code>southwest</code>,<code>southern_airways_express</code>,<code>alaska_airlines</code>,<code>frontier_airlines</code>,<code>jetblue_airways</code>,<code>spirit_airlines</code>,<code>sun_country_airlines</code>,<code>breeze_airways</code>,<code>hawaiian_airlines</code> (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\BondCandles, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\AirlinePriceIndexData, HTTP status code, HTTP response headers (array of strings)
*/
- public function bondPriceWithHttpInfo($isin, $from, $to)
+ public function airlinePriceIndexWithHttpInfo($airline, $from, $to)
{
- $request = $this->bondPriceRequest($isin, $from, $to);
+ $request = $this->airlinePriceIndexRequest($airline, $from, $to);
try {
$options = $this->createHttpClientOption();
@@ -466,20 +466,20 @@ public function bondPriceWithHttpInfo($isin, $from, $to)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\BondCandles' === '\SplFileObject') {
+ if ('\Finnhub\Model\AirlinePriceIndexData' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\BondCandles', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\AirlinePriceIndexData', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\BondCandles';
+ $returnType = '\Finnhub\Model\AirlinePriceIndexData';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -497,7 +497,7 @@ public function bondPriceWithHttpInfo($isin, $from, $to)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\BondCandles',
+ '\Finnhub\Model\AirlinePriceIndexData',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -508,20 +508,20 @@ public function bondPriceWithHttpInfo($isin, $from, $to)
}
/**
- * Operation bondPriceAsync
+ * Operation airlinePriceIndexAsync
*
- * Bond price data
+ * Airline Price Index
*
- * @param string $isin ISIN. (required)
- * @param int $from UNIX timestamp. Interval initial value. (required)
- * @param int $to UNIX timestamp. Interval end value. (required)
+ * @param string $airline Filter data by airline. Accepted values: <code>united</code>,<code>delta</code>,<code>american_airlines</code>,<code>southwest</code>,<code>southern_airways_express</code>,<code>alaska_airlines</code>,<code>frontier_airlines</code>,<code>jetblue_airways</code>,<code>spirit_airlines</code>,<code>sun_country_airlines</code>,<code>breeze_airways</code>,<code>hawaiian_airlines</code> (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function bondPriceAsync($isin, $from, $to)
+ public function airlinePriceIndexAsync($airline, $from, $to)
{
- return $this->bondPriceAsyncWithHttpInfo($isin, $from, $to)
+ return $this->airlinePriceIndexAsyncWithHttpInfo($airline, $from, $to)
->then(
function ($response) {
return $response[0];
@@ -530,21 +530,21 @@ function ($response) {
}
/**
- * Operation bondPriceAsyncWithHttpInfo
+ * Operation airlinePriceIndexAsyncWithHttpInfo
*
- * Bond price data
+ * Airline Price Index
*
- * @param string $isin ISIN. (required)
- * @param int $from UNIX timestamp. Interval initial value. (required)
- * @param int $to UNIX timestamp. Interval end value. (required)
+ * @param string $airline Filter data by airline. Accepted values: <code>united</code>,<code>delta</code>,<code>american_airlines</code>,<code>southwest</code>,<code>southern_airways_express</code>,<code>alaska_airlines</code>,<code>frontier_airlines</code>,<code>jetblue_airways</code>,<code>spirit_airlines</code>,<code>sun_country_airlines</code>,<code>breeze_airways</code>,<code>hawaiian_airlines</code> (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function bondPriceAsyncWithHttpInfo($isin, $from, $to)
+ public function airlinePriceIndexAsyncWithHttpInfo($airline, $from, $to)
{
- $returnType = '\Finnhub\Model\BondCandles';
- $request = $this->bondPriceRequest($isin, $from, $to);
+ $returnType = '\Finnhub\Model\AirlinePriceIndexData';
+ $request = $this->airlinePriceIndexRequest($airline, $from, $to);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -580,37 +580,37 @@ function ($exception) {
}
/**
- * Create request for operation 'bondPrice'
+ * Create request for operation 'airlinePriceIndex'
*
- * @param string $isin ISIN. (required)
- * @param int $from UNIX timestamp. Interval initial value. (required)
- * @param int $to UNIX timestamp. Interval end value. (required)
+ * @param string $airline Filter data by airline. Accepted values: <code>united</code>,<code>delta</code>,<code>american_airlines</code>,<code>southwest</code>,<code>southern_airways_express</code>,<code>alaska_airlines</code>,<code>frontier_airlines</code>,<code>jetblue_airways</code>,<code>spirit_airlines</code>,<code>sun_country_airlines</code>,<code>breeze_airways</code>,<code>hawaiian_airlines</code> (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function bondPriceRequest($isin, $from, $to)
+ public function airlinePriceIndexRequest($airline, $from, $to)
{
- // verify the required parameter 'isin' is set
- if ($isin === null || (is_array($isin) && count($isin) === 0)) {
+ // verify the required parameter 'airline' is set
+ if ($airline === null || (is_array($airline) && count($airline) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $isin when calling bondPrice'
+ 'Missing the required parameter $airline when calling airlinePriceIndex'
);
}
// verify the required parameter 'from' is set
if ($from === null || (is_array($from) && count($from) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $from when calling bondPrice'
+ 'Missing the required parameter $from when calling airlinePriceIndex'
);
}
// verify the required parameter 'to' is set
if ($to === null || (is_array($to) && count($to) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $to when calling bondPrice'
+ 'Missing the required parameter $to when calling airlinePriceIndex'
);
}
- $resourcePath = '/bond/price';
+ $resourcePath = '/airline/price-index';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -618,11 +618,11 @@ public function bondPriceRequest($isin, $from, $to)
$multipart = false;
// query params
- if (is_array($isin)) {
- $isin = ObjectSerializer::serializeCollection($isin, '', true);
+ if (is_array($airline)) {
+ $airline = ObjectSerializer::serializeCollection($airline, '', true);
}
- if ($isin !== null) {
- $queryParams['isin'] = $isin;
+ if ($airline !== null) {
+ $queryParams['airline'] = $airline;
}
// query params
if (is_array($from)) {
@@ -705,40 +705,40 @@ public function bondPriceRequest($isin, $from, $to)
}
/**
- * Operation bondProfile
+ * Operation bondPrice
*
- * Bond Profile
+ * Bond price data
*
- * @param string $isin ISIN (optional)
- * @param string $cusip CUSIP (optional)
- * @param string $figi FIGI (optional)
+ * @param string $isin ISIN. (required)
+ * @param int $from UNIX timestamp. Interval initial value. (required)
+ * @param int $to UNIX timestamp. Interval end value. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\BondProfile
+ * @return \Finnhub\Model\BondCandles
*/
- public function bondProfile($isin = null, $cusip = null, $figi = null)
+ public function bondPrice($isin, $from, $to)
{
- list($response) = $this->bondProfileWithHttpInfo($isin, $cusip, $figi);
+ list($response) = $this->bondPriceWithHttpInfo($isin, $from, $to);
return $response;
}
/**
- * Operation bondProfileWithHttpInfo
+ * Operation bondPriceWithHttpInfo
*
- * Bond Profile
+ * Bond price data
*
- * @param string $isin ISIN (optional)
- * @param string $cusip CUSIP (optional)
- * @param string $figi FIGI (optional)
+ * @param string $isin ISIN. (required)
+ * @param int $from UNIX timestamp. Interval initial value. (required)
+ * @param int $to UNIX timestamp. Interval end value. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\BondProfile, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\BondCandles, HTTP status code, HTTP response headers (array of strings)
*/
- public function bondProfileWithHttpInfo($isin = null, $cusip = null, $figi = null)
+ public function bondPriceWithHttpInfo($isin, $from, $to)
{
- $request = $this->bondProfileRequest($isin, $cusip, $figi);
+ $request = $this->bondPriceRequest($isin, $from, $to);
try {
$options = $this->createHttpClientOption();
@@ -770,20 +770,20 @@ public function bondProfileWithHttpInfo($isin = null, $cusip = null, $figi = nul
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\BondProfile' === '\SplFileObject') {
+ if ('\Finnhub\Model\BondCandles' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\BondProfile', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\BondCandles', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\BondProfile';
+ $returnType = '\Finnhub\Model\BondCandles';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -801,7 +801,7 @@ public function bondProfileWithHttpInfo($isin = null, $cusip = null, $figi = nul
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\BondProfile',
+ '\Finnhub\Model\BondCandles',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -812,20 +812,20 @@ public function bondProfileWithHttpInfo($isin = null, $cusip = null, $figi = nul
}
/**
- * Operation bondProfileAsync
+ * Operation bondPriceAsync
*
- * Bond Profile
+ * Bond price data
*
- * @param string $isin ISIN (optional)
- * @param string $cusip CUSIP (optional)
- * @param string $figi FIGI (optional)
+ * @param string $isin ISIN. (required)
+ * @param int $from UNIX timestamp. Interval initial value. (required)
+ * @param int $to UNIX timestamp. Interval end value. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function bondProfileAsync($isin = null, $cusip = null, $figi = null)
+ public function bondPriceAsync($isin, $from, $to)
{
- return $this->bondProfileAsyncWithHttpInfo($isin, $cusip, $figi)
+ return $this->bondPriceAsyncWithHttpInfo($isin, $from, $to)
->then(
function ($response) {
return $response[0];
@@ -834,21 +834,21 @@ function ($response) {
}
/**
- * Operation bondProfileAsyncWithHttpInfo
+ * Operation bondPriceAsyncWithHttpInfo
*
- * Bond Profile
+ * Bond price data
*
- * @param string $isin ISIN (optional)
- * @param string $cusip CUSIP (optional)
- * @param string $figi FIGI (optional)
+ * @param string $isin ISIN. (required)
+ * @param int $from UNIX timestamp. Interval initial value. (required)
+ * @param int $to UNIX timestamp. Interval end value. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function bondProfileAsyncWithHttpInfo($isin = null, $cusip = null, $figi = null)
+ public function bondPriceAsyncWithHttpInfo($isin, $from, $to)
{
- $returnType = '\Finnhub\Model\BondProfile';
- $request = $this->bondProfileRequest($isin, $cusip, $figi);
+ $returnType = '\Finnhub\Model\BondCandles';
+ $request = $this->bondPriceRequest($isin, $from, $to);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -884,19 +884,37 @@ function ($exception) {
}
/**
- * Create request for operation 'bondProfile'
+ * Create request for operation 'bondPrice'
*
- * @param string $isin ISIN (optional)
- * @param string $cusip CUSIP (optional)
- * @param string $figi FIGI (optional)
+ * @param string $isin ISIN. (required)
+ * @param int $from UNIX timestamp. Interval initial value. (required)
+ * @param int $to UNIX timestamp. Interval end value. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function bondProfileRequest($isin = null, $cusip = null, $figi = null)
+ public function bondPriceRequest($isin, $from, $to)
{
+ // verify the required parameter 'isin' is set
+ if ($isin === null || (is_array($isin) && count($isin) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $isin when calling bondPrice'
+ );
+ }
+ // verify the required parameter 'from' is set
+ if ($from === null || (is_array($from) && count($from) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $from when calling bondPrice'
+ );
+ }
+ // verify the required parameter 'to' is set
+ if ($to === null || (is_array($to) && count($to) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $to when calling bondPrice'
+ );
+ }
- $resourcePath = '/bond/profile';
+ $resourcePath = '/bond/price';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -911,18 +929,18 @@ public function bondProfileRequest($isin = null, $cusip = null, $figi = null)
$queryParams['isin'] = $isin;
}
// query params
- if (is_array($cusip)) {
- $cusip = ObjectSerializer::serializeCollection($cusip, '', true);
+ if (is_array($from)) {
+ $from = ObjectSerializer::serializeCollection($from, '', true);
}
- if ($cusip !== null) {
- $queryParams['cusip'] = $cusip;
+ if ($from !== null) {
+ $queryParams['from'] = $from;
}
// query params
- if (is_array($figi)) {
- $figi = ObjectSerializer::serializeCollection($figi, '', true);
+ if (is_array($to)) {
+ $to = ObjectSerializer::serializeCollection($to, '', true);
}
- if ($figi !== null) {
- $queryParams['figi'] = $figi;
+ if ($to !== null) {
+ $queryParams['to'] = $to;
}
@@ -991,44 +1009,40 @@ public function bondProfileRequest($isin = null, $cusip = null, $figi = null)
}
/**
- * Operation bondTick
+ * Operation bondProfile
*
- * Bond Tick Data
+ * Bond Profile
*
- * @param string $isin ISIN. (required)
- * @param \DateTime $date Date: 2020-04-02. (required)
- * @param int $limit Limit number of ticks returned. Maximum value: <code>25000</code> (required)
- * @param int $skip Number of ticks to skip. Use this parameter to loop through the entire data. (required)
- * @param string $exchange Currently support the following values: <code>trace</code>. (required)
+ * @param string $isin ISIN (optional)
+ * @param string $cusip CUSIP (optional)
+ * @param string $figi FIGI (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\BondTickData
+ * @return \Finnhub\Model\BondProfile
*/
- public function bondTick($isin, $date, $limit, $skip, $exchange)
+ public function bondProfile($isin = null, $cusip = null, $figi = null)
{
- list($response) = $this->bondTickWithHttpInfo($isin, $date, $limit, $skip, $exchange);
+ list($response) = $this->bondProfileWithHttpInfo($isin, $cusip, $figi);
return $response;
}
/**
- * Operation bondTickWithHttpInfo
+ * Operation bondProfileWithHttpInfo
*
- * Bond Tick Data
+ * Bond Profile
*
- * @param string $isin ISIN. (required)
- * @param \DateTime $date Date: 2020-04-02. (required)
- * @param int $limit Limit number of ticks returned. Maximum value: <code>25000</code> (required)
- * @param int $skip Number of ticks to skip. Use this parameter to loop through the entire data. (required)
- * @param string $exchange Currently support the following values: <code>trace</code>. (required)
+ * @param string $isin ISIN (optional)
+ * @param string $cusip CUSIP (optional)
+ * @param string $figi FIGI (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\BondTickData, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\BondProfile, HTTP status code, HTTP response headers (array of strings)
*/
- public function bondTickWithHttpInfo($isin, $date, $limit, $skip, $exchange)
+ public function bondProfileWithHttpInfo($isin = null, $cusip = null, $figi = null)
{
- $request = $this->bondTickRequest($isin, $date, $limit, $skip, $exchange);
+ $request = $this->bondProfileRequest($isin, $cusip, $figi);
try {
$options = $this->createHttpClientOption();
@@ -1060,20 +1074,20 @@ public function bondTickWithHttpInfo($isin, $date, $limit, $skip, $exchange)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\BondTickData' === '\SplFileObject') {
+ if ('\Finnhub\Model\BondProfile' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\BondTickData', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\BondProfile', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\BondTickData';
+ $returnType = '\Finnhub\Model\BondProfile';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -1091,7 +1105,7 @@ public function bondTickWithHttpInfo($isin, $date, $limit, $skip, $exchange)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\BondTickData',
+ '\Finnhub\Model\BondProfile',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -1102,22 +1116,20 @@ public function bondTickWithHttpInfo($isin, $date, $limit, $skip, $exchange)
}
/**
- * Operation bondTickAsync
+ * Operation bondProfileAsync
*
- * Bond Tick Data
+ * Bond Profile
*
- * @param string $isin ISIN. (required)
- * @param \DateTime $date Date: 2020-04-02. (required)
- * @param int $limit Limit number of ticks returned. Maximum value: <code>25000</code> (required)
- * @param int $skip Number of ticks to skip. Use this parameter to loop through the entire data. (required)
- * @param string $exchange Currently support the following values: <code>trace</code>. (required)
+ * @param string $isin ISIN (optional)
+ * @param string $cusip CUSIP (optional)
+ * @param string $figi FIGI (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function bondTickAsync($isin, $date, $limit, $skip, $exchange)
+ public function bondProfileAsync($isin = null, $cusip = null, $figi = null)
{
- return $this->bondTickAsyncWithHttpInfo($isin, $date, $limit, $skip, $exchange)
+ return $this->bondProfileAsyncWithHttpInfo($isin, $cusip, $figi)
->then(
function ($response) {
return $response[0];
@@ -1126,23 +1138,21 @@ function ($response) {
}
/**
- * Operation bondTickAsyncWithHttpInfo
+ * Operation bondProfileAsyncWithHttpInfo
*
- * Bond Tick Data
+ * Bond Profile
*
- * @param string $isin ISIN. (required)
- * @param \DateTime $date Date: 2020-04-02. (required)
- * @param int $limit Limit number of ticks returned. Maximum value: <code>25000</code> (required)
- * @param int $skip Number of ticks to skip. Use this parameter to loop through the entire data. (required)
- * @param string $exchange Currently support the following values: <code>trace</code>. (required)
+ * @param string $isin ISIN (optional)
+ * @param string $cusip CUSIP (optional)
+ * @param string $figi FIGI (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function bondTickAsyncWithHttpInfo($isin, $date, $limit, $skip, $exchange)
+ public function bondProfileAsyncWithHttpInfo($isin = null, $cusip = null, $figi = null)
{
- $returnType = '\Finnhub\Model\BondTickData';
- $request = $this->bondTickRequest($isin, $date, $limit, $skip, $exchange);
+ $returnType = '\Finnhub\Model\BondProfile';
+ $request = $this->bondProfileRequest($isin, $cusip, $figi);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -1178,51 +1188,19 @@ function ($exception) {
}
/**
- * Create request for operation 'bondTick'
+ * Create request for operation 'bondProfile'
*
- * @param string $isin ISIN. (required)
- * @param \DateTime $date Date: 2020-04-02. (required)
- * @param int $limit Limit number of ticks returned. Maximum value: <code>25000</code> (required)
- * @param int $skip Number of ticks to skip. Use this parameter to loop through the entire data. (required)
- * @param string $exchange Currently support the following values: <code>trace</code>. (required)
+ * @param string $isin ISIN (optional)
+ * @param string $cusip CUSIP (optional)
+ * @param string $figi FIGI (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function bondTickRequest($isin, $date, $limit, $skip, $exchange)
+ public function bondProfileRequest($isin = null, $cusip = null, $figi = null)
{
- // verify the required parameter 'isin' is set
- if ($isin === null || (is_array($isin) && count($isin) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $isin when calling bondTick'
- );
- }
- // verify the required parameter 'date' is set
- if ($date === null || (is_array($date) && count($date) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $date when calling bondTick'
- );
- }
- // verify the required parameter 'limit' is set
- if ($limit === null || (is_array($limit) && count($limit) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $limit when calling bondTick'
- );
- }
- // verify the required parameter 'skip' is set
- if ($skip === null || (is_array($skip) && count($skip) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $skip when calling bondTick'
- );
- }
- // verify the required parameter 'exchange' is set
- if ($exchange === null || (is_array($exchange) && count($exchange) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $exchange when calling bondTick'
- );
- }
- $resourcePath = '/bond/tick';
+ $resourcePath = '/bond/profile';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -1237,32 +1215,18 @@ public function bondTickRequest($isin, $date, $limit, $skip, $exchange)
$queryParams['isin'] = $isin;
}
// query params
- if (is_array($date)) {
- $date = ObjectSerializer::serializeCollection($date, '', true);
- }
- if ($date !== null) {
- $queryParams['date'] = $date;
- }
- // query params
- if (is_array($limit)) {
- $limit = ObjectSerializer::serializeCollection($limit, '', true);
- }
- if ($limit !== null) {
- $queryParams['limit'] = $limit;
- }
- // query params
- if (is_array($skip)) {
- $skip = ObjectSerializer::serializeCollection($skip, '', true);
+ if (is_array($cusip)) {
+ $cusip = ObjectSerializer::serializeCollection($cusip, '', true);
}
- if ($skip !== null) {
- $queryParams['skip'] = $skip;
+ if ($cusip !== null) {
+ $queryParams['cusip'] = $cusip;
}
// query params
- if (is_array($exchange)) {
- $exchange = ObjectSerializer::serializeCollection($exchange, '', true);
+ if (is_array($figi)) {
+ $figi = ObjectSerializer::serializeCollection($figi, '', true);
}
- if ($exchange !== null) {
- $queryParams['exchange'] = $exchange;
+ if ($figi !== null) {
+ $queryParams['figi'] = $figi;
}
@@ -1331,36 +1295,44 @@ public function bondTickRequest($isin, $date, $limit, $skip, $exchange)
}
/**
- * Operation bondYieldCurve
+ * Operation bondTick
*
- * Bond Yield Curve
+ * Bond Tick Data
*
- * @param string $code Bond's code. You can find the list of supported code <a href=\"https://docs.google.com/spreadsheets/d/1iA-lM0Kht7lsQZ7Uu_s6r2i1BbQNUNO9eGkO5-zglHg/edit?usp=sharing\" target=\"_blank\" rel=\"noopener\">here</a>. (required)
+ * @param string $isin ISIN. (required)
+ * @param \DateTime $date Date: 2020-04-02. (required)
+ * @param int $limit Limit number of ticks returned. Maximum value: <code>25000</code> (required)
+ * @param int $skip Number of ticks to skip. Use this parameter to loop through the entire data. (required)
+ * @param string $exchange Currently support the following values: <code>trace</code>. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\BondYieldCurve
+ * @return \Finnhub\Model\BondTickData
*/
- public function bondYieldCurve($code)
+ public function bondTick($isin, $date, $limit, $skip, $exchange)
{
- list($response) = $this->bondYieldCurveWithHttpInfo($code);
+ list($response) = $this->bondTickWithHttpInfo($isin, $date, $limit, $skip, $exchange);
return $response;
}
/**
- * Operation bondYieldCurveWithHttpInfo
+ * Operation bondTickWithHttpInfo
*
- * Bond Yield Curve
+ * Bond Tick Data
*
- * @param string $code Bond's code. You can find the list of supported code <a href=\"https://docs.google.com/spreadsheets/d/1iA-lM0Kht7lsQZ7Uu_s6r2i1BbQNUNO9eGkO5-zglHg/edit?usp=sharing\" target=\"_blank\" rel=\"noopener\">here</a>. (required)
+ * @param string $isin ISIN. (required)
+ * @param \DateTime $date Date: 2020-04-02. (required)
+ * @param int $limit Limit number of ticks returned. Maximum value: <code>25000</code> (required)
+ * @param int $skip Number of ticks to skip. Use this parameter to loop through the entire data. (required)
+ * @param string $exchange Currently support the following values: <code>trace</code>. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\BondYieldCurve, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\BondTickData, HTTP status code, HTTP response headers (array of strings)
*/
- public function bondYieldCurveWithHttpInfo($code)
+ public function bondTickWithHttpInfo($isin, $date, $limit, $skip, $exchange)
{
- $request = $this->bondYieldCurveRequest($code);
+ $request = $this->bondTickRequest($isin, $date, $limit, $skip, $exchange);
try {
$options = $this->createHttpClientOption();
@@ -1392,20 +1364,20 @@ public function bondYieldCurveWithHttpInfo($code)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\BondYieldCurve' === '\SplFileObject') {
+ if ('\Finnhub\Model\BondTickData' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\BondYieldCurve', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\BondTickData', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\BondYieldCurve';
+ $returnType = '\Finnhub\Model\BondTickData';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -1423,7 +1395,7 @@ public function bondYieldCurveWithHttpInfo($code)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\BondYieldCurve',
+ '\Finnhub\Model\BondTickData',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -1434,18 +1406,22 @@ public function bondYieldCurveWithHttpInfo($code)
}
/**
- * Operation bondYieldCurveAsync
+ * Operation bondTickAsync
*
- * Bond Yield Curve
+ * Bond Tick Data
*
- * @param string $code Bond's code. You can find the list of supported code <a href=\"https://docs.google.com/spreadsheets/d/1iA-lM0Kht7lsQZ7Uu_s6r2i1BbQNUNO9eGkO5-zglHg/edit?usp=sharing\" target=\"_blank\" rel=\"noopener\">here</a>. (required)
+ * @param string $isin ISIN. (required)
+ * @param \DateTime $date Date: 2020-04-02. (required)
+ * @param int $limit Limit number of ticks returned. Maximum value: <code>25000</code> (required)
+ * @param int $skip Number of ticks to skip. Use this parameter to loop through the entire data. (required)
+ * @param string $exchange Currently support the following values: <code>trace</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function bondYieldCurveAsync($code)
+ public function bondTickAsync($isin, $date, $limit, $skip, $exchange)
{
- return $this->bondYieldCurveAsyncWithHttpInfo($code)
+ return $this->bondTickAsyncWithHttpInfo($isin, $date, $limit, $skip, $exchange)
->then(
function ($response) {
return $response[0];
@@ -1454,19 +1430,23 @@ function ($response) {
}
/**
- * Operation bondYieldCurveAsyncWithHttpInfo
+ * Operation bondTickAsyncWithHttpInfo
*
- * Bond Yield Curve
+ * Bond Tick Data
*
- * @param string $code Bond's code. You can find the list of supported code <a href=\"https://docs.google.com/spreadsheets/d/1iA-lM0Kht7lsQZ7Uu_s6r2i1BbQNUNO9eGkO5-zglHg/edit?usp=sharing\" target=\"_blank\" rel=\"noopener\">here</a>. (required)
+ * @param string $isin ISIN. (required)
+ * @param \DateTime $date Date: 2020-04-02. (required)
+ * @param int $limit Limit number of ticks returned. Maximum value: <code>25000</code> (required)
+ * @param int $skip Number of ticks to skip. Use this parameter to loop through the entire data. (required)
+ * @param string $exchange Currently support the following values: <code>trace</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function bondYieldCurveAsyncWithHttpInfo($code)
+ public function bondTickAsyncWithHttpInfo($isin, $date, $limit, $skip, $exchange)
{
- $returnType = '\Finnhub\Model\BondYieldCurve';
- $request = $this->bondYieldCurveRequest($code);
+ $returnType = '\Finnhub\Model\BondTickData';
+ $request = $this->bondTickRequest($isin, $date, $limit, $skip, $exchange);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -1502,23 +1482,51 @@ function ($exception) {
}
/**
- * Create request for operation 'bondYieldCurve'
+ * Create request for operation 'bondTick'
*
- * @param string $code Bond's code. You can find the list of supported code <a href=\"https://docs.google.com/spreadsheets/d/1iA-lM0Kht7lsQZ7Uu_s6r2i1BbQNUNO9eGkO5-zglHg/edit?usp=sharing\" target=\"_blank\" rel=\"noopener\">here</a>. (required)
+ * @param string $isin ISIN. (required)
+ * @param \DateTime $date Date: 2020-04-02. (required)
+ * @param int $limit Limit number of ticks returned. Maximum value: <code>25000</code> (required)
+ * @param int $skip Number of ticks to skip. Use this parameter to loop through the entire data. (required)
+ * @param string $exchange Currently support the following values: <code>trace</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function bondYieldCurveRequest($code)
+ public function bondTickRequest($isin, $date, $limit, $skip, $exchange)
{
- // verify the required parameter 'code' is set
- if ($code === null || (is_array($code) && count($code) === 0)) {
+ // verify the required parameter 'isin' is set
+ if ($isin === null || (is_array($isin) && count($isin) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $code when calling bondYieldCurve'
+ 'Missing the required parameter $isin when calling bondTick'
+ );
+ }
+ // verify the required parameter 'date' is set
+ if ($date === null || (is_array($date) && count($date) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $date when calling bondTick'
+ );
+ }
+ // verify the required parameter 'limit' is set
+ if ($limit === null || (is_array($limit) && count($limit) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $limit when calling bondTick'
+ );
+ }
+ // verify the required parameter 'skip' is set
+ if ($skip === null || (is_array($skip) && count($skip) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $skip when calling bondTick'
+ );
+ }
+ // verify the required parameter 'exchange' is set
+ if ($exchange === null || (is_array($exchange) && count($exchange) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $exchange when calling bondTick'
);
}
- $resourcePath = '/bond/yield-curve';
+ $resourcePath = '/bond/tick';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -1526,11 +1534,39 @@ public function bondYieldCurveRequest($code)
$multipart = false;
// query params
- if (is_array($code)) {
- $code = ObjectSerializer::serializeCollection($code, '', true);
+ if (is_array($isin)) {
+ $isin = ObjectSerializer::serializeCollection($isin, '', true);
}
- if ($code !== null) {
- $queryParams['code'] = $code;
+ if ($isin !== null) {
+ $queryParams['isin'] = $isin;
+ }
+ // query params
+ if (is_array($date)) {
+ $date = ObjectSerializer::serializeCollection($date, '', true);
+ }
+ if ($date !== null) {
+ $queryParams['date'] = $date;
+ }
+ // query params
+ if (is_array($limit)) {
+ $limit = ObjectSerializer::serializeCollection($limit, '', true);
+ }
+ if ($limit !== null) {
+ $queryParams['limit'] = $limit;
+ }
+ // query params
+ if (is_array($skip)) {
+ $skip = ObjectSerializer::serializeCollection($skip, '', true);
+ }
+ if ($skip !== null) {
+ $queryParams['skip'] = $skip;
+ }
+ // query params
+ if (is_array($exchange)) {
+ $exchange = ObjectSerializer::serializeCollection($exchange, '', true);
+ }
+ if ($exchange !== null) {
+ $queryParams['exchange'] = $exchange;
}
@@ -1599,38 +1635,36 @@ public function bondYieldCurveRequest($code)
}
/**
- * Operation companyBasicFinancials
+ * Operation bondYieldCurve
*
- * Basic Financials
+ * Bond Yield Curve
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $metric Metric type. Can be 1 of the following values <code>all</code> (required)
+ * @param string $code Bond's code. You can find the list of supported code <a href=\"https://docs.google.com/spreadsheets/d/1iA-lM0Kht7lsQZ7Uu_s6r2i1BbQNUNO9eGkO5-zglHg/edit?usp=sharing\" target=\"_blank\" rel=\"noopener\">here</a>. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\BasicFinancials
+ * @return \Finnhub\Model\BondYieldCurve
*/
- public function companyBasicFinancials($symbol, $metric)
+ public function bondYieldCurve($code)
{
- list($response) = $this->companyBasicFinancialsWithHttpInfo($symbol, $metric);
+ list($response) = $this->bondYieldCurveWithHttpInfo($code);
return $response;
}
/**
- * Operation companyBasicFinancialsWithHttpInfo
+ * Operation bondYieldCurveWithHttpInfo
*
- * Basic Financials
+ * Bond Yield Curve
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $metric Metric type. Can be 1 of the following values <code>all</code> (required)
+ * @param string $code Bond's code. You can find the list of supported code <a href=\"https://docs.google.com/spreadsheets/d/1iA-lM0Kht7lsQZ7Uu_s6r2i1BbQNUNO9eGkO5-zglHg/edit?usp=sharing\" target=\"_blank\" rel=\"noopener\">here</a>. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\BasicFinancials, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\BondYieldCurve, HTTP status code, HTTP response headers (array of strings)
*/
- public function companyBasicFinancialsWithHttpInfo($symbol, $metric)
+ public function bondYieldCurveWithHttpInfo($code)
{
- $request = $this->companyBasicFinancialsRequest($symbol, $metric);
+ $request = $this->bondYieldCurveRequest($code);
try {
$options = $this->createHttpClientOption();
@@ -1662,20 +1696,20 @@ public function companyBasicFinancialsWithHttpInfo($symbol, $metric)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\BasicFinancials' === '\SplFileObject') {
+ if ('\Finnhub\Model\BondYieldCurve' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\BasicFinancials', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\BondYieldCurve', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\BasicFinancials';
+ $returnType = '\Finnhub\Model\BondYieldCurve';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -1693,7 +1727,7 @@ public function companyBasicFinancialsWithHttpInfo($symbol, $metric)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\BasicFinancials',
+ '\Finnhub\Model\BondYieldCurve',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -1704,19 +1738,18 @@ public function companyBasicFinancialsWithHttpInfo($symbol, $metric)
}
/**
- * Operation companyBasicFinancialsAsync
+ * Operation bondYieldCurveAsync
*
- * Basic Financials
+ * Bond Yield Curve
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $metric Metric type. Can be 1 of the following values <code>all</code> (required)
+ * @param string $code Bond's code. You can find the list of supported code <a href=\"https://docs.google.com/spreadsheets/d/1iA-lM0Kht7lsQZ7Uu_s6r2i1BbQNUNO9eGkO5-zglHg/edit?usp=sharing\" target=\"_blank\" rel=\"noopener\">here</a>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyBasicFinancialsAsync($symbol, $metric)
+ public function bondYieldCurveAsync($code)
{
- return $this->companyBasicFinancialsAsyncWithHttpInfo($symbol, $metric)
+ return $this->bondYieldCurveAsyncWithHttpInfo($code)
->then(
function ($response) {
return $response[0];
@@ -1725,20 +1758,19 @@ function ($response) {
}
/**
- * Operation companyBasicFinancialsAsyncWithHttpInfo
+ * Operation bondYieldCurveAsyncWithHttpInfo
*
- * Basic Financials
+ * Bond Yield Curve
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $metric Metric type. Can be 1 of the following values <code>all</code> (required)
+ * @param string $code Bond's code. You can find the list of supported code <a href=\"https://docs.google.com/spreadsheets/d/1iA-lM0Kht7lsQZ7Uu_s6r2i1BbQNUNO9eGkO5-zglHg/edit?usp=sharing\" target=\"_blank\" rel=\"noopener\">here</a>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyBasicFinancialsAsyncWithHttpInfo($symbol, $metric)
+ public function bondYieldCurveAsyncWithHttpInfo($code)
{
- $returnType = '\Finnhub\Model\BasicFinancials';
- $request = $this->companyBasicFinancialsRequest($symbol, $metric);
+ $returnType = '\Finnhub\Model\BondYieldCurve';
+ $request = $this->bondYieldCurveRequest($code);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -1774,30 +1806,23 @@ function ($exception) {
}
/**
- * Create request for operation 'companyBasicFinancials'
+ * Create request for operation 'bondYieldCurve'
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $metric Metric type. Can be 1 of the following values <code>all</code> (required)
+ * @param string $code Bond's code. You can find the list of supported code <a href=\"https://docs.google.com/spreadsheets/d/1iA-lM0Kht7lsQZ7Uu_s6r2i1BbQNUNO9eGkO5-zglHg/edit?usp=sharing\" target=\"_blank\" rel=\"noopener\">here</a>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function companyBasicFinancialsRequest($symbol, $metric)
+ public function bondYieldCurveRequest($code)
{
- // verify the required parameter 'symbol' is set
- if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling companyBasicFinancials'
- );
- }
- // verify the required parameter 'metric' is set
- if ($metric === null || (is_array($metric) && count($metric) === 0)) {
+ // verify the required parameter 'code' is set
+ if ($code === null || (is_array($code) && count($code) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $metric when calling companyBasicFinancials'
+ 'Missing the required parameter $code when calling bondYieldCurve'
);
}
- $resourcePath = '/stock/metric';
+ $resourcePath = '/bond/yield-curve';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -1805,18 +1830,11 @@ public function companyBasicFinancialsRequest($symbol, $metric)
$multipart = false;
// query params
- if (is_array($symbol)) {
- $symbol = ObjectSerializer::serializeCollection($symbol, '', true);
- }
- if ($symbol !== null) {
- $queryParams['symbol'] = $symbol;
- }
- // query params
- if (is_array($metric)) {
- $metric = ObjectSerializer::serializeCollection($metric, '', true);
+ if (is_array($code)) {
+ $code = ObjectSerializer::serializeCollection($code, '', true);
}
- if ($metric !== null) {
- $queryParams['metric'] = $metric;
+ if ($code !== null) {
+ $queryParams['code'] = $code;
}
@@ -1885,38 +1903,38 @@ public function companyBasicFinancialsRequest($symbol, $metric)
}
/**
- * Operation companyEarnings
+ * Operation companyBasicFinancials
*
- * Earnings Surprises
+ * Basic Financials
*
* @param string $symbol Symbol of the company: AAPL. (required)
- * @param int $limit Limit number of period returned. Leave blank to get the full history. (optional)
+ * @param string $metric Metric type. Can be 1 of the following values <code>all</code> (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\EarningResult[]
+ * @return \Finnhub\Model\BasicFinancials
*/
- public function companyEarnings($symbol, $limit = null)
+ public function companyBasicFinancials($symbol, $metric)
{
- list($response) = $this->companyEarningsWithHttpInfo($symbol, $limit);
+ list($response) = $this->companyBasicFinancialsWithHttpInfo($symbol, $metric);
return $response;
}
/**
- * Operation companyEarningsWithHttpInfo
+ * Operation companyBasicFinancialsWithHttpInfo
*
- * Earnings Surprises
+ * Basic Financials
*
* @param string $symbol Symbol of the company: AAPL. (required)
- * @param int $limit Limit number of period returned. Leave blank to get the full history. (optional)
+ * @param string $metric Metric type. Can be 1 of the following values <code>all</code> (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\EarningResult[], HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\BasicFinancials, HTTP status code, HTTP response headers (array of strings)
*/
- public function companyEarningsWithHttpInfo($symbol, $limit = null)
+ public function companyBasicFinancialsWithHttpInfo($symbol, $metric)
{
- $request = $this->companyEarningsRequest($symbol, $limit);
+ $request = $this->companyBasicFinancialsRequest($symbol, $metric);
try {
$options = $this->createHttpClientOption();
@@ -1948,20 +1966,20 @@ public function companyEarningsWithHttpInfo($symbol, $limit = null)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\EarningResult[]' === '\SplFileObject') {
+ if ('\Finnhub\Model\BasicFinancials' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\EarningResult[]', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\BasicFinancials', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\EarningResult[]';
+ $returnType = '\Finnhub\Model\BasicFinancials';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -1979,7 +1997,7 @@ public function companyEarningsWithHttpInfo($symbol, $limit = null)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\EarningResult[]',
+ '\Finnhub\Model\BasicFinancials',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -1990,19 +2008,19 @@ public function companyEarningsWithHttpInfo($symbol, $limit = null)
}
/**
- * Operation companyEarningsAsync
+ * Operation companyBasicFinancialsAsync
*
- * Earnings Surprises
+ * Basic Financials
*
* @param string $symbol Symbol of the company: AAPL. (required)
- * @param int $limit Limit number of period returned. Leave blank to get the full history. (optional)
+ * @param string $metric Metric type. Can be 1 of the following values <code>all</code> (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyEarningsAsync($symbol, $limit = null)
+ public function companyBasicFinancialsAsync($symbol, $metric)
{
- return $this->companyEarningsAsyncWithHttpInfo($symbol, $limit)
+ return $this->companyBasicFinancialsAsyncWithHttpInfo($symbol, $metric)
->then(
function ($response) {
return $response[0];
@@ -2011,20 +2029,20 @@ function ($response) {
}
/**
- * Operation companyEarningsAsyncWithHttpInfo
+ * Operation companyBasicFinancialsAsyncWithHttpInfo
*
- * Earnings Surprises
+ * Basic Financials
*
* @param string $symbol Symbol of the company: AAPL. (required)
- * @param int $limit Limit number of period returned. Leave blank to get the full history. (optional)
+ * @param string $metric Metric type. Can be 1 of the following values <code>all</code> (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyEarningsAsyncWithHttpInfo($symbol, $limit = null)
+ public function companyBasicFinancialsAsyncWithHttpInfo($symbol, $metric)
{
- $returnType = '\Finnhub\Model\EarningResult[]';
- $request = $this->companyEarningsRequest($symbol, $limit);
+ $returnType = '\Finnhub\Model\BasicFinancials';
+ $request = $this->companyBasicFinancialsRequest($symbol, $metric);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -2060,24 +2078,30 @@ function ($exception) {
}
/**
- * Create request for operation 'companyEarnings'
+ * Create request for operation 'companyBasicFinancials'
*
* @param string $symbol Symbol of the company: AAPL. (required)
- * @param int $limit Limit number of period returned. Leave blank to get the full history. (optional)
+ * @param string $metric Metric type. Can be 1 of the following values <code>all</code> (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function companyEarningsRequest($symbol, $limit = null)
+ public function companyBasicFinancialsRequest($symbol, $metric)
{
// verify the required parameter 'symbol' is set
if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling companyEarnings'
+ 'Missing the required parameter $symbol when calling companyBasicFinancials'
+ );
+ }
+ // verify the required parameter 'metric' is set
+ if ($metric === null || (is_array($metric) && count($metric) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $metric when calling companyBasicFinancials'
);
}
- $resourcePath = '/stock/earnings';
+ $resourcePath = '/stock/metric';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -2092,11 +2116,11 @@ public function companyEarningsRequest($symbol, $limit = null)
$queryParams['symbol'] = $symbol;
}
// query params
- if (is_array($limit)) {
- $limit = ObjectSerializer::serializeCollection($limit, '', true);
+ if (is_array($metric)) {
+ $metric = ObjectSerializer::serializeCollection($metric, '', true);
}
- if ($limit !== null) {
- $queryParams['limit'] = $limit;
+ if ($metric !== null) {
+ $queryParams['metric'] = $metric;
}
@@ -2165,38 +2189,38 @@ public function companyEarningsRequest($symbol, $limit = null)
}
/**
- * Operation companyEarningsQualityScore
+ * Operation companyEarnings
*
- * Company Earnings Quality Score
+ * Earnings Surprises
*
- * @param string $symbol Symbol. (required)
- * @param string $freq Frequency. Currently support <code>annual</code> and <code>quarterly</code> (required)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param int $limit Limit number of period returned. Leave blank to get the full history. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\CompanyEarningsQualityScore
+ * @return \Finnhub\Model\EarningResult[]
*/
- public function companyEarningsQualityScore($symbol, $freq)
+ public function companyEarnings($symbol, $limit = null)
{
- list($response) = $this->companyEarningsQualityScoreWithHttpInfo($symbol, $freq);
+ list($response) = $this->companyEarningsWithHttpInfo($symbol, $limit);
return $response;
}
/**
- * Operation companyEarningsQualityScoreWithHttpInfo
+ * Operation companyEarningsWithHttpInfo
*
- * Company Earnings Quality Score
+ * Earnings Surprises
*
- * @param string $symbol Symbol. (required)
- * @param string $freq Frequency. Currently support <code>annual</code> and <code>quarterly</code> (required)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param int $limit Limit number of period returned. Leave blank to get the full history. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\CompanyEarningsQualityScore, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\EarningResult[], HTTP status code, HTTP response headers (array of strings)
*/
- public function companyEarningsQualityScoreWithHttpInfo($symbol, $freq)
+ public function companyEarningsWithHttpInfo($symbol, $limit = null)
{
- $request = $this->companyEarningsQualityScoreRequest($symbol, $freq);
+ $request = $this->companyEarningsRequest($symbol, $limit);
try {
$options = $this->createHttpClientOption();
@@ -2228,20 +2252,20 @@ public function companyEarningsQualityScoreWithHttpInfo($symbol, $freq)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\CompanyEarningsQualityScore' === '\SplFileObject') {
+ if ('\Finnhub\Model\EarningResult[]' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\CompanyEarningsQualityScore', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\EarningResult[]', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\CompanyEarningsQualityScore';
+ $returnType = '\Finnhub\Model\EarningResult[]';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -2259,7 +2283,7 @@ public function companyEarningsQualityScoreWithHttpInfo($symbol, $freq)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\CompanyEarningsQualityScore',
+ '\Finnhub\Model\EarningResult[]',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -2270,19 +2294,19 @@ public function companyEarningsQualityScoreWithHttpInfo($symbol, $freq)
}
/**
- * Operation companyEarningsQualityScoreAsync
+ * Operation companyEarningsAsync
*
- * Company Earnings Quality Score
+ * Earnings Surprises
*
- * @param string $symbol Symbol. (required)
- * @param string $freq Frequency. Currently support <code>annual</code> and <code>quarterly</code> (required)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param int $limit Limit number of period returned. Leave blank to get the full history. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyEarningsQualityScoreAsync($symbol, $freq)
+ public function companyEarningsAsync($symbol, $limit = null)
{
- return $this->companyEarningsQualityScoreAsyncWithHttpInfo($symbol, $freq)
+ return $this->companyEarningsAsyncWithHttpInfo($symbol, $limit)
->then(
function ($response) {
return $response[0];
@@ -2291,20 +2315,20 @@ function ($response) {
}
/**
- * Operation companyEarningsQualityScoreAsyncWithHttpInfo
+ * Operation companyEarningsAsyncWithHttpInfo
*
- * Company Earnings Quality Score
+ * Earnings Surprises
*
- * @param string $symbol Symbol. (required)
- * @param string $freq Frequency. Currently support <code>annual</code> and <code>quarterly</code> (required)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param int $limit Limit number of period returned. Leave blank to get the full history. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyEarningsQualityScoreAsyncWithHttpInfo($symbol, $freq)
+ public function companyEarningsAsyncWithHttpInfo($symbol, $limit = null)
{
- $returnType = '\Finnhub\Model\CompanyEarningsQualityScore';
- $request = $this->companyEarningsQualityScoreRequest($symbol, $freq);
+ $returnType = '\Finnhub\Model\EarningResult[]';
+ $request = $this->companyEarningsRequest($symbol, $limit);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -2340,30 +2364,24 @@ function ($exception) {
}
/**
- * Create request for operation 'companyEarningsQualityScore'
+ * Create request for operation 'companyEarnings'
*
- * @param string $symbol Symbol. (required)
- * @param string $freq Frequency. Currently support <code>annual</code> and <code>quarterly</code> (required)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param int $limit Limit number of period returned. Leave blank to get the full history. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function companyEarningsQualityScoreRequest($symbol, $freq)
+ public function companyEarningsRequest($symbol, $limit = null)
{
// verify the required parameter 'symbol' is set
if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling companyEarningsQualityScore'
- );
- }
- // verify the required parameter 'freq' is set
- if ($freq === null || (is_array($freq) && count($freq) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $freq when calling companyEarningsQualityScore'
+ 'Missing the required parameter $symbol when calling companyEarnings'
);
}
- $resourcePath = '/stock/earnings-quality-score';
+ $resourcePath = '/stock/earnings';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -2378,11 +2396,11 @@ public function companyEarningsQualityScoreRequest($symbol, $freq)
$queryParams['symbol'] = $symbol;
}
// query params
- if (is_array($freq)) {
- $freq = ObjectSerializer::serializeCollection($freq, '', true);
+ if (is_array($limit)) {
+ $limit = ObjectSerializer::serializeCollection($limit, '', true);
}
- if ($freq !== null) {
- $queryParams['freq'] = $freq;
+ if ($limit !== null) {
+ $queryParams['limit'] = $limit;
}
@@ -2451,38 +2469,38 @@ public function companyEarningsQualityScoreRequest($symbol, $freq)
}
/**
- * Operation companyEbitEstimates
+ * Operation companyEarningsQualityScore
*
- * EBIT Estimates
+ * Company Earnings Quality Score
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
+ * @param string $symbol Symbol. (required)
+ * @param string $freq Frequency. Currently support <code>annual</code> and <code>quarterly</code> (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\EbitEstimates
+ * @return \Finnhub\Model\CompanyEarningsQualityScore
*/
- public function companyEbitEstimates($symbol, $freq = null)
+ public function companyEarningsQualityScore($symbol, $freq)
{
- list($response) = $this->companyEbitEstimatesWithHttpInfo($symbol, $freq);
+ list($response) = $this->companyEarningsQualityScoreWithHttpInfo($symbol, $freq);
return $response;
}
/**
- * Operation companyEbitEstimatesWithHttpInfo
+ * Operation companyEarningsQualityScoreWithHttpInfo
*
- * EBIT Estimates
+ * Company Earnings Quality Score
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
+ * @param string $symbol Symbol. (required)
+ * @param string $freq Frequency. Currently support <code>annual</code> and <code>quarterly</code> (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\EbitEstimates, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\CompanyEarningsQualityScore, HTTP status code, HTTP response headers (array of strings)
*/
- public function companyEbitEstimatesWithHttpInfo($symbol, $freq = null)
+ public function companyEarningsQualityScoreWithHttpInfo($symbol, $freq)
{
- $request = $this->companyEbitEstimatesRequest($symbol, $freq);
+ $request = $this->companyEarningsQualityScoreRequest($symbol, $freq);
try {
$options = $this->createHttpClientOption();
@@ -2514,20 +2532,20 @@ public function companyEbitEstimatesWithHttpInfo($symbol, $freq = null)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\EbitEstimates' === '\SplFileObject') {
+ if ('\Finnhub\Model\CompanyEarningsQualityScore' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\EbitEstimates', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\CompanyEarningsQualityScore', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\EbitEstimates';
+ $returnType = '\Finnhub\Model\CompanyEarningsQualityScore';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -2545,7 +2563,7 @@ public function companyEbitEstimatesWithHttpInfo($symbol, $freq = null)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\EbitEstimates',
+ '\Finnhub\Model\CompanyEarningsQualityScore',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -2556,19 +2574,19 @@ public function companyEbitEstimatesWithHttpInfo($symbol, $freq = null)
}
/**
- * Operation companyEbitEstimatesAsync
+ * Operation companyEarningsQualityScoreAsync
*
- * EBIT Estimates
+ * Company Earnings Quality Score
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
+ * @param string $symbol Symbol. (required)
+ * @param string $freq Frequency. Currently support <code>annual</code> and <code>quarterly</code> (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyEbitEstimatesAsync($symbol, $freq = null)
+ public function companyEarningsQualityScoreAsync($symbol, $freq)
{
- return $this->companyEbitEstimatesAsyncWithHttpInfo($symbol, $freq)
+ return $this->companyEarningsQualityScoreAsyncWithHttpInfo($symbol, $freq)
->then(
function ($response) {
return $response[0];
@@ -2577,20 +2595,20 @@ function ($response) {
}
/**
- * Operation companyEbitEstimatesAsyncWithHttpInfo
+ * Operation companyEarningsQualityScoreAsyncWithHttpInfo
*
- * EBIT Estimates
+ * Company Earnings Quality Score
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
+ * @param string $symbol Symbol. (required)
+ * @param string $freq Frequency. Currently support <code>annual</code> and <code>quarterly</code> (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyEbitEstimatesAsyncWithHttpInfo($symbol, $freq = null)
+ public function companyEarningsQualityScoreAsyncWithHttpInfo($symbol, $freq)
{
- $returnType = '\Finnhub\Model\EbitEstimates';
- $request = $this->companyEbitEstimatesRequest($symbol, $freq);
+ $returnType = '\Finnhub\Model\CompanyEarningsQualityScore';
+ $request = $this->companyEarningsQualityScoreRequest($symbol, $freq);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -2626,24 +2644,30 @@ function ($exception) {
}
/**
- * Create request for operation 'companyEbitEstimates'
+ * Create request for operation 'companyEarningsQualityScore'
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
+ * @param string $symbol Symbol. (required)
+ * @param string $freq Frequency. Currently support <code>annual</code> and <code>quarterly</code> (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function companyEbitEstimatesRequest($symbol, $freq = null)
+ public function companyEarningsQualityScoreRequest($symbol, $freq)
{
// verify the required parameter 'symbol' is set
if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling companyEbitEstimates'
+ 'Missing the required parameter $symbol when calling companyEarningsQualityScore'
+ );
+ }
+ // verify the required parameter 'freq' is set
+ if ($freq === null || (is_array($freq) && count($freq) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $freq when calling companyEarningsQualityScore'
);
}
- $resourcePath = '/stock/ebit-estimate';
+ $resourcePath = '/stock/earnings-quality-score';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -2731,38 +2755,38 @@ public function companyEbitEstimatesRequest($symbol, $freq = null)
}
/**
- * Operation companyEbitdaEstimates
+ * Operation companyEbitEstimates
*
- * EBITDA Estimates
+ * EBIT Estimates
*
* @param string $symbol Symbol of the company: AAPL. (required)
* @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\EbitdaEstimates
+ * @return \Finnhub\Model\EbitEstimates
*/
- public function companyEbitdaEstimates($symbol, $freq = null)
+ public function companyEbitEstimates($symbol, $freq = null)
{
- list($response) = $this->companyEbitdaEstimatesWithHttpInfo($symbol, $freq);
+ list($response) = $this->companyEbitEstimatesWithHttpInfo($symbol, $freq);
return $response;
}
/**
- * Operation companyEbitdaEstimatesWithHttpInfo
+ * Operation companyEbitEstimatesWithHttpInfo
*
- * EBITDA Estimates
+ * EBIT Estimates
*
* @param string $symbol Symbol of the company: AAPL. (required)
* @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\EbitdaEstimates, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\EbitEstimates, HTTP status code, HTTP response headers (array of strings)
*/
- public function companyEbitdaEstimatesWithHttpInfo($symbol, $freq = null)
+ public function companyEbitEstimatesWithHttpInfo($symbol, $freq = null)
{
- $request = $this->companyEbitdaEstimatesRequest($symbol, $freq);
+ $request = $this->companyEbitEstimatesRequest($symbol, $freq);
try {
$options = $this->createHttpClientOption();
@@ -2794,20 +2818,20 @@ public function companyEbitdaEstimatesWithHttpInfo($symbol, $freq = null)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\EbitdaEstimates' === '\SplFileObject') {
+ if ('\Finnhub\Model\EbitEstimates' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\EbitdaEstimates', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\EbitEstimates', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\EbitdaEstimates';
+ $returnType = '\Finnhub\Model\EbitEstimates';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -2825,7 +2849,7 @@ public function companyEbitdaEstimatesWithHttpInfo($symbol, $freq = null)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\EbitdaEstimates',
+ '\Finnhub\Model\EbitEstimates',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -2836,9 +2860,9 @@ public function companyEbitdaEstimatesWithHttpInfo($symbol, $freq = null)
}
/**
- * Operation companyEbitdaEstimatesAsync
+ * Operation companyEbitEstimatesAsync
*
- * EBITDA Estimates
+ * EBIT Estimates
*
* @param string $symbol Symbol of the company: AAPL. (required)
* @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
@@ -2846,9 +2870,9 @@ public function companyEbitdaEstimatesWithHttpInfo($symbol, $freq = null)
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyEbitdaEstimatesAsync($symbol, $freq = null)
+ public function companyEbitEstimatesAsync($symbol, $freq = null)
{
- return $this->companyEbitdaEstimatesAsyncWithHttpInfo($symbol, $freq)
+ return $this->companyEbitEstimatesAsyncWithHttpInfo($symbol, $freq)
->then(
function ($response) {
return $response[0];
@@ -2857,9 +2881,9 @@ function ($response) {
}
/**
- * Operation companyEbitdaEstimatesAsyncWithHttpInfo
+ * Operation companyEbitEstimatesAsyncWithHttpInfo
*
- * EBITDA Estimates
+ * EBIT Estimates
*
* @param string $symbol Symbol of the company: AAPL. (required)
* @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
@@ -2867,10 +2891,10 @@ function ($response) {
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyEbitdaEstimatesAsyncWithHttpInfo($symbol, $freq = null)
+ public function companyEbitEstimatesAsyncWithHttpInfo($symbol, $freq = null)
{
- $returnType = '\Finnhub\Model\EbitdaEstimates';
- $request = $this->companyEbitdaEstimatesRequest($symbol, $freq);
+ $returnType = '\Finnhub\Model\EbitEstimates';
+ $request = $this->companyEbitEstimatesRequest($symbol, $freq);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -2906,7 +2930,7 @@ function ($exception) {
}
/**
- * Create request for operation 'companyEbitdaEstimates'
+ * Create request for operation 'companyEbitEstimates'
*
* @param string $symbol Symbol of the company: AAPL. (required)
* @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
@@ -2914,16 +2938,16 @@ function ($exception) {
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function companyEbitdaEstimatesRequest($symbol, $freq = null)
+ public function companyEbitEstimatesRequest($symbol, $freq = null)
{
// verify the required parameter 'symbol' is set
if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling companyEbitdaEstimates'
+ 'Missing the required parameter $symbol when calling companyEbitEstimates'
);
}
- $resourcePath = '/stock/ebitda-estimate';
+ $resourcePath = '/stock/ebit-estimate';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -3011,38 +3035,38 @@ public function companyEbitdaEstimatesRequest($symbol, $freq = null)
}
/**
- * Operation companyEpsEstimates
+ * Operation companyEbitdaEstimates
*
- * Earnings Estimates
+ * EBITDA Estimates
*
* @param string $symbol Symbol of the company: AAPL. (required)
* @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\EarningsEstimates
+ * @return \Finnhub\Model\EbitdaEstimates
*/
- public function companyEpsEstimates($symbol, $freq = null)
+ public function companyEbitdaEstimates($symbol, $freq = null)
{
- list($response) = $this->companyEpsEstimatesWithHttpInfo($symbol, $freq);
+ list($response) = $this->companyEbitdaEstimatesWithHttpInfo($symbol, $freq);
return $response;
}
/**
- * Operation companyEpsEstimatesWithHttpInfo
+ * Operation companyEbitdaEstimatesWithHttpInfo
*
- * Earnings Estimates
+ * EBITDA Estimates
*
* @param string $symbol Symbol of the company: AAPL. (required)
* @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\EarningsEstimates, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\EbitdaEstimates, HTTP status code, HTTP response headers (array of strings)
*/
- public function companyEpsEstimatesWithHttpInfo($symbol, $freq = null)
+ public function companyEbitdaEstimatesWithHttpInfo($symbol, $freq = null)
{
- $request = $this->companyEpsEstimatesRequest($symbol, $freq);
+ $request = $this->companyEbitdaEstimatesRequest($symbol, $freq);
try {
$options = $this->createHttpClientOption();
@@ -3074,20 +3098,20 @@ public function companyEpsEstimatesWithHttpInfo($symbol, $freq = null)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\EarningsEstimates' === '\SplFileObject') {
+ if ('\Finnhub\Model\EbitdaEstimates' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\EarningsEstimates', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\EbitdaEstimates', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\EarningsEstimates';
+ $returnType = '\Finnhub\Model\EbitdaEstimates';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -3105,7 +3129,7 @@ public function companyEpsEstimatesWithHttpInfo($symbol, $freq = null)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\EarningsEstimates',
+ '\Finnhub\Model\EbitdaEstimates',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -3116,9 +3140,9 @@ public function companyEpsEstimatesWithHttpInfo($symbol, $freq = null)
}
/**
- * Operation companyEpsEstimatesAsync
+ * Operation companyEbitdaEstimatesAsync
*
- * Earnings Estimates
+ * EBITDA Estimates
*
* @param string $symbol Symbol of the company: AAPL. (required)
* @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
@@ -3126,9 +3150,9 @@ public function companyEpsEstimatesWithHttpInfo($symbol, $freq = null)
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyEpsEstimatesAsync($symbol, $freq = null)
+ public function companyEbitdaEstimatesAsync($symbol, $freq = null)
{
- return $this->companyEpsEstimatesAsyncWithHttpInfo($symbol, $freq)
+ return $this->companyEbitdaEstimatesAsyncWithHttpInfo($symbol, $freq)
->then(
function ($response) {
return $response[0];
@@ -3137,9 +3161,9 @@ function ($response) {
}
/**
- * Operation companyEpsEstimatesAsyncWithHttpInfo
+ * Operation companyEbitdaEstimatesAsyncWithHttpInfo
*
- * Earnings Estimates
+ * EBITDA Estimates
*
* @param string $symbol Symbol of the company: AAPL. (required)
* @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
@@ -3147,10 +3171,10 @@ function ($response) {
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyEpsEstimatesAsyncWithHttpInfo($symbol, $freq = null)
+ public function companyEbitdaEstimatesAsyncWithHttpInfo($symbol, $freq = null)
{
- $returnType = '\Finnhub\Model\EarningsEstimates';
- $request = $this->companyEpsEstimatesRequest($symbol, $freq);
+ $returnType = '\Finnhub\Model\EbitdaEstimates';
+ $request = $this->companyEbitdaEstimatesRequest($symbol, $freq);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -3186,7 +3210,7 @@ function ($exception) {
}
/**
- * Create request for operation 'companyEpsEstimates'
+ * Create request for operation 'companyEbitdaEstimates'
*
* @param string $symbol Symbol of the company: AAPL. (required)
* @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
@@ -3194,16 +3218,16 @@ function ($exception) {
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function companyEpsEstimatesRequest($symbol, $freq = null)
+ public function companyEbitdaEstimatesRequest($symbol, $freq = null)
{
// verify the required parameter 'symbol' is set
if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling companyEpsEstimates'
+ 'Missing the required parameter $symbol when calling companyEbitdaEstimates'
);
}
- $resourcePath = '/stock/eps-estimate';
+ $resourcePath = '/stock/ebitda-estimate';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -3291,36 +3315,38 @@ public function companyEpsEstimatesRequest($symbol, $freq = null)
}
/**
- * Operation companyEsgScore
+ * Operation companyEpsEstimates
*
- * Company ESG Scores
+ * Earnings Estimates
*
- * @param string $symbol Symbol. (required)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\CompanyESG
+ * @return \Finnhub\Model\EarningsEstimates
*/
- public function companyEsgScore($symbol)
+ public function companyEpsEstimates($symbol, $freq = null)
{
- list($response) = $this->companyEsgScoreWithHttpInfo($symbol);
+ list($response) = $this->companyEpsEstimatesWithHttpInfo($symbol, $freq);
return $response;
}
/**
- * Operation companyEsgScoreWithHttpInfo
+ * Operation companyEpsEstimatesWithHttpInfo
*
- * Company ESG Scores
+ * Earnings Estimates
*
- * @param string $symbol Symbol. (required)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\CompanyESG, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\EarningsEstimates, HTTP status code, HTTP response headers (array of strings)
*/
- public function companyEsgScoreWithHttpInfo($symbol)
+ public function companyEpsEstimatesWithHttpInfo($symbol, $freq = null)
{
- $request = $this->companyEsgScoreRequest($symbol);
+ $request = $this->companyEpsEstimatesRequest($symbol, $freq);
try {
$options = $this->createHttpClientOption();
@@ -3352,20 +3378,20 @@ public function companyEsgScoreWithHttpInfo($symbol)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\CompanyESG' === '\SplFileObject') {
+ if ('\Finnhub\Model\EarningsEstimates' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\CompanyESG', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\EarningsEstimates', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\CompanyESG';
+ $returnType = '\Finnhub\Model\EarningsEstimates';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -3383,7 +3409,7 @@ public function companyEsgScoreWithHttpInfo($symbol)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\CompanyESG',
+ '\Finnhub\Model\EarningsEstimates',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -3394,18 +3420,19 @@ public function companyEsgScoreWithHttpInfo($symbol)
}
/**
- * Operation companyEsgScoreAsync
+ * Operation companyEpsEstimatesAsync
*
- * Company ESG Scores
+ * Earnings Estimates
*
- * @param string $symbol Symbol. (required)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyEsgScoreAsync($symbol)
+ public function companyEpsEstimatesAsync($symbol, $freq = null)
{
- return $this->companyEsgScoreAsyncWithHttpInfo($symbol)
+ return $this->companyEpsEstimatesAsyncWithHttpInfo($symbol, $freq)
->then(
function ($response) {
return $response[0];
@@ -3414,19 +3441,20 @@ function ($response) {
}
/**
- * Operation companyEsgScoreAsyncWithHttpInfo
+ * Operation companyEpsEstimatesAsyncWithHttpInfo
*
- * Company ESG Scores
+ * Earnings Estimates
*
- * @param string $symbol Symbol. (required)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyEsgScoreAsyncWithHttpInfo($symbol)
+ public function companyEpsEstimatesAsyncWithHttpInfo($symbol, $freq = null)
{
- $returnType = '\Finnhub\Model\CompanyESG';
- $request = $this->companyEsgScoreRequest($symbol);
+ $returnType = '\Finnhub\Model\EarningsEstimates';
+ $request = $this->companyEpsEstimatesRequest($symbol, $freq);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -3462,23 +3490,24 @@ function ($exception) {
}
/**
- * Create request for operation 'companyEsgScore'
+ * Create request for operation 'companyEpsEstimates'
*
- * @param string $symbol Symbol. (required)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function companyEsgScoreRequest($symbol)
+ public function companyEpsEstimatesRequest($symbol, $freq = null)
{
// verify the required parameter 'symbol' is set
if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling companyEsgScore'
+ 'Missing the required parameter $symbol when calling companyEpsEstimates'
);
}
- $resourcePath = '/stock/esg';
+ $resourcePath = '/stock/eps-estimate';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -3492,6 +3521,13 @@ public function companyEsgScoreRequest($symbol)
if ($symbol !== null) {
$queryParams['symbol'] = $symbol;
}
+ // query params
+ if (is_array($freq)) {
+ $freq = ObjectSerializer::serializeCollection($freq, '', true);
+ }
+ if ($freq !== null) {
+ $queryParams['freq'] = $freq;
+ }
@@ -3559,36 +3595,36 @@ public function companyEsgScoreRequest($symbol)
}
/**
- * Operation companyExecutive
+ * Operation companyEsgScore
*
- * Company Executive
+ * Company ESG Scores
*
- * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $symbol Symbol. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\CompanyExecutive
+ * @return \Finnhub\Model\CompanyESG
*/
- public function companyExecutive($symbol)
+ public function companyEsgScore($symbol)
{
- list($response) = $this->companyExecutiveWithHttpInfo($symbol);
+ list($response) = $this->companyEsgScoreWithHttpInfo($symbol);
return $response;
}
/**
- * Operation companyExecutiveWithHttpInfo
+ * Operation companyEsgScoreWithHttpInfo
*
- * Company Executive
+ * Company ESG Scores
*
- * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $symbol Symbol. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\CompanyExecutive, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\CompanyESG, HTTP status code, HTTP response headers (array of strings)
*/
- public function companyExecutiveWithHttpInfo($symbol)
+ public function companyEsgScoreWithHttpInfo($symbol)
{
- $request = $this->companyExecutiveRequest($symbol);
+ $request = $this->companyEsgScoreRequest($symbol);
try {
$options = $this->createHttpClientOption();
@@ -3620,20 +3656,20 @@ public function companyExecutiveWithHttpInfo($symbol)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\CompanyExecutive' === '\SplFileObject') {
+ if ('\Finnhub\Model\CompanyESG' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\CompanyExecutive', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\CompanyESG', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\CompanyExecutive';
+ $returnType = '\Finnhub\Model\CompanyESG';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -3651,7 +3687,7 @@ public function companyExecutiveWithHttpInfo($symbol)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\CompanyExecutive',
+ '\Finnhub\Model\CompanyESG',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -3662,18 +3698,18 @@ public function companyExecutiveWithHttpInfo($symbol)
}
/**
- * Operation companyExecutiveAsync
+ * Operation companyEsgScoreAsync
*
- * Company Executive
+ * Company ESG Scores
*
- * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $symbol Symbol. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyExecutiveAsync($symbol)
+ public function companyEsgScoreAsync($symbol)
{
- return $this->companyExecutiveAsyncWithHttpInfo($symbol)
+ return $this->companyEsgScoreAsyncWithHttpInfo($symbol)
->then(
function ($response) {
return $response[0];
@@ -3682,19 +3718,19 @@ function ($response) {
}
/**
- * Operation companyExecutiveAsyncWithHttpInfo
+ * Operation companyEsgScoreAsyncWithHttpInfo
*
- * Company Executive
+ * Company ESG Scores
*
- * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $symbol Symbol. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyExecutiveAsyncWithHttpInfo($symbol)
+ public function companyEsgScoreAsyncWithHttpInfo($symbol)
{
- $returnType = '\Finnhub\Model\CompanyExecutive';
- $request = $this->companyExecutiveRequest($symbol);
+ $returnType = '\Finnhub\Model\CompanyESG';
+ $request = $this->companyEsgScoreRequest($symbol);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -3730,23 +3766,23 @@ function ($exception) {
}
/**
- * Create request for operation 'companyExecutive'
+ * Create request for operation 'companyEsgScore'
*
- * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $symbol Symbol. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function companyExecutiveRequest($symbol)
+ public function companyEsgScoreRequest($symbol)
{
// verify the required parameter 'symbol' is set
if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling companyExecutive'
+ 'Missing the required parameter $symbol when calling companyEsgScore'
);
}
- $resourcePath = '/stock/executive';
+ $resourcePath = '/stock/esg';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -3827,40 +3863,36 @@ public function companyExecutiveRequest($symbol)
}
/**
- * Operation companyNews
+ * Operation companyExecutive
*
- * Company News
+ * Company Executive
*
- * @param string $symbol Company symbol. (required)
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
+ * @param string $symbol Symbol of the company: AAPL. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\CompanyNews[]
+ * @return \Finnhub\Model\CompanyExecutive
*/
- public function companyNews($symbol, $from, $to)
+ public function companyExecutive($symbol)
{
- list($response) = $this->companyNewsWithHttpInfo($symbol, $from, $to);
+ list($response) = $this->companyExecutiveWithHttpInfo($symbol);
return $response;
}
/**
- * Operation companyNewsWithHttpInfo
+ * Operation companyExecutiveWithHttpInfo
*
- * Company News
+ * Company Executive
*
- * @param string $symbol Company symbol. (required)
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
+ * @param string $symbol Symbol of the company: AAPL. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\CompanyNews[], HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\CompanyExecutive, HTTP status code, HTTP response headers (array of strings)
*/
- public function companyNewsWithHttpInfo($symbol, $from, $to)
+ public function companyExecutiveWithHttpInfo($symbol)
{
- $request = $this->companyNewsRequest($symbol, $from, $to);
+ $request = $this->companyExecutiveRequest($symbol);
try {
$options = $this->createHttpClientOption();
@@ -3892,20 +3924,20 @@ public function companyNewsWithHttpInfo($symbol, $from, $to)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\CompanyNews[]' === '\SplFileObject') {
+ if ('\Finnhub\Model\CompanyExecutive' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\CompanyNews[]', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\CompanyExecutive', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\CompanyNews[]';
+ $returnType = '\Finnhub\Model\CompanyExecutive';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -3923,7 +3955,7 @@ public function companyNewsWithHttpInfo($symbol, $from, $to)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\CompanyNews[]',
+ '\Finnhub\Model\CompanyExecutive',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -3934,20 +3966,18 @@ public function companyNewsWithHttpInfo($symbol, $from, $to)
}
/**
- * Operation companyNewsAsync
+ * Operation companyExecutiveAsync
*
- * Company News
+ * Company Executive
*
- * @param string $symbol Company symbol. (required)
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
+ * @param string $symbol Symbol of the company: AAPL. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyNewsAsync($symbol, $from, $to)
+ public function companyExecutiveAsync($symbol)
{
- return $this->companyNewsAsyncWithHttpInfo($symbol, $from, $to)
+ return $this->companyExecutiveAsyncWithHttpInfo($symbol)
->then(
function ($response) {
return $response[0];
@@ -3956,21 +3986,19 @@ function ($response) {
}
/**
- * Operation companyNewsAsyncWithHttpInfo
+ * Operation companyExecutiveAsyncWithHttpInfo
*
- * Company News
+ * Company Executive
*
- * @param string $symbol Company symbol. (required)
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
+ * @param string $symbol Symbol of the company: AAPL. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyNewsAsyncWithHttpInfo($symbol, $from, $to)
+ public function companyExecutiveAsyncWithHttpInfo($symbol)
{
- $returnType = '\Finnhub\Model\CompanyNews[]';
- $request = $this->companyNewsRequest($symbol, $from, $to);
+ $returnType = '\Finnhub\Model\CompanyExecutive';
+ $request = $this->companyExecutiveRequest($symbol);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -4006,37 +4034,23 @@ function ($exception) {
}
/**
- * Create request for operation 'companyNews'
+ * Create request for operation 'companyExecutive'
*
- * @param string $symbol Company symbol. (required)
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
+ * @param string $symbol Symbol of the company: AAPL. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function companyNewsRequest($symbol, $from, $to)
+ public function companyExecutiveRequest($symbol)
{
// verify the required parameter 'symbol' is set
if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling companyNews'
- );
- }
- // verify the required parameter 'from' is set
- if ($from === null || (is_array($from) && count($from) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $from when calling companyNews'
- );
- }
- // verify the required parameter 'to' is set
- if ($to === null || (is_array($to) && count($to) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $to when calling companyNews'
+ 'Missing the required parameter $symbol when calling companyExecutive'
);
}
- $resourcePath = '/company-news';
+ $resourcePath = '/stock/executive';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -4050,20 +4064,6 @@ public function companyNewsRequest($symbol, $from, $to)
if ($symbol !== null) {
$queryParams['symbol'] = $symbol;
}
- // query params
- if (is_array($from)) {
- $from = ObjectSerializer::serializeCollection($from, '', true);
- }
- if ($from !== null) {
- $queryParams['from'] = $from;
- }
- // query params
- if (is_array($to)) {
- $to = ObjectSerializer::serializeCollection($to, '', true);
- }
- if ($to !== null) {
- $queryParams['to'] = $to;
- }
@@ -4131,38 +4131,36 @@ public function companyNewsRequest($symbol, $from, $to)
}
/**
- * Operation companyPeers
+ * Operation companyHistoricalEsgScore
*
- * Peers
+ * Historical ESG Scores
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $grouping Specify the grouping criteria for choosing peers.Supporter values: <code>sector</code>, <code>industry</code>, <code>subIndustry</code>. Default to <code>subIndustry</code>. (optional)
+ * @param string $symbol Symbol. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return string[]
+ * @return \Finnhub\Model\HistoricalCompanyESG
*/
- public function companyPeers($symbol, $grouping = null)
+ public function companyHistoricalEsgScore($symbol)
{
- list($response) = $this->companyPeersWithHttpInfo($symbol, $grouping);
+ list($response) = $this->companyHistoricalEsgScoreWithHttpInfo($symbol);
return $response;
}
/**
- * Operation companyPeersWithHttpInfo
+ * Operation companyHistoricalEsgScoreWithHttpInfo
*
- * Peers
+ * Historical ESG Scores
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $grouping Specify the grouping criteria for choosing peers.Supporter values: <code>sector</code>, <code>industry</code>, <code>subIndustry</code>. Default to <code>subIndustry</code>. (optional)
+ * @param string $symbol Symbol. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of string[], HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\HistoricalCompanyESG, HTTP status code, HTTP response headers (array of strings)
*/
- public function companyPeersWithHttpInfo($symbol, $grouping = null)
+ public function companyHistoricalEsgScoreWithHttpInfo($symbol)
{
- $request = $this->companyPeersRequest($symbol, $grouping);
+ $request = $this->companyHistoricalEsgScoreRequest($symbol);
try {
$options = $this->createHttpClientOption();
@@ -4194,20 +4192,20 @@ public function companyPeersWithHttpInfo($symbol, $grouping = null)
switch($statusCode) {
case 200:
- if ('string[]' === '\SplFileObject') {
+ if ('\Finnhub\Model\HistoricalCompanyESG' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, 'string[]', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\HistoricalCompanyESG', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = 'string[]';
+ $returnType = '\Finnhub\Model\HistoricalCompanyESG';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -4225,7 +4223,7 @@ public function companyPeersWithHttpInfo($symbol, $grouping = null)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- 'string[]',
+ '\Finnhub\Model\HistoricalCompanyESG',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -4236,19 +4234,18 @@ public function companyPeersWithHttpInfo($symbol, $grouping = null)
}
/**
- * Operation companyPeersAsync
+ * Operation companyHistoricalEsgScoreAsync
*
- * Peers
+ * Historical ESG Scores
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $grouping Specify the grouping criteria for choosing peers.Supporter values: <code>sector</code>, <code>industry</code>, <code>subIndustry</code>. Default to <code>subIndustry</code>. (optional)
+ * @param string $symbol Symbol. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyPeersAsync($symbol, $grouping = null)
+ public function companyHistoricalEsgScoreAsync($symbol)
{
- return $this->companyPeersAsyncWithHttpInfo($symbol, $grouping)
+ return $this->companyHistoricalEsgScoreAsyncWithHttpInfo($symbol)
->then(
function ($response) {
return $response[0];
@@ -4257,20 +4254,19 @@ function ($response) {
}
/**
- * Operation companyPeersAsyncWithHttpInfo
+ * Operation companyHistoricalEsgScoreAsyncWithHttpInfo
*
- * Peers
+ * Historical ESG Scores
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $grouping Specify the grouping criteria for choosing peers.Supporter values: <code>sector</code>, <code>industry</code>, <code>subIndustry</code>. Default to <code>subIndustry</code>. (optional)
+ * @param string $symbol Symbol. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyPeersAsyncWithHttpInfo($symbol, $grouping = null)
+ public function companyHistoricalEsgScoreAsyncWithHttpInfo($symbol)
{
- $returnType = 'string[]';
- $request = $this->companyPeersRequest($symbol, $grouping);
+ $returnType = '\Finnhub\Model\HistoricalCompanyESG';
+ $request = $this->companyHistoricalEsgScoreRequest($symbol);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -4306,24 +4302,23 @@ function ($exception) {
}
/**
- * Create request for operation 'companyPeers'
+ * Create request for operation 'companyHistoricalEsgScore'
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $grouping Specify the grouping criteria for choosing peers.Supporter values: <code>sector</code>, <code>industry</code>, <code>subIndustry</code>. Default to <code>subIndustry</code>. (optional)
+ * @param string $symbol Symbol. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function companyPeersRequest($symbol, $grouping = null)
+ public function companyHistoricalEsgScoreRequest($symbol)
{
// verify the required parameter 'symbol' is set
if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling companyPeers'
+ 'Missing the required parameter $symbol when calling companyHistoricalEsgScore'
);
}
- $resourcePath = '/stock/peers';
+ $resourcePath = '/stock/historical-esg';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -4337,13 +4332,6 @@ public function companyPeersRequest($symbol, $grouping = null)
if ($symbol !== null) {
$queryParams['symbol'] = $symbol;
}
- // query params
- if (is_array($grouping)) {
- $grouping = ObjectSerializer::serializeCollection($grouping, '', true);
- }
- if ($grouping !== null) {
- $queryParams['grouping'] = $grouping;
- }
@@ -4411,40 +4399,40 @@ public function companyPeersRequest($symbol, $grouping = null)
}
/**
- * Operation companyProfile
+ * Operation companyNews
*
- * Company Profile
+ * Company News
*
- * @param string $symbol Symbol of the company: AAPL e.g. (optional)
- * @param string $isin ISIN (optional)
- * @param string $cusip CUSIP (optional)
+ * @param string $symbol Company symbol. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\CompanyProfile
+ * @return \Finnhub\Model\CompanyNews[]
*/
- public function companyProfile($symbol = null, $isin = null, $cusip = null)
+ public function companyNews($symbol, $from, $to)
{
- list($response) = $this->companyProfileWithHttpInfo($symbol, $isin, $cusip);
+ list($response) = $this->companyNewsWithHttpInfo($symbol, $from, $to);
return $response;
}
/**
- * Operation companyProfileWithHttpInfo
+ * Operation companyNewsWithHttpInfo
*
- * Company Profile
+ * Company News
*
- * @param string $symbol Symbol of the company: AAPL e.g. (optional)
- * @param string $isin ISIN (optional)
- * @param string $cusip CUSIP (optional)
+ * @param string $symbol Company symbol. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\CompanyProfile, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\CompanyNews[], HTTP status code, HTTP response headers (array of strings)
*/
- public function companyProfileWithHttpInfo($symbol = null, $isin = null, $cusip = null)
+ public function companyNewsWithHttpInfo($symbol, $from, $to)
{
- $request = $this->companyProfileRequest($symbol, $isin, $cusip);
+ $request = $this->companyNewsRequest($symbol, $from, $to);
try {
$options = $this->createHttpClientOption();
@@ -4476,20 +4464,20 @@ public function companyProfileWithHttpInfo($symbol = null, $isin = null, $cusip
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\CompanyProfile' === '\SplFileObject') {
+ if ('\Finnhub\Model\CompanyNews[]' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\CompanyProfile', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\CompanyNews[]', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\CompanyProfile';
+ $returnType = '\Finnhub\Model\CompanyNews[]';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -4507,7 +4495,7 @@ public function companyProfileWithHttpInfo($symbol = null, $isin = null, $cusip
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\CompanyProfile',
+ '\Finnhub\Model\CompanyNews[]',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -4518,20 +4506,20 @@ public function companyProfileWithHttpInfo($symbol = null, $isin = null, $cusip
}
/**
- * Operation companyProfileAsync
+ * Operation companyNewsAsync
*
- * Company Profile
+ * Company News
*
- * @param string $symbol Symbol of the company: AAPL e.g. (optional)
- * @param string $isin ISIN (optional)
- * @param string $cusip CUSIP (optional)
+ * @param string $symbol Company symbol. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyProfileAsync($symbol = null, $isin = null, $cusip = null)
+ public function companyNewsAsync($symbol, $from, $to)
{
- return $this->companyProfileAsyncWithHttpInfo($symbol, $isin, $cusip)
+ return $this->companyNewsAsyncWithHttpInfo($symbol, $from, $to)
->then(
function ($response) {
return $response[0];
@@ -4540,21 +4528,21 @@ function ($response) {
}
/**
- * Operation companyProfileAsyncWithHttpInfo
+ * Operation companyNewsAsyncWithHttpInfo
*
- * Company Profile
+ * Company News
*
- * @param string $symbol Symbol of the company: AAPL e.g. (optional)
- * @param string $isin ISIN (optional)
- * @param string $cusip CUSIP (optional)
+ * @param string $symbol Company symbol. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyProfileAsyncWithHttpInfo($symbol = null, $isin = null, $cusip = null)
+ public function companyNewsAsyncWithHttpInfo($symbol, $from, $to)
{
- $returnType = '\Finnhub\Model\CompanyProfile';
- $request = $this->companyProfileRequest($symbol, $isin, $cusip);
+ $returnType = '\Finnhub\Model\CompanyNews[]';
+ $request = $this->companyNewsRequest($symbol, $from, $to);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -4590,19 +4578,37 @@ function ($exception) {
}
/**
- * Create request for operation 'companyProfile'
+ * Create request for operation 'companyNews'
*
- * @param string $symbol Symbol of the company: AAPL e.g. (optional)
- * @param string $isin ISIN (optional)
- * @param string $cusip CUSIP (optional)
+ * @param string $symbol Company symbol. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function companyProfileRequest($symbol = null, $isin = null, $cusip = null)
+ public function companyNewsRequest($symbol, $from, $to)
{
+ // verify the required parameter 'symbol' is set
+ if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $symbol when calling companyNews'
+ );
+ }
+ // verify the required parameter 'from' is set
+ if ($from === null || (is_array($from) && count($from) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $from when calling companyNews'
+ );
+ }
+ // verify the required parameter 'to' is set
+ if ($to === null || (is_array($to) && count($to) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $to when calling companyNews'
+ );
+ }
- $resourcePath = '/stock/profile';
+ $resourcePath = '/company-news';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -4617,18 +4623,18 @@ public function companyProfileRequest($symbol = null, $isin = null, $cusip = nul
$queryParams['symbol'] = $symbol;
}
// query params
- if (is_array($isin)) {
- $isin = ObjectSerializer::serializeCollection($isin, '', true);
+ if (is_array($from)) {
+ $from = ObjectSerializer::serializeCollection($from, '', true);
}
- if ($isin !== null) {
- $queryParams['isin'] = $isin;
+ if ($from !== null) {
+ $queryParams['from'] = $from;
}
// query params
- if (is_array($cusip)) {
- $cusip = ObjectSerializer::serializeCollection($cusip, '', true);
+ if (is_array($to)) {
+ $to = ObjectSerializer::serializeCollection($to, '', true);
}
- if ($cusip !== null) {
- $queryParams['cusip'] = $cusip;
+ if ($to !== null) {
+ $queryParams['to'] = $to;
}
@@ -4697,40 +4703,38 @@ public function companyProfileRequest($symbol = null, $isin = null, $cusip = nul
}
/**
- * Operation companyProfile2
+ * Operation companyPeers
*
- * Company Profile 2
+ * Peers
*
- * @param string $symbol Symbol of the company: AAPL e.g. (optional)
- * @param string $isin ISIN (optional)
- * @param string $cusip CUSIP (optional)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $grouping Specify the grouping criteria for choosing peers.Supporter values: <code>sector</code>, <code>industry</code>, <code>subIndustry</code>. Default to <code>subIndustry</code>. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\CompanyProfile2
+ * @return string[]
*/
- public function companyProfile2($symbol = null, $isin = null, $cusip = null)
+ public function companyPeers($symbol, $grouping = null)
{
- list($response) = $this->companyProfile2WithHttpInfo($symbol, $isin, $cusip);
+ list($response) = $this->companyPeersWithHttpInfo($symbol, $grouping);
return $response;
}
/**
- * Operation companyProfile2WithHttpInfo
+ * Operation companyPeersWithHttpInfo
*
- * Company Profile 2
+ * Peers
*
- * @param string $symbol Symbol of the company: AAPL e.g. (optional)
- * @param string $isin ISIN (optional)
- * @param string $cusip CUSIP (optional)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $grouping Specify the grouping criteria for choosing peers.Supporter values: <code>sector</code>, <code>industry</code>, <code>subIndustry</code>. Default to <code>subIndustry</code>. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\CompanyProfile2, HTTP status code, HTTP response headers (array of strings)
+ * @return array of string[], HTTP status code, HTTP response headers (array of strings)
*/
- public function companyProfile2WithHttpInfo($symbol = null, $isin = null, $cusip = null)
+ public function companyPeersWithHttpInfo($symbol, $grouping = null)
{
- $request = $this->companyProfile2Request($symbol, $isin, $cusip);
+ $request = $this->companyPeersRequest($symbol, $grouping);
try {
$options = $this->createHttpClientOption();
@@ -4762,20 +4766,20 @@ public function companyProfile2WithHttpInfo($symbol = null, $isin = null, $cusip
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\CompanyProfile2' === '\SplFileObject') {
+ if ('string[]' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\CompanyProfile2', []),
+ ObjectSerializer::deserialize($content, 'string[]', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\CompanyProfile2';
+ $returnType = 'string[]';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -4793,7 +4797,7 @@ public function companyProfile2WithHttpInfo($symbol = null, $isin = null, $cusip
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\CompanyProfile2',
+ 'string[]',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -4804,20 +4808,19 @@ public function companyProfile2WithHttpInfo($symbol = null, $isin = null, $cusip
}
/**
- * Operation companyProfile2Async
+ * Operation companyPeersAsync
*
- * Company Profile 2
+ * Peers
*
- * @param string $symbol Symbol of the company: AAPL e.g. (optional)
- * @param string $isin ISIN (optional)
- * @param string $cusip CUSIP (optional)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $grouping Specify the grouping criteria for choosing peers.Supporter values: <code>sector</code>, <code>industry</code>, <code>subIndustry</code>. Default to <code>subIndustry</code>. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyProfile2Async($symbol = null, $isin = null, $cusip = null)
+ public function companyPeersAsync($symbol, $grouping = null)
{
- return $this->companyProfile2AsyncWithHttpInfo($symbol, $isin, $cusip)
+ return $this->companyPeersAsyncWithHttpInfo($symbol, $grouping)
->then(
function ($response) {
return $response[0];
@@ -4826,21 +4829,20 @@ function ($response) {
}
/**
- * Operation companyProfile2AsyncWithHttpInfo
+ * Operation companyPeersAsyncWithHttpInfo
*
- * Company Profile 2
+ * Peers
*
- * @param string $symbol Symbol of the company: AAPL e.g. (optional)
- * @param string $isin ISIN (optional)
- * @param string $cusip CUSIP (optional)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $grouping Specify the grouping criteria for choosing peers.Supporter values: <code>sector</code>, <code>industry</code>, <code>subIndustry</code>. Default to <code>subIndustry</code>. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyProfile2AsyncWithHttpInfo($symbol = null, $isin = null, $cusip = null)
+ public function companyPeersAsyncWithHttpInfo($symbol, $grouping = null)
{
- $returnType = '\Finnhub\Model\CompanyProfile2';
- $request = $this->companyProfile2Request($symbol, $isin, $cusip);
+ $returnType = 'string[]';
+ $request = $this->companyPeersRequest($symbol, $grouping);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -4876,19 +4878,24 @@ function ($exception) {
}
/**
- * Create request for operation 'companyProfile2'
+ * Create request for operation 'companyPeers'
*
- * @param string $symbol Symbol of the company: AAPL e.g. (optional)
- * @param string $isin ISIN (optional)
- * @param string $cusip CUSIP (optional)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $grouping Specify the grouping criteria for choosing peers.Supporter values: <code>sector</code>, <code>industry</code>, <code>subIndustry</code>. Default to <code>subIndustry</code>. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function companyProfile2Request($symbol = null, $isin = null, $cusip = null)
+ public function companyPeersRequest($symbol, $grouping = null)
{
+ // verify the required parameter 'symbol' is set
+ if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $symbol when calling companyPeers'
+ );
+ }
- $resourcePath = '/stock/profile2';
+ $resourcePath = '/stock/peers';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -4903,18 +4910,11 @@ public function companyProfile2Request($symbol = null, $isin = null, $cusip = nu
$queryParams['symbol'] = $symbol;
}
// query params
- if (is_array($isin)) {
- $isin = ObjectSerializer::serializeCollection($isin, '', true);
- }
- if ($isin !== null) {
- $queryParams['isin'] = $isin;
- }
- // query params
- if (is_array($cusip)) {
- $cusip = ObjectSerializer::serializeCollection($cusip, '', true);
+ if (is_array($grouping)) {
+ $grouping = ObjectSerializer::serializeCollection($grouping, '', true);
}
- if ($cusip !== null) {
- $queryParams['cusip'] = $cusip;
+ if ($grouping !== null) {
+ $queryParams['grouping'] = $grouping;
}
@@ -4983,38 +4983,40 @@ public function companyProfile2Request($symbol = null, $isin = null, $cusip = nu
}
/**
- * Operation companyRevenueEstimates
+ * Operation companyProfile
*
- * Revenue Estimates
+ * Company Profile
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
+ * @param string $symbol Symbol of the company: AAPL e.g. (optional)
+ * @param string $isin ISIN (optional)
+ * @param string $cusip CUSIP (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\RevenueEstimates
+ * @return \Finnhub\Model\CompanyProfile
*/
- public function companyRevenueEstimates($symbol, $freq = null)
+ public function companyProfile($symbol = null, $isin = null, $cusip = null)
{
- list($response) = $this->companyRevenueEstimatesWithHttpInfo($symbol, $freq);
+ list($response) = $this->companyProfileWithHttpInfo($symbol, $isin, $cusip);
return $response;
}
/**
- * Operation companyRevenueEstimatesWithHttpInfo
+ * Operation companyProfileWithHttpInfo
*
- * Revenue Estimates
+ * Company Profile
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
+ * @param string $symbol Symbol of the company: AAPL e.g. (optional)
+ * @param string $isin ISIN (optional)
+ * @param string $cusip CUSIP (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\RevenueEstimates, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\CompanyProfile, HTTP status code, HTTP response headers (array of strings)
*/
- public function companyRevenueEstimatesWithHttpInfo($symbol, $freq = null)
+ public function companyProfileWithHttpInfo($symbol = null, $isin = null, $cusip = null)
{
- $request = $this->companyRevenueEstimatesRequest($symbol, $freq);
+ $request = $this->companyProfileRequest($symbol, $isin, $cusip);
try {
$options = $this->createHttpClientOption();
@@ -5046,20 +5048,20 @@ public function companyRevenueEstimatesWithHttpInfo($symbol, $freq = null)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\RevenueEstimates' === '\SplFileObject') {
+ if ('\Finnhub\Model\CompanyProfile' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\RevenueEstimates', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\CompanyProfile', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\RevenueEstimates';
+ $returnType = '\Finnhub\Model\CompanyProfile';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -5077,7 +5079,7 @@ public function companyRevenueEstimatesWithHttpInfo($symbol, $freq = null)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\RevenueEstimates',
+ '\Finnhub\Model\CompanyProfile',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -5088,19 +5090,20 @@ public function companyRevenueEstimatesWithHttpInfo($symbol, $freq = null)
}
/**
- * Operation companyRevenueEstimatesAsync
+ * Operation companyProfileAsync
*
- * Revenue Estimates
+ * Company Profile
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
+ * @param string $symbol Symbol of the company: AAPL e.g. (optional)
+ * @param string $isin ISIN (optional)
+ * @param string $cusip CUSIP (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyRevenueEstimatesAsync($symbol, $freq = null)
+ public function companyProfileAsync($symbol = null, $isin = null, $cusip = null)
{
- return $this->companyRevenueEstimatesAsyncWithHttpInfo($symbol, $freq)
+ return $this->companyProfileAsyncWithHttpInfo($symbol, $isin, $cusip)
->then(
function ($response) {
return $response[0];
@@ -5109,20 +5112,21 @@ function ($response) {
}
/**
- * Operation companyRevenueEstimatesAsyncWithHttpInfo
+ * Operation companyProfileAsyncWithHttpInfo
*
- * Revenue Estimates
+ * Company Profile
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
+ * @param string $symbol Symbol of the company: AAPL e.g. (optional)
+ * @param string $isin ISIN (optional)
+ * @param string $cusip CUSIP (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function companyRevenueEstimatesAsyncWithHttpInfo($symbol, $freq = null)
+ public function companyProfileAsyncWithHttpInfo($symbol = null, $isin = null, $cusip = null)
{
- $returnType = '\Finnhub\Model\RevenueEstimates';
- $request = $this->companyRevenueEstimatesRequest($symbol, $freq);
+ $returnType = '\Finnhub\Model\CompanyProfile';
+ $request = $this->companyProfileRequest($symbol, $isin, $cusip);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -5158,24 +5162,19 @@ function ($exception) {
}
/**
- * Create request for operation 'companyRevenueEstimates'
+ * Create request for operation 'companyProfile'
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
+ * @param string $symbol Symbol of the company: AAPL e.g. (optional)
+ * @param string $isin ISIN (optional)
+ * @param string $cusip CUSIP (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function companyRevenueEstimatesRequest($symbol, $freq = null)
+ public function companyProfileRequest($symbol = null, $isin = null, $cusip = null)
{
- // verify the required parameter 'symbol' is set
- if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling companyRevenueEstimates'
- );
- }
- $resourcePath = '/stock/revenue-estimate';
+ $resourcePath = '/stock/profile';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -5190,11 +5189,18 @@ public function companyRevenueEstimatesRequest($symbol, $freq = null)
$queryParams['symbol'] = $symbol;
}
// query params
- if (is_array($freq)) {
- $freq = ObjectSerializer::serializeCollection($freq, '', true);
+ if (is_array($isin)) {
+ $isin = ObjectSerializer::serializeCollection($isin, '', true);
}
- if ($freq !== null) {
- $queryParams['freq'] = $freq;
+ if ($isin !== null) {
+ $queryParams['isin'] = $isin;
+ }
+ // query params
+ if (is_array($cusip)) {
+ $cusip = ObjectSerializer::serializeCollection($cusip, '', true);
+ }
+ if ($cusip !== null) {
+ $queryParams['cusip'] = $cusip;
}
@@ -5263,40 +5269,40 @@ public function companyRevenueEstimatesRequest($symbol, $freq = null)
}
/**
- * Operation congressionalTrading
+ * Operation companyProfile2
*
- * Congressional Trading
+ * Company Profile 2
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
+ * @param string $symbol Symbol of the company: AAPL e.g. (optional)
+ * @param string $isin ISIN (optional)
+ * @param string $cusip CUSIP (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\CongressionalTrading
+ * @return \Finnhub\Model\CompanyProfile2
*/
- public function congressionalTrading($symbol, $from, $to)
+ public function companyProfile2($symbol = null, $isin = null, $cusip = null)
{
- list($response) = $this->congressionalTradingWithHttpInfo($symbol, $from, $to);
+ list($response) = $this->companyProfile2WithHttpInfo($symbol, $isin, $cusip);
return $response;
}
/**
- * Operation congressionalTradingWithHttpInfo
+ * Operation companyProfile2WithHttpInfo
*
- * Congressional Trading
+ * Company Profile 2
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
+ * @param string $symbol Symbol of the company: AAPL e.g. (optional)
+ * @param string $isin ISIN (optional)
+ * @param string $cusip CUSIP (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\CongressionalTrading, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\CompanyProfile2, HTTP status code, HTTP response headers (array of strings)
*/
- public function congressionalTradingWithHttpInfo($symbol, $from, $to)
+ public function companyProfile2WithHttpInfo($symbol = null, $isin = null, $cusip = null)
{
- $request = $this->congressionalTradingRequest($symbol, $from, $to);
+ $request = $this->companyProfile2Request($symbol, $isin, $cusip);
try {
$options = $this->createHttpClientOption();
@@ -5328,20 +5334,20 @@ public function congressionalTradingWithHttpInfo($symbol, $from, $to)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\CongressionalTrading' === '\SplFileObject') {
+ if ('\Finnhub\Model\CompanyProfile2' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\CongressionalTrading', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\CompanyProfile2', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\CongressionalTrading';
+ $returnType = '\Finnhub\Model\CompanyProfile2';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -5359,7 +5365,7 @@ public function congressionalTradingWithHttpInfo($symbol, $from, $to)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\CongressionalTrading',
+ '\Finnhub\Model\CompanyProfile2',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -5370,20 +5376,20 @@ public function congressionalTradingWithHttpInfo($symbol, $from, $to)
}
/**
- * Operation congressionalTradingAsync
+ * Operation companyProfile2Async
*
- * Congressional Trading
+ * Company Profile 2
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
+ * @param string $symbol Symbol of the company: AAPL e.g. (optional)
+ * @param string $isin ISIN (optional)
+ * @param string $cusip CUSIP (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function congressionalTradingAsync($symbol, $from, $to)
+ public function companyProfile2Async($symbol = null, $isin = null, $cusip = null)
{
- return $this->congressionalTradingAsyncWithHttpInfo($symbol, $from, $to)
+ return $this->companyProfile2AsyncWithHttpInfo($symbol, $isin, $cusip)
->then(
function ($response) {
return $response[0];
@@ -5392,21 +5398,21 @@ function ($response) {
}
/**
- * Operation congressionalTradingAsyncWithHttpInfo
+ * Operation companyProfile2AsyncWithHttpInfo
*
- * Congressional Trading
+ * Company Profile 2
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
+ * @param string $symbol Symbol of the company: AAPL e.g. (optional)
+ * @param string $isin ISIN (optional)
+ * @param string $cusip CUSIP (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function congressionalTradingAsyncWithHttpInfo($symbol, $from, $to)
+ public function companyProfile2AsyncWithHttpInfo($symbol = null, $isin = null, $cusip = null)
{
- $returnType = '\Finnhub\Model\CongressionalTrading';
- $request = $this->congressionalTradingRequest($symbol, $from, $to);
+ $returnType = '\Finnhub\Model\CompanyProfile2';
+ $request = $this->companyProfile2Request($symbol, $isin, $cusip);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -5442,37 +5448,19 @@ function ($exception) {
}
/**
- * Create request for operation 'congressionalTrading'
+ * Create request for operation 'companyProfile2'
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
+ * @param string $symbol Symbol of the company: AAPL e.g. (optional)
+ * @param string $isin ISIN (optional)
+ * @param string $cusip CUSIP (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function congressionalTradingRequest($symbol, $from, $to)
+ public function companyProfile2Request($symbol = null, $isin = null, $cusip = null)
{
- // verify the required parameter 'symbol' is set
- if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling congressionalTrading'
- );
- }
- // verify the required parameter 'from' is set
- if ($from === null || (is_array($from) && count($from) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $from when calling congressionalTrading'
- );
- }
- // verify the required parameter 'to' is set
- if ($to === null || (is_array($to) && count($to) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $to when calling congressionalTrading'
- );
- }
- $resourcePath = '/stock/congressional-trading';
+ $resourcePath = '/stock/profile2';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -5487,18 +5475,18 @@ public function congressionalTradingRequest($symbol, $from, $to)
$queryParams['symbol'] = $symbol;
}
// query params
- if (is_array($from)) {
- $from = ObjectSerializer::serializeCollection($from, '', true);
+ if (is_array($isin)) {
+ $isin = ObjectSerializer::serializeCollection($isin, '', true);
}
- if ($from !== null) {
- $queryParams['from'] = $from;
+ if ($isin !== null) {
+ $queryParams['isin'] = $isin;
}
// query params
- if (is_array($to)) {
- $to = ObjectSerializer::serializeCollection($to, '', true);
+ if (is_array($cusip)) {
+ $cusip = ObjectSerializer::serializeCollection($cusip, '', true);
}
- if ($to !== null) {
- $queryParams['to'] = $to;
+ if ($cusip !== null) {
+ $queryParams['cusip'] = $cusip;
}
@@ -5567,34 +5555,38 @@ public function congressionalTradingRequest($symbol, $from, $to)
}
/**
- * Operation country
+ * Operation companyRevenueEstimates
*
- * Country Metadata
+ * Revenue Estimates
*
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\CountryMetadata[]
+ * @return \Finnhub\Model\RevenueEstimates
*/
- public function country()
+ public function companyRevenueEstimates($symbol, $freq = null)
{
- list($response) = $this->countryWithHttpInfo();
+ list($response) = $this->companyRevenueEstimatesWithHttpInfo($symbol, $freq);
return $response;
}
/**
- * Operation countryWithHttpInfo
+ * Operation companyRevenueEstimatesWithHttpInfo
*
- * Country Metadata
+ * Revenue Estimates
*
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\CountryMetadata[], HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\RevenueEstimates, HTTP status code, HTTP response headers (array of strings)
*/
- public function countryWithHttpInfo()
+ public function companyRevenueEstimatesWithHttpInfo($symbol, $freq = null)
{
- $request = $this->countryRequest();
+ $request = $this->companyRevenueEstimatesRequest($symbol, $freq);
try {
$options = $this->createHttpClientOption();
@@ -5626,20 +5618,20 @@ public function countryWithHttpInfo()
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\CountryMetadata[]' === '\SplFileObject') {
+ if ('\Finnhub\Model\RevenueEstimates' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\CountryMetadata[]', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\RevenueEstimates', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\CountryMetadata[]';
+ $returnType = '\Finnhub\Model\RevenueEstimates';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -5657,7 +5649,7 @@ public function countryWithHttpInfo()
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\CountryMetadata[]',
+ '\Finnhub\Model\RevenueEstimates',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -5668,17 +5660,19 @@ public function countryWithHttpInfo()
}
/**
- * Operation countryAsync
+ * Operation companyRevenueEstimatesAsync
*
- * Country Metadata
+ * Revenue Estimates
*
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function countryAsync()
+ public function companyRevenueEstimatesAsync($symbol, $freq = null)
{
- return $this->countryAsyncWithHttpInfo()
+ return $this->companyRevenueEstimatesAsyncWithHttpInfo($symbol, $freq)
->then(
function ($response) {
return $response[0];
@@ -5687,18 +5681,20 @@ function ($response) {
}
/**
- * Operation countryAsyncWithHttpInfo
+ * Operation companyRevenueEstimatesAsyncWithHttpInfo
*
- * Country Metadata
+ * Revenue Estimates
*
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function countryAsyncWithHttpInfo()
+ public function companyRevenueEstimatesAsyncWithHttpInfo($symbol, $freq = null)
{
- $returnType = '\Finnhub\Model\CountryMetadata[]';
- $request = $this->countryRequest();
+ $returnType = '\Finnhub\Model\RevenueEstimates';
+ $request = $this->companyRevenueEstimatesRequest($symbol, $freq);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -5734,22 +5730,44 @@ function ($exception) {
}
/**
- * Create request for operation 'country'
+ * Create request for operation 'companyRevenueEstimates'
*
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function countryRequest()
+ public function companyRevenueEstimatesRequest($symbol, $freq = null)
{
+ // verify the required parameter 'symbol' is set
+ if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $symbol when calling companyRevenueEstimates'
+ );
+ }
- $resourcePath = '/country';
+ $resourcePath = '/stock/revenue-estimate';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
+ // query params
+ if (is_array($symbol)) {
+ $symbol = ObjectSerializer::serializeCollection($symbol, '', true);
+ }
+ if ($symbol !== null) {
+ $queryParams['symbol'] = $symbol;
+ }
+ // query params
+ if (is_array($freq)) {
+ $freq = ObjectSerializer::serializeCollection($freq, '', true);
+ }
+ if ($freq !== null) {
+ $queryParams['freq'] = $freq;
+ }
@@ -5817,34 +5835,40 @@ public function countryRequest()
}
/**
- * Operation covid19
+ * Operation congressionalTrading
*
- * COVID-19
+ * Congressional Trading
*
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\CovidInfo[]
+ * @return \Finnhub\Model\CongressionalTrading
*/
- public function covid19()
+ public function congressionalTrading($symbol, $from, $to)
{
- list($response) = $this->covid19WithHttpInfo();
+ list($response) = $this->congressionalTradingWithHttpInfo($symbol, $from, $to);
return $response;
}
/**
- * Operation covid19WithHttpInfo
+ * Operation congressionalTradingWithHttpInfo
*
- * COVID-19
+ * Congressional Trading
*
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\CovidInfo[], HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\CongressionalTrading, HTTP status code, HTTP response headers (array of strings)
*/
- public function covid19WithHttpInfo()
+ public function congressionalTradingWithHttpInfo($symbol, $from, $to)
{
- $request = $this->covid19Request();
+ $request = $this->congressionalTradingRequest($symbol, $from, $to);
try {
$options = $this->createHttpClientOption();
@@ -5876,20 +5900,20 @@ public function covid19WithHttpInfo()
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\CovidInfo[]' === '\SplFileObject') {
+ if ('\Finnhub\Model\CongressionalTrading' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\CovidInfo[]', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\CongressionalTrading', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\CovidInfo[]';
+ $returnType = '\Finnhub\Model\CongressionalTrading';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -5907,7 +5931,7 @@ public function covid19WithHttpInfo()
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\CovidInfo[]',
+ '\Finnhub\Model\CongressionalTrading',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -5918,17 +5942,20 @@ public function covid19WithHttpInfo()
}
/**
- * Operation covid19Async
+ * Operation congressionalTradingAsync
*
- * COVID-19
+ * Congressional Trading
*
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function covid19Async()
+ public function congressionalTradingAsync($symbol, $from, $to)
{
- return $this->covid19AsyncWithHttpInfo()
+ return $this->congressionalTradingAsyncWithHttpInfo($symbol, $from, $to)
->then(
function ($response) {
return $response[0];
@@ -5937,18 +5964,21 @@ function ($response) {
}
/**
- * Operation covid19AsyncWithHttpInfo
+ * Operation congressionalTradingAsyncWithHttpInfo
*
- * COVID-19
+ * Congressional Trading
*
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function covid19AsyncWithHttpInfo()
+ public function congressionalTradingAsyncWithHttpInfo($symbol, $from, $to)
{
- $returnType = '\Finnhub\Model\CovidInfo[]';
- $request = $this->covid19Request();
+ $returnType = '\Finnhub\Model\CongressionalTrading';
+ $request = $this->congressionalTradingRequest($symbol, $from, $to);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -5984,22 +6014,64 @@ function ($exception) {
}
/**
- * Create request for operation 'covid19'
+ * Create request for operation 'congressionalTrading'
*
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function covid19Request()
+ public function congressionalTradingRequest($symbol, $from, $to)
{
-
- $resourcePath = '/covid19/us';
- $formParams = [];
- $queryParams = [];
+ // verify the required parameter 'symbol' is set
+ if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $symbol when calling congressionalTrading'
+ );
+ }
+ // verify the required parameter 'from' is set
+ if ($from === null || (is_array($from) && count($from) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $from when calling congressionalTrading'
+ );
+ }
+ // verify the required parameter 'to' is set
+ if ($to === null || (is_array($to) && count($to) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $to when calling congressionalTrading'
+ );
+ }
+
+ $resourcePath = '/stock/congressional-trading';
+ $formParams = [];
+ $queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
+ // query params
+ if (is_array($symbol)) {
+ $symbol = ObjectSerializer::serializeCollection($symbol, '', true);
+ }
+ if ($symbol !== null) {
+ $queryParams['symbol'] = $symbol;
+ }
+ // query params
+ if (is_array($from)) {
+ $from = ObjectSerializer::serializeCollection($from, '', true);
+ }
+ if ($from !== null) {
+ $queryParams['from'] = $from;
+ }
+ // query params
+ if (is_array($to)) {
+ $to = ObjectSerializer::serializeCollection($to, '', true);
+ }
+ if ($to !== null) {
+ $queryParams['to'] = $to;
+ }
@@ -6067,42 +6139,34 @@ public function covid19Request()
}
/**
- * Operation cryptoCandles
+ * Operation country
*
- * Crypto Candles
+ * Country Metadata
*
- * @param string $symbol Use symbol returned in <code>/crypto/symbol</code> endpoint for this field. (required)
- * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
- * @param int $from UNIX timestamp. Interval initial value. (required)
- * @param int $to UNIX timestamp. Interval end value. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\CryptoCandles
+ * @return \Finnhub\Model\CountryMetadata[]
*/
- public function cryptoCandles($symbol, $resolution, $from, $to)
+ public function country()
{
- list($response) = $this->cryptoCandlesWithHttpInfo($symbol, $resolution, $from, $to);
+ list($response) = $this->countryWithHttpInfo();
return $response;
}
/**
- * Operation cryptoCandlesWithHttpInfo
+ * Operation countryWithHttpInfo
*
- * Crypto Candles
+ * Country Metadata
*
- * @param string $symbol Use symbol returned in <code>/crypto/symbol</code> endpoint for this field. (required)
- * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
- * @param int $from UNIX timestamp. Interval initial value. (required)
- * @param int $to UNIX timestamp. Interval end value. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\CryptoCandles, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\CountryMetadata[], HTTP status code, HTTP response headers (array of strings)
*/
- public function cryptoCandlesWithHttpInfo($symbol, $resolution, $from, $to)
+ public function countryWithHttpInfo()
{
- $request = $this->cryptoCandlesRequest($symbol, $resolution, $from, $to);
+ $request = $this->countryRequest();
try {
$options = $this->createHttpClientOption();
@@ -6134,20 +6198,20 @@ public function cryptoCandlesWithHttpInfo($symbol, $resolution, $from, $to)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\CryptoCandles' === '\SplFileObject') {
+ if ('\Finnhub\Model\CountryMetadata[]' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\CryptoCandles', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\CountryMetadata[]', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\CryptoCandles';
+ $returnType = '\Finnhub\Model\CountryMetadata[]';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -6165,7 +6229,7 @@ public function cryptoCandlesWithHttpInfo($symbol, $resolution, $from, $to)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\CryptoCandles',
+ '\Finnhub\Model\CountryMetadata[]',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -6176,21 +6240,17 @@ public function cryptoCandlesWithHttpInfo($symbol, $resolution, $from, $to)
}
/**
- * Operation cryptoCandlesAsync
+ * Operation countryAsync
*
- * Crypto Candles
+ * Country Metadata
*
- * @param string $symbol Use symbol returned in <code>/crypto/symbol</code> endpoint for this field. (required)
- * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
- * @param int $from UNIX timestamp. Interval initial value. (required)
- * @param int $to UNIX timestamp. Interval end value. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function cryptoCandlesAsync($symbol, $resolution, $from, $to)
+ public function countryAsync()
{
- return $this->cryptoCandlesAsyncWithHttpInfo($symbol, $resolution, $from, $to)
+ return $this->countryAsyncWithHttpInfo()
->then(
function ($response) {
return $response[0];
@@ -6199,22 +6259,18 @@ function ($response) {
}
/**
- * Operation cryptoCandlesAsyncWithHttpInfo
+ * Operation countryAsyncWithHttpInfo
*
- * Crypto Candles
+ * Country Metadata
*
- * @param string $symbol Use symbol returned in <code>/crypto/symbol</code> endpoint for this field. (required)
- * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
- * @param int $from UNIX timestamp. Interval initial value. (required)
- * @param int $to UNIX timestamp. Interval end value. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function cryptoCandlesAsyncWithHttpInfo($symbol, $resolution, $from, $to)
+ public function countryAsyncWithHttpInfo()
{
- $returnType = '\Finnhub\Model\CryptoCandles';
- $request = $this->cryptoCandlesRequest($symbol, $resolution, $from, $to);
+ $returnType = '\Finnhub\Model\CountryMetadata[]';
+ $request = $this->countryRequest();
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -6250,78 +6306,22 @@ function ($exception) {
}
/**
- * Create request for operation 'cryptoCandles'
+ * Create request for operation 'country'
*
- * @param string $symbol Use symbol returned in <code>/crypto/symbol</code> endpoint for this field. (required)
- * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
- * @param int $from UNIX timestamp. Interval initial value. (required)
- * @param int $to UNIX timestamp. Interval end value. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function cryptoCandlesRequest($symbol, $resolution, $from, $to)
+ public function countryRequest()
{
- // verify the required parameter 'symbol' is set
- if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling cryptoCandles'
- );
- }
- // verify the required parameter 'resolution' is set
- if ($resolution === null || (is_array($resolution) && count($resolution) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $resolution when calling cryptoCandles'
- );
- }
- // verify the required parameter 'from' is set
- if ($from === null || (is_array($from) && count($from) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $from when calling cryptoCandles'
- );
- }
- // verify the required parameter 'to' is set
- if ($to === null || (is_array($to) && count($to) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $to when calling cryptoCandles'
- );
- }
- $resourcePath = '/crypto/candle';
+ $resourcePath = '/country';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
- // query params
- if (is_array($symbol)) {
- $symbol = ObjectSerializer::serializeCollection($symbol, '', true);
- }
- if ($symbol !== null) {
- $queryParams['symbol'] = $symbol;
- }
- // query params
- if (is_array($resolution)) {
- $resolution = ObjectSerializer::serializeCollection($resolution, '', true);
- }
- if ($resolution !== null) {
- $queryParams['resolution'] = $resolution;
- }
- // query params
- if (is_array($from)) {
- $from = ObjectSerializer::serializeCollection($from, '', true);
- }
- if ($from !== null) {
- $queryParams['from'] = $from;
- }
- // query params
- if (is_array($to)) {
- $to = ObjectSerializer::serializeCollection($to, '', true);
- }
- if ($to !== null) {
- $queryParams['to'] = $to;
- }
@@ -6389,34 +6389,34 @@ public function cryptoCandlesRequest($symbol, $resolution, $from, $to)
}
/**
- * Operation cryptoExchanges
+ * Operation covid19
*
- * Crypto Exchanges
+ * COVID-19
*
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return string[]
+ * @return \Finnhub\Model\CovidInfo[]
*/
- public function cryptoExchanges()
+ public function covid19()
{
- list($response) = $this->cryptoExchangesWithHttpInfo();
+ list($response) = $this->covid19WithHttpInfo();
return $response;
}
/**
- * Operation cryptoExchangesWithHttpInfo
+ * Operation covid19WithHttpInfo
*
- * Crypto Exchanges
+ * COVID-19
*
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of string[], HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\CovidInfo[], HTTP status code, HTTP response headers (array of strings)
*/
- public function cryptoExchangesWithHttpInfo()
+ public function covid19WithHttpInfo()
{
- $request = $this->cryptoExchangesRequest();
+ $request = $this->covid19Request();
try {
$options = $this->createHttpClientOption();
@@ -6448,20 +6448,20 @@ public function cryptoExchangesWithHttpInfo()
switch($statusCode) {
case 200:
- if ('string[]' === '\SplFileObject') {
+ if ('\Finnhub\Model\CovidInfo[]' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, 'string[]', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\CovidInfo[]', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = 'string[]';
+ $returnType = '\Finnhub\Model\CovidInfo[]';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -6479,7 +6479,7 @@ public function cryptoExchangesWithHttpInfo()
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- 'string[]',
+ '\Finnhub\Model\CovidInfo[]',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -6490,17 +6490,17 @@ public function cryptoExchangesWithHttpInfo()
}
/**
- * Operation cryptoExchangesAsync
+ * Operation covid19Async
*
- * Crypto Exchanges
+ * COVID-19
*
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function cryptoExchangesAsync()
+ public function covid19Async()
{
- return $this->cryptoExchangesAsyncWithHttpInfo()
+ return $this->covid19AsyncWithHttpInfo()
->then(
function ($response) {
return $response[0];
@@ -6509,18 +6509,18 @@ function ($response) {
}
/**
- * Operation cryptoExchangesAsyncWithHttpInfo
+ * Operation covid19AsyncWithHttpInfo
*
- * Crypto Exchanges
+ * COVID-19
*
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function cryptoExchangesAsyncWithHttpInfo()
+ public function covid19AsyncWithHttpInfo()
{
- $returnType = 'string[]';
- $request = $this->cryptoExchangesRequest();
+ $returnType = '\Finnhub\Model\CovidInfo[]';
+ $request = $this->covid19Request();
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -6556,16 +6556,16 @@ function ($exception) {
}
/**
- * Create request for operation 'cryptoExchanges'
+ * Create request for operation 'covid19'
*
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function cryptoExchangesRequest()
+ public function covid19Request()
{
- $resourcePath = '/crypto/exchange';
+ $resourcePath = '/covid19/us';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -6639,36 +6639,42 @@ public function cryptoExchangesRequest()
}
/**
- * Operation cryptoProfile
+ * Operation cryptoCandles
*
- * Crypto Profile
+ * Crypto Candles
*
- * @param string $symbol Crypto symbol such as BTC or ETH. (required)
+ * @param string $symbol Use symbol returned in <code>/crypto/symbol</code> endpoint for this field. (required)
+ * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
+ * @param int $from UNIX timestamp. Interval initial value. (required)
+ * @param int $to UNIX timestamp. Interval end value. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\CryptoProfile
+ * @return \Finnhub\Model\CryptoCandles
*/
- public function cryptoProfile($symbol)
+ public function cryptoCandles($symbol, $resolution, $from, $to)
{
- list($response) = $this->cryptoProfileWithHttpInfo($symbol);
+ list($response) = $this->cryptoCandlesWithHttpInfo($symbol, $resolution, $from, $to);
return $response;
}
/**
- * Operation cryptoProfileWithHttpInfo
+ * Operation cryptoCandlesWithHttpInfo
*
- * Crypto Profile
+ * Crypto Candles
*
- * @param string $symbol Crypto symbol such as BTC or ETH. (required)
+ * @param string $symbol Use symbol returned in <code>/crypto/symbol</code> endpoint for this field. (required)
+ * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
+ * @param int $from UNIX timestamp. Interval initial value. (required)
+ * @param int $to UNIX timestamp. Interval end value. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\CryptoProfile, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\CryptoCandles, HTTP status code, HTTP response headers (array of strings)
*/
- public function cryptoProfileWithHttpInfo($symbol)
+ public function cryptoCandlesWithHttpInfo($symbol, $resolution, $from, $to)
{
- $request = $this->cryptoProfileRequest($symbol);
+ $request = $this->cryptoCandlesRequest($symbol, $resolution, $from, $to);
try {
$options = $this->createHttpClientOption();
@@ -6700,20 +6706,20 @@ public function cryptoProfileWithHttpInfo($symbol)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\CryptoProfile' === '\SplFileObject') {
+ if ('\Finnhub\Model\CryptoCandles' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\CryptoProfile', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\CryptoCandles', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\CryptoProfile';
+ $returnType = '\Finnhub\Model\CryptoCandles';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -6731,7 +6737,7 @@ public function cryptoProfileWithHttpInfo($symbol)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\CryptoProfile',
+ '\Finnhub\Model\CryptoCandles',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -6742,18 +6748,21 @@ public function cryptoProfileWithHttpInfo($symbol)
}
/**
- * Operation cryptoProfileAsync
+ * Operation cryptoCandlesAsync
*
- * Crypto Profile
+ * Crypto Candles
*
- * @param string $symbol Crypto symbol such as BTC or ETH. (required)
+ * @param string $symbol Use symbol returned in <code>/crypto/symbol</code> endpoint for this field. (required)
+ * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
+ * @param int $from UNIX timestamp. Interval initial value. (required)
+ * @param int $to UNIX timestamp. Interval end value. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function cryptoProfileAsync($symbol)
+ public function cryptoCandlesAsync($symbol, $resolution, $from, $to)
{
- return $this->cryptoProfileAsyncWithHttpInfo($symbol)
+ return $this->cryptoCandlesAsyncWithHttpInfo($symbol, $resolution, $from, $to)
->then(
function ($response) {
return $response[0];
@@ -6762,19 +6771,22 @@ function ($response) {
}
/**
- * Operation cryptoProfileAsyncWithHttpInfo
+ * Operation cryptoCandlesAsyncWithHttpInfo
*
- * Crypto Profile
+ * Crypto Candles
*
- * @param string $symbol Crypto symbol such as BTC or ETH. (required)
+ * @param string $symbol Use symbol returned in <code>/crypto/symbol</code> endpoint for this field. (required)
+ * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
+ * @param int $from UNIX timestamp. Interval initial value. (required)
+ * @param int $to UNIX timestamp. Interval end value. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function cryptoProfileAsyncWithHttpInfo($symbol)
+ public function cryptoCandlesAsyncWithHttpInfo($symbol, $resolution, $from, $to)
{
- $returnType = '\Finnhub\Model\CryptoProfile';
- $request = $this->cryptoProfileRequest($symbol);
+ $returnType = '\Finnhub\Model\CryptoCandles';
+ $request = $this->cryptoCandlesRequest($symbol, $resolution, $from, $to);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -6810,23 +6822,44 @@ function ($exception) {
}
/**
- * Create request for operation 'cryptoProfile'
+ * Create request for operation 'cryptoCandles'
*
- * @param string $symbol Crypto symbol such as BTC or ETH. (required)
+ * @param string $symbol Use symbol returned in <code>/crypto/symbol</code> endpoint for this field. (required)
+ * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
+ * @param int $from UNIX timestamp. Interval initial value. (required)
+ * @param int $to UNIX timestamp. Interval end value. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function cryptoProfileRequest($symbol)
+ public function cryptoCandlesRequest($symbol, $resolution, $from, $to)
{
// verify the required parameter 'symbol' is set
if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling cryptoProfile'
+ 'Missing the required parameter $symbol when calling cryptoCandles'
+ );
+ }
+ // verify the required parameter 'resolution' is set
+ if ($resolution === null || (is_array($resolution) && count($resolution) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $resolution when calling cryptoCandles'
+ );
+ }
+ // verify the required parameter 'from' is set
+ if ($from === null || (is_array($from) && count($from) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $from when calling cryptoCandles'
+ );
+ }
+ // verify the required parameter 'to' is set
+ if ($to === null || (is_array($to) && count($to) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $to when calling cryptoCandles'
);
}
- $resourcePath = '/crypto/profile';
+ $resourcePath = '/crypto/candle';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -6840,6 +6873,27 @@ public function cryptoProfileRequest($symbol)
if ($symbol !== null) {
$queryParams['symbol'] = $symbol;
}
+ // query params
+ if (is_array($resolution)) {
+ $resolution = ObjectSerializer::serializeCollection($resolution, '', true);
+ }
+ if ($resolution !== null) {
+ $queryParams['resolution'] = $resolution;
+ }
+ // query params
+ if (is_array($from)) {
+ $from = ObjectSerializer::serializeCollection($from, '', true);
+ }
+ if ($from !== null) {
+ $queryParams['from'] = $from;
+ }
+ // query params
+ if (is_array($to)) {
+ $to = ObjectSerializer::serializeCollection($to, '', true);
+ }
+ if ($to !== null) {
+ $queryParams['to'] = $to;
+ }
@@ -6907,36 +6961,34 @@ public function cryptoProfileRequest($symbol)
}
/**
- * Operation cryptoSymbols
+ * Operation cryptoExchanges
*
- * Crypto Symbol
+ * Crypto Exchanges
*
- * @param string $exchange Exchange you want to get the list of symbols from. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\CryptoSymbol[]
+ * @return string[]
*/
- public function cryptoSymbols($exchange)
+ public function cryptoExchanges()
{
- list($response) = $this->cryptoSymbolsWithHttpInfo($exchange);
+ list($response) = $this->cryptoExchangesWithHttpInfo();
return $response;
}
/**
- * Operation cryptoSymbolsWithHttpInfo
+ * Operation cryptoExchangesWithHttpInfo
*
- * Crypto Symbol
+ * Crypto Exchanges
*
- * @param string $exchange Exchange you want to get the list of symbols from. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\CryptoSymbol[], HTTP status code, HTTP response headers (array of strings)
+ * @return array of string[], HTTP status code, HTTP response headers (array of strings)
*/
- public function cryptoSymbolsWithHttpInfo($exchange)
+ public function cryptoExchangesWithHttpInfo()
{
- $request = $this->cryptoSymbolsRequest($exchange);
+ $request = $this->cryptoExchangesRequest();
try {
$options = $this->createHttpClientOption();
@@ -6968,20 +7020,20 @@ public function cryptoSymbolsWithHttpInfo($exchange)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\CryptoSymbol[]' === '\SplFileObject') {
+ if ('string[]' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\CryptoSymbol[]', []),
+ ObjectSerializer::deserialize($content, 'string[]', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\CryptoSymbol[]';
+ $returnType = 'string[]';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -6999,7 +7051,7 @@ public function cryptoSymbolsWithHttpInfo($exchange)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\CryptoSymbol[]',
+ 'string[]',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -7010,18 +7062,17 @@ public function cryptoSymbolsWithHttpInfo($exchange)
}
/**
- * Operation cryptoSymbolsAsync
+ * Operation cryptoExchangesAsync
*
- * Crypto Symbol
+ * Crypto Exchanges
*
- * @param string $exchange Exchange you want to get the list of symbols from. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function cryptoSymbolsAsync($exchange)
+ public function cryptoExchangesAsync()
{
- return $this->cryptoSymbolsAsyncWithHttpInfo($exchange)
+ return $this->cryptoExchangesAsyncWithHttpInfo()
->then(
function ($response) {
return $response[0];
@@ -7030,19 +7081,18 @@ function ($response) {
}
/**
- * Operation cryptoSymbolsAsyncWithHttpInfo
+ * Operation cryptoExchangesAsyncWithHttpInfo
*
- * Crypto Symbol
+ * Crypto Exchanges
*
- * @param string $exchange Exchange you want to get the list of symbols from. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function cryptoSymbolsAsyncWithHttpInfo($exchange)
+ public function cryptoExchangesAsyncWithHttpInfo()
{
- $returnType = '\Finnhub\Model\CryptoSymbol[]';
- $request = $this->cryptoSymbolsRequest($exchange);
+ $returnType = 'string[]';
+ $request = $this->cryptoExchangesRequest();
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -7078,36 +7128,22 @@ function ($exception) {
}
/**
- * Create request for operation 'cryptoSymbols'
+ * Create request for operation 'cryptoExchanges'
*
- * @param string $exchange Exchange you want to get the list of symbols from. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function cryptoSymbolsRequest($exchange)
+ public function cryptoExchangesRequest()
{
- // verify the required parameter 'exchange' is set
- if ($exchange === null || (is_array($exchange) && count($exchange) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $exchange when calling cryptoSymbols'
- );
- }
- $resourcePath = '/crypto/symbol';
+ $resourcePath = '/crypto/exchange';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
- // query params
- if (is_array($exchange)) {
- $exchange = ObjectSerializer::serializeCollection($exchange, '', true);
- }
- if ($exchange !== null) {
- $queryParams['exchange'] = $exchange;
- }
@@ -7175,42 +7211,36 @@ public function cryptoSymbolsRequest($exchange)
}
/**
- * Operation earningsCalendar
+ * Operation cryptoProfile
*
- * Earnings Calendar
+ * Crypto Profile
*
- * @param \DateTime $from From date: 2020-03-15. (optional)
- * @param \DateTime $to To date: 2020-03-16. (optional)
- * @param string $symbol Filter by symbol: AAPL. (optional)
- * @param bool $international Set to <code>true</code> to include international markets. Default value is <code>false</code> (optional)
+ * @param string $symbol Crypto symbol such as BTC or ETH. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\EarningsCalendar
+ * @return \Finnhub\Model\CryptoProfile
*/
- public function earningsCalendar($from = null, $to = null, $symbol = null, $international = null)
+ public function cryptoProfile($symbol)
{
- list($response) = $this->earningsCalendarWithHttpInfo($from, $to, $symbol, $international);
+ list($response) = $this->cryptoProfileWithHttpInfo($symbol);
return $response;
}
/**
- * Operation earningsCalendarWithHttpInfo
+ * Operation cryptoProfileWithHttpInfo
*
- * Earnings Calendar
+ * Crypto Profile
*
- * @param \DateTime $from From date: 2020-03-15. (optional)
- * @param \DateTime $to To date: 2020-03-16. (optional)
- * @param string $symbol Filter by symbol: AAPL. (optional)
- * @param bool $international Set to <code>true</code> to include international markets. Default value is <code>false</code> (optional)
+ * @param string $symbol Crypto symbol such as BTC or ETH. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\EarningsCalendar, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\CryptoProfile, HTTP status code, HTTP response headers (array of strings)
*/
- public function earningsCalendarWithHttpInfo($from = null, $to = null, $symbol = null, $international = null)
+ public function cryptoProfileWithHttpInfo($symbol)
{
- $request = $this->earningsCalendarRequest($from, $to, $symbol, $international);
+ $request = $this->cryptoProfileRequest($symbol);
try {
$options = $this->createHttpClientOption();
@@ -7242,20 +7272,20 @@ public function earningsCalendarWithHttpInfo($from = null, $to = null, $symbol =
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\EarningsCalendar' === '\SplFileObject') {
+ if ('\Finnhub\Model\CryptoProfile' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\EarningsCalendar', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\CryptoProfile', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\EarningsCalendar';
+ $returnType = '\Finnhub\Model\CryptoProfile';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -7273,7 +7303,7 @@ public function earningsCalendarWithHttpInfo($from = null, $to = null, $symbol =
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\EarningsCalendar',
+ '\Finnhub\Model\CryptoProfile',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -7284,21 +7314,18 @@ public function earningsCalendarWithHttpInfo($from = null, $to = null, $symbol =
}
/**
- * Operation earningsCalendarAsync
+ * Operation cryptoProfileAsync
*
- * Earnings Calendar
+ * Crypto Profile
*
- * @param \DateTime $from From date: 2020-03-15. (optional)
- * @param \DateTime $to To date: 2020-03-16. (optional)
- * @param string $symbol Filter by symbol: AAPL. (optional)
- * @param bool $international Set to <code>true</code> to include international markets. Default value is <code>false</code> (optional)
+ * @param string $symbol Crypto symbol such as BTC or ETH. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function earningsCalendarAsync($from = null, $to = null, $symbol = null, $international = null)
+ public function cryptoProfileAsync($symbol)
{
- return $this->earningsCalendarAsyncWithHttpInfo($from, $to, $symbol, $international)
+ return $this->cryptoProfileAsyncWithHttpInfo($symbol)
->then(
function ($response) {
return $response[0];
@@ -7307,22 +7334,19 @@ function ($response) {
}
/**
- * Operation earningsCalendarAsyncWithHttpInfo
+ * Operation cryptoProfileAsyncWithHttpInfo
*
- * Earnings Calendar
+ * Crypto Profile
*
- * @param \DateTime $from From date: 2020-03-15. (optional)
- * @param \DateTime $to To date: 2020-03-16. (optional)
- * @param string $symbol Filter by symbol: AAPL. (optional)
- * @param bool $international Set to <code>true</code> to include international markets. Default value is <code>false</code> (optional)
+ * @param string $symbol Crypto symbol such as BTC or ETH. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function earningsCalendarAsyncWithHttpInfo($from = null, $to = null, $symbol = null, $international = null)
+ public function cryptoProfileAsyncWithHttpInfo($symbol)
{
- $returnType = '\Finnhub\Model\EarningsCalendar';
- $request = $this->earningsCalendarRequest($from, $to, $symbol, $international);
+ $returnType = '\Finnhub\Model\CryptoProfile';
+ $request = $this->cryptoProfileRequest($symbol);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -7358,40 +7382,29 @@ function ($exception) {
}
/**
- * Create request for operation 'earningsCalendar'
+ * Create request for operation 'cryptoProfile'
*
- * @param \DateTime $from From date: 2020-03-15. (optional)
- * @param \DateTime $to To date: 2020-03-16. (optional)
- * @param string $symbol Filter by symbol: AAPL. (optional)
- * @param bool $international Set to <code>true</code> to include international markets. Default value is <code>false</code> (optional)
+ * @param string $symbol Crypto symbol such as BTC or ETH. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function earningsCalendarRequest($from = null, $to = null, $symbol = null, $international = null)
+ public function cryptoProfileRequest($symbol)
{
+ // verify the required parameter 'symbol' is set
+ if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $symbol when calling cryptoProfile'
+ );
+ }
- $resourcePath = '/calendar/earnings';
+ $resourcePath = '/crypto/profile';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
- // query params
- if (is_array($from)) {
- $from = ObjectSerializer::serializeCollection($from, '', true);
- }
- if ($from !== null) {
- $queryParams['from'] = $from;
- }
- // query params
- if (is_array($to)) {
- $to = ObjectSerializer::serializeCollection($to, '', true);
- }
- if ($to !== null) {
- $queryParams['to'] = $to;
- }
// query params
if (is_array($symbol)) {
$symbol = ObjectSerializer::serializeCollection($symbol, '', true);
@@ -7399,13 +7412,6 @@ public function earningsCalendarRequest($from = null, $to = null, $symbol = null
if ($symbol !== null) {
$queryParams['symbol'] = $symbol;
}
- // query params
- if (is_array($international)) {
- $international = ObjectSerializer::serializeCollection($international, '', true);
- }
- if ($international !== null) {
- $queryParams['international'] = $international;
- }
@@ -7473,38 +7479,36 @@ public function earningsCalendarRequest($from = null, $to = null, $symbol = null
}
/**
- * Operation economicCalendar
+ * Operation cryptoSymbols
*
- * Economic Calendar
+ * Crypto Symbol
*
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (optional)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (optional)
+ * @param string $exchange Exchange you want to get the list of symbols from. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\EconomicCalendar
+ * @return \Finnhub\Model\CryptoSymbol[]
*/
- public function economicCalendar($from = null, $to = null)
+ public function cryptoSymbols($exchange)
{
- list($response) = $this->economicCalendarWithHttpInfo($from, $to);
+ list($response) = $this->cryptoSymbolsWithHttpInfo($exchange);
return $response;
}
/**
- * Operation economicCalendarWithHttpInfo
+ * Operation cryptoSymbolsWithHttpInfo
*
- * Economic Calendar
+ * Crypto Symbol
*
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (optional)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (optional)
+ * @param string $exchange Exchange you want to get the list of symbols from. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\EconomicCalendar, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\CryptoSymbol[], HTTP status code, HTTP response headers (array of strings)
*/
- public function economicCalendarWithHttpInfo($from = null, $to = null)
+ public function cryptoSymbolsWithHttpInfo($exchange)
{
- $request = $this->economicCalendarRequest($from, $to);
+ $request = $this->cryptoSymbolsRequest($exchange);
try {
$options = $this->createHttpClientOption();
@@ -7536,20 +7540,20 @@ public function economicCalendarWithHttpInfo($from = null, $to = null)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\EconomicCalendar' === '\SplFileObject') {
+ if ('\Finnhub\Model\CryptoSymbol[]' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\EconomicCalendar', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\CryptoSymbol[]', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\EconomicCalendar';
+ $returnType = '\Finnhub\Model\CryptoSymbol[]';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -7567,7 +7571,7 @@ public function economicCalendarWithHttpInfo($from = null, $to = null)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\EconomicCalendar',
+ '\Finnhub\Model\CryptoSymbol[]',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -7578,19 +7582,18 @@ public function economicCalendarWithHttpInfo($from = null, $to = null)
}
/**
- * Operation economicCalendarAsync
+ * Operation cryptoSymbolsAsync
*
- * Economic Calendar
+ * Crypto Symbol
*
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (optional)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (optional)
+ * @param string $exchange Exchange you want to get the list of symbols from. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function economicCalendarAsync($from = null, $to = null)
+ public function cryptoSymbolsAsync($exchange)
{
- return $this->economicCalendarAsyncWithHttpInfo($from, $to)
+ return $this->cryptoSymbolsAsyncWithHttpInfo($exchange)
->then(
function ($response) {
return $response[0];
@@ -7599,20 +7602,19 @@ function ($response) {
}
/**
- * Operation economicCalendarAsyncWithHttpInfo
+ * Operation cryptoSymbolsAsyncWithHttpInfo
*
- * Economic Calendar
+ * Crypto Symbol
*
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (optional)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (optional)
+ * @param string $exchange Exchange you want to get the list of symbols from. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function economicCalendarAsyncWithHttpInfo($from = null, $to = null)
+ public function cryptoSymbolsAsyncWithHttpInfo($exchange)
{
- $returnType = '\Finnhub\Model\EconomicCalendar';
- $request = $this->economicCalendarRequest($from, $to);
+ $returnType = '\Finnhub\Model\CryptoSymbol[]';
+ $request = $this->cryptoSymbolsRequest($exchange);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -7648,18 +7650,23 @@ function ($exception) {
}
/**
- * Create request for operation 'economicCalendar'
+ * Create request for operation 'cryptoSymbols'
*
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (optional)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (optional)
+ * @param string $exchange Exchange you want to get the list of symbols from. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function economicCalendarRequest($from = null, $to = null)
+ public function cryptoSymbolsRequest($exchange)
{
+ // verify the required parameter 'exchange' is set
+ if ($exchange === null || (is_array($exchange) && count($exchange) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $exchange when calling cryptoSymbols'
+ );
+ }
- $resourcePath = '/calendar/economic';
+ $resourcePath = '/crypto/symbol';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -7667,18 +7674,11 @@ public function economicCalendarRequest($from = null, $to = null)
$multipart = false;
// query params
- if (is_array($from)) {
- $from = ObjectSerializer::serializeCollection($from, '', true);
- }
- if ($from !== null) {
- $queryParams['from'] = $from;
- }
- // query params
- if (is_array($to)) {
- $to = ObjectSerializer::serializeCollection($to, '', true);
+ if (is_array($exchange)) {
+ $exchange = ObjectSerializer::serializeCollection($exchange, '', true);
}
- if ($to !== null) {
- $queryParams['to'] = $to;
+ if ($exchange !== null) {
+ $queryParams['exchange'] = $exchange;
}
@@ -7747,34 +7747,42 @@ public function economicCalendarRequest($from = null, $to = null)
}
/**
- * Operation economicCode
+ * Operation earningsCalendar
*
- * Economic Code
+ * Earnings Calendar
*
+ * @param \DateTime $from From date: 2020-03-15. (optional)
+ * @param \DateTime $to To date: 2020-03-16. (optional)
+ * @param string $symbol Filter by symbol: AAPL. (optional)
+ * @param bool $international Set to <code>true</code> to include international markets. Default value is <code>false</code> (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\EconomicCode[]
+ * @return \Finnhub\Model\EarningsCalendar
*/
- public function economicCode()
+ public function earningsCalendar($from = null, $to = null, $symbol = null, $international = null)
{
- list($response) = $this->economicCodeWithHttpInfo();
+ list($response) = $this->earningsCalendarWithHttpInfo($from, $to, $symbol, $international);
return $response;
}
/**
- * Operation economicCodeWithHttpInfo
+ * Operation earningsCalendarWithHttpInfo
*
- * Economic Code
+ * Earnings Calendar
*
+ * @param \DateTime $from From date: 2020-03-15. (optional)
+ * @param \DateTime $to To date: 2020-03-16. (optional)
+ * @param string $symbol Filter by symbol: AAPL. (optional)
+ * @param bool $international Set to <code>true</code> to include international markets. Default value is <code>false</code> (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\EconomicCode[], HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\EarningsCalendar, HTTP status code, HTTP response headers (array of strings)
*/
- public function economicCodeWithHttpInfo()
+ public function earningsCalendarWithHttpInfo($from = null, $to = null, $symbol = null, $international = null)
{
- $request = $this->economicCodeRequest();
+ $request = $this->earningsCalendarRequest($from, $to, $symbol, $international);
try {
$options = $this->createHttpClientOption();
@@ -7806,20 +7814,20 @@ public function economicCodeWithHttpInfo()
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\EconomicCode[]' === '\SplFileObject') {
+ if ('\Finnhub\Model\EarningsCalendar' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\EconomicCode[]', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\EarningsCalendar', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\EconomicCode[]';
+ $returnType = '\Finnhub\Model\EarningsCalendar';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -7837,7 +7845,7 @@ public function economicCodeWithHttpInfo()
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\EconomicCode[]',
+ '\Finnhub\Model\EarningsCalendar',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -7848,17 +7856,21 @@ public function economicCodeWithHttpInfo()
}
/**
- * Operation economicCodeAsync
+ * Operation earningsCalendarAsync
*
- * Economic Code
+ * Earnings Calendar
*
+ * @param \DateTime $from From date: 2020-03-15. (optional)
+ * @param \DateTime $to To date: 2020-03-16. (optional)
+ * @param string $symbol Filter by symbol: AAPL. (optional)
+ * @param bool $international Set to <code>true</code> to include international markets. Default value is <code>false</code> (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function economicCodeAsync()
+ public function earningsCalendarAsync($from = null, $to = null, $symbol = null, $international = null)
{
- return $this->economicCodeAsyncWithHttpInfo()
+ return $this->earningsCalendarAsyncWithHttpInfo($from, $to, $symbol, $international)
->then(
function ($response) {
return $response[0];
@@ -7867,18 +7879,22 @@ function ($response) {
}
/**
- * Operation economicCodeAsyncWithHttpInfo
+ * Operation earningsCalendarAsyncWithHttpInfo
*
- * Economic Code
+ * Earnings Calendar
*
+ * @param \DateTime $from From date: 2020-03-15. (optional)
+ * @param \DateTime $to To date: 2020-03-16. (optional)
+ * @param string $symbol Filter by symbol: AAPL. (optional)
+ * @param bool $international Set to <code>true</code> to include international markets. Default value is <code>false</code> (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function economicCodeAsyncWithHttpInfo()
+ public function earningsCalendarAsyncWithHttpInfo($from = null, $to = null, $symbol = null, $international = null)
{
- $returnType = '\Finnhub\Model\EconomicCode[]';
- $request = $this->economicCodeRequest();
+ $returnType = '\Finnhub\Model\EarningsCalendar';
+ $request = $this->earningsCalendarRequest($from, $to, $symbol, $international);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -7914,22 +7930,54 @@ function ($exception) {
}
/**
- * Create request for operation 'economicCode'
+ * Create request for operation 'earningsCalendar'
*
+ * @param \DateTime $from From date: 2020-03-15. (optional)
+ * @param \DateTime $to To date: 2020-03-16. (optional)
+ * @param string $symbol Filter by symbol: AAPL. (optional)
+ * @param bool $international Set to <code>true</code> to include international markets. Default value is <code>false</code> (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function economicCodeRequest()
+ public function earningsCalendarRequest($from = null, $to = null, $symbol = null, $international = null)
{
- $resourcePath = '/economic/code';
+ $resourcePath = '/calendar/earnings';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
+ // query params
+ if (is_array($from)) {
+ $from = ObjectSerializer::serializeCollection($from, '', true);
+ }
+ if ($from !== null) {
+ $queryParams['from'] = $from;
+ }
+ // query params
+ if (is_array($to)) {
+ $to = ObjectSerializer::serializeCollection($to, '', true);
+ }
+ if ($to !== null) {
+ $queryParams['to'] = $to;
+ }
+ // query params
+ if (is_array($symbol)) {
+ $symbol = ObjectSerializer::serializeCollection($symbol, '', true);
+ }
+ if ($symbol !== null) {
+ $queryParams['symbol'] = $symbol;
+ }
+ // query params
+ if (is_array($international)) {
+ $international = ObjectSerializer::serializeCollection($international, '', true);
+ }
+ if ($international !== null) {
+ $queryParams['international'] = $international;
+ }
@@ -7997,36 +8045,38 @@ public function economicCodeRequest()
}
/**
- * Operation economicData
+ * Operation economicCalendar
*
- * Economic Data
+ * Economic Calendar
*
- * @param string $code Economic code. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (optional)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\EconomicData
+ * @return \Finnhub\Model\EconomicCalendar
*/
- public function economicData($code)
+ public function economicCalendar($from = null, $to = null)
{
- list($response) = $this->economicDataWithHttpInfo($code);
+ list($response) = $this->economicCalendarWithHttpInfo($from, $to);
return $response;
}
/**
- * Operation economicDataWithHttpInfo
+ * Operation economicCalendarWithHttpInfo
*
- * Economic Data
+ * Economic Calendar
*
- * @param string $code Economic code. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (optional)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\EconomicData, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\EconomicCalendar, HTTP status code, HTTP response headers (array of strings)
*/
- public function economicDataWithHttpInfo($code)
+ public function economicCalendarWithHttpInfo($from = null, $to = null)
{
- $request = $this->economicDataRequest($code);
+ $request = $this->economicCalendarRequest($from, $to);
try {
$options = $this->createHttpClientOption();
@@ -8058,20 +8108,20 @@ public function economicDataWithHttpInfo($code)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\EconomicData' === '\SplFileObject') {
+ if ('\Finnhub\Model\EconomicCalendar' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\EconomicData', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\EconomicCalendar', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\EconomicData';
+ $returnType = '\Finnhub\Model\EconomicCalendar';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -8089,7 +8139,7 @@ public function economicDataWithHttpInfo($code)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\EconomicData',
+ '\Finnhub\Model\EconomicCalendar',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -8100,18 +8150,19 @@ public function economicDataWithHttpInfo($code)
}
/**
- * Operation economicDataAsync
+ * Operation economicCalendarAsync
*
- * Economic Data
+ * Economic Calendar
*
- * @param string $code Economic code. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (optional)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function economicDataAsync($code)
+ public function economicCalendarAsync($from = null, $to = null)
{
- return $this->economicDataAsyncWithHttpInfo($code)
+ return $this->economicCalendarAsyncWithHttpInfo($from, $to)
->then(
function ($response) {
return $response[0];
@@ -8120,19 +8171,20 @@ function ($response) {
}
/**
- * Operation economicDataAsyncWithHttpInfo
+ * Operation economicCalendarAsyncWithHttpInfo
*
- * Economic Data
+ * Economic Calendar
*
- * @param string $code Economic code. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (optional)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function economicDataAsyncWithHttpInfo($code)
+ public function economicCalendarAsyncWithHttpInfo($from = null, $to = null)
{
- $returnType = '\Finnhub\Model\EconomicData';
- $request = $this->economicDataRequest($code);
+ $returnType = '\Finnhub\Model\EconomicCalendar';
+ $request = $this->economicCalendarRequest($from, $to);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -8168,23 +8220,18 @@ function ($exception) {
}
/**
- * Create request for operation 'economicData'
+ * Create request for operation 'economicCalendar'
*
- * @param string $code Economic code. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (optional)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function economicDataRequest($code)
+ public function economicCalendarRequest($from = null, $to = null)
{
- // verify the required parameter 'code' is set
- if ($code === null || (is_array($code) && count($code) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $code when calling economicData'
- );
- }
- $resourcePath = '/economic';
+ $resourcePath = '/calendar/economic';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -8192,11 +8239,18 @@ public function economicDataRequest($code)
$multipart = false;
// query params
- if (is_array($code)) {
- $code = ObjectSerializer::serializeCollection($code, '', true);
+ if (is_array($from)) {
+ $from = ObjectSerializer::serializeCollection($from, '', true);
}
- if ($code !== null) {
- $queryParams['code'] = $code;
+ if ($from !== null) {
+ $queryParams['from'] = $from;
+ }
+ // query params
+ if (is_array($to)) {
+ $to = ObjectSerializer::serializeCollection($to, '', true);
+ }
+ if ($to !== null) {
+ $queryParams['to'] = $to;
}
@@ -8265,38 +8319,34 @@ public function economicDataRequest($code)
}
/**
- * Operation etfsCountryExposure
+ * Operation economicCode
*
- * ETFs Country Exposure
+ * Economic Code
*
- * @param string $symbol ETF symbol. (optional)
- * @param string $isin ETF isin. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\ETFsCountryExposure
+ * @return \Finnhub\Model\EconomicCode[]
*/
- public function etfsCountryExposure($symbol = null, $isin = null)
+ public function economicCode()
{
- list($response) = $this->etfsCountryExposureWithHttpInfo($symbol, $isin);
+ list($response) = $this->economicCodeWithHttpInfo();
return $response;
}
/**
- * Operation etfsCountryExposureWithHttpInfo
+ * Operation economicCodeWithHttpInfo
*
- * ETFs Country Exposure
+ * Economic Code
*
- * @param string $symbol ETF symbol. (optional)
- * @param string $isin ETF isin. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\ETFsCountryExposure, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\EconomicCode[], HTTP status code, HTTP response headers (array of strings)
*/
- public function etfsCountryExposureWithHttpInfo($symbol = null, $isin = null)
+ public function economicCodeWithHttpInfo()
{
- $request = $this->etfsCountryExposureRequest($symbol, $isin);
+ $request = $this->economicCodeRequest();
try {
$options = $this->createHttpClientOption();
@@ -8328,20 +8378,20 @@ public function etfsCountryExposureWithHttpInfo($symbol = null, $isin = null)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\ETFsCountryExposure' === '\SplFileObject') {
+ if ('\Finnhub\Model\EconomicCode[]' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\ETFsCountryExposure', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\EconomicCode[]', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\ETFsCountryExposure';
+ $returnType = '\Finnhub\Model\EconomicCode[]';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -8359,7 +8409,7 @@ public function etfsCountryExposureWithHttpInfo($symbol = null, $isin = null)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\ETFsCountryExposure',
+ '\Finnhub\Model\EconomicCode[]',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -8370,19 +8420,17 @@ public function etfsCountryExposureWithHttpInfo($symbol = null, $isin = null)
}
/**
- * Operation etfsCountryExposureAsync
+ * Operation economicCodeAsync
*
- * ETFs Country Exposure
+ * Economic Code
*
- * @param string $symbol ETF symbol. (optional)
- * @param string $isin ETF isin. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function etfsCountryExposureAsync($symbol = null, $isin = null)
+ public function economicCodeAsync()
{
- return $this->etfsCountryExposureAsyncWithHttpInfo($symbol, $isin)
+ return $this->economicCodeAsyncWithHttpInfo()
->then(
function ($response) {
return $response[0];
@@ -8391,20 +8439,18 @@ function ($response) {
}
/**
- * Operation etfsCountryExposureAsyncWithHttpInfo
+ * Operation economicCodeAsyncWithHttpInfo
*
- * ETFs Country Exposure
+ * Economic Code
*
- * @param string $symbol ETF symbol. (optional)
- * @param string $isin ETF isin. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function etfsCountryExposureAsyncWithHttpInfo($symbol = null, $isin = null)
+ public function economicCodeAsyncWithHttpInfo()
{
- $returnType = '\Finnhub\Model\ETFsCountryExposure';
- $request = $this->etfsCountryExposureRequest($symbol, $isin);
+ $returnType = '\Finnhub\Model\EconomicCode[]';
+ $request = $this->economicCodeRequest();
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -8440,38 +8486,22 @@ function ($exception) {
}
/**
- * Create request for operation 'etfsCountryExposure'
+ * Create request for operation 'economicCode'
*
- * @param string $symbol ETF symbol. (optional)
- * @param string $isin ETF isin. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function etfsCountryExposureRequest($symbol = null, $isin = null)
+ public function economicCodeRequest()
{
- $resourcePath = '/etf/country';
+ $resourcePath = '/economic/code';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
- // query params
- if (is_array($symbol)) {
- $symbol = ObjectSerializer::serializeCollection($symbol, '', true);
- }
- if ($symbol !== null) {
- $queryParams['symbol'] = $symbol;
- }
- // query params
- if (is_array($isin)) {
- $isin = ObjectSerializer::serializeCollection($isin, '', true);
- }
- if ($isin !== null) {
- $queryParams['isin'] = $isin;
- }
@@ -8539,42 +8569,36 @@ public function etfsCountryExposureRequest($symbol = null, $isin = null)
}
/**
- * Operation etfsHoldings
+ * Operation economicData
*
- * ETFs Holdings
+ * Economic Data
*
- * @param string $symbol ETF symbol. (optional)
- * @param string $isin ETF isin. (optional)
- * @param int $skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set. (optional)
- * @param string $date Query holdings by date. You can use either this param or <code>skip</code> param, not both. (optional)
+ * @param string $code Economic code. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\ETFsHoldings
+ * @return \Finnhub\Model\EconomicData
*/
- public function etfsHoldings($symbol = null, $isin = null, $skip = null, $date = null)
+ public function economicData($code)
{
- list($response) = $this->etfsHoldingsWithHttpInfo($symbol, $isin, $skip, $date);
+ list($response) = $this->economicDataWithHttpInfo($code);
return $response;
}
/**
- * Operation etfsHoldingsWithHttpInfo
+ * Operation economicDataWithHttpInfo
*
- * ETFs Holdings
+ * Economic Data
*
- * @param string $symbol ETF symbol. (optional)
- * @param string $isin ETF isin. (optional)
- * @param int $skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set. (optional)
- * @param string $date Query holdings by date. You can use either this param or <code>skip</code> param, not both. (optional)
+ * @param string $code Economic code. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\ETFsHoldings, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\EconomicData, HTTP status code, HTTP response headers (array of strings)
*/
- public function etfsHoldingsWithHttpInfo($symbol = null, $isin = null, $skip = null, $date = null)
+ public function economicDataWithHttpInfo($code)
{
- $request = $this->etfsHoldingsRequest($symbol, $isin, $skip, $date);
+ $request = $this->economicDataRequest($code);
try {
$options = $this->createHttpClientOption();
@@ -8606,20 +8630,20 @@ public function etfsHoldingsWithHttpInfo($symbol = null, $isin = null, $skip = n
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\ETFsHoldings' === '\SplFileObject') {
+ if ('\Finnhub\Model\EconomicData' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\ETFsHoldings', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\EconomicData', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\ETFsHoldings';
+ $returnType = '\Finnhub\Model\EconomicData';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -8637,7 +8661,7 @@ public function etfsHoldingsWithHttpInfo($symbol = null, $isin = null, $skip = n
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\ETFsHoldings',
+ '\Finnhub\Model\EconomicData',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -8648,21 +8672,18 @@ public function etfsHoldingsWithHttpInfo($symbol = null, $isin = null, $skip = n
}
/**
- * Operation etfsHoldingsAsync
+ * Operation economicDataAsync
*
- * ETFs Holdings
+ * Economic Data
*
- * @param string $symbol ETF symbol. (optional)
- * @param string $isin ETF isin. (optional)
- * @param int $skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set. (optional)
- * @param string $date Query holdings by date. You can use either this param or <code>skip</code> param, not both. (optional)
+ * @param string $code Economic code. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function etfsHoldingsAsync($symbol = null, $isin = null, $skip = null, $date = null)
+ public function economicDataAsync($code)
{
- return $this->etfsHoldingsAsyncWithHttpInfo($symbol, $isin, $skip, $date)
+ return $this->economicDataAsyncWithHttpInfo($code)
->then(
function ($response) {
return $response[0];
@@ -8671,22 +8692,19 @@ function ($response) {
}
/**
- * Operation etfsHoldingsAsyncWithHttpInfo
+ * Operation economicDataAsyncWithHttpInfo
*
- * ETFs Holdings
+ * Economic Data
*
- * @param string $symbol ETF symbol. (optional)
- * @param string $isin ETF isin. (optional)
- * @param int $skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set. (optional)
- * @param string $date Query holdings by date. You can use either this param or <code>skip</code> param, not both. (optional)
+ * @param string $code Economic code. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function etfsHoldingsAsyncWithHttpInfo($symbol = null, $isin = null, $skip = null, $date = null)
+ public function economicDataAsyncWithHttpInfo($code)
{
- $returnType = '\Finnhub\Model\ETFsHoldings';
- $request = $this->etfsHoldingsRequest($symbol, $isin, $skip, $date);
+ $returnType = '\Finnhub\Model\EconomicData';
+ $request = $this->economicDataRequest($code);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -8722,20 +8740,23 @@ function ($exception) {
}
/**
- * Create request for operation 'etfsHoldings'
+ * Create request for operation 'economicData'
*
- * @param string $symbol ETF symbol. (optional)
- * @param string $isin ETF isin. (optional)
- * @param int $skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set. (optional)
- * @param string $date Query holdings by date. You can use either this param or <code>skip</code> param, not both. (optional)
+ * @param string $code Economic code. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function etfsHoldingsRequest($symbol = null, $isin = null, $skip = null, $date = null)
+ public function economicDataRequest($code)
{
+ // verify the required parameter 'code' is set
+ if ($code === null || (is_array($code) && count($code) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $code when calling economicData'
+ );
+ }
- $resourcePath = '/etf/holdings';
+ $resourcePath = '/economic';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -8743,32 +8764,11 @@ public function etfsHoldingsRequest($symbol = null, $isin = null, $skip = null,
$multipart = false;
// query params
- if (is_array($symbol)) {
- $symbol = ObjectSerializer::serializeCollection($symbol, '', true);
- }
- if ($symbol !== null) {
- $queryParams['symbol'] = $symbol;
- }
- // query params
- if (is_array($isin)) {
- $isin = ObjectSerializer::serializeCollection($isin, '', true);
- }
- if ($isin !== null) {
- $queryParams['isin'] = $isin;
- }
- // query params
- if (is_array($skip)) {
- $skip = ObjectSerializer::serializeCollection($skip, '', true);
- }
- if ($skip !== null) {
- $queryParams['skip'] = $skip;
- }
- // query params
- if (is_array($date)) {
- $date = ObjectSerializer::serializeCollection($date, '', true);
+ if (is_array($code)) {
+ $code = ObjectSerializer::serializeCollection($code, '', true);
}
- if ($date !== null) {
- $queryParams['date'] = $date;
+ if ($code !== null) {
+ $queryParams['code'] = $code;
}
@@ -8837,38 +8837,38 @@ public function etfsHoldingsRequest($symbol = null, $isin = null, $skip = null,
}
/**
- * Operation etfsProfile
+ * Operation etfsCountryExposure
*
- * ETFs Profile
+ * ETFs Country Exposure
*
* @param string $symbol ETF symbol. (optional)
* @param string $isin ETF isin. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\ETFsProfile
+ * @return \Finnhub\Model\ETFsCountryExposure
*/
- public function etfsProfile($symbol = null, $isin = null)
+ public function etfsCountryExposure($symbol = null, $isin = null)
{
- list($response) = $this->etfsProfileWithHttpInfo($symbol, $isin);
+ list($response) = $this->etfsCountryExposureWithHttpInfo($symbol, $isin);
return $response;
}
/**
- * Operation etfsProfileWithHttpInfo
+ * Operation etfsCountryExposureWithHttpInfo
*
- * ETFs Profile
+ * ETFs Country Exposure
*
* @param string $symbol ETF symbol. (optional)
* @param string $isin ETF isin. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\ETFsProfile, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\ETFsCountryExposure, HTTP status code, HTTP response headers (array of strings)
*/
- public function etfsProfileWithHttpInfo($symbol = null, $isin = null)
+ public function etfsCountryExposureWithHttpInfo($symbol = null, $isin = null)
{
- $request = $this->etfsProfileRequest($symbol, $isin);
+ $request = $this->etfsCountryExposureRequest($symbol, $isin);
try {
$options = $this->createHttpClientOption();
@@ -8900,20 +8900,20 @@ public function etfsProfileWithHttpInfo($symbol = null, $isin = null)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\ETFsProfile' === '\SplFileObject') {
+ if ('\Finnhub\Model\ETFsCountryExposure' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\ETFsProfile', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\ETFsCountryExposure', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\ETFsProfile';
+ $returnType = '\Finnhub\Model\ETFsCountryExposure';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -8931,7 +8931,7 @@ public function etfsProfileWithHttpInfo($symbol = null, $isin = null)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\ETFsProfile',
+ '\Finnhub\Model\ETFsCountryExposure',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -8942,9 +8942,9 @@ public function etfsProfileWithHttpInfo($symbol = null, $isin = null)
}
/**
- * Operation etfsProfileAsync
+ * Operation etfsCountryExposureAsync
*
- * ETFs Profile
+ * ETFs Country Exposure
*
* @param string $symbol ETF symbol. (optional)
* @param string $isin ETF isin. (optional)
@@ -8952,9 +8952,9 @@ public function etfsProfileWithHttpInfo($symbol = null, $isin = null)
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function etfsProfileAsync($symbol = null, $isin = null)
+ public function etfsCountryExposureAsync($symbol = null, $isin = null)
{
- return $this->etfsProfileAsyncWithHttpInfo($symbol, $isin)
+ return $this->etfsCountryExposureAsyncWithHttpInfo($symbol, $isin)
->then(
function ($response) {
return $response[0];
@@ -8963,9 +8963,9 @@ function ($response) {
}
/**
- * Operation etfsProfileAsyncWithHttpInfo
+ * Operation etfsCountryExposureAsyncWithHttpInfo
*
- * ETFs Profile
+ * ETFs Country Exposure
*
* @param string $symbol ETF symbol. (optional)
* @param string $isin ETF isin. (optional)
@@ -8973,10 +8973,10 @@ function ($response) {
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function etfsProfileAsyncWithHttpInfo($symbol = null, $isin = null)
+ public function etfsCountryExposureAsyncWithHttpInfo($symbol = null, $isin = null)
{
- $returnType = '\Finnhub\Model\ETFsProfile';
- $request = $this->etfsProfileRequest($symbol, $isin);
+ $returnType = '\Finnhub\Model\ETFsCountryExposure';
+ $request = $this->etfsCountryExposureRequest($symbol, $isin);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -9012,7 +9012,7 @@ function ($exception) {
}
/**
- * Create request for operation 'etfsProfile'
+ * Create request for operation 'etfsCountryExposure'
*
* @param string $symbol ETF symbol. (optional)
* @param string $isin ETF isin. (optional)
@@ -9020,10 +9020,10 @@ function ($exception) {
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function etfsProfileRequest($symbol = null, $isin = null)
+ public function etfsCountryExposureRequest($symbol = null, $isin = null)
{
- $resourcePath = '/etf/profile';
+ $resourcePath = '/etf/country';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -9111,38 +9111,42 @@ public function etfsProfileRequest($symbol = null, $isin = null)
}
/**
- * Operation etfsSectorExposure
+ * Operation etfsHoldings
*
- * ETFs Sector Exposure
+ * ETFs Holdings
*
* @param string $symbol ETF symbol. (optional)
* @param string $isin ETF isin. (optional)
+ * @param int $skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set. (optional)
+ * @param string $date Query holdings by date. You can use either this param or <code>skip</code> param, not both. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\ETFsSectorExposure
+ * @return \Finnhub\Model\ETFsHoldings
*/
- public function etfsSectorExposure($symbol = null, $isin = null)
+ public function etfsHoldings($symbol = null, $isin = null, $skip = null, $date = null)
{
- list($response) = $this->etfsSectorExposureWithHttpInfo($symbol, $isin);
+ list($response) = $this->etfsHoldingsWithHttpInfo($symbol, $isin, $skip, $date);
return $response;
}
/**
- * Operation etfsSectorExposureWithHttpInfo
+ * Operation etfsHoldingsWithHttpInfo
*
- * ETFs Sector Exposure
+ * ETFs Holdings
*
* @param string $symbol ETF symbol. (optional)
* @param string $isin ETF isin. (optional)
+ * @param int $skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set. (optional)
+ * @param string $date Query holdings by date. You can use either this param or <code>skip</code> param, not both. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\ETFsSectorExposure, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\ETFsHoldings, HTTP status code, HTTP response headers (array of strings)
*/
- public function etfsSectorExposureWithHttpInfo($symbol = null, $isin = null)
+ public function etfsHoldingsWithHttpInfo($symbol = null, $isin = null, $skip = null, $date = null)
{
- $request = $this->etfsSectorExposureRequest($symbol, $isin);
+ $request = $this->etfsHoldingsRequest($symbol, $isin, $skip, $date);
try {
$options = $this->createHttpClientOption();
@@ -9174,20 +9178,20 @@ public function etfsSectorExposureWithHttpInfo($symbol = null, $isin = null)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\ETFsSectorExposure' === '\SplFileObject') {
+ if ('\Finnhub\Model\ETFsHoldings' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\ETFsSectorExposure', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\ETFsHoldings', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\ETFsSectorExposure';
+ $returnType = '\Finnhub\Model\ETFsHoldings';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -9205,7 +9209,7 @@ public function etfsSectorExposureWithHttpInfo($symbol = null, $isin = null)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\ETFsSectorExposure',
+ '\Finnhub\Model\ETFsHoldings',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -9216,19 +9220,21 @@ public function etfsSectorExposureWithHttpInfo($symbol = null, $isin = null)
}
/**
- * Operation etfsSectorExposureAsync
+ * Operation etfsHoldingsAsync
*
- * ETFs Sector Exposure
+ * ETFs Holdings
*
* @param string $symbol ETF symbol. (optional)
* @param string $isin ETF isin. (optional)
+ * @param int $skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set. (optional)
+ * @param string $date Query holdings by date. You can use either this param or <code>skip</code> param, not both. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function etfsSectorExposureAsync($symbol = null, $isin = null)
+ public function etfsHoldingsAsync($symbol = null, $isin = null, $skip = null, $date = null)
{
- return $this->etfsSectorExposureAsyncWithHttpInfo($symbol, $isin)
+ return $this->etfsHoldingsAsyncWithHttpInfo($symbol, $isin, $skip, $date)
->then(
function ($response) {
return $response[0];
@@ -9237,20 +9243,22 @@ function ($response) {
}
/**
- * Operation etfsSectorExposureAsyncWithHttpInfo
+ * Operation etfsHoldingsAsyncWithHttpInfo
*
- * ETFs Sector Exposure
+ * ETFs Holdings
*
* @param string $symbol ETF symbol. (optional)
* @param string $isin ETF isin. (optional)
+ * @param int $skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set. (optional)
+ * @param string $date Query holdings by date. You can use either this param or <code>skip</code> param, not both. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function etfsSectorExposureAsyncWithHttpInfo($symbol = null, $isin = null)
+ public function etfsHoldingsAsyncWithHttpInfo($symbol = null, $isin = null, $skip = null, $date = null)
{
- $returnType = '\Finnhub\Model\ETFsSectorExposure';
- $request = $this->etfsSectorExposureRequest($symbol, $isin);
+ $returnType = '\Finnhub\Model\ETFsHoldings';
+ $request = $this->etfsHoldingsRequest($symbol, $isin, $skip, $date);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -9286,18 +9294,20 @@ function ($exception) {
}
/**
- * Create request for operation 'etfsSectorExposure'
+ * Create request for operation 'etfsHoldings'
*
* @param string $symbol ETF symbol. (optional)
* @param string $isin ETF isin. (optional)
+ * @param int $skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set. (optional)
+ * @param string $date Query holdings by date. You can use either this param or <code>skip</code> param, not both. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function etfsSectorExposureRequest($symbol = null, $isin = null)
+ public function etfsHoldingsRequest($symbol = null, $isin = null, $skip = null, $date = null)
{
- $resourcePath = '/etf/sector';
+ $resourcePath = '/etf/holdings';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -9318,6 +9328,20 @@ public function etfsSectorExposureRequest($symbol = null, $isin = null)
if ($isin !== null) {
$queryParams['isin'] = $isin;
}
+ // query params
+ if (is_array($skip)) {
+ $skip = ObjectSerializer::serializeCollection($skip, '', true);
+ }
+ if ($skip !== null) {
+ $queryParams['skip'] = $skip;
+ }
+ // query params
+ if (is_array($date)) {
+ $date = ObjectSerializer::serializeCollection($date, '', true);
+ }
+ if ($date !== null) {
+ $queryParams['date'] = $date;
+ }
@@ -9385,34 +9409,38 @@ public function etfsSectorExposureRequest($symbol = null, $isin = null)
}
/**
- * Operation fdaCommitteeMeetingCalendar
+ * Operation etfsProfile
*
- * FDA Committee Meeting Calendar
+ * ETFs Profile
*
+ * @param string $symbol ETF symbol. (optional)
+ * @param string $isin ETF isin. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\FDAComitteeMeeting[]
+ * @return \Finnhub\Model\ETFsProfile
*/
- public function fdaCommitteeMeetingCalendar()
+ public function etfsProfile($symbol = null, $isin = null)
{
- list($response) = $this->fdaCommitteeMeetingCalendarWithHttpInfo();
+ list($response) = $this->etfsProfileWithHttpInfo($symbol, $isin);
return $response;
}
/**
- * Operation fdaCommitteeMeetingCalendarWithHttpInfo
+ * Operation etfsProfileWithHttpInfo
*
- * FDA Committee Meeting Calendar
+ * ETFs Profile
*
+ * @param string $symbol ETF symbol. (optional)
+ * @param string $isin ETF isin. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\FDAComitteeMeeting[], HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\ETFsProfile, HTTP status code, HTTP response headers (array of strings)
*/
- public function fdaCommitteeMeetingCalendarWithHttpInfo()
+ public function etfsProfileWithHttpInfo($symbol = null, $isin = null)
{
- $request = $this->fdaCommitteeMeetingCalendarRequest();
+ $request = $this->etfsProfileRequest($symbol, $isin);
try {
$options = $this->createHttpClientOption();
@@ -9444,20 +9472,20 @@ public function fdaCommitteeMeetingCalendarWithHttpInfo()
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\FDAComitteeMeeting[]' === '\SplFileObject') {
+ if ('\Finnhub\Model\ETFsProfile' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\FDAComitteeMeeting[]', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\ETFsProfile', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\FDAComitteeMeeting[]';
+ $returnType = '\Finnhub\Model\ETFsProfile';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -9475,7 +9503,7 @@ public function fdaCommitteeMeetingCalendarWithHttpInfo()
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\FDAComitteeMeeting[]',
+ '\Finnhub\Model\ETFsProfile',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -9486,17 +9514,19 @@ public function fdaCommitteeMeetingCalendarWithHttpInfo()
}
/**
- * Operation fdaCommitteeMeetingCalendarAsync
+ * Operation etfsProfileAsync
*
- * FDA Committee Meeting Calendar
+ * ETFs Profile
*
+ * @param string $symbol ETF symbol. (optional)
+ * @param string $isin ETF isin. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function fdaCommitteeMeetingCalendarAsync()
+ public function etfsProfileAsync($symbol = null, $isin = null)
{
- return $this->fdaCommitteeMeetingCalendarAsyncWithHttpInfo()
+ return $this->etfsProfileAsyncWithHttpInfo($symbol, $isin)
->then(
function ($response) {
return $response[0];
@@ -9505,18 +9535,20 @@ function ($response) {
}
/**
- * Operation fdaCommitteeMeetingCalendarAsyncWithHttpInfo
+ * Operation etfsProfileAsyncWithHttpInfo
*
- * FDA Committee Meeting Calendar
+ * ETFs Profile
*
+ * @param string $symbol ETF symbol. (optional)
+ * @param string $isin ETF isin. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function fdaCommitteeMeetingCalendarAsyncWithHttpInfo()
+ public function etfsProfileAsyncWithHttpInfo($symbol = null, $isin = null)
{
- $returnType = '\Finnhub\Model\FDAComitteeMeeting[]';
- $request = $this->fdaCommitteeMeetingCalendarRequest();
+ $returnType = '\Finnhub\Model\ETFsProfile';
+ $request = $this->etfsProfileRequest($symbol, $isin);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -9552,22 +9584,38 @@ function ($exception) {
}
/**
- * Create request for operation 'fdaCommitteeMeetingCalendar'
+ * Create request for operation 'etfsProfile'
*
+ * @param string $symbol ETF symbol. (optional)
+ * @param string $isin ETF isin. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function fdaCommitteeMeetingCalendarRequest()
+ public function etfsProfileRequest($symbol = null, $isin = null)
{
- $resourcePath = '/fda-advisory-committee-calendar';
+ $resourcePath = '/etf/profile';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
+ // query params
+ if (is_array($symbol)) {
+ $symbol = ObjectSerializer::serializeCollection($symbol, '', true);
+ }
+ if ($symbol !== null) {
+ $queryParams['symbol'] = $symbol;
+ }
+ // query params
+ if (is_array($isin)) {
+ $isin = ObjectSerializer::serializeCollection($isin, '', true);
+ }
+ if ($isin !== null) {
+ $queryParams['isin'] = $isin;
+ }
@@ -9635,46 +9683,38 @@ public function fdaCommitteeMeetingCalendarRequest()
}
/**
- * Operation filings
+ * Operation etfsSectorExposure
*
- * SEC Filings
+ * ETFs Sector Exposure
*
- * @param string $symbol Symbol. Leave <code>symbol</code>,<code>cik</code> and <code>accessNumber</code> empty to list latest filings. (optional)
- * @param string $cik CIK. (optional)
- * @param string $access_number Access number of a specific report you want to retrieve data from. (optional)
- * @param string $form Filter by form. You can use this value <code>NT 10-K</code> to find non-timely filings for a company. (optional)
- * @param \DateTime $from From date: 2020-03-15. (optional)
- * @param \DateTime $to To date: 2020-03-16. (optional)
+ * @param string $symbol ETF symbol. (optional)
+ * @param string $isin ETF isin. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\Filing[]
+ * @return \Finnhub\Model\ETFsSectorExposure
*/
- public function filings($symbol = null, $cik = null, $access_number = null, $form = null, $from = null, $to = null)
+ public function etfsSectorExposure($symbol = null, $isin = null)
{
- list($response) = $this->filingsWithHttpInfo($symbol, $cik, $access_number, $form, $from, $to);
+ list($response) = $this->etfsSectorExposureWithHttpInfo($symbol, $isin);
return $response;
}
/**
- * Operation filingsWithHttpInfo
+ * Operation etfsSectorExposureWithHttpInfo
*
- * SEC Filings
+ * ETFs Sector Exposure
*
- * @param string $symbol Symbol. Leave <code>symbol</code>,<code>cik</code> and <code>accessNumber</code> empty to list latest filings. (optional)
- * @param string $cik CIK. (optional)
- * @param string $access_number Access number of a specific report you want to retrieve data from. (optional)
- * @param string $form Filter by form. You can use this value <code>NT 10-K</code> to find non-timely filings for a company. (optional)
- * @param \DateTime $from From date: 2020-03-15. (optional)
- * @param \DateTime $to To date: 2020-03-16. (optional)
+ * @param string $symbol ETF symbol. (optional)
+ * @param string $isin ETF isin. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\Filing[], HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\ETFsSectorExposure, HTTP status code, HTTP response headers (array of strings)
*/
- public function filingsWithHttpInfo($symbol = null, $cik = null, $access_number = null, $form = null, $from = null, $to = null)
+ public function etfsSectorExposureWithHttpInfo($symbol = null, $isin = null)
{
- $request = $this->filingsRequest($symbol, $cik, $access_number, $form, $from, $to);
+ $request = $this->etfsSectorExposureRequest($symbol, $isin);
try {
$options = $this->createHttpClientOption();
@@ -9706,20 +9746,20 @@ public function filingsWithHttpInfo($symbol = null, $cik = null, $access_number
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\Filing[]' === '\SplFileObject') {
+ if ('\Finnhub\Model\ETFsSectorExposure' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\Filing[]', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\ETFsSectorExposure', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\Filing[]';
+ $returnType = '\Finnhub\Model\ETFsSectorExposure';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -9737,7 +9777,7 @@ public function filingsWithHttpInfo($symbol = null, $cik = null, $access_number
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\Filing[]',
+ '\Finnhub\Model\ETFsSectorExposure',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -9748,23 +9788,19 @@ public function filingsWithHttpInfo($symbol = null, $cik = null, $access_number
}
/**
- * Operation filingsAsync
+ * Operation etfsSectorExposureAsync
*
- * SEC Filings
+ * ETFs Sector Exposure
*
- * @param string $symbol Symbol. Leave <code>symbol</code>,<code>cik</code> and <code>accessNumber</code> empty to list latest filings. (optional)
- * @param string $cik CIK. (optional)
- * @param string $access_number Access number of a specific report you want to retrieve data from. (optional)
- * @param string $form Filter by form. You can use this value <code>NT 10-K</code> to find non-timely filings for a company. (optional)
- * @param \DateTime $from From date: 2020-03-15. (optional)
- * @param \DateTime $to To date: 2020-03-16. (optional)
+ * @param string $symbol ETF symbol. (optional)
+ * @param string $isin ETF isin. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function filingsAsync($symbol = null, $cik = null, $access_number = null, $form = null, $from = null, $to = null)
+ public function etfsSectorExposureAsync($symbol = null, $isin = null)
{
- return $this->filingsAsyncWithHttpInfo($symbol, $cik, $access_number, $form, $from, $to)
+ return $this->etfsSectorExposureAsyncWithHttpInfo($symbol, $isin)
->then(
function ($response) {
return $response[0];
@@ -9773,24 +9809,20 @@ function ($response) {
}
/**
- * Operation filingsAsyncWithHttpInfo
+ * Operation etfsSectorExposureAsyncWithHttpInfo
*
- * SEC Filings
+ * ETFs Sector Exposure
*
- * @param string $symbol Symbol. Leave <code>symbol</code>,<code>cik</code> and <code>accessNumber</code> empty to list latest filings. (optional)
- * @param string $cik CIK. (optional)
- * @param string $access_number Access number of a specific report you want to retrieve data from. (optional)
- * @param string $form Filter by form. You can use this value <code>NT 10-K</code> to find non-timely filings for a company. (optional)
- * @param \DateTime $from From date: 2020-03-15. (optional)
- * @param \DateTime $to To date: 2020-03-16. (optional)
+ * @param string $symbol ETF symbol. (optional)
+ * @param string $isin ETF isin. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function filingsAsyncWithHttpInfo($symbol = null, $cik = null, $access_number = null, $form = null, $from = null, $to = null)
+ public function etfsSectorExposureAsyncWithHttpInfo($symbol = null, $isin = null)
{
- $returnType = '\Finnhub\Model\Filing[]';
- $request = $this->filingsRequest($symbol, $cik, $access_number, $form, $from, $to);
+ $returnType = '\Finnhub\Model\ETFsSectorExposure';
+ $request = $this->etfsSectorExposureRequest($symbol, $isin);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -9826,22 +9858,18 @@ function ($exception) {
}
/**
- * Create request for operation 'filings'
+ * Create request for operation 'etfsSectorExposure'
*
- * @param string $symbol Symbol. Leave <code>symbol</code>,<code>cik</code> and <code>accessNumber</code> empty to list latest filings. (optional)
- * @param string $cik CIK. (optional)
- * @param string $access_number Access number of a specific report you want to retrieve data from. (optional)
- * @param string $form Filter by form. You can use this value <code>NT 10-K</code> to find non-timely filings for a company. (optional)
- * @param \DateTime $from From date: 2020-03-15. (optional)
- * @param \DateTime $to To date: 2020-03-16. (optional)
+ * @param string $symbol ETF symbol. (optional)
+ * @param string $isin ETF isin. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function filingsRequest($symbol = null, $cik = null, $access_number = null, $form = null, $from = null, $to = null)
+ public function etfsSectorExposureRequest($symbol = null, $isin = null)
{
- $resourcePath = '/stock/filings';
+ $resourcePath = '/etf/sector';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -9856,39 +9884,11 @@ public function filingsRequest($symbol = null, $cik = null, $access_number = nul
$queryParams['symbol'] = $symbol;
}
// query params
- if (is_array($cik)) {
- $cik = ObjectSerializer::serializeCollection($cik, '', true);
+ if (is_array($isin)) {
+ $isin = ObjectSerializer::serializeCollection($isin, '', true);
}
- if ($cik !== null) {
- $queryParams['cik'] = $cik;
- }
- // query params
- if (is_array($access_number)) {
- $access_number = ObjectSerializer::serializeCollection($access_number, '', true);
- }
- if ($access_number !== null) {
- $queryParams['accessNumber'] = $access_number;
- }
- // query params
- if (is_array($form)) {
- $form = ObjectSerializer::serializeCollection($form, '', true);
- }
- if ($form !== null) {
- $queryParams['form'] = $form;
- }
- // query params
- if (is_array($from)) {
- $from = ObjectSerializer::serializeCollection($from, '', true);
- }
- if ($from !== null) {
- $queryParams['from'] = $from;
- }
- // query params
- if (is_array($to)) {
- $to = ObjectSerializer::serializeCollection($to, '', true);
- }
- if ($to !== null) {
- $queryParams['to'] = $to;
+ if ($isin !== null) {
+ $queryParams['isin'] = $isin;
}
@@ -9957,36 +9957,34 @@ public function filingsRequest($symbol = null, $cik = null, $access_number = nul
}
/**
- * Operation filingsSentiment
+ * Operation fdaCommitteeMeetingCalendar
*
- * SEC Sentiment Analysis
+ * FDA Committee Meeting Calendar
*
- * @param string $access_number Access number of a specific report you want to retrieve data from. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\SECSentimentAnalysis
+ * @return \Finnhub\Model\FDAComitteeMeeting[]
*/
- public function filingsSentiment($access_number)
+ public function fdaCommitteeMeetingCalendar()
{
- list($response) = $this->filingsSentimentWithHttpInfo($access_number);
+ list($response) = $this->fdaCommitteeMeetingCalendarWithHttpInfo();
return $response;
}
/**
- * Operation filingsSentimentWithHttpInfo
+ * Operation fdaCommitteeMeetingCalendarWithHttpInfo
*
- * SEC Sentiment Analysis
+ * FDA Committee Meeting Calendar
*
- * @param string $access_number Access number of a specific report you want to retrieve data from. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\SECSentimentAnalysis, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\FDAComitteeMeeting[], HTTP status code, HTTP response headers (array of strings)
*/
- public function filingsSentimentWithHttpInfo($access_number)
+ public function fdaCommitteeMeetingCalendarWithHttpInfo()
{
- $request = $this->filingsSentimentRequest($access_number);
+ $request = $this->fdaCommitteeMeetingCalendarRequest();
try {
$options = $this->createHttpClientOption();
@@ -10018,20 +10016,20 @@ public function filingsSentimentWithHttpInfo($access_number)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\SECSentimentAnalysis' === '\SplFileObject') {
+ if ('\Finnhub\Model\FDAComitteeMeeting[]' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\SECSentimentAnalysis', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\FDAComitteeMeeting[]', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\SECSentimentAnalysis';
+ $returnType = '\Finnhub\Model\FDAComitteeMeeting[]';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -10049,7 +10047,7 @@ public function filingsSentimentWithHttpInfo($access_number)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\SECSentimentAnalysis',
+ '\Finnhub\Model\FDAComitteeMeeting[]',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -10060,18 +10058,17 @@ public function filingsSentimentWithHttpInfo($access_number)
}
/**
- * Operation filingsSentimentAsync
+ * Operation fdaCommitteeMeetingCalendarAsync
*
- * SEC Sentiment Analysis
+ * FDA Committee Meeting Calendar
*
- * @param string $access_number Access number of a specific report you want to retrieve data from. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function filingsSentimentAsync($access_number)
+ public function fdaCommitteeMeetingCalendarAsync()
{
- return $this->filingsSentimentAsyncWithHttpInfo($access_number)
+ return $this->fdaCommitteeMeetingCalendarAsyncWithHttpInfo()
->then(
function ($response) {
return $response[0];
@@ -10080,19 +10077,18 @@ function ($response) {
}
/**
- * Operation filingsSentimentAsyncWithHttpInfo
+ * Operation fdaCommitteeMeetingCalendarAsyncWithHttpInfo
*
- * SEC Sentiment Analysis
+ * FDA Committee Meeting Calendar
*
- * @param string $access_number Access number of a specific report you want to retrieve data from. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function filingsSentimentAsyncWithHttpInfo($access_number)
+ public function fdaCommitteeMeetingCalendarAsyncWithHttpInfo()
{
- $returnType = '\Finnhub\Model\SECSentimentAnalysis';
- $request = $this->filingsSentimentRequest($access_number);
+ $returnType = '\Finnhub\Model\FDAComitteeMeeting[]';
+ $request = $this->fdaCommitteeMeetingCalendarRequest();
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -10128,36 +10124,22 @@ function ($exception) {
}
/**
- * Create request for operation 'filingsSentiment'
+ * Create request for operation 'fdaCommitteeMeetingCalendar'
*
- * @param string $access_number Access number of a specific report you want to retrieve data from. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function filingsSentimentRequest($access_number)
+ public function fdaCommitteeMeetingCalendarRequest()
{
- // verify the required parameter 'access_number' is set
- if ($access_number === null || (is_array($access_number) && count($access_number) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $access_number when calling filingsSentiment'
- );
- }
- $resourcePath = '/stock/filings-sentiment';
+ $resourcePath = '/fda-advisory-committee-calendar';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
- // query params
- if (is_array($access_number)) {
- $access_number = ObjectSerializer::serializeCollection($access_number, '', true);
- }
- if ($access_number !== null) {
- $queryParams['accessNumber'] = $access_number;
- }
@@ -10225,40 +10207,46 @@ public function filingsSentimentRequest($access_number)
}
/**
- * Operation financials
+ * Operation filings
*
- * Financial Statements
+ * SEC Filings
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $statement Statement can take 1 of these values <code>bs, ic, cf</code> for Balance Sheet, Income Statement, Cash Flow respectively. (required)
- * @param string $freq Frequency can take 1 of these values <code>annual, quarterly, ttm, ytd</code>. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow. (required)
+ * @param string $symbol Symbol. Leave <code>symbol</code>,<code>cik</code> and <code>accessNumber</code> empty to list latest filings. (optional)
+ * @param string $cik CIK. (optional)
+ * @param string $access_number Access number of a specific report you want to retrieve data from. (optional)
+ * @param string $form Filter by form. You can use this value <code>NT 10-K</code> to find non-timely filings for a company. (optional)
+ * @param \DateTime $from From date: 2023-03-15. (optional)
+ * @param \DateTime $to To date: 2023-03-16. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\FinancialStatements
+ * @return \Finnhub\Model\Filing[]
*/
- public function financials($symbol, $statement, $freq)
+ public function filings($symbol = null, $cik = null, $access_number = null, $form = null, $from = null, $to = null)
{
- list($response) = $this->financialsWithHttpInfo($symbol, $statement, $freq);
+ list($response) = $this->filingsWithHttpInfo($symbol, $cik, $access_number, $form, $from, $to);
return $response;
}
/**
- * Operation financialsWithHttpInfo
+ * Operation filingsWithHttpInfo
*
- * Financial Statements
+ * SEC Filings
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $statement Statement can take 1 of these values <code>bs, ic, cf</code> for Balance Sheet, Income Statement, Cash Flow respectively. (required)
- * @param string $freq Frequency can take 1 of these values <code>annual, quarterly, ttm, ytd</code>. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow. (required)
+ * @param string $symbol Symbol. Leave <code>symbol</code>,<code>cik</code> and <code>accessNumber</code> empty to list latest filings. (optional)
+ * @param string $cik CIK. (optional)
+ * @param string $access_number Access number of a specific report you want to retrieve data from. (optional)
+ * @param string $form Filter by form. You can use this value <code>NT 10-K</code> to find non-timely filings for a company. (optional)
+ * @param \DateTime $from From date: 2023-03-15. (optional)
+ * @param \DateTime $to To date: 2023-03-16. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\FinancialStatements, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\Filing[], HTTP status code, HTTP response headers (array of strings)
*/
- public function financialsWithHttpInfo($symbol, $statement, $freq)
+ public function filingsWithHttpInfo($symbol = null, $cik = null, $access_number = null, $form = null, $from = null, $to = null)
{
- $request = $this->financialsRequest($symbol, $statement, $freq);
+ $request = $this->filingsRequest($symbol, $cik, $access_number, $form, $from, $to);
try {
$options = $this->createHttpClientOption();
@@ -10290,20 +10278,20 @@ public function financialsWithHttpInfo($symbol, $statement, $freq)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\FinancialStatements' === '\SplFileObject') {
+ if ('\Finnhub\Model\Filing[]' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\FinancialStatements', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\Filing[]', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\FinancialStatements';
+ $returnType = '\Finnhub\Model\Filing[]';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -10321,7 +10309,7 @@ public function financialsWithHttpInfo($symbol, $statement, $freq)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\FinancialStatements',
+ '\Finnhub\Model\Filing[]',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -10332,20 +10320,23 @@ public function financialsWithHttpInfo($symbol, $statement, $freq)
}
/**
- * Operation financialsAsync
+ * Operation filingsAsync
*
- * Financial Statements
+ * SEC Filings
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $statement Statement can take 1 of these values <code>bs, ic, cf</code> for Balance Sheet, Income Statement, Cash Flow respectively. (required)
- * @param string $freq Frequency can take 1 of these values <code>annual, quarterly, ttm, ytd</code>. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow. (required)
+ * @param string $symbol Symbol. Leave <code>symbol</code>,<code>cik</code> and <code>accessNumber</code> empty to list latest filings. (optional)
+ * @param string $cik CIK. (optional)
+ * @param string $access_number Access number of a specific report you want to retrieve data from. (optional)
+ * @param string $form Filter by form. You can use this value <code>NT 10-K</code> to find non-timely filings for a company. (optional)
+ * @param \DateTime $from From date: 2023-03-15. (optional)
+ * @param \DateTime $to To date: 2023-03-16. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function financialsAsync($symbol, $statement, $freq)
+ public function filingsAsync($symbol = null, $cik = null, $access_number = null, $form = null, $from = null, $to = null)
{
- return $this->financialsAsyncWithHttpInfo($symbol, $statement, $freq)
+ return $this->filingsAsyncWithHttpInfo($symbol, $cik, $access_number, $form, $from, $to)
->then(
function ($response) {
return $response[0];
@@ -10354,21 +10345,24 @@ function ($response) {
}
/**
- * Operation financialsAsyncWithHttpInfo
+ * Operation filingsAsyncWithHttpInfo
*
- * Financial Statements
+ * SEC Filings
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $statement Statement can take 1 of these values <code>bs, ic, cf</code> for Balance Sheet, Income Statement, Cash Flow respectively. (required)
- * @param string $freq Frequency can take 1 of these values <code>annual, quarterly, ttm, ytd</code>. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow. (required)
+ * @param string $symbol Symbol. Leave <code>symbol</code>,<code>cik</code> and <code>accessNumber</code> empty to list latest filings. (optional)
+ * @param string $cik CIK. (optional)
+ * @param string $access_number Access number of a specific report you want to retrieve data from. (optional)
+ * @param string $form Filter by form. You can use this value <code>NT 10-K</code> to find non-timely filings for a company. (optional)
+ * @param \DateTime $from From date: 2023-03-15. (optional)
+ * @param \DateTime $to To date: 2023-03-16. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function financialsAsyncWithHttpInfo($symbol, $statement, $freq)
+ public function filingsAsyncWithHttpInfo($symbol = null, $cik = null, $access_number = null, $form = null, $from = null, $to = null)
{
- $returnType = '\Finnhub\Model\FinancialStatements';
- $request = $this->financialsRequest($symbol, $statement, $freq);
+ $returnType = '\Finnhub\Model\Filing[]';
+ $request = $this->filingsRequest($symbol, $cik, $access_number, $form, $from, $to);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -10404,37 +10398,22 @@ function ($exception) {
}
/**
- * Create request for operation 'financials'
+ * Create request for operation 'filings'
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param string $statement Statement can take 1 of these values <code>bs, ic, cf</code> for Balance Sheet, Income Statement, Cash Flow respectively. (required)
- * @param string $freq Frequency can take 1 of these values <code>annual, quarterly, ttm, ytd</code>. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow. (required)
+ * @param string $symbol Symbol. Leave <code>symbol</code>,<code>cik</code> and <code>accessNumber</code> empty to list latest filings. (optional)
+ * @param string $cik CIK. (optional)
+ * @param string $access_number Access number of a specific report you want to retrieve data from. (optional)
+ * @param string $form Filter by form. You can use this value <code>NT 10-K</code> to find non-timely filings for a company. (optional)
+ * @param \DateTime $from From date: 2023-03-15. (optional)
+ * @param \DateTime $to To date: 2023-03-16. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function financialsRequest($symbol, $statement, $freq)
+ public function filingsRequest($symbol = null, $cik = null, $access_number = null, $form = null, $from = null, $to = null)
{
- // verify the required parameter 'symbol' is set
- if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling financials'
- );
- }
- // verify the required parameter 'statement' is set
- if ($statement === null || (is_array($statement) && count($statement) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $statement when calling financials'
- );
- }
- // verify the required parameter 'freq' is set
- if ($freq === null || (is_array($freq) && count($freq) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $freq when calling financials'
- );
- }
- $resourcePath = '/stock/financials';
+ $resourcePath = '/stock/filings';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -10449,18 +10428,39 @@ public function financialsRequest($symbol, $statement, $freq)
$queryParams['symbol'] = $symbol;
}
// query params
- if (is_array($statement)) {
- $statement = ObjectSerializer::serializeCollection($statement, '', true);
+ if (is_array($cik)) {
+ $cik = ObjectSerializer::serializeCollection($cik, '', true);
}
- if ($statement !== null) {
- $queryParams['statement'] = $statement;
+ if ($cik !== null) {
+ $queryParams['cik'] = $cik;
}
// query params
- if (is_array($freq)) {
- $freq = ObjectSerializer::serializeCollection($freq, '', true);
+ if (is_array($access_number)) {
+ $access_number = ObjectSerializer::serializeCollection($access_number, '', true);
}
- if ($freq !== null) {
- $queryParams['freq'] = $freq;
+ if ($access_number !== null) {
+ $queryParams['accessNumber'] = $access_number;
+ }
+ // query params
+ if (is_array($form)) {
+ $form = ObjectSerializer::serializeCollection($form, '', true);
+ }
+ if ($form !== null) {
+ $queryParams['form'] = $form;
+ }
+ // query params
+ if (is_array($from)) {
+ $from = ObjectSerializer::serializeCollection($from, '', true);
+ }
+ if ($from !== null) {
+ $queryParams['from'] = $from;
+ }
+ // query params
+ if (is_array($to)) {
+ $to = ObjectSerializer::serializeCollection($to, '', true);
+ }
+ if ($to !== null) {
+ $queryParams['to'] = $to;
}
@@ -10529,46 +10529,36 @@ public function financialsRequest($symbol, $statement, $freq)
}
/**
- * Operation financialsReported
+ * Operation filingsSentiment
*
- * Financials As Reported
+ * SEC Sentiment Analysis
*
- * @param string $symbol Symbol. (optional)
- * @param string $cik CIK. (optional)
- * @param string $access_number Access number of a specific report you want to retrieve financials from. (optional)
- * @param string $freq Frequency. Can be either <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>. (optional)
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
+ * @param string $access_number Access number of a specific report you want to retrieve data from. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\FinancialsAsReported
+ * @return \Finnhub\Model\SECSentimentAnalysis
*/
- public function financialsReported($symbol = null, $cik = null, $access_number = null, $freq = null, $from = null, $to = null)
+ public function filingsSentiment($access_number)
{
- list($response) = $this->financialsReportedWithHttpInfo($symbol, $cik, $access_number, $freq, $from, $to);
+ list($response) = $this->filingsSentimentWithHttpInfo($access_number);
return $response;
}
/**
- * Operation financialsReportedWithHttpInfo
+ * Operation filingsSentimentWithHttpInfo
*
- * Financials As Reported
+ * SEC Sentiment Analysis
*
- * @param string $symbol Symbol. (optional)
- * @param string $cik CIK. (optional)
- * @param string $access_number Access number of a specific report you want to retrieve financials from. (optional)
- * @param string $freq Frequency. Can be either <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>. (optional)
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
+ * @param string $access_number Access number of a specific report you want to retrieve data from. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\FinancialsAsReported, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\SECSentimentAnalysis, HTTP status code, HTTP response headers (array of strings)
*/
- public function financialsReportedWithHttpInfo($symbol = null, $cik = null, $access_number = null, $freq = null, $from = null, $to = null)
+ public function filingsSentimentWithHttpInfo($access_number)
{
- $request = $this->financialsReportedRequest($symbol, $cik, $access_number, $freq, $from, $to);
+ $request = $this->filingsSentimentRequest($access_number);
try {
$options = $this->createHttpClientOption();
@@ -10600,20 +10590,20 @@ public function financialsReportedWithHttpInfo($symbol = null, $cik = null, $acc
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\FinancialsAsReported' === '\SplFileObject') {
+ if ('\Finnhub\Model\SECSentimentAnalysis' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\FinancialsAsReported', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\SECSentimentAnalysis', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\FinancialsAsReported';
+ $returnType = '\Finnhub\Model\SECSentimentAnalysis';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -10631,7 +10621,7 @@ public function financialsReportedWithHttpInfo($symbol = null, $cik = null, $acc
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\FinancialsAsReported',
+ '\Finnhub\Model\SECSentimentAnalysis',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -10642,23 +10632,18 @@ public function financialsReportedWithHttpInfo($symbol = null, $cik = null, $acc
}
/**
- * Operation financialsReportedAsync
+ * Operation filingsSentimentAsync
*
- * Financials As Reported
+ * SEC Sentiment Analysis
*
- * @param string $symbol Symbol. (optional)
- * @param string $cik CIK. (optional)
- * @param string $access_number Access number of a specific report you want to retrieve financials from. (optional)
- * @param string $freq Frequency. Can be either <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>. (optional)
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
+ * @param string $access_number Access number of a specific report you want to retrieve data from. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function financialsReportedAsync($symbol = null, $cik = null, $access_number = null, $freq = null, $from = null, $to = null)
+ public function filingsSentimentAsync($access_number)
{
- return $this->financialsReportedAsyncWithHttpInfo($symbol, $cik, $access_number, $freq, $from, $to)
+ return $this->filingsSentimentAsyncWithHttpInfo($access_number)
->then(
function ($response) {
return $response[0];
@@ -10667,24 +10652,19 @@ function ($response) {
}
/**
- * Operation financialsReportedAsyncWithHttpInfo
+ * Operation filingsSentimentAsyncWithHttpInfo
*
- * Financials As Reported
+ * SEC Sentiment Analysis
*
- * @param string $symbol Symbol. (optional)
- * @param string $cik CIK. (optional)
- * @param string $access_number Access number of a specific report you want to retrieve financials from. (optional)
- * @param string $freq Frequency. Can be either <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>. (optional)
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
+ * @param string $access_number Access number of a specific report you want to retrieve data from. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function financialsReportedAsyncWithHttpInfo($symbol = null, $cik = null, $access_number = null, $freq = null, $from = null, $to = null)
+ public function filingsSentimentAsyncWithHttpInfo($access_number)
{
- $returnType = '\Finnhub\Model\FinancialsAsReported';
- $request = $this->financialsReportedRequest($symbol, $cik, $access_number, $freq, $from, $to);
+ $returnType = '\Finnhub\Model\SECSentimentAnalysis';
+ $request = $this->filingsSentimentRequest($access_number);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -10720,42 +10700,29 @@ function ($exception) {
}
/**
- * Create request for operation 'financialsReported'
+ * Create request for operation 'filingsSentiment'
*
- * @param string $symbol Symbol. (optional)
- * @param string $cik CIK. (optional)
- * @param string $access_number Access number of a specific report you want to retrieve financials from. (optional)
- * @param string $freq Frequency. Can be either <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>. (optional)
- * @param \DateTime $from From date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
- * @param \DateTime $to To date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
+ * @param string $access_number Access number of a specific report you want to retrieve data from. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function financialsReportedRequest($symbol = null, $cik = null, $access_number = null, $freq = null, $from = null, $to = null)
+ public function filingsSentimentRequest($access_number)
{
+ // verify the required parameter 'access_number' is set
+ if ($access_number === null || (is_array($access_number) && count($access_number) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $access_number when calling filingsSentiment'
+ );
+ }
- $resourcePath = '/stock/financials-reported';
+ $resourcePath = '/stock/filings-sentiment';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
- // query params
- if (is_array($symbol)) {
- $symbol = ObjectSerializer::serializeCollection($symbol, '', true);
- }
- if ($symbol !== null) {
- $queryParams['symbol'] = $symbol;
- }
- // query params
- if (is_array($cik)) {
- $cik = ObjectSerializer::serializeCollection($cik, '', true);
- }
- if ($cik !== null) {
- $queryParams['cik'] = $cik;
- }
// query params
if (is_array($access_number)) {
$access_number = ObjectSerializer::serializeCollection($access_number, '', true);
@@ -10763,28 +10730,1205 @@ public function financialsReportedRequest($symbol = null, $cik = null, $access_n
if ($access_number !== null) {
$queryParams['accessNumber'] = $access_number;
}
- // query params
- if (is_array($freq)) {
- $freq = ObjectSerializer::serializeCollection($freq, '', true);
- }
- if ($freq !== null) {
- $queryParams['freq'] = $freq;
- }
- // query params
- if (is_array($from)) {
- $from = ObjectSerializer::serializeCollection($from, '', true);
+
+
+
+
+ if ($multipart) {
+ $headers = $this->headerSelector->selectHeadersForMultipart(
+ ['application/json']
+ );
+ } else {
+ $headers = $this->headerSelector->selectHeaders(
+ ['application/json'],
+ []
+ );
}
- if ($from !== null) {
- $queryParams['from'] = $from;
+
+ // for model (json/xml)
+ if (count($formParams) > 0) {
+ if ($multipart) {
+ $multipartContents = [];
+ foreach ($formParams as $formParamName => $formParamValue) {
+ $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
+ foreach ($formParamValueItems as $formParamValueItem) {
+ $multipartContents[] = [
+ 'name' => $formParamName,
+ 'contents' => $formParamValueItem
+ ];
+ }
+ }
+ // for HTTP post (form)
+ $httpBody = new MultipartStream($multipartContents);
+
+ } elseif ($headers['Content-Type'] === 'application/json') {
+ $httpBody = \GuzzleHttp\json_encode($formParams);
+
+ } else {
+ // for HTTP post (form)
+ $httpBody = \GuzzleHttp\Psr7\build_query($formParams);
+ }
}
- // query params
- if (is_array($to)) {
- $to = ObjectSerializer::serializeCollection($to, '', true);
+
+ // this endpoint requires API key authentication
+ $apiKey = $this->config->getApiKeyWithPrefix('token');
+ if ($apiKey !== null) {
+ $queryParams['token'] = $apiKey;
}
- if ($to !== null) {
- $queryParams['to'] = $to;
+
+ $defaultHeaders = [];
+ if ($this->config->getUserAgent()) {
+ $defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
+ $headers = array_merge(
+ $defaultHeaders,
+ $headerParams,
+ $headers
+ );
+
+ $query = \GuzzleHttp\Psr7\build_query($queryParams);
+ return new Request(
+ 'GET',
+ $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
+ $headers,
+ $httpBody
+ );
+ }
+
+ /**
+ * Operation financials
+ *
+ * Financial Statements
+ *
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $statement Statement can take 1 of these values <code>bs, ic, cf</code> for Balance Sheet, Income Statement, Cash Flow respectively. (required)
+ * @param string $freq Frequency can take 1 of these values <code>annual, quarterly, ttm, ytd</code>. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow. (required)
+ *
+ * @throws \Finnhub\ApiException on non-2xx response
+ * @throws \InvalidArgumentException
+ * @return \Finnhub\Model\FinancialStatements
+ */
+ public function financials($symbol, $statement, $freq)
+ {
+ list($response) = $this->financialsWithHttpInfo($symbol, $statement, $freq);
+ return $response;
+ }
+
+ /**
+ * Operation financialsWithHttpInfo
+ *
+ * Financial Statements
+ *
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $statement Statement can take 1 of these values <code>bs, ic, cf</code> for Balance Sheet, Income Statement, Cash Flow respectively. (required)
+ * @param string $freq Frequency can take 1 of these values <code>annual, quarterly, ttm, ytd</code>. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow. (required)
+ *
+ * @throws \Finnhub\ApiException on non-2xx response
+ * @throws \InvalidArgumentException
+ * @return array of \Finnhub\Model\FinancialStatements, HTTP status code, HTTP response headers (array of strings)
+ */
+ public function financialsWithHttpInfo($symbol, $statement, $freq)
+ {
+ $request = $this->financialsRequest($symbol, $statement, $freq);
+
+ try {
+ $options = $this->createHttpClientOption();
+ try {
+ $response = $this->client->send($request, $options);
+ } catch (RequestException $e) {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ $e->getResponse() ? $e->getResponse()->getHeaders() : null,
+ $e->getResponse() ? (string) $e->getResponse()->getBody() : null
+ );
+ }
+
+ $statusCode = $response->getStatusCode();
+
+ if ($statusCode < 200 || $statusCode > 299) {
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ (string) $request->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+
+ switch($statusCode) {
+ case 200:
+ if ('\Finnhub\Model\FinancialStatements' === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\FinancialStatements', []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ }
+
+ $returnType = '\Finnhub\Model\FinancialStatements';
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+
+ } catch (ApiException $e) {
+ switch ($e->getCode()) {
+ case 200:
+ $data = ObjectSerializer::deserialize(
+ $e->getResponseBody(),
+ '\Finnhub\Model\FinancialStatements',
+ $e->getResponseHeaders()
+ );
+ $e->setResponseObject($data);
+ break;
+ }
+ throw $e;
+ }
+ }
+
+ /**
+ * Operation financialsAsync
+ *
+ * Financial Statements
+ *
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $statement Statement can take 1 of these values <code>bs, ic, cf</code> for Balance Sheet, Income Statement, Cash Flow respectively. (required)
+ * @param string $freq Frequency can take 1 of these values <code>annual, quarterly, ttm, ytd</code>. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow. (required)
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Promise\PromiseInterface
+ */
+ public function financialsAsync($symbol, $statement, $freq)
+ {
+ return $this->financialsAsyncWithHttpInfo($symbol, $statement, $freq)
+ ->then(
+ function ($response) {
+ return $response[0];
+ }
+ );
+ }
+
+ /**
+ * Operation financialsAsyncWithHttpInfo
+ *
+ * Financial Statements
+ *
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $statement Statement can take 1 of these values <code>bs, ic, cf</code> for Balance Sheet, Income Statement, Cash Flow respectively. (required)
+ * @param string $freq Frequency can take 1 of these values <code>annual, quarterly, ttm, ytd</code>. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow. (required)
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Promise\PromiseInterface
+ */
+ public function financialsAsyncWithHttpInfo($symbol, $statement, $freq)
+ {
+ $returnType = '\Finnhub\Model\FinancialStatements';
+ $request = $this->financialsRequest($symbol, $statement, $freq);
+
+ return $this->client
+ ->sendAsync($request, $this->createHttpClientOption())
+ ->then(
+ function ($response) use ($returnType) {
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ },
+ function ($exception) {
+ $response = $exception->getResponse();
+ $statusCode = $response->getStatusCode();
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ $exception->getRequest()->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+ );
+ }
+
+ /**
+ * Create request for operation 'financials'
+ *
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param string $statement Statement can take 1 of these values <code>bs, ic, cf</code> for Balance Sheet, Income Statement, Cash Flow respectively. (required)
+ * @param string $freq Frequency can take 1 of these values <code>annual, quarterly, ttm, ytd</code>. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow. (required)
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Psr7\Request
+ */
+ public function financialsRequest($symbol, $statement, $freq)
+ {
+ // verify the required parameter 'symbol' is set
+ if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $symbol when calling financials'
+ );
+ }
+ // verify the required parameter 'statement' is set
+ if ($statement === null || (is_array($statement) && count($statement) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $statement when calling financials'
+ );
+ }
+ // verify the required parameter 'freq' is set
+ if ($freq === null || (is_array($freq) && count($freq) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $freq when calling financials'
+ );
+ }
+
+ $resourcePath = '/stock/financials';
+ $formParams = [];
+ $queryParams = [];
+ $headerParams = [];
+ $httpBody = '';
+ $multipart = false;
+
+ // query params
+ if (is_array($symbol)) {
+ $symbol = ObjectSerializer::serializeCollection($symbol, '', true);
+ }
+ if ($symbol !== null) {
+ $queryParams['symbol'] = $symbol;
+ }
+ // query params
+ if (is_array($statement)) {
+ $statement = ObjectSerializer::serializeCollection($statement, '', true);
+ }
+ if ($statement !== null) {
+ $queryParams['statement'] = $statement;
+ }
+ // query params
+ if (is_array($freq)) {
+ $freq = ObjectSerializer::serializeCollection($freq, '', true);
+ }
+ if ($freq !== null) {
+ $queryParams['freq'] = $freq;
+ }
+
+
+
+
+ if ($multipart) {
+ $headers = $this->headerSelector->selectHeadersForMultipart(
+ ['application/json']
+ );
+ } else {
+ $headers = $this->headerSelector->selectHeaders(
+ ['application/json'],
+ []
+ );
+ }
+
+ // for model (json/xml)
+ if (count($formParams) > 0) {
+ if ($multipart) {
+ $multipartContents = [];
+ foreach ($formParams as $formParamName => $formParamValue) {
+ $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
+ foreach ($formParamValueItems as $formParamValueItem) {
+ $multipartContents[] = [
+ 'name' => $formParamName,
+ 'contents' => $formParamValueItem
+ ];
+ }
+ }
+ // for HTTP post (form)
+ $httpBody = new MultipartStream($multipartContents);
+
+ } elseif ($headers['Content-Type'] === 'application/json') {
+ $httpBody = \GuzzleHttp\json_encode($formParams);
+
+ } else {
+ // for HTTP post (form)
+ $httpBody = \GuzzleHttp\Psr7\build_query($formParams);
+ }
+ }
+
+ // this endpoint requires API key authentication
+ $apiKey = $this->config->getApiKeyWithPrefix('token');
+ if ($apiKey !== null) {
+ $queryParams['token'] = $apiKey;
+ }
+
+ $defaultHeaders = [];
+ if ($this->config->getUserAgent()) {
+ $defaultHeaders['User-Agent'] = $this->config->getUserAgent();
+ }
+
+ $headers = array_merge(
+ $defaultHeaders,
+ $headerParams,
+ $headers
+ );
+
+ $query = \GuzzleHttp\Psr7\build_query($queryParams);
+ return new Request(
+ 'GET',
+ $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
+ $headers,
+ $httpBody
+ );
+ }
+
+ /**
+ * Operation financialsReported
+ *
+ * Financials As Reported
+ *
+ * @param string $symbol Symbol. (optional)
+ * @param string $cik CIK. (optional)
+ * @param string $access_number Access number of a specific report you want to retrieve financials from. (optional)
+ * @param string $freq Frequency. Can be either <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>. (optional)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
+ *
+ * @throws \Finnhub\ApiException on non-2xx response
+ * @throws \InvalidArgumentException
+ * @return \Finnhub\Model\FinancialsAsReported
+ */
+ public function financialsReported($symbol = null, $cik = null, $access_number = null, $freq = null, $from = null, $to = null)
+ {
+ list($response) = $this->financialsReportedWithHttpInfo($symbol, $cik, $access_number, $freq, $from, $to);
+ return $response;
+ }
+
+ /**
+ * Operation financialsReportedWithHttpInfo
+ *
+ * Financials As Reported
+ *
+ * @param string $symbol Symbol. (optional)
+ * @param string $cik CIK. (optional)
+ * @param string $access_number Access number of a specific report you want to retrieve financials from. (optional)
+ * @param string $freq Frequency. Can be either <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>. (optional)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
+ *
+ * @throws \Finnhub\ApiException on non-2xx response
+ * @throws \InvalidArgumentException
+ * @return array of \Finnhub\Model\FinancialsAsReported, HTTP status code, HTTP response headers (array of strings)
+ */
+ public function financialsReportedWithHttpInfo($symbol = null, $cik = null, $access_number = null, $freq = null, $from = null, $to = null)
+ {
+ $request = $this->financialsReportedRequest($symbol, $cik, $access_number, $freq, $from, $to);
+
+ try {
+ $options = $this->createHttpClientOption();
+ try {
+ $response = $this->client->send($request, $options);
+ } catch (RequestException $e) {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ $e->getResponse() ? $e->getResponse()->getHeaders() : null,
+ $e->getResponse() ? (string) $e->getResponse()->getBody() : null
+ );
+ }
+
+ $statusCode = $response->getStatusCode();
+
+ if ($statusCode < 200 || $statusCode > 299) {
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ (string) $request->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+
+ switch($statusCode) {
+ case 200:
+ if ('\Finnhub\Model\FinancialsAsReported' === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\FinancialsAsReported', []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ }
+
+ $returnType = '\Finnhub\Model\FinancialsAsReported';
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+
+ } catch (ApiException $e) {
+ switch ($e->getCode()) {
+ case 200:
+ $data = ObjectSerializer::deserialize(
+ $e->getResponseBody(),
+ '\Finnhub\Model\FinancialsAsReported',
+ $e->getResponseHeaders()
+ );
+ $e->setResponseObject($data);
+ break;
+ }
+ throw $e;
+ }
+ }
+
+ /**
+ * Operation financialsReportedAsync
+ *
+ * Financials As Reported
+ *
+ * @param string $symbol Symbol. (optional)
+ * @param string $cik CIK. (optional)
+ * @param string $access_number Access number of a specific report you want to retrieve financials from. (optional)
+ * @param string $freq Frequency. Can be either <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>. (optional)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Promise\PromiseInterface
+ */
+ public function financialsReportedAsync($symbol = null, $cik = null, $access_number = null, $freq = null, $from = null, $to = null)
+ {
+ return $this->financialsReportedAsyncWithHttpInfo($symbol, $cik, $access_number, $freq, $from, $to)
+ ->then(
+ function ($response) {
+ return $response[0];
+ }
+ );
+ }
+
+ /**
+ * Operation financialsReportedAsyncWithHttpInfo
+ *
+ * Financials As Reported
+ *
+ * @param string $symbol Symbol. (optional)
+ * @param string $cik CIK. (optional)
+ * @param string $access_number Access number of a specific report you want to retrieve financials from. (optional)
+ * @param string $freq Frequency. Can be either <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>. (optional)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Promise\PromiseInterface
+ */
+ public function financialsReportedAsyncWithHttpInfo($symbol = null, $cik = null, $access_number = null, $freq = null, $from = null, $to = null)
+ {
+ $returnType = '\Finnhub\Model\FinancialsAsReported';
+ $request = $this->financialsReportedRequest($symbol, $cik, $access_number, $freq, $from, $to);
+
+ return $this->client
+ ->sendAsync($request, $this->createHttpClientOption())
+ ->then(
+ function ($response) use ($returnType) {
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ },
+ function ($exception) {
+ $response = $exception->getResponse();
+ $statusCode = $response->getStatusCode();
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ $exception->getRequest()->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+ );
+ }
+
+ /**
+ * Create request for operation 'financialsReported'
+ *
+ * @param string $symbol Symbol. (optional)
+ * @param string $cik CIK. (optional)
+ * @param string $access_number Access number of a specific report you want to retrieve financials from. (optional)
+ * @param string $freq Frequency. Can be either <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>. (optional)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. Filter for endDate. (optional)
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Psr7\Request
+ */
+ public function financialsReportedRequest($symbol = null, $cik = null, $access_number = null, $freq = null, $from = null, $to = null)
+ {
+
+ $resourcePath = '/stock/financials-reported';
+ $formParams = [];
+ $queryParams = [];
+ $headerParams = [];
+ $httpBody = '';
+ $multipart = false;
+
+ // query params
+ if (is_array($symbol)) {
+ $symbol = ObjectSerializer::serializeCollection($symbol, '', true);
+ }
+ if ($symbol !== null) {
+ $queryParams['symbol'] = $symbol;
+ }
+ // query params
+ if (is_array($cik)) {
+ $cik = ObjectSerializer::serializeCollection($cik, '', true);
+ }
+ if ($cik !== null) {
+ $queryParams['cik'] = $cik;
+ }
+ // query params
+ if (is_array($access_number)) {
+ $access_number = ObjectSerializer::serializeCollection($access_number, '', true);
+ }
+ if ($access_number !== null) {
+ $queryParams['accessNumber'] = $access_number;
+ }
+ // query params
+ if (is_array($freq)) {
+ $freq = ObjectSerializer::serializeCollection($freq, '', true);
+ }
+ if ($freq !== null) {
+ $queryParams['freq'] = $freq;
+ }
+ // query params
+ if (is_array($from)) {
+ $from = ObjectSerializer::serializeCollection($from, '', true);
+ }
+ if ($from !== null) {
+ $queryParams['from'] = $from;
+ }
+ // query params
+ if (is_array($to)) {
+ $to = ObjectSerializer::serializeCollection($to, '', true);
+ }
+ if ($to !== null) {
+ $queryParams['to'] = $to;
+ }
+
+
+
+
+ if ($multipart) {
+ $headers = $this->headerSelector->selectHeadersForMultipart(
+ ['application/json']
+ );
+ } else {
+ $headers = $this->headerSelector->selectHeaders(
+ ['application/json'],
+ []
+ );
+ }
+
+ // for model (json/xml)
+ if (count($formParams) > 0) {
+ if ($multipart) {
+ $multipartContents = [];
+ foreach ($formParams as $formParamName => $formParamValue) {
+ $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
+ foreach ($formParamValueItems as $formParamValueItem) {
+ $multipartContents[] = [
+ 'name' => $formParamName,
+ 'contents' => $formParamValueItem
+ ];
+ }
+ }
+ // for HTTP post (form)
+ $httpBody = new MultipartStream($multipartContents);
+
+ } elseif ($headers['Content-Type'] === 'application/json') {
+ $httpBody = \GuzzleHttp\json_encode($formParams);
+
+ } else {
+ // for HTTP post (form)
+ $httpBody = \GuzzleHttp\Psr7\build_query($formParams);
+ }
+ }
+
+ // this endpoint requires API key authentication
+ $apiKey = $this->config->getApiKeyWithPrefix('token');
+ if ($apiKey !== null) {
+ $queryParams['token'] = $apiKey;
+ }
+
+ $defaultHeaders = [];
+ if ($this->config->getUserAgent()) {
+ $defaultHeaders['User-Agent'] = $this->config->getUserAgent();
+ }
+
+ $headers = array_merge(
+ $defaultHeaders,
+ $headerParams,
+ $headers
+ );
+
+ $query = \GuzzleHttp\Psr7\build_query($queryParams);
+ return new Request(
+ 'GET',
+ $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
+ $headers,
+ $httpBody
+ );
+ }
+
+ /**
+ * Operation forexCandles
+ *
+ * Forex Candles
+ *
+ * @param string $symbol Use symbol returned in <code>/forex/symbol</code> endpoint for this field. (required)
+ * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
+ * @param int $from UNIX timestamp. Interval initial value. (required)
+ * @param int $to UNIX timestamp. Interval end value. (required)
+ *
+ * @throws \Finnhub\ApiException on non-2xx response
+ * @throws \InvalidArgumentException
+ * @return \Finnhub\Model\ForexCandles
+ */
+ public function forexCandles($symbol, $resolution, $from, $to)
+ {
+ list($response) = $this->forexCandlesWithHttpInfo($symbol, $resolution, $from, $to);
+ return $response;
+ }
+
+ /**
+ * Operation forexCandlesWithHttpInfo
+ *
+ * Forex Candles
+ *
+ * @param string $symbol Use symbol returned in <code>/forex/symbol</code> endpoint for this field. (required)
+ * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
+ * @param int $from UNIX timestamp. Interval initial value. (required)
+ * @param int $to UNIX timestamp. Interval end value. (required)
+ *
+ * @throws \Finnhub\ApiException on non-2xx response
+ * @throws \InvalidArgumentException
+ * @return array of \Finnhub\Model\ForexCandles, HTTP status code, HTTP response headers (array of strings)
+ */
+ public function forexCandlesWithHttpInfo($symbol, $resolution, $from, $to)
+ {
+ $request = $this->forexCandlesRequest($symbol, $resolution, $from, $to);
+
+ try {
+ $options = $this->createHttpClientOption();
+ try {
+ $response = $this->client->send($request, $options);
+ } catch (RequestException $e) {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ $e->getResponse() ? $e->getResponse()->getHeaders() : null,
+ $e->getResponse() ? (string) $e->getResponse()->getBody() : null
+ );
+ }
+
+ $statusCode = $response->getStatusCode();
+
+ if ($statusCode < 200 || $statusCode > 299) {
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ (string) $request->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+
+ switch($statusCode) {
+ case 200:
+ if ('\Finnhub\Model\ForexCandles' === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\ForexCandles', []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ }
+
+ $returnType = '\Finnhub\Model\ForexCandles';
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+
+ } catch (ApiException $e) {
+ switch ($e->getCode()) {
+ case 200:
+ $data = ObjectSerializer::deserialize(
+ $e->getResponseBody(),
+ '\Finnhub\Model\ForexCandles',
+ $e->getResponseHeaders()
+ );
+ $e->setResponseObject($data);
+ break;
+ }
+ throw $e;
+ }
+ }
+
+ /**
+ * Operation forexCandlesAsync
+ *
+ * Forex Candles
+ *
+ * @param string $symbol Use symbol returned in <code>/forex/symbol</code> endpoint for this field. (required)
+ * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
+ * @param int $from UNIX timestamp. Interval initial value. (required)
+ * @param int $to UNIX timestamp. Interval end value. (required)
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Promise\PromiseInterface
+ */
+ public function forexCandlesAsync($symbol, $resolution, $from, $to)
+ {
+ return $this->forexCandlesAsyncWithHttpInfo($symbol, $resolution, $from, $to)
+ ->then(
+ function ($response) {
+ return $response[0];
+ }
+ );
+ }
+
+ /**
+ * Operation forexCandlesAsyncWithHttpInfo
+ *
+ * Forex Candles
+ *
+ * @param string $symbol Use symbol returned in <code>/forex/symbol</code> endpoint for this field. (required)
+ * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
+ * @param int $from UNIX timestamp. Interval initial value. (required)
+ * @param int $to UNIX timestamp. Interval end value. (required)
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Promise\PromiseInterface
+ */
+ public function forexCandlesAsyncWithHttpInfo($symbol, $resolution, $from, $to)
+ {
+ $returnType = '\Finnhub\Model\ForexCandles';
+ $request = $this->forexCandlesRequest($symbol, $resolution, $from, $to);
+
+ return $this->client
+ ->sendAsync($request, $this->createHttpClientOption())
+ ->then(
+ function ($response) use ($returnType) {
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ },
+ function ($exception) {
+ $response = $exception->getResponse();
+ $statusCode = $response->getStatusCode();
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ $exception->getRequest()->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+ );
+ }
+
+ /**
+ * Create request for operation 'forexCandles'
+ *
+ * @param string $symbol Use symbol returned in <code>/forex/symbol</code> endpoint for this field. (required)
+ * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
+ * @param int $from UNIX timestamp. Interval initial value. (required)
+ * @param int $to UNIX timestamp. Interval end value. (required)
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Psr7\Request
+ */
+ public function forexCandlesRequest($symbol, $resolution, $from, $to)
+ {
+ // verify the required parameter 'symbol' is set
+ if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $symbol when calling forexCandles'
+ );
+ }
+ // verify the required parameter 'resolution' is set
+ if ($resolution === null || (is_array($resolution) && count($resolution) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $resolution when calling forexCandles'
+ );
+ }
+ // verify the required parameter 'from' is set
+ if ($from === null || (is_array($from) && count($from) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $from when calling forexCandles'
+ );
+ }
+ // verify the required parameter 'to' is set
+ if ($to === null || (is_array($to) && count($to) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $to when calling forexCandles'
+ );
+ }
+
+ $resourcePath = '/forex/candle';
+ $formParams = [];
+ $queryParams = [];
+ $headerParams = [];
+ $httpBody = '';
+ $multipart = false;
+
+ // query params
+ if (is_array($symbol)) {
+ $symbol = ObjectSerializer::serializeCollection($symbol, '', true);
+ }
+ if ($symbol !== null) {
+ $queryParams['symbol'] = $symbol;
+ }
+ // query params
+ if (is_array($resolution)) {
+ $resolution = ObjectSerializer::serializeCollection($resolution, '', true);
+ }
+ if ($resolution !== null) {
+ $queryParams['resolution'] = $resolution;
+ }
+ // query params
+ if (is_array($from)) {
+ $from = ObjectSerializer::serializeCollection($from, '', true);
+ }
+ if ($from !== null) {
+ $queryParams['from'] = $from;
+ }
+ // query params
+ if (is_array($to)) {
+ $to = ObjectSerializer::serializeCollection($to, '', true);
+ }
+ if ($to !== null) {
+ $queryParams['to'] = $to;
+ }
+
+
+
+
+ if ($multipart) {
+ $headers = $this->headerSelector->selectHeadersForMultipart(
+ ['application/json']
+ );
+ } else {
+ $headers = $this->headerSelector->selectHeaders(
+ ['application/json'],
+ []
+ );
+ }
+
+ // for model (json/xml)
+ if (count($formParams) > 0) {
+ if ($multipart) {
+ $multipartContents = [];
+ foreach ($formParams as $formParamName => $formParamValue) {
+ $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
+ foreach ($formParamValueItems as $formParamValueItem) {
+ $multipartContents[] = [
+ 'name' => $formParamName,
+ 'contents' => $formParamValueItem
+ ];
+ }
+ }
+ // for HTTP post (form)
+ $httpBody = new MultipartStream($multipartContents);
+
+ } elseif ($headers['Content-Type'] === 'application/json') {
+ $httpBody = \GuzzleHttp\json_encode($formParams);
+
+ } else {
+ // for HTTP post (form)
+ $httpBody = \GuzzleHttp\Psr7\build_query($formParams);
+ }
+ }
+
+ // this endpoint requires API key authentication
+ $apiKey = $this->config->getApiKeyWithPrefix('token');
+ if ($apiKey !== null) {
+ $queryParams['token'] = $apiKey;
+ }
+
+ $defaultHeaders = [];
+ if ($this->config->getUserAgent()) {
+ $defaultHeaders['User-Agent'] = $this->config->getUserAgent();
+ }
+
+ $headers = array_merge(
+ $defaultHeaders,
+ $headerParams,
+ $headers
+ );
+
+ $query = \GuzzleHttp\Psr7\build_query($queryParams);
+ return new Request(
+ 'GET',
+ $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
+ $headers,
+ $httpBody
+ );
+ }
+
+ /**
+ * Operation forexExchanges
+ *
+ * Forex Exchanges
+ *
+ *
+ * @throws \Finnhub\ApiException on non-2xx response
+ * @throws \InvalidArgumentException
+ * @return string[]
+ */
+ public function forexExchanges()
+ {
+ list($response) = $this->forexExchangesWithHttpInfo();
+ return $response;
+ }
+
+ /**
+ * Operation forexExchangesWithHttpInfo
+ *
+ * Forex Exchanges
+ *
+ *
+ * @throws \Finnhub\ApiException on non-2xx response
+ * @throws \InvalidArgumentException
+ * @return array of string[], HTTP status code, HTTP response headers (array of strings)
+ */
+ public function forexExchangesWithHttpInfo()
+ {
+ $request = $this->forexExchangesRequest();
+
+ try {
+ $options = $this->createHttpClientOption();
+ try {
+ $response = $this->client->send($request, $options);
+ } catch (RequestException $e) {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ $e->getResponse() ? $e->getResponse()->getHeaders() : null,
+ $e->getResponse() ? (string) $e->getResponse()->getBody() : null
+ );
+ }
+
+ $statusCode = $response->getStatusCode();
+
+ if ($statusCode < 200 || $statusCode > 299) {
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ (string) $request->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+
+ switch($statusCode) {
+ case 200:
+ if ('string[]' === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, 'string[]', []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ }
+
+ $returnType = 'string[]';
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+
+ } catch (ApiException $e) {
+ switch ($e->getCode()) {
+ case 200:
+ $data = ObjectSerializer::deserialize(
+ $e->getResponseBody(),
+ 'string[]',
+ $e->getResponseHeaders()
+ );
+ $e->setResponseObject($data);
+ break;
+ }
+ throw $e;
+ }
+ }
+
+ /**
+ * Operation forexExchangesAsync
+ *
+ * Forex Exchanges
+ *
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Promise\PromiseInterface
+ */
+ public function forexExchangesAsync()
+ {
+ return $this->forexExchangesAsyncWithHttpInfo()
+ ->then(
+ function ($response) {
+ return $response[0];
+ }
+ );
+ }
+
+ /**
+ * Operation forexExchangesAsyncWithHttpInfo
+ *
+ * Forex Exchanges
+ *
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Promise\PromiseInterface
+ */
+ public function forexExchangesAsyncWithHttpInfo()
+ {
+ $returnType = 'string[]';
+ $request = $this->forexExchangesRequest();
+
+ return $this->client
+ ->sendAsync($request, $this->createHttpClientOption())
+ ->then(
+ function ($response) use ($returnType) {
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ },
+ function ($exception) {
+ $response = $exception->getResponse();
+ $statusCode = $response->getStatusCode();
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ $exception->getRequest()->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+ );
+ }
+
+ /**
+ * Create request for operation 'forexExchanges'
+ *
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Psr7\Request
+ */
+ public function forexExchangesRequest()
+ {
+
+ $resourcePath = '/forex/exchange';
+ $formParams = [];
+ $queryParams = [];
+ $headerParams = [];
+ $httpBody = '';
+ $multipart = false;
+
+
@@ -10851,42 +11995,38 @@ public function financialsReportedRequest($symbol = null, $cik = null, $access_n
}
/**
- * Operation forexCandles
+ * Operation forexRates
*
- * Forex Candles
+ * Forex rates
*
- * @param string $symbol Use symbol returned in <code>/forex/symbol</code> endpoint for this field. (required)
- * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
- * @param int $from UNIX timestamp. Interval initial value. (required)
- * @param int $to UNIX timestamp. Interval end value. (required)
+ * @param string $base Base currency. Default to EUR. (optional)
+ * @param string $date Date. Leave blank to get the latest data. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\ForexCandles
+ * @return \Finnhub\Model\Forexrates
*/
- public function forexCandles($symbol, $resolution, $from, $to)
+ public function forexRates($base = null, $date = null)
{
- list($response) = $this->forexCandlesWithHttpInfo($symbol, $resolution, $from, $to);
+ list($response) = $this->forexRatesWithHttpInfo($base, $date);
return $response;
}
/**
- * Operation forexCandlesWithHttpInfo
+ * Operation forexRatesWithHttpInfo
*
- * Forex Candles
+ * Forex rates
*
- * @param string $symbol Use symbol returned in <code>/forex/symbol</code> endpoint for this field. (required)
- * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
- * @param int $from UNIX timestamp. Interval initial value. (required)
- * @param int $to UNIX timestamp. Interval end value. (required)
+ * @param string $base Base currency. Default to EUR. (optional)
+ * @param string $date Date. Leave blank to get the latest data. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\ForexCandles, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\Forexrates, HTTP status code, HTTP response headers (array of strings)
*/
- public function forexCandlesWithHttpInfo($symbol, $resolution, $from, $to)
+ public function forexRatesWithHttpInfo($base = null, $date = null)
{
- $request = $this->forexCandlesRequest($symbol, $resolution, $from, $to);
+ $request = $this->forexRatesRequest($base, $date);
try {
$options = $this->createHttpClientOption();
@@ -10918,20 +12058,20 @@ public function forexCandlesWithHttpInfo($symbol, $resolution, $from, $to)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\ForexCandles' === '\SplFileObject') {
+ if ('\Finnhub\Model\Forexrates' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\ForexCandles', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\Forexrates', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\ForexCandles';
+ $returnType = '\Finnhub\Model\Forexrates';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -10949,7 +12089,7 @@ public function forexCandlesWithHttpInfo($symbol, $resolution, $from, $to)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\ForexCandles',
+ '\Finnhub\Model\Forexrates',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -10960,21 +12100,19 @@ public function forexCandlesWithHttpInfo($symbol, $resolution, $from, $to)
}
/**
- * Operation forexCandlesAsync
+ * Operation forexRatesAsync
*
- * Forex Candles
+ * Forex rates
*
- * @param string $symbol Use symbol returned in <code>/forex/symbol</code> endpoint for this field. (required)
- * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
- * @param int $from UNIX timestamp. Interval initial value. (required)
- * @param int $to UNIX timestamp. Interval end value. (required)
+ * @param string $base Base currency. Default to EUR. (optional)
+ * @param string $date Date. Leave blank to get the latest data. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function forexCandlesAsync($symbol, $resolution, $from, $to)
+ public function forexRatesAsync($base = null, $date = null)
{
- return $this->forexCandlesAsyncWithHttpInfo($symbol, $resolution, $from, $to)
+ return $this->forexRatesAsyncWithHttpInfo($base, $date)
->then(
function ($response) {
return $response[0];
@@ -10983,22 +12121,20 @@ function ($response) {
}
/**
- * Operation forexCandlesAsyncWithHttpInfo
+ * Operation forexRatesAsyncWithHttpInfo
*
- * Forex Candles
+ * Forex rates
*
- * @param string $symbol Use symbol returned in <code>/forex/symbol</code> endpoint for this field. (required)
- * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
- * @param int $from UNIX timestamp. Interval initial value. (required)
- * @param int $to UNIX timestamp. Interval end value. (required)
+ * @param string $base Base currency. Default to EUR. (optional)
+ * @param string $date Date. Leave blank to get the latest data. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function forexCandlesAsyncWithHttpInfo($symbol, $resolution, $from, $to)
+ public function forexRatesAsyncWithHttpInfo($base = null, $date = null)
{
- $returnType = '\Finnhub\Model\ForexCandles';
- $request = $this->forexCandlesRequest($symbol, $resolution, $from, $to);
+ $returnType = '\Finnhub\Model\Forexrates';
+ $request = $this->forexRatesRequest($base, $date);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -11034,44 +12170,18 @@ function ($exception) {
}
/**
- * Create request for operation 'forexCandles'
+ * Create request for operation 'forexRates'
*
- * @param string $symbol Use symbol returned in <code>/forex/symbol</code> endpoint for this field. (required)
- * @param string $resolution Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. (required)
- * @param int $from UNIX timestamp. Interval initial value. (required)
- * @param int $to UNIX timestamp. Interval end value. (required)
+ * @param string $base Base currency. Default to EUR. (optional)
+ * @param string $date Date. Leave blank to get the latest data. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function forexCandlesRequest($symbol, $resolution, $from, $to)
+ public function forexRatesRequest($base = null, $date = null)
{
- // verify the required parameter 'symbol' is set
- if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling forexCandles'
- );
- }
- // verify the required parameter 'resolution' is set
- if ($resolution === null || (is_array($resolution) && count($resolution) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $resolution when calling forexCandles'
- );
- }
- // verify the required parameter 'from' is set
- if ($from === null || (is_array($from) && count($from) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $from when calling forexCandles'
- );
- }
- // verify the required parameter 'to' is set
- if ($to === null || (is_array($to) && count($to) === 0)) {
- throw new \InvalidArgumentException(
- 'Missing the required parameter $to when calling forexCandles'
- );
- }
- $resourcePath = '/forex/candle';
+ $resourcePath = '/forex/rates';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -11079,32 +12189,18 @@ public function forexCandlesRequest($symbol, $resolution, $from, $to)
$multipart = false;
// query params
- if (is_array($symbol)) {
- $symbol = ObjectSerializer::serializeCollection($symbol, '', true);
- }
- if ($symbol !== null) {
- $queryParams['symbol'] = $symbol;
- }
- // query params
- if (is_array($resolution)) {
- $resolution = ObjectSerializer::serializeCollection($resolution, '', true);
- }
- if ($resolution !== null) {
- $queryParams['resolution'] = $resolution;
- }
- // query params
- if (is_array($from)) {
- $from = ObjectSerializer::serializeCollection($from, '', true);
+ if (is_array($base)) {
+ $base = ObjectSerializer::serializeCollection($base, '', true);
}
- if ($from !== null) {
- $queryParams['from'] = $from;
+ if ($base !== null) {
+ $queryParams['base'] = $base;
}
// query params
- if (is_array($to)) {
- $to = ObjectSerializer::serializeCollection($to, '', true);
+ if (is_array($date)) {
+ $date = ObjectSerializer::serializeCollection($date, '', true);
}
- if ($to !== null) {
- $queryParams['to'] = $to;
+ if ($date !== null) {
+ $queryParams['date'] = $date;
}
@@ -11173,34 +12269,36 @@ public function forexCandlesRequest($symbol, $resolution, $from, $to)
}
/**
- * Operation forexExchanges
+ * Operation forexSymbols
*
- * Forex Exchanges
+ * Forex Symbol
*
+ * @param string $exchange Exchange you want to get the list of symbols from. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return string[]
+ * @return \Finnhub\Model\ForexSymbol[]
*/
- public function forexExchanges()
+ public function forexSymbols($exchange)
{
- list($response) = $this->forexExchangesWithHttpInfo();
+ list($response) = $this->forexSymbolsWithHttpInfo($exchange);
return $response;
}
/**
- * Operation forexExchangesWithHttpInfo
+ * Operation forexSymbolsWithHttpInfo
*
- * Forex Exchanges
+ * Forex Symbol
*
+ * @param string $exchange Exchange you want to get the list of symbols from. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of string[], HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\ForexSymbol[], HTTP status code, HTTP response headers (array of strings)
*/
- public function forexExchangesWithHttpInfo()
+ public function forexSymbolsWithHttpInfo($exchange)
{
- $request = $this->forexExchangesRequest();
+ $request = $this->forexSymbolsRequest($exchange);
try {
$options = $this->createHttpClientOption();
@@ -11232,20 +12330,20 @@ public function forexExchangesWithHttpInfo()
switch($statusCode) {
case 200:
- if ('string[]' === '\SplFileObject') {
+ if ('\Finnhub\Model\ForexSymbol[]' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, 'string[]', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\ForexSymbol[]', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = 'string[]';
+ $returnType = '\Finnhub\Model\ForexSymbol[]';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -11263,7 +12361,7 @@ public function forexExchangesWithHttpInfo()
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- 'string[]',
+ '\Finnhub\Model\ForexSymbol[]',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -11274,17 +12372,18 @@ public function forexExchangesWithHttpInfo()
}
/**
- * Operation forexExchangesAsync
+ * Operation forexSymbolsAsync
*
- * Forex Exchanges
+ * Forex Symbol
*
+ * @param string $exchange Exchange you want to get the list of symbols from. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function forexExchangesAsync()
+ public function forexSymbolsAsync($exchange)
{
- return $this->forexExchangesAsyncWithHttpInfo()
+ return $this->forexSymbolsAsyncWithHttpInfo($exchange)
->then(
function ($response) {
return $response[0];
@@ -11293,18 +12392,19 @@ function ($response) {
}
/**
- * Operation forexExchangesAsyncWithHttpInfo
+ * Operation forexSymbolsAsyncWithHttpInfo
*
- * Forex Exchanges
+ * Forex Symbol
*
+ * @param string $exchange Exchange you want to get the list of symbols from. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function forexExchangesAsyncWithHttpInfo()
+ public function forexSymbolsAsyncWithHttpInfo($exchange)
{
- $returnType = 'string[]';
- $request = $this->forexExchangesRequest();
+ $returnType = '\Finnhub\Model\ForexSymbol[]';
+ $request = $this->forexSymbolsRequest($exchange);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -11340,22 +12440,36 @@ function ($exception) {
}
/**
- * Create request for operation 'forexExchanges'
+ * Create request for operation 'forexSymbols'
*
+ * @param string $exchange Exchange you want to get the list of symbols from. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function forexExchangesRequest()
+ public function forexSymbolsRequest($exchange)
{
+ // verify the required parameter 'exchange' is set
+ if ($exchange === null || (is_array($exchange) && count($exchange) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $exchange when calling forexSymbols'
+ );
+ }
- $resourcePath = '/forex/exchange';
+ $resourcePath = '/forex/symbol';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
+ // query params
+ if (is_array($exchange)) {
+ $exchange = ObjectSerializer::serializeCollection($exchange, '', true);
+ }
+ if ($exchange !== null) {
+ $queryParams['exchange'] = $exchange;
+ }
@@ -11423,38 +12537,38 @@ public function forexExchangesRequest()
}
/**
- * Operation forexRates
+ * Operation fundOwnership
*
- * Forex rates
+ * Fund Ownership
*
- * @param string $base Base currency. Default to EUR. (optional)
- * @param string $date Date. Leave blank to get the latest data. (optional)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param int $limit Limit number of results. Leave empty to get the full list. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\Forexrates
+ * @return \Finnhub\Model\FundOwnership
*/
- public function forexRates($base = null, $date = null)
+ public function fundOwnership($symbol, $limit = null)
{
- list($response) = $this->forexRatesWithHttpInfo($base, $date);
+ list($response) = $this->fundOwnershipWithHttpInfo($symbol, $limit);
return $response;
}
/**
- * Operation forexRatesWithHttpInfo
- *
- * Forex rates
+ * Operation fundOwnershipWithHttpInfo
*
- * @param string $base Base currency. Default to EUR. (optional)
- * @param string $date Date. Leave blank to get the latest data. (optional)
+ * Fund Ownership
+ *
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param int $limit Limit number of results. Leave empty to get the full list. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\Forexrates, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\FundOwnership, HTTP status code, HTTP response headers (array of strings)
*/
- public function forexRatesWithHttpInfo($base = null, $date = null)
+ public function fundOwnershipWithHttpInfo($symbol, $limit = null)
{
- $request = $this->forexRatesRequest($base, $date);
+ $request = $this->fundOwnershipRequest($symbol, $limit);
try {
$options = $this->createHttpClientOption();
@@ -11486,20 +12600,20 @@ public function forexRatesWithHttpInfo($base = null, $date = null)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\Forexrates' === '\SplFileObject') {
+ if ('\Finnhub\Model\FundOwnership' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\Forexrates', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\FundOwnership', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\Forexrates';
+ $returnType = '\Finnhub\Model\FundOwnership';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -11517,7 +12631,7 @@ public function forexRatesWithHttpInfo($base = null, $date = null)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\Forexrates',
+ '\Finnhub\Model\FundOwnership',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -11528,19 +12642,19 @@ public function forexRatesWithHttpInfo($base = null, $date = null)
}
/**
- * Operation forexRatesAsync
+ * Operation fundOwnershipAsync
*
- * Forex rates
+ * Fund Ownership
*
- * @param string $base Base currency. Default to EUR. (optional)
- * @param string $date Date. Leave blank to get the latest data. (optional)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param int $limit Limit number of results. Leave empty to get the full list. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function forexRatesAsync($base = null, $date = null)
+ public function fundOwnershipAsync($symbol, $limit = null)
{
- return $this->forexRatesAsyncWithHttpInfo($base, $date)
+ return $this->fundOwnershipAsyncWithHttpInfo($symbol, $limit)
->then(
function ($response) {
return $response[0];
@@ -11549,20 +12663,20 @@ function ($response) {
}
/**
- * Operation forexRatesAsyncWithHttpInfo
+ * Operation fundOwnershipAsyncWithHttpInfo
*
- * Forex rates
+ * Fund Ownership
*
- * @param string $base Base currency. Default to EUR. (optional)
- * @param string $date Date. Leave blank to get the latest data. (optional)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param int $limit Limit number of results. Leave empty to get the full list. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function forexRatesAsyncWithHttpInfo($base = null, $date = null)
+ public function fundOwnershipAsyncWithHttpInfo($symbol, $limit = null)
{
- $returnType = '\Finnhub\Model\Forexrates';
- $request = $this->forexRatesRequest($base, $date);
+ $returnType = '\Finnhub\Model\FundOwnership';
+ $request = $this->fundOwnershipRequest($symbol, $limit);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -11598,18 +12712,24 @@ function ($exception) {
}
/**
- * Create request for operation 'forexRates'
+ * Create request for operation 'fundOwnership'
*
- * @param string $base Base currency. Default to EUR. (optional)
- * @param string $date Date. Leave blank to get the latest data. (optional)
+ * @param string $symbol Symbol of the company: AAPL. (required)
+ * @param int $limit Limit number of results. Leave empty to get the full list. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function forexRatesRequest($base = null, $date = null)
+ public function fundOwnershipRequest($symbol, $limit = null)
{
+ // verify the required parameter 'symbol' is set
+ if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $symbol when calling fundOwnership'
+ );
+ }
- $resourcePath = '/forex/rates';
+ $resourcePath = '/stock/fund-ownership';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -11617,18 +12737,18 @@ public function forexRatesRequest($base = null, $date = null)
$multipart = false;
// query params
- if (is_array($base)) {
- $base = ObjectSerializer::serializeCollection($base, '', true);
+ if (is_array($symbol)) {
+ $symbol = ObjectSerializer::serializeCollection($symbol, '', true);
}
- if ($base !== null) {
- $queryParams['base'] = $base;
+ if ($symbol !== null) {
+ $queryParams['symbol'] = $symbol;
}
// query params
- if (is_array($date)) {
- $date = ObjectSerializer::serializeCollection($date, '', true);
+ if (is_array($limit)) {
+ $limit = ObjectSerializer::serializeCollection($limit, '', true);
}
- if ($date !== null) {
- $queryParams['date'] = $date;
+ if ($limit !== null) {
+ $queryParams['limit'] = $limit;
}
@@ -11697,36 +12817,40 @@ public function forexRatesRequest($base = null, $date = null)
}
/**
- * Operation forexSymbols
+ * Operation historicalEmployeeCount
*
- * Forex Symbol
+ * Historical Employee Count
*
- * @param string $exchange Exchange you want to get the list of symbols from. (required)
+ * @param string $symbol Company symbol. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\ForexSymbol[]
+ * @return \Finnhub\Model\HistoricalEmployeeCount
*/
- public function forexSymbols($exchange)
+ public function historicalEmployeeCount($symbol, $from, $to)
{
- list($response) = $this->forexSymbolsWithHttpInfo($exchange);
+ list($response) = $this->historicalEmployeeCountWithHttpInfo($symbol, $from, $to);
return $response;
}
/**
- * Operation forexSymbolsWithHttpInfo
+ * Operation historicalEmployeeCountWithHttpInfo
*
- * Forex Symbol
+ * Historical Employee Count
*
- * @param string $exchange Exchange you want to get the list of symbols from. (required)
+ * @param string $symbol Company symbol. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\ForexSymbol[], HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\HistoricalEmployeeCount, HTTP status code, HTTP response headers (array of strings)
*/
- public function forexSymbolsWithHttpInfo($exchange)
+ public function historicalEmployeeCountWithHttpInfo($symbol, $from, $to)
{
- $request = $this->forexSymbolsRequest($exchange);
+ $request = $this->historicalEmployeeCountRequest($symbol, $from, $to);
try {
$options = $this->createHttpClientOption();
@@ -11758,20 +12882,20 @@ public function forexSymbolsWithHttpInfo($exchange)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\ForexSymbol[]' === '\SplFileObject') {
+ if ('\Finnhub\Model\HistoricalEmployeeCount' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\ForexSymbol[]', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\HistoricalEmployeeCount', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\ForexSymbol[]';
+ $returnType = '\Finnhub\Model\HistoricalEmployeeCount';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -11789,7 +12913,7 @@ public function forexSymbolsWithHttpInfo($exchange)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\ForexSymbol[]',
+ '\Finnhub\Model\HistoricalEmployeeCount',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -11800,18 +12924,20 @@ public function forexSymbolsWithHttpInfo($exchange)
}
/**
- * Operation forexSymbolsAsync
+ * Operation historicalEmployeeCountAsync
*
- * Forex Symbol
+ * Historical Employee Count
*
- * @param string $exchange Exchange you want to get the list of symbols from. (required)
+ * @param string $symbol Company symbol. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function forexSymbolsAsync($exchange)
+ public function historicalEmployeeCountAsync($symbol, $from, $to)
{
- return $this->forexSymbolsAsyncWithHttpInfo($exchange)
+ return $this->historicalEmployeeCountAsyncWithHttpInfo($symbol, $from, $to)
->then(
function ($response) {
return $response[0];
@@ -11820,19 +12946,21 @@ function ($response) {
}
/**
- * Operation forexSymbolsAsyncWithHttpInfo
+ * Operation historicalEmployeeCountAsyncWithHttpInfo
*
- * Forex Symbol
+ * Historical Employee Count
*
- * @param string $exchange Exchange you want to get the list of symbols from. (required)
+ * @param string $symbol Company symbol. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function forexSymbolsAsyncWithHttpInfo($exchange)
+ public function historicalEmployeeCountAsyncWithHttpInfo($symbol, $from, $to)
{
- $returnType = '\Finnhub\Model\ForexSymbol[]';
- $request = $this->forexSymbolsRequest($exchange);
+ $returnType = '\Finnhub\Model\HistoricalEmployeeCount';
+ $request = $this->historicalEmployeeCountRequest($symbol, $from, $to);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -11868,23 +12996,37 @@ function ($exception) {
}
/**
- * Create request for operation 'forexSymbols'
+ * Create request for operation 'historicalEmployeeCount'
*
- * @param string $exchange Exchange you want to get the list of symbols from. (required)
+ * @param string $symbol Company symbol. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function forexSymbolsRequest($exchange)
+ public function historicalEmployeeCountRequest($symbol, $from, $to)
{
- // verify the required parameter 'exchange' is set
- if ($exchange === null || (is_array($exchange) && count($exchange) === 0)) {
+ // verify the required parameter 'symbol' is set
+ if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $exchange when calling forexSymbols'
+ 'Missing the required parameter $symbol when calling historicalEmployeeCount'
+ );
+ }
+ // verify the required parameter 'from' is set
+ if ($from === null || (is_array($from) && count($from) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $from when calling historicalEmployeeCount'
+ );
+ }
+ // verify the required parameter 'to' is set
+ if ($to === null || (is_array($to) && count($to) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $to when calling historicalEmployeeCount'
);
}
- $resourcePath = '/forex/symbol';
+ $resourcePath = '/stock/historical-employee-count';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -11892,11 +13034,25 @@ public function forexSymbolsRequest($exchange)
$multipart = false;
// query params
- if (is_array($exchange)) {
- $exchange = ObjectSerializer::serializeCollection($exchange, '', true);
+ if (is_array($symbol)) {
+ $symbol = ObjectSerializer::serializeCollection($symbol, '', true);
}
- if ($exchange !== null) {
- $queryParams['exchange'] = $exchange;
+ if ($symbol !== null) {
+ $queryParams['symbol'] = $symbol;
+ }
+ // query params
+ if (is_array($from)) {
+ $from = ObjectSerializer::serializeCollection($from, '', true);
+ }
+ if ($from !== null) {
+ $queryParams['from'] = $from;
+ }
+ // query params
+ if (is_array($to)) {
+ $to = ObjectSerializer::serializeCollection($to, '', true);
+ }
+ if ($to !== null) {
+ $queryParams['to'] = $to;
}
@@ -11965,38 +13121,40 @@ public function forexSymbolsRequest($exchange)
}
/**
- * Operation fundOwnership
+ * Operation historicalMarketCap
*
- * Fund Ownership
+ * Historical Market Cap
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param int $limit Limit number of results. Leave empty to get the full list. (optional)
+ * @param string $symbol Company symbol. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \Finnhub\Model\FundOwnership
+ * @return \Finnhub\Model\HistoricalMarketCapData
*/
- public function fundOwnership($symbol, $limit = null)
+ public function historicalMarketCap($symbol, $from, $to)
{
- list($response) = $this->fundOwnershipWithHttpInfo($symbol, $limit);
+ list($response) = $this->historicalMarketCapWithHttpInfo($symbol, $from, $to);
return $response;
}
/**
- * Operation fundOwnershipWithHttpInfo
+ * Operation historicalMarketCapWithHttpInfo
*
- * Fund Ownership
+ * Historical Market Cap
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param int $limit Limit number of results. Leave empty to get the full list. (optional)
+ * @param string $symbol Company symbol. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \Finnhub\Model\FundOwnership, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \Finnhub\Model\HistoricalMarketCapData, HTTP status code, HTTP response headers (array of strings)
*/
- public function fundOwnershipWithHttpInfo($symbol, $limit = null)
+ public function historicalMarketCapWithHttpInfo($symbol, $from, $to)
{
- $request = $this->fundOwnershipRequest($symbol, $limit);
+ $request = $this->historicalMarketCapRequest($symbol, $from, $to);
try {
$options = $this->createHttpClientOption();
@@ -12028,20 +13186,20 @@ public function fundOwnershipWithHttpInfo($symbol, $limit = null)
switch($statusCode) {
case 200:
- if ('\Finnhub\Model\FundOwnership' === '\SplFileObject') {
+ if ('\Finnhub\Model\HistoricalMarketCapData' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
- ObjectSerializer::deserialize($content, '\Finnhub\Model\FundOwnership', []),
+ ObjectSerializer::deserialize($content, '\Finnhub\Model\HistoricalMarketCapData', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\Finnhub\Model\FundOwnership';
+ $returnType = '\Finnhub\Model\HistoricalMarketCapData';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -12059,7 +13217,7 @@ public function fundOwnershipWithHttpInfo($symbol, $limit = null)
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\Finnhub\Model\FundOwnership',
+ '\Finnhub\Model\HistoricalMarketCapData',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -12070,19 +13228,20 @@ public function fundOwnershipWithHttpInfo($symbol, $limit = null)
}
/**
- * Operation fundOwnershipAsync
+ * Operation historicalMarketCapAsync
*
- * Fund Ownership
+ * Historical Market Cap
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param int $limit Limit number of results. Leave empty to get the full list. (optional)
+ * @param string $symbol Company symbol. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function fundOwnershipAsync($symbol, $limit = null)
+ public function historicalMarketCapAsync($symbol, $from, $to)
{
- return $this->fundOwnershipAsyncWithHttpInfo($symbol, $limit)
+ return $this->historicalMarketCapAsyncWithHttpInfo($symbol, $from, $to)
->then(
function ($response) {
return $response[0];
@@ -12091,20 +13250,21 @@ function ($response) {
}
/**
- * Operation fundOwnershipAsyncWithHttpInfo
+ * Operation historicalMarketCapAsyncWithHttpInfo
*
- * Fund Ownership
+ * Historical Market Cap
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param int $limit Limit number of results. Leave empty to get the full list. (optional)
+ * @param string $symbol Company symbol. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function fundOwnershipAsyncWithHttpInfo($symbol, $limit = null)
+ public function historicalMarketCapAsyncWithHttpInfo($symbol, $from, $to)
{
- $returnType = '\Finnhub\Model\FundOwnership';
- $request = $this->fundOwnershipRequest($symbol, $limit);
+ $returnType = '\Finnhub\Model\HistoricalMarketCapData';
+ $request = $this->historicalMarketCapRequest($symbol, $from, $to);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -12140,24 +13300,37 @@ function ($exception) {
}
/**
- * Create request for operation 'fundOwnership'
+ * Create request for operation 'historicalMarketCap'
*
- * @param string $symbol Symbol of the company: AAPL. (required)
- * @param int $limit Limit number of results. Leave empty to get the full list. (optional)
+ * @param string $symbol Company symbol. (required)
+ * @param \DateTime $from From date <code>YYYY-MM-DD</code>. (required)
+ * @param \DateTime $to To date <code>YYYY-MM-DD</code>. (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function fundOwnershipRequest($symbol, $limit = null)
+ public function historicalMarketCapRequest($symbol, $from, $to)
{
// verify the required parameter 'symbol' is set
if ($symbol === null || (is_array($symbol) && count($symbol) === 0)) {
throw new \InvalidArgumentException(
- 'Missing the required parameter $symbol when calling fundOwnership'
+ 'Missing the required parameter $symbol when calling historicalMarketCap'
+ );
+ }
+ // verify the required parameter 'from' is set
+ if ($from === null || (is_array($from) && count($from) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $from when calling historicalMarketCap'
+ );
+ }
+ // verify the required parameter 'to' is set
+ if ($to === null || (is_array($to) && count($to) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $to when calling historicalMarketCap'
);
}
- $resourcePath = '/stock/fund-ownership';
+ $resourcePath = '/stock/historical-market-cap';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -12172,11 +13345,18 @@ public function fundOwnershipRequest($symbol, $limit = null)
$queryParams['symbol'] = $symbol;
}
// query params
- if (is_array($limit)) {
- $limit = ObjectSerializer::serializeCollection($limit, '', true);
+ if (is_array($from)) {
+ $from = ObjectSerializer::serializeCollection($from, '', true);
}
- if ($limit !== null) {
- $queryParams['limit'] = $limit;
+ if ($from !== null) {
+ $queryParams['from'] = $from;
+ }
+ // query params
+ if (is_array($to)) {
+ $to = ObjectSerializer::serializeCollection($to, '', true);
+ }
+ if ($to !== null) {
+ $queryParams['to'] = $to;
}
@@ -14271,14 +15451,16 @@ public function institutionalProfileRequest($cik = null)
*
* @param string $symbol Symbol. Leave empty to list latest filings. (optional)
* @param string $country Filter by country using country's 2-letter code. (optional)
+ * @param \DateTime $from From date: 2023-01-15. (optional)
+ * @param \DateTime $to To date: 2023-12-16. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \Finnhub\Model\InternationalFiling[]
*/
- public function internationalFilings($symbol = null, $country = null)
+ public function internationalFilings($symbol = null, $country = null, $from = null, $to = null)
{
- list($response) = $this->internationalFilingsWithHttpInfo($symbol, $country);
+ list($response) = $this->internationalFilingsWithHttpInfo($symbol, $country, $from, $to);
return $response;
}
@@ -14289,14 +15471,16 @@ public function internationalFilings($symbol = null, $country = null)
*
* @param string $symbol Symbol. Leave empty to list latest filings. (optional)
* @param string $country Filter by country using country's 2-letter code. (optional)
+ * @param \DateTime $from From date: 2023-01-15. (optional)
+ * @param \DateTime $to To date: 2023-12-16. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \Finnhub\Model\InternationalFiling[], HTTP status code, HTTP response headers (array of strings)
*/
- public function internationalFilingsWithHttpInfo($symbol = null, $country = null)
+ public function internationalFilingsWithHttpInfo($symbol = null, $country = null, $from = null, $to = null)
{
- $request = $this->internationalFilingsRequest($symbol, $country);
+ $request = $this->internationalFilingsRequest($symbol, $country, $from, $to);
try {
$options = $this->createHttpClientOption();
@@ -14376,13 +15560,15 @@ public function internationalFilingsWithHttpInfo($symbol = null, $country = null
*
* @param string $symbol Symbol. Leave empty to list latest filings. (optional)
* @param string $country Filter by country using country's 2-letter code. (optional)
+ * @param \DateTime $from From date: 2023-01-15. (optional)
+ * @param \DateTime $to To date: 2023-12-16. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function internationalFilingsAsync($symbol = null, $country = null)
+ public function internationalFilingsAsync($symbol = null, $country = null, $from = null, $to = null)
{
- return $this->internationalFilingsAsyncWithHttpInfo($symbol, $country)
+ return $this->internationalFilingsAsyncWithHttpInfo($symbol, $country, $from, $to)
->then(
function ($response) {
return $response[0];
@@ -14397,14 +15583,16 @@ function ($response) {
*
* @param string $symbol Symbol. Leave empty to list latest filings. (optional)
* @param string $country Filter by country using country's 2-letter code. (optional)
+ * @param \DateTime $from From date: 2023-01-15. (optional)
+ * @param \DateTime $to To date: 2023-12-16. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function internationalFilingsAsyncWithHttpInfo($symbol = null, $country = null)
+ public function internationalFilingsAsyncWithHttpInfo($symbol = null, $country = null, $from = null, $to = null)
{
$returnType = '\Finnhub\Model\InternationalFiling[]';
- $request = $this->internationalFilingsRequest($symbol, $country);
+ $request = $this->internationalFilingsRequest($symbol, $country, $from, $to);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -14444,11 +15632,13 @@ function ($exception) {
*
* @param string $symbol Symbol. Leave empty to list latest filings. (optional)
* @param string $country Filter by country using country's 2-letter code. (optional)
+ * @param \DateTime $from From date: 2023-01-15. (optional)
+ * @param \DateTime $to To date: 2023-12-16. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function internationalFilingsRequest($symbol = null, $country = null)
+ public function internationalFilingsRequest($symbol = null, $country = null, $from = null, $to = null)
{
$resourcePath = '/stock/international-filings';
@@ -14472,6 +15662,20 @@ public function internationalFilingsRequest($symbol = null, $country = null)
if ($country !== null) {
$queryParams['country'] = $country;
}
+ // query params
+ if (is_array($from)) {
+ $from = ObjectSerializer::serializeCollection($from, '', true);
+ }
+ if ($from !== null) {
+ $queryParams['from'] = $from;
+ }
+ // query params
+ if (is_array($to)) {
+ $to = ObjectSerializer::serializeCollection($to, '', true);
+ }
+ if ($to !== null) {
+ $queryParams['to'] = $to;
+ }
@@ -25644,14 +26848,15 @@ public function symbolChangeRequest($from, $to)
* Symbol Lookup
*
* @param string $q Query text can be symbol, name, isin, or cusip. (required)
+ * @param string $exchange Exchange limit. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \Finnhub\Model\SymbolLookup
*/
- public function symbolSearch($q)
+ public function symbolSearch($q, $exchange = null)
{
- list($response) = $this->symbolSearchWithHttpInfo($q);
+ list($response) = $this->symbolSearchWithHttpInfo($q, $exchange);
return $response;
}
@@ -25661,14 +26866,15 @@ public function symbolSearch($q)
* Symbol Lookup
*
* @param string $q Query text can be symbol, name, isin, or cusip. (required)
+ * @param string $exchange Exchange limit. (optional)
*
* @throws \Finnhub\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \Finnhub\Model\SymbolLookup, HTTP status code, HTTP response headers (array of strings)
*/
- public function symbolSearchWithHttpInfo($q)
+ public function symbolSearchWithHttpInfo($q, $exchange = null)
{
- $request = $this->symbolSearchRequest($q);
+ $request = $this->symbolSearchRequest($q, $exchange);
try {
$options = $this->createHttpClientOption();
@@ -25747,13 +26953,14 @@ public function symbolSearchWithHttpInfo($q)
* Symbol Lookup
*
* @param string $q Query text can be symbol, name, isin, or cusip. (required)
+ * @param string $exchange Exchange limit. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function symbolSearchAsync($q)
+ public function symbolSearchAsync($q, $exchange = null)
{
- return $this->symbolSearchAsyncWithHttpInfo($q)
+ return $this->symbolSearchAsyncWithHttpInfo($q, $exchange)
->then(
function ($response) {
return $response[0];
@@ -25767,14 +26974,15 @@ function ($response) {
* Symbol Lookup
*
* @param string $q Query text can be symbol, name, isin, or cusip. (required)
+ * @param string $exchange Exchange limit. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function symbolSearchAsyncWithHttpInfo($q)
+ public function symbolSearchAsyncWithHttpInfo($q, $exchange = null)
{
$returnType = '\Finnhub\Model\SymbolLookup';
- $request = $this->symbolSearchRequest($q);
+ $request = $this->symbolSearchRequest($q, $exchange);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -25813,11 +27021,12 @@ function ($exception) {
* Create request for operation 'symbolSearch'
*
* @param string $q Query text can be symbol, name, isin, or cusip. (required)
+ * @param string $exchange Exchange limit. (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function symbolSearchRequest($q)
+ public function symbolSearchRequest($q, $exchange = null)
{
// verify the required parameter 'q' is set
if ($q === null || (is_array($q) && count($q) === 0)) {
@@ -25840,6 +27049,13 @@ public function symbolSearchRequest($q)
if ($q !== null) {
$queryParams['q'] = $q;
}
+ // query params
+ if (is_array($exchange)) {
+ $exchange = ObjectSerializer::serializeCollection($exchange, '', true);
+ }
+ if ($exchange !== null) {
+ $queryParams['exchange'] = $exchange;
+ }
diff --git a/lib/Configuration.php b/lib/Configuration.php
index 8c3886c..008e80a 100644
--- a/lib/Configuration.php
+++ b/lib/Configuration.php
@@ -90,7 +90,7 @@ class Configuration
*
* @var string
*/
- protected $userAgent = 'OpenAPI-Generator/1.1.17/PHP';
+ protected $userAgent = 'OpenAPI-Generator/1.1.18/PHP';
/**
* Debug switch (default set to false)
@@ -399,7 +399,7 @@ public static function toDebugReport()
$report .= ' OS: ' . php_uname() . PHP_EOL;
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
$report .= ' The version of the OpenAPI document: 1.0.0' . PHP_EOL;
- $report .= ' SDK Package Version: 1.1.17' . PHP_EOL;
+ $report .= ' SDK Package Version: 1.1.18' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
return $report;
diff --git a/lib/Model/AirlinePriceIndex.php b/lib/Model/AirlinePriceIndex.php
new file mode 100644
index 0000000..53ea5c3
--- /dev/null
+++ b/lib/Model/AirlinePriceIndex.php
@@ -0,0 +1,380 @@
+
+ * @template TKey int|null
+ * @template TValue mixed|null
+ */
+class AirlinePriceIndex implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'AirlinePriceIndex';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'date' => 'string',
+ 'price_index' => 'float',
+ 'daily_avg_price' => 'float'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'date' => null,
+ 'price_index' => 'float',
+ 'daily_avg_price' => 'float'
+ ];
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPITypes()
+ {
+ return self::$openAPITypes;
+ }
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPIFormats()
+ {
+ return self::$openAPIFormats;
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'date' => 'date',
+ 'price_index' => 'priceIndex',
+ 'daily_avg_price' => 'dailyAvgPrice'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'date' => 'setDate',
+ 'price_index' => 'setPriceIndex',
+ 'daily_avg_price' => 'setDailyAvgPrice'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'date' => 'getDate',
+ 'price_index' => 'getPriceIndex',
+ 'daily_avg_price' => 'getDailyAvgPrice'
+ ];
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @return array
+ */
+ public static function attributeMap()
+ {
+ return self::$attributeMap;
+ }
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @return array
+ */
+ public static function setters()
+ {
+ return self::$setters;
+ }
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @return array
+ */
+ public static function getters()
+ {
+ return self::$getters;
+ }
+
+ /**
+ * The original name of the model.
+ *
+ * @return string
+ */
+ public function getModelName()
+ {
+ return self::$openAPIModelName;
+ }
+
+
+ /**
+ * Associative array for storing property values
+ *
+ * @var mixed[]
+ */
+ protected $container = [];
+
+ /**
+ * Constructor
+ *
+ * @param mixed[] $data Associated array of property values
+ * initializing the model
+ */
+ public function __construct(array $data = null)
+ {
+ $this->container['date'] = $data['date'] ?? null;
+ $this->container['price_index'] = $data['price_index'] ?? null;
+ $this->container['daily_avg_price'] = $data['daily_avg_price'] ?? null;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ return $invalidProperties;
+ }
+
+ /**
+ * Validate all the properties in the model
+ * return true if all passed
+ *
+ * @return bool True if all properties are valid
+ */
+ public function valid()
+ {
+ return count($this->listInvalidProperties()) === 0;
+ }
+
+
+ /**
+ * Gets date
+ *
+ * @return string|null
+ */
+ public function getDate()
+ {
+ return $this->container['date'];
+ }
+
+ /**
+ * Sets date
+ *
+ * @param string|null $date Date
+ *
+ * @return self
+ */
+ public function setDate($date)
+ {
+ $this->container['date'] = $date;
+
+ return $this;
+ }
+
+ /**
+ * Gets price_index
+ *
+ * @return float|null
+ */
+ public function getPriceIndex()
+ {
+ return $this->container['price_index'];
+ }
+
+ /**
+ * Sets price_index
+ *
+ * @param float|null $price_index Price Index
+ *
+ * @return self
+ */
+ public function setPriceIndex($price_index)
+ {
+ $this->container['price_index'] = $price_index;
+
+ return $this;
+ }
+
+ /**
+ * Gets daily_avg_price
+ *
+ * @return float|null
+ */
+ public function getDailyAvgPrice()
+ {
+ return $this->container['daily_avg_price'];
+ }
+
+ /**
+ * Sets daily_avg_price
+ *
+ * @param float|null $daily_avg_price Daily average ticket price.
+ *
+ * @return self
+ */
+ public function setDailyAvgPrice($daily_avg_price)
+ {
+ $this->container['daily_avg_price'] = $daily_avg_price;
+
+ return $this;
+ }
+ /**
+ * Returns true if offset exists. False otherwise.
+ *
+ * @param integer $offset Offset
+ *
+ * @return boolean
+ */
+ public function offsetExists($offset)
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return mixed|null
+ */
+ public function offsetGet($offset)
+ {
+ return $this->container[$offset] ?? null;
+ }
+
+ /**
+ * Sets value based on offset.
+ *
+ * @param int|null $offset Offset
+ * @param mixed $value Value to be set
+ *
+ * @return void
+ */
+ public function offsetSet($offset, $value)
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return void
+ */
+ public function offsetUnset($offset)
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Serializes the object to a value that can be serialized natively by json_encode().
+ * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ *
+ * @return mixed Returns data which can be serialized by json_encode(), which is a value
+ * of any type other than a resource.
+ */
+ public function jsonSerialize()
+ {
+ return ObjectSerializer::sanitizeForSerialization($this);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return json_encode(
+ ObjectSerializer::sanitizeForSerialization($this),
+ JSON_PRETTY_PRINT
+ );
+ }
+
+ /**
+ * Gets a header-safe presentation of the object
+ *
+ * @return string
+ */
+ public function toHeaderValue()
+ {
+ return json_encode(ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
+
+
diff --git a/lib/Model/AirlinePriceIndexData.php b/lib/Model/AirlinePriceIndexData.php
new file mode 100644
index 0000000..8420e71
--- /dev/null
+++ b/lib/Model/AirlinePriceIndexData.php
@@ -0,0 +1,410 @@
+
+ * @template TKey int|null
+ * @template TValue mixed|null
+ */
+class AirlinePriceIndexData implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'AirlinePriceIndexData';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'data' => '\Finnhub\Model\AirlinePriceIndex[]',
+ 'airline' => 'string',
+ 'from' => 'string',
+ 'to' => 'string'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'data' => null,
+ 'airline' => null,
+ 'from' => null,
+ 'to' => null
+ ];
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPITypes()
+ {
+ return self::$openAPITypes;
+ }
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPIFormats()
+ {
+ return self::$openAPIFormats;
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'data' => 'data',
+ 'airline' => 'airline',
+ 'from' => 'from',
+ 'to' => 'to'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'data' => 'setData',
+ 'airline' => 'setAirline',
+ 'from' => 'setFrom',
+ 'to' => 'setTo'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'data' => 'getData',
+ 'airline' => 'getAirline',
+ 'from' => 'getFrom',
+ 'to' => 'getTo'
+ ];
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @return array
+ */
+ public static function attributeMap()
+ {
+ return self::$attributeMap;
+ }
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @return array
+ */
+ public static function setters()
+ {
+ return self::$setters;
+ }
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @return array
+ */
+ public static function getters()
+ {
+ return self::$getters;
+ }
+
+ /**
+ * The original name of the model.
+ *
+ * @return string
+ */
+ public function getModelName()
+ {
+ return self::$openAPIModelName;
+ }
+
+
+ /**
+ * Associative array for storing property values
+ *
+ * @var mixed[]
+ */
+ protected $container = [];
+
+ /**
+ * Constructor
+ *
+ * @param mixed[] $data Associated array of property values
+ * initializing the model
+ */
+ public function __construct(array $data = null)
+ {
+ $this->container['data'] = $data['data'] ?? null;
+ $this->container['airline'] = $data['airline'] ?? null;
+ $this->container['from'] = $data['from'] ?? null;
+ $this->container['to'] = $data['to'] ?? null;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ return $invalidProperties;
+ }
+
+ /**
+ * Validate all the properties in the model
+ * return true if all passed
+ *
+ * @return bool True if all properties are valid
+ */
+ public function valid()
+ {
+ return count($this->listInvalidProperties()) === 0;
+ }
+
+
+ /**
+ * Gets data
+ *
+ * @return \Finnhub\Model\AirlinePriceIndex[]|null
+ */
+ public function getData()
+ {
+ return $this->container['data'];
+ }
+
+ /**
+ * Sets data
+ *
+ * @param \Finnhub\Model\AirlinePriceIndex[]|null $data Array of price index.
+ *
+ * @return self
+ */
+ public function setData($data)
+ {
+ $this->container['data'] = $data;
+
+ return $this;
+ }
+
+ /**
+ * Gets airline
+ *
+ * @return string|null
+ */
+ public function getAirline()
+ {
+ return $this->container['airline'];
+ }
+
+ /**
+ * Sets airline
+ *
+ * @param string|null $airline Airline name
+ *
+ * @return self
+ */
+ public function setAirline($airline)
+ {
+ $this->container['airline'] = $airline;
+
+ return $this;
+ }
+
+ /**
+ * Gets from
+ *
+ * @return string|null
+ */
+ public function getFrom()
+ {
+ return $this->container['from'];
+ }
+
+ /**
+ * Sets from
+ *
+ * @param string|null $from From date
+ *
+ * @return self
+ */
+ public function setFrom($from)
+ {
+ $this->container['from'] = $from;
+
+ return $this;
+ }
+
+ /**
+ * Gets to
+ *
+ * @return string|null
+ */
+ public function getTo()
+ {
+ return $this->container['to'];
+ }
+
+ /**
+ * Sets to
+ *
+ * @param string|null $to To date
+ *
+ * @return self
+ */
+ public function setTo($to)
+ {
+ $this->container['to'] = $to;
+
+ return $this;
+ }
+ /**
+ * Returns true if offset exists. False otherwise.
+ *
+ * @param integer $offset Offset
+ *
+ * @return boolean
+ */
+ public function offsetExists($offset)
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return mixed|null
+ */
+ public function offsetGet($offset)
+ {
+ return $this->container[$offset] ?? null;
+ }
+
+ /**
+ * Sets value based on offset.
+ *
+ * @param int|null $offset Offset
+ * @param mixed $value Value to be set
+ *
+ * @return void
+ */
+ public function offsetSet($offset, $value)
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return void
+ */
+ public function offsetUnset($offset)
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Serializes the object to a value that can be serialized natively by json_encode().
+ * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ *
+ * @return mixed Returns data which can be serialized by json_encode(), which is a value
+ * of any type other than a resource.
+ */
+ public function jsonSerialize()
+ {
+ return ObjectSerializer::sanitizeForSerialization($this);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return json_encode(
+ ObjectSerializer::sanitizeForSerialization($this),
+ JSON_PRETTY_PRINT
+ );
+ }
+
+ /**
+ * Gets a header-safe presentation of the object
+ *
+ * @return string
+ */
+ public function toHeaderValue()
+ {
+ return json_encode(ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
+
+
diff --git a/lib/Model/CompanyESG2.php b/lib/Model/CompanyESG2.php
new file mode 100644
index 0000000..60487cc
--- /dev/null
+++ b/lib/Model/CompanyESG2.php
@@ -0,0 +1,470 @@
+
+ * @template TKey int|null
+ * @template TValue mixed|null
+ */
+class CompanyESG2 implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'CompanyESG2';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'total_esg_score' => 'float',
+ 'environment_score' => 'float',
+ 'governance_score' => 'float',
+ 'social_score' => 'float',
+ 'data' => 'object',
+ 'period' => 'string'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'total_esg_score' => 'float',
+ 'environment_score' => 'float',
+ 'governance_score' => 'float',
+ 'social_score' => 'float',
+ 'data' => null,
+ 'period' => null
+ ];
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPITypes()
+ {
+ return self::$openAPITypes;
+ }
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPIFormats()
+ {
+ return self::$openAPIFormats;
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'total_esg_score' => 'totalESGScore',
+ 'environment_score' => 'environmentScore',
+ 'governance_score' => 'governanceScore',
+ 'social_score' => 'socialScore',
+ 'data' => 'data',
+ 'period' => 'period'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'total_esg_score' => 'setTotalEsgScore',
+ 'environment_score' => 'setEnvironmentScore',
+ 'governance_score' => 'setGovernanceScore',
+ 'social_score' => 'setSocialScore',
+ 'data' => 'setData',
+ 'period' => 'setPeriod'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'total_esg_score' => 'getTotalEsgScore',
+ 'environment_score' => 'getEnvironmentScore',
+ 'governance_score' => 'getGovernanceScore',
+ 'social_score' => 'getSocialScore',
+ 'data' => 'getData',
+ 'period' => 'getPeriod'
+ ];
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @return array
+ */
+ public static function attributeMap()
+ {
+ return self::$attributeMap;
+ }
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @return array
+ */
+ public static function setters()
+ {
+ return self::$setters;
+ }
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @return array
+ */
+ public static function getters()
+ {
+ return self::$getters;
+ }
+
+ /**
+ * The original name of the model.
+ *
+ * @return string
+ */
+ public function getModelName()
+ {
+ return self::$openAPIModelName;
+ }
+
+
+ /**
+ * Associative array for storing property values
+ *
+ * @var mixed[]
+ */
+ protected $container = [];
+
+ /**
+ * Constructor
+ *
+ * @param mixed[] $data Associated array of property values
+ * initializing the model
+ */
+ public function __construct(array $data = null)
+ {
+ $this->container['total_esg_score'] = $data['total_esg_score'] ?? null;
+ $this->container['environment_score'] = $data['environment_score'] ?? null;
+ $this->container['governance_score'] = $data['governance_score'] ?? null;
+ $this->container['social_score'] = $data['social_score'] ?? null;
+ $this->container['data'] = $data['data'] ?? null;
+ $this->container['period'] = $data['period'] ?? null;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ return $invalidProperties;
+ }
+
+ /**
+ * Validate all the properties in the model
+ * return true if all passed
+ *
+ * @return bool True if all properties are valid
+ */
+ public function valid()
+ {
+ return count($this->listInvalidProperties()) === 0;
+ }
+
+
+ /**
+ * Gets total_esg_score
+ *
+ * @return float|null
+ */
+ public function getTotalEsgScore()
+ {
+ return $this->container['total_esg_score'];
+ }
+
+ /**
+ * Sets total_esg_score
+ *
+ * @param float|null $total_esg_score Total ESG Score
+ *
+ * @return self
+ */
+ public function setTotalEsgScore($total_esg_score)
+ {
+ $this->container['total_esg_score'] = $total_esg_score;
+
+ return $this;
+ }
+
+ /**
+ * Gets environment_score
+ *
+ * @return float|null
+ */
+ public function getEnvironmentScore()
+ {
+ return $this->container['environment_score'];
+ }
+
+ /**
+ * Sets environment_score
+ *
+ * @param float|null $environment_score Environment Score
+ *
+ * @return self
+ */
+ public function setEnvironmentScore($environment_score)
+ {
+ $this->container['environment_score'] = $environment_score;
+
+ return $this;
+ }
+
+ /**
+ * Gets governance_score
+ *
+ * @return float|null
+ */
+ public function getGovernanceScore()
+ {
+ return $this->container['governance_score'];
+ }
+
+ /**
+ * Sets governance_score
+ *
+ * @param float|null $governance_score Governance Score
+ *
+ * @return self
+ */
+ public function setGovernanceScore($governance_score)
+ {
+ $this->container['governance_score'] = $governance_score;
+
+ return $this;
+ }
+
+ /**
+ * Gets social_score
+ *
+ * @return float|null
+ */
+ public function getSocialScore()
+ {
+ return $this->container['social_score'];
+ }
+
+ /**
+ * Sets social_score
+ *
+ * @param float|null $social_score Social Score
+ *
+ * @return self
+ */
+ public function setSocialScore($social_score)
+ {
+ $this->container['social_score'] = $social_score;
+
+ return $this;
+ }
+
+ /**
+ * Gets data
+ *
+ * @return object|null
+ */
+ public function getData()
+ {
+ return $this->container['data'];
+ }
+
+ /**
+ * Sets data
+ *
+ * @param object|null $data data
+ *
+ * @return self
+ */
+ public function setData($data)
+ {
+ $this->container['data'] = $data;
+
+ return $this;
+ }
+
+ /**
+ * Gets period
+ *
+ * @return string|null
+ */
+ public function getPeriod()
+ {
+ return $this->container['period'];
+ }
+
+ /**
+ * Sets period
+ *
+ * @param string|null $period Period
+ *
+ * @return self
+ */
+ public function setPeriod($period)
+ {
+ $this->container['period'] = $period;
+
+ return $this;
+ }
+ /**
+ * Returns true if offset exists. False otherwise.
+ *
+ * @param integer $offset Offset
+ *
+ * @return boolean
+ */
+ public function offsetExists($offset)
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return mixed|null
+ */
+ public function offsetGet($offset)
+ {
+ return $this->container[$offset] ?? null;
+ }
+
+ /**
+ * Sets value based on offset.
+ *
+ * @param int|null $offset Offset
+ * @param mixed $value Value to be set
+ *
+ * @return void
+ */
+ public function offsetSet($offset, $value)
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return void
+ */
+ public function offsetUnset($offset)
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Serializes the object to a value that can be serialized natively by json_encode().
+ * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ *
+ * @return mixed Returns data which can be serialized by json_encode(), which is a value
+ * of any type other than a resource.
+ */
+ public function jsonSerialize()
+ {
+ return ObjectSerializer::sanitizeForSerialization($this);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return json_encode(
+ ObjectSerializer::sanitizeForSerialization($this),
+ JSON_PRETTY_PRINT
+ );
+ }
+
+ /**
+ * Gets a header-safe presentation of the object
+ *
+ * @return string
+ */
+ public function toHeaderValue()
+ {
+ return json_encode(ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
+
+
diff --git a/lib/Model/CompanyProfile.php b/lib/Model/CompanyProfile.php
index 2d8b6db..729d891 100644
--- a/lib/Model/CompanyProfile.php
+++ b/lib/Model/CompanyProfile.php
@@ -76,6 +76,7 @@ class CompanyProfile implements ModelInterface, ArrayAccess, \JsonSerializable
'gsubind' => 'string',
'isin' => 'string',
'lei' => 'string',
+ 'ir_url' => 'string',
'naics_national_industry' => 'string',
'naics' => 'string',
'naics_sector' => 'string',
@@ -118,6 +119,7 @@ class CompanyProfile implements ModelInterface, ArrayAccess, \JsonSerializable
'gsubind' => null,
'isin' => null,
'lei' => null,
+ 'ir_url' => null,
'naics_national_industry' => null,
'naics' => null,
'naics_sector' => null,
@@ -179,6 +181,7 @@ public static function openAPIFormats()
'gsubind' => 'gsubind',
'isin' => 'isin',
'lei' => 'lei',
+ 'ir_url' => 'irUrl',
'naics_national_industry' => 'naicsNationalIndustry',
'naics' => 'naics',
'naics_sector' => 'naicsSector',
@@ -219,6 +222,7 @@ public static function openAPIFormats()
'gsubind' => 'setGsubind',
'isin' => 'setIsin',
'lei' => 'setLei',
+ 'ir_url' => 'setIrUrl',
'naics_national_industry' => 'setNaicsNationalIndustry',
'naics' => 'setNaics',
'naics_sector' => 'setNaicsSector',
@@ -259,6 +263,7 @@ public static function openAPIFormats()
'gsubind' => 'getGsubind',
'isin' => 'getIsin',
'lei' => 'getLei',
+ 'ir_url' => 'getIrUrl',
'naics_national_industry' => 'getNaicsNationalIndustry',
'naics' => 'getNaics',
'naics_sector' => 'getNaicsSector',
@@ -350,6 +355,7 @@ public function __construct(array $data = null)
$this->container['gsubind'] = $data['gsubind'] ?? null;
$this->container['isin'] = $data['isin'] ?? null;
$this->container['lei'] = $data['lei'] ?? null;
+ $this->container['ir_url'] = $data['ir_url'] ?? null;
$this->container['naics_national_industry'] = $data['naics_national_industry'] ?? null;
$this->container['naics'] = $data['naics'] ?? null;
$this->container['naics_sector'] = $data['naics_sector'] ?? null;
@@ -799,6 +805,30 @@ public function setLei($lei)
return $this;
}
+ /**
+ * Gets ir_url
+ *
+ * @return string|null
+ */
+ public function getIrUrl()
+ {
+ return $this->container['ir_url'];
+ }
+
+ /**
+ * Sets ir_url
+ *
+ * @param string|null $ir_url Investor relations website.
+ *
+ * @return self
+ */
+ public function setIrUrl($ir_url)
+ {
+ $this->container['ir_url'] = $ir_url;
+
+ return $this;
+ }
+
/**
* Gets naics_national_industry
*
diff --git a/lib/Model/ETFProfileData.php b/lib/Model/ETFProfileData.php
index 27507ed..d601539 100644
--- a/lib/Model/ETFProfileData.php
+++ b/lib/Model/ETFProfileData.php
@@ -71,6 +71,7 @@ class ETFProfileData implements ModelInterface, ArrayAccess, \JsonSerializable
'domicile' => 'string',
'inception_date' => '\DateTime',
'website' => 'string',
+ 'logo' => 'string',
'isin' => 'string',
'cusip' => 'string',
'price_to_earnings' => 'float',
@@ -102,6 +103,7 @@ class ETFProfileData implements ModelInterface, ArrayAccess, \JsonSerializable
'domicile' => null,
'inception_date' => 'date',
'website' => null,
+ 'logo' => null,
'isin' => null,
'cusip' => null,
'price_to_earnings' => 'float',
@@ -152,6 +154,7 @@ public static function openAPIFormats()
'domicile' => 'domicile',
'inception_date' => 'inceptionDate',
'website' => 'website',
+ 'logo' => 'logo',
'isin' => 'isin',
'cusip' => 'cusip',
'price_to_earnings' => 'priceToEarnings',
@@ -181,6 +184,7 @@ public static function openAPIFormats()
'domicile' => 'setDomicile',
'inception_date' => 'setInceptionDate',
'website' => 'setWebsite',
+ 'logo' => 'setLogo',
'isin' => 'setIsin',
'cusip' => 'setCusip',
'price_to_earnings' => 'setPriceToEarnings',
@@ -210,6 +214,7 @@ public static function openAPIFormats()
'domicile' => 'getDomicile',
'inception_date' => 'getInceptionDate',
'website' => 'getWebsite',
+ 'logo' => 'getLogo',
'isin' => 'getIsin',
'cusip' => 'getCusip',
'price_to_earnings' => 'getPriceToEarnings',
@@ -290,6 +295,7 @@ public function __construct(array $data = null)
$this->container['domicile'] = $data['domicile'] ?? null;
$this->container['inception_date'] = $data['inception_date'] ?? null;
$this->container['website'] = $data['website'] ?? null;
+ $this->container['logo'] = $data['logo'] ?? null;
$this->container['isin'] = $data['isin'] ?? null;
$this->container['cusip'] = $data['cusip'] ?? null;
$this->container['price_to_earnings'] = $data['price_to_earnings'] ?? null;
@@ -613,6 +619,30 @@ public function setWebsite($website)
return $this;
}
+ /**
+ * Gets logo
+ *
+ * @return string|null
+ */
+ public function getLogo()
+ {
+ return $this->container['logo'];
+ }
+
+ /**
+ * Sets logo
+ *
+ * @param string|null $logo Logo.
+ *
+ * @return self
+ */
+ public function setLogo($logo)
+ {
+ $this->container['logo'] = $logo;
+
+ return $this;
+ }
+
/**
* Gets isin
*
diff --git a/lib/Model/EmployeeCount.php b/lib/Model/EmployeeCount.php
new file mode 100644
index 0000000..fbd82ce
--- /dev/null
+++ b/lib/Model/EmployeeCount.php
@@ -0,0 +1,350 @@
+
+ * @template TKey int|null
+ * @template TValue mixed|null
+ */
+class EmployeeCount implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'EmployeeCount';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'at_date' => 'string',
+ 'employee' => 'float'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'at_date' => null,
+ 'employee' => 'float'
+ ];
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPITypes()
+ {
+ return self::$openAPITypes;
+ }
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPIFormats()
+ {
+ return self::$openAPIFormats;
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'at_date' => 'atDate',
+ 'employee' => 'employee'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'at_date' => 'setAtDate',
+ 'employee' => 'setEmployee'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'at_date' => 'getAtDate',
+ 'employee' => 'getEmployee'
+ ];
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @return array
+ */
+ public static function attributeMap()
+ {
+ return self::$attributeMap;
+ }
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @return array
+ */
+ public static function setters()
+ {
+ return self::$setters;
+ }
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @return array
+ */
+ public static function getters()
+ {
+ return self::$getters;
+ }
+
+ /**
+ * The original name of the model.
+ *
+ * @return string
+ */
+ public function getModelName()
+ {
+ return self::$openAPIModelName;
+ }
+
+
+ /**
+ * Associative array for storing property values
+ *
+ * @var mixed[]
+ */
+ protected $container = [];
+
+ /**
+ * Constructor
+ *
+ * @param mixed[] $data Associated array of property values
+ * initializing the model
+ */
+ public function __construct(array $data = null)
+ {
+ $this->container['at_date'] = $data['at_date'] ?? null;
+ $this->container['employee'] = $data['employee'] ?? null;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ return $invalidProperties;
+ }
+
+ /**
+ * Validate all the properties in the model
+ * return true if all passed
+ *
+ * @return bool True if all properties are valid
+ */
+ public function valid()
+ {
+ return count($this->listInvalidProperties()) === 0;
+ }
+
+
+ /**
+ * Gets at_date
+ *
+ * @return string|null
+ */
+ public function getAtDate()
+ {
+ return $this->container['at_date'];
+ }
+
+ /**
+ * Sets at_date
+ *
+ * @param string|null $at_date Date of the reading
+ *
+ * @return self
+ */
+ public function setAtDate($at_date)
+ {
+ $this->container['at_date'] = $at_date;
+
+ return $this;
+ }
+
+ /**
+ * Gets employee
+ *
+ * @return float|null
+ */
+ public function getEmployee()
+ {
+ return $this->container['employee'];
+ }
+
+ /**
+ * Sets employee
+ *
+ * @param float|null $employee Value
+ *
+ * @return self
+ */
+ public function setEmployee($employee)
+ {
+ $this->container['employee'] = $employee;
+
+ return $this;
+ }
+ /**
+ * Returns true if offset exists. False otherwise.
+ *
+ * @param integer $offset Offset
+ *
+ * @return boolean
+ */
+ public function offsetExists($offset)
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return mixed|null
+ */
+ public function offsetGet($offset)
+ {
+ return $this->container[$offset] ?? null;
+ }
+
+ /**
+ * Sets value based on offset.
+ *
+ * @param int|null $offset Offset
+ * @param mixed $value Value to be set
+ *
+ * @return void
+ */
+ public function offsetSet($offset, $value)
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return void
+ */
+ public function offsetUnset($offset)
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Serializes the object to a value that can be serialized natively by json_encode().
+ * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ *
+ * @return mixed Returns data which can be serialized by json_encode(), which is a value
+ * of any type other than a resource.
+ */
+ public function jsonSerialize()
+ {
+ return ObjectSerializer::sanitizeForSerialization($this);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return json_encode(
+ ObjectSerializer::sanitizeForSerialization($this),
+ JSON_PRETTY_PRINT
+ );
+ }
+
+ /**
+ * Gets a header-safe presentation of the object
+ *
+ * @return string
+ */
+ public function toHeaderValue()
+ {
+ return json_encode(ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
+
+
diff --git a/lib/Model/FilingResponse.php b/lib/Model/FilingResponse.php
index a8c6b77..cd3bec2 100644
--- a/lib/Model/FilingResponse.php
+++ b/lib/Model/FilingResponse.php
@@ -434,7 +434,7 @@ public function getFiledDate()
/**
* Sets filed_date
*
- * @param string|null $filed_date Date the filing is make available to the public
+ * @param string|null $filed_date Date the filing is made available to the public
*
* @return self
*/
diff --git a/lib/Model/HistoricalCompanyESG.php b/lib/Model/HistoricalCompanyESG.php
new file mode 100644
index 0000000..c1fba8c
--- /dev/null
+++ b/lib/Model/HistoricalCompanyESG.php
@@ -0,0 +1,350 @@
+
+ * @template TKey int|null
+ * @template TValue mixed|null
+ */
+class HistoricalCompanyESG implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'HistoricalCompanyESG';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'symbol' => 'string',
+ 'data' => '\Finnhub\Model\CompanyESG2[]'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'symbol' => null,
+ 'data' => null
+ ];
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPITypes()
+ {
+ return self::$openAPITypes;
+ }
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPIFormats()
+ {
+ return self::$openAPIFormats;
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'symbol' => 'symbol',
+ 'data' => 'data'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'symbol' => 'setSymbol',
+ 'data' => 'setData'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'symbol' => 'getSymbol',
+ 'data' => 'getData'
+ ];
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @return array
+ */
+ public static function attributeMap()
+ {
+ return self::$attributeMap;
+ }
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @return array
+ */
+ public static function setters()
+ {
+ return self::$setters;
+ }
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @return array
+ */
+ public static function getters()
+ {
+ return self::$getters;
+ }
+
+ /**
+ * The original name of the model.
+ *
+ * @return string
+ */
+ public function getModelName()
+ {
+ return self::$openAPIModelName;
+ }
+
+
+ /**
+ * Associative array for storing property values
+ *
+ * @var mixed[]
+ */
+ protected $container = [];
+
+ /**
+ * Constructor
+ *
+ * @param mixed[] $data Associated array of property values
+ * initializing the model
+ */
+ public function __construct(array $data = null)
+ {
+ $this->container['symbol'] = $data['symbol'] ?? null;
+ $this->container['data'] = $data['data'] ?? null;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ return $invalidProperties;
+ }
+
+ /**
+ * Validate all the properties in the model
+ * return true if all passed
+ *
+ * @return bool True if all properties are valid
+ */
+ public function valid()
+ {
+ return count($this->listInvalidProperties()) === 0;
+ }
+
+
+ /**
+ * Gets symbol
+ *
+ * @return string|null
+ */
+ public function getSymbol()
+ {
+ return $this->container['symbol'];
+ }
+
+ /**
+ * Sets symbol
+ *
+ * @param string|null $symbol symbol
+ *
+ * @return self
+ */
+ public function setSymbol($symbol)
+ {
+ $this->container['symbol'] = $symbol;
+
+ return $this;
+ }
+
+ /**
+ * Gets data
+ *
+ * @return \Finnhub\Model\CompanyESG2[]|null
+ */
+ public function getData()
+ {
+ return $this->container['data'];
+ }
+
+ /**
+ * Sets data
+ *
+ * @param \Finnhub\Model\CompanyESG2[]|null $data Historical ESG data points.
+ *
+ * @return self
+ */
+ public function setData($data)
+ {
+ $this->container['data'] = $data;
+
+ return $this;
+ }
+ /**
+ * Returns true if offset exists. False otherwise.
+ *
+ * @param integer $offset Offset
+ *
+ * @return boolean
+ */
+ public function offsetExists($offset)
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return mixed|null
+ */
+ public function offsetGet($offset)
+ {
+ return $this->container[$offset] ?? null;
+ }
+
+ /**
+ * Sets value based on offset.
+ *
+ * @param int|null $offset Offset
+ * @param mixed $value Value to be set
+ *
+ * @return void
+ */
+ public function offsetSet($offset, $value)
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return void
+ */
+ public function offsetUnset($offset)
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Serializes the object to a value that can be serialized natively by json_encode().
+ * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ *
+ * @return mixed Returns data which can be serialized by json_encode(), which is a value
+ * of any type other than a resource.
+ */
+ public function jsonSerialize()
+ {
+ return ObjectSerializer::sanitizeForSerialization($this);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return json_encode(
+ ObjectSerializer::sanitizeForSerialization($this),
+ JSON_PRETTY_PRINT
+ );
+ }
+
+ /**
+ * Gets a header-safe presentation of the object
+ *
+ * @return string
+ */
+ public function toHeaderValue()
+ {
+ return json_encode(ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
+
+
diff --git a/lib/Model/HistoricalEmployeeCount.php b/lib/Model/HistoricalEmployeeCount.php
new file mode 100644
index 0000000..1cc80f3
--- /dev/null
+++ b/lib/Model/HistoricalEmployeeCount.php
@@ -0,0 +1,350 @@
+
+ * @template TKey int|null
+ * @template TValue mixed|null
+ */
+class HistoricalEmployeeCount implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'HistoricalEmployeeCount';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'data' => '\Finnhub\Model\EmployeeCount[]',
+ 'symbol' => 'string'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'data' => null,
+ 'symbol' => null
+ ];
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPITypes()
+ {
+ return self::$openAPITypes;
+ }
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPIFormats()
+ {
+ return self::$openAPIFormats;
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'data' => 'data',
+ 'symbol' => 'symbol'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'data' => 'setData',
+ 'symbol' => 'setSymbol'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'data' => 'getData',
+ 'symbol' => 'getSymbol'
+ ];
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @return array
+ */
+ public static function attributeMap()
+ {
+ return self::$attributeMap;
+ }
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @return array
+ */
+ public static function setters()
+ {
+ return self::$setters;
+ }
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @return array
+ */
+ public static function getters()
+ {
+ return self::$getters;
+ }
+
+ /**
+ * The original name of the model.
+ *
+ * @return string
+ */
+ public function getModelName()
+ {
+ return self::$openAPIModelName;
+ }
+
+
+ /**
+ * Associative array for storing property values
+ *
+ * @var mixed[]
+ */
+ protected $container = [];
+
+ /**
+ * Constructor
+ *
+ * @param mixed[] $data Associated array of property values
+ * initializing the model
+ */
+ public function __construct(array $data = null)
+ {
+ $this->container['data'] = $data['data'] ?? null;
+ $this->container['symbol'] = $data['symbol'] ?? null;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ return $invalidProperties;
+ }
+
+ /**
+ * Validate all the properties in the model
+ * return true if all passed
+ *
+ * @return bool True if all properties are valid
+ */
+ public function valid()
+ {
+ return count($this->listInvalidProperties()) === 0;
+ }
+
+
+ /**
+ * Gets data
+ *
+ * @return \Finnhub\Model\EmployeeCount[]|null
+ */
+ public function getData()
+ {
+ return $this->container['data'];
+ }
+
+ /**
+ * Sets data
+ *
+ * @param \Finnhub\Model\EmployeeCount[]|null $data Array of market data.
+ *
+ * @return self
+ */
+ public function setData($data)
+ {
+ $this->container['data'] = $data;
+
+ return $this;
+ }
+
+ /**
+ * Gets symbol
+ *
+ * @return string|null
+ */
+ public function getSymbol()
+ {
+ return $this->container['symbol'];
+ }
+
+ /**
+ * Sets symbol
+ *
+ * @param string|null $symbol Symbol
+ *
+ * @return self
+ */
+ public function setSymbol($symbol)
+ {
+ $this->container['symbol'] = $symbol;
+
+ return $this;
+ }
+ /**
+ * Returns true if offset exists. False otherwise.
+ *
+ * @param integer $offset Offset
+ *
+ * @return boolean
+ */
+ public function offsetExists($offset)
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return mixed|null
+ */
+ public function offsetGet($offset)
+ {
+ return $this->container[$offset] ?? null;
+ }
+
+ /**
+ * Sets value based on offset.
+ *
+ * @param int|null $offset Offset
+ * @param mixed $value Value to be set
+ *
+ * @return void
+ */
+ public function offsetSet($offset, $value)
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return void
+ */
+ public function offsetUnset($offset)
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Serializes the object to a value that can be serialized natively by json_encode().
+ * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ *
+ * @return mixed Returns data which can be serialized by json_encode(), which is a value
+ * of any type other than a resource.
+ */
+ public function jsonSerialize()
+ {
+ return ObjectSerializer::sanitizeForSerialization($this);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return json_encode(
+ ObjectSerializer::sanitizeForSerialization($this),
+ JSON_PRETTY_PRINT
+ );
+ }
+
+ /**
+ * Gets a header-safe presentation of the object
+ *
+ * @return string
+ */
+ public function toHeaderValue()
+ {
+ return json_encode(ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
+
+
diff --git a/lib/Model/HistoricalMarketCapData.php b/lib/Model/HistoricalMarketCapData.php
new file mode 100644
index 0000000..b21173e
--- /dev/null
+++ b/lib/Model/HistoricalMarketCapData.php
@@ -0,0 +1,380 @@
+
+ * @template TKey int|null
+ * @template TValue mixed|null
+ */
+class HistoricalMarketCapData implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'HistoricalMarketCapData';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'data' => '\Finnhub\Model\MarketCapData[]',
+ 'symbol' => 'string',
+ 'currency' => 'string'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'data' => null,
+ 'symbol' => null,
+ 'currency' => null
+ ];
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPITypes()
+ {
+ return self::$openAPITypes;
+ }
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPIFormats()
+ {
+ return self::$openAPIFormats;
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'data' => 'data',
+ 'symbol' => 'symbol',
+ 'currency' => 'currency'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'data' => 'setData',
+ 'symbol' => 'setSymbol',
+ 'currency' => 'setCurrency'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'data' => 'getData',
+ 'symbol' => 'getSymbol',
+ 'currency' => 'getCurrency'
+ ];
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @return array
+ */
+ public static function attributeMap()
+ {
+ return self::$attributeMap;
+ }
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @return array
+ */
+ public static function setters()
+ {
+ return self::$setters;
+ }
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @return array
+ */
+ public static function getters()
+ {
+ return self::$getters;
+ }
+
+ /**
+ * The original name of the model.
+ *
+ * @return string
+ */
+ public function getModelName()
+ {
+ return self::$openAPIModelName;
+ }
+
+
+ /**
+ * Associative array for storing property values
+ *
+ * @var mixed[]
+ */
+ protected $container = [];
+
+ /**
+ * Constructor
+ *
+ * @param mixed[] $data Associated array of property values
+ * initializing the model
+ */
+ public function __construct(array $data = null)
+ {
+ $this->container['data'] = $data['data'] ?? null;
+ $this->container['symbol'] = $data['symbol'] ?? null;
+ $this->container['currency'] = $data['currency'] ?? null;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ return $invalidProperties;
+ }
+
+ /**
+ * Validate all the properties in the model
+ * return true if all passed
+ *
+ * @return bool True if all properties are valid
+ */
+ public function valid()
+ {
+ return count($this->listInvalidProperties()) === 0;
+ }
+
+
+ /**
+ * Gets data
+ *
+ * @return \Finnhub\Model\MarketCapData[]|null
+ */
+ public function getData()
+ {
+ return $this->container['data'];
+ }
+
+ /**
+ * Sets data
+ *
+ * @param \Finnhub\Model\MarketCapData[]|null $data Array of market data.
+ *
+ * @return self
+ */
+ public function setData($data)
+ {
+ $this->container['data'] = $data;
+
+ return $this;
+ }
+
+ /**
+ * Gets symbol
+ *
+ * @return string|null
+ */
+ public function getSymbol()
+ {
+ return $this->container['symbol'];
+ }
+
+ /**
+ * Sets symbol
+ *
+ * @param string|null $symbol Symbol
+ *
+ * @return self
+ */
+ public function setSymbol($symbol)
+ {
+ $this->container['symbol'] = $symbol;
+
+ return $this;
+ }
+
+ /**
+ * Gets currency
+ *
+ * @return string|null
+ */
+ public function getCurrency()
+ {
+ return $this->container['currency'];
+ }
+
+ /**
+ * Sets currency
+ *
+ * @param string|null $currency Currency
+ *
+ * @return self
+ */
+ public function setCurrency($currency)
+ {
+ $this->container['currency'] = $currency;
+
+ return $this;
+ }
+ /**
+ * Returns true if offset exists. False otherwise.
+ *
+ * @param integer $offset Offset
+ *
+ * @return boolean
+ */
+ public function offsetExists($offset)
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return mixed|null
+ */
+ public function offsetGet($offset)
+ {
+ return $this->container[$offset] ?? null;
+ }
+
+ /**
+ * Sets value based on offset.
+ *
+ * @param int|null $offset Offset
+ * @param mixed $value Value to be set
+ *
+ * @return void
+ */
+ public function offsetSet($offset, $value)
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return void
+ */
+ public function offsetUnset($offset)
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Serializes the object to a value that can be serialized natively by json_encode().
+ * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ *
+ * @return mixed Returns data which can be serialized by json_encode(), which is a value
+ * of any type other than a resource.
+ */
+ public function jsonSerialize()
+ {
+ return ObjectSerializer::sanitizeForSerialization($this);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return json_encode(
+ ObjectSerializer::sanitizeForSerialization($this),
+ JSON_PRETTY_PRINT
+ );
+ }
+
+ /**
+ * Gets a header-safe presentation of the object
+ *
+ * @return string
+ */
+ public function toHeaderValue()
+ {
+ return json_encode(ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
+
+
diff --git a/lib/Model/MarketCapData.php b/lib/Model/MarketCapData.php
new file mode 100644
index 0000000..6b595c0
--- /dev/null
+++ b/lib/Model/MarketCapData.php
@@ -0,0 +1,350 @@
+
+ * @template TKey int|null
+ * @template TValue mixed|null
+ */
+class MarketCapData implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'MarketCapData';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'at_date' => 'string',
+ 'market_capitalization' => 'float'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'at_date' => null,
+ 'market_capitalization' => 'float'
+ ];
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPITypes()
+ {
+ return self::$openAPITypes;
+ }
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPIFormats()
+ {
+ return self::$openAPIFormats;
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'at_date' => 'atDate',
+ 'market_capitalization' => 'marketCapitalization'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'at_date' => 'setAtDate',
+ 'market_capitalization' => 'setMarketCapitalization'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'at_date' => 'getAtDate',
+ 'market_capitalization' => 'getMarketCapitalization'
+ ];
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @return array
+ */
+ public static function attributeMap()
+ {
+ return self::$attributeMap;
+ }
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @return array
+ */
+ public static function setters()
+ {
+ return self::$setters;
+ }
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @return array
+ */
+ public static function getters()
+ {
+ return self::$getters;
+ }
+
+ /**
+ * The original name of the model.
+ *
+ * @return string
+ */
+ public function getModelName()
+ {
+ return self::$openAPIModelName;
+ }
+
+
+ /**
+ * Associative array for storing property values
+ *
+ * @var mixed[]
+ */
+ protected $container = [];
+
+ /**
+ * Constructor
+ *
+ * @param mixed[] $data Associated array of property values
+ * initializing the model
+ */
+ public function __construct(array $data = null)
+ {
+ $this->container['at_date'] = $data['at_date'] ?? null;
+ $this->container['market_capitalization'] = $data['market_capitalization'] ?? null;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ return $invalidProperties;
+ }
+
+ /**
+ * Validate all the properties in the model
+ * return true if all passed
+ *
+ * @return bool True if all properties are valid
+ */
+ public function valid()
+ {
+ return count($this->listInvalidProperties()) === 0;
+ }
+
+
+ /**
+ * Gets at_date
+ *
+ * @return string|null
+ */
+ public function getAtDate()
+ {
+ return $this->container['at_date'];
+ }
+
+ /**
+ * Sets at_date
+ *
+ * @param string|null $at_date Date of the reading
+ *
+ * @return self
+ */
+ public function setAtDate($at_date)
+ {
+ $this->container['at_date'] = $at_date;
+
+ return $this;
+ }
+
+ /**
+ * Gets market_capitalization
+ *
+ * @return float|null
+ */
+ public function getMarketCapitalization()
+ {
+ return $this->container['market_capitalization'];
+ }
+
+ /**
+ * Sets market_capitalization
+ *
+ * @param float|null $market_capitalization Value
+ *
+ * @return self
+ */
+ public function setMarketCapitalization($market_capitalization)
+ {
+ $this->container['market_capitalization'] = $market_capitalization;
+
+ return $this;
+ }
+ /**
+ * Returns true if offset exists. False otherwise.
+ *
+ * @param integer $offset Offset
+ *
+ * @return boolean
+ */
+ public function offsetExists($offset)
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return mixed|null
+ */
+ public function offsetGet($offset)
+ {
+ return $this->container[$offset] ?? null;
+ }
+
+ /**
+ * Sets value based on offset.
+ *
+ * @param int|null $offset Offset
+ * @param mixed $value Value to be set
+ *
+ * @return void
+ */
+ public function offsetSet($offset, $value)
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return void
+ */
+ public function offsetUnset($offset)
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Serializes the object to a value that can be serialized natively by json_encode().
+ * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ *
+ * @return mixed Returns data which can be serialized by json_encode(), which is a value
+ * of any type other than a resource.
+ */
+ public function jsonSerialize()
+ {
+ return ObjectSerializer::sanitizeForSerialization($this);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return json_encode(
+ ObjectSerializer::sanitizeForSerialization($this),
+ JSON_PRETTY_PRINT
+ );
+ }
+
+ /**
+ * Gets a header-safe presentation of the object
+ *
+ * @return string
+ */
+ public function toHeaderValue()
+ {
+ return json_encode(ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
+
+
diff --git a/lib/Model/MarketStatus.php b/lib/Model/MarketStatus.php
index 7336e70..4a5dcc2 100644
--- a/lib/Model/MarketStatus.php
+++ b/lib/Model/MarketStatus.php
@@ -296,7 +296,7 @@ public function getSession()
/**
* Sets session
*
- * @param string|null $session Market session.
+ * @param string|null $session Market session. Can be 1 of the following values: pre-market
,regular
,post-market
or null
if the market is closed.
*
* @return self
*/
diff --git a/lib/Model/PriceTarget.php b/lib/Model/PriceTarget.php
index 64653d0..6e135ea 100644
--- a/lib/Model/PriceTarget.php
+++ b/lib/Model/PriceTarget.php
@@ -64,6 +64,7 @@ class PriceTarget implements ModelInterface, ArrayAccess, \JsonSerializable
'target_low' => 'float',
'target_mean' => 'float',
'target_median' => 'float',
+ 'number_analysts' => 'int',
'last_updated' => 'string'
];
@@ -80,6 +81,7 @@ class PriceTarget implements ModelInterface, ArrayAccess, \JsonSerializable
'target_low' => 'float',
'target_mean' => 'float',
'target_median' => 'float',
+ 'number_analysts' => 'int64',
'last_updated' => null
];
@@ -115,6 +117,7 @@ public static function openAPIFormats()
'target_low' => 'targetLow',
'target_mean' => 'targetMean',
'target_median' => 'targetMedian',
+ 'number_analysts' => 'numberAnalysts',
'last_updated' => 'lastUpdated'
];
@@ -129,6 +132,7 @@ public static function openAPIFormats()
'target_low' => 'setTargetLow',
'target_mean' => 'setTargetMean',
'target_median' => 'setTargetMedian',
+ 'number_analysts' => 'setNumberAnalysts',
'last_updated' => 'setLastUpdated'
];
@@ -143,6 +147,7 @@ public static function openAPIFormats()
'target_low' => 'getTargetLow',
'target_mean' => 'getTargetMean',
'target_median' => 'getTargetMedian',
+ 'number_analysts' => 'getNumberAnalysts',
'last_updated' => 'getLastUpdated'
];
@@ -208,6 +213,7 @@ public function __construct(array $data = null)
$this->container['target_low'] = $data['target_low'] ?? null;
$this->container['target_mean'] = $data['target_mean'] ?? null;
$this->container['target_median'] = $data['target_median'] ?? null;
+ $this->container['number_analysts'] = $data['number_analysts'] ?? null;
$this->container['last_updated'] = $data['last_updated'] ?? null;
}
@@ -355,6 +361,30 @@ public function setTargetMedian($target_median)
return $this;
}
+ /**
+ * Gets number_analysts
+ *
+ * @return int|null
+ */
+ public function getNumberAnalysts()
+ {
+ return $this->container['number_analysts'];
+ }
+
+ /**
+ * Sets number_analysts
+ *
+ * @param int|null $number_analysts Number of Analysts.
+ *
+ * @return self
+ */
+ public function setNumberAnalysts($number_analysts)
+ {
+ $this->container['number_analysts'] = $number_analysts;
+
+ return $this;
+ }
+
/**
* Gets last_updated
*
diff --git a/test/Model/AirlinePriceIndexDataTest.php b/test/Model/AirlinePriceIndexDataTest.php
new file mode 100644
index 0000000..00b9b34
--- /dev/null
+++ b/test/Model/AirlinePriceIndexDataTest.php
@@ -0,0 +1,117 @@
+markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "data"
+ */
+ public function testPropertyData()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "airline"
+ */
+ public function testPropertyAirline()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "from"
+ */
+ public function testPropertyFrom()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "to"
+ */
+ public function testPropertyTo()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+}
diff --git a/test/Model/AirlinePriceIndexTest.php b/test/Model/AirlinePriceIndexTest.php
new file mode 100644
index 0000000..baeb900
--- /dev/null
+++ b/test/Model/AirlinePriceIndexTest.php
@@ -0,0 +1,108 @@
+markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "date"
+ */
+ public function testPropertyDate()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "price_index"
+ */
+ public function testPropertyPriceIndex()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "daily_avg_price"
+ */
+ public function testPropertyDailyAvgPrice()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+}
diff --git a/test/Model/CompanyESG2Test.php b/test/Model/CompanyESG2Test.php
new file mode 100644
index 0000000..89f5b99
--- /dev/null
+++ b/test/Model/CompanyESG2Test.php
@@ -0,0 +1,135 @@
+markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "total_esg_score"
+ */
+ public function testPropertyTotalEsgScore()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "environment_score"
+ */
+ public function testPropertyEnvironmentScore()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "governance_score"
+ */
+ public function testPropertyGovernanceScore()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "social_score"
+ */
+ public function testPropertySocialScore()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "data"
+ */
+ public function testPropertyData()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "period"
+ */
+ public function testPropertyPeriod()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+}
diff --git a/test/Model/EmployeeCountTest.php b/test/Model/EmployeeCountTest.php
new file mode 100644
index 0000000..e15249d
--- /dev/null
+++ b/test/Model/EmployeeCountTest.php
@@ -0,0 +1,99 @@
+markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "at_date"
+ */
+ public function testPropertyAtDate()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "employee"
+ */
+ public function testPropertyEmployee()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+}
diff --git a/test/Model/HistoricalCompanyESGTest.php b/test/Model/HistoricalCompanyESGTest.php
new file mode 100644
index 0000000..2fd0cb4
--- /dev/null
+++ b/test/Model/HistoricalCompanyESGTest.php
@@ -0,0 +1,99 @@
+markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "symbol"
+ */
+ public function testPropertySymbol()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "data"
+ */
+ public function testPropertyData()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+}
diff --git a/test/Model/HistoricalEmployeeCountTest.php b/test/Model/HistoricalEmployeeCountTest.php
new file mode 100644
index 0000000..7734878
--- /dev/null
+++ b/test/Model/HistoricalEmployeeCountTest.php
@@ -0,0 +1,99 @@
+markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "data"
+ */
+ public function testPropertyData()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "symbol"
+ */
+ public function testPropertySymbol()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+}
diff --git a/test/Model/HistoricalMarketCapDataTest.php b/test/Model/HistoricalMarketCapDataTest.php
new file mode 100644
index 0000000..0144376
--- /dev/null
+++ b/test/Model/HistoricalMarketCapDataTest.php
@@ -0,0 +1,108 @@
+markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "data"
+ */
+ public function testPropertyData()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "symbol"
+ */
+ public function testPropertySymbol()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "currency"
+ */
+ public function testPropertyCurrency()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+}
diff --git a/test/Model/MarketCapDataTest.php b/test/Model/MarketCapDataTest.php
new file mode 100644
index 0000000..416d654
--- /dev/null
+++ b/test/Model/MarketCapDataTest.php
@@ -0,0 +1,99 @@
+markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "at_date"
+ */
+ public function testPropertyAtDate()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "market_capitalization"
+ */
+ public function testPropertyMarketCapitalization()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+}