/*
* 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 UpdateSubscriptionInstallmentRequest {
/// Array of payments. It requires a minimum structure as follows: [{ amount:SUM, description:DESCRIPTION, due_at:PAYMENT_DATE }]. Replace SUM with a payment amount, DESCRIPTION with a explanation string, PAYMENT_DATE with a date (format YYYY-MM-DD).
#[serde(rename = "payments")]
pub payments: Vec<serde_json::Value>,
/// Indicates that the deal value must be set to installment subscription's total value
#[serde(rename = "update_deal_value", skip_serializing_if = "Option::is_none")]
pub update_deal_value: Option<bool>,
}
impl UpdateSubscriptionInstallmentRequest {
pub fn new(payments: Vec<serde_json::Value>) -> UpdateSubscriptionInstallmentRequest {
UpdateSubscriptionInstallmentRequest {
payments,
update_deal_value: None,
}
}
}