pipedrive_rs/models/
update_recurring_subscription_request.rs

1/*
2 * Pipedrive API v1
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct UpdateRecurringSubscriptionRequest {
16    /// The description of the recurring subscription
17    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
18    pub description: Option<String>,
19    /// The amount of each payment
20    #[serde(rename = "cycle_amount", skip_serializing_if = "Option::is_none")]
21    pub cycle_amount: Option<i32>,
22    /// Array of additional payments. It requires a minimum structure as follows: [{ amount:SUM, description:DESCRIPTION, due_at:PAYMENT_DATE }]. Replace SUM with a payment amount, DESCRIPTION with an explanation string, PAYMENT_DATE with a date (format YYYY-MM-DD).
23    #[serde(rename = "payments", skip_serializing_if = "Option::is_none")]
24    pub payments: Option<Vec<serde_json::Value>>,
25    /// Indicates that the deal value must be set to recurring subscription's MRR value
26    #[serde(rename = "update_deal_value", skip_serializing_if = "Option::is_none")]
27    pub update_deal_value: Option<bool>,
28    /// All payments after that date will be affected. Format: YYYY-MM-DD
29    #[serde(rename = "effective_date")]
30    pub effective_date: String,
31}
32
33impl UpdateRecurringSubscriptionRequest {
34    pub fn new(effective_date: String) -> UpdateRecurringSubscriptionRequest {
35        UpdateRecurringSubscriptionRequest {
36            description: None,
37            cycle_amount: None,
38            payments: None,
39            update_deal_value: None,
40            effective_date,
41        }
42    }
43}
44
45