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