-
Notifications
You must be signed in to change notification settings - Fork 3
/
intlpartnersmgt_client.js
367 lines (338 loc) · 16 KB
/
intlpartnersmgt_client.js
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
/*
* Copyright (c) 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.
*/
const models = require("./models");
const AbstractClient = require('../../common/abstract_client')
const QueryDirectCustomersCreditResponse = models.QueryDirectCustomersCreditResponse;
const SummaryDetails = models.SummaryDetails;
const QueryPartnerCreditResponse = models.QueryPartnerCreditResponse;
const QueryVoucherListByUinRequest = models.QueryVoucherListByUinRequest;
const QueryVoucherAmountByUinRequest = models.QueryVoucherAmountByUinRequest;
const QueryVoucherAmountByUinResponse = models.QueryVoucherAmountByUinResponse;
const QueryVoucherAmountByUinItem = models.QueryVoucherAmountByUinItem;
const QueryCreditAllocationHistoryData = models.QueryCreditAllocationHistoryData;
const DescribeBillSummaryResponse = models.DescribeBillSummaryResponse;
const DescribeBillSummaryByPayModeResponse = models.DescribeBillSummaryByPayModeResponse;
const QueryCreditQuotaResponse = models.QueryCreditQuotaResponse;
const BusinessInfo = models.BusinessInfo;
const QueryVoucherListByUinItem = models.QueryVoucherListByUinItem;
const DescribeBillSummaryByProductResponse = models.DescribeBillSummaryByProductResponse;
const QueryPartnerCreditRequest = models.QueryPartnerCreditRequest;
const AllocateCustomerCreditRequest = models.AllocateCustomerCreditRequest;
const DescribeBillSummaryByRegionResponse = models.DescribeBillSummaryByRegionResponse;
const DescribeCustomerBillSummaryResponse = models.DescribeCustomerBillSummaryResponse;
const QueryCustomersCreditRequest = models.QueryCustomersCreditRequest;
const DescribeBillDetailRequest = models.DescribeBillDetailRequest;
const QueryCreditByUinListRequest = models.QueryCreditByUinListRequest;
const CreateAccountResponse = models.CreateAccountResponse;
const QueryAccountVerificationStatusResponse = models.QueryAccountVerificationStatusResponse;
const RegionSummaryOverviewItem = models.RegionSummaryOverviewItem;
const CustomerBillDetailData = models.CustomerBillDetailData;
const GetCountryCodesResponse = models.GetCountryCodesResponse;
const QueryCreditByUinListResponse = models.QueryCreditByUinListResponse;
const DescribeCustomerInfoResponse = models.DescribeCustomerInfoResponse;
const BusinessSummaryOverviewItem = models.BusinessSummaryOverviewItem;
const DescribeCustomerUinData = models.DescribeCustomerUinData;
const DescribeCustomerUinResponse = models.DescribeCustomerUinResponse;
const DescribeBillSummaryByRegionRequest = models.DescribeBillSummaryByRegionRequest;
const QueryVoucherPoolResponse = models.QueryVoucherPoolResponse;
const TagInfo = models.TagInfo;
const DescribeCustomerBillDetailRequest = models.DescribeCustomerBillDetailRequest;
const DescribeCustomerBillDetailResponse = models.DescribeCustomerBillDetailResponse;
const ModifyClientRemarkResponse = models.ModifyClientRemarkResponse;
const QueryAccountVerificationStatusRequest = models.QueryAccountVerificationStatusRequest;
const QueryCreditAllocationHistoryResponse = models.QueryCreditAllocationHistoryResponse;
const CreateAccountRequest = models.CreateAccountRequest;
const DescribeBillSummaryRequest = models.DescribeBillSummaryRequest;
const DescribeBillSummaryByPayModeRequest = models.DescribeBillSummaryByPayModeRequest;
const ActionSummaryOverviewItem = models.ActionSummaryOverviewItem;
const DescribeCustomerInfoRequest = models.DescribeCustomerInfoRequest;
const QueryCreditQuotaRequest = models.QueryCreditQuotaRequest;
const AllocateCustomerCreditResponse = models.AllocateCustomerCreditResponse;
const QueryVoucherListByUinVoucherItem = models.QueryVoucherListByUinVoucherItem;
const ModifyClientRemarkRequest = models.ModifyClientRemarkRequest;
const DescribeBillSummaryByProductRequest = models.DescribeBillSummaryByProductRequest;
const QueryDirectCustomersCreditData = models.QueryDirectCustomersCreditData;
const GetCountryCodesRequest = models.GetCountryCodesRequest;
const CountryCodeItem = models.CountryCodeItem;
const BillDetailData = models.BillDetailData;
const DescribeBillDetailResponse = models.DescribeBillDetailResponse;
const QueryCreditAllocationHistoryRequest = models.QueryCreditAllocationHistoryRequest;
const QueryCustomersCreditResponse = models.QueryCustomersCreditResponse;
const DescribeBillDownloadUrlRequest = models.DescribeBillDownloadUrlRequest;
const DescribeCustomerUinRequest = models.DescribeCustomerUinRequest;
const QueryVoucherListByUinResponse = models.QueryVoucherListByUinResponse;
const QueryVoucherPoolRequest = models.QueryVoucherPoolRequest;
const DescribeCustomerInfoData = models.DescribeCustomerInfoData;
const DescribeBillDownloadUrlResponse = models.DescribeBillDownloadUrlResponse;
const PayModeSummaryOverviewItem = models.PayModeSummaryOverviewItem;
const QueryCustomersCreditData = models.QueryCustomersCreditData;
const DescribeCustomerBillSummaryRequest = models.DescribeCustomerBillSummaryRequest;
const QueryDirectCustomersCreditRequest = models.QueryDirectCustomersCreditRequest;
/**
* intlpartnersmgt client
* @class
*/
class IntlpartnersmgtClient extends AbstractClient {
constructor(credential, region, profile) {
super("intlpartnersmgt.tencentcloudapi.com", "2022-09-28", credential, region, profile);
}
/**
* This API is used to query the list of customer UINs.
* @param {DescribeCustomerUinRequest} req
* @param {function(string, DescribeCustomerUinResponse):void} cb
* @public
*/
DescribeCustomerUin(req, cb) {
let resp = new DescribeCustomerUinResponse();
this.request("DescribeCustomerUin", req, resp, cb);
}
/**
* This API is used for a partner to set credit for a customer, such as increasing or lowering the credit and setting it to 0.
1. The credit is valid permanently and will not be zeroed regularly.
2. The customer's service will be suspended when its available credit is set to 0, so caution should be exercised with this operation.
3. To prevent the customer from making new purchases without affecting their use of previously purchased products, the partner can set their available credit to 0 after obtaining the non-stop feature privilege from the channel manager.
4. The set credit is an increment of the current available credit and cannot exceed the remaining allocable credit. Setting the credit to a negative value indicates that it will be repossessed. The available credit can be set to 0 at the minimum.
* @param {AllocateCustomerCreditRequest} req
* @param {function(string, AllocateCustomerCreditResponse):void} cb
* @public
*/
AllocateCustomerCredit(req, cb) {
let resp = new AllocateCustomerCreditResponse();
this.request("AllocateCustomerCredit", req, resp, cb);
}
/**
* This API is used to obtain country/region codes.
* @param {GetCountryCodesRequest} req
* @param {function(string, GetCountryCodesResponse):void} cb
* @public
*/
GetCountryCodes(req, cb) {
let resp = new GetCountryCodesResponse();
this.request("GetCountryCodes", req, resp, cb);
}
/**
* This API is used to modify customer remarks.
* @param {ModifyClientRemarkRequest} req
* @param {function(string, ModifyClientRemarkResponse):void} cb
* @public
*/
ModifyClientRemark(req, cb) {
let resp = new ModifyClientRemarkResponse();
this.request("ModifyClientRemark", req, resp, cb);
}
/**
* This API is used for a partner to query its own total credit, available credit, and used credit in USD.
* @param {QueryPartnerCreditRequest} req
* @param {function(string, QueryPartnerCreditResponse):void} cb
* @public
*/
QueryPartnerCredit(req, cb) {
let resp = new QueryPartnerCreditResponse();
this.request("QueryPartnerCredit", req, resp, cb);
}
/**
* This API is used to query customer credits.
* @param {QueryCreditQuotaRequest} req
* @param {function(string, QueryCreditQuotaResponse):void} cb
* @public
*/
QueryCreditQuota(req, cb) {
let resp = new QueryCreditQuotaResponse();
this.request("QueryCreditQuota", req, resp, cb);
}
/**
* This API is used to query the customer information.
* @param {DescribeCustomerInfoRequest} req
* @param {function(string, DescribeCustomerInfoResponse):void} cb
* @public
*/
DescribeCustomerInfo(req, cb) {
let resp = new DescribeCustomerInfoResponse();
this.request("DescribeCustomerInfo", req, resp, cb);
}
/**
* This API is used to query the voucher list based on the customer UIN.
* @param {QueryVoucherListByUinRequest} req
* @param {function(string, QueryVoucherListByUinResponse):void} cb
* @public
*/
QueryVoucherListByUin(req, cb) {
let resp = new QueryVoucherListByUinResponse();
this.request("QueryVoucherListByUin", req, resp, cb);
}
/**
* This API is used to query bill details by customers.
* @param {DescribeBillDetailRequest} req
* @param {function(string, DescribeBillDetailResponse):void} cb
* @public
*/
DescribeBillDetail(req, cb) {
let resp = new DescribeBillDetailResponse();
this.request("DescribeBillDetail", req, resp, cb);
}
/**
* External API for the L1 billing of the customer billing center
* @param {DescribeBillSummaryRequest} req
* @param {function(string, DescribeBillSummaryResponse):void} cb
* @public
*/
DescribeBillSummary(req, cb) {
let resp = new DescribeBillSummaryResponse();
this.request("DescribeBillSummary", req, resp, cb);
}
/**
* This API is used to obtain the total amount of customer bills by payment mode.
* @param {DescribeBillSummaryByPayModeRequest} req
* @param {function(string, DescribeBillSummaryByPayModeResponse):void} cb
* @public
*/
DescribeBillSummaryByPayMode(req, cb) {
let resp = new DescribeBillSummaryByPayModeResponse();
this.request("DescribeBillSummaryByPayMode", req, resp, cb);
}
/**
* This API is used to download billing files and return billing file URLs by customers.
* @param {DescribeBillDownloadUrlRequest} req
* @param {function(string, DescribeBillDownloadUrlResponse):void} cb
* @public
*/
DescribeBillDownloadUrl(req, cb) {
let resp = new DescribeBillDownloadUrlResponse();
this.request("DescribeBillDownloadUrl", req, resp, cb);
}
/**
* This API is used to query the credit of users in the list.
* @param {QueryCreditByUinListRequest} req
* @param {function(string, QueryCreditByUinListResponse):void} cb
* @public
*/
QueryCreditByUinList(req, cb) {
let resp = new QueryCreditByUinListResponse();
this.request("QueryCreditByUinList", req, resp, cb);
}
/**
* This API is used to query the credits of direct customers.
* @param {QueryDirectCustomersCreditRequest} req
* @param {function(string, QueryDirectCustomersCreditResponse):void} cb
* @public
*/
QueryDirectCustomersCredit(req, cb) {
let resp = new QueryDirectCustomersCreditResponse();
this.request("QueryDirectCustomersCredit", req, resp, cb);
}
/**
* This API is used to create Tencent Cloud customer accounts for first-level resellers/second-level resellers. After the account is created, it will be automatically bound to the partner account.Note:1. Create a Tencent Cloud account. The entered email address and mobile phone number need to be verified by the partner for validity.2. Customers need to add personal information when logging in for the first time.3. This interface needs to be applied for allowlist usage. Please contact the channel manager to initiate the application process.
* @param {CreateAccountRequest} req
* @param {function(string, CreateAccountResponse):void} cb
* @public
*/
CreateAccount(req, cb) {
let resp = new CreateAccountResponse();
this.request("CreateAccount", req, resp, cb);
}
/**
* This API is used to obtain the total amount of customer bills by product.
* @param {DescribeBillSummaryByProductRequest} req
* @param {function(string, DescribeBillSummaryByProductResponse):void} cb
* @public
*/
DescribeBillSummaryByProduct(req, cb) {
let resp = new DescribeBillSummaryByProductResponse();
this.request("DescribeBillSummaryByProduct", req, resp, cb);
}
/**
* This API is used to obtain the total amount of customer bills by region.
* @param {DescribeBillSummaryByRegionRequest} req
* @param {function(string, DescribeBillSummaryByRegionResponse):void} cb
* @public
*/
DescribeBillSummaryByRegion(req, cb) {
let resp = new DescribeBillSummaryByRegionResponse();
this.request("DescribeBillSummaryByRegion", req, resp, cb);
}
/**
* This API is used to query the customer bill details by resellers.
* @param {DescribeCustomerBillDetailRequest} req
* @param {function(string, DescribeCustomerBillDetailResponse):void} cb
* @public
*/
DescribeCustomerBillDetail(req, cb) {
let resp = new DescribeCustomerBillDetailResponse();
this.request("DescribeCustomerBillDetail", req, resp, cb);
}
/**
* This API is used to query the total amount of customer bills.
* @param {DescribeCustomerBillSummaryRequest} req
* @param {function(string, DescribeCustomerBillSummaryResponse):void} cb
* @public
*/
DescribeCustomerBillSummary(req, cb) {
let resp = new DescribeCustomerBillSummaryResponse();
this.request("DescribeCustomerBillSummary", req, resp, cb);
}
/**
* This API is used to query the account verification status.
* @param {QueryAccountVerificationStatusRequest} req
* @param {function(string, QueryAccountVerificationStatusResponse):void} cb
* @public
*/
QueryAccountVerificationStatus(req, cb) {
let resp = new QueryAccountVerificationStatusResponse();
this.request("QueryAccountVerificationStatus", req, resp, cb);
}
/**
* This API is used to query the voucher quota pool.
* @param {QueryVoucherPoolRequest} req
* @param {function(string, QueryVoucherPoolResponse):void} cb
* @public
*/
QueryVoucherPool(req, cb) {
let resp = new QueryVoucherPoolResponse();
this.request("QueryVoucherPool", req, resp, cb);
}
/**
* This API is used to query the voucher quota based on the customer UIN.
* @param {QueryVoucherAmountByUinRequest} req
* @param {function(string, QueryVoucherAmountByUinResponse):void} cb
* @public
*/
QueryVoucherAmountByUin(req, cb) {
let resp = new QueryVoucherAmountByUinResponse();
this.request("QueryVoucherAmountByUin", req, resp, cb);
}
/**
* This API is used to query all the credit allocation records of a single customer.
* @param {QueryCreditAllocationHistoryRequest} req
* @param {function(string, QueryCreditAllocationHistoryResponse):void} cb
* @public
*/
QueryCreditAllocationHistory(req, cb) {
let resp = new QueryCreditAllocationHistoryResponse();
this.request("QueryCreditAllocationHistory", req, resp, cb);
}
/**
* This API is used for a partner to the credits and basic information of cutomers.
* @param {QueryCustomersCreditRequest} req
* @param {function(string, QueryCustomersCreditResponse):void} cb
* @public
*/
QueryCustomersCredit(req, cb) {
let resp = new QueryCustomersCreditResponse();
this.request("QueryCustomersCredit", req, resp, cb);
}
}
module.exports = IntlpartnersmgtClient;