1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* 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 UpdateRecurringSubscriptionRequest {
/// The description of the recurring subscription
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// The amount of each payment
#[serde(rename = "cycle_amount", skip_serializing_if = "Option::is_none")]
pub cycle_amount: Option<i32>,
/// 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).
#[serde(rename = "payments", skip_serializing_if = "Option::is_none")]
pub payments: Option<Vec<serde_json::Value>>,
/// Indicates that the deal value must be set to recurring subscription's MRR value
#[serde(rename = "update_deal_value", skip_serializing_if = "Option::is_none")]
pub update_deal_value: Option<bool>,
/// All payments after that date will be affected. Format: YYYY-MM-DD
#[serde(rename = "effective_date")]
pub effective_date: String,
}
impl UpdateRecurringSubscriptionRequest {
pub fn new(effective_date: String) -> UpdateRecurringSubscriptionRequest {
UpdateRecurringSubscriptionRequest {
description: None,
cycle_amount: None,
payments: None,
update_deal_value: None,
effective_date,
}
}
}