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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
* 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 PaymentResponse200AllOfDataInner {
/// The ID of the payment
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<i32>,
/// The ID of the subscription this payment is associated with
#[serde(rename = "subscription_id", skip_serializing_if = "Option::is_none")]
pub subscription_id: Option<i32>,
/// The ID of the deal this payment is associated with
#[serde(rename = "deal_id", skip_serializing_if = "Option::is_none")]
pub deal_id: Option<i32>,
/// The payment status
#[serde(rename = "is_active", skip_serializing_if = "Option::is_none")]
pub is_active: Option<bool>,
/// The payment amount
#[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
pub amount: Option<f64>,
/// The currency of the payment
#[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
pub currency: Option<String>,
/// The difference between the amount of the current payment and the previous payment. The value can be either positive or negative.
#[serde(rename = "change_amount", skip_serializing_if = "Option::is_none")]
pub change_amount: Option<f64>,
/// The date when payment occurs
#[serde(rename = "due_at", skip_serializing_if = "Option::is_none")]
pub due_at: Option<String>,
/// Represents the movement of revenue in comparison with the previous payment. Possible values are: `New` - first payment of the subscription. `Recurring` - no movement. `Expansion` - current payment amount > previous payment amount. `Contraction` - current payment amount < previous payment amount. `Churn` - last payment of the subscription.
#[serde(rename = "revenue_movement_type", skip_serializing_if = "Option::is_none")]
pub revenue_movement_type: Option<RevenueMovementType>,
/// The type of the payment. Possible values are: `Recurring` - payments occur over fixed intervals of time, `Additional` - extra payment not the recurring payment of the recurring subscription, `Installment` - payment of the installment subscription.
#[serde(rename = "payment_type", skip_serializing_if = "Option::is_none")]
pub payment_type: Option<PaymentType>,
/// The description of the payment
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// The creation time of the payment
#[serde(rename = "add_time", skip_serializing_if = "Option::is_none")]
pub add_time: Option<String>,
/// The update time of the payment
#[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
pub update_time: Option<String>,
}
impl PaymentResponse200AllOfDataInner {
pub fn new() -> PaymentResponse200AllOfDataInner {
PaymentResponse200AllOfDataInner {
id: None,
subscription_id: None,
deal_id: None,
is_active: None,
amount: None,
currency: None,
change_amount: None,
due_at: None,
revenue_movement_type: None,
payment_type: None,
description: None,
add_time: None,
update_time: None,
}
}
}
/// Represents the movement of revenue in comparison with the previous payment. Possible values are: `New` - first payment of the subscription. `Recurring` - no movement. `Expansion` - current payment amount > previous payment amount. `Contraction` - current payment amount < previous payment amount. `Churn` - last payment of the subscription.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum RevenueMovementType {
#[serde(rename = "new")]
New,
#[serde(rename = "recurring")]
Recurring,
#[serde(rename = "expansion")]
Expansion,
#[serde(rename = "contraction")]
Contraction,
#[serde(rename = "none")]
None,
#[serde(rename = "churn")]
Churn,
}
impl Default for RevenueMovementType {
fn default() -> RevenueMovementType {
Self::New
}
}
/// The type of the payment. Possible values are: `Recurring` - payments occur over fixed intervals of time, `Additional` - extra payment not the recurring payment of the recurring subscription, `Installment` - payment of the installment subscription.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PaymentType {
#[serde(rename = "recurring")]
Recurring,
#[serde(rename = "additional")]
Additional,
#[serde(rename = "installment")]
Installment,
}
impl Default for PaymentType {
fn default() -> PaymentType {
Self::Recurring
}
}