-
Notifications
You must be signed in to change notification settings - Fork 2
/
models.go
422 lines (335 loc) · 13.3 KB
/
models.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
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package v20210409
import (
"encoding/json"
tcerr "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/errors"
tchttp "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/http"
)
type AllocateCustomerCreditRequest struct {
*tchttp.BaseRequest
// Specific value of the credit allocated to the customer
AddedCredit *float64 `json:"AddedCredit,omitempty" name:"AddedCredit"`
// Customer UIN
ClientUin *uint64 `json:"ClientUin,omitempty" name:"ClientUin"`
}
func (r *AllocateCustomerCreditRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *AllocateCustomerCreditRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "AddedCredit")
delete(f, "ClientUin")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AllocateCustomerCreditRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
type AllocateCustomerCreditResponse struct {
*tchttp.BaseResponse
Response *struct {
// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *AllocateCustomerCreditResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *AllocateCustomerCreditResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CountryCodeItem struct {
// Country/region name in English
EnName *string `json:"EnName,omitempty" name:"EnName"`
// Country/region name in Chinese
Name *string `json:"Name,omitempty" name:"Name"`
// IOS2 standard country/region code
IOS2 *string `json:"IOS2,omitempty" name:"IOS2"`
// IOS3 standard country/region code
IOS3 *string `json:"IOS3,omitempty" name:"IOS3"`
// Phone code
Code *string `json:"Code,omitempty" name:"Code"`
}
type CreateAccountRequest struct {
*tchttp.BaseRequest
// Account type of a new customer. Valid value: `business`.
AccountType *string `json:"AccountType,omitempty" name:"AccountType"`
// Registered email address, which should be valid and correct.
// For example, account@qq.com.
Mail *string `json:"Mail,omitempty" name:"Mail"`
// Account password
// Length limit: 8-20 characters
// A password must contain numbers, letters, and special symbols [!@#$%^&*()]. Spaces are not allowed.
Password *string `json:"Password,omitempty" name:"Password"`
// Confirm the password. It must be the same as the `Password` field.
ConfirmPassword *string `json:"ConfirmPassword,omitempty" name:"ConfirmPassword"`
// Customer mobile number, which should be valid and correct.
// A global mobile number within 1-32 digits is allowed, such as 18888888888.
PhoneNum *string `json:"PhoneNum,omitempty" name:"PhoneNum"`
// Country code, which can be obtained via the `GetCountryCodes` API, such as 852.
CountryCode *string `json:"CountryCode,omitempty" name:"CountryCode"`
// ISO2 standard country code, which can be obtained via the `GetCountryCodes` API. It should correspond to the `CountryCode` field.
Area *string `json:"Area,omitempty" name:"Area"`
// Expanded field, which is left empty by default.
Extended *string `json:"Extended,omitempty" name:"Extended"`
}
func (r *CreateAccountRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *CreateAccountRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "AccountType")
delete(f, "Mail")
delete(f, "Password")
delete(f, "ConfirmPassword")
delete(f, "PhoneNum")
delete(f, "CountryCode")
delete(f, "Area")
delete(f, "Extended")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateAccountRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
type CreateAccountResponse struct {
*tchttp.BaseResponse
Response *struct {
// Account UIN
Uin *string `json:"Uin,omitempty" name:"Uin"`
// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *CreateAccountResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *CreateAccountResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type GetCountryCodesRequest struct {
*tchttp.BaseRequest
}
func (r *GetCountryCodesRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *GetCountryCodesRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "GetCountryCodesRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
type GetCountryCodesResponse struct {
*tchttp.BaseResponse
Response *struct {
// List of country/region codes
Data []*CountryCodeItem `json:"Data,omitempty" name:"Data"`
// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *GetCountryCodesResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *GetCountryCodesResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type QueryCreditAllocationHistoryData struct {
// Allocation time
AllocatedTime *string `json:"AllocatedTime,omitempty" name:"AllocatedTime"`
// Operator
Operator *string `json:"Operator,omitempty" name:"Operator"`
// Allocated credit value
Credit *float64 `json:"Credit,omitempty" name:"Credit"`
}
type QueryCreditAllocationHistoryRequest struct {
*tchttp.BaseRequest
// Customer UIN
ClientUin *uint64 `json:"ClientUin,omitempty" name:"ClientUin"`
// Page number
Page *uint64 `json:"Page,omitempty" name:"Page"`
// Number of data entries per page
PageSize *uint64 `json:"PageSize,omitempty" name:"PageSize"`
}
func (r *QueryCreditAllocationHistoryRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *QueryCreditAllocationHistoryRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "ClientUin")
delete(f, "Page")
delete(f, "PageSize")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "QueryCreditAllocationHistoryRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
type QueryCreditAllocationHistoryResponse struct {
*tchttp.BaseResponse
Response *struct {
// Total number of records
// Note: this field may return null, indicating that no valid values can be obtained.
Total *uint64 `json:"Total,omitempty" name:"Total"`
// List of record details
// Note: this field may return null, indicating that no valid values can be obtained.
History []*QueryCreditAllocationHistoryData `json:"History,omitempty" name:"History"`
// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *QueryCreditAllocationHistoryResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *QueryCreditAllocationHistoryResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type QueryCustomersCreditData struct {
// Name
Name *string `json:"Name,omitempty" name:"Name"`
// Type
Type *string `json:"Type,omitempty" name:"Type"`
// Phone
Mobile *string `json:"Mobile,omitempty" name:"Mobile"`
// Email
Email *string `json:"Email,omitempty" name:"Email"`
// Overdue payment flag
Arrears *string `json:"Arrears,omitempty" name:"Arrears"`
// Binding time
AssociationTime *string `json:"AssociationTime,omitempty" name:"AssociationTime"`
// Expiration time
RecentExpiry *string `json:"RecentExpiry,omitempty" name:"RecentExpiry"`
// The UIN of reseller’s customer
ClientUin *uint64 `json:"ClientUin,omitempty" name:"ClientUin"`
// Credit granted to reseller’s customer
Credit *float64 `json:"Credit,omitempty" name:"Credit"`
// The remaining credit of reseller’s customer
RemainingCredit *float64 `json:"RemainingCredit,omitempty" name:"RemainingCredit"`
}
type QueryCustomersCreditRequest struct {
*tchttp.BaseRequest
}
func (r *QueryCustomersCreditRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *QueryCustomersCreditRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "QueryCustomersCreditRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
type QueryCustomersCreditResponse struct {
*tchttp.BaseResponse
Response *struct {
// Queries the list of customers
// Note: this field may return null, indicating that no valid values can be obtained.
Data []*QueryCustomersCreditData `json:"Data,omitempty" name:"Data"`
// Number of customers
Total *uint64 `json:"Total,omitempty" name:"Total"`
// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *QueryCustomersCreditResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *QueryCustomersCreditResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type QueryPartnerCreditRequest struct {
*tchttp.BaseRequest
}
func (r *QueryPartnerCreditRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *QueryPartnerCreditRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "QueryPartnerCreditRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
type QueryPartnerCreditResponse struct {
*tchttp.BaseResponse
Response *struct {
// Allocated credit
AllocatedCredit *float64 `json:"AllocatedCredit,omitempty" name:"AllocatedCredit"`
// Total credit
TotalCredit *float64 `json:"TotalCredit,omitempty" name:"TotalCredit"`
// Remaining credit
RemainingCredit *float64 `json:"RemainingCredit,omitempty" name:"RemainingCredit"`
// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *QueryPartnerCreditResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *QueryPartnerCreditResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}