twelve_data_client/apis/
fundamentals_api.rs

1/*
2 * Twelve Data API
3 *
4 * ## Overview  Welcome to Twelve Data developer docs — your gateway to comprehensive financial market data through a powerful and easy-to-use API. Twelve Data provides access to financial markets across over 50 global countries, covering more than 1 million public instruments, including stocks, forex, ETFs, mutual funds, commodities, and cryptocurrencies.  ## Quickstart  To get started, you'll need to sign up for an API key. Once you have your API key, you can start making requests to the API.  ### Step 1: Create Twelve Data account  Sign up on the Twelve Data website to create your account [here](https://twelvedata.com/register). This gives you access to the API dashboard and your API key.  ### Step 2: Get your API key  After signing in, navigate to your [dashboard](https://twelvedata.com/account/api-keys) to find your unique API key. This key is required to authenticate all API and WebSocket requests.  ### Step 3: Make your first request  Try a simple API call with cURL to fetch the latest price for Apple (AAPL):  ``` curl \"https://api.twelvedata.com/price?symbol=AAPL&apikey=your_api_key\" ```  ### Step 4: Make a request from Python or Javascript  Use our client libraries or standard HTTP clients to make API calls programmatically. Here’s an example in [Python](https://github.com/twelvedata/twelvedata-python) and JavaScript:  #### Python (using official Twelve Data SDK):  ```python from twelvedata import TDClient  # Initialize client with your API key td = TDClient(apikey=\"your_api_key\")  # Get latest price for Apple price = td.price(symbol=\"AAPL\").as_json()  print(price) ```  #### JavaScript (Node.js):  ```javascript const fetch = require('node-fetch');  fetch('https://api.twelvedata.com/price?symbol=AAPL&apikey=your_api_key') &nbsp;&nbsp;.then(response => response.json()) &nbsp;&nbsp;.then(data => console.log(data)); ```  ### Step 5: Perform correlation analysis between Tesla and Microsoft prices  Fetch historical price data for Tesla (TSLA) and Microsoft (MSFT) and calculate the correlation of their closing prices:  ```python from twelvedata import TDClient import pandas as pd  # Initialize client with your API key td = TDClient(apikey=\"your_api_key\")  # Fetch historical price data for Tesla tsla_ts = td.time_series( &nbsp;&nbsp;&nbsp;&nbsp;symbol=\"TSLA\", &nbsp;&nbsp;&nbsp;&nbsp;interval=\"1day\", &nbsp;&nbsp;&nbsp;&nbsp;outputsize=100 ).as_pandas()  # Fetch historical price data for Microsoft msft_ts = td.time_series( &nbsp;&nbsp;&nbsp;&nbsp;symbol=\"MSFT\", &nbsp;&nbsp;&nbsp;&nbsp;interval=\"1day\", &nbsp;&nbsp;&nbsp;&nbsp;outputsize=100 ).as_pandas()  # Align data on datetime index combined = pd.concat( &nbsp;&nbsp;&nbsp;&nbsp;[tsla_ts['close'].astype(float), msft_ts['close'].astype(float)], &nbsp;&nbsp;&nbsp;&nbsp;axis=1, &nbsp;&nbsp;&nbsp;&nbsp;keys=[\"TSLA\", \"MSFT\"] ).dropna()  # Calculate correlation correlation = combined[\"TSLA\"].corr(combined[\"MSFT\"]) print(f\"Correlation of closing prices between TSLA and MSFT: {correlation:.2f}\") ```  ### Authentication  Authenticate your requests using one of these methods:  #### Query parameter method ``` GET https://api.twelvedata.com/endpoint?symbol=AAPL&apikey=your_api_key ```  #### HTTP header method (recommended) ``` Authorization: apikey your_api_key ```  ##### API key useful information <ul> <li> Demo API key (<code>apikey=demo</code>) available for demo requests</li> <li> Personal API key required for full access</li> <li> Premium endpoints and data require higher-tier plans (testable with <a href=\"https://twelvedata.com/exchanges\">trial symbols</a>)</li> </ul>  ### API endpoints   Service | Base URL | ---------|----------|  REST API | `https://api.twelvedata.com` |  WebSocket | `wss://ws.twelvedata.com` |  ### Parameter guidelines <ul> <li><b>Separator:</b> Use <code>&</code> to separate multiple parameters</li> <li><b>Case sensitivity:</b> Parameter names are case-insensitive</li>  <ul><li><code>symbol=AAPL</code> = <code>symbol=aapl</code></li></ul>  <li><b>Multiple values:</b> Separate with commas where supported</li> </ul>  ### Response handling  #### Default format All responses return JSON format by default unless otherwise specified.  #### Null values <b>Important:</b> Some response fields may contain `null` values when data is unavailable for specific metrics. This is expected behavior, not an error.  ##### Best Practices: <ul> <li>Always implement <code>null</code> value handling in your application</li> <li>Use defensive programming techniques for data processing</li> <li>Consider fallback values or error handling for critical metrics</li> </ul>  #### Error handling Structure your code to gracefully handle: <ul> <li>Network timeouts</li> <li>Rate limiting responses</li> <li>Invalid parameter errors</li> <li>Data unavailability periods</li> </ul>  ##### Best practices <ul> <li><b>Rate limits:</b> Adhere to your plan’s rate limits to avoid throttling. Check your dashboard for details.</li> <li><b>Error handling:</b> Implement retry logic for transient errors (e.g., <code>429 Too Many Requests</code>).</li> <li><b>Caching:</b> Cache responses for frequently accessed data to reduce API calls and improve performance.</li> <li><b>Secure storage:</b> Store your API key securely and never expose it in client-side code or public repositories.</li> </ul>  ## Errors  Twelve Data API employs a standardized error response format, delivering a JSON object with `code`, `message`, and `status` keys for clear and consistent error communication.  ### Codes  Below is a table of possible error codes, their HTTP status, meanings, and resolution steps:   Code | status | Meaning | Resolution |  --- | --- | --- | --- |  **400** | Bad Request | Invalid or incorrect parameter(s) provided. | Check the `message` in the response for details. Refer to the API Documenta­tion to correct the input. |  **401** | Unauthor­ized | Invalid or incorrect API key. | Verify your API key is correct. Sign up for a key <a href=\"https://twelvedata.com/account/api-keys\">here</a>. |  **403** | Forbidden | API key lacks permissions for the requested resource (upgrade required). | Upgrade your plan <a href=\"https://twelvedata.com/pricing\">here</a>. |  **404** | Not Found | Requested data could not be found. | Adjust parameters to be less strict as they may be too restrictive. |  **414** | Parameter Too Long | Input parameter array exceeds the allowed length. | Follow the `message` guidance to adjust the parameter length. |  **429** | Too Many Requests | API request limit reached for your key. | Wait briefly or upgrade your plan <a href=\"https://twelvedata.com/pricing\">here</a>. |  **500** | Internal Server Error | Server-side issue occurred; retry later. | Contact support <a href=\"https://twelvedata.com/contact\">here</a> for assistance. |  ### Example error response  Consider the following invalid request:  ``` https://api.twelvedata.com/time_series?symbol=AAPL&interval=0.99min&apikey=your_api_key ```  Due to the incorrect `interval` value, the API returns:  ```json { &nbsp;&nbsp;\"code\": 400, &nbsp;&nbsp;\"message\": \"Invalid **interval** provided: 0.99min. Supported intervals: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 8h, 1day, 1week, 1month\", &nbsp;&nbsp;\"status\": \"error\" } ```  Refer to the API Documentation for valid parameter values to resolve such errors.  ## Libraries  Twelve Data provides a growing ecosystem of libraries and integrations to help you build faster and smarter in your preferred environment. Official libraries are actively maintained by the Twelve Data team, while selected community-built libraries offer additional flexibility.  A full list is available on our [GitHub profile](https://github.com/search?q=twelvedata).  ### Official SDKs <ul> <li><b>Python:</b> <a href=\"https://github.com/twelvedata/twelvedata-python\">twelvedata-python</a></li> <li><b>R:</b> <a href=\"https://github.com/twelvedata/twelvedata-r-sdk\">twelvedata-r-sdk</a></li> </ul>  ### AI integrations <ul> <li><b>Twelve Data MCP Server:</b> <a href=\"https://github.com/twelvedata/mcp\">Repository</a> — Model Context Protocol (MCP) server that provides seamless integration with AI assistants and language models, enabling direct access to Twelve Data's financial market data within conversational interfaces and AI workflows.</li> </ul>  ### Spreadsheet add-ons <ul> <li><b>Excel:</b> <a href=\"https://twelvedata.com/excel\">Excel Add-in</a></li> <li><b>Google Sheets:</b> <a href=\"https://twelvedata.com/google-sheets\">Google Sheets Add-on</a></li> </ul>  ### Community libraries  The community has developed libraries in several popular languages. You can explore more community libraries on [GitHub](https://github.com/search?q=twelvedata). <ul> <li><b>C#:</b> <a href=\"https://github.com/pseudomarkets/TwelveDataSharp\">TwelveDataSharp</a></li> <li><b>JavaScript:</b> <a href=\"https://github.com/evzaboun/twelvedata\">twelvedata</a></li> <li><b>PHP:</b> <a href=\"https://github.com/ingelby/twelvedata\">twelvedata</a></li> <li><b>Go:</b> <a href=\"https://github.com/soulgarden/twelvedata\">twelvedata</a></li> <li><b>TypeScript:</b> <a href=\"https://github.com/Clyde-Goodall/twelve-data-wrapper\">twelve-data-wrapper</a></li> </ul>  ### Other Twelve Data repositories <ul> <li><b>searchindex</b> <i>(Go)</i>: <a href=\"https://github.com/twelvedata/searchindex\">Repository</a> — In-memory search index by strings</li> <li><b>ws-tools</b> <i>(Python)</i>: <a href=\"https://github.com/twelvedata/ws-tools\">Repository</a> — Utility tools for WebSocket stream handling</li> </ul>  ### API specification <ul> <li><b>OpenAPI / Swagger:</b> Access the <a href=\"https://api.twelvedata.com/doc/swagger/openapi.json\">complete API specification</a> in OpenAPI format. You can use this file to automatically generate client libraries in your preferred programming language, explore the API interactively via Swagger tools, or integrate Twelve Data seamlessly into your AI and LLM workflows.</li> </ul>
5 *
6 * The version of the OpenAPI document: 0.0.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12use reqwest;
13use serde::{Deserialize, Serialize, de::Error as _};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration, ContentType};
16
17/// struct for passing parameters to the method [`get_balance_sheet`]
18#[derive(Clone, Debug, Default, Serialize, Deserialize)]
19pub struct GetBalanceSheetParams {
20    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
21    pub symbol: Option<String>,
22    /// Filter by financial instrument global identifier (FIGI)
23    pub figi: Option<String>,
24    /// Filter by international securities identification number (ISIN)
25    pub isin: Option<String>,
26    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
27    pub cusip: Option<String>,
28    /// Exchange where instrument is traded
29    pub exchange: Option<String>,
30    /// Market Identifier Code (MIC) under ISO 10383 standard
31    pub mic_code: Option<String>,
32    /// Country where instrument is traded, e.g., `United States` or `US`
33    pub country: Option<String>,
34    /// The reporting period for the balane sheet data
35    pub period: Option<String>,
36    /// Begin date for filtering items by fiscal date. Returns income statements with fiscal dates on or after this date. Format `2006-01-02`
37    pub start_date: Option<String>,
38    /// End date for filtering items by fiscal date. Returns income statements with fiscal dates on or before this date. Format `2006-01-02`
39    pub end_date: Option<String>,
40    /// Number of records in response
41    pub outputsize: Option<i64>
42}
43
44impl GetBalanceSheetParams {
45    /// Create a new builder for this parameter struct
46    pub fn builder() -> GetBalanceSheetParamsBuilder {
47        GetBalanceSheetParamsBuilder::default()
48    }
49}
50
51/// Builder for [`GetBalanceSheetParams`]
52#[derive(Clone, Debug, Default)]
53pub struct GetBalanceSheetParamsBuilder {
54    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
55    symbol: Option<String>,
56    /// Filter by financial instrument global identifier (FIGI)
57    figi: Option<String>,
58    /// Filter by international securities identification number (ISIN)
59    isin: Option<String>,
60    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
61    cusip: Option<String>,
62    /// Exchange where instrument is traded
63    exchange: Option<String>,
64    /// Market Identifier Code (MIC) under ISO 10383 standard
65    mic_code: Option<String>,
66    /// Country where instrument is traded, e.g., `United States` or `US`
67    country: Option<String>,
68    /// The reporting period for the balane sheet data
69    period: Option<String>,
70    /// Begin date for filtering items by fiscal date. Returns income statements with fiscal dates on or after this date. Format `2006-01-02`
71    start_date: Option<String>,
72    /// End date for filtering items by fiscal date. Returns income statements with fiscal dates on or before this date. Format `2006-01-02`
73    end_date: Option<String>,
74    /// Number of records in response
75    outputsize: Option<i64>
76}
77
78impl GetBalanceSheetParamsBuilder {
79    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
80    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
81        self.symbol = Some(symbol.into());
82        self
83    }
84    /// Filter by financial instrument global identifier (FIGI)
85    pub fn figi(mut self, figi: impl Into<String>) -> Self {
86        self.figi = Some(figi.into());
87        self
88    }
89    /// Filter by international securities identification number (ISIN)
90    pub fn isin(mut self, isin: impl Into<String>) -> Self {
91        self.isin = Some(isin.into());
92        self
93    }
94    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
95    pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
96        self.cusip = Some(cusip.into());
97        self
98    }
99    /// Exchange where instrument is traded
100    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
101        self.exchange = Some(exchange.into());
102        self
103    }
104    /// Market Identifier Code (MIC) under ISO 10383 standard
105    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
106        self.mic_code = Some(mic_code.into());
107        self
108    }
109    /// Country where instrument is traded, e.g., `United States` or `US`
110    pub fn country(mut self, country: impl Into<String>) -> Self {
111        self.country = Some(country.into());
112        self
113    }
114    /// The reporting period for the balane sheet data
115    pub fn period(mut self, period: impl Into<String>) -> Self {
116        self.period = Some(period.into());
117        self
118    }
119    /// Begin date for filtering items by fiscal date. Returns income statements with fiscal dates on or after this date. Format `2006-01-02`
120    pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
121        self.start_date = Some(start_date.into());
122        self
123    }
124    /// End date for filtering items by fiscal date. Returns income statements with fiscal dates on or before this date. Format `2006-01-02`
125    pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
126        self.end_date = Some(end_date.into());
127        self
128    }
129    /// Number of records in response
130    pub fn outputsize(mut self, outputsize: i64) -> Self {
131        self.outputsize = Some(outputsize);
132        self
133    }
134
135    /// Build the parameter struct
136    pub fn build(self) -> GetBalanceSheetParams {
137        GetBalanceSheetParams {
138            symbol: self.symbol,
139            figi: self.figi,
140            isin: self.isin,
141            cusip: self.cusip,
142            exchange: self.exchange,
143            mic_code: self.mic_code,
144            country: self.country,
145            period: self.period,
146            start_date: self.start_date,
147            end_date: self.end_date,
148            outputsize: self.outputsize
149        }
150    }
151}
152
153/// struct for passing parameters to the method [`get_balance_sheet_consolidated`]
154#[derive(Clone, Debug, Default, Serialize, Deserialize)]
155pub struct GetBalanceSheetConsolidatedParams {
156    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
157    pub symbol: Option<String>,
158    /// Filter by financial instrument global identifier (FIGI)
159    pub figi: Option<String>,
160    /// Filter by international securities identification number (ISIN)
161    pub isin: Option<String>,
162    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
163    pub cusip: Option<String>,
164    /// Exchange where instrument is traded
165    pub exchange: Option<String>,
166    /// Market Identifier Code (MIC) under ISO 10383 standard
167    pub mic_code: Option<String>,
168    /// Country where instrument is traded, e.g., `United States` or `US`
169    pub country: Option<String>,
170    /// The reporting period for the balance sheet data.
171    pub period: Option<String>,
172    /// Begin date for filtering items by fiscal date. Returns income statements with fiscal dates on or after this date. Format `2006-01-02`
173    pub start_date: Option<String>,
174    /// End date for filtering items by fiscal date. Returns income statements with fiscal dates on or before this date. Format `2006-01-02`
175    pub end_date: Option<String>,
176    /// Number of records in response
177    pub outputsize: Option<i64>
178}
179
180impl GetBalanceSheetConsolidatedParams {
181    /// Create a new builder for this parameter struct
182    pub fn builder() -> GetBalanceSheetConsolidatedParamsBuilder {
183        GetBalanceSheetConsolidatedParamsBuilder::default()
184    }
185}
186
187/// Builder for [`GetBalanceSheetConsolidatedParams`]
188#[derive(Clone, Debug, Default)]
189pub struct GetBalanceSheetConsolidatedParamsBuilder {
190    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
191    symbol: Option<String>,
192    /// Filter by financial instrument global identifier (FIGI)
193    figi: Option<String>,
194    /// Filter by international securities identification number (ISIN)
195    isin: Option<String>,
196    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
197    cusip: Option<String>,
198    /// Exchange where instrument is traded
199    exchange: Option<String>,
200    /// Market Identifier Code (MIC) under ISO 10383 standard
201    mic_code: Option<String>,
202    /// Country where instrument is traded, e.g., `United States` or `US`
203    country: Option<String>,
204    /// The reporting period for the balance sheet data.
205    period: Option<String>,
206    /// Begin date for filtering items by fiscal date. Returns income statements with fiscal dates on or after this date. Format `2006-01-02`
207    start_date: Option<String>,
208    /// End date for filtering items by fiscal date. Returns income statements with fiscal dates on or before this date. Format `2006-01-02`
209    end_date: Option<String>,
210    /// Number of records in response
211    outputsize: Option<i64>
212}
213
214impl GetBalanceSheetConsolidatedParamsBuilder {
215    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
216    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
217        self.symbol = Some(symbol.into());
218        self
219    }
220    /// Filter by financial instrument global identifier (FIGI)
221    pub fn figi(mut self, figi: impl Into<String>) -> Self {
222        self.figi = Some(figi.into());
223        self
224    }
225    /// Filter by international securities identification number (ISIN)
226    pub fn isin(mut self, isin: impl Into<String>) -> Self {
227        self.isin = Some(isin.into());
228        self
229    }
230    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
231    pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
232        self.cusip = Some(cusip.into());
233        self
234    }
235    /// Exchange where instrument is traded
236    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
237        self.exchange = Some(exchange.into());
238        self
239    }
240    /// Market Identifier Code (MIC) under ISO 10383 standard
241    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
242        self.mic_code = Some(mic_code.into());
243        self
244    }
245    /// Country where instrument is traded, e.g., `United States` or `US`
246    pub fn country(mut self, country: impl Into<String>) -> Self {
247        self.country = Some(country.into());
248        self
249    }
250    /// The reporting period for the balance sheet data.
251    pub fn period(mut self, period: impl Into<String>) -> Self {
252        self.period = Some(period.into());
253        self
254    }
255    /// Begin date for filtering items by fiscal date. Returns income statements with fiscal dates on or after this date. Format `2006-01-02`
256    pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
257        self.start_date = Some(start_date.into());
258        self
259    }
260    /// End date for filtering items by fiscal date. Returns income statements with fiscal dates on or before this date. Format `2006-01-02`
261    pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
262        self.end_date = Some(end_date.into());
263        self
264    }
265    /// Number of records in response
266    pub fn outputsize(mut self, outputsize: i64) -> Self {
267        self.outputsize = Some(outputsize);
268        self
269    }
270
271    /// Build the parameter struct
272    pub fn build(self) -> GetBalanceSheetConsolidatedParams {
273        GetBalanceSheetConsolidatedParams {
274            symbol: self.symbol,
275            figi: self.figi,
276            isin: self.isin,
277            cusip: self.cusip,
278            exchange: self.exchange,
279            mic_code: self.mic_code,
280            country: self.country,
281            period: self.period,
282            start_date: self.start_date,
283            end_date: self.end_date,
284            outputsize: self.outputsize
285        }
286    }
287}
288
289/// struct for passing parameters to the method [`get_cash_flow`]
290#[derive(Clone, Debug, Default, Serialize, Deserialize)]
291pub struct GetCashFlowParams {
292    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
293    pub symbol: Option<String>,
294    /// Filter by financial instrument global identifier (FIGI)
295    pub figi: Option<String>,
296    /// Filter by international securities identification number (ISIN)
297    pub isin: Option<String>,
298    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
299    pub cusip: Option<String>,
300    /// Exchange where instrument is traded
301    pub exchange: Option<String>,
302    /// Market Identifier Code (MIC) under ISO 10383 standard
303    pub mic_code: Option<String>,
304    /// Country where instrument is traded, e.g., `United States` or `US`
305    pub country: Option<String>,
306    /// The reporting period for the cash flow statements
307    pub period: Option<String>,
308    /// Start date for filtering cash flow statements. Only cash flow statements with fiscal dates on or after this date will be included. Format `2006-01-02`
309    pub start_date: Option<String>,
310    /// End date for filtering cash flow statements. Only cash flow statements with fiscal dates on or before this date will be included. Format `2006-01-02`
311    pub end_date: Option<String>,
312    /// Number of records in response
313    pub outputsize: Option<i64>
314}
315
316impl GetCashFlowParams {
317    /// Create a new builder for this parameter struct
318    pub fn builder() -> GetCashFlowParamsBuilder {
319        GetCashFlowParamsBuilder::default()
320    }
321}
322
323/// Builder for [`GetCashFlowParams`]
324#[derive(Clone, Debug, Default)]
325pub struct GetCashFlowParamsBuilder {
326    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
327    symbol: Option<String>,
328    /// Filter by financial instrument global identifier (FIGI)
329    figi: Option<String>,
330    /// Filter by international securities identification number (ISIN)
331    isin: Option<String>,
332    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
333    cusip: Option<String>,
334    /// Exchange where instrument is traded
335    exchange: Option<String>,
336    /// Market Identifier Code (MIC) under ISO 10383 standard
337    mic_code: Option<String>,
338    /// Country where instrument is traded, e.g., `United States` or `US`
339    country: Option<String>,
340    /// The reporting period for the cash flow statements
341    period: Option<String>,
342    /// Start date for filtering cash flow statements. Only cash flow statements with fiscal dates on or after this date will be included. Format `2006-01-02`
343    start_date: Option<String>,
344    /// End date for filtering cash flow statements. Only cash flow statements with fiscal dates on or before this date will be included. Format `2006-01-02`
345    end_date: Option<String>,
346    /// Number of records in response
347    outputsize: Option<i64>
348}
349
350impl GetCashFlowParamsBuilder {
351    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
352    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
353        self.symbol = Some(symbol.into());
354        self
355    }
356    /// Filter by financial instrument global identifier (FIGI)
357    pub fn figi(mut self, figi: impl Into<String>) -> Self {
358        self.figi = Some(figi.into());
359        self
360    }
361    /// Filter by international securities identification number (ISIN)
362    pub fn isin(mut self, isin: impl Into<String>) -> Self {
363        self.isin = Some(isin.into());
364        self
365    }
366    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
367    pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
368        self.cusip = Some(cusip.into());
369        self
370    }
371    /// Exchange where instrument is traded
372    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
373        self.exchange = Some(exchange.into());
374        self
375    }
376    /// Market Identifier Code (MIC) under ISO 10383 standard
377    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
378        self.mic_code = Some(mic_code.into());
379        self
380    }
381    /// Country where instrument is traded, e.g., `United States` or `US`
382    pub fn country(mut self, country: impl Into<String>) -> Self {
383        self.country = Some(country.into());
384        self
385    }
386    /// The reporting period for the cash flow statements
387    pub fn period(mut self, period: impl Into<String>) -> Self {
388        self.period = Some(period.into());
389        self
390    }
391    /// Start date for filtering cash flow statements. Only cash flow statements with fiscal dates on or after this date will be included. Format `2006-01-02`
392    pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
393        self.start_date = Some(start_date.into());
394        self
395    }
396    /// End date for filtering cash flow statements. Only cash flow statements with fiscal dates on or before this date will be included. Format `2006-01-02`
397    pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
398        self.end_date = Some(end_date.into());
399        self
400    }
401    /// Number of records in response
402    pub fn outputsize(mut self, outputsize: i64) -> Self {
403        self.outputsize = Some(outputsize);
404        self
405    }
406
407    /// Build the parameter struct
408    pub fn build(self) -> GetCashFlowParams {
409        GetCashFlowParams {
410            symbol: self.symbol,
411            figi: self.figi,
412            isin: self.isin,
413            cusip: self.cusip,
414            exchange: self.exchange,
415            mic_code: self.mic_code,
416            country: self.country,
417            period: self.period,
418            start_date: self.start_date,
419            end_date: self.end_date,
420            outputsize: self.outputsize
421        }
422    }
423}
424
425/// struct for passing parameters to the method [`get_cash_flow_consolidated`]
426#[derive(Clone, Debug, Default, Serialize, Deserialize)]
427pub struct GetCashFlowConsolidatedParams {
428    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
429    pub symbol: Option<String>,
430    /// Filter by financial instrument global identifier (FIGI)
431    pub figi: Option<String>,
432    /// Filter by international securities identification number (ISIN)
433    pub isin: Option<String>,
434    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
435    pub cusip: Option<String>,
436    /// Exchange where instrument is traded
437    pub exchange: Option<String>,
438    /// Market Identifier Code (MIC) under ISO 10383 standard
439    pub mic_code: Option<String>,
440    /// Country where instrument is traded, e.g., `United States` or `US`
441    pub country: Option<String>,
442    /// The reporting period for the cash flow statements
443    pub period: Option<String>,
444    /// Start date for filtering cash flow statements. Only cash flow statements with fiscal dates on or after this date will be included. Format `2006-01-02`
445    pub start_date: Option<String>,
446    /// End date for filtering cash flow statements. Only cash flow statements with fiscal dates on or before this date will be included. Format `2006-01-02`
447    pub end_date: Option<String>,
448    /// Number of records in response
449    pub outputsize: Option<i64>
450}
451
452impl GetCashFlowConsolidatedParams {
453    /// Create a new builder for this parameter struct
454    pub fn builder() -> GetCashFlowConsolidatedParamsBuilder {
455        GetCashFlowConsolidatedParamsBuilder::default()
456    }
457}
458
459/// Builder for [`GetCashFlowConsolidatedParams`]
460#[derive(Clone, Debug, Default)]
461pub struct GetCashFlowConsolidatedParamsBuilder {
462    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
463    symbol: Option<String>,
464    /// Filter by financial instrument global identifier (FIGI)
465    figi: Option<String>,
466    /// Filter by international securities identification number (ISIN)
467    isin: Option<String>,
468    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
469    cusip: Option<String>,
470    /// Exchange where instrument is traded
471    exchange: Option<String>,
472    /// Market Identifier Code (MIC) under ISO 10383 standard
473    mic_code: Option<String>,
474    /// Country where instrument is traded, e.g., `United States` or `US`
475    country: Option<String>,
476    /// The reporting period for the cash flow statements
477    period: Option<String>,
478    /// Start date for filtering cash flow statements. Only cash flow statements with fiscal dates on or after this date will be included. Format `2006-01-02`
479    start_date: Option<String>,
480    /// End date for filtering cash flow statements. Only cash flow statements with fiscal dates on or before this date will be included. Format `2006-01-02`
481    end_date: Option<String>,
482    /// Number of records in response
483    outputsize: Option<i64>
484}
485
486impl GetCashFlowConsolidatedParamsBuilder {
487    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
488    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
489        self.symbol = Some(symbol.into());
490        self
491    }
492    /// Filter by financial instrument global identifier (FIGI)
493    pub fn figi(mut self, figi: impl Into<String>) -> Self {
494        self.figi = Some(figi.into());
495        self
496    }
497    /// Filter by international securities identification number (ISIN)
498    pub fn isin(mut self, isin: impl Into<String>) -> Self {
499        self.isin = Some(isin.into());
500        self
501    }
502    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
503    pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
504        self.cusip = Some(cusip.into());
505        self
506    }
507    /// Exchange where instrument is traded
508    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
509        self.exchange = Some(exchange.into());
510        self
511    }
512    /// Market Identifier Code (MIC) under ISO 10383 standard
513    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
514        self.mic_code = Some(mic_code.into());
515        self
516    }
517    /// Country where instrument is traded, e.g., `United States` or `US`
518    pub fn country(mut self, country: impl Into<String>) -> Self {
519        self.country = Some(country.into());
520        self
521    }
522    /// The reporting period for the cash flow statements
523    pub fn period(mut self, period: impl Into<String>) -> Self {
524        self.period = Some(period.into());
525        self
526    }
527    /// Start date for filtering cash flow statements. Only cash flow statements with fiscal dates on or after this date will be included. Format `2006-01-02`
528    pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
529        self.start_date = Some(start_date.into());
530        self
531    }
532    /// End date for filtering cash flow statements. Only cash flow statements with fiscal dates on or before this date will be included. Format `2006-01-02`
533    pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
534        self.end_date = Some(end_date.into());
535        self
536    }
537    /// Number of records in response
538    pub fn outputsize(mut self, outputsize: i64) -> Self {
539        self.outputsize = Some(outputsize);
540        self
541    }
542
543    /// Build the parameter struct
544    pub fn build(self) -> GetCashFlowConsolidatedParams {
545        GetCashFlowConsolidatedParams {
546            symbol: self.symbol,
547            figi: self.figi,
548            isin: self.isin,
549            cusip: self.cusip,
550            exchange: self.exchange,
551            mic_code: self.mic_code,
552            country: self.country,
553            period: self.period,
554            start_date: self.start_date,
555            end_date: self.end_date,
556            outputsize: self.outputsize
557        }
558    }
559}
560
561/// struct for passing parameters to the method [`get_dividends`]
562#[derive(Clone, Debug, Default, Serialize, Deserialize)]
563pub struct GetDividendsParams {
564    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
565    pub symbol: Option<String>,
566    /// Filter by financial instrument global identifier (FIGI)
567    pub figi: Option<String>,
568    /// Filter by international securities identification number (ISIN)
569    pub isin: Option<String>,
570    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
571    pub cusip: Option<String>,
572    /// Exchange where instrument is traded
573    pub exchange: Option<String>,
574    /// Market Identifier Code (MIC) under ISO 10383 standard
575    pub mic_code: Option<String>,
576    /// Country where instrument is traded, e.g., `United States` or `US`
577    pub country: Option<String>,
578    /// Specifies the time range for which to retrieve dividend data. Accepts values such as `last` (most recent dividend), `next` (upcoming dividend), `1m` - `5y` for respective periods, or `full` for all available data. If provided together with `start_date` and/or `end_date`, this parameter takes precedence.
579    pub range: Option<String>,
580    /// Start date for the dividend data query. Only dividends with dates on or after this date will be returned. Format `2006-01-02`. If provided together with `range` parameter, `range` will take precedence.
581    pub start_date: Option<String>,
582    /// End date for the dividend data query. Only dividends with dates on or after this date will be returned. Format `2006-01-02`. If provided together with `range` parameter, `range` will take precedence.
583    pub end_date: Option<String>,
584    /// Specifies if there should be an adjustment
585    pub adjust: Option<bool>
586}
587
588impl GetDividendsParams {
589    /// Create a new builder for this parameter struct
590    pub fn builder() -> GetDividendsParamsBuilder {
591        GetDividendsParamsBuilder::default()
592    }
593}
594
595/// Builder for [`GetDividendsParams`]
596#[derive(Clone, Debug, Default)]
597pub struct GetDividendsParamsBuilder {
598    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
599    symbol: Option<String>,
600    /// Filter by financial instrument global identifier (FIGI)
601    figi: Option<String>,
602    /// Filter by international securities identification number (ISIN)
603    isin: Option<String>,
604    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
605    cusip: Option<String>,
606    /// Exchange where instrument is traded
607    exchange: Option<String>,
608    /// Market Identifier Code (MIC) under ISO 10383 standard
609    mic_code: Option<String>,
610    /// Country where instrument is traded, e.g., `United States` or `US`
611    country: Option<String>,
612    /// Specifies the time range for which to retrieve dividend data. Accepts values such as `last` (most recent dividend), `next` (upcoming dividend), `1m` - `5y` for respective periods, or `full` for all available data. If provided together with `start_date` and/or `end_date`, this parameter takes precedence.
613    range: Option<String>,
614    /// Start date for the dividend data query. Only dividends with dates on or after this date will be returned. Format `2006-01-02`. If provided together with `range` parameter, `range` will take precedence.
615    start_date: Option<String>,
616    /// End date for the dividend data query. Only dividends with dates on or after this date will be returned. Format `2006-01-02`. If provided together with `range` parameter, `range` will take precedence.
617    end_date: Option<String>,
618    /// Specifies if there should be an adjustment
619    adjust: Option<bool>
620}
621
622impl GetDividendsParamsBuilder {
623    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
624    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
625        self.symbol = Some(symbol.into());
626        self
627    }
628    /// Filter by financial instrument global identifier (FIGI)
629    pub fn figi(mut self, figi: impl Into<String>) -> Self {
630        self.figi = Some(figi.into());
631        self
632    }
633    /// Filter by international securities identification number (ISIN)
634    pub fn isin(mut self, isin: impl Into<String>) -> Self {
635        self.isin = Some(isin.into());
636        self
637    }
638    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
639    pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
640        self.cusip = Some(cusip.into());
641        self
642    }
643    /// Exchange where instrument is traded
644    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
645        self.exchange = Some(exchange.into());
646        self
647    }
648    /// Market Identifier Code (MIC) under ISO 10383 standard
649    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
650        self.mic_code = Some(mic_code.into());
651        self
652    }
653    /// Country where instrument is traded, e.g., `United States` or `US`
654    pub fn country(mut self, country: impl Into<String>) -> Self {
655        self.country = Some(country.into());
656        self
657    }
658    /// Specifies the time range for which to retrieve dividend data. Accepts values such as `last` (most recent dividend), `next` (upcoming dividend), `1m` - `5y` for respective periods, or `full` for all available data. If provided together with `start_date` and/or `end_date`, this parameter takes precedence.
659    pub fn range(mut self, range: impl Into<String>) -> Self {
660        self.range = Some(range.into());
661        self
662    }
663    /// Start date for the dividend data query. Only dividends with dates on or after this date will be returned. Format `2006-01-02`. If provided together with `range` parameter, `range` will take precedence.
664    pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
665        self.start_date = Some(start_date.into());
666        self
667    }
668    /// End date for the dividend data query. Only dividends with dates on or after this date will be returned. Format `2006-01-02`. If provided together with `range` parameter, `range` will take precedence.
669    pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
670        self.end_date = Some(end_date.into());
671        self
672    }
673    /// Specifies if there should be an adjustment
674    pub fn adjust(mut self, adjust: bool) -> Self {
675        self.adjust = Some(adjust);
676        self
677    }
678
679    /// Build the parameter struct
680    pub fn build(self) -> GetDividendsParams {
681        GetDividendsParams {
682            symbol: self.symbol,
683            figi: self.figi,
684            isin: self.isin,
685            cusip: self.cusip,
686            exchange: self.exchange,
687            mic_code: self.mic_code,
688            country: self.country,
689            range: self.range,
690            start_date: self.start_date,
691            end_date: self.end_date,
692            adjust: self.adjust
693        }
694    }
695}
696
697/// struct for passing parameters to the method [`get_dividends_calendar`]
698#[derive(Clone, Debug, Default, Serialize, Deserialize)]
699pub struct GetDividendsCalendarParams {
700    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
701    pub symbol: Option<String>,
702    /// Filter by financial instrument global identifier (FIGI)
703    pub figi: Option<String>,
704    /// Filter by international securities identification number (ISIN)
705    pub isin: Option<String>,
706    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
707    pub cusip: Option<String>,
708    /// Exchange where instrument is traded
709    pub exchange: Option<String>,
710    /// Market Identifier Code (MIC) under ISO 10383 standard
711    pub mic_code: Option<String>,
712    /// Country where instrument is traded, e.g., `United States` or `US`
713    pub country: Option<String>,
714    /// Start date for the dividends calendar query. Only dividends with ex-dates on or after this date will be returned. Format `2006-01-02`
715    pub start_date: Option<String>,
716    /// End date for the dividends calendar query. Only dividends with ex-dates on or before this date will be returned. Format `2006-01-02`
717    pub end_date: Option<String>,
718    /// Number of data points to retrieve. Supports values in the range from `1` to `500`. Default `100` when no date parameters are set, otherwise set to maximum
719    pub outputsize: Option<i64>,
720    /// Page number
721    pub page: Option<i64>
722}
723
724impl GetDividendsCalendarParams {
725    /// Create a new builder for this parameter struct
726    pub fn builder() -> GetDividendsCalendarParamsBuilder {
727        GetDividendsCalendarParamsBuilder::default()
728    }
729}
730
731/// Builder for [`GetDividendsCalendarParams`]
732#[derive(Clone, Debug, Default)]
733pub struct GetDividendsCalendarParamsBuilder {
734    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
735    symbol: Option<String>,
736    /// Filter by financial instrument global identifier (FIGI)
737    figi: Option<String>,
738    /// Filter by international securities identification number (ISIN)
739    isin: Option<String>,
740    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
741    cusip: Option<String>,
742    /// Exchange where instrument is traded
743    exchange: Option<String>,
744    /// Market Identifier Code (MIC) under ISO 10383 standard
745    mic_code: Option<String>,
746    /// Country where instrument is traded, e.g., `United States` or `US`
747    country: Option<String>,
748    /// Start date for the dividends calendar query. Only dividends with ex-dates on or after this date will be returned. Format `2006-01-02`
749    start_date: Option<String>,
750    /// End date for the dividends calendar query. Only dividends with ex-dates on or before this date will be returned. Format `2006-01-02`
751    end_date: Option<String>,
752    /// Number of data points to retrieve. Supports values in the range from `1` to `500`. Default `100` when no date parameters are set, otherwise set to maximum
753    outputsize: Option<i64>,
754    /// Page number
755    page: Option<i64>
756}
757
758impl GetDividendsCalendarParamsBuilder {
759    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
760    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
761        self.symbol = Some(symbol.into());
762        self
763    }
764    /// Filter by financial instrument global identifier (FIGI)
765    pub fn figi(mut self, figi: impl Into<String>) -> Self {
766        self.figi = Some(figi.into());
767        self
768    }
769    /// Filter by international securities identification number (ISIN)
770    pub fn isin(mut self, isin: impl Into<String>) -> Self {
771        self.isin = Some(isin.into());
772        self
773    }
774    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
775    pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
776        self.cusip = Some(cusip.into());
777        self
778    }
779    /// Exchange where instrument is traded
780    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
781        self.exchange = Some(exchange.into());
782        self
783    }
784    /// Market Identifier Code (MIC) under ISO 10383 standard
785    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
786        self.mic_code = Some(mic_code.into());
787        self
788    }
789    /// Country where instrument is traded, e.g., `United States` or `US`
790    pub fn country(mut self, country: impl Into<String>) -> Self {
791        self.country = Some(country.into());
792        self
793    }
794    /// Start date for the dividends calendar query. Only dividends with ex-dates on or after this date will be returned. Format `2006-01-02`
795    pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
796        self.start_date = Some(start_date.into());
797        self
798    }
799    /// End date for the dividends calendar query. Only dividends with ex-dates on or before this date will be returned. Format `2006-01-02`
800    pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
801        self.end_date = Some(end_date.into());
802        self
803    }
804    /// Number of data points to retrieve. Supports values in the range from `1` to `500`. Default `100` when no date parameters are set, otherwise set to maximum
805    pub fn outputsize(mut self, outputsize: i64) -> Self {
806        self.outputsize = Some(outputsize);
807        self
808    }
809    /// Page number
810    pub fn page(mut self, page: i64) -> Self {
811        self.page = Some(page);
812        self
813    }
814
815    /// Build the parameter struct
816    pub fn build(self) -> GetDividendsCalendarParams {
817        GetDividendsCalendarParams {
818            symbol: self.symbol,
819            figi: self.figi,
820            isin: self.isin,
821            cusip: self.cusip,
822            exchange: self.exchange,
823            mic_code: self.mic_code,
824            country: self.country,
825            start_date: self.start_date,
826            end_date: self.end_date,
827            outputsize: self.outputsize,
828            page: self.page
829        }
830    }
831}
832
833/// struct for passing parameters to the method [`get_earnings`]
834#[derive(Clone, Debug, Default, Serialize, Deserialize)]
835pub struct GetEarningsParams {
836    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
837    pub symbol: Option<String>,
838    /// Filter by financial instrument global identifier (FIGI)
839    pub figi: Option<String>,
840    /// Filter by international securities identification number (ISIN)
841    pub isin: Option<String>,
842    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
843    pub cusip: Option<String>,
844    /// Exchange where instrument is traded
845    pub exchange: Option<String>,
846    /// Market Identifier Code (MIC) under ISO 10383 standard
847    pub mic_code: Option<String>,
848    /// Country where instrument is traded, e.g., `United States` or `US`
849    pub country: Option<String>,
850    /// The asset class to which the instrument belongs
851    pub r#type: Option<String>,
852    /// Type of earning, returns only 1 record. When is not empty, dates and outputsize parameters are ignored
853    pub period: Option<String>,
854    /// Number of data points to retrieve. Supports values in the range from `1` to `1000`. Default `10` when no date parameters are set, otherwise set to maximum
855    pub outputsize: Option<i64>,
856    /// The format of the response data
857    pub format: Option<String>,
858    /// The separator used in the CSV response data
859    pub delimiter: Option<String>,
860    /// The date from which the data is requested. The date format is `YYYY-MM-DD`.
861    pub start_date: Option<String>,
862    /// The date to which the data is requested. The date format is `YYYY-MM-DD`.
863    pub end_date: Option<String>,
864    /// The number of decimal places in the response data. Should be in range [0,11] inclusive
865    pub dp: Option<i64>
866}
867
868impl GetEarningsParams {
869    /// Create a new builder for this parameter struct
870    pub fn builder() -> GetEarningsParamsBuilder {
871        GetEarningsParamsBuilder::default()
872    }
873}
874
875/// Builder for [`GetEarningsParams`]
876#[derive(Clone, Debug, Default)]
877pub struct GetEarningsParamsBuilder {
878    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
879    symbol: Option<String>,
880    /// Filter by financial instrument global identifier (FIGI)
881    figi: Option<String>,
882    /// Filter by international securities identification number (ISIN)
883    isin: Option<String>,
884    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
885    cusip: Option<String>,
886    /// Exchange where instrument is traded
887    exchange: Option<String>,
888    /// Market Identifier Code (MIC) under ISO 10383 standard
889    mic_code: Option<String>,
890    /// Country where instrument is traded, e.g., `United States` or `US`
891    country: Option<String>,
892    /// The asset class to which the instrument belongs
893    r#type: Option<String>,
894    /// Type of earning, returns only 1 record. When is not empty, dates and outputsize parameters are ignored
895    period: Option<String>,
896    /// Number of data points to retrieve. Supports values in the range from `1` to `1000`. Default `10` when no date parameters are set, otherwise set to maximum
897    outputsize: Option<i64>,
898    /// The format of the response data
899    format: Option<String>,
900    /// The separator used in the CSV response data
901    delimiter: Option<String>,
902    /// The date from which the data is requested. The date format is `YYYY-MM-DD`.
903    start_date: Option<String>,
904    /// The date to which the data is requested. The date format is `YYYY-MM-DD`.
905    end_date: Option<String>,
906    /// The number of decimal places in the response data. Should be in range [0,11] inclusive
907    dp: Option<i64>
908}
909
910impl GetEarningsParamsBuilder {
911    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
912    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
913        self.symbol = Some(symbol.into());
914        self
915    }
916    /// Filter by financial instrument global identifier (FIGI)
917    pub fn figi(mut self, figi: impl Into<String>) -> Self {
918        self.figi = Some(figi.into());
919        self
920    }
921    /// Filter by international securities identification number (ISIN)
922    pub fn isin(mut self, isin: impl Into<String>) -> Self {
923        self.isin = Some(isin.into());
924        self
925    }
926    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
927    pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
928        self.cusip = Some(cusip.into());
929        self
930    }
931    /// Exchange where instrument is traded
932    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
933        self.exchange = Some(exchange.into());
934        self
935    }
936    /// Market Identifier Code (MIC) under ISO 10383 standard
937    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
938        self.mic_code = Some(mic_code.into());
939        self
940    }
941    /// Country where instrument is traded, e.g., `United States` or `US`
942    pub fn country(mut self, country: impl Into<String>) -> Self {
943        self.country = Some(country.into());
944        self
945    }
946    /// The asset class to which the instrument belongs
947    pub fn r#type(mut self, r#type: impl Into<String>) -> Self {
948        self.r#type = Some(r#type.into());
949        self
950    }
951    /// Type of earning, returns only 1 record. When is not empty, dates and outputsize parameters are ignored
952    pub fn period(mut self, period: impl Into<String>) -> Self {
953        self.period = Some(period.into());
954        self
955    }
956    /// Number of data points to retrieve. Supports values in the range from `1` to `1000`. Default `10` when no date parameters are set, otherwise set to maximum
957    pub fn outputsize(mut self, outputsize: i64) -> Self {
958        self.outputsize = Some(outputsize);
959        self
960    }
961    /// The format of the response data
962    pub fn format(mut self, format: impl Into<String>) -> Self {
963        self.format = Some(format.into());
964        self
965    }
966    /// The separator used in the CSV response data
967    pub fn delimiter(mut self, delimiter: impl Into<String>) -> Self {
968        self.delimiter = Some(delimiter.into());
969        self
970    }
971    /// The date from which the data is requested. The date format is `YYYY-MM-DD`.
972    pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
973        self.start_date = Some(start_date.into());
974        self
975    }
976    /// The date to which the data is requested. The date format is `YYYY-MM-DD`.
977    pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
978        self.end_date = Some(end_date.into());
979        self
980    }
981    /// The number of decimal places in the response data. Should be in range [0,11] inclusive
982    pub fn dp(mut self, dp: i64) -> Self {
983        self.dp = Some(dp);
984        self
985    }
986
987    /// Build the parameter struct
988    pub fn build(self) -> GetEarningsParams {
989        GetEarningsParams {
990            symbol: self.symbol,
991            figi: self.figi,
992            isin: self.isin,
993            cusip: self.cusip,
994            exchange: self.exchange,
995            mic_code: self.mic_code,
996            country: self.country,
997            r#type: self.r#type,
998            period: self.period,
999            outputsize: self.outputsize,
1000            format: self.format,
1001            delimiter: self.delimiter,
1002            start_date: self.start_date,
1003            end_date: self.end_date,
1004            dp: self.dp
1005        }
1006    }
1007}
1008
1009/// struct for passing parameters to the method [`get_earnings_calendar`]
1010#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1011pub struct GetEarningsCalendarParams {
1012    /// Exchange where instrument is traded
1013    pub exchange: Option<String>,
1014    /// Market Identifier Code (MIC) under ISO 10383 standard
1015    pub mic_code: Option<String>,
1016    /// Country where instrument is traded, e.g., `United States` or `US`
1017    pub country: Option<String>,
1018    /// Value can be JSON or CSV
1019    pub format: Option<String>,
1020    /// Specify the delimiter used when downloading the CSV file
1021    pub delimiter: Option<String>,
1022    /// Can be used separately and together with end_date. Format `2006-01-02` or `2006-01-02T15:04:05`
1023    pub start_date: Option<String>,
1024    /// Can be used separately and together with start_date. Format `2006-01-02` or `2006-01-02T15:04:05`
1025    pub end_date: Option<String>,
1026    /// Specifies the number of decimal places for floating values. Should be in range [0,11] inclusive
1027    pub dp: Option<i64>
1028}
1029
1030impl GetEarningsCalendarParams {
1031    /// Create a new builder for this parameter struct
1032    pub fn builder() -> GetEarningsCalendarParamsBuilder {
1033        GetEarningsCalendarParamsBuilder::default()
1034    }
1035}
1036
1037/// Builder for [`GetEarningsCalendarParams`]
1038#[derive(Clone, Debug, Default)]
1039pub struct GetEarningsCalendarParamsBuilder {
1040    /// Exchange where instrument is traded
1041    exchange: Option<String>,
1042    /// Market Identifier Code (MIC) under ISO 10383 standard
1043    mic_code: Option<String>,
1044    /// Country where instrument is traded, e.g., `United States` or `US`
1045    country: Option<String>,
1046    /// Value can be JSON or CSV
1047    format: Option<String>,
1048    /// Specify the delimiter used when downloading the CSV file
1049    delimiter: Option<String>,
1050    /// Can be used separately and together with end_date. Format `2006-01-02` or `2006-01-02T15:04:05`
1051    start_date: Option<String>,
1052    /// Can be used separately and together with start_date. Format `2006-01-02` or `2006-01-02T15:04:05`
1053    end_date: Option<String>,
1054    /// Specifies the number of decimal places for floating values. Should be in range [0,11] inclusive
1055    dp: Option<i64>
1056}
1057
1058impl GetEarningsCalendarParamsBuilder {
1059    /// Exchange where instrument is traded
1060    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1061        self.exchange = Some(exchange.into());
1062        self
1063    }
1064    /// Market Identifier Code (MIC) under ISO 10383 standard
1065    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1066        self.mic_code = Some(mic_code.into());
1067        self
1068    }
1069    /// Country where instrument is traded, e.g., `United States` or `US`
1070    pub fn country(mut self, country: impl Into<String>) -> Self {
1071        self.country = Some(country.into());
1072        self
1073    }
1074    /// Value can be JSON or CSV
1075    pub fn format(mut self, format: impl Into<String>) -> Self {
1076        self.format = Some(format.into());
1077        self
1078    }
1079    /// Specify the delimiter used when downloading the CSV file
1080    pub fn delimiter(mut self, delimiter: impl Into<String>) -> Self {
1081        self.delimiter = Some(delimiter.into());
1082        self
1083    }
1084    /// Can be used separately and together with end_date. Format `2006-01-02` or `2006-01-02T15:04:05`
1085    pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1086        self.start_date = Some(start_date.into());
1087        self
1088    }
1089    /// Can be used separately and together with start_date. Format `2006-01-02` or `2006-01-02T15:04:05`
1090    pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
1091        self.end_date = Some(end_date.into());
1092        self
1093    }
1094    /// Specifies the number of decimal places for floating values. Should be in range [0,11] inclusive
1095    pub fn dp(mut self, dp: i64) -> Self {
1096        self.dp = Some(dp);
1097        self
1098    }
1099
1100    /// Build the parameter struct
1101    pub fn build(self) -> GetEarningsCalendarParams {
1102        GetEarningsCalendarParams {
1103            exchange: self.exchange,
1104            mic_code: self.mic_code,
1105            country: self.country,
1106            format: self.format,
1107            delimiter: self.delimiter,
1108            start_date: self.start_date,
1109            end_date: self.end_date,
1110            dp: self.dp
1111        }
1112    }
1113}
1114
1115/// struct for passing parameters to the method [`get_income_statement`]
1116#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1117pub struct GetIncomeStatementParams {
1118    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
1119    pub symbol: Option<String>,
1120    /// Filter by financial instrument global identifier (FIGI)
1121    pub figi: Option<String>,
1122    /// Filter by international securities identification number (ISIN)
1123    pub isin: Option<String>,
1124    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
1125    pub cusip: Option<String>,
1126    /// Exchange where instrument is traded
1127    pub exchange: Option<String>,
1128    /// Market Identifier Code (MIC) under ISO 10383 standard
1129    pub mic_code: Option<String>,
1130    /// Country where instrument is traded, e.g., `United States` or `US`
1131    pub country: Option<String>,
1132    /// The reporting period for the income statement data
1133    pub period: Option<String>,
1134    /// Begin date for filtering income statements by fiscal date. Returns income statements with fiscal dates on or after this date. Format `2006-01-02`
1135    pub start_date: Option<String>,
1136    /// End date for filtering income statements by fiscal date. Returns income statements with fiscal dates on or before this date. Format `2006-01-02`
1137    pub end_date: Option<String>,
1138    /// Number of records in response
1139    pub outputsize: Option<i64>
1140}
1141
1142impl GetIncomeStatementParams {
1143    /// Create a new builder for this parameter struct
1144    pub fn builder() -> GetIncomeStatementParamsBuilder {
1145        GetIncomeStatementParamsBuilder::default()
1146    }
1147}
1148
1149/// Builder for [`GetIncomeStatementParams`]
1150#[derive(Clone, Debug, Default)]
1151pub struct GetIncomeStatementParamsBuilder {
1152    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
1153    symbol: Option<String>,
1154    /// Filter by financial instrument global identifier (FIGI)
1155    figi: Option<String>,
1156    /// Filter by international securities identification number (ISIN)
1157    isin: Option<String>,
1158    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
1159    cusip: Option<String>,
1160    /// Exchange where instrument is traded
1161    exchange: Option<String>,
1162    /// Market Identifier Code (MIC) under ISO 10383 standard
1163    mic_code: Option<String>,
1164    /// Country where instrument is traded, e.g., `United States` or `US`
1165    country: Option<String>,
1166    /// The reporting period for the income statement data
1167    period: Option<String>,
1168    /// Begin date for filtering income statements by fiscal date. Returns income statements with fiscal dates on or after this date. Format `2006-01-02`
1169    start_date: Option<String>,
1170    /// End date for filtering income statements by fiscal date. Returns income statements with fiscal dates on or before this date. Format `2006-01-02`
1171    end_date: Option<String>,
1172    /// Number of records in response
1173    outputsize: Option<i64>
1174}
1175
1176impl GetIncomeStatementParamsBuilder {
1177    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
1178    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1179        self.symbol = Some(symbol.into());
1180        self
1181    }
1182    /// Filter by financial instrument global identifier (FIGI)
1183    pub fn figi(mut self, figi: impl Into<String>) -> Self {
1184        self.figi = Some(figi.into());
1185        self
1186    }
1187    /// Filter by international securities identification number (ISIN)
1188    pub fn isin(mut self, isin: impl Into<String>) -> Self {
1189        self.isin = Some(isin.into());
1190        self
1191    }
1192    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
1193    pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
1194        self.cusip = Some(cusip.into());
1195        self
1196    }
1197    /// Exchange where instrument is traded
1198    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1199        self.exchange = Some(exchange.into());
1200        self
1201    }
1202    /// Market Identifier Code (MIC) under ISO 10383 standard
1203    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1204        self.mic_code = Some(mic_code.into());
1205        self
1206    }
1207    /// Country where instrument is traded, e.g., `United States` or `US`
1208    pub fn country(mut self, country: impl Into<String>) -> Self {
1209        self.country = Some(country.into());
1210        self
1211    }
1212    /// The reporting period for the income statement data
1213    pub fn period(mut self, period: impl Into<String>) -> Self {
1214        self.period = Some(period.into());
1215        self
1216    }
1217    /// Begin date for filtering income statements by fiscal date. Returns income statements with fiscal dates on or after this date. Format `2006-01-02`
1218    pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1219        self.start_date = Some(start_date.into());
1220        self
1221    }
1222    /// End date for filtering income statements by fiscal date. Returns income statements with fiscal dates on or before this date. Format `2006-01-02`
1223    pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
1224        self.end_date = Some(end_date.into());
1225        self
1226    }
1227    /// Number of records in response
1228    pub fn outputsize(mut self, outputsize: i64) -> Self {
1229        self.outputsize = Some(outputsize);
1230        self
1231    }
1232
1233    /// Build the parameter struct
1234    pub fn build(self) -> GetIncomeStatementParams {
1235        GetIncomeStatementParams {
1236            symbol: self.symbol,
1237            figi: self.figi,
1238            isin: self.isin,
1239            cusip: self.cusip,
1240            exchange: self.exchange,
1241            mic_code: self.mic_code,
1242            country: self.country,
1243            period: self.period,
1244            start_date: self.start_date,
1245            end_date: self.end_date,
1246            outputsize: self.outputsize
1247        }
1248    }
1249}
1250
1251/// struct for passing parameters to the method [`get_income_statement_consolidated`]
1252#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1253pub struct GetIncomeStatementConsolidatedParams {
1254    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
1255    pub symbol: Option<String>,
1256    /// Filter by financial instrument global identifier (FIGI)
1257    pub figi: Option<String>,
1258    /// Filter by international securities identification number (ISIN)
1259    pub isin: Option<String>,
1260    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
1261    pub cusip: Option<String>,
1262    /// Exchange where instrument is traded
1263    pub exchange: Option<String>,
1264    /// Market Identifier Code (MIC) under ISO 10383 standard
1265    pub mic_code: Option<String>,
1266    /// Country where instrument is traded, e.g., `United States` or `US`
1267    pub country: Option<String>,
1268    /// The reporting period for the income statement data
1269    pub period: Option<String>,
1270    /// Begin date for filtering income statements by fiscal date. Returns income statements with fiscal dates on or after this date. Format `2006-01-02`
1271    pub start_date: Option<String>,
1272    /// End date for filtering income statements by fiscal date. Returns income statements with fiscal dates on or before this date. Format `2006-01-02`
1273    pub end_date: Option<String>,
1274    /// Number of records in response
1275    pub outputsize: Option<i64>
1276}
1277
1278impl GetIncomeStatementConsolidatedParams {
1279    /// Create a new builder for this parameter struct
1280    pub fn builder() -> GetIncomeStatementConsolidatedParamsBuilder {
1281        GetIncomeStatementConsolidatedParamsBuilder::default()
1282    }
1283}
1284
1285/// Builder for [`GetIncomeStatementConsolidatedParams`]
1286#[derive(Clone, Debug, Default)]
1287pub struct GetIncomeStatementConsolidatedParamsBuilder {
1288    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
1289    symbol: Option<String>,
1290    /// Filter by financial instrument global identifier (FIGI)
1291    figi: Option<String>,
1292    /// Filter by international securities identification number (ISIN)
1293    isin: Option<String>,
1294    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
1295    cusip: Option<String>,
1296    /// Exchange where instrument is traded
1297    exchange: Option<String>,
1298    /// Market Identifier Code (MIC) under ISO 10383 standard
1299    mic_code: Option<String>,
1300    /// Country where instrument is traded, e.g., `United States` or `US`
1301    country: Option<String>,
1302    /// The reporting period for the income statement data
1303    period: Option<String>,
1304    /// Begin date for filtering income statements by fiscal date. Returns income statements with fiscal dates on or after this date. Format `2006-01-02`
1305    start_date: Option<String>,
1306    /// End date for filtering income statements by fiscal date. Returns income statements with fiscal dates on or before this date. Format `2006-01-02`
1307    end_date: Option<String>,
1308    /// Number of records in response
1309    outputsize: Option<i64>
1310}
1311
1312impl GetIncomeStatementConsolidatedParamsBuilder {
1313    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
1314    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1315        self.symbol = Some(symbol.into());
1316        self
1317    }
1318    /// Filter by financial instrument global identifier (FIGI)
1319    pub fn figi(mut self, figi: impl Into<String>) -> Self {
1320        self.figi = Some(figi.into());
1321        self
1322    }
1323    /// Filter by international securities identification number (ISIN)
1324    pub fn isin(mut self, isin: impl Into<String>) -> Self {
1325        self.isin = Some(isin.into());
1326        self
1327    }
1328    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
1329    pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
1330        self.cusip = Some(cusip.into());
1331        self
1332    }
1333    /// Exchange where instrument is traded
1334    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1335        self.exchange = Some(exchange.into());
1336        self
1337    }
1338    /// Market Identifier Code (MIC) under ISO 10383 standard
1339    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1340        self.mic_code = Some(mic_code.into());
1341        self
1342    }
1343    /// Country where instrument is traded, e.g., `United States` or `US`
1344    pub fn country(mut self, country: impl Into<String>) -> Self {
1345        self.country = Some(country.into());
1346        self
1347    }
1348    /// The reporting period for the income statement data
1349    pub fn period(mut self, period: impl Into<String>) -> Self {
1350        self.period = Some(period.into());
1351        self
1352    }
1353    /// Begin date for filtering income statements by fiscal date. Returns income statements with fiscal dates on or after this date. Format `2006-01-02`
1354    pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1355        self.start_date = Some(start_date.into());
1356        self
1357    }
1358    /// End date for filtering income statements by fiscal date. Returns income statements with fiscal dates on or before this date. Format `2006-01-02`
1359    pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
1360        self.end_date = Some(end_date.into());
1361        self
1362    }
1363    /// Number of records in response
1364    pub fn outputsize(mut self, outputsize: i64) -> Self {
1365        self.outputsize = Some(outputsize);
1366        self
1367    }
1368
1369    /// Build the parameter struct
1370    pub fn build(self) -> GetIncomeStatementConsolidatedParams {
1371        GetIncomeStatementConsolidatedParams {
1372            symbol: self.symbol,
1373            figi: self.figi,
1374            isin: self.isin,
1375            cusip: self.cusip,
1376            exchange: self.exchange,
1377            mic_code: self.mic_code,
1378            country: self.country,
1379            period: self.period,
1380            start_date: self.start_date,
1381            end_date: self.end_date,
1382            outputsize: self.outputsize
1383        }
1384    }
1385}
1386
1387/// struct for passing parameters to the method [`get_ipo_calendar`]
1388#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1389pub struct GetIpoCalendarParams {
1390    /// Exchange where instrument is traded
1391    pub exchange: Option<String>,
1392    /// Market Identifier Code (MIC) under ISO 10383 standard
1393    pub mic_code: Option<String>,
1394    /// Country where instrument is traded, e.g., `United States` or `US`
1395    pub country: Option<String>,
1396    /// The earliest IPO date to include in the results. Format: `2006-01-02`
1397    pub start_date: Option<String>,
1398    /// The latest IPO date to include in the results. Format: `2006-01-02`
1399    pub end_date: Option<String>
1400}
1401
1402impl GetIpoCalendarParams {
1403    /// Create a new builder for this parameter struct
1404    pub fn builder() -> GetIpoCalendarParamsBuilder {
1405        GetIpoCalendarParamsBuilder::default()
1406    }
1407}
1408
1409/// Builder for [`GetIpoCalendarParams`]
1410#[derive(Clone, Debug, Default)]
1411pub struct GetIpoCalendarParamsBuilder {
1412    /// Exchange where instrument is traded
1413    exchange: Option<String>,
1414    /// Market Identifier Code (MIC) under ISO 10383 standard
1415    mic_code: Option<String>,
1416    /// Country where instrument is traded, e.g., `United States` or `US`
1417    country: Option<String>,
1418    /// The earliest IPO date to include in the results. Format: `2006-01-02`
1419    start_date: Option<String>,
1420    /// The latest IPO date to include in the results. Format: `2006-01-02`
1421    end_date: Option<String>
1422}
1423
1424impl GetIpoCalendarParamsBuilder {
1425    /// Exchange where instrument is traded
1426    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1427        self.exchange = Some(exchange.into());
1428        self
1429    }
1430    /// Market Identifier Code (MIC) under ISO 10383 standard
1431    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1432        self.mic_code = Some(mic_code.into());
1433        self
1434    }
1435    /// Country where instrument is traded, e.g., `United States` or `US`
1436    pub fn country(mut self, country: impl Into<String>) -> Self {
1437        self.country = Some(country.into());
1438        self
1439    }
1440    /// The earliest IPO date to include in the results. Format: `2006-01-02`
1441    pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1442        self.start_date = Some(start_date.into());
1443        self
1444    }
1445    /// The latest IPO date to include in the results. Format: `2006-01-02`
1446    pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
1447        self.end_date = Some(end_date.into());
1448        self
1449    }
1450
1451    /// Build the parameter struct
1452    pub fn build(self) -> GetIpoCalendarParams {
1453        GetIpoCalendarParams {
1454            exchange: self.exchange,
1455            mic_code: self.mic_code,
1456            country: self.country,
1457            start_date: self.start_date,
1458            end_date: self.end_date
1459        }
1460    }
1461}
1462
1463/// struct for passing parameters to the method [`get_key_executives`]
1464#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1465pub struct GetKeyExecutivesParams {
1466    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
1467    pub symbol: Option<String>,
1468    /// Filter by financial instrument global identifier (FIGI)
1469    pub figi: Option<String>,
1470    /// Filter by international securities identification number (ISIN)
1471    pub isin: Option<String>,
1472    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
1473    pub cusip: Option<String>,
1474    /// Exchange where instrument is traded
1475    pub exchange: Option<String>,
1476    /// Market Identifier Code (MIC) under ISO 10383 standard
1477    pub mic_code: Option<String>,
1478    /// Country where instrument is traded, e.g., `United States` or `US`
1479    pub country: Option<String>
1480}
1481
1482impl GetKeyExecutivesParams {
1483    /// Create a new builder for this parameter struct
1484    pub fn builder() -> GetKeyExecutivesParamsBuilder {
1485        GetKeyExecutivesParamsBuilder::default()
1486    }
1487}
1488
1489/// Builder for [`GetKeyExecutivesParams`]
1490#[derive(Clone, Debug, Default)]
1491pub struct GetKeyExecutivesParamsBuilder {
1492    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
1493    symbol: Option<String>,
1494    /// Filter by financial instrument global identifier (FIGI)
1495    figi: Option<String>,
1496    /// Filter by international securities identification number (ISIN)
1497    isin: Option<String>,
1498    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
1499    cusip: Option<String>,
1500    /// Exchange where instrument is traded
1501    exchange: Option<String>,
1502    /// Market Identifier Code (MIC) under ISO 10383 standard
1503    mic_code: Option<String>,
1504    /// Country where instrument is traded, e.g., `United States` or `US`
1505    country: Option<String>
1506}
1507
1508impl GetKeyExecutivesParamsBuilder {
1509    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
1510    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1511        self.symbol = Some(symbol.into());
1512        self
1513    }
1514    /// Filter by financial instrument global identifier (FIGI)
1515    pub fn figi(mut self, figi: impl Into<String>) -> Self {
1516        self.figi = Some(figi.into());
1517        self
1518    }
1519    /// Filter by international securities identification number (ISIN)
1520    pub fn isin(mut self, isin: impl Into<String>) -> Self {
1521        self.isin = Some(isin.into());
1522        self
1523    }
1524    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
1525    pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
1526        self.cusip = Some(cusip.into());
1527        self
1528    }
1529    /// Exchange where instrument is traded
1530    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1531        self.exchange = Some(exchange.into());
1532        self
1533    }
1534    /// Market Identifier Code (MIC) under ISO 10383 standard
1535    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1536        self.mic_code = Some(mic_code.into());
1537        self
1538    }
1539    /// Country where instrument is traded, e.g., `United States` or `US`
1540    pub fn country(mut self, country: impl Into<String>) -> Self {
1541        self.country = Some(country.into());
1542        self
1543    }
1544
1545    /// Build the parameter struct
1546    pub fn build(self) -> GetKeyExecutivesParams {
1547        GetKeyExecutivesParams {
1548            symbol: self.symbol,
1549            figi: self.figi,
1550            isin: self.isin,
1551            cusip: self.cusip,
1552            exchange: self.exchange,
1553            mic_code: self.mic_code,
1554            country: self.country
1555        }
1556    }
1557}
1558
1559/// struct for passing parameters to the method [`get_last_changes`]
1560#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1561pub struct GetLastChangesParams {
1562    /// Endpoint name
1563    pub endpoint: String,
1564    /// The starting date and time for data selection, in `2006-01-02T15:04:05` format
1565    pub start_date: Option<String>,
1566    /// Filter by symbol
1567    pub symbol: Option<String>,
1568    /// Filter by exchange name
1569    pub exchange: Option<String>,
1570    /// Filter by market identifier code (MIC) under ISO 10383 standard
1571    pub mic_code: Option<String>,
1572    /// Filter by country name or alpha code, e.g., `United States` or `US`
1573    pub country: Option<String>,
1574    /// Page number
1575    pub page: Option<i64>,
1576    /// Number of records in response
1577    pub outputsize: Option<i64>
1578}
1579
1580impl GetLastChangesParams {
1581    /// Create a new builder for this parameter struct
1582    pub fn builder() -> GetLastChangesParamsBuilder {
1583        GetLastChangesParamsBuilder::default()
1584    }
1585}
1586
1587/// Builder for [`GetLastChangesParams`]
1588#[derive(Clone, Debug, Default)]
1589pub struct GetLastChangesParamsBuilder {
1590    /// Endpoint name
1591    endpoint: String,
1592    /// The starting date and time for data selection, in `2006-01-02T15:04:05` format
1593    start_date: Option<String>,
1594    /// Filter by symbol
1595    symbol: Option<String>,
1596    /// Filter by exchange name
1597    exchange: Option<String>,
1598    /// Filter by market identifier code (MIC) under ISO 10383 standard
1599    mic_code: Option<String>,
1600    /// Filter by country name or alpha code, e.g., `United States` or `US`
1601    country: Option<String>,
1602    /// Page number
1603    page: Option<i64>,
1604    /// Number of records in response
1605    outputsize: Option<i64>
1606}
1607
1608impl GetLastChangesParamsBuilder {
1609    /// Endpoint name
1610    pub fn endpoint(mut self, endpoint: impl Into<String>) -> Self {
1611        self.endpoint = endpoint.into();
1612        self
1613    }
1614    /// The starting date and time for data selection, in `2006-01-02T15:04:05` format
1615    pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1616        self.start_date = Some(start_date.into());
1617        self
1618    }
1619    /// Filter by symbol
1620    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1621        self.symbol = Some(symbol.into());
1622        self
1623    }
1624    /// Filter by exchange name
1625    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1626        self.exchange = Some(exchange.into());
1627        self
1628    }
1629    /// Filter by market identifier code (MIC) under ISO 10383 standard
1630    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1631        self.mic_code = Some(mic_code.into());
1632        self
1633    }
1634    /// Filter by country name or alpha code, e.g., `United States` or `US`
1635    pub fn country(mut self, country: impl Into<String>) -> Self {
1636        self.country = Some(country.into());
1637        self
1638    }
1639    /// Page number
1640    pub fn page(mut self, page: i64) -> Self {
1641        self.page = Some(page);
1642        self
1643    }
1644    /// Number of records in response
1645    pub fn outputsize(mut self, outputsize: i64) -> Self {
1646        self.outputsize = Some(outputsize);
1647        self
1648    }
1649
1650    /// Build the parameter struct
1651    pub fn build(self) -> GetLastChangesParams {
1652        GetLastChangesParams {
1653            endpoint: self.endpoint,
1654            start_date: self.start_date,
1655            symbol: self.symbol,
1656            exchange: self.exchange,
1657            mic_code: self.mic_code,
1658            country: self.country,
1659            page: self.page,
1660            outputsize: self.outputsize
1661        }
1662    }
1663}
1664
1665/// struct for passing parameters to the method [`get_logo`]
1666#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1667pub struct GetLogoParams {
1668    /// The ticker symbol of an instrument for which data is requested, e.g., `AAPL`, `BTC/USD`, `EUR/USD`.
1669    pub symbol: String,
1670    /// The exchange name where the instrument is traded, e.g., `NASDAQ`, `NSE`
1671    pub exchange: Option<String>,
1672    /// The Market Identifier Code (MIC) of the exchange where the instrument is traded, e.g., `XNAS`, `XLON`
1673    pub mic_code: Option<String>,
1674    /// The country where the instrument is traded, e.g., `United States` or `US`
1675    pub country: Option<String>
1676}
1677
1678impl GetLogoParams {
1679    /// Create a new builder for this parameter struct
1680    pub fn builder() -> GetLogoParamsBuilder {
1681        GetLogoParamsBuilder::default()
1682    }
1683}
1684
1685/// Builder for [`GetLogoParams`]
1686#[derive(Clone, Debug, Default)]
1687pub struct GetLogoParamsBuilder {
1688    /// The ticker symbol of an instrument for which data is requested, e.g., `AAPL`, `BTC/USD`, `EUR/USD`.
1689    symbol: String,
1690    /// The exchange name where the instrument is traded, e.g., `NASDAQ`, `NSE`
1691    exchange: Option<String>,
1692    /// The Market Identifier Code (MIC) of the exchange where the instrument is traded, e.g., `XNAS`, `XLON`
1693    mic_code: Option<String>,
1694    /// The country where the instrument is traded, e.g., `United States` or `US`
1695    country: Option<String>
1696}
1697
1698impl GetLogoParamsBuilder {
1699    /// The ticker symbol of an instrument for which data is requested, e.g., `AAPL`, `BTC/USD`, `EUR/USD`.
1700    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1701        self.symbol = symbol.into();
1702        self
1703    }
1704    /// The exchange name where the instrument is traded, e.g., `NASDAQ`, `NSE`
1705    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1706        self.exchange = Some(exchange.into());
1707        self
1708    }
1709    /// The Market Identifier Code (MIC) of the exchange where the instrument is traded, e.g., `XNAS`, `XLON`
1710    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1711        self.mic_code = Some(mic_code.into());
1712        self
1713    }
1714    /// The country where the instrument is traded, e.g., `United States` or `US`
1715    pub fn country(mut self, country: impl Into<String>) -> Self {
1716        self.country = Some(country.into());
1717        self
1718    }
1719
1720    /// Build the parameter struct
1721    pub fn build(self) -> GetLogoParams {
1722        GetLogoParams {
1723            symbol: self.symbol,
1724            exchange: self.exchange,
1725            mic_code: self.mic_code,
1726            country: self.country
1727        }
1728    }
1729}
1730
1731/// struct for passing parameters to the method [`get_market_cap`]
1732#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1733pub struct GetMarketCapParams {
1734    /// Filter by symbol
1735    pub symbol: Option<String>,
1736    /// Filter by financial instrument global identifier (FIGI)
1737    pub figi: Option<String>,
1738    /// Filter by international securities identification number (ISIN)
1739    pub isin: Option<String>,
1740    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
1741    pub cusip: Option<String>,
1742    /// Filter by exchange name
1743    pub exchange: Option<String>,
1744    /// Filter by market identifier code (MIC) under ISO 10383 standard
1745    pub mic_code: Option<String>,
1746    /// Filter by country name or alpha code, e.g., `United States` or `US`
1747    pub country: Option<String>,
1748    /// Start date for market capitalization data retrieval. Data will be returned from this date onwards. Format `2006-01-02`
1749    pub start_date: Option<String>,
1750    /// End date for market capitalization data retrieval. Data will be returned up to and including this date. Format `2006-01-02`
1751    pub end_date: Option<String>,
1752    /// Page number
1753    pub page: Option<i64>,
1754    /// Number of records in response
1755    pub outputsize: Option<i64>
1756}
1757
1758impl GetMarketCapParams {
1759    /// Create a new builder for this parameter struct
1760    pub fn builder() -> GetMarketCapParamsBuilder {
1761        GetMarketCapParamsBuilder::default()
1762    }
1763}
1764
1765/// Builder for [`GetMarketCapParams`]
1766#[derive(Clone, Debug, Default)]
1767pub struct GetMarketCapParamsBuilder {
1768    /// Filter by symbol
1769    symbol: Option<String>,
1770    /// Filter by financial instrument global identifier (FIGI)
1771    figi: Option<String>,
1772    /// Filter by international securities identification number (ISIN)
1773    isin: Option<String>,
1774    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
1775    cusip: Option<String>,
1776    /// Filter by exchange name
1777    exchange: Option<String>,
1778    /// Filter by market identifier code (MIC) under ISO 10383 standard
1779    mic_code: Option<String>,
1780    /// Filter by country name or alpha code, e.g., `United States` or `US`
1781    country: Option<String>,
1782    /// Start date for market capitalization data retrieval. Data will be returned from this date onwards. Format `2006-01-02`
1783    start_date: Option<String>,
1784    /// End date for market capitalization data retrieval. Data will be returned up to and including this date. Format `2006-01-02`
1785    end_date: Option<String>,
1786    /// Page number
1787    page: Option<i64>,
1788    /// Number of records in response
1789    outputsize: Option<i64>
1790}
1791
1792impl GetMarketCapParamsBuilder {
1793    /// Filter by symbol
1794    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1795        self.symbol = Some(symbol.into());
1796        self
1797    }
1798    /// Filter by financial instrument global identifier (FIGI)
1799    pub fn figi(mut self, figi: impl Into<String>) -> Self {
1800        self.figi = Some(figi.into());
1801        self
1802    }
1803    /// Filter by international securities identification number (ISIN)
1804    pub fn isin(mut self, isin: impl Into<String>) -> Self {
1805        self.isin = Some(isin.into());
1806        self
1807    }
1808    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
1809    pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
1810        self.cusip = Some(cusip.into());
1811        self
1812    }
1813    /// Filter by exchange name
1814    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1815        self.exchange = Some(exchange.into());
1816        self
1817    }
1818    /// Filter by market identifier code (MIC) under ISO 10383 standard
1819    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1820        self.mic_code = Some(mic_code.into());
1821        self
1822    }
1823    /// Filter by country name or alpha code, e.g., `United States` or `US`
1824    pub fn country(mut self, country: impl Into<String>) -> Self {
1825        self.country = Some(country.into());
1826        self
1827    }
1828    /// Start date for market capitalization data retrieval. Data will be returned from this date onwards. Format `2006-01-02`
1829    pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1830        self.start_date = Some(start_date.into());
1831        self
1832    }
1833    /// End date for market capitalization data retrieval. Data will be returned up to and including this date. Format `2006-01-02`
1834    pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
1835        self.end_date = Some(end_date.into());
1836        self
1837    }
1838    /// Page number
1839    pub fn page(mut self, page: i64) -> Self {
1840        self.page = Some(page);
1841        self
1842    }
1843    /// Number of records in response
1844    pub fn outputsize(mut self, outputsize: i64) -> Self {
1845        self.outputsize = Some(outputsize);
1846        self
1847    }
1848
1849    /// Build the parameter struct
1850    pub fn build(self) -> GetMarketCapParams {
1851        GetMarketCapParams {
1852            symbol: self.symbol,
1853            figi: self.figi,
1854            isin: self.isin,
1855            cusip: self.cusip,
1856            exchange: self.exchange,
1857            mic_code: self.mic_code,
1858            country: self.country,
1859            start_date: self.start_date,
1860            end_date: self.end_date,
1861            page: self.page,
1862            outputsize: self.outputsize
1863        }
1864    }
1865}
1866
1867/// struct for passing parameters to the method [`get_profile`]
1868#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1869pub struct GetProfileParams {
1870    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
1871    pub symbol: Option<String>,
1872    /// Filter by financial instrument global identifier (FIGI)
1873    pub figi: Option<String>,
1874    /// Filter by international securities identification number (ISIN)
1875    pub isin: Option<String>,
1876    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
1877    pub cusip: Option<String>,
1878    /// Exchange where instrument is traded
1879    pub exchange: Option<String>,
1880    /// Market Identifier Code (MIC) under ISO 10383 standard
1881    pub mic_code: Option<String>,
1882    /// Country where instrument is traded, e.g., `United States` or `US`
1883    pub country: Option<String>
1884}
1885
1886impl GetProfileParams {
1887    /// Create a new builder for this parameter struct
1888    pub fn builder() -> GetProfileParamsBuilder {
1889        GetProfileParamsBuilder::default()
1890    }
1891}
1892
1893/// Builder for [`GetProfileParams`]
1894#[derive(Clone, Debug, Default)]
1895pub struct GetProfileParamsBuilder {
1896    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
1897    symbol: Option<String>,
1898    /// Filter by financial instrument global identifier (FIGI)
1899    figi: Option<String>,
1900    /// Filter by international securities identification number (ISIN)
1901    isin: Option<String>,
1902    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
1903    cusip: Option<String>,
1904    /// Exchange where instrument is traded
1905    exchange: Option<String>,
1906    /// Market Identifier Code (MIC) under ISO 10383 standard
1907    mic_code: Option<String>,
1908    /// Country where instrument is traded, e.g., `United States` or `US`
1909    country: Option<String>
1910}
1911
1912impl GetProfileParamsBuilder {
1913    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
1914    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1915        self.symbol = Some(symbol.into());
1916        self
1917    }
1918    /// Filter by financial instrument global identifier (FIGI)
1919    pub fn figi(mut self, figi: impl Into<String>) -> Self {
1920        self.figi = Some(figi.into());
1921        self
1922    }
1923    /// Filter by international securities identification number (ISIN)
1924    pub fn isin(mut self, isin: impl Into<String>) -> Self {
1925        self.isin = Some(isin.into());
1926        self
1927    }
1928    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
1929    pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
1930        self.cusip = Some(cusip.into());
1931        self
1932    }
1933    /// Exchange where instrument is traded
1934    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1935        self.exchange = Some(exchange.into());
1936        self
1937    }
1938    /// Market Identifier Code (MIC) under ISO 10383 standard
1939    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1940        self.mic_code = Some(mic_code.into());
1941        self
1942    }
1943    /// Country where instrument is traded, e.g., `United States` or `US`
1944    pub fn country(mut self, country: impl Into<String>) -> Self {
1945        self.country = Some(country.into());
1946        self
1947    }
1948
1949    /// Build the parameter struct
1950    pub fn build(self) -> GetProfileParams {
1951        GetProfileParams {
1952            symbol: self.symbol,
1953            figi: self.figi,
1954            isin: self.isin,
1955            cusip: self.cusip,
1956            exchange: self.exchange,
1957            mic_code: self.mic_code,
1958            country: self.country
1959        }
1960    }
1961}
1962
1963/// struct for passing parameters to the method [`get_splits`]
1964#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1965pub struct GetSplitsParams {
1966    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
1967    pub symbol: Option<String>,
1968    /// Filter by financial instrument global identifier (FIGI)
1969    pub figi: Option<String>,
1970    /// Filter by international securities identification number (ISIN)
1971    pub isin: Option<String>,
1972    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
1973    pub cusip: Option<String>,
1974    /// Exchange where instrument is traded
1975    pub exchange: Option<String>,
1976    /// Market Identifier Code (MIC) under ISO 10383 standard
1977    pub mic_code: Option<String>,
1978    /// Country where instrument is traded, e.g., `United States` or `US`
1979    pub country: Option<String>,
1980    /// Range of data to be returned
1981    pub range: Option<String>,
1982    /// The starting date for data selection. Format `2006-01-02`
1983    pub start_date: Option<String>,
1984    /// The ending date for data selection. Format `2006-01-02`
1985    pub end_date: Option<String>
1986}
1987
1988impl GetSplitsParams {
1989    /// Create a new builder for this parameter struct
1990    pub fn builder() -> GetSplitsParamsBuilder {
1991        GetSplitsParamsBuilder::default()
1992    }
1993}
1994
1995/// Builder for [`GetSplitsParams`]
1996#[derive(Clone, Debug, Default)]
1997pub struct GetSplitsParamsBuilder {
1998    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
1999    symbol: Option<String>,
2000    /// Filter by financial instrument global identifier (FIGI)
2001    figi: Option<String>,
2002    /// Filter by international securities identification number (ISIN)
2003    isin: Option<String>,
2004    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
2005    cusip: Option<String>,
2006    /// Exchange where instrument is traded
2007    exchange: Option<String>,
2008    /// Market Identifier Code (MIC) under ISO 10383 standard
2009    mic_code: Option<String>,
2010    /// Country where instrument is traded, e.g., `United States` or `US`
2011    country: Option<String>,
2012    /// Range of data to be returned
2013    range: Option<String>,
2014    /// The starting date for data selection. Format `2006-01-02`
2015    start_date: Option<String>,
2016    /// The ending date for data selection. Format `2006-01-02`
2017    end_date: Option<String>
2018}
2019
2020impl GetSplitsParamsBuilder {
2021    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
2022    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
2023        self.symbol = Some(symbol.into());
2024        self
2025    }
2026    /// Filter by financial instrument global identifier (FIGI)
2027    pub fn figi(mut self, figi: impl Into<String>) -> Self {
2028        self.figi = Some(figi.into());
2029        self
2030    }
2031    /// Filter by international securities identification number (ISIN)
2032    pub fn isin(mut self, isin: impl Into<String>) -> Self {
2033        self.isin = Some(isin.into());
2034        self
2035    }
2036    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
2037    pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
2038        self.cusip = Some(cusip.into());
2039        self
2040    }
2041    /// Exchange where instrument is traded
2042    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
2043        self.exchange = Some(exchange.into());
2044        self
2045    }
2046    /// Market Identifier Code (MIC) under ISO 10383 standard
2047    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
2048        self.mic_code = Some(mic_code.into());
2049        self
2050    }
2051    /// Country where instrument is traded, e.g., `United States` or `US`
2052    pub fn country(mut self, country: impl Into<String>) -> Self {
2053        self.country = Some(country.into());
2054        self
2055    }
2056    /// Range of data to be returned
2057    pub fn range(mut self, range: impl Into<String>) -> Self {
2058        self.range = Some(range.into());
2059        self
2060    }
2061    /// The starting date for data selection. Format `2006-01-02`
2062    pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
2063        self.start_date = Some(start_date.into());
2064        self
2065    }
2066    /// The ending date for data selection. Format `2006-01-02`
2067    pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
2068        self.end_date = Some(end_date.into());
2069        self
2070    }
2071
2072    /// Build the parameter struct
2073    pub fn build(self) -> GetSplitsParams {
2074        GetSplitsParams {
2075            symbol: self.symbol,
2076            figi: self.figi,
2077            isin: self.isin,
2078            cusip: self.cusip,
2079            exchange: self.exchange,
2080            mic_code: self.mic_code,
2081            country: self.country,
2082            range: self.range,
2083            start_date: self.start_date,
2084            end_date: self.end_date
2085        }
2086    }
2087}
2088
2089/// struct for passing parameters to the method [`get_splits_calendar`]
2090#[derive(Clone, Debug, Default, Serialize, Deserialize)]
2091pub struct GetSplitsCalendarParams {
2092    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
2093    pub symbol: Option<String>,
2094    /// Filter by financial instrument global identifier (FIGI)
2095    pub figi: Option<String>,
2096    /// Filter by international securities identification number (ISIN)
2097    pub isin: Option<String>,
2098    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
2099    pub cusip: Option<String>,
2100    /// Exchange where instrument is traded
2101    pub exchange: Option<String>,
2102    /// Market Identifier Code (MIC) under ISO 10383 standard
2103    pub mic_code: Option<String>,
2104    /// Country where instrument is traded, e.g., `United States` or `US`
2105    pub country: Option<String>,
2106    /// The starting date (inclusive) for filtering split events in the calendar. Format `2006-01-02`
2107    pub start_date: Option<String>,
2108    /// The ending date (inclusive) for filtering split events in the calendar. Format `2006-01-02`
2109    pub end_date: Option<String>,
2110    /// Number of data points to retrieve. Supports values in the range from `1` to `500`. Default `100` when no date parameters are set, otherwise set to maximum
2111    pub outputsize: Option<i64>,
2112    /// Page number
2113    pub page: Option<String>
2114}
2115
2116impl GetSplitsCalendarParams {
2117    /// Create a new builder for this parameter struct
2118    pub fn builder() -> GetSplitsCalendarParamsBuilder {
2119        GetSplitsCalendarParamsBuilder::default()
2120    }
2121}
2122
2123/// Builder for [`GetSplitsCalendarParams`]
2124#[derive(Clone, Debug, Default)]
2125pub struct GetSplitsCalendarParamsBuilder {
2126    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
2127    symbol: Option<String>,
2128    /// Filter by financial instrument global identifier (FIGI)
2129    figi: Option<String>,
2130    /// Filter by international securities identification number (ISIN)
2131    isin: Option<String>,
2132    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
2133    cusip: Option<String>,
2134    /// Exchange where instrument is traded
2135    exchange: Option<String>,
2136    /// Market Identifier Code (MIC) under ISO 10383 standard
2137    mic_code: Option<String>,
2138    /// Country where instrument is traded, e.g., `United States` or `US`
2139    country: Option<String>,
2140    /// The starting date (inclusive) for filtering split events in the calendar. Format `2006-01-02`
2141    start_date: Option<String>,
2142    /// The ending date (inclusive) for filtering split events in the calendar. Format `2006-01-02`
2143    end_date: Option<String>,
2144    /// Number of data points to retrieve. Supports values in the range from `1` to `500`. Default `100` when no date parameters are set, otherwise set to maximum
2145    outputsize: Option<i64>,
2146    /// Page number
2147    page: Option<String>
2148}
2149
2150impl GetSplitsCalendarParamsBuilder {
2151    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
2152    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
2153        self.symbol = Some(symbol.into());
2154        self
2155    }
2156    /// Filter by financial instrument global identifier (FIGI)
2157    pub fn figi(mut self, figi: impl Into<String>) -> Self {
2158        self.figi = Some(figi.into());
2159        self
2160    }
2161    /// Filter by international securities identification number (ISIN)
2162    pub fn isin(mut self, isin: impl Into<String>) -> Self {
2163        self.isin = Some(isin.into());
2164        self
2165    }
2166    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
2167    pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
2168        self.cusip = Some(cusip.into());
2169        self
2170    }
2171    /// Exchange where instrument is traded
2172    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
2173        self.exchange = Some(exchange.into());
2174        self
2175    }
2176    /// Market Identifier Code (MIC) under ISO 10383 standard
2177    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
2178        self.mic_code = Some(mic_code.into());
2179        self
2180    }
2181    /// Country where instrument is traded, e.g., `United States` or `US`
2182    pub fn country(mut self, country: impl Into<String>) -> Self {
2183        self.country = Some(country.into());
2184        self
2185    }
2186    /// The starting date (inclusive) for filtering split events in the calendar. Format `2006-01-02`
2187    pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
2188        self.start_date = Some(start_date.into());
2189        self
2190    }
2191    /// The ending date (inclusive) for filtering split events in the calendar. Format `2006-01-02`
2192    pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
2193        self.end_date = Some(end_date.into());
2194        self
2195    }
2196    /// Number of data points to retrieve. Supports values in the range from `1` to `500`. Default `100` when no date parameters are set, otherwise set to maximum
2197    pub fn outputsize(mut self, outputsize: i64) -> Self {
2198        self.outputsize = Some(outputsize);
2199        self
2200    }
2201    /// Page number
2202    pub fn page(mut self, page: impl Into<String>) -> Self {
2203        self.page = Some(page.into());
2204        self
2205    }
2206
2207    /// Build the parameter struct
2208    pub fn build(self) -> GetSplitsCalendarParams {
2209        GetSplitsCalendarParams {
2210            symbol: self.symbol,
2211            figi: self.figi,
2212            isin: self.isin,
2213            cusip: self.cusip,
2214            exchange: self.exchange,
2215            mic_code: self.mic_code,
2216            country: self.country,
2217            start_date: self.start_date,
2218            end_date: self.end_date,
2219            outputsize: self.outputsize,
2220            page: self.page
2221        }
2222    }
2223}
2224
2225/// struct for passing parameters to the method [`get_statistics`]
2226#[derive(Clone, Debug, Default, Serialize, Deserialize)]
2227pub struct GetStatisticsParams {
2228    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
2229    pub symbol: Option<String>,
2230    /// Filter by financial instrument global identifier (FIGI)
2231    pub figi: Option<String>,
2232    /// Filter by international securities identification number (ISIN)
2233    pub isin: Option<String>,
2234    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
2235    pub cusip: Option<String>,
2236    /// Exchange where instrument is traded
2237    pub exchange: Option<String>,
2238    /// Market Identifier Code (MIC) under ISO 10383 standard
2239    pub mic_code: Option<String>,
2240    /// Country where instrument is traded, e.g., `United States` or `US`
2241    pub country: Option<String>
2242}
2243
2244impl GetStatisticsParams {
2245    /// Create a new builder for this parameter struct
2246    pub fn builder() -> GetStatisticsParamsBuilder {
2247        GetStatisticsParamsBuilder::default()
2248    }
2249}
2250
2251/// Builder for [`GetStatisticsParams`]
2252#[derive(Clone, Debug, Default)]
2253pub struct GetStatisticsParamsBuilder {
2254    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
2255    symbol: Option<String>,
2256    /// Filter by financial instrument global identifier (FIGI)
2257    figi: Option<String>,
2258    /// Filter by international securities identification number (ISIN)
2259    isin: Option<String>,
2260    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
2261    cusip: Option<String>,
2262    /// Exchange where instrument is traded
2263    exchange: Option<String>,
2264    /// Market Identifier Code (MIC) under ISO 10383 standard
2265    mic_code: Option<String>,
2266    /// Country where instrument is traded, e.g., `United States` or `US`
2267    country: Option<String>
2268}
2269
2270impl GetStatisticsParamsBuilder {
2271    /// Symbol ticker of instrument. For preffered stocks use dot(.) delimiter. E.g. `BRK.A` or `BRK.B` will be correct
2272    pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
2273        self.symbol = Some(symbol.into());
2274        self
2275    }
2276    /// Filter by financial instrument global identifier (FIGI)
2277    pub fn figi(mut self, figi: impl Into<String>) -> Self {
2278        self.figi = Some(figi.into());
2279        self
2280    }
2281    /// Filter by international securities identification number (ISIN)
2282    pub fn isin(mut self, isin: impl Into<String>) -> Self {
2283        self.isin = Some(isin.into());
2284        self
2285    }
2286    /// The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href=\"https://twelvedata.com/account/add-ons\">Add-ons</a> section
2287    pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
2288        self.cusip = Some(cusip.into());
2289        self
2290    }
2291    /// Exchange where instrument is traded
2292    pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
2293        self.exchange = Some(exchange.into());
2294        self
2295    }
2296    /// Market Identifier Code (MIC) under ISO 10383 standard
2297    pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
2298        self.mic_code = Some(mic_code.into());
2299        self
2300    }
2301    /// Country where instrument is traded, e.g., `United States` or `US`
2302    pub fn country(mut self, country: impl Into<String>) -> Self {
2303        self.country = Some(country.into());
2304        self
2305    }
2306
2307    /// Build the parameter struct
2308    pub fn build(self) -> GetStatisticsParams {
2309        GetStatisticsParams {
2310            symbol: self.symbol,
2311            figi: self.figi,
2312            isin: self.isin,
2313            cusip: self.cusip,
2314            exchange: self.exchange,
2315            mic_code: self.mic_code,
2316            country: self.country
2317        }
2318    }
2319}
2320
2321
2322/// struct for typed errors of method [`get_balance_sheet`]
2323#[derive(Debug, Clone, Serialize, Deserialize)]
2324#[serde(untagged)]
2325pub enum GetBalanceSheetError {
2326    UnknownValue(serde_json::Value),
2327}
2328
2329/// struct for typed errors of method [`get_balance_sheet_consolidated`]
2330#[derive(Debug, Clone, Serialize, Deserialize)]
2331#[serde(untagged)]
2332pub enum GetBalanceSheetConsolidatedError {
2333    UnknownValue(serde_json::Value),
2334}
2335
2336/// struct for typed errors of method [`get_cash_flow`]
2337#[derive(Debug, Clone, Serialize, Deserialize)]
2338#[serde(untagged)]
2339pub enum GetCashFlowError {
2340    UnknownValue(serde_json::Value),
2341}
2342
2343/// struct for typed errors of method [`get_cash_flow_consolidated`]
2344#[derive(Debug, Clone, Serialize, Deserialize)]
2345#[serde(untagged)]
2346pub enum GetCashFlowConsolidatedError {
2347    UnknownValue(serde_json::Value),
2348}
2349
2350/// struct for typed errors of method [`get_dividends`]
2351#[derive(Debug, Clone, Serialize, Deserialize)]
2352#[serde(untagged)]
2353pub enum GetDividendsError {
2354    UnknownValue(serde_json::Value),
2355}
2356
2357/// struct for typed errors of method [`get_dividends_calendar`]
2358#[derive(Debug, Clone, Serialize, Deserialize)]
2359#[serde(untagged)]
2360pub enum GetDividendsCalendarError {
2361    UnknownValue(serde_json::Value),
2362}
2363
2364/// struct for typed errors of method [`get_earnings`]
2365#[derive(Debug, Clone, Serialize, Deserialize)]
2366#[serde(untagged)]
2367pub enum GetEarningsError {
2368    UnknownValue(serde_json::Value),
2369}
2370
2371/// struct for typed errors of method [`get_earnings_calendar`]
2372#[derive(Debug, Clone, Serialize, Deserialize)]
2373#[serde(untagged)]
2374pub enum GetEarningsCalendarError {
2375    UnknownValue(serde_json::Value),
2376}
2377
2378/// struct for typed errors of method [`get_income_statement`]
2379#[derive(Debug, Clone, Serialize, Deserialize)]
2380#[serde(untagged)]
2381pub enum GetIncomeStatementError {
2382    UnknownValue(serde_json::Value),
2383}
2384
2385/// struct for typed errors of method [`get_income_statement_consolidated`]
2386#[derive(Debug, Clone, Serialize, Deserialize)]
2387#[serde(untagged)]
2388pub enum GetIncomeStatementConsolidatedError {
2389    UnknownValue(serde_json::Value),
2390}
2391
2392/// struct for typed errors of method [`get_ipo_calendar`]
2393#[derive(Debug, Clone, Serialize, Deserialize)]
2394#[serde(untagged)]
2395pub enum GetIpoCalendarError {
2396    UnknownValue(serde_json::Value),
2397}
2398
2399/// struct for typed errors of method [`get_key_executives`]
2400#[derive(Debug, Clone, Serialize, Deserialize)]
2401#[serde(untagged)]
2402pub enum GetKeyExecutivesError {
2403    UnknownValue(serde_json::Value),
2404}
2405
2406/// struct for typed errors of method [`get_last_changes`]
2407#[derive(Debug, Clone, Serialize, Deserialize)]
2408#[serde(untagged)]
2409pub enum GetLastChangesError {
2410    UnknownValue(serde_json::Value),
2411}
2412
2413/// struct for typed errors of method [`get_logo`]
2414#[derive(Debug, Clone, Serialize, Deserialize)]
2415#[serde(untagged)]
2416pub enum GetLogoError {
2417    UnknownValue(serde_json::Value),
2418}
2419
2420/// struct for typed errors of method [`get_market_cap`]
2421#[derive(Debug, Clone, Serialize, Deserialize)]
2422#[serde(untagged)]
2423pub enum GetMarketCapError {
2424    UnknownValue(serde_json::Value),
2425}
2426
2427/// struct for typed errors of method [`get_profile`]
2428#[derive(Debug, Clone, Serialize, Deserialize)]
2429#[serde(untagged)]
2430pub enum GetProfileError {
2431    UnknownValue(serde_json::Value),
2432}
2433
2434/// struct for typed errors of method [`get_splits`]
2435#[derive(Debug, Clone, Serialize, Deserialize)]
2436#[serde(untagged)]
2437pub enum GetSplitsError {
2438    UnknownValue(serde_json::Value),
2439}
2440
2441/// struct for typed errors of method [`get_splits_calendar`]
2442#[derive(Debug, Clone, Serialize, Deserialize)]
2443#[serde(untagged)]
2444pub enum GetSplitsCalendarError {
2445    UnknownValue(serde_json::Value),
2446}
2447
2448/// struct for typed errors of method [`get_statistics`]
2449#[derive(Debug, Clone, Serialize, Deserialize)]
2450#[serde(untagged)]
2451pub enum GetStatisticsError {
2452    UnknownValue(serde_json::Value),
2453}
2454
2455
2456/// The balance sheet endpoint provides a detailed financial statement for a company, outlining its assets, liabilities, and shareholders' equity. This endpoint returns structured data that includes current and non-current assets, total liabilities, and equity figures, enabling users to assess a company's financial health and stability.
2457pub async fn get_balance_sheet(configuration: &configuration::Configuration, params: GetBalanceSheetParams) -> Result<models::GetBalanceSheet200Response, Error<GetBalanceSheetError>> {
2458    // Extract parameters from params struct
2459    let p_query_symbol = params.symbol;
2460    let p_query_figi = params.figi;
2461    let p_query_isin = params.isin;
2462    let p_query_cusip = params.cusip;
2463    let p_query_exchange = params.exchange;
2464    let p_query_mic_code = params.mic_code;
2465    let p_query_country = params.country;
2466    let p_query_period = params.period;
2467    let p_query_start_date = params.start_date;
2468    let p_query_end_date = params.end_date;
2469    let p_query_outputsize = params.outputsize;
2470
2471    let uri_str = format!("{}/balance_sheet", configuration.base_path);
2472    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2473
2474    if let Some(ref param_value) = p_query_symbol {
2475        req_builder = req_builder.query(&[("symbol", &param_value.to_string())]);
2476    }
2477    if let Some(ref param_value) = p_query_figi {
2478        req_builder = req_builder.query(&[("figi", &param_value.to_string())]);
2479    }
2480    if let Some(ref param_value) = p_query_isin {
2481        req_builder = req_builder.query(&[("isin", &param_value.to_string())]);
2482    }
2483    if let Some(ref param_value) = p_query_cusip {
2484        req_builder = req_builder.query(&[("cusip", &param_value.to_string())]);
2485    }
2486    if let Some(ref param_value) = p_query_exchange {
2487        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
2488    }
2489    if let Some(ref param_value) = p_query_mic_code {
2490        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
2491    }
2492    if let Some(ref param_value) = p_query_country {
2493        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
2494    }
2495    if let Some(ref param_value) = p_query_period {
2496        req_builder = req_builder.query(&[("period", &serde_json::to_string(param_value)?)]);
2497    }
2498    if let Some(ref param_value) = p_query_start_date {
2499        req_builder = req_builder.query(&[("start_date", &param_value.to_string())]);
2500    }
2501    if let Some(ref param_value) = p_query_end_date {
2502        req_builder = req_builder.query(&[("end_date", &param_value.to_string())]);
2503    }
2504    if let Some(ref param_value) = p_query_outputsize {
2505        req_builder = req_builder.query(&[("outputsize", &param_value.to_string())]);
2506    }
2507    if let Some(ref user_agent) = configuration.user_agent {
2508        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2509    }
2510    if let Some(ref apikey) = configuration.api_key {
2511        let key = apikey.key.clone();
2512        let value = match apikey.prefix {
2513            Some(ref prefix) => format!("{} {}", prefix, key),
2514            None => key,
2515        };
2516        req_builder = req_builder.header("Authorization", value);
2517    };
2518
2519    let req = req_builder.build()?;
2520    let resp = configuration.client.execute(req).await?;
2521
2522    let status = resp.status();
2523    let content_type = resp
2524        .headers()
2525        .get("content-type")
2526        .and_then(|v| v.to_str().ok())
2527        .unwrap_or("application/octet-stream");
2528    let content_type = super::ContentType::from(content_type);
2529
2530    if !status.is_client_error() && !status.is_server_error() {
2531        let content = resp.text().await?;
2532        match content_type {
2533            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2534            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetBalanceSheet200Response`"))),
2535            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetBalanceSheet200Response`")))),
2536        }
2537    } else {
2538        let content = resp.text().await?;
2539        let entity: Option<GetBalanceSheetError> = serde_json::from_str(&content).ok();
2540        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2541    }
2542}
2543
2544/// The balance sheet consolidated endpoint provides a detailed overview of a company's raw balance sheet, including a comprehensive summary of its assets, liabilities, and shareholders' equity. This endpoint is useful for retrieving financial data that reflects the overall financial position of a company, allowing users to access critical information about its financial health and structure.
2545pub async fn get_balance_sheet_consolidated(configuration: &configuration::Configuration, params: GetBalanceSheetConsolidatedParams) -> Result<models::GetBalanceSheetConsolidated200Response, Error<GetBalanceSheetConsolidatedError>> {
2546    // Extract parameters from params struct
2547    let p_query_symbol = params.symbol;
2548    let p_query_figi = params.figi;
2549    let p_query_isin = params.isin;
2550    let p_query_cusip = params.cusip;
2551    let p_query_exchange = params.exchange;
2552    let p_query_mic_code = params.mic_code;
2553    let p_query_country = params.country;
2554    let p_query_period = params.period;
2555    let p_query_start_date = params.start_date;
2556    let p_query_end_date = params.end_date;
2557    let p_query_outputsize = params.outputsize;
2558
2559    let uri_str = format!("{}/balance_sheet/consolidated", configuration.base_path);
2560    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2561
2562    if let Some(ref param_value) = p_query_symbol {
2563        req_builder = req_builder.query(&[("symbol", &param_value.to_string())]);
2564    }
2565    if let Some(ref param_value) = p_query_figi {
2566        req_builder = req_builder.query(&[("figi", &param_value.to_string())]);
2567    }
2568    if let Some(ref param_value) = p_query_isin {
2569        req_builder = req_builder.query(&[("isin", &param_value.to_string())]);
2570    }
2571    if let Some(ref param_value) = p_query_cusip {
2572        req_builder = req_builder.query(&[("cusip", &param_value.to_string())]);
2573    }
2574    if let Some(ref param_value) = p_query_exchange {
2575        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
2576    }
2577    if let Some(ref param_value) = p_query_mic_code {
2578        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
2579    }
2580    if let Some(ref param_value) = p_query_country {
2581        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
2582    }
2583    if let Some(ref param_value) = p_query_period {
2584        req_builder = req_builder.query(&[("period", &serde_json::to_string(param_value)?)]);
2585    }
2586    if let Some(ref param_value) = p_query_start_date {
2587        req_builder = req_builder.query(&[("start_date", &param_value.to_string())]);
2588    }
2589    if let Some(ref param_value) = p_query_end_date {
2590        req_builder = req_builder.query(&[("end_date", &param_value.to_string())]);
2591    }
2592    if let Some(ref param_value) = p_query_outputsize {
2593        req_builder = req_builder.query(&[("outputsize", &param_value.to_string())]);
2594    }
2595    if let Some(ref user_agent) = configuration.user_agent {
2596        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2597    }
2598    if let Some(ref apikey) = configuration.api_key {
2599        let key = apikey.key.clone();
2600        let value = match apikey.prefix {
2601            Some(ref prefix) => format!("{} {}", prefix, key),
2602            None => key,
2603        };
2604        req_builder = req_builder.header("Authorization", value);
2605    };
2606
2607    let req = req_builder.build()?;
2608    let resp = configuration.client.execute(req).await?;
2609
2610    let status = resp.status();
2611    let content_type = resp
2612        .headers()
2613        .get("content-type")
2614        .and_then(|v| v.to_str().ok())
2615        .unwrap_or("application/octet-stream");
2616    let content_type = super::ContentType::from(content_type);
2617
2618    if !status.is_client_error() && !status.is_server_error() {
2619        let content = resp.text().await?;
2620        match content_type {
2621            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2622            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetBalanceSheetConsolidated200Response`"))),
2623            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetBalanceSheetConsolidated200Response`")))),
2624        }
2625    } else {
2626        let content = resp.text().await?;
2627        let entity: Option<GetBalanceSheetConsolidatedError> = serde_json::from_str(&content).ok();
2628        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2629    }
2630}
2631
2632/// The cash flow endpoint provides detailed information on a company's cash flow activities, including the net cash and cash equivalents moving in and out of the business. This data includes operating, investing, and financing cash flows, offering a comprehensive view of the company's liquidity and financial health.
2633pub async fn get_cash_flow(configuration: &configuration::Configuration, params: GetCashFlowParams) -> Result<models::GetCashFlow200Response, Error<GetCashFlowError>> {
2634    // Extract parameters from params struct
2635    let p_query_symbol = params.symbol;
2636    let p_query_figi = params.figi;
2637    let p_query_isin = params.isin;
2638    let p_query_cusip = params.cusip;
2639    let p_query_exchange = params.exchange;
2640    let p_query_mic_code = params.mic_code;
2641    let p_query_country = params.country;
2642    let p_query_period = params.period;
2643    let p_query_start_date = params.start_date;
2644    let p_query_end_date = params.end_date;
2645    let p_query_outputsize = params.outputsize;
2646
2647    let uri_str = format!("{}/cash_flow", configuration.base_path);
2648    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2649
2650    if let Some(ref param_value) = p_query_symbol {
2651        req_builder = req_builder.query(&[("symbol", &param_value.to_string())]);
2652    }
2653    if let Some(ref param_value) = p_query_figi {
2654        req_builder = req_builder.query(&[("figi", &param_value.to_string())]);
2655    }
2656    if let Some(ref param_value) = p_query_isin {
2657        req_builder = req_builder.query(&[("isin", &param_value.to_string())]);
2658    }
2659    if let Some(ref param_value) = p_query_cusip {
2660        req_builder = req_builder.query(&[("cusip", &param_value.to_string())]);
2661    }
2662    if let Some(ref param_value) = p_query_exchange {
2663        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
2664    }
2665    if let Some(ref param_value) = p_query_mic_code {
2666        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
2667    }
2668    if let Some(ref param_value) = p_query_country {
2669        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
2670    }
2671    if let Some(ref param_value) = p_query_period {
2672        req_builder = req_builder.query(&[("period", &serde_json::to_string(param_value)?)]);
2673    }
2674    if let Some(ref param_value) = p_query_start_date {
2675        req_builder = req_builder.query(&[("start_date", &param_value.to_string())]);
2676    }
2677    if let Some(ref param_value) = p_query_end_date {
2678        req_builder = req_builder.query(&[("end_date", &param_value.to_string())]);
2679    }
2680    if let Some(ref param_value) = p_query_outputsize {
2681        req_builder = req_builder.query(&[("outputsize", &param_value.to_string())]);
2682    }
2683    if let Some(ref user_agent) = configuration.user_agent {
2684        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2685    }
2686    if let Some(ref apikey) = configuration.api_key {
2687        let key = apikey.key.clone();
2688        let value = match apikey.prefix {
2689            Some(ref prefix) => format!("{} {}", prefix, key),
2690            None => key,
2691        };
2692        req_builder = req_builder.header("Authorization", value);
2693    };
2694
2695    let req = req_builder.build()?;
2696    let resp = configuration.client.execute(req).await?;
2697
2698    let status = resp.status();
2699    let content_type = resp
2700        .headers()
2701        .get("content-type")
2702        .and_then(|v| v.to_str().ok())
2703        .unwrap_or("application/octet-stream");
2704    let content_type = super::ContentType::from(content_type);
2705
2706    if !status.is_client_error() && !status.is_server_error() {
2707        let content = resp.text().await?;
2708        match content_type {
2709            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2710            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetCashFlow200Response`"))),
2711            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetCashFlow200Response`")))),
2712        }
2713    } else {
2714        let content = resp.text().await?;
2715        let entity: Option<GetCashFlowError> = serde_json::from_str(&content).ok();
2716        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2717    }
2718}
2719
2720/// The cash flow consolidated endpoint provides raw data on a company's consolidated cash flow, including the net cash and cash equivalents moving in and out of the business. It returns information on operating, investing, and financing activities, helping users track liquidity and financial health over a specified period.
2721pub async fn get_cash_flow_consolidated(configuration: &configuration::Configuration, params: GetCashFlowConsolidatedParams) -> Result<models::GetCashFlowConsolidated200Response, Error<GetCashFlowConsolidatedError>> {
2722    // Extract parameters from params struct
2723    let p_query_symbol = params.symbol;
2724    let p_query_figi = params.figi;
2725    let p_query_isin = params.isin;
2726    let p_query_cusip = params.cusip;
2727    let p_query_exchange = params.exchange;
2728    let p_query_mic_code = params.mic_code;
2729    let p_query_country = params.country;
2730    let p_query_period = params.period;
2731    let p_query_start_date = params.start_date;
2732    let p_query_end_date = params.end_date;
2733    let p_query_outputsize = params.outputsize;
2734
2735    let uri_str = format!("{}/cash_flow/consolidated", configuration.base_path);
2736    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2737
2738    if let Some(ref param_value) = p_query_symbol {
2739        req_builder = req_builder.query(&[("symbol", &param_value.to_string())]);
2740    }
2741    if let Some(ref param_value) = p_query_figi {
2742        req_builder = req_builder.query(&[("figi", &param_value.to_string())]);
2743    }
2744    if let Some(ref param_value) = p_query_isin {
2745        req_builder = req_builder.query(&[("isin", &param_value.to_string())]);
2746    }
2747    if let Some(ref param_value) = p_query_cusip {
2748        req_builder = req_builder.query(&[("cusip", &param_value.to_string())]);
2749    }
2750    if let Some(ref param_value) = p_query_exchange {
2751        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
2752    }
2753    if let Some(ref param_value) = p_query_mic_code {
2754        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
2755    }
2756    if let Some(ref param_value) = p_query_country {
2757        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
2758    }
2759    if let Some(ref param_value) = p_query_period {
2760        req_builder = req_builder.query(&[("period", &serde_json::to_string(param_value)?)]);
2761    }
2762    if let Some(ref param_value) = p_query_start_date {
2763        req_builder = req_builder.query(&[("start_date", &param_value.to_string())]);
2764    }
2765    if let Some(ref param_value) = p_query_end_date {
2766        req_builder = req_builder.query(&[("end_date", &param_value.to_string())]);
2767    }
2768    if let Some(ref param_value) = p_query_outputsize {
2769        req_builder = req_builder.query(&[("outputsize", &param_value.to_string())]);
2770    }
2771    if let Some(ref user_agent) = configuration.user_agent {
2772        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2773    }
2774    if let Some(ref apikey) = configuration.api_key {
2775        let key = apikey.key.clone();
2776        let value = match apikey.prefix {
2777            Some(ref prefix) => format!("{} {}", prefix, key),
2778            None => key,
2779        };
2780        req_builder = req_builder.header("Authorization", value);
2781    };
2782
2783    let req = req_builder.build()?;
2784    let resp = configuration.client.execute(req).await?;
2785
2786    let status = resp.status();
2787    let content_type = resp
2788        .headers()
2789        .get("content-type")
2790        .and_then(|v| v.to_str().ok())
2791        .unwrap_or("application/octet-stream");
2792    let content_type = super::ContentType::from(content_type);
2793
2794    if !status.is_client_error() && !status.is_server_error() {
2795        let content = resp.text().await?;
2796        match content_type {
2797            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2798            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetCashFlowConsolidated200Response`"))),
2799            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetCashFlowConsolidated200Response`")))),
2800        }
2801    } else {
2802        let content = resp.text().await?;
2803        let entity: Option<GetCashFlowConsolidatedError> = serde_json::from_str(&content).ok();
2804        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2805    }
2806}
2807
2808/// The dividends endpoint provides historical dividend data for a specified stock, in many cases covering over a decade. It returns information on dividend payouts, including the amount, payment date, and frequency. This endpoint is ideal for users tracking dividend histories or evaluating the income potential of stocks.
2809pub async fn get_dividends(configuration: &configuration::Configuration, params: GetDividendsParams) -> Result<models::GetDividends200Response, Error<GetDividendsError>> {
2810    // Extract parameters from params struct
2811    let p_query_symbol = params.symbol;
2812    let p_query_figi = params.figi;
2813    let p_query_isin = params.isin;
2814    let p_query_cusip = params.cusip;
2815    let p_query_exchange = params.exchange;
2816    let p_query_mic_code = params.mic_code;
2817    let p_query_country = params.country;
2818    let p_query_range = params.range;
2819    let p_query_start_date = params.start_date;
2820    let p_query_end_date = params.end_date;
2821    let p_query_adjust = params.adjust;
2822
2823    let uri_str = format!("{}/dividends", configuration.base_path);
2824    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2825
2826    if let Some(ref param_value) = p_query_symbol {
2827        req_builder = req_builder.query(&[("symbol", &param_value.to_string())]);
2828    }
2829    if let Some(ref param_value) = p_query_figi {
2830        req_builder = req_builder.query(&[("figi", &param_value.to_string())]);
2831    }
2832    if let Some(ref param_value) = p_query_isin {
2833        req_builder = req_builder.query(&[("isin", &param_value.to_string())]);
2834    }
2835    if let Some(ref param_value) = p_query_cusip {
2836        req_builder = req_builder.query(&[("cusip", &param_value.to_string())]);
2837    }
2838    if let Some(ref param_value) = p_query_exchange {
2839        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
2840    }
2841    if let Some(ref param_value) = p_query_mic_code {
2842        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
2843    }
2844    if let Some(ref param_value) = p_query_country {
2845        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
2846    }
2847    if let Some(ref param_value) = p_query_range {
2848        req_builder = req_builder.query(&[("range", &serde_json::to_string(param_value)?)]);
2849    }
2850    if let Some(ref param_value) = p_query_start_date {
2851        req_builder = req_builder.query(&[("start_date", &param_value.to_string())]);
2852    }
2853    if let Some(ref param_value) = p_query_end_date {
2854        req_builder = req_builder.query(&[("end_date", &param_value.to_string())]);
2855    }
2856    if let Some(ref param_value) = p_query_adjust {
2857        req_builder = req_builder.query(&[("adjust", &param_value.to_string())]);
2858    }
2859    if let Some(ref user_agent) = configuration.user_agent {
2860        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2861    }
2862    if let Some(ref apikey) = configuration.api_key {
2863        let key = apikey.key.clone();
2864        let value = match apikey.prefix {
2865            Some(ref prefix) => format!("{} {}", prefix, key),
2866            None => key,
2867        };
2868        req_builder = req_builder.header("Authorization", value);
2869    };
2870
2871    let req = req_builder.build()?;
2872    let resp = configuration.client.execute(req).await?;
2873
2874    let status = resp.status();
2875    let content_type = resp
2876        .headers()
2877        .get("content-type")
2878        .and_then(|v| v.to_str().ok())
2879        .unwrap_or("application/octet-stream");
2880    let content_type = super::ContentType::from(content_type);
2881
2882    if !status.is_client_error() && !status.is_server_error() {
2883        let content = resp.text().await?;
2884        match content_type {
2885            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2886            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetDividends200Response`"))),
2887            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetDividends200Response`")))),
2888        }
2889    } else {
2890        let content = resp.text().await?;
2891        let entity: Option<GetDividendsError> = serde_json::from_str(&content).ok();
2892        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2893    }
2894}
2895
2896/// The dividends calendar endpoint provides a detailed schedule of upcoming and past dividend events for specified date ranges. By using the `start_date` and `end_date` parameters, users can retrieve a list of companies issuing dividends, including the ex-dividend date, payment date, and dividend amount. This endpoint is ideal for tracking dividend payouts and planning investment strategies based on dividend schedules.
2897pub async fn get_dividends_calendar(configuration: &configuration::Configuration, params: GetDividendsCalendarParams) -> Result<Vec<models::DividendsCalendarItem>, Error<GetDividendsCalendarError>> {
2898    // Extract parameters from params struct
2899    let p_query_symbol = params.symbol;
2900    let p_query_figi = params.figi;
2901    let p_query_isin = params.isin;
2902    let p_query_cusip = params.cusip;
2903    let p_query_exchange = params.exchange;
2904    let p_query_mic_code = params.mic_code;
2905    let p_query_country = params.country;
2906    let p_query_start_date = params.start_date;
2907    let p_query_end_date = params.end_date;
2908    let p_query_outputsize = params.outputsize;
2909    let p_query_page = params.page;
2910
2911    let uri_str = format!("{}/dividends_calendar", configuration.base_path);
2912    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2913
2914    if let Some(ref param_value) = p_query_symbol {
2915        req_builder = req_builder.query(&[("symbol", &param_value.to_string())]);
2916    }
2917    if let Some(ref param_value) = p_query_figi {
2918        req_builder = req_builder.query(&[("figi", &param_value.to_string())]);
2919    }
2920    if let Some(ref param_value) = p_query_isin {
2921        req_builder = req_builder.query(&[("isin", &param_value.to_string())]);
2922    }
2923    if let Some(ref param_value) = p_query_cusip {
2924        req_builder = req_builder.query(&[("cusip", &param_value.to_string())]);
2925    }
2926    if let Some(ref param_value) = p_query_exchange {
2927        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
2928    }
2929    if let Some(ref param_value) = p_query_mic_code {
2930        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
2931    }
2932    if let Some(ref param_value) = p_query_country {
2933        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
2934    }
2935    if let Some(ref param_value) = p_query_start_date {
2936        req_builder = req_builder.query(&[("start_date", &param_value.to_string())]);
2937    }
2938    if let Some(ref param_value) = p_query_end_date {
2939        req_builder = req_builder.query(&[("end_date", &param_value.to_string())]);
2940    }
2941    if let Some(ref param_value) = p_query_outputsize {
2942        req_builder = req_builder.query(&[("outputsize", &param_value.to_string())]);
2943    }
2944    if let Some(ref param_value) = p_query_page {
2945        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
2946    }
2947    if let Some(ref user_agent) = configuration.user_agent {
2948        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2949    }
2950    if let Some(ref apikey) = configuration.api_key {
2951        let key = apikey.key.clone();
2952        let value = match apikey.prefix {
2953            Some(ref prefix) => format!("{} {}", prefix, key),
2954            None => key,
2955        };
2956        req_builder = req_builder.header("Authorization", value);
2957    };
2958
2959    let req = req_builder.build()?;
2960    let resp = configuration.client.execute(req).await?;
2961
2962    let status = resp.status();
2963    let content_type = resp
2964        .headers()
2965        .get("content-type")
2966        .and_then(|v| v.to_str().ok())
2967        .unwrap_or("application/octet-stream");
2968    let content_type = super::ContentType::from(content_type);
2969
2970    if !status.is_client_error() && !status.is_server_error() {
2971        let content = resp.text().await?;
2972        match content_type {
2973            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2974            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::DividendsCalendarItem&gt;`"))),
2975            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::DividendsCalendarItem&gt;`")))),
2976        }
2977    } else {
2978        let content = resp.text().await?;
2979        let entity: Option<GetDividendsCalendarError> = serde_json::from_str(&content).ok();
2980        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2981    }
2982}
2983
2984/// The earnings endpoint provides comprehensive earnings data for a specified company, including both the estimated and actual Earnings Per Share (EPS) figures. This endpoint delivers historical earnings information, allowing users to track a company's financial performance over time.
2985pub async fn get_earnings(configuration: &configuration::Configuration, params: GetEarningsParams) -> Result<models::GetEarnings200Response, Error<GetEarningsError>> {
2986    // Extract parameters from params struct
2987    let p_query_symbol = params.symbol;
2988    let p_query_figi = params.figi;
2989    let p_query_isin = params.isin;
2990    let p_query_cusip = params.cusip;
2991    let p_query_exchange = params.exchange;
2992    let p_query_mic_code = params.mic_code;
2993    let p_query_country = params.country;
2994    let p_query_type = params.r#type;
2995    let p_query_period = params.period;
2996    let p_query_outputsize = params.outputsize;
2997    let p_query_format = params.format;
2998    let p_query_delimiter = params.delimiter;
2999    let p_query_start_date = params.start_date;
3000    let p_query_end_date = params.end_date;
3001    let p_query_dp = params.dp;
3002
3003    let uri_str = format!("{}/earnings", configuration.base_path);
3004    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3005
3006    if let Some(ref param_value) = p_query_symbol {
3007        req_builder = req_builder.query(&[("symbol", &param_value.to_string())]);
3008    }
3009    if let Some(ref param_value) = p_query_figi {
3010        req_builder = req_builder.query(&[("figi", &param_value.to_string())]);
3011    }
3012    if let Some(ref param_value) = p_query_isin {
3013        req_builder = req_builder.query(&[("isin", &param_value.to_string())]);
3014    }
3015    if let Some(ref param_value) = p_query_cusip {
3016        req_builder = req_builder.query(&[("cusip", &param_value.to_string())]);
3017    }
3018    if let Some(ref param_value) = p_query_exchange {
3019        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
3020    }
3021    if let Some(ref param_value) = p_query_mic_code {
3022        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
3023    }
3024    if let Some(ref param_value) = p_query_country {
3025        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
3026    }
3027    if let Some(ref param_value) = p_query_type {
3028        req_builder = req_builder.query(&[("type", &serde_json::to_string(param_value)?)]);
3029    }
3030    if let Some(ref param_value) = p_query_period {
3031        req_builder = req_builder.query(&[("period", &serde_json::to_string(param_value)?)]);
3032    }
3033    if let Some(ref param_value) = p_query_outputsize {
3034        req_builder = req_builder.query(&[("outputsize", &param_value.to_string())]);
3035    }
3036    if let Some(ref param_value) = p_query_format {
3037        req_builder = req_builder.query(&[("format", &serde_json::to_string(param_value)?)]);
3038    }
3039    if let Some(ref param_value) = p_query_delimiter {
3040        req_builder = req_builder.query(&[("delimiter", &param_value.to_string())]);
3041    }
3042    if let Some(ref param_value) = p_query_start_date {
3043        req_builder = req_builder.query(&[("start_date", &param_value.to_string())]);
3044    }
3045    if let Some(ref param_value) = p_query_end_date {
3046        req_builder = req_builder.query(&[("end_date", &param_value.to_string())]);
3047    }
3048    if let Some(ref param_value) = p_query_dp {
3049        req_builder = req_builder.query(&[("dp", &param_value.to_string())]);
3050    }
3051    if let Some(ref user_agent) = configuration.user_agent {
3052        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3053    }
3054    if let Some(ref apikey) = configuration.api_key {
3055        let key = apikey.key.clone();
3056        let value = match apikey.prefix {
3057            Some(ref prefix) => format!("{} {}", prefix, key),
3058            None => key,
3059        };
3060        req_builder = req_builder.header("Authorization", value);
3061    };
3062
3063    let req = req_builder.build()?;
3064    let resp = configuration.client.execute(req).await?;
3065
3066    let status = resp.status();
3067    let content_type = resp
3068        .headers()
3069        .get("content-type")
3070        .and_then(|v| v.to_str().ok())
3071        .unwrap_or("application/octet-stream");
3072    let content_type = super::ContentType::from(content_type);
3073
3074    if !status.is_client_error() && !status.is_server_error() {
3075        let content = resp.text().await?;
3076        match content_type {
3077            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3078            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetEarnings200Response`"))),
3079            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetEarnings200Response`")))),
3080        }
3081    } else {
3082        let content = resp.text().await?;
3083        let entity: Option<GetEarningsError> = serde_json::from_str(&content).ok();
3084        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3085    }
3086}
3087
3088/// The earnings calendar endpoint provides a schedule of company earnings announcements for a specified date range. By default, it returns earnings data for the current day. Users can customize the date range using the `start_date` and `end_date` parameters to retrieve earnings information for specific periods. This endpoint is useful for tracking upcoming earnings reports and planning around key financial announcements.
3089pub async fn get_earnings_calendar(configuration: &configuration::Configuration, params: GetEarningsCalendarParams) -> Result<models::GetEarningsCalendar200Response, Error<GetEarningsCalendarError>> {
3090    // Extract parameters from params struct
3091    let p_query_exchange = params.exchange;
3092    let p_query_mic_code = params.mic_code;
3093    let p_query_country = params.country;
3094    let p_query_format = params.format;
3095    let p_query_delimiter = params.delimiter;
3096    let p_query_start_date = params.start_date;
3097    let p_query_end_date = params.end_date;
3098    let p_query_dp = params.dp;
3099
3100    let uri_str = format!("{}/earnings_calendar", configuration.base_path);
3101    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3102
3103    if let Some(ref param_value) = p_query_exchange {
3104        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
3105    }
3106    if let Some(ref param_value) = p_query_mic_code {
3107        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
3108    }
3109    if let Some(ref param_value) = p_query_country {
3110        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
3111    }
3112    if let Some(ref param_value) = p_query_format {
3113        req_builder = req_builder.query(&[("format", &serde_json::to_string(param_value)?)]);
3114    }
3115    if let Some(ref param_value) = p_query_delimiter {
3116        req_builder = req_builder.query(&[("delimiter", &param_value.to_string())]);
3117    }
3118    if let Some(ref param_value) = p_query_start_date {
3119        req_builder = req_builder.query(&[("start_date", &param_value.to_string())]);
3120    }
3121    if let Some(ref param_value) = p_query_end_date {
3122        req_builder = req_builder.query(&[("end_date", &param_value.to_string())]);
3123    }
3124    if let Some(ref param_value) = p_query_dp {
3125        req_builder = req_builder.query(&[("dp", &param_value.to_string())]);
3126    }
3127    if let Some(ref user_agent) = configuration.user_agent {
3128        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3129    }
3130    if let Some(ref apikey) = configuration.api_key {
3131        let key = apikey.key.clone();
3132        let value = match apikey.prefix {
3133            Some(ref prefix) => format!("{} {}", prefix, key),
3134            None => key,
3135        };
3136        req_builder = req_builder.header("Authorization", value);
3137    };
3138
3139    let req = req_builder.build()?;
3140    let resp = configuration.client.execute(req).await?;
3141
3142    let status = resp.status();
3143    let content_type = resp
3144        .headers()
3145        .get("content-type")
3146        .and_then(|v| v.to_str().ok())
3147        .unwrap_or("application/octet-stream");
3148    let content_type = super::ContentType::from(content_type);
3149
3150    if !status.is_client_error() && !status.is_server_error() {
3151        let content = resp.text().await?;
3152        match content_type {
3153            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3154            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetEarningsCalendar200Response`"))),
3155            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetEarningsCalendar200Response`")))),
3156        }
3157    } else {
3158        let content = resp.text().await?;
3159        let entity: Option<GetEarningsCalendarError> = serde_json::from_str(&content).ok();
3160        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3161    }
3162}
3163
3164/// The income statement endpoint provides detailed financial data on a company's income statement, including revenues, expenses, and net income for specified periods, either annually or quarterly. This endpoint is essential for retrieving comprehensive financial performance metrics of a company, allowing users to access historical and current financial results.
3165pub async fn get_income_statement(configuration: &configuration::Configuration, params: GetIncomeStatementParams) -> Result<models::GetIncomeStatement200Response, Error<GetIncomeStatementError>> {
3166    // Extract parameters from params struct
3167    let p_query_symbol = params.symbol;
3168    let p_query_figi = params.figi;
3169    let p_query_isin = params.isin;
3170    let p_query_cusip = params.cusip;
3171    let p_query_exchange = params.exchange;
3172    let p_query_mic_code = params.mic_code;
3173    let p_query_country = params.country;
3174    let p_query_period = params.period;
3175    let p_query_start_date = params.start_date;
3176    let p_query_end_date = params.end_date;
3177    let p_query_outputsize = params.outputsize;
3178
3179    let uri_str = format!("{}/income_statement", configuration.base_path);
3180    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3181
3182    if let Some(ref param_value) = p_query_symbol {
3183        req_builder = req_builder.query(&[("symbol", &param_value.to_string())]);
3184    }
3185    if let Some(ref param_value) = p_query_figi {
3186        req_builder = req_builder.query(&[("figi", &param_value.to_string())]);
3187    }
3188    if let Some(ref param_value) = p_query_isin {
3189        req_builder = req_builder.query(&[("isin", &param_value.to_string())]);
3190    }
3191    if let Some(ref param_value) = p_query_cusip {
3192        req_builder = req_builder.query(&[("cusip", &param_value.to_string())]);
3193    }
3194    if let Some(ref param_value) = p_query_exchange {
3195        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
3196    }
3197    if let Some(ref param_value) = p_query_mic_code {
3198        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
3199    }
3200    if let Some(ref param_value) = p_query_country {
3201        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
3202    }
3203    if let Some(ref param_value) = p_query_period {
3204        req_builder = req_builder.query(&[("period", &serde_json::to_string(param_value)?)]);
3205    }
3206    if let Some(ref param_value) = p_query_start_date {
3207        req_builder = req_builder.query(&[("start_date", &param_value.to_string())]);
3208    }
3209    if let Some(ref param_value) = p_query_end_date {
3210        req_builder = req_builder.query(&[("end_date", &param_value.to_string())]);
3211    }
3212    if let Some(ref param_value) = p_query_outputsize {
3213        req_builder = req_builder.query(&[("outputsize", &param_value.to_string())]);
3214    }
3215    if let Some(ref user_agent) = configuration.user_agent {
3216        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3217    }
3218    if let Some(ref apikey) = configuration.api_key {
3219        let key = apikey.key.clone();
3220        let value = match apikey.prefix {
3221            Some(ref prefix) => format!("{} {}", prefix, key),
3222            None => key,
3223        };
3224        req_builder = req_builder.header("Authorization", value);
3225    };
3226
3227    let req = req_builder.build()?;
3228    let resp = configuration.client.execute(req).await?;
3229
3230    let status = resp.status();
3231    let content_type = resp
3232        .headers()
3233        .get("content-type")
3234        .and_then(|v| v.to_str().ok())
3235        .unwrap_or("application/octet-stream");
3236    let content_type = super::ContentType::from(content_type);
3237
3238    if !status.is_client_error() && !status.is_server_error() {
3239        let content = resp.text().await?;
3240        match content_type {
3241            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3242            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetIncomeStatement200Response`"))),
3243            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetIncomeStatement200Response`")))),
3244        }
3245    } else {
3246        let content = resp.text().await?;
3247        let entity: Option<GetIncomeStatementError> = serde_json::from_str(&content).ok();
3248        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3249    }
3250}
3251
3252/// The income statement consolidated endpoint provides a company's raw income statement, detailing revenue, expenses, and net income for specified periods, either annually or quarterly. This data is essential for evaluating a company's financial performance over time, allowing users to access comprehensive financial results in a structured format.
3253pub async fn get_income_statement_consolidated(configuration: &configuration::Configuration, params: GetIncomeStatementConsolidatedParams) -> Result<models::GetIncomeStatementConsolidated200Response, Error<GetIncomeStatementConsolidatedError>> {
3254    // Extract parameters from params struct
3255    let p_query_symbol = params.symbol;
3256    let p_query_figi = params.figi;
3257    let p_query_isin = params.isin;
3258    let p_query_cusip = params.cusip;
3259    let p_query_exchange = params.exchange;
3260    let p_query_mic_code = params.mic_code;
3261    let p_query_country = params.country;
3262    let p_query_period = params.period;
3263    let p_query_start_date = params.start_date;
3264    let p_query_end_date = params.end_date;
3265    let p_query_outputsize = params.outputsize;
3266
3267    let uri_str = format!("{}/income_statement/consolidated", configuration.base_path);
3268    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3269
3270    if let Some(ref param_value) = p_query_symbol {
3271        req_builder = req_builder.query(&[("symbol", &param_value.to_string())]);
3272    }
3273    if let Some(ref param_value) = p_query_figi {
3274        req_builder = req_builder.query(&[("figi", &param_value.to_string())]);
3275    }
3276    if let Some(ref param_value) = p_query_isin {
3277        req_builder = req_builder.query(&[("isin", &param_value.to_string())]);
3278    }
3279    if let Some(ref param_value) = p_query_cusip {
3280        req_builder = req_builder.query(&[("cusip", &param_value.to_string())]);
3281    }
3282    if let Some(ref param_value) = p_query_exchange {
3283        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
3284    }
3285    if let Some(ref param_value) = p_query_mic_code {
3286        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
3287    }
3288    if let Some(ref param_value) = p_query_country {
3289        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
3290    }
3291    if let Some(ref param_value) = p_query_period {
3292        req_builder = req_builder.query(&[("period", &serde_json::to_string(param_value)?)]);
3293    }
3294    if let Some(ref param_value) = p_query_start_date {
3295        req_builder = req_builder.query(&[("start_date", &param_value.to_string())]);
3296    }
3297    if let Some(ref param_value) = p_query_end_date {
3298        req_builder = req_builder.query(&[("end_date", &param_value.to_string())]);
3299    }
3300    if let Some(ref param_value) = p_query_outputsize {
3301        req_builder = req_builder.query(&[("outputsize", &param_value.to_string())]);
3302    }
3303    if let Some(ref user_agent) = configuration.user_agent {
3304        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3305    }
3306    if let Some(ref apikey) = configuration.api_key {
3307        let key = apikey.key.clone();
3308        let value = match apikey.prefix {
3309            Some(ref prefix) => format!("{} {}", prefix, key),
3310            None => key,
3311        };
3312        req_builder = req_builder.header("Authorization", value);
3313    };
3314
3315    let req = req_builder.build()?;
3316    let resp = configuration.client.execute(req).await?;
3317
3318    let status = resp.status();
3319    let content_type = resp
3320        .headers()
3321        .get("content-type")
3322        .and_then(|v| v.to_str().ok())
3323        .unwrap_or("application/octet-stream");
3324    let content_type = super::ContentType::from(content_type);
3325
3326    if !status.is_client_error() && !status.is_server_error() {
3327        let content = resp.text().await?;
3328        match content_type {
3329            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3330            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetIncomeStatementConsolidated200Response`"))),
3331            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetIncomeStatementConsolidated200Response`")))),
3332        }
3333    } else {
3334        let content = resp.text().await?;
3335        let entity: Option<GetIncomeStatementConsolidatedError> = serde_json::from_str(&content).ok();
3336        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3337    }
3338}
3339
3340/// The IPO Calendar endpoint provides detailed information on initial public offerings (IPOs), including those that have occurred in the past, are happening today, or are scheduled for the future. Users can access data such as company names, IPO dates, and offering details, allowing them to track and monitor IPO activity efficiently.
3341pub async fn get_ipo_calendar(configuration: &configuration::Configuration, params: GetIpoCalendarParams) -> Result<std::collections::HashMap<String, Vec<models::GetIpoCalendar200ResponseValueInner>>, Error<GetIpoCalendarError>> {
3342    // Extract parameters from params struct
3343    let p_query_exchange = params.exchange;
3344    let p_query_mic_code = params.mic_code;
3345    let p_query_country = params.country;
3346    let p_query_start_date = params.start_date;
3347    let p_query_end_date = params.end_date;
3348
3349    let uri_str = format!("{}/ipo_calendar", configuration.base_path);
3350    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3351
3352    if let Some(ref param_value) = p_query_exchange {
3353        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
3354    }
3355    if let Some(ref param_value) = p_query_mic_code {
3356        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
3357    }
3358    if let Some(ref param_value) = p_query_country {
3359        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
3360    }
3361    if let Some(ref param_value) = p_query_start_date {
3362        req_builder = req_builder.query(&[("start_date", &param_value.to_string())]);
3363    }
3364    if let Some(ref param_value) = p_query_end_date {
3365        req_builder = req_builder.query(&[("end_date", &param_value.to_string())]);
3366    }
3367    if let Some(ref user_agent) = configuration.user_agent {
3368        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3369    }
3370    if let Some(ref apikey) = configuration.api_key {
3371        let key = apikey.key.clone();
3372        let value = match apikey.prefix {
3373            Some(ref prefix) => format!("{} {}", prefix, key),
3374            None => key,
3375        };
3376        req_builder = req_builder.header("Authorization", value);
3377    };
3378
3379    let req = req_builder.build()?;
3380    let resp = configuration.client.execute(req).await?;
3381
3382    let status = resp.status();
3383    let content_type = resp
3384        .headers()
3385        .get("content-type")
3386        .and_then(|v| v.to_str().ok())
3387        .unwrap_or("application/octet-stream");
3388    let content_type = super::ContentType::from(content_type);
3389
3390    if !status.is_client_error() && !status.is_server_error() {
3391        let content = resp.text().await?;
3392        match content_type {
3393            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3394            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap&lt;String, Vec&lt;models::GetIpoCalendar200ResponseValueInner&gt;&gt;`"))),
3395            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap&lt;String, Vec&lt;models::GetIpoCalendar200ResponseValueInner&gt;&gt;`")))),
3396        }
3397    } else {
3398        let content = resp.text().await?;
3399        let entity: Option<GetIpoCalendarError> = serde_json::from_str(&content).ok();
3400        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3401    }
3402}
3403
3404/// The key executives endpoint provides detailed information about a company's key executives identified by a specific stock symbol. It returns data such as names, titles, and roles of the executives, which can be useful for understanding the leadership structure of the company.
3405pub async fn get_key_executives(configuration: &configuration::Configuration, params: GetKeyExecutivesParams) -> Result<models::GetKeyExecutives200Response, Error<GetKeyExecutivesError>> {
3406    // Extract parameters from params struct
3407    let p_query_symbol = params.symbol;
3408    let p_query_figi = params.figi;
3409    let p_query_isin = params.isin;
3410    let p_query_cusip = params.cusip;
3411    let p_query_exchange = params.exchange;
3412    let p_query_mic_code = params.mic_code;
3413    let p_query_country = params.country;
3414
3415    let uri_str = format!("{}/key_executives", configuration.base_path);
3416    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3417
3418    if let Some(ref param_value) = p_query_symbol {
3419        req_builder = req_builder.query(&[("symbol", &param_value.to_string())]);
3420    }
3421    if let Some(ref param_value) = p_query_figi {
3422        req_builder = req_builder.query(&[("figi", &param_value.to_string())]);
3423    }
3424    if let Some(ref param_value) = p_query_isin {
3425        req_builder = req_builder.query(&[("isin", &param_value.to_string())]);
3426    }
3427    if let Some(ref param_value) = p_query_cusip {
3428        req_builder = req_builder.query(&[("cusip", &param_value.to_string())]);
3429    }
3430    if let Some(ref param_value) = p_query_exchange {
3431        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
3432    }
3433    if let Some(ref param_value) = p_query_mic_code {
3434        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
3435    }
3436    if let Some(ref param_value) = p_query_country {
3437        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
3438    }
3439    if let Some(ref user_agent) = configuration.user_agent {
3440        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3441    }
3442    if let Some(ref apikey) = configuration.api_key {
3443        let key = apikey.key.clone();
3444        let value = match apikey.prefix {
3445            Some(ref prefix) => format!("{} {}", prefix, key),
3446            None => key,
3447        };
3448        req_builder = req_builder.header("Authorization", value);
3449    };
3450
3451    let req = req_builder.build()?;
3452    let resp = configuration.client.execute(req).await?;
3453
3454    let status = resp.status();
3455    let content_type = resp
3456        .headers()
3457        .get("content-type")
3458        .and_then(|v| v.to_str().ok())
3459        .unwrap_or("application/octet-stream");
3460    let content_type = super::ContentType::from(content_type);
3461
3462    if !status.is_client_error() && !status.is_server_error() {
3463        let content = resp.text().await?;
3464        match content_type {
3465            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3466            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetKeyExecutives200Response`"))),
3467            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetKeyExecutives200Response`")))),
3468        }
3469    } else {
3470        let content = resp.text().await?;
3471        let entity: Option<GetKeyExecutivesError> = serde_json::from_str(&content).ok();
3472        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3473    }
3474}
3475
3476/// The last change endpoint provides the most recent updates to fundamental data for a specified dataset. It returns a timestamp indicating when the data was last modified, allowing users to efficiently manage API requests by only fetching new data when changes occur. This helps optimize data retrieval and reduce unnecessary API credit usage.
3477pub async fn get_last_changes(configuration: &configuration::Configuration, params: GetLastChangesParams) -> Result<models::GetLastChanges200Response, Error<GetLastChangesError>> {
3478    // Extract parameters from params struct
3479    let p_path_endpoint = params.endpoint;
3480    let p_query_start_date = params.start_date;
3481    let p_query_symbol = params.symbol;
3482    let p_query_exchange = params.exchange;
3483    let p_query_mic_code = params.mic_code;
3484    let p_query_country = params.country;
3485    let p_query_page = params.page;
3486    let p_query_outputsize = params.outputsize;
3487
3488    let uri_str = format!("{}/last_change/{endpoint}", configuration.base_path, endpoint=crate::apis::urlencode(p_path_endpoint));
3489    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3490
3491    if let Some(ref param_value) = p_query_start_date {
3492        req_builder = req_builder.query(&[("start_date", &param_value.to_string())]);
3493    }
3494    if let Some(ref param_value) = p_query_symbol {
3495        req_builder = req_builder.query(&[("symbol", &param_value.to_string())]);
3496    }
3497    if let Some(ref param_value) = p_query_exchange {
3498        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
3499    }
3500    if let Some(ref param_value) = p_query_mic_code {
3501        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
3502    }
3503    if let Some(ref param_value) = p_query_country {
3504        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
3505    }
3506    if let Some(ref param_value) = p_query_page {
3507        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
3508    }
3509    if let Some(ref param_value) = p_query_outputsize {
3510        req_builder = req_builder.query(&[("outputsize", &param_value.to_string())]);
3511    }
3512    if let Some(ref user_agent) = configuration.user_agent {
3513        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3514    }
3515    if let Some(ref apikey) = configuration.api_key {
3516        let key = apikey.key.clone();
3517        let value = match apikey.prefix {
3518            Some(ref prefix) => format!("{} {}", prefix, key),
3519            None => key,
3520        };
3521        req_builder = req_builder.header("Authorization", value);
3522    };
3523
3524    let req = req_builder.build()?;
3525    let resp = configuration.client.execute(req).await?;
3526
3527    let status = resp.status();
3528    let content_type = resp
3529        .headers()
3530        .get("content-type")
3531        .and_then(|v| v.to_str().ok())
3532        .unwrap_or("application/octet-stream");
3533    let content_type = super::ContentType::from(content_type);
3534
3535    if !status.is_client_error() && !status.is_server_error() {
3536        let content = resp.text().await?;
3537        match content_type {
3538            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3539            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetLastChanges200Response`"))),
3540            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetLastChanges200Response`")))),
3541        }
3542    } else {
3543        let content = resp.text().await?;
3544        let entity: Option<GetLastChangesError> = serde_json::from_str(&content).ok();
3545        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3546    }
3547}
3548
3549/// The logo endpoint provides the official logo image for a specified company, cryptocurrency, or forex pair. This endpoint is useful for integrating visual branding elements into financial applications, websites, or reports, ensuring that users can easily identify and associate the correct logo with the respective financial asset.
3550pub async fn get_logo(configuration: &configuration::Configuration, params: GetLogoParams) -> Result<models::GetLogo200Response, Error<GetLogoError>> {
3551    // Extract parameters from params struct
3552    let p_query_symbol = params.symbol;
3553    let p_query_exchange = params.exchange;
3554    let p_query_mic_code = params.mic_code;
3555    let p_query_country = params.country;
3556
3557    let uri_str = format!("{}/logo", configuration.base_path);
3558    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3559
3560    req_builder = req_builder.query(&[("symbol", &p_query_symbol.to_string())]);
3561    if let Some(ref param_value) = p_query_exchange {
3562        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
3563    }
3564    if let Some(ref param_value) = p_query_mic_code {
3565        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
3566    }
3567    if let Some(ref param_value) = p_query_country {
3568        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
3569    }
3570    if let Some(ref user_agent) = configuration.user_agent {
3571        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3572    }
3573    if let Some(ref apikey) = configuration.api_key {
3574        let key = apikey.key.clone();
3575        let value = match apikey.prefix {
3576            Some(ref prefix) => format!("{} {}", prefix, key),
3577            None => key,
3578        };
3579        req_builder = req_builder.header("Authorization", value);
3580    };
3581
3582    let req = req_builder.build()?;
3583    let resp = configuration.client.execute(req).await?;
3584
3585    let status = resp.status();
3586    let content_type = resp
3587        .headers()
3588        .get("content-type")
3589        .and_then(|v| v.to_str().ok())
3590        .unwrap_or("application/octet-stream");
3591    let content_type = super::ContentType::from(content_type);
3592
3593    if !status.is_client_error() && !status.is_server_error() {
3594        let content = resp.text().await?;
3595        match content_type {
3596            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3597            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetLogo200Response`"))),
3598            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetLogo200Response`")))),
3599        }
3600    } else {
3601        let content = resp.text().await?;
3602        let entity: Option<GetLogoError> = serde_json::from_str(&content).ok();
3603        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3604    }
3605}
3606
3607/// The Market Capitalization History endpoint provides historical data on a company's market capitalization over a specified time period. It returns a time series of market cap values, allowing users to track changes in a company's market value.
3608pub async fn get_market_cap(configuration: &configuration::Configuration, params: GetMarketCapParams) -> Result<models::GetMarketCap200Response, Error<GetMarketCapError>> {
3609    // Extract parameters from params struct
3610    let p_query_symbol = params.symbol;
3611    let p_query_figi = params.figi;
3612    let p_query_isin = params.isin;
3613    let p_query_cusip = params.cusip;
3614    let p_query_exchange = params.exchange;
3615    let p_query_mic_code = params.mic_code;
3616    let p_query_country = params.country;
3617    let p_query_start_date = params.start_date;
3618    let p_query_end_date = params.end_date;
3619    let p_query_page = params.page;
3620    let p_query_outputsize = params.outputsize;
3621
3622    let uri_str = format!("{}/market_cap", configuration.base_path);
3623    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3624
3625    if let Some(ref param_value) = p_query_symbol {
3626        req_builder = req_builder.query(&[("symbol", &param_value.to_string())]);
3627    }
3628    if let Some(ref param_value) = p_query_figi {
3629        req_builder = req_builder.query(&[("figi", &param_value.to_string())]);
3630    }
3631    if let Some(ref param_value) = p_query_isin {
3632        req_builder = req_builder.query(&[("isin", &param_value.to_string())]);
3633    }
3634    if let Some(ref param_value) = p_query_cusip {
3635        req_builder = req_builder.query(&[("cusip", &param_value.to_string())]);
3636    }
3637    if let Some(ref param_value) = p_query_exchange {
3638        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
3639    }
3640    if let Some(ref param_value) = p_query_mic_code {
3641        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
3642    }
3643    if let Some(ref param_value) = p_query_country {
3644        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
3645    }
3646    if let Some(ref param_value) = p_query_start_date {
3647        req_builder = req_builder.query(&[("start_date", &param_value.to_string())]);
3648    }
3649    if let Some(ref param_value) = p_query_end_date {
3650        req_builder = req_builder.query(&[("end_date", &param_value.to_string())]);
3651    }
3652    if let Some(ref param_value) = p_query_page {
3653        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
3654    }
3655    if let Some(ref param_value) = p_query_outputsize {
3656        req_builder = req_builder.query(&[("outputsize", &param_value.to_string())]);
3657    }
3658    if let Some(ref user_agent) = configuration.user_agent {
3659        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3660    }
3661    if let Some(ref apikey) = configuration.api_key {
3662        let key = apikey.key.clone();
3663        let value = match apikey.prefix {
3664            Some(ref prefix) => format!("{} {}", prefix, key),
3665            None => key,
3666        };
3667        req_builder = req_builder.header("Authorization", value);
3668    };
3669
3670    let req = req_builder.build()?;
3671    let resp = configuration.client.execute(req).await?;
3672
3673    let status = resp.status();
3674    let content_type = resp
3675        .headers()
3676        .get("content-type")
3677        .and_then(|v| v.to_str().ok())
3678        .unwrap_or("application/octet-stream");
3679    let content_type = super::ContentType::from(content_type);
3680
3681    if !status.is_client_error() && !status.is_server_error() {
3682        let content = resp.text().await?;
3683        match content_type {
3684            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3685            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetMarketCap200Response`"))),
3686            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetMarketCap200Response`")))),
3687        }
3688    } else {
3689        let content = resp.text().await?;
3690        let entity: Option<GetMarketCapError> = serde_json::from_str(&content).ok();
3691        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3692    }
3693}
3694
3695/// The profile endpoint provides detailed company information, including the company's name, industry, sector, CEO, headquarters location, and market capitalization. This data is useful for obtaining a comprehensive overview of a company's business and financial standing.
3696pub async fn get_profile(configuration: &configuration::Configuration, params: GetProfileParams) -> Result<models::GetProfile200Response, Error<GetProfileError>> {
3697    // Extract parameters from params struct
3698    let p_query_symbol = params.symbol;
3699    let p_query_figi = params.figi;
3700    let p_query_isin = params.isin;
3701    let p_query_cusip = params.cusip;
3702    let p_query_exchange = params.exchange;
3703    let p_query_mic_code = params.mic_code;
3704    let p_query_country = params.country;
3705
3706    let uri_str = format!("{}/profile", configuration.base_path);
3707    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3708
3709    if let Some(ref param_value) = p_query_symbol {
3710        req_builder = req_builder.query(&[("symbol", &param_value.to_string())]);
3711    }
3712    if let Some(ref param_value) = p_query_figi {
3713        req_builder = req_builder.query(&[("figi", &param_value.to_string())]);
3714    }
3715    if let Some(ref param_value) = p_query_isin {
3716        req_builder = req_builder.query(&[("isin", &param_value.to_string())]);
3717    }
3718    if let Some(ref param_value) = p_query_cusip {
3719        req_builder = req_builder.query(&[("cusip", &param_value.to_string())]);
3720    }
3721    if let Some(ref param_value) = p_query_exchange {
3722        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
3723    }
3724    if let Some(ref param_value) = p_query_mic_code {
3725        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
3726    }
3727    if let Some(ref param_value) = p_query_country {
3728        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
3729    }
3730    if let Some(ref user_agent) = configuration.user_agent {
3731        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3732    }
3733    if let Some(ref apikey) = configuration.api_key {
3734        let key = apikey.key.clone();
3735        let value = match apikey.prefix {
3736            Some(ref prefix) => format!("{} {}", prefix, key),
3737            None => key,
3738        };
3739        req_builder = req_builder.header("Authorization", value);
3740    };
3741
3742    let req = req_builder.build()?;
3743    let resp = configuration.client.execute(req).await?;
3744
3745    let status = resp.status();
3746    let content_type = resp
3747        .headers()
3748        .get("content-type")
3749        .and_then(|v| v.to_str().ok())
3750        .unwrap_or("application/octet-stream");
3751    let content_type = super::ContentType::from(content_type);
3752
3753    if !status.is_client_error() && !status.is_server_error() {
3754        let content = resp.text().await?;
3755        match content_type {
3756            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3757            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetProfile200Response`"))),
3758            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetProfile200Response`")))),
3759        }
3760    } else {
3761        let content = resp.text().await?;
3762        let entity: Option<GetProfileError> = serde_json::from_str(&content).ok();
3763        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3764    }
3765}
3766
3767/// The splits endpoint provides historical data on stock split events for a specified company. It returns details including the date of each split and the corresponding split factor.
3768pub async fn get_splits(configuration: &configuration::Configuration, params: GetSplitsParams) -> Result<models::GetSplits200Response, Error<GetSplitsError>> {
3769    // Extract parameters from params struct
3770    let p_query_symbol = params.symbol;
3771    let p_query_figi = params.figi;
3772    let p_query_isin = params.isin;
3773    let p_query_cusip = params.cusip;
3774    let p_query_exchange = params.exchange;
3775    let p_query_mic_code = params.mic_code;
3776    let p_query_country = params.country;
3777    let p_query_range = params.range;
3778    let p_query_start_date = params.start_date;
3779    let p_query_end_date = params.end_date;
3780
3781    let uri_str = format!("{}/splits", configuration.base_path);
3782    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3783
3784    if let Some(ref param_value) = p_query_symbol {
3785        req_builder = req_builder.query(&[("symbol", &param_value.to_string())]);
3786    }
3787    if let Some(ref param_value) = p_query_figi {
3788        req_builder = req_builder.query(&[("figi", &param_value.to_string())]);
3789    }
3790    if let Some(ref param_value) = p_query_isin {
3791        req_builder = req_builder.query(&[("isin", &param_value.to_string())]);
3792    }
3793    if let Some(ref param_value) = p_query_cusip {
3794        req_builder = req_builder.query(&[("cusip", &param_value.to_string())]);
3795    }
3796    if let Some(ref param_value) = p_query_exchange {
3797        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
3798    }
3799    if let Some(ref param_value) = p_query_mic_code {
3800        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
3801    }
3802    if let Some(ref param_value) = p_query_country {
3803        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
3804    }
3805    if let Some(ref param_value) = p_query_range {
3806        req_builder = req_builder.query(&[("range", &serde_json::to_string(param_value)?)]);
3807    }
3808    if let Some(ref param_value) = p_query_start_date {
3809        req_builder = req_builder.query(&[("start_date", &param_value.to_string())]);
3810    }
3811    if let Some(ref param_value) = p_query_end_date {
3812        req_builder = req_builder.query(&[("end_date", &param_value.to_string())]);
3813    }
3814    if let Some(ref user_agent) = configuration.user_agent {
3815        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3816    }
3817    if let Some(ref apikey) = configuration.api_key {
3818        let key = apikey.key.clone();
3819        let value = match apikey.prefix {
3820            Some(ref prefix) => format!("{} {}", prefix, key),
3821            None => key,
3822        };
3823        req_builder = req_builder.header("Authorization", value);
3824    };
3825
3826    let req = req_builder.build()?;
3827    let resp = configuration.client.execute(req).await?;
3828
3829    let status = resp.status();
3830    let content_type = resp
3831        .headers()
3832        .get("content-type")
3833        .and_then(|v| v.to_str().ok())
3834        .unwrap_or("application/octet-stream");
3835    let content_type = super::ContentType::from(content_type);
3836
3837    if !status.is_client_error() && !status.is_server_error() {
3838        let content = resp.text().await?;
3839        match content_type {
3840            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3841            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetSplits200Response`"))),
3842            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetSplits200Response`")))),
3843        }
3844    } else {
3845        let content = resp.text().await?;
3846        let entity: Option<GetSplitsError> = serde_json::from_str(&content).ok();
3847        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3848    }
3849}
3850
3851/// The splits calendar endpoint provides a detailed calendar of stock split events within a specified date range. By setting the `start_date` and `end_date` parameters, users can retrieve a list of upcoming or past stock splits, including the company name, split ratio, and effective date. This endpoint is useful for tracking changes in stock structure and planning investment strategies around these events.
3852pub async fn get_splits_calendar(configuration: &configuration::Configuration, params: GetSplitsCalendarParams) -> Result<Vec<models::SplitsCalendarResponseItem>, Error<GetSplitsCalendarError>> {
3853    // Extract parameters from params struct
3854    let p_query_symbol = params.symbol;
3855    let p_query_figi = params.figi;
3856    let p_query_isin = params.isin;
3857    let p_query_cusip = params.cusip;
3858    let p_query_exchange = params.exchange;
3859    let p_query_mic_code = params.mic_code;
3860    let p_query_country = params.country;
3861    let p_query_start_date = params.start_date;
3862    let p_query_end_date = params.end_date;
3863    let p_query_outputsize = params.outputsize;
3864    let p_query_page = params.page;
3865
3866    let uri_str = format!("{}/splits_calendar", configuration.base_path);
3867    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3868
3869    if let Some(ref param_value) = p_query_symbol {
3870        req_builder = req_builder.query(&[("symbol", &param_value.to_string())]);
3871    }
3872    if let Some(ref param_value) = p_query_figi {
3873        req_builder = req_builder.query(&[("figi", &param_value.to_string())]);
3874    }
3875    if let Some(ref param_value) = p_query_isin {
3876        req_builder = req_builder.query(&[("isin", &param_value.to_string())]);
3877    }
3878    if let Some(ref param_value) = p_query_cusip {
3879        req_builder = req_builder.query(&[("cusip", &param_value.to_string())]);
3880    }
3881    if let Some(ref param_value) = p_query_exchange {
3882        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
3883    }
3884    if let Some(ref param_value) = p_query_mic_code {
3885        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
3886    }
3887    if let Some(ref param_value) = p_query_country {
3888        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
3889    }
3890    if let Some(ref param_value) = p_query_start_date {
3891        req_builder = req_builder.query(&[("start_date", &param_value.to_string())]);
3892    }
3893    if let Some(ref param_value) = p_query_end_date {
3894        req_builder = req_builder.query(&[("end_date", &param_value.to_string())]);
3895    }
3896    if let Some(ref param_value) = p_query_outputsize {
3897        req_builder = req_builder.query(&[("outputsize", &param_value.to_string())]);
3898    }
3899    if let Some(ref param_value) = p_query_page {
3900        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
3901    }
3902    if let Some(ref user_agent) = configuration.user_agent {
3903        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3904    }
3905    if let Some(ref apikey) = configuration.api_key {
3906        let key = apikey.key.clone();
3907        let value = match apikey.prefix {
3908            Some(ref prefix) => format!("{} {}", prefix, key),
3909            None => key,
3910        };
3911        req_builder = req_builder.header("Authorization", value);
3912    };
3913
3914    let req = req_builder.build()?;
3915    let resp = configuration.client.execute(req).await?;
3916
3917    let status = resp.status();
3918    let content_type = resp
3919        .headers()
3920        .get("content-type")
3921        .and_then(|v| v.to_str().ok())
3922        .unwrap_or("application/octet-stream");
3923    let content_type = super::ContentType::from(content_type);
3924
3925    if !status.is_client_error() && !status.is_server_error() {
3926        let content = resp.text().await?;
3927        match content_type {
3928            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3929            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::SplitsCalendarResponseItem&gt;`"))),
3930            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::SplitsCalendarResponseItem&gt;`")))),
3931        }
3932    } else {
3933        let content = resp.text().await?;
3934        let entity: Option<GetSplitsCalendarError> = serde_json::from_str(&content).ok();
3935        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3936    }
3937}
3938
3939/// The statistics endpoint provides a comprehensive snapshot of a company's key financial statistics, including valuation metrics, revenue figures, profit margins, and other essential financial data. This endpoint is ideal for users seeking detailed insights into a company's financial health and performance metrics.
3940pub async fn get_statistics(configuration: &configuration::Configuration, params: GetStatisticsParams) -> Result<models::GetStatistics200Response, Error<GetStatisticsError>> {
3941    // Extract parameters from params struct
3942    let p_query_symbol = params.symbol;
3943    let p_query_figi = params.figi;
3944    let p_query_isin = params.isin;
3945    let p_query_cusip = params.cusip;
3946    let p_query_exchange = params.exchange;
3947    let p_query_mic_code = params.mic_code;
3948    let p_query_country = params.country;
3949
3950    let uri_str = format!("{}/statistics", configuration.base_path);
3951    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3952
3953    if let Some(ref param_value) = p_query_symbol {
3954        req_builder = req_builder.query(&[("symbol", &param_value.to_string())]);
3955    }
3956    if let Some(ref param_value) = p_query_figi {
3957        req_builder = req_builder.query(&[("figi", &param_value.to_string())]);
3958    }
3959    if let Some(ref param_value) = p_query_isin {
3960        req_builder = req_builder.query(&[("isin", &param_value.to_string())]);
3961    }
3962    if let Some(ref param_value) = p_query_cusip {
3963        req_builder = req_builder.query(&[("cusip", &param_value.to_string())]);
3964    }
3965    if let Some(ref param_value) = p_query_exchange {
3966        req_builder = req_builder.query(&[("exchange", &param_value.to_string())]);
3967    }
3968    if let Some(ref param_value) = p_query_mic_code {
3969        req_builder = req_builder.query(&[("mic_code", &param_value.to_string())]);
3970    }
3971    if let Some(ref param_value) = p_query_country {
3972        req_builder = req_builder.query(&[("country", &param_value.to_string())]);
3973    }
3974    if let Some(ref user_agent) = configuration.user_agent {
3975        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3976    }
3977    if let Some(ref apikey) = configuration.api_key {
3978        let key = apikey.key.clone();
3979        let value = match apikey.prefix {
3980            Some(ref prefix) => format!("{} {}", prefix, key),
3981            None => key,
3982        };
3983        req_builder = req_builder.header("Authorization", value);
3984    };
3985
3986    let req = req_builder.build()?;
3987    let resp = configuration.client.execute(req).await?;
3988
3989    let status = resp.status();
3990    let content_type = resp
3991        .headers()
3992        .get("content-type")
3993        .and_then(|v| v.to_str().ok())
3994        .unwrap_or("application/octet-stream");
3995    let content_type = super::ContentType::from(content_type);
3996
3997    if !status.is_client_error() && !status.is_server_error() {
3998        let content = resp.text().await?;
3999        match content_type {
4000            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4001            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetStatistics200Response`"))),
4002            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetStatistics200Response`")))),
4003        }
4004    } else {
4005        let content = resp.text().await?;
4006        let entity: Option<GetStatisticsError> = serde_json::from_str(&content).ok();
4007        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4008    }
4009}
4010