1use reqwest;
13use serde::{Deserialize, Serialize, de::Error as _};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration, ContentType};
16
17#[derive(Clone, Debug, Default, Serialize, Deserialize)]
19pub struct GetBalanceSheetParams {
20 pub symbol: Option<String>,
22 pub figi: Option<String>,
24 pub isin: Option<String>,
26 pub cusip: Option<String>,
28 pub exchange: Option<String>,
30 pub mic_code: Option<String>,
32 pub country: Option<String>,
34 pub period: Option<String>,
36 pub start_date: Option<String>,
38 pub end_date: Option<String>,
40 pub outputsize: Option<i64>
42}
43
44impl GetBalanceSheetParams {
45 pub fn builder() -> GetBalanceSheetParamsBuilder {
47 GetBalanceSheetParamsBuilder::default()
48 }
49}
50
51#[derive(Clone, Debug, Default)]
53pub struct GetBalanceSheetParamsBuilder {
54 symbol: Option<String>,
56 figi: Option<String>,
58 isin: Option<String>,
60 cusip: Option<String>,
62 exchange: Option<String>,
64 mic_code: Option<String>,
66 country: Option<String>,
68 period: Option<String>,
70 start_date: Option<String>,
72 end_date: Option<String>,
74 outputsize: Option<i64>
76}
77
78impl GetBalanceSheetParamsBuilder {
79 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
81 self.symbol = Some(symbol.into());
82 self
83 }
84 pub fn figi(mut self, figi: impl Into<String>) -> Self {
86 self.figi = Some(figi.into());
87 self
88 }
89 pub fn isin(mut self, isin: impl Into<String>) -> Self {
91 self.isin = Some(isin.into());
92 self
93 }
94 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
96 self.cusip = Some(cusip.into());
97 self
98 }
99 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
101 self.exchange = Some(exchange.into());
102 self
103 }
104 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
106 self.mic_code = Some(mic_code.into());
107 self
108 }
109 pub fn country(mut self, country: impl Into<String>) -> Self {
111 self.country = Some(country.into());
112 self
113 }
114 pub fn period(mut self, period: impl Into<String>) -> Self {
116 self.period = Some(period.into());
117 self
118 }
119 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
121 self.start_date = Some(start_date.into());
122 self
123 }
124 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
126 self.end_date = Some(end_date.into());
127 self
128 }
129 pub fn outputsize(mut self, outputsize: i64) -> Self {
131 self.outputsize = Some(outputsize);
132 self
133 }
134
135 pub fn build(self) -> GetBalanceSheetParams {
137 GetBalanceSheetParams {
138 symbol: self.symbol,
139 figi: self.figi,
140 isin: self.isin,
141 cusip: self.cusip,
142 exchange: self.exchange,
143 mic_code: self.mic_code,
144 country: self.country,
145 period: self.period,
146 start_date: self.start_date,
147 end_date: self.end_date,
148 outputsize: self.outputsize
149 }
150 }
151}
152
153#[derive(Clone, Debug, Default, Serialize, Deserialize)]
155pub struct GetBalanceSheetConsolidatedParams {
156 pub symbol: Option<String>,
158 pub figi: Option<String>,
160 pub isin: Option<String>,
162 pub cusip: Option<String>,
164 pub exchange: Option<String>,
166 pub mic_code: Option<String>,
168 pub country: Option<String>,
170 pub period: Option<String>,
172 pub start_date: Option<String>,
174 pub end_date: Option<String>,
176 pub outputsize: Option<i64>
178}
179
180impl GetBalanceSheetConsolidatedParams {
181 pub fn builder() -> GetBalanceSheetConsolidatedParamsBuilder {
183 GetBalanceSheetConsolidatedParamsBuilder::default()
184 }
185}
186
187#[derive(Clone, Debug, Default)]
189pub struct GetBalanceSheetConsolidatedParamsBuilder {
190 symbol: Option<String>,
192 figi: Option<String>,
194 isin: Option<String>,
196 cusip: Option<String>,
198 exchange: Option<String>,
200 mic_code: Option<String>,
202 country: Option<String>,
204 period: Option<String>,
206 start_date: Option<String>,
208 end_date: Option<String>,
210 outputsize: Option<i64>
212}
213
214impl GetBalanceSheetConsolidatedParamsBuilder {
215 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
217 self.symbol = Some(symbol.into());
218 self
219 }
220 pub fn figi(mut self, figi: impl Into<String>) -> Self {
222 self.figi = Some(figi.into());
223 self
224 }
225 pub fn isin(mut self, isin: impl Into<String>) -> Self {
227 self.isin = Some(isin.into());
228 self
229 }
230 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
232 self.cusip = Some(cusip.into());
233 self
234 }
235 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
237 self.exchange = Some(exchange.into());
238 self
239 }
240 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
242 self.mic_code = Some(mic_code.into());
243 self
244 }
245 pub fn country(mut self, country: impl Into<String>) -> Self {
247 self.country = Some(country.into());
248 self
249 }
250 pub fn period(mut self, period: impl Into<String>) -> Self {
252 self.period = Some(period.into());
253 self
254 }
255 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
257 self.start_date = Some(start_date.into());
258 self
259 }
260 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
262 self.end_date = Some(end_date.into());
263 self
264 }
265 pub fn outputsize(mut self, outputsize: i64) -> Self {
267 self.outputsize = Some(outputsize);
268 self
269 }
270
271 pub fn build(self) -> GetBalanceSheetConsolidatedParams {
273 GetBalanceSheetConsolidatedParams {
274 symbol: self.symbol,
275 figi: self.figi,
276 isin: self.isin,
277 cusip: self.cusip,
278 exchange: self.exchange,
279 mic_code: self.mic_code,
280 country: self.country,
281 period: self.period,
282 start_date: self.start_date,
283 end_date: self.end_date,
284 outputsize: self.outputsize
285 }
286 }
287}
288
289#[derive(Clone, Debug, Default, Serialize, Deserialize)]
291pub struct GetCashFlowParams {
292 pub symbol: Option<String>,
294 pub figi: Option<String>,
296 pub isin: Option<String>,
298 pub cusip: Option<String>,
300 pub exchange: Option<String>,
302 pub mic_code: Option<String>,
304 pub country: Option<String>,
306 pub period: Option<String>,
308 pub start_date: Option<String>,
310 pub end_date: Option<String>,
312 pub outputsize: Option<i64>
314}
315
316impl GetCashFlowParams {
317 pub fn builder() -> GetCashFlowParamsBuilder {
319 GetCashFlowParamsBuilder::default()
320 }
321}
322
323#[derive(Clone, Debug, Default)]
325pub struct GetCashFlowParamsBuilder {
326 symbol: Option<String>,
328 figi: Option<String>,
330 isin: Option<String>,
332 cusip: Option<String>,
334 exchange: Option<String>,
336 mic_code: Option<String>,
338 country: Option<String>,
340 period: Option<String>,
342 start_date: Option<String>,
344 end_date: Option<String>,
346 outputsize: Option<i64>
348}
349
350impl GetCashFlowParamsBuilder {
351 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
353 self.symbol = Some(symbol.into());
354 self
355 }
356 pub fn figi(mut self, figi: impl Into<String>) -> Self {
358 self.figi = Some(figi.into());
359 self
360 }
361 pub fn isin(mut self, isin: impl Into<String>) -> Self {
363 self.isin = Some(isin.into());
364 self
365 }
366 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
368 self.cusip = Some(cusip.into());
369 self
370 }
371 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
373 self.exchange = Some(exchange.into());
374 self
375 }
376 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
378 self.mic_code = Some(mic_code.into());
379 self
380 }
381 pub fn country(mut self, country: impl Into<String>) -> Self {
383 self.country = Some(country.into());
384 self
385 }
386 pub fn period(mut self, period: impl Into<String>) -> Self {
388 self.period = Some(period.into());
389 self
390 }
391 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
393 self.start_date = Some(start_date.into());
394 self
395 }
396 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
398 self.end_date = Some(end_date.into());
399 self
400 }
401 pub fn outputsize(mut self, outputsize: i64) -> Self {
403 self.outputsize = Some(outputsize);
404 self
405 }
406
407 pub fn build(self) -> GetCashFlowParams {
409 GetCashFlowParams {
410 symbol: self.symbol,
411 figi: self.figi,
412 isin: self.isin,
413 cusip: self.cusip,
414 exchange: self.exchange,
415 mic_code: self.mic_code,
416 country: self.country,
417 period: self.period,
418 start_date: self.start_date,
419 end_date: self.end_date,
420 outputsize: self.outputsize
421 }
422 }
423}
424
425#[derive(Clone, Debug, Default, Serialize, Deserialize)]
427pub struct GetCashFlowConsolidatedParams {
428 pub symbol: Option<String>,
430 pub figi: Option<String>,
432 pub isin: Option<String>,
434 pub cusip: Option<String>,
436 pub exchange: Option<String>,
438 pub mic_code: Option<String>,
440 pub country: Option<String>,
442 pub period: Option<String>,
444 pub start_date: Option<String>,
446 pub end_date: Option<String>,
448 pub outputsize: Option<i64>
450}
451
452impl GetCashFlowConsolidatedParams {
453 pub fn builder() -> GetCashFlowConsolidatedParamsBuilder {
455 GetCashFlowConsolidatedParamsBuilder::default()
456 }
457}
458
459#[derive(Clone, Debug, Default)]
461pub struct GetCashFlowConsolidatedParamsBuilder {
462 symbol: Option<String>,
464 figi: Option<String>,
466 isin: Option<String>,
468 cusip: Option<String>,
470 exchange: Option<String>,
472 mic_code: Option<String>,
474 country: Option<String>,
476 period: Option<String>,
478 start_date: Option<String>,
480 end_date: Option<String>,
482 outputsize: Option<i64>
484}
485
486impl GetCashFlowConsolidatedParamsBuilder {
487 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
489 self.symbol = Some(symbol.into());
490 self
491 }
492 pub fn figi(mut self, figi: impl Into<String>) -> Self {
494 self.figi = Some(figi.into());
495 self
496 }
497 pub fn isin(mut self, isin: impl Into<String>) -> Self {
499 self.isin = Some(isin.into());
500 self
501 }
502 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
504 self.cusip = Some(cusip.into());
505 self
506 }
507 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
509 self.exchange = Some(exchange.into());
510 self
511 }
512 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
514 self.mic_code = Some(mic_code.into());
515 self
516 }
517 pub fn country(mut self, country: impl Into<String>) -> Self {
519 self.country = Some(country.into());
520 self
521 }
522 pub fn period(mut self, period: impl Into<String>) -> Self {
524 self.period = Some(period.into());
525 self
526 }
527 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
529 self.start_date = Some(start_date.into());
530 self
531 }
532 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
534 self.end_date = Some(end_date.into());
535 self
536 }
537 pub fn outputsize(mut self, outputsize: i64) -> Self {
539 self.outputsize = Some(outputsize);
540 self
541 }
542
543 pub fn build(self) -> GetCashFlowConsolidatedParams {
545 GetCashFlowConsolidatedParams {
546 symbol: self.symbol,
547 figi: self.figi,
548 isin: self.isin,
549 cusip: self.cusip,
550 exchange: self.exchange,
551 mic_code: self.mic_code,
552 country: self.country,
553 period: self.period,
554 start_date: self.start_date,
555 end_date: self.end_date,
556 outputsize: self.outputsize
557 }
558 }
559}
560
561#[derive(Clone, Debug, Default, Serialize, Deserialize)]
563pub struct GetDividendsParams {
564 pub symbol: Option<String>,
566 pub figi: Option<String>,
568 pub isin: Option<String>,
570 pub cusip: Option<String>,
572 pub exchange: Option<String>,
574 pub mic_code: Option<String>,
576 pub country: Option<String>,
578 pub range: Option<String>,
580 pub start_date: Option<String>,
582 pub end_date: Option<String>,
584 pub adjust: Option<bool>
586}
587
588impl GetDividendsParams {
589 pub fn builder() -> GetDividendsParamsBuilder {
591 GetDividendsParamsBuilder::default()
592 }
593}
594
595#[derive(Clone, Debug, Default)]
597pub struct GetDividendsParamsBuilder {
598 symbol: Option<String>,
600 figi: Option<String>,
602 isin: Option<String>,
604 cusip: Option<String>,
606 exchange: Option<String>,
608 mic_code: Option<String>,
610 country: Option<String>,
612 range: Option<String>,
614 start_date: Option<String>,
616 end_date: Option<String>,
618 adjust: Option<bool>
620}
621
622impl GetDividendsParamsBuilder {
623 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
625 self.symbol = Some(symbol.into());
626 self
627 }
628 pub fn figi(mut self, figi: impl Into<String>) -> Self {
630 self.figi = Some(figi.into());
631 self
632 }
633 pub fn isin(mut self, isin: impl Into<String>) -> Self {
635 self.isin = Some(isin.into());
636 self
637 }
638 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
640 self.cusip = Some(cusip.into());
641 self
642 }
643 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
645 self.exchange = Some(exchange.into());
646 self
647 }
648 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
650 self.mic_code = Some(mic_code.into());
651 self
652 }
653 pub fn country(mut self, country: impl Into<String>) -> Self {
655 self.country = Some(country.into());
656 self
657 }
658 pub fn range(mut self, range: impl Into<String>) -> Self {
660 self.range = Some(range.into());
661 self
662 }
663 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
665 self.start_date = Some(start_date.into());
666 self
667 }
668 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
670 self.end_date = Some(end_date.into());
671 self
672 }
673 pub fn adjust(mut self, adjust: bool) -> Self {
675 self.adjust = Some(adjust);
676 self
677 }
678
679 pub fn build(self) -> GetDividendsParams {
681 GetDividendsParams {
682 symbol: self.symbol,
683 figi: self.figi,
684 isin: self.isin,
685 cusip: self.cusip,
686 exchange: self.exchange,
687 mic_code: self.mic_code,
688 country: self.country,
689 range: self.range,
690 start_date: self.start_date,
691 end_date: self.end_date,
692 adjust: self.adjust
693 }
694 }
695}
696
697#[derive(Clone, Debug, Default, Serialize, Deserialize)]
699pub struct GetDividendsCalendarParams {
700 pub symbol: Option<String>,
702 pub figi: Option<String>,
704 pub isin: Option<String>,
706 pub cusip: Option<String>,
708 pub exchange: Option<String>,
710 pub mic_code: Option<String>,
712 pub country: Option<String>,
714 pub start_date: Option<String>,
716 pub end_date: Option<String>,
718 pub outputsize: Option<i64>,
720 pub page: Option<i64>
722}
723
724impl GetDividendsCalendarParams {
725 pub fn builder() -> GetDividendsCalendarParamsBuilder {
727 GetDividendsCalendarParamsBuilder::default()
728 }
729}
730
731#[derive(Clone, Debug, Default)]
733pub struct GetDividendsCalendarParamsBuilder {
734 symbol: Option<String>,
736 figi: Option<String>,
738 isin: Option<String>,
740 cusip: Option<String>,
742 exchange: Option<String>,
744 mic_code: Option<String>,
746 country: Option<String>,
748 start_date: Option<String>,
750 end_date: Option<String>,
752 outputsize: Option<i64>,
754 page: Option<i64>
756}
757
758impl GetDividendsCalendarParamsBuilder {
759 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
761 self.symbol = Some(symbol.into());
762 self
763 }
764 pub fn figi(mut self, figi: impl Into<String>) -> Self {
766 self.figi = Some(figi.into());
767 self
768 }
769 pub fn isin(mut self, isin: impl Into<String>) -> Self {
771 self.isin = Some(isin.into());
772 self
773 }
774 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
776 self.cusip = Some(cusip.into());
777 self
778 }
779 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
781 self.exchange = Some(exchange.into());
782 self
783 }
784 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
786 self.mic_code = Some(mic_code.into());
787 self
788 }
789 pub fn country(mut self, country: impl Into<String>) -> Self {
791 self.country = Some(country.into());
792 self
793 }
794 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
796 self.start_date = Some(start_date.into());
797 self
798 }
799 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
801 self.end_date = Some(end_date.into());
802 self
803 }
804 pub fn outputsize(mut self, outputsize: i64) -> Self {
806 self.outputsize = Some(outputsize);
807 self
808 }
809 pub fn page(mut self, page: i64) -> Self {
811 self.page = Some(page);
812 self
813 }
814
815 pub fn build(self) -> GetDividendsCalendarParams {
817 GetDividendsCalendarParams {
818 symbol: self.symbol,
819 figi: self.figi,
820 isin: self.isin,
821 cusip: self.cusip,
822 exchange: self.exchange,
823 mic_code: self.mic_code,
824 country: self.country,
825 start_date: self.start_date,
826 end_date: self.end_date,
827 outputsize: self.outputsize,
828 page: self.page
829 }
830 }
831}
832
833#[derive(Clone, Debug, Default, Serialize, Deserialize)]
835pub struct GetEarningsParams {
836 pub symbol: Option<String>,
838 pub figi: Option<String>,
840 pub isin: Option<String>,
842 pub cusip: Option<String>,
844 pub exchange: Option<String>,
846 pub mic_code: Option<String>,
848 pub country: Option<String>,
850 pub r#type: Option<String>,
852 pub period: Option<String>,
854 pub outputsize: Option<i64>,
856 pub format: Option<String>,
858 pub delimiter: Option<String>,
860 pub start_date: Option<String>,
862 pub end_date: Option<String>,
864 pub dp: Option<i64>
866}
867
868impl GetEarningsParams {
869 pub fn builder() -> GetEarningsParamsBuilder {
871 GetEarningsParamsBuilder::default()
872 }
873}
874
875#[derive(Clone, Debug, Default)]
877pub struct GetEarningsParamsBuilder {
878 symbol: Option<String>,
880 figi: Option<String>,
882 isin: Option<String>,
884 cusip: Option<String>,
886 exchange: Option<String>,
888 mic_code: Option<String>,
890 country: Option<String>,
892 r#type: Option<String>,
894 period: Option<String>,
896 outputsize: Option<i64>,
898 format: Option<String>,
900 delimiter: Option<String>,
902 start_date: Option<String>,
904 end_date: Option<String>,
906 dp: Option<i64>
908}
909
910impl GetEarningsParamsBuilder {
911 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
913 self.symbol = Some(symbol.into());
914 self
915 }
916 pub fn figi(mut self, figi: impl Into<String>) -> Self {
918 self.figi = Some(figi.into());
919 self
920 }
921 pub fn isin(mut self, isin: impl Into<String>) -> Self {
923 self.isin = Some(isin.into());
924 self
925 }
926 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
928 self.cusip = Some(cusip.into());
929 self
930 }
931 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
933 self.exchange = Some(exchange.into());
934 self
935 }
936 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
938 self.mic_code = Some(mic_code.into());
939 self
940 }
941 pub fn country(mut self, country: impl Into<String>) -> Self {
943 self.country = Some(country.into());
944 self
945 }
946 pub fn r#type(mut self, r#type: impl Into<String>) -> Self {
948 self.r#type = Some(r#type.into());
949 self
950 }
951 pub fn period(mut self, period: impl Into<String>) -> Self {
953 self.period = Some(period.into());
954 self
955 }
956 pub fn outputsize(mut self, outputsize: i64) -> Self {
958 self.outputsize = Some(outputsize);
959 self
960 }
961 pub fn format(mut self, format: impl Into<String>) -> Self {
963 self.format = Some(format.into());
964 self
965 }
966 pub fn delimiter(mut self, delimiter: impl Into<String>) -> Self {
968 self.delimiter = Some(delimiter.into());
969 self
970 }
971 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
973 self.start_date = Some(start_date.into());
974 self
975 }
976 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
978 self.end_date = Some(end_date.into());
979 self
980 }
981 pub fn dp(mut self, dp: i64) -> Self {
983 self.dp = Some(dp);
984 self
985 }
986
987 pub fn build(self) -> GetEarningsParams {
989 GetEarningsParams {
990 symbol: self.symbol,
991 figi: self.figi,
992 isin: self.isin,
993 cusip: self.cusip,
994 exchange: self.exchange,
995 mic_code: self.mic_code,
996 country: self.country,
997 r#type: self.r#type,
998 period: self.period,
999 outputsize: self.outputsize,
1000 format: self.format,
1001 delimiter: self.delimiter,
1002 start_date: self.start_date,
1003 end_date: self.end_date,
1004 dp: self.dp
1005 }
1006 }
1007}
1008
1009#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1011pub struct GetEarningsCalendarParams {
1012 pub exchange: Option<String>,
1014 pub mic_code: Option<String>,
1016 pub country: Option<String>,
1018 pub format: Option<String>,
1020 pub delimiter: Option<String>,
1022 pub start_date: Option<String>,
1024 pub end_date: Option<String>,
1026 pub dp: Option<i64>
1028}
1029
1030impl GetEarningsCalendarParams {
1031 pub fn builder() -> GetEarningsCalendarParamsBuilder {
1033 GetEarningsCalendarParamsBuilder::default()
1034 }
1035}
1036
1037#[derive(Clone, Debug, Default)]
1039pub struct GetEarningsCalendarParamsBuilder {
1040 exchange: Option<String>,
1042 mic_code: Option<String>,
1044 country: Option<String>,
1046 format: Option<String>,
1048 delimiter: Option<String>,
1050 start_date: Option<String>,
1052 end_date: Option<String>,
1054 dp: Option<i64>
1056}
1057
1058impl GetEarningsCalendarParamsBuilder {
1059 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1061 self.exchange = Some(exchange.into());
1062 self
1063 }
1064 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1066 self.mic_code = Some(mic_code.into());
1067 self
1068 }
1069 pub fn country(mut self, country: impl Into<String>) -> Self {
1071 self.country = Some(country.into());
1072 self
1073 }
1074 pub fn format(mut self, format: impl Into<String>) -> Self {
1076 self.format = Some(format.into());
1077 self
1078 }
1079 pub fn delimiter(mut self, delimiter: impl Into<String>) -> Self {
1081 self.delimiter = Some(delimiter.into());
1082 self
1083 }
1084 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1086 self.start_date = Some(start_date.into());
1087 self
1088 }
1089 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
1091 self.end_date = Some(end_date.into());
1092 self
1093 }
1094 pub fn dp(mut self, dp: i64) -> Self {
1096 self.dp = Some(dp);
1097 self
1098 }
1099
1100 pub fn build(self) -> GetEarningsCalendarParams {
1102 GetEarningsCalendarParams {
1103 exchange: self.exchange,
1104 mic_code: self.mic_code,
1105 country: self.country,
1106 format: self.format,
1107 delimiter: self.delimiter,
1108 start_date: self.start_date,
1109 end_date: self.end_date,
1110 dp: self.dp
1111 }
1112 }
1113}
1114
1115#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1117pub struct GetIncomeStatementParams {
1118 pub symbol: Option<String>,
1120 pub figi: Option<String>,
1122 pub isin: Option<String>,
1124 pub cusip: Option<String>,
1126 pub exchange: Option<String>,
1128 pub mic_code: Option<String>,
1130 pub country: Option<String>,
1132 pub period: Option<String>,
1134 pub start_date: Option<String>,
1136 pub end_date: Option<String>,
1138 pub outputsize: Option<i64>
1140}
1141
1142impl GetIncomeStatementParams {
1143 pub fn builder() -> GetIncomeStatementParamsBuilder {
1145 GetIncomeStatementParamsBuilder::default()
1146 }
1147}
1148
1149#[derive(Clone, Debug, Default)]
1151pub struct GetIncomeStatementParamsBuilder {
1152 symbol: Option<String>,
1154 figi: Option<String>,
1156 isin: Option<String>,
1158 cusip: Option<String>,
1160 exchange: Option<String>,
1162 mic_code: Option<String>,
1164 country: Option<String>,
1166 period: Option<String>,
1168 start_date: Option<String>,
1170 end_date: Option<String>,
1172 outputsize: Option<i64>
1174}
1175
1176impl GetIncomeStatementParamsBuilder {
1177 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1179 self.symbol = Some(symbol.into());
1180 self
1181 }
1182 pub fn figi(mut self, figi: impl Into<String>) -> Self {
1184 self.figi = Some(figi.into());
1185 self
1186 }
1187 pub fn isin(mut self, isin: impl Into<String>) -> Self {
1189 self.isin = Some(isin.into());
1190 self
1191 }
1192 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
1194 self.cusip = Some(cusip.into());
1195 self
1196 }
1197 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1199 self.exchange = Some(exchange.into());
1200 self
1201 }
1202 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1204 self.mic_code = Some(mic_code.into());
1205 self
1206 }
1207 pub fn country(mut self, country: impl Into<String>) -> Self {
1209 self.country = Some(country.into());
1210 self
1211 }
1212 pub fn period(mut self, period: impl Into<String>) -> Self {
1214 self.period = Some(period.into());
1215 self
1216 }
1217 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1219 self.start_date = Some(start_date.into());
1220 self
1221 }
1222 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
1224 self.end_date = Some(end_date.into());
1225 self
1226 }
1227 pub fn outputsize(mut self, outputsize: i64) -> Self {
1229 self.outputsize = Some(outputsize);
1230 self
1231 }
1232
1233 pub fn build(self) -> GetIncomeStatementParams {
1235 GetIncomeStatementParams {
1236 symbol: self.symbol,
1237 figi: self.figi,
1238 isin: self.isin,
1239 cusip: self.cusip,
1240 exchange: self.exchange,
1241 mic_code: self.mic_code,
1242 country: self.country,
1243 period: self.period,
1244 start_date: self.start_date,
1245 end_date: self.end_date,
1246 outputsize: self.outputsize
1247 }
1248 }
1249}
1250
1251#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1253pub struct GetIncomeStatementConsolidatedParams {
1254 pub symbol: Option<String>,
1256 pub figi: Option<String>,
1258 pub isin: Option<String>,
1260 pub cusip: Option<String>,
1262 pub exchange: Option<String>,
1264 pub mic_code: Option<String>,
1266 pub country: Option<String>,
1268 pub period: Option<String>,
1270 pub start_date: Option<String>,
1272 pub end_date: Option<String>,
1274 pub outputsize: Option<i64>
1276}
1277
1278impl GetIncomeStatementConsolidatedParams {
1279 pub fn builder() -> GetIncomeStatementConsolidatedParamsBuilder {
1281 GetIncomeStatementConsolidatedParamsBuilder::default()
1282 }
1283}
1284
1285#[derive(Clone, Debug, Default)]
1287pub struct GetIncomeStatementConsolidatedParamsBuilder {
1288 symbol: Option<String>,
1290 figi: Option<String>,
1292 isin: Option<String>,
1294 cusip: Option<String>,
1296 exchange: Option<String>,
1298 mic_code: Option<String>,
1300 country: Option<String>,
1302 period: Option<String>,
1304 start_date: Option<String>,
1306 end_date: Option<String>,
1308 outputsize: Option<i64>
1310}
1311
1312impl GetIncomeStatementConsolidatedParamsBuilder {
1313 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1315 self.symbol = Some(symbol.into());
1316 self
1317 }
1318 pub fn figi(mut self, figi: impl Into<String>) -> Self {
1320 self.figi = Some(figi.into());
1321 self
1322 }
1323 pub fn isin(mut self, isin: impl Into<String>) -> Self {
1325 self.isin = Some(isin.into());
1326 self
1327 }
1328 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
1330 self.cusip = Some(cusip.into());
1331 self
1332 }
1333 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1335 self.exchange = Some(exchange.into());
1336 self
1337 }
1338 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1340 self.mic_code = Some(mic_code.into());
1341 self
1342 }
1343 pub fn country(mut self, country: impl Into<String>) -> Self {
1345 self.country = Some(country.into());
1346 self
1347 }
1348 pub fn period(mut self, period: impl Into<String>) -> Self {
1350 self.period = Some(period.into());
1351 self
1352 }
1353 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1355 self.start_date = Some(start_date.into());
1356 self
1357 }
1358 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
1360 self.end_date = Some(end_date.into());
1361 self
1362 }
1363 pub fn outputsize(mut self, outputsize: i64) -> Self {
1365 self.outputsize = Some(outputsize);
1366 self
1367 }
1368
1369 pub fn build(self) -> GetIncomeStatementConsolidatedParams {
1371 GetIncomeStatementConsolidatedParams {
1372 symbol: self.symbol,
1373 figi: self.figi,
1374 isin: self.isin,
1375 cusip: self.cusip,
1376 exchange: self.exchange,
1377 mic_code: self.mic_code,
1378 country: self.country,
1379 period: self.period,
1380 start_date: self.start_date,
1381 end_date: self.end_date,
1382 outputsize: self.outputsize
1383 }
1384 }
1385}
1386
1387#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1389pub struct GetIpoCalendarParams {
1390 pub exchange: Option<String>,
1392 pub mic_code: Option<String>,
1394 pub country: Option<String>,
1396 pub start_date: Option<String>,
1398 pub end_date: Option<String>
1400}
1401
1402impl GetIpoCalendarParams {
1403 pub fn builder() -> GetIpoCalendarParamsBuilder {
1405 GetIpoCalendarParamsBuilder::default()
1406 }
1407}
1408
1409#[derive(Clone, Debug, Default)]
1411pub struct GetIpoCalendarParamsBuilder {
1412 exchange: Option<String>,
1414 mic_code: Option<String>,
1416 country: Option<String>,
1418 start_date: Option<String>,
1420 end_date: Option<String>
1422}
1423
1424impl GetIpoCalendarParamsBuilder {
1425 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1427 self.exchange = Some(exchange.into());
1428 self
1429 }
1430 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1432 self.mic_code = Some(mic_code.into());
1433 self
1434 }
1435 pub fn country(mut self, country: impl Into<String>) -> Self {
1437 self.country = Some(country.into());
1438 self
1439 }
1440 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1442 self.start_date = Some(start_date.into());
1443 self
1444 }
1445 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
1447 self.end_date = Some(end_date.into());
1448 self
1449 }
1450
1451 pub fn build(self) -> GetIpoCalendarParams {
1453 GetIpoCalendarParams {
1454 exchange: self.exchange,
1455 mic_code: self.mic_code,
1456 country: self.country,
1457 start_date: self.start_date,
1458 end_date: self.end_date
1459 }
1460 }
1461}
1462
1463#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1465pub struct GetKeyExecutivesParams {
1466 pub symbol: Option<String>,
1468 pub figi: Option<String>,
1470 pub isin: Option<String>,
1472 pub cusip: Option<String>,
1474 pub exchange: Option<String>,
1476 pub mic_code: Option<String>,
1478 pub country: Option<String>
1480}
1481
1482impl GetKeyExecutivesParams {
1483 pub fn builder() -> GetKeyExecutivesParamsBuilder {
1485 GetKeyExecutivesParamsBuilder::default()
1486 }
1487}
1488
1489#[derive(Clone, Debug, Default)]
1491pub struct GetKeyExecutivesParamsBuilder {
1492 symbol: Option<String>,
1494 figi: Option<String>,
1496 isin: Option<String>,
1498 cusip: Option<String>,
1500 exchange: Option<String>,
1502 mic_code: Option<String>,
1504 country: Option<String>
1506}
1507
1508impl GetKeyExecutivesParamsBuilder {
1509 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1511 self.symbol = Some(symbol.into());
1512 self
1513 }
1514 pub fn figi(mut self, figi: impl Into<String>) -> Self {
1516 self.figi = Some(figi.into());
1517 self
1518 }
1519 pub fn isin(mut self, isin: impl Into<String>) -> Self {
1521 self.isin = Some(isin.into());
1522 self
1523 }
1524 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
1526 self.cusip = Some(cusip.into());
1527 self
1528 }
1529 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1531 self.exchange = Some(exchange.into());
1532 self
1533 }
1534 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1536 self.mic_code = Some(mic_code.into());
1537 self
1538 }
1539 pub fn country(mut self, country: impl Into<String>) -> Self {
1541 self.country = Some(country.into());
1542 self
1543 }
1544
1545 pub fn build(self) -> GetKeyExecutivesParams {
1547 GetKeyExecutivesParams {
1548 symbol: self.symbol,
1549 figi: self.figi,
1550 isin: self.isin,
1551 cusip: self.cusip,
1552 exchange: self.exchange,
1553 mic_code: self.mic_code,
1554 country: self.country
1555 }
1556 }
1557}
1558
1559#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1561pub struct GetLastChangesParams {
1562 pub endpoint: String,
1564 pub start_date: Option<String>,
1566 pub symbol: Option<String>,
1568 pub exchange: Option<String>,
1570 pub mic_code: Option<String>,
1572 pub country: Option<String>,
1574 pub page: Option<i64>,
1576 pub outputsize: Option<i64>
1578}
1579
1580impl GetLastChangesParams {
1581 pub fn builder() -> GetLastChangesParamsBuilder {
1583 GetLastChangesParamsBuilder::default()
1584 }
1585}
1586
1587#[derive(Clone, Debug, Default)]
1589pub struct GetLastChangesParamsBuilder {
1590 endpoint: String,
1592 start_date: Option<String>,
1594 symbol: Option<String>,
1596 exchange: Option<String>,
1598 mic_code: Option<String>,
1600 country: Option<String>,
1602 page: Option<i64>,
1604 outputsize: Option<i64>
1606}
1607
1608impl GetLastChangesParamsBuilder {
1609 pub fn endpoint(mut self, endpoint: impl Into<String>) -> Self {
1611 self.endpoint = endpoint.into();
1612 self
1613 }
1614 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1616 self.start_date = Some(start_date.into());
1617 self
1618 }
1619 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1621 self.symbol = Some(symbol.into());
1622 self
1623 }
1624 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1626 self.exchange = Some(exchange.into());
1627 self
1628 }
1629 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1631 self.mic_code = Some(mic_code.into());
1632 self
1633 }
1634 pub fn country(mut self, country: impl Into<String>) -> Self {
1636 self.country = Some(country.into());
1637 self
1638 }
1639 pub fn page(mut self, page: i64) -> Self {
1641 self.page = Some(page);
1642 self
1643 }
1644 pub fn outputsize(mut self, outputsize: i64) -> Self {
1646 self.outputsize = Some(outputsize);
1647 self
1648 }
1649
1650 pub fn build(self) -> GetLastChangesParams {
1652 GetLastChangesParams {
1653 endpoint: self.endpoint,
1654 start_date: self.start_date,
1655 symbol: self.symbol,
1656 exchange: self.exchange,
1657 mic_code: self.mic_code,
1658 country: self.country,
1659 page: self.page,
1660 outputsize: self.outputsize
1661 }
1662 }
1663}
1664
1665#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1667pub struct GetLogoParams {
1668 pub symbol: String,
1670 pub exchange: Option<String>,
1672 pub mic_code: Option<String>,
1674 pub country: Option<String>
1676}
1677
1678impl GetLogoParams {
1679 pub fn builder() -> GetLogoParamsBuilder {
1681 GetLogoParamsBuilder::default()
1682 }
1683}
1684
1685#[derive(Clone, Debug, Default)]
1687pub struct GetLogoParamsBuilder {
1688 symbol: String,
1690 exchange: Option<String>,
1692 mic_code: Option<String>,
1694 country: Option<String>
1696}
1697
1698impl GetLogoParamsBuilder {
1699 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1701 self.symbol = symbol.into();
1702 self
1703 }
1704 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1706 self.exchange = Some(exchange.into());
1707 self
1708 }
1709 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1711 self.mic_code = Some(mic_code.into());
1712 self
1713 }
1714 pub fn country(mut self, country: impl Into<String>) -> Self {
1716 self.country = Some(country.into());
1717 self
1718 }
1719
1720 pub fn build(self) -> GetLogoParams {
1722 GetLogoParams {
1723 symbol: self.symbol,
1724 exchange: self.exchange,
1725 mic_code: self.mic_code,
1726 country: self.country
1727 }
1728 }
1729}
1730
1731#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1733pub struct GetMarketCapParams {
1734 pub symbol: Option<String>,
1736 pub figi: Option<String>,
1738 pub isin: Option<String>,
1740 pub cusip: Option<String>,
1742 pub exchange: Option<String>,
1744 pub mic_code: Option<String>,
1746 pub country: Option<String>,
1748 pub start_date: Option<String>,
1750 pub end_date: Option<String>,
1752 pub page: Option<i64>,
1754 pub outputsize: Option<i64>
1756}
1757
1758impl GetMarketCapParams {
1759 pub fn builder() -> GetMarketCapParamsBuilder {
1761 GetMarketCapParamsBuilder::default()
1762 }
1763}
1764
1765#[derive(Clone, Debug, Default)]
1767pub struct GetMarketCapParamsBuilder {
1768 symbol: Option<String>,
1770 figi: Option<String>,
1772 isin: Option<String>,
1774 cusip: Option<String>,
1776 exchange: Option<String>,
1778 mic_code: Option<String>,
1780 country: Option<String>,
1782 start_date: Option<String>,
1784 end_date: Option<String>,
1786 page: Option<i64>,
1788 outputsize: Option<i64>
1790}
1791
1792impl GetMarketCapParamsBuilder {
1793 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1795 self.symbol = Some(symbol.into());
1796 self
1797 }
1798 pub fn figi(mut self, figi: impl Into<String>) -> Self {
1800 self.figi = Some(figi.into());
1801 self
1802 }
1803 pub fn isin(mut self, isin: impl Into<String>) -> Self {
1805 self.isin = Some(isin.into());
1806 self
1807 }
1808 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
1810 self.cusip = Some(cusip.into());
1811 self
1812 }
1813 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1815 self.exchange = Some(exchange.into());
1816 self
1817 }
1818 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1820 self.mic_code = Some(mic_code.into());
1821 self
1822 }
1823 pub fn country(mut self, country: impl Into<String>) -> Self {
1825 self.country = Some(country.into());
1826 self
1827 }
1828 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
1830 self.start_date = Some(start_date.into());
1831 self
1832 }
1833 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
1835 self.end_date = Some(end_date.into());
1836 self
1837 }
1838 pub fn page(mut self, page: i64) -> Self {
1840 self.page = Some(page);
1841 self
1842 }
1843 pub fn outputsize(mut self, outputsize: i64) -> Self {
1845 self.outputsize = Some(outputsize);
1846 self
1847 }
1848
1849 pub fn build(self) -> GetMarketCapParams {
1851 GetMarketCapParams {
1852 symbol: self.symbol,
1853 figi: self.figi,
1854 isin: self.isin,
1855 cusip: self.cusip,
1856 exchange: self.exchange,
1857 mic_code: self.mic_code,
1858 country: self.country,
1859 start_date: self.start_date,
1860 end_date: self.end_date,
1861 page: self.page,
1862 outputsize: self.outputsize
1863 }
1864 }
1865}
1866
1867#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1869pub struct GetProfileParams {
1870 pub symbol: Option<String>,
1872 pub figi: Option<String>,
1874 pub isin: Option<String>,
1876 pub cusip: Option<String>,
1878 pub exchange: Option<String>,
1880 pub mic_code: Option<String>,
1882 pub country: Option<String>
1884}
1885
1886impl GetProfileParams {
1887 pub fn builder() -> GetProfileParamsBuilder {
1889 GetProfileParamsBuilder::default()
1890 }
1891}
1892
1893#[derive(Clone, Debug, Default)]
1895pub struct GetProfileParamsBuilder {
1896 symbol: Option<String>,
1898 figi: Option<String>,
1900 isin: Option<String>,
1902 cusip: Option<String>,
1904 exchange: Option<String>,
1906 mic_code: Option<String>,
1908 country: Option<String>
1910}
1911
1912impl GetProfileParamsBuilder {
1913 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
1915 self.symbol = Some(symbol.into());
1916 self
1917 }
1918 pub fn figi(mut self, figi: impl Into<String>) -> Self {
1920 self.figi = Some(figi.into());
1921 self
1922 }
1923 pub fn isin(mut self, isin: impl Into<String>) -> Self {
1925 self.isin = Some(isin.into());
1926 self
1927 }
1928 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
1930 self.cusip = Some(cusip.into());
1931 self
1932 }
1933 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
1935 self.exchange = Some(exchange.into());
1936 self
1937 }
1938 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
1940 self.mic_code = Some(mic_code.into());
1941 self
1942 }
1943 pub fn country(mut self, country: impl Into<String>) -> Self {
1945 self.country = Some(country.into());
1946 self
1947 }
1948
1949 pub fn build(self) -> GetProfileParams {
1951 GetProfileParams {
1952 symbol: self.symbol,
1953 figi: self.figi,
1954 isin: self.isin,
1955 cusip: self.cusip,
1956 exchange: self.exchange,
1957 mic_code: self.mic_code,
1958 country: self.country
1959 }
1960 }
1961}
1962
1963#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1965pub struct GetSplitsParams {
1966 pub symbol: Option<String>,
1968 pub figi: Option<String>,
1970 pub isin: Option<String>,
1972 pub cusip: Option<String>,
1974 pub exchange: Option<String>,
1976 pub mic_code: Option<String>,
1978 pub country: Option<String>,
1980 pub range: Option<String>,
1982 pub start_date: Option<String>,
1984 pub end_date: Option<String>
1986}
1987
1988impl GetSplitsParams {
1989 pub fn builder() -> GetSplitsParamsBuilder {
1991 GetSplitsParamsBuilder::default()
1992 }
1993}
1994
1995#[derive(Clone, Debug, Default)]
1997pub struct GetSplitsParamsBuilder {
1998 symbol: Option<String>,
2000 figi: Option<String>,
2002 isin: Option<String>,
2004 cusip: Option<String>,
2006 exchange: Option<String>,
2008 mic_code: Option<String>,
2010 country: Option<String>,
2012 range: Option<String>,
2014 start_date: Option<String>,
2016 end_date: Option<String>
2018}
2019
2020impl GetSplitsParamsBuilder {
2021 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
2023 self.symbol = Some(symbol.into());
2024 self
2025 }
2026 pub fn figi(mut self, figi: impl Into<String>) -> Self {
2028 self.figi = Some(figi.into());
2029 self
2030 }
2031 pub fn isin(mut self, isin: impl Into<String>) -> Self {
2033 self.isin = Some(isin.into());
2034 self
2035 }
2036 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
2038 self.cusip = Some(cusip.into());
2039 self
2040 }
2041 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
2043 self.exchange = Some(exchange.into());
2044 self
2045 }
2046 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
2048 self.mic_code = Some(mic_code.into());
2049 self
2050 }
2051 pub fn country(mut self, country: impl Into<String>) -> Self {
2053 self.country = Some(country.into());
2054 self
2055 }
2056 pub fn range(mut self, range: impl Into<String>) -> Self {
2058 self.range = Some(range.into());
2059 self
2060 }
2061 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
2063 self.start_date = Some(start_date.into());
2064 self
2065 }
2066 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
2068 self.end_date = Some(end_date.into());
2069 self
2070 }
2071
2072 pub fn build(self) -> GetSplitsParams {
2074 GetSplitsParams {
2075 symbol: self.symbol,
2076 figi: self.figi,
2077 isin: self.isin,
2078 cusip: self.cusip,
2079 exchange: self.exchange,
2080 mic_code: self.mic_code,
2081 country: self.country,
2082 range: self.range,
2083 start_date: self.start_date,
2084 end_date: self.end_date
2085 }
2086 }
2087}
2088
2089#[derive(Clone, Debug, Default, Serialize, Deserialize)]
2091pub struct GetSplitsCalendarParams {
2092 pub symbol: Option<String>,
2094 pub figi: Option<String>,
2096 pub isin: Option<String>,
2098 pub cusip: Option<String>,
2100 pub exchange: Option<String>,
2102 pub mic_code: Option<String>,
2104 pub country: Option<String>,
2106 pub start_date: Option<String>,
2108 pub end_date: Option<String>,
2110 pub outputsize: Option<i64>,
2112 pub page: Option<String>
2114}
2115
2116impl GetSplitsCalendarParams {
2117 pub fn builder() -> GetSplitsCalendarParamsBuilder {
2119 GetSplitsCalendarParamsBuilder::default()
2120 }
2121}
2122
2123#[derive(Clone, Debug, Default)]
2125pub struct GetSplitsCalendarParamsBuilder {
2126 symbol: Option<String>,
2128 figi: Option<String>,
2130 isin: Option<String>,
2132 cusip: Option<String>,
2134 exchange: Option<String>,
2136 mic_code: Option<String>,
2138 country: Option<String>,
2140 start_date: Option<String>,
2142 end_date: Option<String>,
2144 outputsize: Option<i64>,
2146 page: Option<String>
2148}
2149
2150impl GetSplitsCalendarParamsBuilder {
2151 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
2153 self.symbol = Some(symbol.into());
2154 self
2155 }
2156 pub fn figi(mut self, figi: impl Into<String>) -> Self {
2158 self.figi = Some(figi.into());
2159 self
2160 }
2161 pub fn isin(mut self, isin: impl Into<String>) -> Self {
2163 self.isin = Some(isin.into());
2164 self
2165 }
2166 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
2168 self.cusip = Some(cusip.into());
2169 self
2170 }
2171 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
2173 self.exchange = Some(exchange.into());
2174 self
2175 }
2176 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
2178 self.mic_code = Some(mic_code.into());
2179 self
2180 }
2181 pub fn country(mut self, country: impl Into<String>) -> Self {
2183 self.country = Some(country.into());
2184 self
2185 }
2186 pub fn start_date(mut self, start_date: impl Into<String>) -> Self {
2188 self.start_date = Some(start_date.into());
2189 self
2190 }
2191 pub fn end_date(mut self, end_date: impl Into<String>) -> Self {
2193 self.end_date = Some(end_date.into());
2194 self
2195 }
2196 pub fn outputsize(mut self, outputsize: i64) -> Self {
2198 self.outputsize = Some(outputsize);
2199 self
2200 }
2201 pub fn page(mut self, page: impl Into<String>) -> Self {
2203 self.page = Some(page.into());
2204 self
2205 }
2206
2207 pub fn build(self) -> GetSplitsCalendarParams {
2209 GetSplitsCalendarParams {
2210 symbol: self.symbol,
2211 figi: self.figi,
2212 isin: self.isin,
2213 cusip: self.cusip,
2214 exchange: self.exchange,
2215 mic_code: self.mic_code,
2216 country: self.country,
2217 start_date: self.start_date,
2218 end_date: self.end_date,
2219 outputsize: self.outputsize,
2220 page: self.page
2221 }
2222 }
2223}
2224
2225#[derive(Clone, Debug, Default, Serialize, Deserialize)]
2227pub struct GetStatisticsParams {
2228 pub symbol: Option<String>,
2230 pub figi: Option<String>,
2232 pub isin: Option<String>,
2234 pub cusip: Option<String>,
2236 pub exchange: Option<String>,
2238 pub mic_code: Option<String>,
2240 pub country: Option<String>
2242}
2243
2244impl GetStatisticsParams {
2245 pub fn builder() -> GetStatisticsParamsBuilder {
2247 GetStatisticsParamsBuilder::default()
2248 }
2249}
2250
2251#[derive(Clone, Debug, Default)]
2253pub struct GetStatisticsParamsBuilder {
2254 symbol: Option<String>,
2256 figi: Option<String>,
2258 isin: Option<String>,
2260 cusip: Option<String>,
2262 exchange: Option<String>,
2264 mic_code: Option<String>,
2266 country: Option<String>
2268}
2269
2270impl GetStatisticsParamsBuilder {
2271 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
2273 self.symbol = Some(symbol.into());
2274 self
2275 }
2276 pub fn figi(mut self, figi: impl Into<String>) -> Self {
2278 self.figi = Some(figi.into());
2279 self
2280 }
2281 pub fn isin(mut self, isin: impl Into<String>) -> Self {
2283 self.isin = Some(isin.into());
2284 self
2285 }
2286 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
2288 self.cusip = Some(cusip.into());
2289 self
2290 }
2291 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
2293 self.exchange = Some(exchange.into());
2294 self
2295 }
2296 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
2298 self.mic_code = Some(mic_code.into());
2299 self
2300 }
2301 pub fn country(mut self, country: impl Into<String>) -> Self {
2303 self.country = Some(country.into());
2304 self
2305 }
2306
2307 pub fn build(self) -> GetStatisticsParams {
2309 GetStatisticsParams {
2310 symbol: self.symbol,
2311 figi: self.figi,
2312 isin: self.isin,
2313 cusip: self.cusip,
2314 exchange: self.exchange,
2315 mic_code: self.mic_code,
2316 country: self.country
2317 }
2318 }
2319}
2320
2321
2322#[derive(Debug, Clone, Serialize, Deserialize)]
2324#[serde(untagged)]
2325pub enum GetBalanceSheetError {
2326 UnknownValue(serde_json::Value),
2327}
2328
2329#[derive(Debug, Clone, Serialize, Deserialize)]
2331#[serde(untagged)]
2332pub enum GetBalanceSheetConsolidatedError {
2333 UnknownValue(serde_json::Value),
2334}
2335
2336#[derive(Debug, Clone, Serialize, Deserialize)]
2338#[serde(untagged)]
2339pub enum GetCashFlowError {
2340 UnknownValue(serde_json::Value),
2341}
2342
2343#[derive(Debug, Clone, Serialize, Deserialize)]
2345#[serde(untagged)]
2346pub enum GetCashFlowConsolidatedError {
2347 UnknownValue(serde_json::Value),
2348}
2349
2350#[derive(Debug, Clone, Serialize, Deserialize)]
2352#[serde(untagged)]
2353pub enum GetDividendsError {
2354 UnknownValue(serde_json::Value),
2355}
2356
2357#[derive(Debug, Clone, Serialize, Deserialize)]
2359#[serde(untagged)]
2360pub enum GetDividendsCalendarError {
2361 UnknownValue(serde_json::Value),
2362}
2363
2364#[derive(Debug, Clone, Serialize, Deserialize)]
2366#[serde(untagged)]
2367pub enum GetEarningsError {
2368 UnknownValue(serde_json::Value),
2369}
2370
2371#[derive(Debug, Clone, Serialize, Deserialize)]
2373#[serde(untagged)]
2374pub enum GetEarningsCalendarError {
2375 UnknownValue(serde_json::Value),
2376}
2377
2378#[derive(Debug, Clone, Serialize, Deserialize)]
2380#[serde(untagged)]
2381pub enum GetIncomeStatementError {
2382 UnknownValue(serde_json::Value),
2383}
2384
2385#[derive(Debug, Clone, Serialize, Deserialize)]
2387#[serde(untagged)]
2388pub enum GetIncomeStatementConsolidatedError {
2389 UnknownValue(serde_json::Value),
2390}
2391
2392#[derive(Debug, Clone, Serialize, Deserialize)]
2394#[serde(untagged)]
2395pub enum GetIpoCalendarError {
2396 UnknownValue(serde_json::Value),
2397}
2398
2399#[derive(Debug, Clone, Serialize, Deserialize)]
2401#[serde(untagged)]
2402pub enum GetKeyExecutivesError {
2403 UnknownValue(serde_json::Value),
2404}
2405
2406#[derive(Debug, Clone, Serialize, Deserialize)]
2408#[serde(untagged)]
2409pub enum GetLastChangesError {
2410 UnknownValue(serde_json::Value),
2411}
2412
2413#[derive(Debug, Clone, Serialize, Deserialize)]
2415#[serde(untagged)]
2416pub enum GetLogoError {
2417 UnknownValue(serde_json::Value),
2418}
2419
2420#[derive(Debug, Clone, Serialize, Deserialize)]
2422#[serde(untagged)]
2423pub enum GetMarketCapError {
2424 UnknownValue(serde_json::Value),
2425}
2426
2427#[derive(Debug, Clone, Serialize, Deserialize)]
2429#[serde(untagged)]
2430pub enum GetProfileError {
2431 UnknownValue(serde_json::Value),
2432}
2433
2434#[derive(Debug, Clone, Serialize, Deserialize)]
2436#[serde(untagged)]
2437pub enum GetSplitsError {
2438 UnknownValue(serde_json::Value),
2439}
2440
2441#[derive(Debug, Clone, Serialize, Deserialize)]
2443#[serde(untagged)]
2444pub enum GetSplitsCalendarError {
2445 UnknownValue(serde_json::Value),
2446}
2447
2448#[derive(Debug, Clone, Serialize, Deserialize)]
2450#[serde(untagged)]
2451pub enum GetStatisticsError {
2452 UnknownValue(serde_json::Value),
2453}
2454
2455
2456pub async fn get_balance_sheet(configuration: &configuration::Configuration, params: GetBalanceSheetParams) -> Result<models::GetBalanceSheet200Response, 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", &serde_json::to_string(param_value)?)]);
2497 }
2498 if let Some(ref param_value) = p_query_start_date {
2499 req_builder = req_builder.query(&[("start_date", ¶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/plain` content type response that cannot be converted to `models::GetBalanceSheet200Response`"))),
2535 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetBalanceSheet200Response`")))),
2536 }
2537 } else {
2538 let content = resp.text().await?;
2539 let entity: Option<GetBalanceSheetError> = serde_json::from_str(&content).ok();
2540 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2541 }
2542}
2543
2544pub async fn get_balance_sheet_consolidated(configuration: &configuration::Configuration, params: GetBalanceSheetConsolidatedParams) -> Result<models::GetBalanceSheetConsolidated200Response, Error<GetBalanceSheetConsolidatedError>> {
2546 let p_query_symbol = params.symbol;
2548 let p_query_figi = params.figi;
2549 let p_query_isin = params.isin;
2550 let p_query_cusip = params.cusip;
2551 let p_query_exchange = params.exchange;
2552 let p_query_mic_code = params.mic_code;
2553 let p_query_country = params.country;
2554 let p_query_period = params.period;
2555 let p_query_start_date = params.start_date;
2556 let p_query_end_date = params.end_date;
2557 let p_query_outputsize = params.outputsize;
2558
2559 let uri_str = format!("{}/balance_sheet/consolidated", configuration.base_path);
2560 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2561
2562 if let Some(ref param_value) = p_query_symbol {
2563 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
2564 }
2565 if let Some(ref param_value) = p_query_figi {
2566 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
2567 }
2568 if let Some(ref param_value) = p_query_isin {
2569 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
2570 }
2571 if let Some(ref param_value) = p_query_cusip {
2572 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
2573 }
2574 if let Some(ref param_value) = p_query_exchange {
2575 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
2576 }
2577 if let Some(ref param_value) = p_query_mic_code {
2578 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
2579 }
2580 if let Some(ref param_value) = p_query_country {
2581 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
2582 }
2583 if let Some(ref param_value) = p_query_period {
2584 req_builder = req_builder.query(&[("period", &serde_json::to_string(param_value)?)]);
2585 }
2586 if let Some(ref param_value) = p_query_start_date {
2587 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
2588 }
2589 if let Some(ref param_value) = p_query_end_date {
2590 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
2591 }
2592 if let Some(ref param_value) = p_query_outputsize {
2593 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
2594 }
2595 if let Some(ref user_agent) = configuration.user_agent {
2596 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2597 }
2598 if let Some(ref apikey) = configuration.api_key {
2599 let key = apikey.key.clone();
2600 let value = match apikey.prefix {
2601 Some(ref prefix) => format!("{} {}", prefix, key),
2602 None => key,
2603 };
2604 req_builder = req_builder.header("Authorization", value);
2605 };
2606
2607 let req = req_builder.build()?;
2608 let resp = configuration.client.execute(req).await?;
2609
2610 let status = resp.status();
2611 let content_type = resp
2612 .headers()
2613 .get("content-type")
2614 .and_then(|v| v.to_str().ok())
2615 .unwrap_or("application/octet-stream");
2616 let content_type = super::ContentType::from(content_type);
2617
2618 if !status.is_client_error() && !status.is_server_error() {
2619 let content = resp.text().await?;
2620 match content_type {
2621 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2622 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetBalanceSheetConsolidated200Response`"))),
2623 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetBalanceSheetConsolidated200Response`")))),
2624 }
2625 } else {
2626 let content = resp.text().await?;
2627 let entity: Option<GetBalanceSheetConsolidatedError> = serde_json::from_str(&content).ok();
2628 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2629 }
2630}
2631
2632pub async fn get_cash_flow(configuration: &configuration::Configuration, params: GetCashFlowParams) -> Result<models::GetCashFlow200Response, Error<GetCashFlowError>> {
2634 let p_query_symbol = params.symbol;
2636 let p_query_figi = params.figi;
2637 let p_query_isin = params.isin;
2638 let p_query_cusip = params.cusip;
2639 let p_query_exchange = params.exchange;
2640 let p_query_mic_code = params.mic_code;
2641 let p_query_country = params.country;
2642 let p_query_period = params.period;
2643 let p_query_start_date = params.start_date;
2644 let p_query_end_date = params.end_date;
2645 let p_query_outputsize = params.outputsize;
2646
2647 let uri_str = format!("{}/cash_flow", configuration.base_path);
2648 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2649
2650 if let Some(ref param_value) = p_query_symbol {
2651 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
2652 }
2653 if let Some(ref param_value) = p_query_figi {
2654 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
2655 }
2656 if let Some(ref param_value) = p_query_isin {
2657 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
2658 }
2659 if let Some(ref param_value) = p_query_cusip {
2660 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
2661 }
2662 if let Some(ref param_value) = p_query_exchange {
2663 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
2664 }
2665 if let Some(ref param_value) = p_query_mic_code {
2666 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
2667 }
2668 if let Some(ref param_value) = p_query_country {
2669 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
2670 }
2671 if let Some(ref param_value) = p_query_period {
2672 req_builder = req_builder.query(&[("period", &serde_json::to_string(param_value)?)]);
2673 }
2674 if let Some(ref param_value) = p_query_start_date {
2675 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
2676 }
2677 if let Some(ref param_value) = p_query_end_date {
2678 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
2679 }
2680 if let Some(ref param_value) = p_query_outputsize {
2681 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
2682 }
2683 if let Some(ref user_agent) = configuration.user_agent {
2684 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2685 }
2686 if let Some(ref apikey) = configuration.api_key {
2687 let key = apikey.key.clone();
2688 let value = match apikey.prefix {
2689 Some(ref prefix) => format!("{} {}", prefix, key),
2690 None => key,
2691 };
2692 req_builder = req_builder.header("Authorization", value);
2693 };
2694
2695 let req = req_builder.build()?;
2696 let resp = configuration.client.execute(req).await?;
2697
2698 let status = resp.status();
2699 let content_type = resp
2700 .headers()
2701 .get("content-type")
2702 .and_then(|v| v.to_str().ok())
2703 .unwrap_or("application/octet-stream");
2704 let content_type = super::ContentType::from(content_type);
2705
2706 if !status.is_client_error() && !status.is_server_error() {
2707 let content = resp.text().await?;
2708 match content_type {
2709 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2710 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetCashFlow200Response`"))),
2711 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetCashFlow200Response`")))),
2712 }
2713 } else {
2714 let content = resp.text().await?;
2715 let entity: Option<GetCashFlowError> = serde_json::from_str(&content).ok();
2716 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2717 }
2718}
2719
2720pub async fn get_cash_flow_consolidated(configuration: &configuration::Configuration, params: GetCashFlowConsolidatedParams) -> Result<models::GetCashFlowConsolidated200Response, Error<GetCashFlowConsolidatedError>> {
2722 let p_query_symbol = params.symbol;
2724 let p_query_figi = params.figi;
2725 let p_query_isin = params.isin;
2726 let p_query_cusip = params.cusip;
2727 let p_query_exchange = params.exchange;
2728 let p_query_mic_code = params.mic_code;
2729 let p_query_country = params.country;
2730 let p_query_period = params.period;
2731 let p_query_start_date = params.start_date;
2732 let p_query_end_date = params.end_date;
2733 let p_query_outputsize = params.outputsize;
2734
2735 let uri_str = format!("{}/cash_flow/consolidated", configuration.base_path);
2736 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2737
2738 if let Some(ref param_value) = p_query_symbol {
2739 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
2740 }
2741 if let Some(ref param_value) = p_query_figi {
2742 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
2743 }
2744 if let Some(ref param_value) = p_query_isin {
2745 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
2746 }
2747 if let Some(ref param_value) = p_query_cusip {
2748 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
2749 }
2750 if let Some(ref param_value) = p_query_exchange {
2751 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
2752 }
2753 if let Some(ref param_value) = p_query_mic_code {
2754 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
2755 }
2756 if let Some(ref param_value) = p_query_country {
2757 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
2758 }
2759 if let Some(ref param_value) = p_query_period {
2760 req_builder = req_builder.query(&[("period", &serde_json::to_string(param_value)?)]);
2761 }
2762 if let Some(ref param_value) = p_query_start_date {
2763 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
2764 }
2765 if let Some(ref param_value) = p_query_end_date {
2766 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
2767 }
2768 if let Some(ref param_value) = p_query_outputsize {
2769 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
2770 }
2771 if let Some(ref user_agent) = configuration.user_agent {
2772 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2773 }
2774 if let Some(ref apikey) = configuration.api_key {
2775 let key = apikey.key.clone();
2776 let value = match apikey.prefix {
2777 Some(ref prefix) => format!("{} {}", prefix, key),
2778 None => key,
2779 };
2780 req_builder = req_builder.header("Authorization", value);
2781 };
2782
2783 let req = req_builder.build()?;
2784 let resp = configuration.client.execute(req).await?;
2785
2786 let status = resp.status();
2787 let content_type = resp
2788 .headers()
2789 .get("content-type")
2790 .and_then(|v| v.to_str().ok())
2791 .unwrap_or("application/octet-stream");
2792 let content_type = super::ContentType::from(content_type);
2793
2794 if !status.is_client_error() && !status.is_server_error() {
2795 let content = resp.text().await?;
2796 match content_type {
2797 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2798 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetCashFlowConsolidated200Response`"))),
2799 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetCashFlowConsolidated200Response`")))),
2800 }
2801 } else {
2802 let content = resp.text().await?;
2803 let entity: Option<GetCashFlowConsolidatedError> = serde_json::from_str(&content).ok();
2804 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2805 }
2806}
2807
2808pub async fn get_dividends(configuration: &configuration::Configuration, params: GetDividendsParams) -> Result<models::GetDividends200Response, Error<GetDividendsError>> {
2810 let p_query_symbol = params.symbol;
2812 let p_query_figi = params.figi;
2813 let p_query_isin = params.isin;
2814 let p_query_cusip = params.cusip;
2815 let p_query_exchange = params.exchange;
2816 let p_query_mic_code = params.mic_code;
2817 let p_query_country = params.country;
2818 let p_query_range = params.range;
2819 let p_query_start_date = params.start_date;
2820 let p_query_end_date = params.end_date;
2821 let p_query_adjust = params.adjust;
2822
2823 let uri_str = format!("{}/dividends", configuration.base_path);
2824 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2825
2826 if let Some(ref param_value) = p_query_symbol {
2827 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
2828 }
2829 if let Some(ref param_value) = p_query_figi {
2830 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
2831 }
2832 if let Some(ref param_value) = p_query_isin {
2833 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
2834 }
2835 if let Some(ref param_value) = p_query_cusip {
2836 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
2837 }
2838 if let Some(ref param_value) = p_query_exchange {
2839 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
2840 }
2841 if let Some(ref param_value) = p_query_mic_code {
2842 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
2843 }
2844 if let Some(ref param_value) = p_query_country {
2845 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
2846 }
2847 if let Some(ref param_value) = p_query_range {
2848 req_builder = req_builder.query(&[("range", &serde_json::to_string(param_value)?)]);
2849 }
2850 if let Some(ref param_value) = p_query_start_date {
2851 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
2852 }
2853 if let Some(ref param_value) = p_query_end_date {
2854 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
2855 }
2856 if let Some(ref param_value) = p_query_adjust {
2857 req_builder = req_builder.query(&[("adjust", ¶m_value.to_string())]);
2858 }
2859 if let Some(ref user_agent) = configuration.user_agent {
2860 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2861 }
2862 if let Some(ref apikey) = configuration.api_key {
2863 let key = apikey.key.clone();
2864 let value = match apikey.prefix {
2865 Some(ref prefix) => format!("{} {}", prefix, key),
2866 None => key,
2867 };
2868 req_builder = req_builder.header("Authorization", value);
2869 };
2870
2871 let req = req_builder.build()?;
2872 let resp = configuration.client.execute(req).await?;
2873
2874 let status = resp.status();
2875 let content_type = resp
2876 .headers()
2877 .get("content-type")
2878 .and_then(|v| v.to_str().ok())
2879 .unwrap_or("application/octet-stream");
2880 let content_type = super::ContentType::from(content_type);
2881
2882 if !status.is_client_error() && !status.is_server_error() {
2883 let content = resp.text().await?;
2884 match content_type {
2885 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2886 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetDividends200Response`"))),
2887 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetDividends200Response`")))),
2888 }
2889 } else {
2890 let content = resp.text().await?;
2891 let entity: Option<GetDividendsError> = serde_json::from_str(&content).ok();
2892 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2893 }
2894}
2895
2896pub async fn get_dividends_calendar(configuration: &configuration::Configuration, params: GetDividendsCalendarParams) -> Result<Vec<models::DividendsCalendarItem>, Error<GetDividendsCalendarError>> {
2898 let p_query_symbol = params.symbol;
2900 let p_query_figi = params.figi;
2901 let p_query_isin = params.isin;
2902 let p_query_cusip = params.cusip;
2903 let p_query_exchange = params.exchange;
2904 let p_query_mic_code = params.mic_code;
2905 let p_query_country = params.country;
2906 let p_query_start_date = params.start_date;
2907 let p_query_end_date = params.end_date;
2908 let p_query_outputsize = params.outputsize;
2909 let p_query_page = params.page;
2910
2911 let uri_str = format!("{}/dividends_calendar", configuration.base_path);
2912 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2913
2914 if let Some(ref param_value) = p_query_symbol {
2915 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
2916 }
2917 if let Some(ref param_value) = p_query_figi {
2918 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
2919 }
2920 if let Some(ref param_value) = p_query_isin {
2921 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
2922 }
2923 if let Some(ref param_value) = p_query_cusip {
2924 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
2925 }
2926 if let Some(ref param_value) = p_query_exchange {
2927 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
2928 }
2929 if let Some(ref param_value) = p_query_mic_code {
2930 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
2931 }
2932 if let Some(ref param_value) = p_query_country {
2933 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
2934 }
2935 if let Some(ref param_value) = p_query_start_date {
2936 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
2937 }
2938 if let Some(ref param_value) = p_query_end_date {
2939 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
2940 }
2941 if let Some(ref param_value) = p_query_outputsize {
2942 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
2943 }
2944 if let Some(ref param_value) = p_query_page {
2945 req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
2946 }
2947 if let Some(ref user_agent) = configuration.user_agent {
2948 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2949 }
2950 if let Some(ref apikey) = configuration.api_key {
2951 let key = apikey.key.clone();
2952 let value = match apikey.prefix {
2953 Some(ref prefix) => format!("{} {}", prefix, key),
2954 None => key,
2955 };
2956 req_builder = req_builder.header("Authorization", value);
2957 };
2958
2959 let req = req_builder.build()?;
2960 let resp = configuration.client.execute(req).await?;
2961
2962 let status = resp.status();
2963 let content_type = resp
2964 .headers()
2965 .get("content-type")
2966 .and_then(|v| v.to_str().ok())
2967 .unwrap_or("application/octet-stream");
2968 let content_type = super::ContentType::from(content_type);
2969
2970 if !status.is_client_error() && !status.is_server_error() {
2971 let content = resp.text().await?;
2972 match content_type {
2973 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2974 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::DividendsCalendarItem>`"))),
2975 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::DividendsCalendarItem>`")))),
2976 }
2977 } else {
2978 let content = resp.text().await?;
2979 let entity: Option<GetDividendsCalendarError> = serde_json::from_str(&content).ok();
2980 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2981 }
2982}
2983
2984pub async fn get_earnings(configuration: &configuration::Configuration, params: GetEarningsParams) -> Result<models::GetEarnings200Response, Error<GetEarningsError>> {
2986 let p_query_symbol = params.symbol;
2988 let p_query_figi = params.figi;
2989 let p_query_isin = params.isin;
2990 let p_query_cusip = params.cusip;
2991 let p_query_exchange = params.exchange;
2992 let p_query_mic_code = params.mic_code;
2993 let p_query_country = params.country;
2994 let p_query_type = params.r#type;
2995 let p_query_period = params.period;
2996 let p_query_outputsize = params.outputsize;
2997 let p_query_format = params.format;
2998 let p_query_delimiter = params.delimiter;
2999 let p_query_start_date = params.start_date;
3000 let p_query_end_date = params.end_date;
3001 let p_query_dp = params.dp;
3002
3003 let uri_str = format!("{}/earnings", configuration.base_path);
3004 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3005
3006 if let Some(ref param_value) = p_query_symbol {
3007 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3008 }
3009 if let Some(ref param_value) = p_query_figi {
3010 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
3011 }
3012 if let Some(ref param_value) = p_query_isin {
3013 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
3014 }
3015 if let Some(ref param_value) = p_query_cusip {
3016 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
3017 }
3018 if let Some(ref param_value) = p_query_exchange {
3019 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3020 }
3021 if let Some(ref param_value) = p_query_mic_code {
3022 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3023 }
3024 if let Some(ref param_value) = p_query_country {
3025 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3026 }
3027 if let Some(ref param_value) = p_query_type {
3028 req_builder = req_builder.query(&[("type", &serde_json::to_string(param_value)?)]);
3029 }
3030 if let Some(ref param_value) = p_query_period {
3031 req_builder = req_builder.query(&[("period", &serde_json::to_string(param_value)?)]);
3032 }
3033 if let Some(ref param_value) = p_query_outputsize {
3034 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
3035 }
3036 if let Some(ref param_value) = p_query_format {
3037 req_builder = req_builder.query(&[("format", &serde_json::to_string(param_value)?)]);
3038 }
3039 if let Some(ref param_value) = p_query_delimiter {
3040 req_builder = req_builder.query(&[("delimiter", ¶m_value.to_string())]);
3041 }
3042 if let Some(ref param_value) = p_query_start_date {
3043 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3044 }
3045 if let Some(ref param_value) = p_query_end_date {
3046 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
3047 }
3048 if let Some(ref param_value) = p_query_dp {
3049 req_builder = req_builder.query(&[("dp", ¶m_value.to_string())]);
3050 }
3051 if let Some(ref user_agent) = configuration.user_agent {
3052 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3053 }
3054 if let Some(ref apikey) = configuration.api_key {
3055 let key = apikey.key.clone();
3056 let value = match apikey.prefix {
3057 Some(ref prefix) => format!("{} {}", prefix, key),
3058 None => key,
3059 };
3060 req_builder = req_builder.header("Authorization", value);
3061 };
3062
3063 let req = req_builder.build()?;
3064 let resp = configuration.client.execute(req).await?;
3065
3066 let status = resp.status();
3067 let content_type = resp
3068 .headers()
3069 .get("content-type")
3070 .and_then(|v| v.to_str().ok())
3071 .unwrap_or("application/octet-stream");
3072 let content_type = super::ContentType::from(content_type);
3073
3074 if !status.is_client_error() && !status.is_server_error() {
3075 let content = resp.text().await?;
3076 match content_type {
3077 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3078 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetEarnings200Response`"))),
3079 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetEarnings200Response`")))),
3080 }
3081 } else {
3082 let content = resp.text().await?;
3083 let entity: Option<GetEarningsError> = serde_json::from_str(&content).ok();
3084 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3085 }
3086}
3087
3088pub async fn get_earnings_calendar(configuration: &configuration::Configuration, params: GetEarningsCalendarParams) -> Result<models::GetEarningsCalendar200Response, Error<GetEarningsCalendarError>> {
3090 let p_query_exchange = params.exchange;
3092 let p_query_mic_code = params.mic_code;
3093 let p_query_country = params.country;
3094 let p_query_format = params.format;
3095 let p_query_delimiter = params.delimiter;
3096 let p_query_start_date = params.start_date;
3097 let p_query_end_date = params.end_date;
3098 let p_query_dp = params.dp;
3099
3100 let uri_str = format!("{}/earnings_calendar", configuration.base_path);
3101 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3102
3103 if let Some(ref param_value) = p_query_exchange {
3104 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3105 }
3106 if let Some(ref param_value) = p_query_mic_code {
3107 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3108 }
3109 if let Some(ref param_value) = p_query_country {
3110 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3111 }
3112 if let Some(ref param_value) = p_query_format {
3113 req_builder = req_builder.query(&[("format", &serde_json::to_string(param_value)?)]);
3114 }
3115 if let Some(ref param_value) = p_query_delimiter {
3116 req_builder = req_builder.query(&[("delimiter", ¶m_value.to_string())]);
3117 }
3118 if let Some(ref param_value) = p_query_start_date {
3119 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3120 }
3121 if let Some(ref param_value) = p_query_end_date {
3122 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
3123 }
3124 if let Some(ref param_value) = p_query_dp {
3125 req_builder = req_builder.query(&[("dp", ¶m_value.to_string())]);
3126 }
3127 if let Some(ref user_agent) = configuration.user_agent {
3128 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3129 }
3130 if let Some(ref apikey) = configuration.api_key {
3131 let key = apikey.key.clone();
3132 let value = match apikey.prefix {
3133 Some(ref prefix) => format!("{} {}", prefix, key),
3134 None => key,
3135 };
3136 req_builder = req_builder.header("Authorization", value);
3137 };
3138
3139 let req = req_builder.build()?;
3140 let resp = configuration.client.execute(req).await?;
3141
3142 let status = resp.status();
3143 let content_type = resp
3144 .headers()
3145 .get("content-type")
3146 .and_then(|v| v.to_str().ok())
3147 .unwrap_or("application/octet-stream");
3148 let content_type = super::ContentType::from(content_type);
3149
3150 if !status.is_client_error() && !status.is_server_error() {
3151 let content = resp.text().await?;
3152 match content_type {
3153 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3154 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetEarningsCalendar200Response`"))),
3155 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetEarningsCalendar200Response`")))),
3156 }
3157 } else {
3158 let content = resp.text().await?;
3159 let entity: Option<GetEarningsCalendarError> = serde_json::from_str(&content).ok();
3160 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3161 }
3162}
3163
3164pub async fn get_income_statement(configuration: &configuration::Configuration, params: GetIncomeStatementParams) -> Result<models::GetIncomeStatement200Response, Error<GetIncomeStatementError>> {
3166 let p_query_symbol = params.symbol;
3168 let p_query_figi = params.figi;
3169 let p_query_isin = params.isin;
3170 let p_query_cusip = params.cusip;
3171 let p_query_exchange = params.exchange;
3172 let p_query_mic_code = params.mic_code;
3173 let p_query_country = params.country;
3174 let p_query_period = params.period;
3175 let p_query_start_date = params.start_date;
3176 let p_query_end_date = params.end_date;
3177 let p_query_outputsize = params.outputsize;
3178
3179 let uri_str = format!("{}/income_statement", configuration.base_path);
3180 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3181
3182 if let Some(ref param_value) = p_query_symbol {
3183 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3184 }
3185 if let Some(ref param_value) = p_query_figi {
3186 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
3187 }
3188 if let Some(ref param_value) = p_query_isin {
3189 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
3190 }
3191 if let Some(ref param_value) = p_query_cusip {
3192 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
3193 }
3194 if let Some(ref param_value) = p_query_exchange {
3195 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3196 }
3197 if let Some(ref param_value) = p_query_mic_code {
3198 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3199 }
3200 if let Some(ref param_value) = p_query_country {
3201 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3202 }
3203 if let Some(ref param_value) = p_query_period {
3204 req_builder = req_builder.query(&[("period", &serde_json::to_string(param_value)?)]);
3205 }
3206 if let Some(ref param_value) = p_query_start_date {
3207 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3208 }
3209 if let Some(ref param_value) = p_query_end_date {
3210 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
3211 }
3212 if let Some(ref param_value) = p_query_outputsize {
3213 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
3214 }
3215 if let Some(ref user_agent) = configuration.user_agent {
3216 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3217 }
3218 if let Some(ref apikey) = configuration.api_key {
3219 let key = apikey.key.clone();
3220 let value = match apikey.prefix {
3221 Some(ref prefix) => format!("{} {}", prefix, key),
3222 None => key,
3223 };
3224 req_builder = req_builder.header("Authorization", value);
3225 };
3226
3227 let req = req_builder.build()?;
3228 let resp = configuration.client.execute(req).await?;
3229
3230 let status = resp.status();
3231 let content_type = resp
3232 .headers()
3233 .get("content-type")
3234 .and_then(|v| v.to_str().ok())
3235 .unwrap_or("application/octet-stream");
3236 let content_type = super::ContentType::from(content_type);
3237
3238 if !status.is_client_error() && !status.is_server_error() {
3239 let content = resp.text().await?;
3240 match content_type {
3241 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3242 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetIncomeStatement200Response`"))),
3243 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetIncomeStatement200Response`")))),
3244 }
3245 } else {
3246 let content = resp.text().await?;
3247 let entity: Option<GetIncomeStatementError> = serde_json::from_str(&content).ok();
3248 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3249 }
3250}
3251
3252pub async fn get_income_statement_consolidated(configuration: &configuration::Configuration, params: GetIncomeStatementConsolidatedParams) -> Result<models::GetIncomeStatementConsolidated200Response, Error<GetIncomeStatementConsolidatedError>> {
3254 let p_query_symbol = params.symbol;
3256 let p_query_figi = params.figi;
3257 let p_query_isin = params.isin;
3258 let p_query_cusip = params.cusip;
3259 let p_query_exchange = params.exchange;
3260 let p_query_mic_code = params.mic_code;
3261 let p_query_country = params.country;
3262 let p_query_period = params.period;
3263 let p_query_start_date = params.start_date;
3264 let p_query_end_date = params.end_date;
3265 let p_query_outputsize = params.outputsize;
3266
3267 let uri_str = format!("{}/income_statement/consolidated", configuration.base_path);
3268 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3269
3270 if let Some(ref param_value) = p_query_symbol {
3271 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3272 }
3273 if let Some(ref param_value) = p_query_figi {
3274 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
3275 }
3276 if let Some(ref param_value) = p_query_isin {
3277 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
3278 }
3279 if let Some(ref param_value) = p_query_cusip {
3280 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
3281 }
3282 if let Some(ref param_value) = p_query_exchange {
3283 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3284 }
3285 if let Some(ref param_value) = p_query_mic_code {
3286 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3287 }
3288 if let Some(ref param_value) = p_query_country {
3289 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3290 }
3291 if let Some(ref param_value) = p_query_period {
3292 req_builder = req_builder.query(&[("period", &serde_json::to_string(param_value)?)]);
3293 }
3294 if let Some(ref param_value) = p_query_start_date {
3295 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3296 }
3297 if let Some(ref param_value) = p_query_end_date {
3298 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
3299 }
3300 if let Some(ref param_value) = p_query_outputsize {
3301 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
3302 }
3303 if let Some(ref user_agent) = configuration.user_agent {
3304 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3305 }
3306 if let Some(ref apikey) = configuration.api_key {
3307 let key = apikey.key.clone();
3308 let value = match apikey.prefix {
3309 Some(ref prefix) => format!("{} {}", prefix, key),
3310 None => key,
3311 };
3312 req_builder = req_builder.header("Authorization", value);
3313 };
3314
3315 let req = req_builder.build()?;
3316 let resp = configuration.client.execute(req).await?;
3317
3318 let status = resp.status();
3319 let content_type = resp
3320 .headers()
3321 .get("content-type")
3322 .and_then(|v| v.to_str().ok())
3323 .unwrap_or("application/octet-stream");
3324 let content_type = super::ContentType::from(content_type);
3325
3326 if !status.is_client_error() && !status.is_server_error() {
3327 let content = resp.text().await?;
3328 match content_type {
3329 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3330 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetIncomeStatementConsolidated200Response`"))),
3331 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetIncomeStatementConsolidated200Response`")))),
3332 }
3333 } else {
3334 let content = resp.text().await?;
3335 let entity: Option<GetIncomeStatementConsolidatedError> = serde_json::from_str(&content).ok();
3336 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3337 }
3338}
3339
3340pub async fn get_ipo_calendar(configuration: &configuration::Configuration, params: GetIpoCalendarParams) -> Result<std::collections::HashMap<String, Vec<models::GetIpoCalendar200ResponseValueInner>>, Error<GetIpoCalendarError>> {
3342 let p_query_exchange = params.exchange;
3344 let p_query_mic_code = params.mic_code;
3345 let p_query_country = params.country;
3346 let p_query_start_date = params.start_date;
3347 let p_query_end_date = params.end_date;
3348
3349 let uri_str = format!("{}/ipo_calendar", configuration.base_path);
3350 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3351
3352 if let Some(ref param_value) = p_query_exchange {
3353 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3354 }
3355 if let Some(ref param_value) = p_query_mic_code {
3356 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3357 }
3358 if let Some(ref param_value) = p_query_country {
3359 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3360 }
3361 if let Some(ref param_value) = p_query_start_date {
3362 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3363 }
3364 if let Some(ref param_value) = p_query_end_date {
3365 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
3366 }
3367 if let Some(ref user_agent) = configuration.user_agent {
3368 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3369 }
3370 if let Some(ref apikey) = configuration.api_key {
3371 let key = apikey.key.clone();
3372 let value = match apikey.prefix {
3373 Some(ref prefix) => format!("{} {}", prefix, key),
3374 None => key,
3375 };
3376 req_builder = req_builder.header("Authorization", value);
3377 };
3378
3379 let req = req_builder.build()?;
3380 let resp = configuration.client.execute(req).await?;
3381
3382 let status = resp.status();
3383 let content_type = resp
3384 .headers()
3385 .get("content-type")
3386 .and_then(|v| v.to_str().ok())
3387 .unwrap_or("application/octet-stream");
3388 let content_type = super::ContentType::from(content_type);
3389
3390 if !status.is_client_error() && !status.is_server_error() {
3391 let content = resp.text().await?;
3392 match content_type {
3393 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3394 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, Vec<models::GetIpoCalendar200ResponseValueInner>>`"))),
3395 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, Vec<models::GetIpoCalendar200ResponseValueInner>>`")))),
3396 }
3397 } else {
3398 let content = resp.text().await?;
3399 let entity: Option<GetIpoCalendarError> = serde_json::from_str(&content).ok();
3400 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3401 }
3402}
3403
3404pub async fn get_key_executives(configuration: &configuration::Configuration, params: GetKeyExecutivesParams) -> Result<models::GetKeyExecutives200Response, Error<GetKeyExecutivesError>> {
3406 let p_query_symbol = params.symbol;
3408 let p_query_figi = params.figi;
3409 let p_query_isin = params.isin;
3410 let p_query_cusip = params.cusip;
3411 let p_query_exchange = params.exchange;
3412 let p_query_mic_code = params.mic_code;
3413 let p_query_country = params.country;
3414
3415 let uri_str = format!("{}/key_executives", configuration.base_path);
3416 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3417
3418 if let Some(ref param_value) = p_query_symbol {
3419 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3420 }
3421 if let Some(ref param_value) = p_query_figi {
3422 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
3423 }
3424 if let Some(ref param_value) = p_query_isin {
3425 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
3426 }
3427 if let Some(ref param_value) = p_query_cusip {
3428 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
3429 }
3430 if let Some(ref param_value) = p_query_exchange {
3431 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3432 }
3433 if let Some(ref param_value) = p_query_mic_code {
3434 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3435 }
3436 if let Some(ref param_value) = p_query_country {
3437 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3438 }
3439 if let Some(ref user_agent) = configuration.user_agent {
3440 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3441 }
3442 if let Some(ref apikey) = configuration.api_key {
3443 let key = apikey.key.clone();
3444 let value = match apikey.prefix {
3445 Some(ref prefix) => format!("{} {}", prefix, key),
3446 None => key,
3447 };
3448 req_builder = req_builder.header("Authorization", value);
3449 };
3450
3451 let req = req_builder.build()?;
3452 let resp = configuration.client.execute(req).await?;
3453
3454 let status = resp.status();
3455 let content_type = resp
3456 .headers()
3457 .get("content-type")
3458 .and_then(|v| v.to_str().ok())
3459 .unwrap_or("application/octet-stream");
3460 let content_type = super::ContentType::from(content_type);
3461
3462 if !status.is_client_error() && !status.is_server_error() {
3463 let content = resp.text().await?;
3464 match content_type {
3465 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3466 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetKeyExecutives200Response`"))),
3467 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetKeyExecutives200Response`")))),
3468 }
3469 } else {
3470 let content = resp.text().await?;
3471 let entity: Option<GetKeyExecutivesError> = serde_json::from_str(&content).ok();
3472 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3473 }
3474}
3475
3476pub async fn get_last_changes(configuration: &configuration::Configuration, params: GetLastChangesParams) -> Result<models::GetLastChanges200Response, Error<GetLastChangesError>> {
3478 let p_path_endpoint = params.endpoint;
3480 let p_query_start_date = params.start_date;
3481 let p_query_symbol = params.symbol;
3482 let p_query_exchange = params.exchange;
3483 let p_query_mic_code = params.mic_code;
3484 let p_query_country = params.country;
3485 let p_query_page = params.page;
3486 let p_query_outputsize = params.outputsize;
3487
3488 let uri_str = format!("{}/last_change/{endpoint}", configuration.base_path, endpoint=crate::apis::urlencode(p_path_endpoint));
3489 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3490
3491 if let Some(ref param_value) = p_query_start_date {
3492 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3493 }
3494 if let Some(ref param_value) = p_query_symbol {
3495 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3496 }
3497 if let Some(ref param_value) = p_query_exchange {
3498 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3499 }
3500 if let Some(ref param_value) = p_query_mic_code {
3501 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3502 }
3503 if let Some(ref param_value) = p_query_country {
3504 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3505 }
3506 if let Some(ref param_value) = p_query_page {
3507 req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
3508 }
3509 if let Some(ref param_value) = p_query_outputsize {
3510 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
3511 }
3512 if let Some(ref user_agent) = configuration.user_agent {
3513 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3514 }
3515 if let Some(ref apikey) = configuration.api_key {
3516 let key = apikey.key.clone();
3517 let value = match apikey.prefix {
3518 Some(ref prefix) => format!("{} {}", prefix, key),
3519 None => key,
3520 };
3521 req_builder = req_builder.header("Authorization", value);
3522 };
3523
3524 let req = req_builder.build()?;
3525 let resp = configuration.client.execute(req).await?;
3526
3527 let status = resp.status();
3528 let content_type = resp
3529 .headers()
3530 .get("content-type")
3531 .and_then(|v| v.to_str().ok())
3532 .unwrap_or("application/octet-stream");
3533 let content_type = super::ContentType::from(content_type);
3534
3535 if !status.is_client_error() && !status.is_server_error() {
3536 let content = resp.text().await?;
3537 match content_type {
3538 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3539 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetLastChanges200Response`"))),
3540 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetLastChanges200Response`")))),
3541 }
3542 } else {
3543 let content = resp.text().await?;
3544 let entity: Option<GetLastChangesError> = serde_json::from_str(&content).ok();
3545 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3546 }
3547}
3548
3549pub async fn get_logo(configuration: &configuration::Configuration, params: GetLogoParams) -> Result<models::GetLogo200Response, Error<GetLogoError>> {
3551 let p_query_symbol = params.symbol;
3553 let p_query_exchange = params.exchange;
3554 let p_query_mic_code = params.mic_code;
3555 let p_query_country = params.country;
3556
3557 let uri_str = format!("{}/logo", configuration.base_path);
3558 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3559
3560 req_builder = req_builder.query(&[("symbol", &p_query_symbol.to_string())]);
3561 if let Some(ref param_value) = p_query_exchange {
3562 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3563 }
3564 if let Some(ref param_value) = p_query_mic_code {
3565 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3566 }
3567 if let Some(ref param_value) = p_query_country {
3568 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3569 }
3570 if let Some(ref user_agent) = configuration.user_agent {
3571 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3572 }
3573 if let Some(ref apikey) = configuration.api_key {
3574 let key = apikey.key.clone();
3575 let value = match apikey.prefix {
3576 Some(ref prefix) => format!("{} {}", prefix, key),
3577 None => key,
3578 };
3579 req_builder = req_builder.header("Authorization", value);
3580 };
3581
3582 let req = req_builder.build()?;
3583 let resp = configuration.client.execute(req).await?;
3584
3585 let status = resp.status();
3586 let content_type = resp
3587 .headers()
3588 .get("content-type")
3589 .and_then(|v| v.to_str().ok())
3590 .unwrap_or("application/octet-stream");
3591 let content_type = super::ContentType::from(content_type);
3592
3593 if !status.is_client_error() && !status.is_server_error() {
3594 let content = resp.text().await?;
3595 match content_type {
3596 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3597 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetLogo200Response`"))),
3598 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetLogo200Response`")))),
3599 }
3600 } else {
3601 let content = resp.text().await?;
3602 let entity: Option<GetLogoError> = serde_json::from_str(&content).ok();
3603 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3604 }
3605}
3606
3607pub async fn get_market_cap(configuration: &configuration::Configuration, params: GetMarketCapParams) -> Result<models::GetMarketCap200Response, Error<GetMarketCapError>> {
3609 let p_query_symbol = params.symbol;
3611 let p_query_figi = params.figi;
3612 let p_query_isin = params.isin;
3613 let p_query_cusip = params.cusip;
3614 let p_query_exchange = params.exchange;
3615 let p_query_mic_code = params.mic_code;
3616 let p_query_country = params.country;
3617 let p_query_start_date = params.start_date;
3618 let p_query_end_date = params.end_date;
3619 let p_query_page = params.page;
3620 let p_query_outputsize = params.outputsize;
3621
3622 let uri_str = format!("{}/market_cap", configuration.base_path);
3623 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3624
3625 if let Some(ref param_value) = p_query_symbol {
3626 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3627 }
3628 if let Some(ref param_value) = p_query_figi {
3629 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
3630 }
3631 if let Some(ref param_value) = p_query_isin {
3632 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
3633 }
3634 if let Some(ref param_value) = p_query_cusip {
3635 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
3636 }
3637 if let Some(ref param_value) = p_query_exchange {
3638 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3639 }
3640 if let Some(ref param_value) = p_query_mic_code {
3641 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3642 }
3643 if let Some(ref param_value) = p_query_country {
3644 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3645 }
3646 if let Some(ref param_value) = p_query_start_date {
3647 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3648 }
3649 if let Some(ref param_value) = p_query_end_date {
3650 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
3651 }
3652 if let Some(ref param_value) = p_query_page {
3653 req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
3654 }
3655 if let Some(ref param_value) = p_query_outputsize {
3656 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
3657 }
3658 if let Some(ref user_agent) = configuration.user_agent {
3659 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3660 }
3661 if let Some(ref apikey) = configuration.api_key {
3662 let key = apikey.key.clone();
3663 let value = match apikey.prefix {
3664 Some(ref prefix) => format!("{} {}", prefix, key),
3665 None => key,
3666 };
3667 req_builder = req_builder.header("Authorization", value);
3668 };
3669
3670 let req = req_builder.build()?;
3671 let resp = configuration.client.execute(req).await?;
3672
3673 let status = resp.status();
3674 let content_type = resp
3675 .headers()
3676 .get("content-type")
3677 .and_then(|v| v.to_str().ok())
3678 .unwrap_or("application/octet-stream");
3679 let content_type = super::ContentType::from(content_type);
3680
3681 if !status.is_client_error() && !status.is_server_error() {
3682 let content = resp.text().await?;
3683 match content_type {
3684 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3685 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetMarketCap200Response`"))),
3686 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetMarketCap200Response`")))),
3687 }
3688 } else {
3689 let content = resp.text().await?;
3690 let entity: Option<GetMarketCapError> = serde_json::from_str(&content).ok();
3691 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3692 }
3693}
3694
3695pub async fn get_profile(configuration: &configuration::Configuration, params: GetProfileParams) -> Result<models::GetProfile200Response, Error<GetProfileError>> {
3697 let p_query_symbol = params.symbol;
3699 let p_query_figi = params.figi;
3700 let p_query_isin = params.isin;
3701 let p_query_cusip = params.cusip;
3702 let p_query_exchange = params.exchange;
3703 let p_query_mic_code = params.mic_code;
3704 let p_query_country = params.country;
3705
3706 let uri_str = format!("{}/profile", configuration.base_path);
3707 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3708
3709 if let Some(ref param_value) = p_query_symbol {
3710 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3711 }
3712 if let Some(ref param_value) = p_query_figi {
3713 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
3714 }
3715 if let Some(ref param_value) = p_query_isin {
3716 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
3717 }
3718 if let Some(ref param_value) = p_query_cusip {
3719 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
3720 }
3721 if let Some(ref param_value) = p_query_exchange {
3722 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3723 }
3724 if let Some(ref param_value) = p_query_mic_code {
3725 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3726 }
3727 if let Some(ref param_value) = p_query_country {
3728 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3729 }
3730 if let Some(ref user_agent) = configuration.user_agent {
3731 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3732 }
3733 if let Some(ref apikey) = configuration.api_key {
3734 let key = apikey.key.clone();
3735 let value = match apikey.prefix {
3736 Some(ref prefix) => format!("{} {}", prefix, key),
3737 None => key,
3738 };
3739 req_builder = req_builder.header("Authorization", value);
3740 };
3741
3742 let req = req_builder.build()?;
3743 let resp = configuration.client.execute(req).await?;
3744
3745 let status = resp.status();
3746 let content_type = resp
3747 .headers()
3748 .get("content-type")
3749 .and_then(|v| v.to_str().ok())
3750 .unwrap_or("application/octet-stream");
3751 let content_type = super::ContentType::from(content_type);
3752
3753 if !status.is_client_error() && !status.is_server_error() {
3754 let content = resp.text().await?;
3755 match content_type {
3756 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3757 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetProfile200Response`"))),
3758 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetProfile200Response`")))),
3759 }
3760 } else {
3761 let content = resp.text().await?;
3762 let entity: Option<GetProfileError> = serde_json::from_str(&content).ok();
3763 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3764 }
3765}
3766
3767pub async fn get_splits(configuration: &configuration::Configuration, params: GetSplitsParams) -> Result<models::GetSplits200Response, Error<GetSplitsError>> {
3769 let p_query_symbol = params.symbol;
3771 let p_query_figi = params.figi;
3772 let p_query_isin = params.isin;
3773 let p_query_cusip = params.cusip;
3774 let p_query_exchange = params.exchange;
3775 let p_query_mic_code = params.mic_code;
3776 let p_query_country = params.country;
3777 let p_query_range = params.range;
3778 let p_query_start_date = params.start_date;
3779 let p_query_end_date = params.end_date;
3780
3781 let uri_str = format!("{}/splits", configuration.base_path);
3782 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3783
3784 if let Some(ref param_value) = p_query_symbol {
3785 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3786 }
3787 if let Some(ref param_value) = p_query_figi {
3788 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
3789 }
3790 if let Some(ref param_value) = p_query_isin {
3791 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
3792 }
3793 if let Some(ref param_value) = p_query_cusip {
3794 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
3795 }
3796 if let Some(ref param_value) = p_query_exchange {
3797 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3798 }
3799 if let Some(ref param_value) = p_query_mic_code {
3800 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3801 }
3802 if let Some(ref param_value) = p_query_country {
3803 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3804 }
3805 if let Some(ref param_value) = p_query_range {
3806 req_builder = req_builder.query(&[("range", &serde_json::to_string(param_value)?)]);
3807 }
3808 if let Some(ref param_value) = p_query_start_date {
3809 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3810 }
3811 if let Some(ref param_value) = p_query_end_date {
3812 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
3813 }
3814 if let Some(ref user_agent) = configuration.user_agent {
3815 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3816 }
3817 if let Some(ref apikey) = configuration.api_key {
3818 let key = apikey.key.clone();
3819 let value = match apikey.prefix {
3820 Some(ref prefix) => format!("{} {}", prefix, key),
3821 None => key,
3822 };
3823 req_builder = req_builder.header("Authorization", value);
3824 };
3825
3826 let req = req_builder.build()?;
3827 let resp = configuration.client.execute(req).await?;
3828
3829 let status = resp.status();
3830 let content_type = resp
3831 .headers()
3832 .get("content-type")
3833 .and_then(|v| v.to_str().ok())
3834 .unwrap_or("application/octet-stream");
3835 let content_type = super::ContentType::from(content_type);
3836
3837 if !status.is_client_error() && !status.is_server_error() {
3838 let content = resp.text().await?;
3839 match content_type {
3840 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3841 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetSplits200Response`"))),
3842 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetSplits200Response`")))),
3843 }
3844 } else {
3845 let content = resp.text().await?;
3846 let entity: Option<GetSplitsError> = serde_json::from_str(&content).ok();
3847 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3848 }
3849}
3850
3851pub async fn get_splits_calendar(configuration: &configuration::Configuration, params: GetSplitsCalendarParams) -> Result<Vec<models::SplitsCalendarResponseItem>, Error<GetSplitsCalendarError>> {
3853 let p_query_symbol = params.symbol;
3855 let p_query_figi = params.figi;
3856 let p_query_isin = params.isin;
3857 let p_query_cusip = params.cusip;
3858 let p_query_exchange = params.exchange;
3859 let p_query_mic_code = params.mic_code;
3860 let p_query_country = params.country;
3861 let p_query_start_date = params.start_date;
3862 let p_query_end_date = params.end_date;
3863 let p_query_outputsize = params.outputsize;
3864 let p_query_page = params.page;
3865
3866 let uri_str = format!("{}/splits_calendar", configuration.base_path);
3867 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3868
3869 if let Some(ref param_value) = p_query_symbol {
3870 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3871 }
3872 if let Some(ref param_value) = p_query_figi {
3873 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
3874 }
3875 if let Some(ref param_value) = p_query_isin {
3876 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
3877 }
3878 if let Some(ref param_value) = p_query_cusip {
3879 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
3880 }
3881 if let Some(ref param_value) = p_query_exchange {
3882 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3883 }
3884 if let Some(ref param_value) = p_query_mic_code {
3885 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3886 }
3887 if let Some(ref param_value) = p_query_country {
3888 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3889 }
3890 if let Some(ref param_value) = p_query_start_date {
3891 req_builder = req_builder.query(&[("start_date", ¶m_value.to_string())]);
3892 }
3893 if let Some(ref param_value) = p_query_end_date {
3894 req_builder = req_builder.query(&[("end_date", ¶m_value.to_string())]);
3895 }
3896 if let Some(ref param_value) = p_query_outputsize {
3897 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
3898 }
3899 if let Some(ref param_value) = p_query_page {
3900 req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
3901 }
3902 if let Some(ref user_agent) = configuration.user_agent {
3903 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3904 }
3905 if let Some(ref apikey) = configuration.api_key {
3906 let key = apikey.key.clone();
3907 let value = match apikey.prefix {
3908 Some(ref prefix) => format!("{} {}", prefix, key),
3909 None => key,
3910 };
3911 req_builder = req_builder.header("Authorization", value);
3912 };
3913
3914 let req = req_builder.build()?;
3915 let resp = configuration.client.execute(req).await?;
3916
3917 let status = resp.status();
3918 let content_type = resp
3919 .headers()
3920 .get("content-type")
3921 .and_then(|v| v.to_str().ok())
3922 .unwrap_or("application/octet-stream");
3923 let content_type = super::ContentType::from(content_type);
3924
3925 if !status.is_client_error() && !status.is_server_error() {
3926 let content = resp.text().await?;
3927 match content_type {
3928 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3929 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::SplitsCalendarResponseItem>`"))),
3930 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::SplitsCalendarResponseItem>`")))),
3931 }
3932 } else {
3933 let content = resp.text().await?;
3934 let entity: Option<GetSplitsCalendarError> = serde_json::from_str(&content).ok();
3935 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3936 }
3937}
3938
3939pub async fn get_statistics(configuration: &configuration::Configuration, params: GetStatisticsParams) -> Result<models::GetStatistics200Response, Error<GetStatisticsError>> {
3941 let p_query_symbol = params.symbol;
3943 let p_query_figi = params.figi;
3944 let p_query_isin = params.isin;
3945 let p_query_cusip = params.cusip;
3946 let p_query_exchange = params.exchange;
3947 let p_query_mic_code = params.mic_code;
3948 let p_query_country = params.country;
3949
3950 let uri_str = format!("{}/statistics", configuration.base_path);
3951 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3952
3953 if let Some(ref param_value) = p_query_symbol {
3954 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
3955 }
3956 if let Some(ref param_value) = p_query_figi {
3957 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
3958 }
3959 if let Some(ref param_value) = p_query_isin {
3960 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
3961 }
3962 if let Some(ref param_value) = p_query_cusip {
3963 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
3964 }
3965 if let Some(ref param_value) = p_query_exchange {
3966 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
3967 }
3968 if let Some(ref param_value) = p_query_mic_code {
3969 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
3970 }
3971 if let Some(ref param_value) = p_query_country {
3972 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
3973 }
3974 if let Some(ref user_agent) = configuration.user_agent {
3975 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3976 }
3977 if let Some(ref apikey) = configuration.api_key {
3978 let key = apikey.key.clone();
3979 let value = match apikey.prefix {
3980 Some(ref prefix) => format!("{} {}", prefix, key),
3981 None => key,
3982 };
3983 req_builder = req_builder.header("Authorization", value);
3984 };
3985
3986 let req = req_builder.build()?;
3987 let resp = configuration.client.execute(req).await?;
3988
3989 let status = resp.status();
3990 let content_type = resp
3991 .headers()
3992 .get("content-type")
3993 .and_then(|v| v.to_str().ok())
3994 .unwrap_or("application/octet-stream");
3995 let content_type = super::ContentType::from(content_type);
3996
3997 if !status.is_client_error() && !status.is_server_error() {
3998 let content = resp.text().await?;
3999 match content_type {
4000 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4001 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetStatistics200Response`"))),
4002 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetStatistics200Response`")))),
4003 }
4004 } else {
4005 let content = resp.text().await?;
4006 let entity: Option<GetStatisticsError> = serde_json::from_str(&content).ok();
4007 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4008 }
4009}
4010