pipedrive_rs/models/update_subscription_installment_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 UpdateSubscriptionInstallmentRequest {
16 /// 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).
17 #[serde(rename = "payments")]
18 pub payments: Vec<serde_json::Value>,
19 /// Indicates that the deal value must be set to installment subscription's total value
20 #[serde(rename = "update_deal_value", skip_serializing_if = "Option::is_none")]
21 pub update_deal_value: Option<bool>,
22}
23
24impl UpdateSubscriptionInstallmentRequest {
25 pub fn new(payments: Vec<serde_json::Value>) -> UpdateSubscriptionInstallmentRequest {
26 UpdateSubscriptionInstallmentRequest {
27 payments,
28 update_deal_value: None,
29 }
30 }
31}
32
33