-
Notifications
You must be signed in to change notification settings - Fork 0
/
structs.go
357 lines (302 loc) · 9.66 KB
/
structs.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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
package tebexgo
type Session struct {
Secret string
}
// Server information
type ServerInformation struct {
Account
Server
}
type Account struct {
Id int `json:"id"`
Domain string `json:"domain"`
Name string `json:"name"`
Currency Currency `json:"currency"`
OnlineMode bool `json:"online_mode"`
GameType string `json:"game_type"`
LogEvents bool `json:"log_events"`
Server Server `json:"server"`
}
type Currency struct {
Iso4217 string `json:"iso_4217"`
Symbol string `json:"symbol"`
}
type Server struct {
Id int `json:"id"`
Name string `json:"name"`
}
// Packages
type Package struct {
Id int `json:"id"`
Name string `json:"name"`
Image interface{} `json:"image"`
Price float32 `json:"price"`
ExpiryLength int `json:"expiry_length"`
ExpiryPeriod string `json:"expiry_period"`
Type string `json:"type"`
Category PackageCategory `json:"category"`
GlobalLimit int `json:"global_limit"`
GlobalLimitPeriod string `json:"global_limit_period"`
UserLimit int `json:"user_limit"`
Servers []PackageServer `json:"servers"`
RequiredPackages []interface{} `json:"required_packages"`
RequireAny bool `json:"require_any"`
CreateGiftcard bool `json:"create_giftcard"`
ShowUntil bool `json:"show_until"`
GuiItem string `json:"gui_item"`
Disabled bool `json:"disabled"`
DisableQuantity bool `json:"disable_quantity"`
CustomPrice bool `json:"custom_price"`
ChooseServer bool `json:"choose_server"`
LimitExpires bool `json:"limit_expires"`
InheritCommands bool `json:"inherit_commands"`
VariableGiftcard bool `json:"variable_giftcard"`
}
type PackageCategory struct {
Id int `json:"id"`
Name string `json:"name"`
}
type PackageServer struct {
Id int `json:"id"`
Name string `json:"name"`
}
type UpdatePackageObject struct {
Disabled bool `json:"disabled"`
Name string `json:"name"`
Price int `json:"price"`
}
// Listing
type Listing struct {
Categories []ListingCategory `json:"categories"`
}
type ListingCategory struct {
Id int `json:"id"`
Order int `json:"order"`
Name string `json:"name"`
OnlySubcategories bool `json:"only_subcategories"`
Subcategories []interface{} `json:"subcategories"`
Packages ListingPackage `json:"packages"`
}
type ListingPackage struct {
Id int `json:"id"`
Order int `json:"order"`
Name string `json:"name"`
Price string `json:"price"`
Sale ListingPackageSale `json:"sale"`
}
type ListingPackageSale struct {
Active bool `json:"active"`
Discount string `json:"discount"`
}
// Bans
type Bans struct {
Data []BanData `json:"data"`
}
type BanData struct {
Id int `json:"id"`
Time string `json:"time"`
Ip string `json:"ip"`
PaymentEmail string `json:"payment_email"`
Reason string `json:"reason"`
User BanUser `json:"user"`
}
type BanUser struct {
Ign string `json:"ign"`
Uuid string `json:"uuid"`
}
type BanInput struct {
Reason string `json:"reason"`
Ip string `json:"ip"`
User string `json:"user"`
}
// Checkout
type PutCheckoutObject struct {
PackageId string `json:"package_id"`
Username string `json:"username"`
}
type Checkout struct {
Url string `json:"url"`
Expires string `json:"expires"`
}
// Gift cards
type GiftCards struct {
Data []GiftCard `json:"data"`
}
type GiftCard struct {
Id int `json:"id"`
Code string `json:"code"`
Balance GiftCardBalance `json:"balance"`
Note string `json:"note"`
Void bool `json:"void"`
}
type GiftCardBalance struct {
Starting string `json:"starting"`
Remaining string `json:"remaining"`
Currency string `json:"currency"`
}
type PutGiftCardObject struct {
ExpiresAt string `json:"expires_at"`
Note string `json:"note"`
Amount int `json:"amount"`
}
type Sales struct {
Data []Sale `json:"data"`
}
type Sale struct {
Id int `json:"id"`
Effective SaleEffective `json:"effective"`
Discount SaleDiscount `json:"discount"`
Start int `json:"start"`
Expire int `json:"expire"`
Order int `json:"order"`
}
type SaleEffective struct {
Type string `json:"package"`
Packages []int `json:"packages"`
Categories []int `json:"categories"`
}
type SaleDiscount struct {
Type string `json:"type"`
Percentage int `json:"percentage"`
Value int `json:"value"`
}
type PlayerData struct {
Player Player `json:"player"`
BanCount int `json:"banCount"`
ChargebackRate int `json:"chargebackRate"`
Payments []PlayerPayment `json:"payments"`
PurchaseTotals PurchaseTotals `json:"purchaseTotals"`
}
type Player struct {
Id string `json:"id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
CacheExpire string `json:"cache_expire"`
Username string `json:"username"`
Meta string `json:"meta"`
PluginUsernameId string `json:"plugin_username_id"`
}
type PlayerPayment struct {
TxnId string `json:"txn_id"`
Time int `json:"time"`
Price int64 `json:"price"`
Currency string `json:"currency"`
Status int `json:"status"`
}
type PurchaseTotals struct {
USD int64 `json:"USD"`
GBP int64 `json:"GBP"`
}
// Payments
type Payment struct {
Id int `json:"id"`
Amount string `json:"amount"`
Date string `json:"date"`
Currency Currency `json:"currency"`
PaymentGateway PaymentGateway `json:"gateway"`
Status string `json:"status"`
Email string `json:"email"`
Player PaymentPlayer `json:"player"`
Packages []PaymentPackage `json:"packages"`
}
type PaymentGateway struct {
Id int `json:"id"`
Name string `json:"name"`
}
type PaymentPlayer struct {
Id int `json:"id"`
Name string `json:"name"`
Uuid string `json:"uuid"`
}
type PaymentPackage struct {
Id int `json:"id"`
Name string `json:"name"`
}
type PaymentPackageFields struct {
Name string `json:"name"`
Value string `json:"value"`
Type string `json:"type"`
Options []PaymentPackageFieldOption `json:"options"`
}
type PaymentPackageFieldOption struct {
Label string `json:"label"`
Value int `json:"value"`
}
type UpdatePaymentObject struct {
Username string `json:"username"`
Status string `json:"status"`
}
// Community
type CommunityGoal struct {
Id int `json:"id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Account int `json:"account"`
Name string `json:"name"`
Description string `json:"description"`
Image string `json:"image"`
Target string `json:"target"`
Current string `json:"current"`
Repeatable int `json:"repeatable"`
LastAchieved int `json:"last_achieved"`
TimesAchieved int `json:"times_achieved"`
Satus string `json:"status"`
Sale int `json:"sale"`
}
// Coupons
type Coupons struct {
Pagination CouponPagination `json:"pagination"`
Data CouponData `json:"data"`
}
type Coupon struct {
Data CouponData `json:"data"`
}
type CouponPagination struct {
TotalResults int `json:"totalResults"`
CurrentPage int `json:"currentPage"`
LastPage int `json:"lastPage"`
Previous int `json:"previous"`
Next string `json:"next"`
}
type CouponData struct {
Id int `json:"id"`
Code string `json:"code"`
Effective CouponEffective `json:"effective"`
Expire CouponExpire `json:"expire"`
BasketType string `json:"basket_type"`
StartDate string `json:"start_date"`
UserLimit string `json:"user_limit"`
Minimum int `json:"minimum"`
Username string `json:"username"`
Note string `json:"note"`
}
type CouponEffective struct {
Type string `json:"type"`
Packages []int `json:"packages"`
Categories []int `json:"categories"`
}
type CouponExpire struct {
ReedemUnlimited string `json:"reedem_unlimited"`
ExpireNever string `json:"expire_never"`
Limit int `json:"limit"`
Date string `json:"date"`
}
type CreateCouponObject struct {
Code string `json:"code"`
EffectiveOn string `json:'effective_on"`
Packages []int `json:"packages"`
Categories []int `json:"categories"`
DiscountType string `json:"discount_type"`
DiscountAmount int `json:"discount_amount"`
DiscountPrecentage int `json:"discount_precentage"`
ReedemUnlimited bool `json:"reedem_unlimited"`
ExpireNever bool `json:"expire_never"`
ExpireLimit int `json:"expire_limit"`
ExpireDate string `json:"expire_date"`
StartDate string `json:"start_date"`
BasketType string `json:"basket_type"`
Minium int `json:"minimum"`
DiscountApplicationMethod int `json:"discount_application_method"`
Username string `json:"username"`
Note string `json:"note"`
}