You've already forked AstralRinth
forked from didirus/AstralRinth
Prorations (#975)
* Prorations * Fix pyro integration * set server uuid on creation * fix comp * Fix new charge date, pyro suspend reason * Update server creation endpoint
This commit is contained in:
@@ -21,7 +21,12 @@ pub struct Product {
|
||||
#[serde(tag = "type", rename_all = "kebab-case")]
|
||||
pub enum ProductMetadata {
|
||||
Midas,
|
||||
Pyro { ram: u32 },
|
||||
Pyro {
|
||||
cpu: u32,
|
||||
ram: u32,
|
||||
swap: u32,
|
||||
storage: u32,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Serialize, Deserialize, Debug)]
|
||||
@@ -70,13 +75,16 @@ impl PriceDuration {
|
||||
_ => PriceDuration::Monthly,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn as_str(&self) -> &'static str {
|
||||
match self {
|
||||
PriceDuration::Monthly => "monthly",
|
||||
PriceDuration::Yearly => "yearly",
|
||||
}
|
||||
}
|
||||
|
||||
pub fn iterator() -> impl Iterator<Item = PriceDuration> {
|
||||
vec![PriceDuration::Monthly, PriceDuration::Yearly].into_iter()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Serialize, Deserialize, Debug)]
|
||||
|
||||
Reference in New Issue
Block a user