pipedrive-rs 0.1.0

Rust PipedriveClient
Documentation
/*
 * Pipedrive API v1
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct SubscriptionsIdResponse200AllOfData {
    /// The ID of the subscription
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<i32>,
    /// The ID of the user who created the subscription
    #[serde(rename = "user_id", skip_serializing_if = "Option::is_none")]
    pub user_id: Option<i32>,
    /// The ID of the deal this subscription is associated with
    #[serde(rename = "deal_id", skip_serializing_if = "Option::is_none")]
    pub deal_id: Option<i32>,
    /// The description of the recurring subscription
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// The subscription status
    #[serde(rename = "is_active", skip_serializing_if = "Option::is_none")]
    pub is_active: Option<bool>,
    /// Shows how many payments a recurring subscription has
    #[serde(rename = "cycles_count", skip_serializing_if = "Option::is_none")]
    pub cycles_count: Option<i32>,
    /// The amount of each payment
    #[serde(rename = "cycle_amount", skip_serializing_if = "Option::is_none")]
    pub cycle_amount: Option<i32>,
    /// Indicates that the recurring subscription will last until it is manually canceled or deleted
    #[serde(rename = "infinite", skip_serializing_if = "Option::is_none")]
    pub infinite: Option<bool>,
    /// The currency of the subscription
    #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
    pub currency: Option<String>,
    /// The interval between payments
    #[serde(rename = "cadence_type", skip_serializing_if = "Option::is_none")]
    pub cadence_type: Option<String>,
    /// The start date of the recurring subscription
    #[serde(rename = "start_date", skip_serializing_if = "Option::is_none")]
    pub start_date: Option<String>,
    /// The end date of the subscription
    #[serde(rename = "end_date", skip_serializing_if = "Option::is_none")]
    pub end_date: Option<String>,
    /// The total value of all payments
    #[serde(rename = "lifetime_value", skip_serializing_if = "Option::is_none")]
    pub lifetime_value: Option<f64>,
    /// The final status of the subscription
    #[serde(rename = "final_status", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub final_status: Option<Option<String>>,
    /// The creation time of the subscription
    #[serde(rename = "add_time", skip_serializing_if = "Option::is_none")]
    pub add_time: Option<String>,
    /// The update time of the subscription
    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
    pub update_time: Option<String>,
}

impl SubscriptionsIdResponse200AllOfData {
    pub fn new() -> SubscriptionsIdResponse200AllOfData {
        SubscriptionsIdResponse200AllOfData {
            id: None,
            user_id: None,
            deal_id: None,
            description: None,
            is_active: None,
            cycles_count: None,
            cycle_amount: None,
            infinite: None,
            currency: None,
            cadence_type: None,
            start_date: None,
            end_date: None,
            lifetime_value: None,
            final_status: None,
            add_time: None,
            update_time: None,
        }
    }
}