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