openapi_github/models/
sponsorship_tier.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SponsorshipTier {
17 #[serde(rename = "created_at")]
18 pub created_at: String,
19 #[serde(rename = "description")]
20 pub description: String,
21 #[serde(rename = "is_custom_ammount", skip_serializing_if = "Option::is_none")]
22 pub is_custom_ammount: Option<bool>,
23 #[serde(rename = "is_custom_amount", skip_serializing_if = "Option::is_none")]
24 pub is_custom_amount: Option<bool>,
25 #[serde(rename = "is_one_time")]
26 pub is_one_time: bool,
27 #[serde(rename = "monthly_price_in_cents")]
28 pub monthly_price_in_cents: i32,
29 #[serde(rename = "monthly_price_in_dollars")]
30 pub monthly_price_in_dollars: i32,
31 #[serde(rename = "name")]
32 pub name: String,
33 #[serde(rename = "node_id")]
34 pub node_id: String,
35}
36
37impl SponsorshipTier {
38 pub fn new(created_at: String, description: String, is_one_time: bool, monthly_price_in_cents: i32, monthly_price_in_dollars: i32, name: String, node_id: String) -> SponsorshipTier {
40 SponsorshipTier {
41 created_at,
42 description,
43 is_custom_ammount: None,
44 is_custom_amount: None,
45 is_one_time,
46 monthly_price_in_cents,
47 monthly_price_in_dollars,
48 name,
49 node_id,
50 }
51 }
52}
53