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