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
116
117
118
119
#[derive(Debug)]
pub struct FeeCheck {
pub currency: Option<String>,
pub commands: Vec<FeeCheckCommand>,
}
#[derive(Debug)]
pub struct FeeAgreement {
pub currency: Option<String>,
pub fees: Vec<Fee>,
}
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
pub enum Command {
Create,
Renew,
Transfer,
Delete,
Restore,
Update,
Check,
Info,
Custom,
}
#[derive(Debug)]
pub enum Applied {
Immediate,
Delayed,
Unspecified,
}
#[derive(Debug)]
pub struct FeeCheckCommand {
pub command: Command,
pub period: Option<super::Period>,
}
#[derive(Debug)]
pub struct FeeCheckData {
pub available: bool,
pub commands: Vec<FeeCommand>,
pub reason: Option<String>,
}
#[derive(Debug)]
pub struct FeeCommand {
pub command: Command,
pub period: Option<super::Period>,
pub standard: Option<bool>,
pub currency: String,
pub fees: Vec<Fee>,
pub credits: Vec<Credit>,
pub reason: Option<String>,
pub class: Option<String>,
}
#[derive(Debug)]
pub struct Fee {
pub value: String,
pub description: Option<String>,
pub refundable: Option<bool>,
pub grace_period: Option<String>,
pub applied: Applied,
}
#[derive(Debug)]
pub struct Credit {
pub value: String,
pub description: Option<String>,
}
#[derive(Debug)]
pub struct FeeData {
pub currency: String,
pub period: Option<super::Period>,
pub fees: Vec<Fee>,
pub credits: Vec<Credit>,
pub balance: Option<String>,
pub credit_limit: Option<String>,
}
#[derive(Debug)]
pub struct DonutsFeeData {
pub sets: Vec<DonutsFeeSet>,
}
#[derive(Debug)]
pub struct DonutsFeeSet {
pub fees: Vec<DonutsAmount>,
pub fee_type: DonutsFeeType,
pub category: DonutsCategory,
}
#[derive(Debug, Clone)]
pub struct DonutsCategory {
pub category: String,
pub name: Option<String>,
}
#[derive(Debug, Clone)]
pub struct DonutsFeeType {
pub fee_type: DonutsFeeTypes,
pub name: Option<String>,
}
#[derive(Debug, Copy, Clone)]
pub enum DonutsFeeTypes {
Fee,
Price,
Custom,
}
#[derive(Debug)]
pub struct DonutsAmount {
pub value: String,
pub command: Command,
pub command_name: Option<String>,
}