-
Notifications
You must be signed in to change notification settings - Fork 2
/
models.go
553 lines (432 loc) · 18.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
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
// 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 (
tcerr "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/errors"
tchttp "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/http"
"github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/json"
)
// Predefined struct for user
type AllocateCustomerCreditRequestParams struct {
// Specific value of the credit allocated to the customer
AddedCredit *float64 `json:"AddedCredit,omitnil" name:"AddedCredit"`
// Customer UIN
ClientUin *uint64 `json:"ClientUin,omitnil" name:"ClientUin"`
}
type AllocateCustomerCreditRequest struct {
*tchttp.BaseRequest
// Specific value of the credit allocated to the customer
AddedCredit *float64 `json:"AddedCredit,omitnil" name:"AddedCredit"`
// Customer UIN
ClientUin *uint64 `json:"ClientUin,omitnil" 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)
}
// Predefined struct for user
type AllocateCustomerCreditResponseParams struct {
// The updated total credit
TotalCredit *float64 `json:"TotalCredit,omitnil" name:"TotalCredit"`
// The updated available credit
RemainingCredit *float64 `json:"RemainingCredit,omitnil" name:"RemainingCredit"`
// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
RequestId *string `json:"RequestId,omitnil" name:"RequestId"`
}
type AllocateCustomerCreditResponse struct {
*tchttp.BaseResponse
Response *AllocateCustomerCreditResponseParams `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,omitnil" name:"EnName"`
// Country/region name in Chinese
Name *string `json:"Name,omitnil" name:"Name"`
// IOS2 standard country/region code
IOS2 *string `json:"IOS2,omitnil" name:"IOS2"`
// IOS3 standard country/region code
IOS3 *string `json:"IOS3,omitnil" name:"IOS3"`
// Phone code
Code *string `json:"Code,omitnil" name:"Code"`
}
// Predefined struct for user
type CreateAccountRequestParams struct {
// Account type of a new customer. Valid values: `personal`, `company`.
AccountType *string `json:"AccountType,omitnil" name:"AccountType"`
// Registered email address, which should be valid and correct.
// For example, account@qq.com.
Mail *string `json:"Mail,omitnil" 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,omitnil" name:"Password"`
// Confirm the password. It must be the same as the `Password` field.
ConfirmPassword *string `json:"ConfirmPassword,omitnil" 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,omitnil" name:"PhoneNum"`
// Customer’s country/region code, which can be obtained via the `GetCountryCodes` API, such as “852”.
CountryCode *string `json:"CountryCode,omitnil" name:"CountryCode"`
// Customer’s ISO2 standard country/region code, which can be obtained via the `GetCountryCodes` API. It should correspond to the `CountryCode` field, such as `HK`.
Area *string `json:"Area,omitnil" name:"Area"`
// Expanded field, which is left empty by default.
Extended *string `json:"Extended,omitnil" name:"Extended"`
}
type CreateAccountRequest struct {
*tchttp.BaseRequest
// Account type of a new customer. Valid values: `personal`, `company`.
AccountType *string `json:"AccountType,omitnil" name:"AccountType"`
// Registered email address, which should be valid and correct.
// For example, account@qq.com.
Mail *string `json:"Mail,omitnil" 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,omitnil" name:"Password"`
// Confirm the password. It must be the same as the `Password` field.
ConfirmPassword *string `json:"ConfirmPassword,omitnil" 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,omitnil" name:"PhoneNum"`
// Customer’s country/region code, which can be obtained via the `GetCountryCodes` API, such as “852”.
CountryCode *string `json:"CountryCode,omitnil" name:"CountryCode"`
// Customer’s ISO2 standard country/region code, which can be obtained via the `GetCountryCodes` API. It should correspond to the `CountryCode` field, such as `HK`.
Area *string `json:"Area,omitnil" name:"Area"`
// Expanded field, which is left empty by default.
Extended *string `json:"Extended,omitnil" 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)
}
// Predefined struct for user
type CreateAccountResponseParams struct {
// Account UIN
Uin *string `json:"Uin,omitnil" name:"Uin"`
// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
RequestId *string `json:"RequestId,omitnil" name:"RequestId"`
}
type CreateAccountResponse struct {
*tchttp.BaseResponse
Response *CreateAccountResponseParams `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)
}
// Predefined struct for user
type GetCountryCodesRequestParams struct {
}
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)
}
// Predefined struct for user
type GetCountryCodesResponseParams struct {
// List of country/region codes
Data []*CountryCodeItem `json:"Data,omitnil" name:"Data"`
// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
RequestId *string `json:"RequestId,omitnil" name:"RequestId"`
}
type GetCountryCodesResponse struct {
*tchttp.BaseResponse
Response *GetCountryCodesResponseParams `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,omitnil" name:"AllocatedTime"`
// Operator
Operator *string `json:"Operator,omitnil" name:"Operator"`
// Allocated credit value
Credit *float64 `json:"Credit,omitnil" name:"Credit"`
// The allocated total credit
AllocatedCredit *float64 `json:"AllocatedCredit,omitnil" name:"AllocatedCredit"`
}
// Predefined struct for user
type QueryCreditAllocationHistoryRequestParams struct {
// Customer UIN
ClientUin *uint64 `json:"ClientUin,omitnil" name:"ClientUin"`
// Page number
Page *uint64 `json:"Page,omitnil" name:"Page"`
// Number of data entries per page
PageSize *uint64 `json:"PageSize,omitnil" name:"PageSize"`
}
type QueryCreditAllocationHistoryRequest struct {
*tchttp.BaseRequest
// Customer UIN
ClientUin *uint64 `json:"ClientUin,omitnil" name:"ClientUin"`
// Page number
Page *uint64 `json:"Page,omitnil" name:"Page"`
// Number of data entries per page
PageSize *uint64 `json:"PageSize,omitnil" 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)
}
// Predefined struct for user
type QueryCreditAllocationHistoryResponseParams struct {
// Total number of records
// Note: this field may return null, indicating that no valid values can be obtained.
Total *uint64 `json:"Total,omitnil" name:"Total"`
// List of record details
// Note: this field may return null, indicating that no valid values can be obtained.
History []*QueryCreditAllocationHistoryData `json:"History,omitnil" name:"History"`
// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
RequestId *string `json:"RequestId,omitnil" name:"RequestId"`
}
type QueryCreditAllocationHistoryResponse struct {
*tchttp.BaseResponse
Response *QueryCreditAllocationHistoryResponseParams `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,omitnil" name:"Name"`
// Type
Type *string `json:"Type,omitnil" name:"Type"`
// Phone
Mobile *string `json:"Mobile,omitnil" name:"Mobile"`
// Email
Email *string `json:"Email,omitnil" name:"Email"`
// Overdue payment flag
Arrears *string `json:"Arrears,omitnil" name:"Arrears"`
// Binding time
AssociationTime *string `json:"AssociationTime,omitnil" name:"AssociationTime"`
// Expiration time
RecentExpiry *string `json:"RecentExpiry,omitnil" name:"RecentExpiry"`
// The UIN of reseller’s customer
ClientUin *uint64 `json:"ClientUin,omitnil" name:"ClientUin"`
// Credit granted to reseller’s customer
Credit *float64 `json:"Credit,omitnil" name:"Credit"`
// The remaining credit of reseller’s customer
RemainingCredit *float64 `json:"RemainingCredit,omitnil" name:"RemainingCredit"`
// 0: Identity not verified; 1: Individual identity verified; 2: Enterprise identity verified.
IdentifyType *uint64 `json:"IdentifyType,omitnil" name:"IdentifyType"`
// Customer remarks
Remark *string `json:"Remark,omitnil" name:"Remark"`
// Forced status
Force *int64 `json:"Force,omitnil" name:"Force"`
}
// Predefined struct for user
type QueryCustomersCreditRequestParams struct {
// Search condition type. You can only search by UIN, name, or remarks.
FilterType *string `json:"FilterType,omitnil" name:"FilterType"`
// Search condition
Filter *string `json:"Filter,omitnil" name:"Filter"`
// A pagination parameter that specifies the current page number, with a value starting from 1.
Page *int64 `json:"Page,omitnil" name:"Page"`
// A pagination parameter that specifies the number of entries per page.
PageSize *int64 `json:"PageSize,omitnil" name:"PageSize"`
// A sort parameter that specifies the sort order. Valid values: `desc` (descending order), or `asc` (ascending order) based on `AssociationTime`. The value will be `desc` if left empty.
Order *string `json:"Order,omitnil" name:"Order"`
}
type QueryCustomersCreditRequest struct {
*tchttp.BaseRequest
// Search condition type. You can only search by UIN, name, or remarks.
FilterType *string `json:"FilterType,omitnil" name:"FilterType"`
// Search condition
Filter *string `json:"Filter,omitnil" name:"Filter"`
// A pagination parameter that specifies the current page number, with a value starting from 1.
Page *int64 `json:"Page,omitnil" name:"Page"`
// A pagination parameter that specifies the number of entries per page.
PageSize *int64 `json:"PageSize,omitnil" name:"PageSize"`
// A sort parameter that specifies the sort order. Valid values: `desc` (descending order), or `asc` (ascending order) based on `AssociationTime`. The value will be `desc` if left empty.
Order *string `json:"Order,omitnil" name:"Order"`
}
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
}
delete(f, "FilterType")
delete(f, "Filter")
delete(f, "Page")
delete(f, "PageSize")
delete(f, "Order")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "QueryCustomersCreditRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
type QueryCustomersCreditResponseParams struct {
// Queries the list of customers
// Note: this field may return null, indicating that no valid values can be obtained.
Data []*QueryCustomersCreditData `json:"Data,omitnil" name:"Data"`
// Number of customers
Total *uint64 `json:"Total,omitnil" name:"Total"`
// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
RequestId *string `json:"RequestId,omitnil" name:"RequestId"`
}
type QueryCustomersCreditResponse struct {
*tchttp.BaseResponse
Response *QueryCustomersCreditResponseParams `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)
}
// Predefined struct for user
type QueryPartnerCreditRequestParams struct {
}
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)
}
// Predefined struct for user
type QueryPartnerCreditResponseParams struct {
// Allocated credit
AllocatedCredit *float64 `json:"AllocatedCredit,omitnil" name:"AllocatedCredit"`
// Total credit
TotalCredit *float64 `json:"TotalCredit,omitnil" name:"TotalCredit"`
// Remaining credit
RemainingCredit *float64 `json:"RemainingCredit,omitnil" name:"RemainingCredit"`
// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
RequestId *string `json:"RequestId,omitnil" name:"RequestId"`
}
type QueryPartnerCreditResponse struct {
*tchttp.BaseResponse
Response *QueryPartnerCreditResponseParams `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)
}