Skip to main content

esi_openapi/groups/
insurance.rs

1use crate::prelude::*;
2
3/// Endpoints for Insurance
4pub struct InsuranceGroup<'a> {
5    pub(crate) esi: &'a Esi,
6}
7
8/// One insurance level for a ship type.
9#[derive(Debug, Clone, PartialEq, Deserialize)]
10#[allow(missing_docs)]
11pub struct InsuranceLevel {
12    pub cost: f64,
13    pub name: String,
14    pub payout: f64,
15}
16
17/// Insurance prices for a ship type.
18#[derive(Debug, Clone, PartialEq, Deserialize)]
19#[allow(missing_docs)]
20pub struct InsurancePrice {
21    pub levels: Vec<InsuranceLevel>,
22    pub type_id: i64,
23}
24
25impl InsuranceGroup<'_> {
26    api_get!(
27        /// List the insurance levels for all ship types.
28        get_prices,
29        "GetInsurancePrices",
30        RequestType::Public,
31        Vec<InsurancePrice>,
32    );
33}