1use super::{configuration, ContentType, Error};
12use crate::{apis::ResponseContent, models};
13use reqwest;
14use serde::{de::Error as _, Deserialize, Serialize};
15
16#[derive(Clone, Debug, Default, Serialize, Deserialize)]
18pub struct GetBalanceSheetParams {
19 pub symbol: Option<String>,
21 pub figi: Option<String>,
23 pub isin: Option<String>,
25 pub cusip: Option<String>,
27 pub exchange: Option<String>,
29 pub mic_code: Option<String>,
31 pub country: Option<String>,
33 pub period: Option<String>,
35 pub start_date: Option<String>,
37 pub end_date: Option<String>,
39 pub outputsize: Option<i64>,
41}
42
43impl GetBalanceSheetParams {
44 pub fn builder() -> GetBalanceSheetParamsBuilder {
46 GetBalanceSheetParamsBuilder::default()
47 }
48}
49
50#[derive(Clone, Debug, Default)]
52pub struct GetBalanceSheetParamsBuilder {
53 symbol: Option<String>,
55 figi: Option<String>,
57 isin: Option<String>,
59 cusip: Option<String>,
61 exchange: Option<String>,
63 mic_code: Option<String>,
65 country: Option<String>,
67 period: Option<String>,
69 start_date: Option<String>,
71 end_date: Option<String>,
73 outputsize: Option<i64>,
75}
76
77impl GetBalanceSheetParamsBuilder {
78 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
80 self.symbol = Some(symbol.into());
81 self
82 }
83 pub fn figi(mut self, figi: impl Into<String>) -> Self {
85 self.figi = Some(figi.into());
86 self
87 }
88 pub fn isin(mut self, isin: impl Into<String>) -> Self {
90 self.isin = Some(isin.into());
91 self
92 }
93 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
95 self.cusip = Some(cusip.into());
96 self
97 }
98 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
100 self.exchange = Some(exchange.into());
101 self
102 }
103 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
105 self.mic_code = Some(mic_code.into());
106 self
107 }
108 pub fn country(mut self, country: impl Into<String>) -> Self {
110 self.country = Some(country.into());
111 self
112 }
113 pub fn period(mut self, period: impl Into<String>) -> Self {
115 self.period = Some(period.into());
116 self
117 }
118 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
120 self.start_date = Some(start_date.into());
121 self
122 }
123 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
125 self.end_date = Some(end_date.into());
126 self
127 }
128 pub fn outputsize(mut self, outputsize: i64) -> Self {
130 self.outputsize = Some(outputsize);
131 self
132 }
133
134 pub fn build(self) -> GetBalanceSheetParams {
136 GetBalanceSheetParams {
137 symbol: self.symbol,
138 figi: self.figi,
139 isin: self.isin,
140 cusip: self.cusip,
141 exchange: self.exchange,
142 mic_code: self.mic_code,
143 country: self.country,
144 period: self.period,
145 start_date: self.start_date,
146 end_date: self.end_date,
147 outputsize: self.outputsize,
148 }
149 }
150}
151
152#[derive(Clone, Debug, Default, Serialize, Deserialize)]
154pub struct GetBalanceSheetConsolidatedParams {
155 pub symbol: Option<String>,
157 pub figi: Option<String>,
159 pub isin: Option<String>,
161 pub cusip: Option<String>,
163 pub exchange: Option<String>,
165 pub mic_code: Option<String>,
167 pub country: Option<String>,
169 pub period: Option<String>,
171 pub start_date: Option<String>,
173 pub end_date: Option<String>,
175 pub outputsize: Option<i64>,
177}
178
179impl GetBalanceSheetConsolidatedParams {
180 pub fn builder() -> GetBalanceSheetConsolidatedParamsBuilder {
182 GetBalanceSheetConsolidatedParamsBuilder::default()
183 }
184}
185
186#[derive(Clone, Debug, Default)]
188pub struct GetBalanceSheetConsolidatedParamsBuilder {
189 symbol: Option<String>,
191 figi: Option<String>,
193 isin: Option<String>,
195 cusip: Option<String>,
197 exchange: Option<String>,
199 mic_code: Option<String>,
201 country: Option<String>,
203 period: Option<String>,
205 start_date: Option<String>,
207 end_date: Option<String>,
209 outputsize: Option<i64>,
211}
212
213impl GetBalanceSheetConsolidatedParamsBuilder {
214 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
216 self.symbol = Some(symbol.into());
217 self
218 }
219 pub fn figi(mut self, figi: impl Into<String>) -> Self {
221 self.figi = Some(figi.into());
222 self
223 }
224 pub fn isin(mut self, isin: impl Into<String>) -> Self {
226 self.isin = Some(isin.into());
227 self
228 }
229 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
231 self.cusip = Some(cusip.into());
232 self
233 }
234 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
236 self.exchange = Some(exchange.into());
237 self
238 }
239 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
241 self.mic_code = Some(mic_code.into());
242 self
243 }
244 pub fn country(mut self, country: impl Into<String>) -> Self {
246 self.country = Some(country.into());
247 self
248 }
249 pub fn period(mut self, period: impl Into<String>) -> Self {
251 self.period = Some(period.into());
252 self
253 }
254 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
256 self.start_date = Some(start_date.into());
257 self
258 }
259 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
261 self.end_date = Some(end_date.into());
262 self
263 }
264 pub fn outputsize(mut self, outputsize: i64) -> Self {
266 self.outputsize = Some(outputsize);
267 self
268 }
269
270 pub fn build(self) -> GetBalanceSheetConsolidatedParams {
272 GetBalanceSheetConsolidatedParams {
273 symbol: self.symbol,
274 figi: self.figi,
275 isin: self.isin,
276 cusip: self.cusip,
277 exchange: self.exchange,
278 mic_code: self.mic_code,
279 country: self.country,
280 period: self.period,
281 start_date: self.start_date,
282 end_date: self.end_date,
283 outputsize: self.outputsize,
284 }
285 }
286}
287
288#[derive(Clone, Debug, Default, Serialize, Deserialize)]
290pub struct GetCashFlowParams {
291 pub symbol: Option<String>,
293 pub figi: Option<String>,
295 pub isin: Option<String>,
297 pub cusip: Option<String>,
299 pub exchange: Option<String>,
301 pub mic_code: Option<String>,
303 pub country: Option<String>,
305 pub period: Option<String>,
307 pub start_date: Option<String>,
309 pub end_date: Option<String>,
311 pub outputsize: Option<i64>,
313}
314
315impl GetCashFlowParams {
316 pub fn builder() -> GetCashFlowParamsBuilder {
318 GetCashFlowParamsBuilder::default()
319 }
320}
321
322#[derive(Clone, Debug, Default)]
324pub struct GetCashFlowParamsBuilder {
325 symbol: Option<String>,
327 figi: Option<String>,
329 isin: Option<String>,
331 cusip: Option<String>,
333 exchange: Option<String>,
335 mic_code: Option<String>,
337 country: Option<String>,
339 period: Option<String>,
341 start_date: Option<String>,
343 end_date: Option<String>,
345 outputsize: Option<i64>,
347}
348
349impl GetCashFlowParamsBuilder {
350 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
352 self.symbol = Some(symbol.into());
353 self
354 }
355 pub fn figi(mut self, figi: impl Into<String>) -> Self {
357 self.figi = Some(figi.into());
358 self
359 }
360 pub fn isin(mut self, isin: impl Into<String>) -> Self {
362 self.isin = Some(isin.into());
363 self
364 }
365 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
367 self.cusip = Some(cusip.into());
368 self
369 }
370 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
372 self.exchange = Some(exchange.into());
373 self
374 }
375 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
377 self.mic_code = Some(mic_code.into());
378 self
379 }
380 pub fn country(mut self, country: impl Into<String>) -> Self {
382 self.country = Some(country.into());
383 self
384 }
385 pub fn period(mut self, period: impl Into<String>) -> Self {
387 self.period = Some(period.into());
388 self
389 }
390 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
392 self.start_date = Some(start_date.into());
393 self
394 }
395 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
397 self.end_date = Some(end_date.into());
398 self
399 }
400 pub fn outputsize(mut self, outputsize: i64) -> Self {
402 self.outputsize = Some(outputsize);
403 self
404 }
405
406 pub fn build(self) -> GetCashFlowParams {
408 GetCashFlowParams {
409 symbol: self.symbol,
410 figi: self.figi,
411 isin: self.isin,
412 cusip: self.cusip,
413 exchange: self.exchange,
414 mic_code: self.mic_code,
415 country: self.country,
416 period: self.period,
417 start_date: self.start_date,
418 end_date: self.end_date,
419 outputsize: self.outputsize,
420 }
421 }
422}
423
424#[derive(Clone, Debug, Default, Serialize, Deserialize)]
426pub struct GetCashFlowConsolidatedParams {
427 pub symbol: Option<String>,
429 pub figi: Option<String>,
431 pub isin: Option<String>,
433 pub cusip: Option<String>,
435 pub exchange: Option<String>,
437 pub mic_code: Option<String>,
439 pub country: Option<String>,
441 pub period: Option<String>,
443 pub start_date: Option<String>,
445 pub end_date: Option<String>,
447 pub outputsize: Option<i64>,
449}
450
451impl GetCashFlowConsolidatedParams {
452 pub fn builder() -> GetCashFlowConsolidatedParamsBuilder {
454 GetCashFlowConsolidatedParamsBuilder::default()
455 }
456}
457
458#[derive(Clone, Debug, Default)]
460pub struct GetCashFlowConsolidatedParamsBuilder {
461 symbol: Option<String>,
463 figi: Option<String>,
465 isin: Option<String>,
467 cusip: Option<String>,
469 exchange: Option<String>,
471 mic_code: Option<String>,
473 country: Option<String>,
475 period: Option<String>,
477 start_date: Option<String>,
479 end_date: Option<String>,
481 outputsize: Option<i64>,
483}
484
485impl GetCashFlowConsolidatedParamsBuilder {
486 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
488 self.symbol = Some(symbol.into());
489 self
490 }
491 pub fn figi(mut self, figi: impl Into<String>) -> Self {
493 self.figi = Some(figi.into());
494 self
495 }
496 pub fn isin(mut self, isin: impl Into<String>) -> Self {
498 self.isin = Some(isin.into());
499 self
500 }
501 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
503 self.cusip = Some(cusip.into());
504 self
505 }
506 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
508 self.exchange = Some(exchange.into());
509 self
510 }
511 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
513 self.mic_code = Some(mic_code.into());
514 self
515 }
516 pub fn country(mut self, country: impl Into<String>) -> Self {
518 self.country = Some(country.into());
519 self
520 }
521 pub fn period(mut self, period: impl Into<String>) -> Self {
523 self.period = Some(period.into());
524 self
525 }
526 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
528 self.start_date = Some(start_date.into());
529 self
530 }
531 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
533 self.end_date = Some(end_date.into());
534 self
535 }
536 pub fn outputsize(mut self, outputsize: i64) -> Self {
538 self.outputsize = Some(outputsize);
539 self
540 }
541
542 pub fn build(self) -> GetCashFlowConsolidatedParams {
544 GetCashFlowConsolidatedParams {
545 symbol: self.symbol,
546 figi: self.figi,
547 isin: self.isin,
548 cusip: self.cusip,
549 exchange: self.exchange,
550 mic_code: self.mic_code,
551 country: self.country,
552 period: self.period,
553 start_date: self.start_date,
554 end_date: self.end_date,
555 outputsize: self.outputsize,
556 }
557 }
558}
559
560#[derive(Clone, Debug, Default, Serialize, Deserialize)]
562pub struct GetDividendsParams {
563 pub symbol: Option<String>,
565 pub figi: Option<String>,
567 pub isin: Option<String>,
569 pub cusip: Option<String>,
571 pub exchange: Option<String>,
573 pub mic_code: Option<String>,
575 pub country: Option<String>,
577 pub range: Option<String>,
579 pub start_date: Option<String>,
581 pub end_date: Option<String>,
583 pub adjust: Option<bool>,
585}
586
587impl GetDividendsParams {
588 pub fn builder() -> GetDividendsParamsBuilder {
590 GetDividendsParamsBuilder::default()
591 }
592}
593
594#[derive(Clone, Debug, Default)]
596pub struct GetDividendsParamsBuilder {
597 symbol: Option<String>,
599 figi: Option<String>,
601 isin: Option<String>,
603 cusip: Option<String>,
605 exchange: Option<String>,
607 mic_code: Option<String>,
609 country: Option<String>,
611 range: Option<String>,
613 start_date: Option<String>,
615 end_date: Option<String>,
617 adjust: Option<bool>,
619}
620
621impl GetDividendsParamsBuilder {
622 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
624 self.symbol = Some(symbol.into());
625 self
626 }
627 pub fn figi(mut self, figi: impl Into<String>) -> Self {
629 self.figi = Some(figi.into());
630 self
631 }
632 pub fn isin(mut self, isin: impl Into<String>) -> Self {
634 self.isin = Some(isin.into());
635 self
636 }
637 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
639 self.cusip = Some(cusip.into());
640 self
641 }
642 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
644 self.exchange = Some(exchange.into());
645 self
646 }
647 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
649 self.mic_code = Some(mic_code.into());
650 self
651 }
652 pub fn country(mut self, country: impl Into<String>) -> Self {
654 self.country = Some(country.into());
655 self
656 }
657 pub fn range(mut self, range: impl Into<String>) -> Self {
659 self.range = Some(range.into());
660 self
661 }
662 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
664 self.start_date = Some(start_date.into());
665 self
666 }
667 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
669 self.end_date = Some(end_date.into());
670 self
671 }
672 pub fn adjust(mut self, adjust: bool) -> Self {
674 self.adjust = Some(adjust);
675 self
676 }
677
678 pub fn build(self) -> GetDividendsParams {
680 GetDividendsParams {
681 symbol: self.symbol,
682 figi: self.figi,
683 isin: self.isin,
684 cusip: self.cusip,
685 exchange: self.exchange,
686 mic_code: self.mic_code,
687 country: self.country,
688 range: self.range,
689 start_date: self.start_date,
690 end_date: self.end_date,
691 adjust: self.adjust,
692 }
693 }
694}
695
696#[derive(Clone, Debug, Default, Serialize, Deserialize)]
698pub struct GetDividendsCalendarParams {
699 pub symbol: Option<String>,
701 pub figi: Option<String>,
703 pub isin: Option<String>,
705 pub cusip: Option<String>,
707 pub exchange: Option<String>,
709 pub mic_code: Option<String>,
711 pub country: Option<String>,
713 pub start_date: Option<String>,
715 pub end_date: Option<String>,
717 pub outputsize: Option<i64>,
719 pub page: Option<i64>,
721}
722
723impl GetDividendsCalendarParams {
724 pub fn builder() -> GetDividendsCalendarParamsBuilder {
726 GetDividendsCalendarParamsBuilder::default()
727 }
728}
729
730#[derive(Clone, Debug, Default)]
732pub struct GetDividendsCalendarParamsBuilder {
733 symbol: Option<String>,
735 figi: Option<String>,
737 isin: Option<String>,
739 cusip: Option<String>,
741 exchange: Option<String>,
743 mic_code: Option<String>,
745 country: Option<String>,
747 start_date: Option<String>,
749 end_date: Option<String>,
751 outputsize: Option<i64>,
753 page: Option<i64>,
755}
756
757impl GetDividendsCalendarParamsBuilder {
758 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
760 self.symbol = Some(symbol.into());
761 self
762 }
763 pub fn figi(mut self, figi: impl Into<String>) -> Self {
765 self.figi = Some(figi.into());
766 self
767 }
768 pub fn isin(mut self, isin: impl Into<String>) -> Self {
770 self.isin = Some(isin.into());
771 self
772 }
773 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
775 self.cusip = Some(cusip.into());
776 self
777 }
778 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
780 self.exchange = Some(exchange.into());
781 self
782 }
783 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
785 self.mic_code = Some(mic_code.into());
786 self
787 }
788 pub fn country(mut self, country: impl Into<String>) -> Self {
790 self.country = Some(country.into());
791 self
792 }
793 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
795 self.start_date = Some(start_date.into());
796 self
797 }
798 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
800 self.end_date = Some(end_date.into());
801 self
802 }
803 pub fn outputsize(mut self, outputsize: i64) -> Self {
805 self.outputsize = Some(outputsize);
806 self
807 }
808 pub fn page(mut self, page: i64) -> Self {
810 self.page = Some(page);
811 self
812 }
813
814 pub fn build(self) -> GetDividendsCalendarParams {
816 GetDividendsCalendarParams {
817 symbol: self.symbol,
818 figi: self.figi,
819 isin: self.isin,
820 cusip: self.cusip,
821 exchange: self.exchange,
822 mic_code: self.mic_code,
823 country: self.country,
824 start_date: self.start_date,
825 end_date: self.end_date,
826 outputsize: self.outputsize,
827 page: self.page,
828 }
829 }
830}
831
832#[derive(Clone, Debug, Default, Serialize, Deserialize)]
834pub struct GetEarningsParams {
835 pub symbol: Option<String>,
837 pub figi: Option<String>,
839 pub isin: Option<String>,
841 pub cusip: Option<String>,
843 pub exchange: Option<String>,
845 pub mic_code: Option<String>,
847 pub country: Option<String>,
849 pub r#type: Option<String>,
851 pub period: Option<String>,
853 pub outputsize: Option<i64>,
855 pub format: Option<String>,
857 pub delimiter: Option<String>,
859 pub start_date: Option<String>,
861 pub end_date: Option<String>,
863 pub dp: Option<i64>,
865}
866
867impl GetEarningsParams {
868 pub fn builder() -> GetEarningsParamsBuilder {
870 GetEarningsParamsBuilder::default()
871 }
872}
873
874#[derive(Clone, Debug, Default)]
876pub struct GetEarningsParamsBuilder {
877 symbol: Option<String>,
879 figi: Option<String>,
881 isin: Option<String>,
883 cusip: Option<String>,
885 exchange: Option<String>,
887 mic_code: Option<String>,
889 country: Option<String>,
891 r#type: Option<String>,
893 period: Option<String>,
895 outputsize: Option<i64>,
897 format: Option<String>,
899 delimiter: Option<String>,
901 start_date: Option<String>,
903 end_date: Option<String>,
905 dp: Option<i64>,
907}
908
909impl GetEarningsParamsBuilder {
910 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
912 self.symbol = Some(symbol.into());
913 self
914 }
915 pub fn figi(mut self, figi: impl Into<String>) -> Self {
917 self.figi = Some(figi.into());
918 self
919 }
920 pub fn isin(mut self, isin: impl Into<String>) -> Self {
922 self.isin = Some(isin.into());
923 self
924 }
925 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
927 self.cusip = Some(cusip.into());
928 self
929 }
930 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
932 self.exchange = Some(exchange.into());
933 self
934 }
935 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
937 self.mic_code = Some(mic_code.into());
938 self
939 }
940 pub fn country(mut self, country: impl Into<String>) -> Self {
942 self.country = Some(country.into());
943 self
944 }
945 pub fn r#type(mut self, r#type: impl Into<String>) -> Self {
947 self.r#type = Some(r#type.into());
948 self
949 }
950 pub fn period(mut self, period: impl Into<String>) -> Self {
952 self.period = Some(period.into());
953 self
954 }
955 pub fn outputsize(mut self, outputsize: i64) -> Self {
957 self.outputsize = Some(outputsize);
958 self
959 }
960 pub fn format(mut self, format: impl Into<String>) -> Self {
962 self.format = Some(format.into());
963 self
964 }
965 pub fn delimiter(mut self, delimiter: impl Into<String>) -> Self {
967 self.delimiter = Some(delimiter.into());
968 self
969 }
970 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
972 self.start_date = Some(start_date.into());
973 self
974 }
975 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
977 self.end_date = Some(end_date.into());
978 self
979 }
980 pub fn dp(mut self, dp: i64) -> Self {
982 self.dp = Some(dp);
983 self
984 }
985
986 pub fn build(self) -> GetEarningsParams {
988 GetEarningsParams {
989 symbol: self.symbol,
990 figi: self.figi,
991 isin: self.isin,
992 cusip: self.cusip,
993 exchange: self.exchange,
994 mic_code: self.mic_code,
995 country: self.country,
996 r#type: self.r#type,
997 period: self.period,
998 outputsize: self.outputsize,
999 format: self.format,
1000 delimiter: self.delimiter,
1001 start_date: self.start_date,
1002 end_date: self.end_date,
1003 dp: self.dp,
1004 }
1005 }
1006}
1007
1008#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1010pub struct GetEarningsCalendarParams {
1011 pub exchange: Option<String>,
1013 pub mic_code: Option<String>,
1015 pub country: Option<String>,
1017 pub format: Option<String>,
1019 pub delimiter: Option<String>,
1021 pub start_date: Option<String>,
1023 pub end_date: Option<String>,
1025 pub dp: Option<i64>,
1027}
1028
1029impl GetEarningsCalendarParams {
1030 pub fn builder() -> GetEarningsCalendarParamsBuilder {
1032 GetEarningsCalendarParamsBuilder::default()
1033 }
1034}
1035
1036#[derive(Clone, Debug, Default)]
1038pub struct GetEarningsCalendarParamsBuilder {
1039 exchange: Option<String>,
1041 mic_code: Option<String>,
1043 country: Option<String>,
1045 format: Option<String>,
1047 delimiter: Option<String>,
1049 start_date: Option<String>,
1051 end_date: Option<String>,
1053 dp: Option<i64>,
1055}
1056
1057impl GetEarningsCalendarParamsBuilder {
1058 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1060 self.exchange = Some(exchange.into());
1061 self
1062 }
1063 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1065 self.mic_code = Some(mic_code.into());
1066 self
1067 }
1068 pub fn country(mut self, country: impl Into<String>) -> Self {
1070 self.country = Some(country.into());
1071 self
1072 }
1073 pub fn format(mut self, format: impl Into<String>) -> Self {
1075 self.format = Some(format.into());
1076 self
1077 }
1078 pub fn delimiter(mut self, delimiter: impl Into<String>) -> Self {
1080 self.delimiter = Some(delimiter.into());
1081 self
1082 }
1083 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1085 self.start_date = Some(start_date.into());
1086 self
1087 }
1088 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
1090 self.end_date = Some(end_date.into());
1091 self
1092 }
1093 pub fn dp(mut self, dp: i64) -> Self {
1095 self.dp = Some(dp);
1096 self
1097 }
1098
1099 pub fn build(self) -> GetEarningsCalendarParams {
1101 GetEarningsCalendarParams {
1102 exchange: self.exchange,
1103 mic_code: self.mic_code,
1104 country: self.country,
1105 format: self.format,
1106 delimiter: self.delimiter,
1107 start_date: self.start_date,
1108 end_date: self.end_date,
1109 dp: self.dp,
1110 }
1111 }
1112}
1113
1114#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1116pub struct GetIncomeStatementParams {
1117 pub symbol: Option<String>,
1119 pub figi: Option<String>,
1121 pub isin: Option<String>,
1123 pub cusip: Option<String>,
1125 pub exchange: Option<String>,
1127 pub mic_code: Option<String>,
1129 pub country: Option<String>,
1131 pub period: Option<String>,
1133 pub start_date: Option<String>,
1135 pub end_date: Option<String>,
1137 pub outputsize: Option<i64>,
1139}
1140
1141impl GetIncomeStatementParams {
1142 pub fn builder() -> GetIncomeStatementParamsBuilder {
1144 GetIncomeStatementParamsBuilder::default()
1145 }
1146}
1147
1148#[derive(Clone, Debug, Default)]
1150pub struct GetIncomeStatementParamsBuilder {
1151 symbol: Option<String>,
1153 figi: Option<String>,
1155 isin: Option<String>,
1157 cusip: Option<String>,
1159 exchange: Option<String>,
1161 mic_code: Option<String>,
1163 country: Option<String>,
1165 period: Option<String>,
1167 start_date: Option<String>,
1169 end_date: Option<String>,
1171 outputsize: Option<i64>,
1173}
1174
1175impl GetIncomeStatementParamsBuilder {
1176 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1178 self.symbol = Some(symbol.into());
1179 self
1180 }
1181 pub fn figi(mut self, figi: impl Into<String>) -> Self {
1183 self.figi = Some(figi.into());
1184 self
1185 }
1186 pub fn isin(mut self, isin: impl Into<String>) -> Self {
1188 self.isin = Some(isin.into());
1189 self
1190 }
1191 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
1193 self.cusip = Some(cusip.into());
1194 self
1195 }
1196 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1198 self.exchange = Some(exchange.into());
1199 self
1200 }
1201 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1203 self.mic_code = Some(mic_code.into());
1204 self
1205 }
1206 pub fn country(mut self, country: impl Into<String>) -> Self {
1208 self.country = Some(country.into());
1209 self
1210 }
1211 pub fn period(mut self, period: impl Into<String>) -> Self {
1213 self.period = Some(period.into());
1214 self
1215 }
1216 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1218 self.start_date = Some(start_date.into());
1219 self
1220 }
1221 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
1223 self.end_date = Some(end_date.into());
1224 self
1225 }
1226 pub fn outputsize(mut self, outputsize: i64) -> Self {
1228 self.outputsize = Some(outputsize);
1229 self
1230 }
1231
1232 pub fn build(self) -> GetIncomeStatementParams {
1234 GetIncomeStatementParams {
1235 symbol: self.symbol,
1236 figi: self.figi,
1237 isin: self.isin,
1238 cusip: self.cusip,
1239 exchange: self.exchange,
1240 mic_code: self.mic_code,
1241 country: self.country,
1242 period: self.period,
1243 start_date: self.start_date,
1244 end_date: self.end_date,
1245 outputsize: self.outputsize,
1246 }
1247 }
1248}
1249
1250#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1252pub struct GetIncomeStatementConsolidatedParams {
1253 pub symbol: Option<String>,
1255 pub figi: Option<String>,
1257 pub isin: Option<String>,
1259 pub cusip: Option<String>,
1261 pub exchange: Option<String>,
1263 pub mic_code: Option<String>,
1265 pub country: Option<String>,
1267 pub period: Option<String>,
1269 pub start_date: Option<String>,
1271 pub end_date: Option<String>,
1273 pub outputsize: Option<i64>,
1275}
1276
1277impl GetIncomeStatementConsolidatedParams {
1278 pub fn builder() -> GetIncomeStatementConsolidatedParamsBuilder {
1280 GetIncomeStatementConsolidatedParamsBuilder::default()
1281 }
1282}
1283
1284#[derive(Clone, Debug, Default)]
1286pub struct GetIncomeStatementConsolidatedParamsBuilder {
1287 symbol: Option<String>,
1289 figi: Option<String>,
1291 isin: Option<String>,
1293 cusip: Option<String>,
1295 exchange: Option<String>,
1297 mic_code: Option<String>,
1299 country: Option<String>,
1301 period: Option<String>,
1303 start_date: Option<String>,
1305 end_date: Option<String>,
1307 outputsize: Option<i64>,
1309}
1310
1311impl GetIncomeStatementConsolidatedParamsBuilder {
1312 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1314 self.symbol = Some(symbol.into());
1315 self
1316 }
1317 pub fn figi(mut self, figi: impl Into<String>) -> Self {
1319 self.figi = Some(figi.into());
1320 self
1321 }
1322 pub fn isin(mut self, isin: impl Into<String>) -> Self {
1324 self.isin = Some(isin.into());
1325 self
1326 }
1327 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
1329 self.cusip = Some(cusip.into());
1330 self
1331 }
1332 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1334 self.exchange = Some(exchange.into());
1335 self
1336 }
1337 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1339 self.mic_code = Some(mic_code.into());
1340 self
1341 }
1342 pub fn country(mut self, country: impl Into<String>) -> Self {
1344 self.country = Some(country.into());
1345 self
1346 }
1347 pub fn period(mut self, period: impl Into<String>) -> Self {
1349 self.period = Some(period.into());
1350 self
1351 }
1352 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1354 self.start_date = Some(start_date.into());
1355 self
1356 }
1357 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
1359 self.end_date = Some(end_date.into());
1360 self
1361 }
1362 pub fn outputsize(mut self, outputsize: i64) -> Self {
1364 self.outputsize = Some(outputsize);
1365 self
1366 }
1367
1368 pub fn build(self) -> GetIncomeStatementConsolidatedParams {
1370 GetIncomeStatementConsolidatedParams {
1371 symbol: self.symbol,
1372 figi: self.figi,
1373 isin: self.isin,
1374 cusip: self.cusip,
1375 exchange: self.exchange,
1376 mic_code: self.mic_code,
1377 country: self.country,
1378 period: self.period,
1379 start_date: self.start_date,
1380 end_date: self.end_date,
1381 outputsize: self.outputsize,
1382 }
1383 }
1384}
1385
1386#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1388pub struct GetIpoCalendarParams {
1389 pub exchange: Option<String>,
1391 pub mic_code: Option<String>,
1393 pub country: Option<String>,
1395 pub start_date: Option<String>,
1397 pub end_date: Option<String>,
1399}
1400
1401impl GetIpoCalendarParams {
1402 pub fn builder() -> GetIpoCalendarParamsBuilder {
1404 GetIpoCalendarParamsBuilder::default()
1405 }
1406}
1407
1408#[derive(Clone, Debug, Default)]
1410pub struct GetIpoCalendarParamsBuilder {
1411 exchange: Option<String>,
1413 mic_code: Option<String>,
1415 country: Option<String>,
1417 start_date: Option<String>,
1419 end_date: Option<String>,
1421}
1422
1423impl GetIpoCalendarParamsBuilder {
1424 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1426 self.exchange = Some(exchange.into());
1427 self
1428 }
1429 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1431 self.mic_code = Some(mic_code.into());
1432 self
1433 }
1434 pub fn country(mut self, country: impl Into<String>) -> Self {
1436 self.country = Some(country.into());
1437 self
1438 }
1439 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1441 self.start_date = Some(start_date.into());
1442 self
1443 }
1444 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
1446 self.end_date = Some(end_date.into());
1447 self
1448 }
1449
1450 pub fn build(self) -> GetIpoCalendarParams {
1452 GetIpoCalendarParams {
1453 exchange: self.exchange,
1454 mic_code: self.mic_code,
1455 country: self.country,
1456 start_date: self.start_date,
1457 end_date: self.end_date,
1458 }
1459 }
1460}
1461
1462#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1464pub struct GetKeyExecutivesParams {
1465 pub symbol: Option<String>,
1467 pub figi: Option<String>,
1469 pub isin: Option<String>,
1471 pub cusip: Option<String>,
1473 pub exchange: Option<String>,
1475 pub mic_code: Option<String>,
1477 pub country: Option<String>,
1479}
1480
1481impl GetKeyExecutivesParams {
1482 pub fn builder() -> GetKeyExecutivesParamsBuilder {
1484 GetKeyExecutivesParamsBuilder::default()
1485 }
1486}
1487
1488#[derive(Clone, Debug, Default)]
1490pub struct GetKeyExecutivesParamsBuilder {
1491 symbol: Option<String>,
1493 figi: Option<String>,
1495 isin: Option<String>,
1497 cusip: Option<String>,
1499 exchange: Option<String>,
1501 mic_code: Option<String>,
1503 country: Option<String>,
1505}
1506
1507impl GetKeyExecutivesParamsBuilder {
1508 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1510 self.symbol = Some(symbol.into());
1511 self
1512 }
1513 pub fn figi(mut self, figi: impl Into<String>) -> Self {
1515 self.figi = Some(figi.into());
1516 self
1517 }
1518 pub fn isin(mut self, isin: impl Into<String>) -> Self {
1520 self.isin = Some(isin.into());
1521 self
1522 }
1523 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
1525 self.cusip = Some(cusip.into());
1526 self
1527 }
1528 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1530 self.exchange = Some(exchange.into());
1531 self
1532 }
1533 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1535 self.mic_code = Some(mic_code.into());
1536 self
1537 }
1538 pub fn country(mut self, country: impl Into<String>) -> Self {
1540 self.country = Some(country.into());
1541 self
1542 }
1543
1544 pub fn build(self) -> GetKeyExecutivesParams {
1546 GetKeyExecutivesParams {
1547 symbol: self.symbol,
1548 figi: self.figi,
1549 isin: self.isin,
1550 cusip: self.cusip,
1551 exchange: self.exchange,
1552 mic_code: self.mic_code,
1553 country: self.country,
1554 }
1555 }
1556}
1557
1558#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1560pub struct GetLastChangesParams {
1561 pub endpoint: String,
1563 pub start_date: Option<String>,
1565 pub symbol: Option<String>,
1567 pub exchange: Option<String>,
1569 pub mic_code: Option<String>,
1571 pub country: Option<String>,
1573 pub page: Option<i64>,
1575 pub outputsize: Option<i64>,
1577}
1578
1579impl GetLastChangesParams {
1580 pub fn builder() -> GetLastChangesParamsBuilder {
1582 GetLastChangesParamsBuilder::default()
1583 }
1584}
1585
1586#[derive(Clone, Debug, Default)]
1588pub struct GetLastChangesParamsBuilder {
1589 endpoint: String,
1591 start_date: Option<String>,
1593 symbol: Option<String>,
1595 exchange: Option<String>,
1597 mic_code: Option<String>,
1599 country: Option<String>,
1601 page: Option<i64>,
1603 outputsize: Option<i64>,
1605}
1606
1607impl GetLastChangesParamsBuilder {
1608 pub fn endpoint(mut self, endpoint: impl Into<String>) -> Self {
1610 self.endpoint = endpoint.into();
1611 self
1612 }
1613 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1615 self.start_date = Some(start_date.into());
1616 self
1617 }
1618 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1620 self.symbol = Some(symbol.into());
1621 self
1622 }
1623 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1625 self.exchange = Some(exchange.into());
1626 self
1627 }
1628 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1630 self.mic_code = Some(mic_code.into());
1631 self
1632 }
1633 pub fn country(mut self, country: impl Into<String>) -> Self {
1635 self.country = Some(country.into());
1636 self
1637 }
1638 pub fn page(mut self, page: i64) -> Self {
1640 self.page = Some(page);
1641 self
1642 }
1643 pub fn outputsize(mut self, outputsize: i64) -> Self {
1645 self.outputsize = Some(outputsize);
1646 self
1647 }
1648
1649 pub fn build(self) -> GetLastChangesParams {
1651 GetLastChangesParams {
1652 endpoint: self.endpoint,
1653 start_date: self.start_date,
1654 symbol: self.symbol,
1655 exchange: self.exchange,
1656 mic_code: self.mic_code,
1657 country: self.country,
1658 page: self.page,
1659 outputsize: self.outputsize,
1660 }
1661 }
1662}
1663
1664#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1666pub struct GetLogoParams {
1667 pub symbol: String,
1669 pub exchange: Option<String>,
1671 pub mic_code: Option<String>,
1673 pub country: Option<String>,
1675}
1676
1677impl GetLogoParams {
1678 pub fn builder() -> GetLogoParamsBuilder {
1680 GetLogoParamsBuilder::default()
1681 }
1682}
1683
1684#[derive(Clone, Debug, Default)]
1686pub struct GetLogoParamsBuilder {
1687 symbol: String,
1689 exchange: Option<String>,
1691 mic_code: Option<String>,
1693 country: Option<String>,
1695}
1696
1697impl GetLogoParamsBuilder {
1698 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1700 self.symbol = symbol.into();
1701 self
1702 }
1703 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1705 self.exchange = Some(exchange.into());
1706 self
1707 }
1708 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1710 self.mic_code = Some(mic_code.into());
1711 self
1712 }
1713 pub fn country(mut self, country: impl Into<String>) -> Self {
1715 self.country = Some(country.into());
1716 self
1717 }
1718
1719 pub fn build(self) -> GetLogoParams {
1721 GetLogoParams {
1722 symbol: self.symbol,
1723 exchange: self.exchange,
1724 mic_code: self.mic_code,
1725 country: self.country,
1726 }
1727 }
1728}
1729
1730#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1732pub struct GetMarketCapParams {
1733 pub symbol: Option<String>,
1735 pub figi: Option<String>,
1737 pub isin: Option<String>,
1739 pub cusip: Option<String>,
1741 pub exchange: Option<String>,
1743 pub mic_code: Option<String>,
1745 pub country: Option<String>,
1747 pub start_date: Option<String>,
1749 pub end_date: Option<String>,
1751 pub page: Option<i64>,
1753 pub outputsize: Option<i64>,
1755}
1756
1757impl GetMarketCapParams {
1758 pub fn builder() -> GetMarketCapParamsBuilder {
1760 GetMarketCapParamsBuilder::default()
1761 }
1762}
1763
1764#[derive(Clone, Debug, Default)]
1766pub struct GetMarketCapParamsBuilder {
1767 symbol: Option<String>,
1769 figi: Option<String>,
1771 isin: Option<String>,
1773 cusip: Option<String>,
1775 exchange: Option<String>,
1777 mic_code: Option<String>,
1779 country: Option<String>,
1781 start_date: Option<String>,
1783 end_date: Option<String>,
1785 page: Option<i64>,
1787 outputsize: Option<i64>,
1789}
1790
1791impl GetMarketCapParamsBuilder {
1792 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1794 self.symbol = Some(symbol.into());
1795 self
1796 }
1797 pub fn figi(mut self, figi: impl Into<String>) -> Self {
1799 self.figi = Some(figi.into());
1800 self
1801 }
1802 pub fn isin(mut self, isin: impl Into<String>) -> Self {
1804 self.isin = Some(isin.into());
1805 self
1806 }
1807 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
1809 self.cusip = Some(cusip.into());
1810 self
1811 }
1812 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1814 self.exchange = Some(exchange.into());
1815 self
1816 }
1817 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1819 self.mic_code = Some(mic_code.into());
1820 self
1821 }
1822 pub fn country(mut self, country: impl Into<String>) -> Self {
1824 self.country = Some(country.into());
1825 self
1826 }
1827 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1829 self.start_date = Some(start_date.into());
1830 self
1831 }
1832 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
1834 self.end_date = Some(end_date.into());
1835 self
1836 }
1837 pub fn page(mut self, page: i64) -> Self {
1839 self.page = Some(page);
1840 self
1841 }
1842 pub fn outputsize(mut self, outputsize: i64) -> Self {
1844 self.outputsize = Some(outputsize);
1845 self
1846 }
1847
1848 pub fn build(self) -> GetMarketCapParams {
1850 GetMarketCapParams {
1851 symbol: self.symbol,
1852 figi: self.figi,
1853 isin: self.isin,
1854 cusip: self.cusip,
1855 exchange: self.exchange,
1856 mic_code: self.mic_code,
1857 country: self.country,
1858 start_date: self.start_date,
1859 end_date: self.end_date,
1860 page: self.page,
1861 outputsize: self.outputsize,
1862 }
1863 }
1864}
1865
1866#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1868pub struct GetProfileParams {
1869 pub symbol: Option<String>,
1871 pub figi: Option<String>,
1873 pub isin: Option<String>,
1875 pub cusip: Option<String>,
1877 pub exchange: Option<String>,
1879 pub mic_code: Option<String>,
1881 pub country: Option<String>,
1883}
1884
1885impl GetProfileParams {
1886 pub fn builder() -> GetProfileParamsBuilder {
1888 GetProfileParamsBuilder::default()
1889 }
1890}
1891
1892#[derive(Clone, Debug, Default)]
1894pub struct GetProfileParamsBuilder {
1895 symbol: Option<String>,
1897 figi: Option<String>,
1899 isin: Option<String>,
1901 cusip: Option<String>,
1903 exchange: Option<String>,
1905 mic_code: Option<String>,
1907 country: Option<String>,
1909}
1910
1911impl GetProfileParamsBuilder {
1912 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1914 self.symbol = Some(symbol.into());
1915 self
1916 }
1917 pub fn figi(mut self, figi: impl Into<String>) -> Self {
1919 self.figi = Some(figi.into());
1920 self
1921 }
1922 pub fn isin(mut self, isin: impl Into<String>) -> Self {
1924 self.isin = Some(isin.into());
1925 self
1926 }
1927 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
1929 self.cusip = Some(cusip.into());
1930 self
1931 }
1932 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1934 self.exchange = Some(exchange.into());
1935 self
1936 }
1937 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1939 self.mic_code = Some(mic_code.into());
1940 self
1941 }
1942 pub fn country(mut self, country: impl Into<String>) -> Self {
1944 self.country = Some(country.into());
1945 self
1946 }
1947
1948 pub fn build(self) -> GetProfileParams {
1950 GetProfileParams {
1951 symbol: self.symbol,
1952 figi: self.figi,
1953 isin: self.isin,
1954 cusip: self.cusip,
1955 exchange: self.exchange,
1956 mic_code: self.mic_code,
1957 country: self.country,
1958 }
1959 }
1960}
1961
1962#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1964pub struct GetSplitsParams {
1965 pub symbol: Option<String>,
1967 pub figi: Option<String>,
1969 pub isin: Option<String>,
1971 pub cusip: Option<String>,
1973 pub exchange: Option<String>,
1975 pub mic_code: Option<String>,
1977 pub country: Option<String>,
1979 pub range: Option<String>,
1981 pub start_date: Option<String>,
1983 pub end_date: Option<String>,
1985}
1986
1987impl GetSplitsParams {
1988 pub fn builder() -> GetSplitsParamsBuilder {
1990 GetSplitsParamsBuilder::default()
1991 }
1992}
1993
1994#[derive(Clone, Debug, Default)]
1996pub struct GetSplitsParamsBuilder {
1997 symbol: Option<String>,
1999 figi: Option<String>,
2001 isin: Option<String>,
2003 cusip: Option<String>,
2005 exchange: Option<String>,
2007 mic_code: Option<String>,
2009 country: Option<String>,
2011 range: Option<String>,
2013 start_date: Option<String>,
2015 end_date: Option<String>,
2017}
2018
2019impl GetSplitsParamsBuilder {
2020 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
2022 self.symbol = Some(symbol.into());
2023 self
2024 }
2025 pub fn figi(mut self, figi: impl Into<String>) -> Self {
2027 self.figi = Some(figi.into());
2028 self
2029 }
2030 pub fn isin(mut self, isin: impl Into<String>) -> Self {
2032 self.isin = Some(isin.into());
2033 self
2034 }
2035 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
2037 self.cusip = Some(cusip.into());
2038 self
2039 }
2040 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
2042 self.exchange = Some(exchange.into());
2043 self
2044 }
2045 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
2047 self.mic_code = Some(mic_code.into());
2048 self
2049 }
2050 pub fn country(mut self, country: impl Into<String>) -> Self {
2052 self.country = Some(country.into());
2053 self
2054 }
2055 pub fn range(mut self, range: impl Into<String>) -> Self {
2057 self.range = Some(range.into());
2058 self
2059 }
2060 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
2062 self.start_date = Some(start_date.into());
2063 self
2064 }
2065 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
2067 self.end_date = Some(end_date.into());
2068 self
2069 }
2070
2071 pub fn build(self) -> GetSplitsParams {
2073 GetSplitsParams {
2074 symbol: self.symbol,
2075 figi: self.figi,
2076 isin: self.isin,
2077 cusip: self.cusip,
2078 exchange: self.exchange,
2079 mic_code: self.mic_code,
2080 country: self.country,
2081 range: self.range,
2082 start_date: self.start_date,
2083 end_date: self.end_date,
2084 }
2085 }
2086}
2087
2088#[derive(Clone, Debug, Default, Serialize, Deserialize)]
2090pub struct GetSplitsCalendarParams {
2091 pub symbol: Option<String>,
2093 pub figi: Option<String>,
2095 pub isin: Option<String>,
2097 pub cusip: Option<String>,
2099 pub exchange: Option<String>,
2101 pub mic_code: Option<String>,
2103 pub country: Option<String>,
2105 pub start_date: Option<String>,
2107 pub end_date: Option<String>,
2109 pub outputsize: Option<i64>,
2111 pub page: Option<String>,
2113}
2114
2115impl GetSplitsCalendarParams {
2116 pub fn builder() -> GetSplitsCalendarParamsBuilder {
2118 GetSplitsCalendarParamsBuilder::default()
2119 }
2120}
2121
2122#[derive(Clone, Debug, Default)]
2124pub struct GetSplitsCalendarParamsBuilder {
2125 symbol: Option<String>,
2127 figi: Option<String>,
2129 isin: Option<String>,
2131 cusip: Option<String>,
2133 exchange: Option<String>,
2135 mic_code: Option<String>,
2137 country: Option<String>,
2139 start_date: Option<String>,
2141 end_date: Option<String>,
2143 outputsize: Option<i64>,
2145 page: Option<String>,
2147}
2148
2149impl GetSplitsCalendarParamsBuilder {
2150 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
2152 self.symbol = Some(symbol.into());
2153 self
2154 }
2155 pub fn figi(mut self, figi: impl Into<String>) -> Self {
2157 self.figi = Some(figi.into());
2158 self
2159 }
2160 pub fn isin(mut self, isin: impl Into<String>) -> Self {
2162 self.isin = Some(isin.into());
2163 self
2164 }
2165 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
2167 self.cusip = Some(cusip.into());
2168 self
2169 }
2170 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
2172 self.exchange = Some(exchange.into());
2173 self
2174 }
2175 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
2177 self.mic_code = Some(mic_code.into());
2178 self
2179 }
2180 pub fn country(mut self, country: impl Into<String>) -> Self {
2182 self.country = Some(country.into());
2183 self
2184 }
2185 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
2187 self.start_date = Some(start_date.into());
2188 self
2189 }
2190 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
2192 self.end_date = Some(end_date.into());
2193 self
2194 }
2195 pub fn outputsize(mut self, outputsize: i64) -> Self {
2197 self.outputsize = Some(outputsize);
2198 self
2199 }
2200 pub fn page(mut self, page: impl Into<String>) -> Self {
2202 self.page = Some(page.into());
2203 self
2204 }
2205
2206 pub fn build(self) -> GetSplitsCalendarParams {
2208 GetSplitsCalendarParams {
2209 symbol: self.symbol,
2210 figi: self.figi,
2211 isin: self.isin,
2212 cusip: self.cusip,
2213 exchange: self.exchange,
2214 mic_code: self.mic_code,
2215 country: self.country,
2216 start_date: self.start_date,
2217 end_date: self.end_date,
2218 outputsize: self.outputsize,
2219 page: self.page,
2220 }
2221 }
2222}
2223
2224#[derive(Clone, Debug, Default, Serialize, Deserialize)]
2226pub struct GetStatisticsParams {
2227 pub symbol: Option<String>,
2229 pub figi: Option<String>,
2231 pub isin: Option<String>,
2233 pub cusip: Option<String>,
2235 pub exchange: Option<String>,
2237 pub mic_code: Option<String>,
2239 pub country: Option<String>,
2241}
2242
2243impl GetStatisticsParams {
2244 pub fn builder() -> GetStatisticsParamsBuilder {
2246 GetStatisticsParamsBuilder::default()
2247 }
2248}
2249
2250#[derive(Clone, Debug, Default)]
2252pub struct GetStatisticsParamsBuilder {
2253 symbol: Option<String>,
2255 figi: Option<String>,
2257 isin: Option<String>,
2259 cusip: Option<String>,
2261 exchange: Option<String>,
2263 mic_code: Option<String>,
2265 country: Option<String>,
2267}
2268
2269impl GetStatisticsParamsBuilder {
2270 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
2272 self.symbol = Some(symbol.into());
2273 self
2274 }
2275 pub fn figi(mut self, figi: impl Into<String>) -> Self {
2277 self.figi = Some(figi.into());
2278 self
2279 }
2280 pub fn isin(mut self, isin: impl Into<String>) -> Self {
2282 self.isin = Some(isin.into());
2283 self
2284 }
2285 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
2287 self.cusip = Some(cusip.into());
2288 self
2289 }
2290 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
2292 self.exchange = Some(exchange.into());
2293 self
2294 }
2295 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
2297 self.mic_code = Some(mic_code.into());
2298 self
2299 }
2300 pub fn country(mut self, country: impl Into<String>) -> Self {
2302 self.country = Some(country.into());
2303 self
2304 }
2305
2306 pub fn build(self) -> GetStatisticsParams {
2308 GetStatisticsParams {
2309 symbol: self.symbol,
2310 figi: self.figi,
2311 isin: self.isin,
2312 cusip: self.cusip,
2313 exchange: self.exchange,
2314 mic_code: self.mic_code,
2315 country: self.country,
2316 }
2317 }
2318}
2319
2320#[derive(Debug, Clone, Serialize, Deserialize)]
2322#[serde(untagged)]
2323pub enum GetBalanceSheetError {
2324 UnknownValue(serde_json::Value),
2325}
2326
2327#[derive(Debug, Clone, Serialize, Deserialize)]
2329#[serde(untagged)]
2330pub enum GetBalanceSheetConsolidatedError {
2331 UnknownValue(serde_json::Value),
2332}
2333
2334#[derive(Debug, Clone, Serialize, Deserialize)]
2336#[serde(untagged)]
2337pub enum GetCashFlowError {
2338 UnknownValue(serde_json::Value),
2339}
2340
2341#[derive(Debug, Clone, Serialize, Deserialize)]
2343#[serde(untagged)]
2344pub enum GetCashFlowConsolidatedError {
2345 UnknownValue(serde_json::Value),
2346}
2347
2348#[derive(Debug, Clone, Serialize, Deserialize)]
2350#[serde(untagged)]
2351pub enum GetDividendsError {
2352 UnknownValue(serde_json::Value),
2353}
2354
2355#[derive(Debug, Clone, Serialize, Deserialize)]
2357#[serde(untagged)]
2358pub enum GetDividendsCalendarError {
2359 UnknownValue(serde_json::Value),
2360}
2361
2362#[derive(Debug, Clone, Serialize, Deserialize)]
2364#[serde(untagged)]
2365pub enum GetEarningsError {
2366 UnknownValue(serde_json::Value),
2367}
2368
2369#[derive(Debug, Clone, Serialize, Deserialize)]
2371#[serde(untagged)]
2372pub enum GetEarningsCalendarError {
2373 UnknownValue(serde_json::Value),
2374}
2375
2376#[derive(Debug, Clone, Serialize, Deserialize)]
2378#[serde(untagged)]
2379pub enum GetIncomeStatementError {
2380 UnknownValue(serde_json::Value),
2381}
2382
2383#[derive(Debug, Clone, Serialize, Deserialize)]
2385#[serde(untagged)]
2386pub enum GetIncomeStatementConsolidatedError {
2387 UnknownValue(serde_json::Value),
2388}
2389
2390#[derive(Debug, Clone, Serialize, Deserialize)]
2392#[serde(untagged)]
2393pub enum GetIpoCalendarError {
2394 UnknownValue(serde_json::Value),
2395}
2396
2397#[derive(Debug, Clone, Serialize, Deserialize)]
2399#[serde(untagged)]
2400pub enum GetKeyExecutivesError {
2401 UnknownValue(serde_json::Value),
2402}
2403
2404#[derive(Debug, Clone, Serialize, Deserialize)]
2406#[serde(untagged)]
2407pub enum GetLastChangesError {
2408 UnknownValue(serde_json::Value),
2409}
2410
2411#[derive(Debug, Clone, Serialize, Deserialize)]
2413#[serde(untagged)]
2414pub enum GetLogoError {
2415 UnknownValue(serde_json::Value),
2416}
2417
2418#[derive(Debug, Clone, Serialize, Deserialize)]
2420#[serde(untagged)]
2421pub enum GetMarketCapError {
2422 UnknownValue(serde_json::Value),
2423}
2424
2425#[derive(Debug, Clone, Serialize, Deserialize)]
2427#[serde(untagged)]
2428pub enum GetProfileError {
2429 UnknownValue(serde_json::Value),
2430}
2431
2432#[derive(Debug, Clone, Serialize, Deserialize)]
2434#[serde(untagged)]
2435pub enum GetSplitsError {
2436 UnknownValue(serde_json::Value),
2437}
2438
2439#[derive(Debug, Clone, Serialize, Deserialize)]
2441#[serde(untagged)]
2442pub enum GetSplitsCalendarError {
2443 UnknownValue(serde_json::Value),
2444}
2445
2446#[derive(Debug, Clone, Serialize, Deserialize)]
2448#[serde(untagged)]
2449pub enum GetStatisticsError {
2450 UnknownValue(serde_json::Value),
2451}
2452
2453pub async fn get_balance_sheet(
2455 configuration: &configuration::Configuration,
2456 params: GetBalanceSheetParams,
2457) -> Result<models::GetBalanceSheet200ResponseEnum, Error<GetBalanceSheetError>> {
2458 let p_query_symbol = params.symbol;
2460 let p_query_figi = params.figi;
2461 let p_query_isin = params.isin;
2462 let p_query_cusip = params.cusip;
2463 let p_query_exchange = params.exchange;
2464 let p_query_mic_code = params.mic_code;
2465 let p_query_country = params.country;
2466 let p_query_period = params.period;
2467 let p_query_start_date = params.start_date;
2468 let p_query_end_date = params.end_date;
2469 let p_query_outputsize = params.outputsize;
2470
2471 let uri_str = format!("{}/balance_sheet", configuration.base_path);
2472 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2473
2474 if let Some(ref param_value) = p_query_symbol {
2475 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
2476 }
2477 if let Some(ref param_value) = p_query_figi {
2478 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
2479 }
2480 if let Some(ref param_value) = p_query_isin {
2481 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
2482 }
2483 if let Some(ref param_value) = p_query_cusip {
2484 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
2485 }
2486 if let Some(ref param_value) = p_query_exchange {
2487 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
2488 }
2489 if let Some(ref param_value) = p_query_mic_code {
2490 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
2491 }
2492 if let Some(ref param_value) = p_query_country {
2493 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
2494 }
2495 if let Some(ref param_value) = p_query_period {
2496 req_builder = req_builder.query(&[("period", ¶m_value.to_string())]);
2497 }
2498 if let Some(ref param_value) = p_query_start_date {
2499 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
2500 }
2501 if let Some(ref param_value) = p_query_end_date {
2502 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
2503 }
2504 if let Some(ref param_value) = p_query_outputsize {
2505 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
2506 }
2507 if let Some(ref user_agent) = configuration.user_agent {
2508 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2509 }
2510 if let Some(ref apikey) = configuration.api_key {
2511 let key = apikey.key.clone();
2512 let value = match apikey.prefix {
2513 Some(ref prefix) => format!("{} {}", prefix, key),
2514 None => key,
2515 };
2516 req_builder = req_builder.header("Authorization", value);
2517 };
2518
2519 let req = req_builder.build()?;
2520 let resp = configuration.client.execute(req).await?;
2521
2522 let status = resp.status();
2523 let content_type = resp
2524 .headers()
2525 .get("content-type")
2526 .and_then(|v| v.to_str().ok())
2527 .unwrap_or("application/octet-stream");
2528 let content_type = super::ContentType::from(content_type);
2529
2530 if !status.is_client_error() && !status.is_server_error() {
2531 let content = resp.text().await?;
2532 match content_type {
2533 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2534 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetBalanceSheet200ResponseEnum`"))),
2535 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetBalanceSheet200ResponseEnum`")))),
2536 }
2537 } else {
2538 let content = resp.text().await?;
2539 let entity: Option<GetBalanceSheetError> = serde_json::from_str(&content).ok();
2540 Err(Error::ResponseError(ResponseContent {
2541 status,
2542 content,
2543 entity,
2544 }))
2545 }
2546}
2547
2548pub async fn get_balance_sheet_consolidated(
2550 configuration: &configuration::Configuration,
2551 params: GetBalanceSheetConsolidatedParams,
2552) -> Result<
2553 models::GetBalanceSheetConsolidated200ResponseEnum,
2554 Error<GetBalanceSheetConsolidatedError>,
2555> {
2556 let p_query_symbol = params.symbol;
2558 let p_query_figi = params.figi;
2559 let p_query_isin = params.isin;
2560 let p_query_cusip = params.cusip;
2561 let p_query_exchange = params.exchange;
2562 let p_query_mic_code = params.mic_code;
2563 let p_query_country = params.country;
2564 let p_query_period = params.period;
2565 let p_query_start_date = params.start_date;
2566 let p_query_end_date = params.end_date;
2567 let p_query_outputsize = params.outputsize;
2568
2569 let uri_str = format!("{}/balance_sheet/consolidated", configuration.base_path);
2570 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2571
2572 if let Some(ref param_value) = p_query_symbol {
2573 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
2574 }
2575 if let Some(ref param_value) = p_query_figi {
2576 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
2577 }
2578 if let Some(ref param_value) = p_query_isin {
2579 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
2580 }
2581 if let Some(ref param_value) = p_query_cusip {
2582 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
2583 }
2584 if let Some(ref param_value) = p_query_exchange {
2585 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
2586 }
2587 if let Some(ref param_value) = p_query_mic_code {
2588 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
2589 }
2590 if let Some(ref param_value) = p_query_country {
2591 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
2592 }
2593 if let Some(ref param_value) = p_query_period {
2594 req_builder = req_builder.query(&[("period", ¶m_value.to_string())]);
2595 }
2596 if let Some(ref param_value) = p_query_start_date {
2597 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
2598 }
2599 if let Some(ref param_value) = p_query_end_date {
2600 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
2601 }
2602 if let Some(ref param_value) = p_query_outputsize {
2603 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
2604 }
2605 if let Some(ref user_agent) = configuration.user_agent {
2606 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2607 }
2608 if let Some(ref apikey) = configuration.api_key {
2609 let key = apikey.key.clone();
2610 let value = match apikey.prefix {
2611 Some(ref prefix) => format!("{} {}", prefix, key),
2612 None => key,
2613 };
2614 req_builder = req_builder.header("Authorization", value);
2615 };
2616
2617 let req = req_builder.build()?;
2618 let resp = configuration.client.execute(req).await?;
2619
2620 let status = resp.status();
2621 let content_type = resp
2622 .headers()
2623 .get("content-type")
2624 .and_then(|v| v.to_str().ok())
2625 .unwrap_or("application/octet-stream");
2626 let content_type = super::ContentType::from(content_type);
2627
2628 if !status.is_client_error() && !status.is_server_error() {
2629 let content = resp.text().await?;
2630 match content_type {
2631 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2632 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetBalanceSheetConsolidated200ResponseEnum`"))),
2633 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::GetBalanceSheetConsolidated200ResponseEnum`")))),
2634 }
2635 } else {
2636 let content = resp.text().await?;
2637 let entity: Option<GetBalanceSheetConsolidatedError> = serde_json::from_str(&content).ok();
2638 Err(Error::ResponseError(ResponseContent {
2639 status,
2640 content,
2641 entity,
2642 }))
2643 }
2644}
2645
2646pub async fn get_cash_flow(
2648 configuration: &configuration::Configuration,
2649 params: GetCashFlowParams,
2650) -> Result<models::GetCashFlow200ResponseEnum, Error<GetCashFlowError>> {
2651 let p_query_symbol = params.symbol;
2653 let p_query_figi = params.figi;
2654 let p_query_isin = params.isin;
2655 let p_query_cusip = params.cusip;
2656 let p_query_exchange = params.exchange;
2657 let p_query_mic_code = params.mic_code;
2658 let p_query_country = params.country;
2659 let p_query_period = params.period;
2660 let p_query_start_date = params.start_date;
2661 let p_query_end_date = params.end_date;
2662 let p_query_outputsize = params.outputsize;
2663
2664 let uri_str = format!("{}/cash_flow", configuration.base_path);
2665 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2666
2667 if let Some(ref param_value) = p_query_symbol {
2668 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
2669 }
2670 if let Some(ref param_value) = p_query_figi {
2671 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
2672 }
2673 if let Some(ref param_value) = p_query_isin {
2674 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
2675 }
2676 if let Some(ref param_value) = p_query_cusip {
2677 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
2678 }
2679 if let Some(ref param_value) = p_query_exchange {
2680 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
2681 }
2682 if let Some(ref param_value) = p_query_mic_code {
2683 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
2684 }
2685 if let Some(ref param_value) = p_query_country {
2686 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
2687 }
2688 if let Some(ref param_value) = p_query_period {
2689 req_builder = req_builder.query(&[("period", ¶m_value.to_string())]);
2690 }
2691 if let Some(ref param_value) = p_query_start_date {
2692 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
2693 }
2694 if let Some(ref param_value) = p_query_end_date {
2695 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
2696 }
2697 if let Some(ref param_value) = p_query_outputsize {
2698 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
2699 }
2700 if let Some(ref user_agent) = configuration.user_agent {
2701 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2702 }
2703 if let Some(ref apikey) = configuration.api_key {
2704 let key = apikey.key.clone();
2705 let value = match apikey.prefix {
2706 Some(ref prefix) => format!("{} {}", prefix, key),
2707 None => key,
2708 };
2709 req_builder = req_builder.header("Authorization", value);
2710 };
2711
2712 let req = req_builder.build()?;
2713 let resp = configuration.client.execute(req).await?;
2714
2715 let status = resp.status();
2716 let content_type = resp
2717 .headers()
2718 .get("content-type")
2719 .and_then(|v| v.to_str().ok())
2720 .unwrap_or("application/octet-stream");
2721 let content_type = super::ContentType::from(content_type);
2722
2723 if !status.is_client_error() && !status.is_server_error() {
2724 let content = resp.text().await?;
2725 match content_type {
2726 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2727 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetCashFlow200ResponseEnum`"))),
2728 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::GetCashFlow200ResponseEnum`")))),
2729 }
2730 } else {
2731 let content = resp.text().await?;
2732 let entity: Option<GetCashFlowError> = serde_json::from_str(&content).ok();
2733 Err(Error::ResponseError(ResponseContent {
2734 status,
2735 content,
2736 entity,
2737 }))
2738 }
2739}
2740
2741pub async fn get_cash_flow_consolidated(
2743 configuration: &configuration::Configuration,
2744 params: GetCashFlowConsolidatedParams,
2745) -> Result<models::GetCashFlowConsolidated200ResponseEnum, Error<GetCashFlowConsolidatedError>> {
2746 let p_query_symbol = params.symbol;
2748 let p_query_figi = params.figi;
2749 let p_query_isin = params.isin;
2750 let p_query_cusip = params.cusip;
2751 let p_query_exchange = params.exchange;
2752 let p_query_mic_code = params.mic_code;
2753 let p_query_country = params.country;
2754 let p_query_period = params.period;
2755 let p_query_start_date = params.start_date;
2756 let p_query_end_date = params.end_date;
2757 let p_query_outputsize = params.outputsize;
2758
2759 let uri_str = format!("{}/cash_flow/consolidated", configuration.base_path);
2760 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2761
2762 if let Some(ref param_value) = p_query_symbol {
2763 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
2764 }
2765 if let Some(ref param_value) = p_query_figi {
2766 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
2767 }
2768 if let Some(ref param_value) = p_query_isin {
2769 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
2770 }
2771 if let Some(ref param_value) = p_query_cusip {
2772 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
2773 }
2774 if let Some(ref param_value) = p_query_exchange {
2775 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
2776 }
2777 if let Some(ref param_value) = p_query_mic_code {
2778 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
2779 }
2780 if let Some(ref param_value) = p_query_country {
2781 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
2782 }
2783 if let Some(ref param_value) = p_query_period {
2784 req_builder = req_builder.query(&[("period", ¶m_value.to_string())]);
2785 }
2786 if let Some(ref param_value) = p_query_start_date {
2787 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
2788 }
2789 if let Some(ref param_value) = p_query_end_date {
2790 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
2791 }
2792 if let Some(ref param_value) = p_query_outputsize {
2793 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
2794 }
2795 if let Some(ref user_agent) = configuration.user_agent {
2796 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2797 }
2798 if let Some(ref apikey) = configuration.api_key {
2799 let key = apikey.key.clone();
2800 let value = match apikey.prefix {
2801 Some(ref prefix) => format!("{} {}", prefix, key),
2802 None => key,
2803 };
2804 req_builder = req_builder.header("Authorization", value);
2805 };
2806
2807 let req = req_builder.build()?;
2808 let resp = configuration.client.execute(req).await?;
2809
2810 let status = resp.status();
2811 let content_type = resp
2812 .headers()
2813 .get("content-type")
2814 .and_then(|v| v.to_str().ok())
2815 .unwrap_or("application/octet-stream");
2816 let content_type = super::ContentType::from(content_type);
2817
2818 if !status.is_client_error() && !status.is_server_error() {
2819 let content = resp.text().await?;
2820 match content_type {
2821 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2822 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetCashFlowConsolidated200ResponseEnum`"))),
2823 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::GetCashFlowConsolidated200ResponseEnum`")))),
2824 }
2825 } else {
2826 let content = resp.text().await?;
2827 let entity: Option<GetCashFlowConsolidatedError> = serde_json::from_str(&content).ok();
2828 Err(Error::ResponseError(ResponseContent {
2829 status,
2830 content,
2831 entity,
2832 }))
2833 }
2834}
2835
2836pub async fn get_dividends(
2838 configuration: &configuration::Configuration,
2839 params: GetDividendsParams,
2840) -> Result<models::GetDividends200ResponseEnum, Error<GetDividendsError>> {
2841 let p_query_symbol = params.symbol;
2843 let p_query_figi = params.figi;
2844 let p_query_isin = params.isin;
2845 let p_query_cusip = params.cusip;
2846 let p_query_exchange = params.exchange;
2847 let p_query_mic_code = params.mic_code;
2848 let p_query_country = params.country;
2849 let p_query_range = params.range;
2850 let p_query_start_date = params.start_date;
2851 let p_query_end_date = params.end_date;
2852 let p_query_adjust = params.adjust;
2853
2854 let uri_str = format!("{}/dividends", configuration.base_path);
2855 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2856
2857 if let Some(ref param_value) = p_query_symbol {
2858 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
2859 }
2860 if let Some(ref param_value) = p_query_figi {
2861 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
2862 }
2863 if let Some(ref param_value) = p_query_isin {
2864 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
2865 }
2866 if let Some(ref param_value) = p_query_cusip {
2867 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
2868 }
2869 if let Some(ref param_value) = p_query_exchange {
2870 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
2871 }
2872 if let Some(ref param_value) = p_query_mic_code {
2873 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
2874 }
2875 if let Some(ref param_value) = p_query_country {
2876 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
2877 }
2878 if let Some(ref param_value) = p_query_range {
2879 req_builder = req_builder.query(&[("range", ¶m_value.to_string())]);
2880 }
2881 if let Some(ref param_value) = p_query_start_date {
2882 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
2883 }
2884 if let Some(ref param_value) = p_query_end_date {
2885 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
2886 }
2887 if let Some(ref param_value) = p_query_adjust {
2888 req_builder = req_builder.query(&[("adjust", ¶m_value.to_string())]);
2889 }
2890 if let Some(ref user_agent) = configuration.user_agent {
2891 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2892 }
2893 if let Some(ref apikey) = configuration.api_key {
2894 let key = apikey.key.clone();
2895 let value = match apikey.prefix {
2896 Some(ref prefix) => format!("{} {}", prefix, key),
2897 None => key,
2898 };
2899 req_builder = req_builder.header("Authorization", value);
2900 };
2901
2902 let req = req_builder.build()?;
2903 let resp = configuration.client.execute(req).await?;
2904
2905 let status = resp.status();
2906 let content_type = resp
2907 .headers()
2908 .get("content-type")
2909 .and_then(|v| v.to_str().ok())
2910 .unwrap_or("application/octet-stream");
2911 let content_type = super::ContentType::from(content_type);
2912
2913 if !status.is_client_error() && !status.is_server_error() {
2914 let content = resp.text().await?;
2915 match content_type {
2916 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2917 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetDividends200ResponseEnum`"))),
2918 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::GetDividends200ResponseEnum`")))),
2919 }
2920 } else {
2921 let content = resp.text().await?;
2922 let entity: Option<GetDividendsError> = serde_json::from_str(&content).ok();
2923 Err(Error::ResponseError(ResponseContent {
2924 status,
2925 content,
2926 entity,
2927 }))
2928 }
2929}
2930
2931pub async fn get_dividends_calendar(
2933 configuration: &configuration::Configuration,
2934 params: GetDividendsCalendarParams,
2935) -> Result<models::GetDividendsCalendar200ResponseEnum, Error<GetDividendsCalendarError>> {
2936 let p_query_symbol = params.symbol;
2938 let p_query_figi = params.figi;
2939 let p_query_isin = params.isin;
2940 let p_query_cusip = params.cusip;
2941 let p_query_exchange = params.exchange;
2942 let p_query_mic_code = params.mic_code;
2943 let p_query_country = params.country;
2944 let p_query_start_date = params.start_date;
2945 let p_query_end_date = params.end_date;
2946 let p_query_outputsize = params.outputsize;
2947 let p_query_page = params.page;
2948
2949 let uri_str = format!("{}/dividends_calendar", configuration.base_path);
2950 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2951
2952 if let Some(ref param_value) = p_query_symbol {
2953 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
2954 }
2955 if let Some(ref param_value) = p_query_figi {
2956 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
2957 }
2958 if let Some(ref param_value) = p_query_isin {
2959 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
2960 }
2961 if let Some(ref param_value) = p_query_cusip {
2962 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
2963 }
2964 if let Some(ref param_value) = p_query_exchange {
2965 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
2966 }
2967 if let Some(ref param_value) = p_query_mic_code {
2968 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
2969 }
2970 if let Some(ref param_value) = p_query_country {
2971 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
2972 }
2973 if let Some(ref param_value) = p_query_start_date {
2974 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
2975 }
2976 if let Some(ref param_value) = p_query_end_date {
2977 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
2978 }
2979 if let Some(ref param_value) = p_query_outputsize {
2980 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
2981 }
2982 if let Some(ref param_value) = p_query_page {
2983 req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
2984 }
2985 if let Some(ref user_agent) = configuration.user_agent {
2986 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2987 }
2988 if let Some(ref apikey) = configuration.api_key {
2989 let key = apikey.key.clone();
2990 let value = match apikey.prefix {
2991 Some(ref prefix) => format!("{} {}", prefix, key),
2992 None => key,
2993 };
2994 req_builder = req_builder.header("Authorization", value);
2995 };
2996
2997 let req = req_builder.build()?;
2998 let resp = configuration.client.execute(req).await?;
2999
3000 let status = resp.status();
3001 let content_type = resp
3002 .headers()
3003 .get("content-type")
3004 .and_then(|v| v.to_str().ok())
3005 .unwrap_or("application/octet-stream");
3006 let content_type = super::ContentType::from(content_type);
3007
3008 if !status.is_client_error() && !status.is_server_error() {
3009 let content = resp.text().await?;
3010 match content_type {
3011 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3012 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetDividendsCalendar200ResponseEnum`"))),
3013 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::GetDividendsCalendar200ResponseEnum`")))),
3014 }
3015 } else {
3016 let content = resp.text().await?;
3017 let entity: Option<GetDividendsCalendarError> = serde_json::from_str(&content).ok();
3018 Err(Error::ResponseError(ResponseContent {
3019 status,
3020 content,
3021 entity,
3022 }))
3023 }
3024}
3025
3026pub async fn get_earnings(
3028 configuration: &configuration::Configuration,
3029 params: GetEarningsParams,
3030) -> Result<models::GetEarnings200ResponseEnum, Error<GetEarningsError>> {
3031 let p_query_symbol = params.symbol;
3033 let p_query_figi = params.figi;
3034 let p_query_isin = params.isin;
3035 let p_query_cusip = params.cusip;
3036 let p_query_exchange = params.exchange;
3037 let p_query_mic_code = params.mic_code;
3038 let p_query_country = params.country;
3039 let p_query_type = params.r#type;
3040 let p_query_period = params.period;
3041 let p_query_outputsize = params.outputsize;
3042 let p_query_format = params.format;
3043 let p_query_delimiter = params.delimiter;
3044 let p_query_start_date = params.start_date;
3045 let p_query_end_date = params.end_date;
3046 let p_query_dp = params.dp;
3047
3048 let uri_str = format!("{}/earnings", configuration.base_path);
3049 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3050
3051 if let Some(ref param_value) = p_query_symbol {
3052 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3053 }
3054 if let Some(ref param_value) = p_query_figi {
3055 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
3056 }
3057 if let Some(ref param_value) = p_query_isin {
3058 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
3059 }
3060 if let Some(ref param_value) = p_query_cusip {
3061 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
3062 }
3063 if let Some(ref param_value) = p_query_exchange {
3064 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3065 }
3066 if let Some(ref param_value) = p_query_mic_code {
3067 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3068 }
3069 if let Some(ref param_value) = p_query_country {
3070 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3071 }
3072 if let Some(ref param_value) = p_query_type {
3073 req_builder = req_builder.query(&[("type", ¶m_value.to_string())]);
3074 }
3075 if let Some(ref param_value) = p_query_period {
3076 req_builder = req_builder.query(&[("period", ¶m_value.to_string())]);
3077 }
3078 if let Some(ref param_value) = p_query_outputsize {
3079 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
3080 }
3081 if let Some(ref param_value) = p_query_format {
3082 req_builder = req_builder.query(&[("format", ¶m_value.to_string())]);
3083 }
3084 if let Some(ref param_value) = p_query_delimiter {
3085 req_builder = req_builder.query(&[("delimiter", ¶m_value.to_string())]);
3086 }
3087 if let Some(ref param_value) = p_query_start_date {
3088 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3089 }
3090 if let Some(ref param_value) = p_query_end_date {
3091 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
3092 }
3093 if let Some(ref param_value) = p_query_dp {
3094 req_builder = req_builder.query(&[("dp", ¶m_value.to_string())]);
3095 }
3096 if let Some(ref user_agent) = configuration.user_agent {
3097 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3098 }
3099 if let Some(ref apikey) = configuration.api_key {
3100 let key = apikey.key.clone();
3101 let value = match apikey.prefix {
3102 Some(ref prefix) => format!("{} {}", prefix, key),
3103 None => key,
3104 };
3105 req_builder = req_builder.header("Authorization", value);
3106 };
3107
3108 let req = req_builder.build()?;
3109 let resp = configuration.client.execute(req).await?;
3110
3111 let status = resp.status();
3112 let content_type = resp
3113 .headers()
3114 .get("content-type")
3115 .and_then(|v| v.to_str().ok())
3116 .unwrap_or("application/octet-stream");
3117 let content_type = super::ContentType::from(content_type);
3118
3119 if !status.is_client_error() && !status.is_server_error() {
3120 let content = resp.text().await?;
3121 match content_type {
3122 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3123 ContentType::Text => return Ok(models::GetEarnings200ResponseEnum::Text(content)),
3124 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::GetEarnings200ResponseEnum`")))),
3125 }
3126 } else {
3127 let content = resp.text().await?;
3128 let entity: Option<GetEarningsError> = serde_json::from_str(&content).ok();
3129 Err(Error::ResponseError(ResponseContent {
3130 status,
3131 content,
3132 entity,
3133 }))
3134 }
3135}
3136
3137pub async fn get_earnings_calendar(
3139 configuration: &configuration::Configuration,
3140 params: GetEarningsCalendarParams,
3141) -> Result<models::GetEarningsCalendar200ResponseEnum, Error<GetEarningsCalendarError>> {
3142 let p_query_exchange = params.exchange;
3144 let p_query_mic_code = params.mic_code;
3145 let p_query_country = params.country;
3146 let p_query_format = params.format;
3147 let p_query_delimiter = params.delimiter;
3148 let p_query_start_date = params.start_date;
3149 let p_query_end_date = params.end_date;
3150 let p_query_dp = params.dp;
3151
3152 let uri_str = format!("{}/earnings_calendar", configuration.base_path);
3153 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3154
3155 if let Some(ref param_value) = p_query_exchange {
3156 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3157 }
3158 if let Some(ref param_value) = p_query_mic_code {
3159 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3160 }
3161 if let Some(ref param_value) = p_query_country {
3162 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3163 }
3164 if let Some(ref param_value) = p_query_format {
3165 req_builder = req_builder.query(&[("format", ¶m_value.to_string())]);
3166 }
3167 if let Some(ref param_value) = p_query_delimiter {
3168 req_builder = req_builder.query(&[("delimiter", ¶m_value.to_string())]);
3169 }
3170 if let Some(ref param_value) = p_query_start_date {
3171 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3172 }
3173 if let Some(ref param_value) = p_query_end_date {
3174 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
3175 }
3176 if let Some(ref param_value) = p_query_dp {
3177 req_builder = req_builder.query(&[("dp", ¶m_value.to_string())]);
3178 }
3179 if let Some(ref user_agent) = configuration.user_agent {
3180 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3181 }
3182 if let Some(ref apikey) = configuration.api_key {
3183 let key = apikey.key.clone();
3184 let value = match apikey.prefix {
3185 Some(ref prefix) => format!("{} {}", prefix, key),
3186 None => key,
3187 };
3188 req_builder = req_builder.header("Authorization", value);
3189 };
3190
3191 let req = req_builder.build()?;
3192 let resp = configuration.client.execute(req).await?;
3193
3194 let status = resp.status();
3195 let content_type = resp
3196 .headers()
3197 .get("content-type")
3198 .and_then(|v| v.to_str().ok())
3199 .unwrap_or("application/octet-stream");
3200 let content_type = super::ContentType::from(content_type);
3201
3202 if !status.is_client_error() && !status.is_server_error() {
3203 let content = resp.text().await?;
3204 match content_type {
3205 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3206 ContentType::Text => return Ok(models::GetEarningsCalendar200ResponseEnum::Text(content)),
3207 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::GetEarningsCalendar200ResponseEnum`")))),
3208 }
3209 } else {
3210 let content = resp.text().await?;
3211 let entity: Option<GetEarningsCalendarError> = serde_json::from_str(&content).ok();
3212 Err(Error::ResponseError(ResponseContent {
3213 status,
3214 content,
3215 entity,
3216 }))
3217 }
3218}
3219
3220pub async fn get_income_statement(
3222 configuration: &configuration::Configuration,
3223 params: GetIncomeStatementParams,
3224) -> Result<models::GetIncomeStatement200ResponseEnum, Error<GetIncomeStatementError>> {
3225 let p_query_symbol = params.symbol;
3227 let p_query_figi = params.figi;
3228 let p_query_isin = params.isin;
3229 let p_query_cusip = params.cusip;
3230 let p_query_exchange = params.exchange;
3231 let p_query_mic_code = params.mic_code;
3232 let p_query_country = params.country;
3233 let p_query_period = params.period;
3234 let p_query_start_date = params.start_date;
3235 let p_query_end_date = params.end_date;
3236 let p_query_outputsize = params.outputsize;
3237
3238 let uri_str = format!("{}/income_statement", configuration.base_path);
3239 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3240
3241 if let Some(ref param_value) = p_query_symbol {
3242 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3243 }
3244 if let Some(ref param_value) = p_query_figi {
3245 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
3246 }
3247 if let Some(ref param_value) = p_query_isin {
3248 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
3249 }
3250 if let Some(ref param_value) = p_query_cusip {
3251 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
3252 }
3253 if let Some(ref param_value) = p_query_exchange {
3254 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3255 }
3256 if let Some(ref param_value) = p_query_mic_code {
3257 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3258 }
3259 if let Some(ref param_value) = p_query_country {
3260 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3261 }
3262 if let Some(ref param_value) = p_query_period {
3263 req_builder = req_builder.query(&[("period", ¶m_value.to_string())]);
3264 }
3265 if let Some(ref param_value) = p_query_start_date {
3266 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3267 }
3268 if let Some(ref param_value) = p_query_end_date {
3269 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
3270 }
3271 if let Some(ref param_value) = p_query_outputsize {
3272 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
3273 }
3274 if let Some(ref user_agent) = configuration.user_agent {
3275 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3276 }
3277 if let Some(ref apikey) = configuration.api_key {
3278 let key = apikey.key.clone();
3279 let value = match apikey.prefix {
3280 Some(ref prefix) => format!("{} {}", prefix, key),
3281 None => key,
3282 };
3283 req_builder = req_builder.header("Authorization", value);
3284 };
3285
3286 let req = req_builder.build()?;
3287 let resp = configuration.client.execute(req).await?;
3288
3289 let status = resp.status();
3290 let content_type = resp
3291 .headers()
3292 .get("content-type")
3293 .and_then(|v| v.to_str().ok())
3294 .unwrap_or("application/octet-stream");
3295 let content_type = super::ContentType::from(content_type);
3296
3297 if !status.is_client_error() && !status.is_server_error() {
3298 let content = resp.text().await?;
3299 match content_type {
3300 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3301 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetIncomeStatement200ResponseEnum`"))),
3302 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::GetIncomeStatement200ResponseEnum`")))),
3303 }
3304 } else {
3305 let content = resp.text().await?;
3306 let entity: Option<GetIncomeStatementError> = serde_json::from_str(&content).ok();
3307 Err(Error::ResponseError(ResponseContent {
3308 status,
3309 content,
3310 entity,
3311 }))
3312 }
3313}
3314
3315pub async fn get_income_statement_consolidated(
3317 configuration: &configuration::Configuration,
3318 params: GetIncomeStatementConsolidatedParams,
3319) -> Result<
3320 models::GetIncomeStatementConsolidated200ResponseEnum,
3321 Error<GetIncomeStatementConsolidatedError>,
3322> {
3323 let p_query_symbol = params.symbol;
3325 let p_query_figi = params.figi;
3326 let p_query_isin = params.isin;
3327 let p_query_cusip = params.cusip;
3328 let p_query_exchange = params.exchange;
3329 let p_query_mic_code = params.mic_code;
3330 let p_query_country = params.country;
3331 let p_query_period = params.period;
3332 let p_query_start_date = params.start_date;
3333 let p_query_end_date = params.end_date;
3334 let p_query_outputsize = params.outputsize;
3335
3336 let uri_str = format!("{}/income_statement/consolidated", configuration.base_path);
3337 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3338
3339 if let Some(ref param_value) = p_query_symbol {
3340 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3341 }
3342 if let Some(ref param_value) = p_query_figi {
3343 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
3344 }
3345 if let Some(ref param_value) = p_query_isin {
3346 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
3347 }
3348 if let Some(ref param_value) = p_query_cusip {
3349 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
3350 }
3351 if let Some(ref param_value) = p_query_exchange {
3352 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3353 }
3354 if let Some(ref param_value) = p_query_mic_code {
3355 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3356 }
3357 if let Some(ref param_value) = p_query_country {
3358 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3359 }
3360 if let Some(ref param_value) = p_query_period {
3361 req_builder = req_builder.query(&[("period", ¶m_value.to_string())]);
3362 }
3363 if let Some(ref param_value) = p_query_start_date {
3364 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3365 }
3366 if let Some(ref param_value) = p_query_end_date {
3367 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
3368 }
3369 if let Some(ref param_value) = p_query_outputsize {
3370 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
3371 }
3372 if let Some(ref user_agent) = configuration.user_agent {
3373 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3374 }
3375 if let Some(ref apikey) = configuration.api_key {
3376 let key = apikey.key.clone();
3377 let value = match apikey.prefix {
3378 Some(ref prefix) => format!("{} {}", prefix, key),
3379 None => key,
3380 };
3381 req_builder = req_builder.header("Authorization", value);
3382 };
3383
3384 let req = req_builder.build()?;
3385 let resp = configuration.client.execute(req).await?;
3386
3387 let status = resp.status();
3388 let content_type = resp
3389 .headers()
3390 .get("content-type")
3391 .and_then(|v| v.to_str().ok())
3392 .unwrap_or("application/octet-stream");
3393 let content_type = super::ContentType::from(content_type);
3394
3395 if !status.is_client_error() && !status.is_server_error() {
3396 let content = resp.text().await?;
3397 match content_type {
3398 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3399 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetIncomeStatementConsolidated200ResponseEnum`"))),
3400 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::GetIncomeStatementConsolidated200ResponseEnum`")))),
3401 }
3402 } else {
3403 let content = resp.text().await?;
3404 let entity: Option<GetIncomeStatementConsolidatedError> =
3405 serde_json::from_str(&content).ok();
3406 Err(Error::ResponseError(ResponseContent {
3407 status,
3408 content,
3409 entity,
3410 }))
3411 }
3412}
3413
3414pub async fn get_ipo_calendar(
3416 configuration: &configuration::Configuration,
3417 params: GetIpoCalendarParams,
3418) -> Result<models::GetIpoCalendar200ResponseEnum, Error<GetIpoCalendarError>> {
3419 let p_query_exchange = params.exchange;
3421 let p_query_mic_code = params.mic_code;
3422 let p_query_country = params.country;
3423 let p_query_start_date = params.start_date;
3424 let p_query_end_date = params.end_date;
3425
3426 let uri_str = format!("{}/ipo_calendar", configuration.base_path);
3427 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3428
3429 if let Some(ref param_value) = p_query_exchange {
3430 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3431 }
3432 if let Some(ref param_value) = p_query_mic_code {
3433 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3434 }
3435 if let Some(ref param_value) = p_query_country {
3436 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3437 }
3438 if let Some(ref param_value) = p_query_start_date {
3439 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3440 }
3441 if let Some(ref param_value) = p_query_end_date {
3442 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
3443 }
3444 if let Some(ref user_agent) = configuration.user_agent {
3445 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3446 }
3447 if let Some(ref apikey) = configuration.api_key {
3448 let key = apikey.key.clone();
3449 let value = match apikey.prefix {
3450 Some(ref prefix) => format!("{} {}", prefix, key),
3451 None => key,
3452 };
3453 req_builder = req_builder.header("Authorization", value);
3454 };
3455
3456 let req = req_builder.build()?;
3457 let resp = configuration.client.execute(req).await?;
3458
3459 let status = resp.status();
3460 let content_type = resp
3461 .headers()
3462 .get("content-type")
3463 .and_then(|v| v.to_str().ok())
3464 .unwrap_or("application/octet-stream");
3465 let content_type = super::ContentType::from(content_type);
3466
3467 if !status.is_client_error() && !status.is_server_error() {
3468 let content = resp.text().await?;
3469 match content_type {
3470 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3471 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetIpoCalendar200ResponseEnum`"))),
3472 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::GetIpoCalendar200ResponseEnum`")))),
3473 }
3474 } else {
3475 let content = resp.text().await?;
3476 let entity: Option<GetIpoCalendarError> = serde_json::from_str(&content).ok();
3477 Err(Error::ResponseError(ResponseContent {
3478 status,
3479 content,
3480 entity,
3481 }))
3482 }
3483}
3484
3485pub async fn get_key_executives(
3487 configuration: &configuration::Configuration,
3488 params: GetKeyExecutivesParams,
3489) -> Result<models::GetKeyExecutives200ResponseEnum, Error<GetKeyExecutivesError>> {
3490 let p_query_symbol = params.symbol;
3492 let p_query_figi = params.figi;
3493 let p_query_isin = params.isin;
3494 let p_query_cusip = params.cusip;
3495 let p_query_exchange = params.exchange;
3496 let p_query_mic_code = params.mic_code;
3497 let p_query_country = params.country;
3498
3499 let uri_str = format!("{}/key_executives", configuration.base_path);
3500 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3501
3502 if let Some(ref param_value) = p_query_symbol {
3503 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3504 }
3505 if let Some(ref param_value) = p_query_figi {
3506 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
3507 }
3508 if let Some(ref param_value) = p_query_isin {
3509 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
3510 }
3511 if let Some(ref param_value) = p_query_cusip {
3512 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
3513 }
3514 if let Some(ref param_value) = p_query_exchange {
3515 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3516 }
3517 if let Some(ref param_value) = p_query_mic_code {
3518 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3519 }
3520 if let Some(ref param_value) = p_query_country {
3521 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3522 }
3523 if let Some(ref user_agent) = configuration.user_agent {
3524 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3525 }
3526 if let Some(ref apikey) = configuration.api_key {
3527 let key = apikey.key.clone();
3528 let value = match apikey.prefix {
3529 Some(ref prefix) => format!("{} {}", prefix, key),
3530 None => key,
3531 };
3532 req_builder = req_builder.header("Authorization", value);
3533 };
3534
3535 let req = req_builder.build()?;
3536 let resp = configuration.client.execute(req).await?;
3537
3538 let status = resp.status();
3539 let content_type = resp
3540 .headers()
3541 .get("content-type")
3542 .and_then(|v| v.to_str().ok())
3543 .unwrap_or("application/octet-stream");
3544 let content_type = super::ContentType::from(content_type);
3545
3546 if !status.is_client_error() && !status.is_server_error() {
3547 let content = resp.text().await?;
3548 match content_type {
3549 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3550 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetKeyExecutives200ResponseEnum`"))),
3551 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::GetKeyExecutives200ResponseEnum`")))),
3552 }
3553 } else {
3554 let content = resp.text().await?;
3555 let entity: Option<GetKeyExecutivesError> = serde_json::from_str(&content).ok();
3556 Err(Error::ResponseError(ResponseContent {
3557 status,
3558 content,
3559 entity,
3560 }))
3561 }
3562}
3563
3564pub async fn get_last_changes(
3566 configuration: &configuration::Configuration,
3567 params: GetLastChangesParams,
3568) -> Result<models::GetLastChanges200ResponseEnum, Error<GetLastChangesError>> {
3569 let p_path_endpoint = params.endpoint;
3571 let p_query_start_date = params.start_date;
3572 let p_query_symbol = params.symbol;
3573 let p_query_exchange = params.exchange;
3574 let p_query_mic_code = params.mic_code;
3575 let p_query_country = params.country;
3576 let p_query_page = params.page;
3577 let p_query_outputsize = params.outputsize;
3578
3579 let uri_str = format!(
3580 "{}/last_change/{endpoint}",
3581 configuration.base_path,
3582 endpoint = crate::apis::urlencode(p_path_endpoint)
3583 );
3584 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3585
3586 if let Some(ref param_value) = p_query_start_date {
3587 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3588 }
3589 if let Some(ref param_value) = p_query_symbol {
3590 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3591 }
3592 if let Some(ref param_value) = p_query_exchange {
3593 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3594 }
3595 if let Some(ref param_value) = p_query_mic_code {
3596 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3597 }
3598 if let Some(ref param_value) = p_query_country {
3599 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3600 }
3601 if let Some(ref param_value) = p_query_page {
3602 req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
3603 }
3604 if let Some(ref param_value) = p_query_outputsize {
3605 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
3606 }
3607 if let Some(ref user_agent) = configuration.user_agent {
3608 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3609 }
3610 if let Some(ref apikey) = configuration.api_key {
3611 let key = apikey.key.clone();
3612 let value = match apikey.prefix {
3613 Some(ref prefix) => format!("{} {}", prefix, key),
3614 None => key,
3615 };
3616 req_builder = req_builder.header("Authorization", value);
3617 };
3618
3619 let req = req_builder.build()?;
3620 let resp = configuration.client.execute(req).await?;
3621
3622 let status = resp.status();
3623 let content_type = resp
3624 .headers()
3625 .get("content-type")
3626 .and_then(|v| v.to_str().ok())
3627 .unwrap_or("application/octet-stream");
3628 let content_type = super::ContentType::from(content_type);
3629
3630 if !status.is_client_error() && !status.is_server_error() {
3631 let content = resp.text().await?;
3632 match content_type {
3633 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3634 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetLastChanges200ResponseEnum`"))),
3635 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::GetLastChanges200ResponseEnum`")))),
3636 }
3637 } else {
3638 let content = resp.text().await?;
3639 let entity: Option<GetLastChangesError> = serde_json::from_str(&content).ok();
3640 Err(Error::ResponseError(ResponseContent {
3641 status,
3642 content,
3643 entity,
3644 }))
3645 }
3646}
3647
3648pub async fn get_logo(
3650 configuration: &configuration::Configuration,
3651 params: GetLogoParams,
3652) -> Result<models::GetLogo200ResponseEnum, Error<GetLogoError>> {
3653 let p_query_symbol = params.symbol;
3655 let p_query_exchange = params.exchange;
3656 let p_query_mic_code = params.mic_code;
3657 let p_query_country = params.country;
3658
3659 let uri_str = format!("{}/logo", configuration.base_path);
3660 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3661
3662 req_builder = req_builder.query(&[("symbol", &p_query_symbol.to_string())]);
3663 if let Some(ref param_value) = p_query_exchange {
3664 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3665 }
3666 if let Some(ref param_value) = p_query_mic_code {
3667 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3668 }
3669 if let Some(ref param_value) = p_query_country {
3670 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3671 }
3672 if let Some(ref user_agent) = configuration.user_agent {
3673 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3674 }
3675 if let Some(ref apikey) = configuration.api_key {
3676 let key = apikey.key.clone();
3677 let value = match apikey.prefix {
3678 Some(ref prefix) => format!("{} {}", prefix, key),
3679 None => key,
3680 };
3681 req_builder = req_builder.header("Authorization", value);
3682 };
3683
3684 let req = req_builder.build()?;
3685 let resp = configuration.client.execute(req).await?;
3686
3687 let status = resp.status();
3688 let content_type = resp
3689 .headers()
3690 .get("content-type")
3691 .and_then(|v| v.to_str().ok())
3692 .unwrap_or("application/octet-stream");
3693 let content_type = super::ContentType::from(content_type);
3694
3695 if !status.is_client_error() && !status.is_server_error() {
3696 let content = resp.text().await?;
3697 match content_type {
3698 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3699 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetLogo200ResponseEnum`"))),
3700 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::GetLogo200ResponseEnum`")))),
3701 }
3702 } else {
3703 let content = resp.text().await?;
3704 let entity: Option<GetLogoError> = serde_json::from_str(&content).ok();
3705 Err(Error::ResponseError(ResponseContent {
3706 status,
3707 content,
3708 entity,
3709 }))
3710 }
3711}
3712
3713pub async fn get_market_cap(
3715 configuration: &configuration::Configuration,
3716 params: GetMarketCapParams,
3717) -> Result<models::GetMarketCap200ResponseEnum, Error<GetMarketCapError>> {
3718 let p_query_symbol = params.symbol;
3720 let p_query_figi = params.figi;
3721 let p_query_isin = params.isin;
3722 let p_query_cusip = params.cusip;
3723 let p_query_exchange = params.exchange;
3724 let p_query_mic_code = params.mic_code;
3725 let p_query_country = params.country;
3726 let p_query_start_date = params.start_date;
3727 let p_query_end_date = params.end_date;
3728 let p_query_page = params.page;
3729 let p_query_outputsize = params.outputsize;
3730
3731 let uri_str = format!("{}/market_cap", configuration.base_path);
3732 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3733
3734 if let Some(ref param_value) = p_query_symbol {
3735 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3736 }
3737 if let Some(ref param_value) = p_query_figi {
3738 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
3739 }
3740 if let Some(ref param_value) = p_query_isin {
3741 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
3742 }
3743 if let Some(ref param_value) = p_query_cusip {
3744 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
3745 }
3746 if let Some(ref param_value) = p_query_exchange {
3747 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3748 }
3749 if let Some(ref param_value) = p_query_mic_code {
3750 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3751 }
3752 if let Some(ref param_value) = p_query_country {
3753 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3754 }
3755 if let Some(ref param_value) = p_query_start_date {
3756 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3757 }
3758 if let Some(ref param_value) = p_query_end_date {
3759 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
3760 }
3761 if let Some(ref param_value) = p_query_page {
3762 req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
3763 }
3764 if let Some(ref param_value) = p_query_outputsize {
3765 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
3766 }
3767 if let Some(ref user_agent) = configuration.user_agent {
3768 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3769 }
3770 if let Some(ref apikey) = configuration.api_key {
3771 let key = apikey.key.clone();
3772 let value = match apikey.prefix {
3773 Some(ref prefix) => format!("{} {}", prefix, key),
3774 None => key,
3775 };
3776 req_builder = req_builder.header("Authorization", value);
3777 };
3778
3779 let req = req_builder.build()?;
3780 let resp = configuration.client.execute(req).await?;
3781
3782 let status = resp.status();
3783 let content_type = resp
3784 .headers()
3785 .get("content-type")
3786 .and_then(|v| v.to_str().ok())
3787 .unwrap_or("application/octet-stream");
3788 let content_type = super::ContentType::from(content_type);
3789
3790 if !status.is_client_error() && !status.is_server_error() {
3791 let content = resp.text().await?;
3792 match content_type {
3793 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3794 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetMarketCap200ResponseEnum`"))),
3795 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::GetMarketCap200ResponseEnum`")))),
3796 }
3797 } else {
3798 let content = resp.text().await?;
3799 let entity: Option<GetMarketCapError> = serde_json::from_str(&content).ok();
3800 Err(Error::ResponseError(ResponseContent {
3801 status,
3802 content,
3803 entity,
3804 }))
3805 }
3806}
3807
3808pub async fn get_profile(
3810 configuration: &configuration::Configuration,
3811 params: GetProfileParams,
3812) -> Result<models::GetProfile200ResponseEnum, Error<GetProfileError>> {
3813 let p_query_symbol = params.symbol;
3815 let p_query_figi = params.figi;
3816 let p_query_isin = params.isin;
3817 let p_query_cusip = params.cusip;
3818 let p_query_exchange = params.exchange;
3819 let p_query_mic_code = params.mic_code;
3820 let p_query_country = params.country;
3821
3822 let uri_str = format!("{}/profile", configuration.base_path);
3823 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3824
3825 if let Some(ref param_value) = p_query_symbol {
3826 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3827 }
3828 if let Some(ref param_value) = p_query_figi {
3829 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
3830 }
3831 if let Some(ref param_value) = p_query_isin {
3832 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
3833 }
3834 if let Some(ref param_value) = p_query_cusip {
3835 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
3836 }
3837 if let Some(ref param_value) = p_query_exchange {
3838 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3839 }
3840 if let Some(ref param_value) = p_query_mic_code {
3841 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3842 }
3843 if let Some(ref param_value) = p_query_country {
3844 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3845 }
3846 if let Some(ref user_agent) = configuration.user_agent {
3847 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3848 }
3849 if let Some(ref apikey) = configuration.api_key {
3850 let key = apikey.key.clone();
3851 let value = match apikey.prefix {
3852 Some(ref prefix) => format!("{} {}", prefix, key),
3853 None => key,
3854 };
3855 req_builder = req_builder.header("Authorization", value);
3856 };
3857
3858 let req = req_builder.build()?;
3859 let resp = configuration.client.execute(req).await?;
3860
3861 let status = resp.status();
3862 let content_type = resp
3863 .headers()
3864 .get("content-type")
3865 .and_then(|v| v.to_str().ok())
3866 .unwrap_or("application/octet-stream");
3867 let content_type = super::ContentType::from(content_type);
3868
3869 if !status.is_client_error() && !status.is_server_error() {
3870 let content = resp.text().await?;
3871 match content_type {
3872 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3873 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetProfile200ResponseEnum`"))),
3874 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::GetProfile200ResponseEnum`")))),
3875 }
3876 } else {
3877 let content = resp.text().await?;
3878 let entity: Option<GetProfileError> = serde_json::from_str(&content).ok();
3879 Err(Error::ResponseError(ResponseContent {
3880 status,
3881 content,
3882 entity,
3883 }))
3884 }
3885}
3886
3887pub async fn get_splits(
3889 configuration: &configuration::Configuration,
3890 params: GetSplitsParams,
3891) -> Result<models::GetSplits200ResponseEnum, Error<GetSplitsError>> {
3892 let p_query_symbol = params.symbol;
3894 let p_query_figi = params.figi;
3895 let p_query_isin = params.isin;
3896 let p_query_cusip = params.cusip;
3897 let p_query_exchange = params.exchange;
3898 let p_query_mic_code = params.mic_code;
3899 let p_query_country = params.country;
3900 let p_query_range = params.range;
3901 let p_query_start_date = params.start_date;
3902 let p_query_end_date = params.end_date;
3903
3904 let uri_str = format!("{}/splits", 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", ¶m_value.to_string())]);
3909 }
3910 if let Some(ref param_value) = p_query_figi {
3911 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
3912 }
3913 if let Some(ref param_value) = p_query_isin {
3914 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
3915 }
3916 if let Some(ref param_value) = p_query_cusip {
3917 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
3918 }
3919 if let Some(ref param_value) = p_query_exchange {
3920 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3921 }
3922 if let Some(ref param_value) = p_query_mic_code {
3923 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3924 }
3925 if let Some(ref param_value) = p_query_country {
3926 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3927 }
3928 if let Some(ref param_value) = p_query_range {
3929 req_builder = req_builder.query(&[("range", ¶m_value.to_string())]);
3930 }
3931 if let Some(ref param_value) = p_query_start_date {
3932 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3933 }
3934 if let Some(ref param_value) = p_query_end_date {
3935 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
3936 }
3937 if let Some(ref user_agent) = configuration.user_agent {
3938 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3939 }
3940 if let Some(ref apikey) = configuration.api_key {
3941 let key = apikey.key.clone();
3942 let value = match apikey.prefix {
3943 Some(ref prefix) => format!("{} {}", prefix, key),
3944 None => key,
3945 };
3946 req_builder = req_builder.header("Authorization", value);
3947 };
3948
3949 let req = req_builder.build()?;
3950 let resp = configuration.client.execute(req).await?;
3951
3952 let status = resp.status();
3953 let content_type = resp
3954 .headers()
3955 .get("content-type")
3956 .and_then(|v| v.to_str().ok())
3957 .unwrap_or("application/octet-stream");
3958 let content_type = super::ContentType::from(content_type);
3959
3960 if !status.is_client_error() && !status.is_server_error() {
3961 let content = resp.text().await?;
3962 match content_type {
3963 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3964 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetSplits200ResponseEnum`"))),
3965 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::GetSplits200ResponseEnum`")))),
3966 }
3967 } else {
3968 let content = resp.text().await?;
3969 let entity: Option<GetSplitsError> = serde_json::from_str(&content).ok();
3970 Err(Error::ResponseError(ResponseContent {
3971 status,
3972 content,
3973 entity,
3974 }))
3975 }
3976}
3977
3978pub async fn get_splits_calendar(
3980 configuration: &configuration::Configuration,
3981 params: GetSplitsCalendarParams,
3982) -> Result<models::GetSplitsCalendar200ResponseEnum, Error<GetSplitsCalendarError>> {
3983 let p_query_symbol = params.symbol;
3985 let p_query_figi = params.figi;
3986 let p_query_isin = params.isin;
3987 let p_query_cusip = params.cusip;
3988 let p_query_exchange = params.exchange;
3989 let p_query_mic_code = params.mic_code;
3990 let p_query_country = params.country;
3991 let p_query_start_date = params.start_date;
3992 let p_query_end_date = params.end_date;
3993 let p_query_outputsize = params.outputsize;
3994 let p_query_page = params.page;
3995
3996 let uri_str = format!("{}/splits_calendar", configuration.base_path);
3997 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3998
3999 if let Some(ref param_value) = p_query_symbol {
4000 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
4001 }
4002 if let Some(ref param_value) = p_query_figi {
4003 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
4004 }
4005 if let Some(ref param_value) = p_query_isin {
4006 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
4007 }
4008 if let Some(ref param_value) = p_query_cusip {
4009 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
4010 }
4011 if let Some(ref param_value) = p_query_exchange {
4012 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
4013 }
4014 if let Some(ref param_value) = p_query_mic_code {
4015 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
4016 }
4017 if let Some(ref param_value) = p_query_country {
4018 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
4019 }
4020 if let Some(ref param_value) = p_query_start_date {
4021 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
4022 }
4023 if let Some(ref param_value) = p_query_end_date {
4024 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
4025 }
4026 if let Some(ref param_value) = p_query_outputsize {
4027 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
4028 }
4029 if let Some(ref param_value) = p_query_page {
4030 req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
4031 }
4032 if let Some(ref user_agent) = configuration.user_agent {
4033 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4034 }
4035 if let Some(ref apikey) = configuration.api_key {
4036 let key = apikey.key.clone();
4037 let value = match apikey.prefix {
4038 Some(ref prefix) => format!("{} {}", prefix, key),
4039 None => key,
4040 };
4041 req_builder = req_builder.header("Authorization", value);
4042 };
4043
4044 let req = req_builder.build()?;
4045 let resp = configuration.client.execute(req).await?;
4046
4047 let status = resp.status();
4048 let content_type = resp
4049 .headers()
4050 .get("content-type")
4051 .and_then(|v| v.to_str().ok())
4052 .unwrap_or("application/octet-stream");
4053 let content_type = super::ContentType::from(content_type);
4054
4055 if !status.is_client_error() && !status.is_server_error() {
4056 let content = resp.text().await?;
4057 match content_type {
4058 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4059 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetSplitsCalendar200ResponseEnum`"))),
4060 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::GetSplitsCalendar200ResponseEnum`")))),
4061 }
4062 } else {
4063 let content = resp.text().await?;
4064 let entity: Option<GetSplitsCalendarError> = serde_json::from_str(&content).ok();
4065 Err(Error::ResponseError(ResponseContent {
4066 status,
4067 content,
4068 entity,
4069 }))
4070 }
4071}
4072
4073pub async fn get_statistics(
4075 configuration: &configuration::Configuration,
4076 params: GetStatisticsParams,
4077) -> Result<models::GetStatistics200ResponseEnum, Error<GetStatisticsError>> {
4078 let p_query_symbol = params.symbol;
4080 let p_query_figi = params.figi;
4081 let p_query_isin = params.isin;
4082 let p_query_cusip = params.cusip;
4083 let p_query_exchange = params.exchange;
4084 let p_query_mic_code = params.mic_code;
4085 let p_query_country = params.country;
4086
4087 let uri_str = format!("{}/statistics", configuration.base_path);
4088 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4089
4090 if let Some(ref param_value) = p_query_symbol {
4091 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
4092 }
4093 if let Some(ref param_value) = p_query_figi {
4094 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
4095 }
4096 if let Some(ref param_value) = p_query_isin {
4097 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
4098 }
4099 if let Some(ref param_value) = p_query_cusip {
4100 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
4101 }
4102 if let Some(ref param_value) = p_query_exchange {
4103 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
4104 }
4105 if let Some(ref param_value) = p_query_mic_code {
4106 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
4107 }
4108 if let Some(ref param_value) = p_query_country {
4109 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
4110 }
4111 if let Some(ref user_agent) = configuration.user_agent {
4112 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4113 }
4114 if let Some(ref apikey) = configuration.api_key {
4115 let key = apikey.key.clone();
4116 let value = match apikey.prefix {
4117 Some(ref prefix) => format!("{} {}", prefix, key),
4118 None => key,
4119 };
4120 req_builder = req_builder.header("Authorization", value);
4121 };
4122
4123 let req = req_builder.build()?;
4124 let resp = configuration.client.execute(req).await?;
4125
4126 let status = resp.status();
4127 let content_type = resp
4128 .headers()
4129 .get("content-type")
4130 .and_then(|v| v.to_str().ok())
4131 .unwrap_or("application/octet-stream");
4132 let content_type = super::ContentType::from(content_type);
4133
4134 if !status.is_client_error() && !status.is_server_error() {
4135 let content = resp.text().await?;
4136 match content_type {
4137 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4138 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/*` content type response that cannot be converted to `models::GetStatistics200ResponseEnum`"))),
4139 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::GetStatistics200ResponseEnum`")))),
4140 }
4141 } else {
4142 let content = resp.text().await?;
4143 let entity: Option<GetStatisticsError> = serde_json::from_str(&content).ok();
4144 Err(Error::ResponseError(ResponseContent {
4145 status,
4146 content,
4147 entity,
4148 }))
4149 }
4150}