-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbilling_tariff.go
169 lines (117 loc) · 4.49 KB
/
billing_tariff.go
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
package tdproto
import "time"
// Tariff struct of billing API
type TariffBilling struct {
// Tariff id
Id string `json:"id"`
// Name of tariff
Name string `json:"name"`
// Nomenclature name of tariff
NomenclatureName string `json:"nomenclature_name"`
// Description of tariff
Description string `json:"description"`
// Benefit of tariff
Benefit string `json:"benefit,omitempty"`
// Currency of tariff
Currency Currency `json:"currency"`
// Priority of tariff
Priority uint32 `json:"priority,omitempty"`
// Cost of one workplace
CostWorkplace float64 `json:"cost_workplace"`
// Count of maximum workspaces on tariff
MaxWorkplaceCount uint32 `json:"max_workplace_count,omitempty"`
// Count of minimum workspaces on tariff
MinWorkplaceCount uint32 `json:"min_workplace_count,omitempty"`
// Count of free workspaces
FreeWorkplaceCount uint32 `json:"free_workplace_count"`
// Minimum step of change count workspaces on tariff
StepIncreasingWorkplaces uint32 `json:"step_increasing_workplaces"`
// Disk space limit per user
DiskSpaceQuotaMb float64 `json:"disk_space_quota_mb"`
// Number of paid days
PeriodDays uint32 `json:"period_days"`
// Maximum count of users in voice conference
MaxVoiceUser uint32 `json:"max_voice_user"`
// Maximum count of users in video conference
MaxVideoUser uint32 `json:"max_video_user"`
// Bitrate of video in video co
VideoCallBitrate uint32 `json:"video_call_bitrate"`
// Bitrate of video in video sharing
VideoSharingBitrate uint32 `json:"video_sharing_bitrate"`
// Flag of availability of free seats when exceeding FreeWorkplace
IsFree bool `json:"is_free"`
// Flag of publicity
IsPublic bool `json:"is_public"`
// Default tariff flag that is set when registering an account
IsDefault bool `json:"is_default"`
// Date of opening tariff
OpenDate *time.Time `json:"open_date"`
// Date of closing tariff
CloseDate *time.Time `json:"close_date,omitempty"`
// Status of tariff
Status TariffStatus `json:"status"`
}
// Request to create the tariff
type CreateTariffRequest struct {
// Name of tariff
Name string `json:"name"`
// Nomenclature name of tariff
NomenclatureName string `json:"nomenclature_name"`
// Description of tariff
Description string `json:"description,omitempty"`
// Benefit of tariff
Benefit string `json:"benefit,omitempty"`
// Currency of tariff
Currency Currency `json:"currency"`
// Cost of one workplace
CostWorkplace string `json:"cost_workplace"`
// Priority of tariff
Priority uint32 `json:"priority,omitempty"`
// Count of maximum workspaces on tariff
MaxWorkplaceCount uint32 `json:"max_workplace_count,omitempty"`
// Count of minimum workspaces on tariff
MinWorkplaceCount uint32 `json:"min_workplace_count,omitempty"`
// Count of free workspaces
FreeWorkplaceCount uint32 `json:"free_workplace_countt,omitempty"`
// Minimum step of change count workspaces on tariff
StepIncreasingWorkplaces uint32 `json:"step_increasing_workplaces,omitempty"`
// Disk space limit per user
DiskSpaceQuotaMb string `json:"disk_space_quota_mb,omitempty"`
// Number of paid days
PeriodDays uint32 `json:"period_days"`
// Maximum count of users in voice conference
MaxVoiceUser uint32 `json:"max_voice_user,omitempty"`
// Maximum count of users in video conference
MaxVideoUser uint32 `json:"max_video_user,omitempty"`
// Bitrate of video in video co
VideoCallBitrate uint32 `json:"video_call_bitrate,omitempty"`
// Bitrate of video in video sharing
VideoSharingBitrate uint32 `json:"video_sharing_bitrate,omitempty"`
// Flag of availability of free seats when exceeding FreeWorkplace
IsFree bool `json:"is_free,omitempty"`
// Flag of publicity
IsPublic bool `json:"is_public,omitempty"`
// Default tariff flag that is set when registering an account
IsDefault bool `json:"is_default,omitempty"`
// Date of opening tariff
OpenDate *time.Time `json:"open_date,omitempty"`
}
// Request to update the tariff
type UpdateTariffRequest struct {
// Tariff id
TariffId string `json:"tariff_id"`
// Date of closing tariff
CloseDate *time.Time `json:"close_date,omitempty"`
// Default tariff flag that is set when registering an account
IsDefault bool `json:"is_default,omitempty"`
// Status of tariff
Status TariffStatus `json:"status,omitempty"`
}
// Response from getting a list of tariffs
type GetTariffsListResponse struct {
TariffList []TariffBilling `json:"tariff_list"`
}
// Response from getting a list of active tariffs
type GetActiveTariffsListResponse struct {
TariffList []TariffBilling `json:"tariff_list"`
}