alibabacloud-agency20221216 1.7.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3902 @@
1
+ # -*- coding: utf-8 -*-
2
+ # This file is auto-generated, don't edit it. Thanks.
3
+ from typing import Dict
4
+ from Tea.core import TeaCore
5
+
6
+ from alibabacloud_tea_openapi.client import Client as OpenApiClient
7
+ from alibabacloud_tea_openapi import models as open_api_models
8
+ from alibabacloud_tea_util.client import Client as UtilClient
9
+ from alibabacloud_endpoint_util.client import Client as EndpointUtilClient
10
+ from alibabacloud_agency20221216 import models as agency_20221216_models
11
+ from alibabacloud_tea_util import models as util_models
12
+ from alibabacloud_openapi_util.client import Client as OpenApiUtilClient
13
+
14
+
15
+ class Client(OpenApiClient):
16
+ """
17
+ *\
18
+ """
19
+ def __init__(
20
+ self,
21
+ config: open_api_models.Config,
22
+ ):
23
+ super().__init__(config)
24
+ self._endpoint_rule = 'regional'
25
+ self._endpoint_map = {
26
+ 'ap-northeast-1': 'agency.aliyuncs.com',
27
+ 'ap-northeast-2-pop': 'agency.aliyuncs.com',
28
+ 'ap-south-1': 'agency.aliyuncs.com',
29
+ 'ap-southeast-2': 'agency.aliyuncs.com',
30
+ 'ap-southeast-3': 'agency.aliyuncs.com',
31
+ 'ap-southeast-5': 'agency.aliyuncs.com',
32
+ 'cn-beijing': 'agency.aliyuncs.com',
33
+ 'cn-beijing-finance-1': 'agency.aliyuncs.com',
34
+ 'cn-beijing-finance-pop': 'agency.aliyuncs.com',
35
+ 'cn-beijing-gov-1': 'agency.aliyuncs.com',
36
+ 'cn-beijing-nu16-b01': 'agency.aliyuncs.com',
37
+ 'cn-chengdu': 'agency.aliyuncs.com',
38
+ 'cn-edge-1': 'agency.aliyuncs.com',
39
+ 'cn-fujian': 'agency.aliyuncs.com',
40
+ 'cn-haidian-cm12-c01': 'agency.aliyuncs.com',
41
+ 'cn-hangzhou': 'agency.aliyuncs.com',
42
+ 'cn-hangzhou-bj-b01': 'agency.aliyuncs.com',
43
+ 'cn-hangzhou-finance': 'agency.aliyuncs.com',
44
+ 'cn-hangzhou-internal-prod-1': 'agency.aliyuncs.com',
45
+ 'cn-hangzhou-internal-test-1': 'agency.aliyuncs.com',
46
+ 'cn-hangzhou-internal-test-2': 'agency.aliyuncs.com',
47
+ 'cn-hangzhou-internal-test-3': 'agency.aliyuncs.com',
48
+ 'cn-hangzhou-test-306': 'agency.aliyuncs.com',
49
+ 'cn-hongkong': 'agency.aliyuncs.com',
50
+ 'cn-hongkong-finance-pop': 'agency.aliyuncs.com',
51
+ 'cn-huhehaote': 'agency.aliyuncs.com',
52
+ 'cn-huhehaote-nebula-1': 'agency.aliyuncs.com',
53
+ 'cn-north-2-gov-1': 'agency.aliyuncs.com',
54
+ 'cn-qingdao': 'agency.aliyuncs.com',
55
+ 'cn-qingdao-nebula': 'agency.aliyuncs.com',
56
+ 'cn-shanghai': 'agency.aliyuncs.com',
57
+ 'cn-shanghai-et15-b01': 'agency.aliyuncs.com',
58
+ 'cn-shanghai-et2-b01': 'agency.aliyuncs.com',
59
+ 'cn-shanghai-finance-1': 'agency.aliyuncs.com',
60
+ 'cn-shanghai-inner': 'agency.aliyuncs.com',
61
+ 'cn-shanghai-internal-test-1': 'agency.aliyuncs.com',
62
+ 'cn-shenzhen': 'agency.aliyuncs.com',
63
+ 'cn-shenzhen-finance-1': 'agency.aliyuncs.com',
64
+ 'cn-shenzhen-inner': 'agency.aliyuncs.com',
65
+ 'cn-shenzhen-st4-d01': 'agency.aliyuncs.com',
66
+ 'cn-shenzhen-su18-b01': 'agency.aliyuncs.com',
67
+ 'cn-wuhan': 'agency.aliyuncs.com',
68
+ 'cn-wulanchabu': 'agency.aliyuncs.com',
69
+ 'cn-yushanfang': 'agency.aliyuncs.com',
70
+ 'cn-zhangbei': 'agency.aliyuncs.com',
71
+ 'cn-zhangbei-na61-b01': 'agency.aliyuncs.com',
72
+ 'cn-zhangjiakou': 'agency.aliyuncs.com',
73
+ 'cn-zhangjiakou-na62-a01': 'agency.aliyuncs.com',
74
+ 'cn-zhengzhou-nebula-1': 'agency.aliyuncs.com',
75
+ 'eu-central-1': 'agency.aliyuncs.com',
76
+ 'eu-west-1': 'agency.aliyuncs.com',
77
+ 'eu-west-1-oxs': 'agency.aliyuncs.com',
78
+ 'me-east-1': 'agency.aliyuncs.com',
79
+ 'rus-west-1-pop': 'agency.aliyuncs.com',
80
+ 'us-east-1': 'agency.aliyuncs.com',
81
+ 'us-west-1': 'agency.aliyuncs.com'
82
+ }
83
+ self.check_config(config)
84
+ self._endpoint = self.get_endpoint('agency', self._region_id, self._endpoint_rule, self._network, self._suffix, self._endpoint_map, self._endpoint)
85
+
86
+ def get_endpoint(
87
+ self,
88
+ product_id: str,
89
+ region_id: str,
90
+ endpoint_rule: str,
91
+ network: str,
92
+ suffix: str,
93
+ endpoint_map: Dict[str, str],
94
+ endpoint: str,
95
+ ) -> str:
96
+ if not UtilClient.empty(endpoint):
97
+ return endpoint
98
+ if not UtilClient.is_unset(endpoint_map) and not UtilClient.empty(endpoint_map.get(region_id)):
99
+ return endpoint_map.get(region_id)
100
+ return EndpointUtilClient.get_endpoint_rules(product_id, region_id, endpoint_rule, network, suffix)
101
+
102
+ def cancel_coupon_with_options(
103
+ self,
104
+ request: agency_20221216_models.CancelCouponRequest,
105
+ runtime: util_models.RuntimeOptions,
106
+ ) -> agency_20221216_models.CancelCouponResponse:
107
+ """
108
+ @summary 作废优惠券
109
+
110
+ @param request: CancelCouponRequest
111
+ @param runtime: runtime options for this request RuntimeOptions
112
+ @return: CancelCouponResponse
113
+ """
114
+ UtilClient.validate_model(request)
115
+ query = {}
116
+ if not UtilClient.is_unset(request.coupon_id):
117
+ query['CouponId'] = request.coupon_id
118
+ req = open_api_models.OpenApiRequest(
119
+ query=OpenApiUtilClient.query(query)
120
+ )
121
+ params = open_api_models.Params(
122
+ action='CancelCoupon',
123
+ version='2022-12-16',
124
+ protocol='HTTPS',
125
+ pathname='/',
126
+ method='POST',
127
+ auth_type='AK',
128
+ style='RPC',
129
+ req_body_type='formData',
130
+ body_type='json'
131
+ )
132
+ return TeaCore.from_map(
133
+ agency_20221216_models.CancelCouponResponse(),
134
+ self.call_api(params, req, runtime)
135
+ )
136
+
137
+ async def cancel_coupon_with_options_async(
138
+ self,
139
+ request: agency_20221216_models.CancelCouponRequest,
140
+ runtime: util_models.RuntimeOptions,
141
+ ) -> agency_20221216_models.CancelCouponResponse:
142
+ """
143
+ @summary 作废优惠券
144
+
145
+ @param request: CancelCouponRequest
146
+ @param runtime: runtime options for this request RuntimeOptions
147
+ @return: CancelCouponResponse
148
+ """
149
+ UtilClient.validate_model(request)
150
+ query = {}
151
+ if not UtilClient.is_unset(request.coupon_id):
152
+ query['CouponId'] = request.coupon_id
153
+ req = open_api_models.OpenApiRequest(
154
+ query=OpenApiUtilClient.query(query)
155
+ )
156
+ params = open_api_models.Params(
157
+ action='CancelCoupon',
158
+ version='2022-12-16',
159
+ protocol='HTTPS',
160
+ pathname='/',
161
+ method='POST',
162
+ auth_type='AK',
163
+ style='RPC',
164
+ req_body_type='formData',
165
+ body_type='json'
166
+ )
167
+ return TeaCore.from_map(
168
+ agency_20221216_models.CancelCouponResponse(),
169
+ await self.call_api_async(params, req, runtime)
170
+ )
171
+
172
+ def cancel_coupon(
173
+ self,
174
+ request: agency_20221216_models.CancelCouponRequest,
175
+ ) -> agency_20221216_models.CancelCouponResponse:
176
+ """
177
+ @summary 作废优惠券
178
+
179
+ @param request: CancelCouponRequest
180
+ @return: CancelCouponResponse
181
+ """
182
+ runtime = util_models.RuntimeOptions()
183
+ return self.cancel_coupon_with_options(request, runtime)
184
+
185
+ async def cancel_coupon_async(
186
+ self,
187
+ request: agency_20221216_models.CancelCouponRequest,
188
+ ) -> agency_20221216_models.CancelCouponResponse:
189
+ """
190
+ @summary 作废优惠券
191
+
192
+ @param request: CancelCouponRequest
193
+ @return: CancelCouponResponse
194
+ """
195
+ runtime = util_models.RuntimeOptions()
196
+ return await self.cancel_coupon_with_options_async(request, runtime)
197
+
198
+ def cancel_subscription_bill_with_options(
199
+ self,
200
+ request: agency_20221216_models.CancelSubscriptionBillRequest,
201
+ runtime: util_models.RuntimeOptions,
202
+ ) -> agency_20221216_models.CancelSubscriptionBillResponse:
203
+ """
204
+ @summary Cancels the subscription to multi-level bills as an Alibaba Cloud eco-partner.
205
+
206
+ @description Make sure that you are a distributor of the Alibaba Cloud international ecosystem.
207
+ You can call this operation to cancel the subscription to only one type of bill at a time.
208
+ After the subscription to a type of bill is canceled, bills of this type are no longer pushed to the specified Object Storage Service (OSS) bucket.
209
+ *This topic is published only on the international site (alibabacloud.com).
210
+
211
+ @param request: CancelSubscriptionBillRequest
212
+ @param runtime: runtime options for this request RuntimeOptions
213
+ @return: CancelSubscriptionBillResponse
214
+ """
215
+ UtilClient.validate_model(request)
216
+ query = {}
217
+ if not UtilClient.is_unset(request.subscribe_type):
218
+ query['SubscribeType'] = request.subscribe_type
219
+ req = open_api_models.OpenApiRequest(
220
+ query=OpenApiUtilClient.query(query)
221
+ )
222
+ params = open_api_models.Params(
223
+ action='CancelSubscriptionBill',
224
+ version='2022-12-16',
225
+ protocol='HTTPS',
226
+ pathname='/',
227
+ method='POST',
228
+ auth_type='AK',
229
+ style='RPC',
230
+ req_body_type='formData',
231
+ body_type='json'
232
+ )
233
+ return TeaCore.from_map(
234
+ agency_20221216_models.CancelSubscriptionBillResponse(),
235
+ self.call_api(params, req, runtime)
236
+ )
237
+
238
+ async def cancel_subscription_bill_with_options_async(
239
+ self,
240
+ request: agency_20221216_models.CancelSubscriptionBillRequest,
241
+ runtime: util_models.RuntimeOptions,
242
+ ) -> agency_20221216_models.CancelSubscriptionBillResponse:
243
+ """
244
+ @summary Cancels the subscription to multi-level bills as an Alibaba Cloud eco-partner.
245
+
246
+ @description Make sure that you are a distributor of the Alibaba Cloud international ecosystem.
247
+ You can call this operation to cancel the subscription to only one type of bill at a time.
248
+ After the subscription to a type of bill is canceled, bills of this type are no longer pushed to the specified Object Storage Service (OSS) bucket.
249
+ *This topic is published only on the international site (alibabacloud.com).
250
+
251
+ @param request: CancelSubscriptionBillRequest
252
+ @param runtime: runtime options for this request RuntimeOptions
253
+ @return: CancelSubscriptionBillResponse
254
+ """
255
+ UtilClient.validate_model(request)
256
+ query = {}
257
+ if not UtilClient.is_unset(request.subscribe_type):
258
+ query['SubscribeType'] = request.subscribe_type
259
+ req = open_api_models.OpenApiRequest(
260
+ query=OpenApiUtilClient.query(query)
261
+ )
262
+ params = open_api_models.Params(
263
+ action='CancelSubscriptionBill',
264
+ version='2022-12-16',
265
+ protocol='HTTPS',
266
+ pathname='/',
267
+ method='POST',
268
+ auth_type='AK',
269
+ style='RPC',
270
+ req_body_type='formData',
271
+ body_type='json'
272
+ )
273
+ return TeaCore.from_map(
274
+ agency_20221216_models.CancelSubscriptionBillResponse(),
275
+ await self.call_api_async(params, req, runtime)
276
+ )
277
+
278
+ def cancel_subscription_bill(
279
+ self,
280
+ request: agency_20221216_models.CancelSubscriptionBillRequest,
281
+ ) -> agency_20221216_models.CancelSubscriptionBillResponse:
282
+ """
283
+ @summary Cancels the subscription to multi-level bills as an Alibaba Cloud eco-partner.
284
+
285
+ @description Make sure that you are a distributor of the Alibaba Cloud international ecosystem.
286
+ You can call this operation to cancel the subscription to only one type of bill at a time.
287
+ After the subscription to a type of bill is canceled, bills of this type are no longer pushed to the specified Object Storage Service (OSS) bucket.
288
+ *This topic is published only on the international site (alibabacloud.com).
289
+
290
+ @param request: CancelSubscriptionBillRequest
291
+ @return: CancelSubscriptionBillResponse
292
+ """
293
+ runtime = util_models.RuntimeOptions()
294
+ return self.cancel_subscription_bill_with_options(request, runtime)
295
+
296
+ async def cancel_subscription_bill_async(
297
+ self,
298
+ request: agency_20221216_models.CancelSubscriptionBillRequest,
299
+ ) -> agency_20221216_models.CancelSubscriptionBillResponse:
300
+ """
301
+ @summary Cancels the subscription to multi-level bills as an Alibaba Cloud eco-partner.
302
+
303
+ @description Make sure that you are a distributor of the Alibaba Cloud international ecosystem.
304
+ You can call this operation to cancel the subscription to only one type of bill at a time.
305
+ After the subscription to a type of bill is canceled, bills of this type are no longer pushed to the specified Object Storage Service (OSS) bucket.
306
+ *This topic is published only on the international site (alibabacloud.com).
307
+
308
+ @param request: CancelSubscriptionBillRequest
309
+ @return: CancelSubscriptionBillResponse
310
+ """
311
+ runtime = util_models.RuntimeOptions()
312
+ return await self.cancel_subscription_bill_with_options_async(request, runtime)
313
+
314
+ def coupon_approval_status_list_with_options(
315
+ self,
316
+ request: agency_20221216_models.CouponApprovalStatusListRequest,
317
+ runtime: util_models.RuntimeOptions,
318
+ ) -> agency_20221216_models.CouponApprovalStatusListResponse:
319
+ """
320
+ @summary 优惠券审批状态列表
321
+
322
+ @param request: CouponApprovalStatusListRequest
323
+ @param runtime: runtime options for this request RuntimeOptions
324
+ @return: CouponApprovalStatusListResponse
325
+ """
326
+ UtilClient.validate_model(request)
327
+ query = {}
328
+ if not UtilClient.is_unset(request.page_no):
329
+ query['PageNo'] = request.page_no
330
+ if not UtilClient.is_unset(request.page_size):
331
+ query['PageSize'] = request.page_size
332
+ if not UtilClient.is_unset(request.template_id):
333
+ query['TemplateId'] = request.template_id
334
+ if not UtilClient.is_unset(request.template_name):
335
+ query['TemplateName'] = request.template_name
336
+ if not UtilClient.is_unset(request.template_status):
337
+ query['TemplateStatus'] = request.template_status
338
+ req = open_api_models.OpenApiRequest(
339
+ query=OpenApiUtilClient.query(query)
340
+ )
341
+ params = open_api_models.Params(
342
+ action='CouponApprovalStatusList',
343
+ version='2022-12-16',
344
+ protocol='HTTPS',
345
+ pathname='/',
346
+ method='POST',
347
+ auth_type='AK',
348
+ style='RPC',
349
+ req_body_type='formData',
350
+ body_type='json'
351
+ )
352
+ return TeaCore.from_map(
353
+ agency_20221216_models.CouponApprovalStatusListResponse(),
354
+ self.call_api(params, req, runtime)
355
+ )
356
+
357
+ async def coupon_approval_status_list_with_options_async(
358
+ self,
359
+ request: agency_20221216_models.CouponApprovalStatusListRequest,
360
+ runtime: util_models.RuntimeOptions,
361
+ ) -> agency_20221216_models.CouponApprovalStatusListResponse:
362
+ """
363
+ @summary 优惠券审批状态列表
364
+
365
+ @param request: CouponApprovalStatusListRequest
366
+ @param runtime: runtime options for this request RuntimeOptions
367
+ @return: CouponApprovalStatusListResponse
368
+ """
369
+ UtilClient.validate_model(request)
370
+ query = {}
371
+ if not UtilClient.is_unset(request.page_no):
372
+ query['PageNo'] = request.page_no
373
+ if not UtilClient.is_unset(request.page_size):
374
+ query['PageSize'] = request.page_size
375
+ if not UtilClient.is_unset(request.template_id):
376
+ query['TemplateId'] = request.template_id
377
+ if not UtilClient.is_unset(request.template_name):
378
+ query['TemplateName'] = request.template_name
379
+ if not UtilClient.is_unset(request.template_status):
380
+ query['TemplateStatus'] = request.template_status
381
+ req = open_api_models.OpenApiRequest(
382
+ query=OpenApiUtilClient.query(query)
383
+ )
384
+ params = open_api_models.Params(
385
+ action='CouponApprovalStatusList',
386
+ version='2022-12-16',
387
+ protocol='HTTPS',
388
+ pathname='/',
389
+ method='POST',
390
+ auth_type='AK',
391
+ style='RPC',
392
+ req_body_type='formData',
393
+ body_type='json'
394
+ )
395
+ return TeaCore.from_map(
396
+ agency_20221216_models.CouponApprovalStatusListResponse(),
397
+ await self.call_api_async(params, req, runtime)
398
+ )
399
+
400
+ def coupon_approval_status_list(
401
+ self,
402
+ request: agency_20221216_models.CouponApprovalStatusListRequest,
403
+ ) -> agency_20221216_models.CouponApprovalStatusListResponse:
404
+ """
405
+ @summary 优惠券审批状态列表
406
+
407
+ @param request: CouponApprovalStatusListRequest
408
+ @return: CouponApprovalStatusListResponse
409
+ """
410
+ runtime = util_models.RuntimeOptions()
411
+ return self.coupon_approval_status_list_with_options(request, runtime)
412
+
413
+ async def coupon_approval_status_list_async(
414
+ self,
415
+ request: agency_20221216_models.CouponApprovalStatusListRequest,
416
+ ) -> agency_20221216_models.CouponApprovalStatusListResponse:
417
+ """
418
+ @summary 优惠券审批状态列表
419
+
420
+ @param request: CouponApprovalStatusListRequest
421
+ @return: CouponApprovalStatusListResponse
422
+ """
423
+ runtime = util_models.RuntimeOptions()
424
+ return await self.coupon_approval_status_list_with_options_async(request, runtime)
425
+
426
+ def create_coupon_template_with_options(
427
+ self,
428
+ tmp_req: agency_20221216_models.CreateCouponTemplateRequest,
429
+ runtime: util_models.RuntimeOptions,
430
+ ) -> agency_20221216_models.CreateCouponTemplateResponse:
431
+ """
432
+ @summary 创建优惠券模板
433
+
434
+ @param tmp_req: CreateCouponTemplateRequest
435
+ @param runtime: runtime options for this request RuntimeOptions
436
+ @return: CreateCouponTemplateResponse
437
+ """
438
+ UtilClient.validate_model(tmp_req)
439
+ request = agency_20221216_models.CreateCouponTemplateShrinkRequest()
440
+ OpenApiUtilClient.convert(tmp_req, request)
441
+ if not UtilClient.is_unset(tmp_req.product_type):
442
+ request.product_type_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.product_type, 'ProductType', 'json')
443
+ query = {}
444
+ if not UtilClient.is_unset(request.accept_language):
445
+ query['AcceptLanguage'] = request.accept_language
446
+ if not UtilClient.is_unset(request.applicable_products):
447
+ query['ApplicableProducts'] = request.applicable_products
448
+ if not UtilClient.is_unset(request.cost_bearer):
449
+ query['CostBearer'] = request.cost_bearer
450
+ if not UtilClient.is_unset(request.coupon_description):
451
+ query['CouponDescription'] = request.coupon_description
452
+ if not UtilClient.is_unset(request.expireddate):
453
+ query['Expireddate'] = request.expireddate
454
+ if not UtilClient.is_unset(request.limit_per_person):
455
+ query['LimitPerPerson'] = request.limit_per_person
456
+ if not UtilClient.is_unset(request.product_type_shrink):
457
+ query['ProductType'] = request.product_type_shrink
458
+ if not UtilClient.is_unset(request.purchase_type):
459
+ query['PurchaseType'] = request.purchase_type
460
+ if not UtilClient.is_unset(request.reason_for_application):
461
+ query['ReasonForApplication'] = request.reason_for_application
462
+ if not UtilClient.is_unset(request.template_name):
463
+ query['TemplateName'] = request.template_name
464
+ if not UtilClient.is_unset(request.vailddate):
465
+ query['Vailddate'] = request.vailddate
466
+ if not UtilClient.is_unset(request.vaildperioddays):
467
+ query['Vaildperioddays'] = request.vaildperioddays
468
+ if not UtilClient.is_unset(request.valid_until):
469
+ query['ValidUntil'] = request.valid_until
470
+ if not UtilClient.is_unset(request.value):
471
+ query['Value'] = request.value
472
+ req = open_api_models.OpenApiRequest(
473
+ query=OpenApiUtilClient.query(query)
474
+ )
475
+ params = open_api_models.Params(
476
+ action='CreateCouponTemplate',
477
+ version='2022-12-16',
478
+ protocol='HTTPS',
479
+ pathname='/',
480
+ method='POST',
481
+ auth_type='AK',
482
+ style='RPC',
483
+ req_body_type='formData',
484
+ body_type='json'
485
+ )
486
+ return TeaCore.from_map(
487
+ agency_20221216_models.CreateCouponTemplateResponse(),
488
+ self.call_api(params, req, runtime)
489
+ )
490
+
491
+ async def create_coupon_template_with_options_async(
492
+ self,
493
+ tmp_req: agency_20221216_models.CreateCouponTemplateRequest,
494
+ runtime: util_models.RuntimeOptions,
495
+ ) -> agency_20221216_models.CreateCouponTemplateResponse:
496
+ """
497
+ @summary 创建优惠券模板
498
+
499
+ @param tmp_req: CreateCouponTemplateRequest
500
+ @param runtime: runtime options for this request RuntimeOptions
501
+ @return: CreateCouponTemplateResponse
502
+ """
503
+ UtilClient.validate_model(tmp_req)
504
+ request = agency_20221216_models.CreateCouponTemplateShrinkRequest()
505
+ OpenApiUtilClient.convert(tmp_req, request)
506
+ if not UtilClient.is_unset(tmp_req.product_type):
507
+ request.product_type_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.product_type, 'ProductType', 'json')
508
+ query = {}
509
+ if not UtilClient.is_unset(request.accept_language):
510
+ query['AcceptLanguage'] = request.accept_language
511
+ if not UtilClient.is_unset(request.applicable_products):
512
+ query['ApplicableProducts'] = request.applicable_products
513
+ if not UtilClient.is_unset(request.cost_bearer):
514
+ query['CostBearer'] = request.cost_bearer
515
+ if not UtilClient.is_unset(request.coupon_description):
516
+ query['CouponDescription'] = request.coupon_description
517
+ if not UtilClient.is_unset(request.expireddate):
518
+ query['Expireddate'] = request.expireddate
519
+ if not UtilClient.is_unset(request.limit_per_person):
520
+ query['LimitPerPerson'] = request.limit_per_person
521
+ if not UtilClient.is_unset(request.product_type_shrink):
522
+ query['ProductType'] = request.product_type_shrink
523
+ if not UtilClient.is_unset(request.purchase_type):
524
+ query['PurchaseType'] = request.purchase_type
525
+ if not UtilClient.is_unset(request.reason_for_application):
526
+ query['ReasonForApplication'] = request.reason_for_application
527
+ if not UtilClient.is_unset(request.template_name):
528
+ query['TemplateName'] = request.template_name
529
+ if not UtilClient.is_unset(request.vailddate):
530
+ query['Vailddate'] = request.vailddate
531
+ if not UtilClient.is_unset(request.vaildperioddays):
532
+ query['Vaildperioddays'] = request.vaildperioddays
533
+ if not UtilClient.is_unset(request.valid_until):
534
+ query['ValidUntil'] = request.valid_until
535
+ if not UtilClient.is_unset(request.value):
536
+ query['Value'] = request.value
537
+ req = open_api_models.OpenApiRequest(
538
+ query=OpenApiUtilClient.query(query)
539
+ )
540
+ params = open_api_models.Params(
541
+ action='CreateCouponTemplate',
542
+ version='2022-12-16',
543
+ protocol='HTTPS',
544
+ pathname='/',
545
+ method='POST',
546
+ auth_type='AK',
547
+ style='RPC',
548
+ req_body_type='formData',
549
+ body_type='json'
550
+ )
551
+ return TeaCore.from_map(
552
+ agency_20221216_models.CreateCouponTemplateResponse(),
553
+ await self.call_api_async(params, req, runtime)
554
+ )
555
+
556
+ def create_coupon_template(
557
+ self,
558
+ request: agency_20221216_models.CreateCouponTemplateRequest,
559
+ ) -> agency_20221216_models.CreateCouponTemplateResponse:
560
+ """
561
+ @summary 创建优惠券模板
562
+
563
+ @param request: CreateCouponTemplateRequest
564
+ @return: CreateCouponTemplateResponse
565
+ """
566
+ runtime = util_models.RuntimeOptions()
567
+ return self.create_coupon_template_with_options(request, runtime)
568
+
569
+ async def create_coupon_template_async(
570
+ self,
571
+ request: agency_20221216_models.CreateCouponTemplateRequest,
572
+ ) -> agency_20221216_models.CreateCouponTemplateResponse:
573
+ """
574
+ @summary 创建优惠券模板
575
+
576
+ @param request: CreateCouponTemplateRequest
577
+ @return: CreateCouponTemplateResponse
578
+ """
579
+ runtime = util_models.RuntimeOptions()
580
+ return await self.create_coupon_template_with_options_async(request, runtime)
581
+
582
+ def create_customer_with_options(
583
+ self,
584
+ request: agency_20221216_models.CreateCustomerRequest,
585
+ runtime: util_models.RuntimeOptions,
586
+ ) -> agency_20221216_models.CreateCustomerResponse:
587
+ """
588
+ @summary This function is designed for create a customer who is to be invited.
589
+
590
+ @param request: CreateCustomerRequest
591
+ @param runtime: runtime options for this request RuntimeOptions
592
+ @return: CreateCustomerResponse
593
+ """
594
+ UtilClient.validate_model(request)
595
+ query = {}
596
+ if not UtilClient.is_unset(request.customer_name):
597
+ query['CustomerName'] = request.customer_name
598
+ if not UtilClient.is_unset(request.customer_source):
599
+ query['CustomerSource'] = request.customer_source
600
+ if not UtilClient.is_unset(request.customer_sub_trade):
601
+ query['CustomerSubTrade'] = request.customer_sub_trade
602
+ if not UtilClient.is_unset(request.customer_trade):
603
+ query['CustomerTrade'] = request.customer_trade
604
+ if not UtilClient.is_unset(request.nation):
605
+ query['Nation'] = request.nation
606
+ req = open_api_models.OpenApiRequest(
607
+ query=OpenApiUtilClient.query(query)
608
+ )
609
+ params = open_api_models.Params(
610
+ action='CreateCustomer',
611
+ version='2022-12-16',
612
+ protocol='HTTPS',
613
+ pathname='/',
614
+ method='POST',
615
+ auth_type='AK',
616
+ style='RPC',
617
+ req_body_type='formData',
618
+ body_type='json'
619
+ )
620
+ return TeaCore.from_map(
621
+ agency_20221216_models.CreateCustomerResponse(),
622
+ self.call_api(params, req, runtime)
623
+ )
624
+
625
+ async def create_customer_with_options_async(
626
+ self,
627
+ request: agency_20221216_models.CreateCustomerRequest,
628
+ runtime: util_models.RuntimeOptions,
629
+ ) -> agency_20221216_models.CreateCustomerResponse:
630
+ """
631
+ @summary This function is designed for create a customer who is to be invited.
632
+
633
+ @param request: CreateCustomerRequest
634
+ @param runtime: runtime options for this request RuntimeOptions
635
+ @return: CreateCustomerResponse
636
+ """
637
+ UtilClient.validate_model(request)
638
+ query = {}
639
+ if not UtilClient.is_unset(request.customer_name):
640
+ query['CustomerName'] = request.customer_name
641
+ if not UtilClient.is_unset(request.customer_source):
642
+ query['CustomerSource'] = request.customer_source
643
+ if not UtilClient.is_unset(request.customer_sub_trade):
644
+ query['CustomerSubTrade'] = request.customer_sub_trade
645
+ if not UtilClient.is_unset(request.customer_trade):
646
+ query['CustomerTrade'] = request.customer_trade
647
+ if not UtilClient.is_unset(request.nation):
648
+ query['Nation'] = request.nation
649
+ req = open_api_models.OpenApiRequest(
650
+ query=OpenApiUtilClient.query(query)
651
+ )
652
+ params = open_api_models.Params(
653
+ action='CreateCustomer',
654
+ version='2022-12-16',
655
+ protocol='HTTPS',
656
+ pathname='/',
657
+ method='POST',
658
+ auth_type='AK',
659
+ style='RPC',
660
+ req_body_type='formData',
661
+ body_type='json'
662
+ )
663
+ return TeaCore.from_map(
664
+ agency_20221216_models.CreateCustomerResponse(),
665
+ await self.call_api_async(params, req, runtime)
666
+ )
667
+
668
+ def create_customer(
669
+ self,
670
+ request: agency_20221216_models.CreateCustomerRequest,
671
+ ) -> agency_20221216_models.CreateCustomerResponse:
672
+ """
673
+ @summary This function is designed for create a customer who is to be invited.
674
+
675
+ @param request: CreateCustomerRequest
676
+ @return: CreateCustomerResponse
677
+ """
678
+ runtime = util_models.RuntimeOptions()
679
+ return self.create_customer_with_options(request, runtime)
680
+
681
+ async def create_customer_async(
682
+ self,
683
+ request: agency_20221216_models.CreateCustomerRequest,
684
+ ) -> agency_20221216_models.CreateCustomerResponse:
685
+ """
686
+ @summary This function is designed for create a customer who is to be invited.
687
+
688
+ @param request: CreateCustomerRequest
689
+ @return: CreateCustomerResponse
690
+ """
691
+ runtime = util_models.RuntimeOptions()
692
+ return await self.create_customer_with_options_async(request, runtime)
693
+
694
+ def customer_quota_record_list_with_options(
695
+ self,
696
+ request: agency_20221216_models.CustomerQuotaRecordListRequest,
697
+ runtime: util_models.RuntimeOptions,
698
+ ) -> agency_20221216_models.CustomerQuotaRecordListResponse:
699
+ """
700
+ @summary Query quota adjustment list of Distribution Customer from International Site. Not available on Domestic Site.
701
+
702
+ @param request: CustomerQuotaRecordListRequest
703
+ @param runtime: runtime options for this request RuntimeOptions
704
+ @return: CustomerQuotaRecordListResponse
705
+ """
706
+ UtilClient.validate_model(request)
707
+ query = OpenApiUtilClient.query(UtilClient.to_map(request))
708
+ req = open_api_models.OpenApiRequest(
709
+ query=OpenApiUtilClient.query(query)
710
+ )
711
+ params = open_api_models.Params(
712
+ action='CustomerQuotaRecordList',
713
+ version='2022-12-16',
714
+ protocol='HTTPS',
715
+ pathname='/',
716
+ method='GET',
717
+ auth_type='AK',
718
+ style='RPC',
719
+ req_body_type='formData',
720
+ body_type='json'
721
+ )
722
+ return TeaCore.from_map(
723
+ agency_20221216_models.CustomerQuotaRecordListResponse(),
724
+ self.call_api(params, req, runtime)
725
+ )
726
+
727
+ async def customer_quota_record_list_with_options_async(
728
+ self,
729
+ request: agency_20221216_models.CustomerQuotaRecordListRequest,
730
+ runtime: util_models.RuntimeOptions,
731
+ ) -> agency_20221216_models.CustomerQuotaRecordListResponse:
732
+ """
733
+ @summary Query quota adjustment list of Distribution Customer from International Site. Not available on Domestic Site.
734
+
735
+ @param request: CustomerQuotaRecordListRequest
736
+ @param runtime: runtime options for this request RuntimeOptions
737
+ @return: CustomerQuotaRecordListResponse
738
+ """
739
+ UtilClient.validate_model(request)
740
+ query = OpenApiUtilClient.query(UtilClient.to_map(request))
741
+ req = open_api_models.OpenApiRequest(
742
+ query=OpenApiUtilClient.query(query)
743
+ )
744
+ params = open_api_models.Params(
745
+ action='CustomerQuotaRecordList',
746
+ version='2022-12-16',
747
+ protocol='HTTPS',
748
+ pathname='/',
749
+ method='GET',
750
+ auth_type='AK',
751
+ style='RPC',
752
+ req_body_type='formData',
753
+ body_type='json'
754
+ )
755
+ return TeaCore.from_map(
756
+ agency_20221216_models.CustomerQuotaRecordListResponse(),
757
+ await self.call_api_async(params, req, runtime)
758
+ )
759
+
760
+ def customer_quota_record_list(
761
+ self,
762
+ request: agency_20221216_models.CustomerQuotaRecordListRequest,
763
+ ) -> agency_20221216_models.CustomerQuotaRecordListResponse:
764
+ """
765
+ @summary Query quota adjustment list of Distribution Customer from International Site. Not available on Domestic Site.
766
+
767
+ @param request: CustomerQuotaRecordListRequest
768
+ @return: CustomerQuotaRecordListResponse
769
+ """
770
+ runtime = util_models.RuntimeOptions()
771
+ return self.customer_quota_record_list_with_options(request, runtime)
772
+
773
+ async def customer_quota_record_list_async(
774
+ self,
775
+ request: agency_20221216_models.CustomerQuotaRecordListRequest,
776
+ ) -> agency_20221216_models.CustomerQuotaRecordListResponse:
777
+ """
778
+ @summary Query quota adjustment list of Distribution Customer from International Site. Not available on Domestic Site.
779
+
780
+ @param request: CustomerQuotaRecordListRequest
781
+ @return: CustomerQuotaRecordListResponse
782
+ """
783
+ runtime = util_models.RuntimeOptions()
784
+ return await self.customer_quota_record_list_with_options_async(request, runtime)
785
+
786
+ def deduct_outstanding_balance_with_options(
787
+ self,
788
+ request: agency_20221216_models.DeductOutstandingBalanceRequest,
789
+ runtime: util_models.RuntimeOptions,
790
+ ) -> agency_20221216_models.DeductOutstandingBalanceResponse:
791
+ """
792
+ @summary This API is used to offset the Deducted Credit of a Distribution Customer. For example, if the current Deducted Credit is 500 and the Available Credit is 1000, by offsetting 300, the Deducted Credit will then become 200, and the Available Credit becomes 1300.
793
+
794
+ @description Note that sometimes you may find that the customer\\"s Used Credit is negative. This indicates that there is no need to restore the Used Credit, and its ready for customer\\"s usage. This phenomenon occurs because a refund is generated while the customer\\"s credit is full, thereby triggered additional increasing on the customer\\"s credit.
795
+ For example, if the customer\\"s maximum Available Credit is 1000 with no usage, and a refund of 300 occurs, the Used Credit will become -300.
796
+
797
+ @param request: DeductOutstandingBalanceRequest
798
+ @param runtime: runtime options for this request RuntimeOptions
799
+ @return: DeductOutstandingBalanceResponse
800
+ """
801
+ UtilClient.validate_model(request)
802
+ query = {}
803
+ if not UtilClient.is_unset(request.deduct_amount):
804
+ query['DeductAmount'] = request.deduct_amount
805
+ if not UtilClient.is_unset(request.uid):
806
+ query['Uid'] = request.uid
807
+ req = open_api_models.OpenApiRequest(
808
+ query=OpenApiUtilClient.query(query)
809
+ )
810
+ params = open_api_models.Params(
811
+ action='DeductOutstandingBalance',
812
+ version='2022-12-16',
813
+ protocol='HTTPS',
814
+ pathname='/',
815
+ method='POST',
816
+ auth_type='AK',
817
+ style='RPC',
818
+ req_body_type='formData',
819
+ body_type='json'
820
+ )
821
+ return TeaCore.from_map(
822
+ agency_20221216_models.DeductOutstandingBalanceResponse(),
823
+ self.call_api(params, req, runtime)
824
+ )
825
+
826
+ async def deduct_outstanding_balance_with_options_async(
827
+ self,
828
+ request: agency_20221216_models.DeductOutstandingBalanceRequest,
829
+ runtime: util_models.RuntimeOptions,
830
+ ) -> agency_20221216_models.DeductOutstandingBalanceResponse:
831
+ """
832
+ @summary This API is used to offset the Deducted Credit of a Distribution Customer. For example, if the current Deducted Credit is 500 and the Available Credit is 1000, by offsetting 300, the Deducted Credit will then become 200, and the Available Credit becomes 1300.
833
+
834
+ @description Note that sometimes you may find that the customer\\"s Used Credit is negative. This indicates that there is no need to restore the Used Credit, and its ready for customer\\"s usage. This phenomenon occurs because a refund is generated while the customer\\"s credit is full, thereby triggered additional increasing on the customer\\"s credit.
835
+ For example, if the customer\\"s maximum Available Credit is 1000 with no usage, and a refund of 300 occurs, the Used Credit will become -300.
836
+
837
+ @param request: DeductOutstandingBalanceRequest
838
+ @param runtime: runtime options for this request RuntimeOptions
839
+ @return: DeductOutstandingBalanceResponse
840
+ """
841
+ UtilClient.validate_model(request)
842
+ query = {}
843
+ if not UtilClient.is_unset(request.deduct_amount):
844
+ query['DeductAmount'] = request.deduct_amount
845
+ if not UtilClient.is_unset(request.uid):
846
+ query['Uid'] = request.uid
847
+ req = open_api_models.OpenApiRequest(
848
+ query=OpenApiUtilClient.query(query)
849
+ )
850
+ params = open_api_models.Params(
851
+ action='DeductOutstandingBalance',
852
+ version='2022-12-16',
853
+ protocol='HTTPS',
854
+ pathname='/',
855
+ method='POST',
856
+ auth_type='AK',
857
+ style='RPC',
858
+ req_body_type='formData',
859
+ body_type='json'
860
+ )
861
+ return TeaCore.from_map(
862
+ agency_20221216_models.DeductOutstandingBalanceResponse(),
863
+ await self.call_api_async(params, req, runtime)
864
+ )
865
+
866
+ def deduct_outstanding_balance(
867
+ self,
868
+ request: agency_20221216_models.DeductOutstandingBalanceRequest,
869
+ ) -> agency_20221216_models.DeductOutstandingBalanceResponse:
870
+ """
871
+ @summary This API is used to offset the Deducted Credit of a Distribution Customer. For example, if the current Deducted Credit is 500 and the Available Credit is 1000, by offsetting 300, the Deducted Credit will then become 200, and the Available Credit becomes 1300.
872
+
873
+ @description Note that sometimes you may find that the customer\\"s Used Credit is negative. This indicates that there is no need to restore the Used Credit, and its ready for customer\\"s usage. This phenomenon occurs because a refund is generated while the customer\\"s credit is full, thereby triggered additional increasing on the customer\\"s credit.
874
+ For example, if the customer\\"s maximum Available Credit is 1000 with no usage, and a refund of 300 occurs, the Used Credit will become -300.
875
+
876
+ @param request: DeductOutstandingBalanceRequest
877
+ @return: DeductOutstandingBalanceResponse
878
+ """
879
+ runtime = util_models.RuntimeOptions()
880
+ return self.deduct_outstanding_balance_with_options(request, runtime)
881
+
882
+ async def deduct_outstanding_balance_async(
883
+ self,
884
+ request: agency_20221216_models.DeductOutstandingBalanceRequest,
885
+ ) -> agency_20221216_models.DeductOutstandingBalanceResponse:
886
+ """
887
+ @summary This API is used to offset the Deducted Credit of a Distribution Customer. For example, if the current Deducted Credit is 500 and the Available Credit is 1000, by offsetting 300, the Deducted Credit will then become 200, and the Available Credit becomes 1300.
888
+
889
+ @description Note that sometimes you may find that the customer\\"s Used Credit is negative. This indicates that there is no need to restore the Used Credit, and its ready for customer\\"s usage. This phenomenon occurs because a refund is generated while the customer\\"s credit is full, thereby triggered additional increasing on the customer\\"s credit.
890
+ For example, if the customer\\"s maximum Available Credit is 1000 with no usage, and a refund of 300 occurs, the Used Credit will become -300.
891
+
892
+ @param request: DeductOutstandingBalanceRequest
893
+ @return: DeductOutstandingBalanceResponse
894
+ """
895
+ runtime = util_models.RuntimeOptions()
896
+ return await self.deduct_outstanding_balance_with_options_async(request, runtime)
897
+
898
+ def delete_coupon_template_with_options(
899
+ self,
900
+ request: agency_20221216_models.DeleteCouponTemplateRequest,
901
+ runtime: util_models.RuntimeOptions,
902
+ ) -> agency_20221216_models.DeleteCouponTemplateResponse:
903
+ """
904
+ @summary 作废优惠券模板
905
+
906
+ @param request: DeleteCouponTemplateRequest
907
+ @param runtime: runtime options for this request RuntimeOptions
908
+ @return: DeleteCouponTemplateResponse
909
+ """
910
+ UtilClient.validate_model(request)
911
+ query = {}
912
+ if not UtilClient.is_unset(request.template_id):
913
+ query['TemplateId'] = request.template_id
914
+ req = open_api_models.OpenApiRequest(
915
+ query=OpenApiUtilClient.query(query)
916
+ )
917
+ params = open_api_models.Params(
918
+ action='DeleteCouponTemplate',
919
+ version='2022-12-16',
920
+ protocol='HTTPS',
921
+ pathname='/',
922
+ method='POST',
923
+ auth_type='AK',
924
+ style='RPC',
925
+ req_body_type='formData',
926
+ body_type='json'
927
+ )
928
+ return TeaCore.from_map(
929
+ agency_20221216_models.DeleteCouponTemplateResponse(),
930
+ self.call_api(params, req, runtime)
931
+ )
932
+
933
+ async def delete_coupon_template_with_options_async(
934
+ self,
935
+ request: agency_20221216_models.DeleteCouponTemplateRequest,
936
+ runtime: util_models.RuntimeOptions,
937
+ ) -> agency_20221216_models.DeleteCouponTemplateResponse:
938
+ """
939
+ @summary 作废优惠券模板
940
+
941
+ @param request: DeleteCouponTemplateRequest
942
+ @param runtime: runtime options for this request RuntimeOptions
943
+ @return: DeleteCouponTemplateResponse
944
+ """
945
+ UtilClient.validate_model(request)
946
+ query = {}
947
+ if not UtilClient.is_unset(request.template_id):
948
+ query['TemplateId'] = request.template_id
949
+ req = open_api_models.OpenApiRequest(
950
+ query=OpenApiUtilClient.query(query)
951
+ )
952
+ params = open_api_models.Params(
953
+ action='DeleteCouponTemplate',
954
+ version='2022-12-16',
955
+ protocol='HTTPS',
956
+ pathname='/',
957
+ method='POST',
958
+ auth_type='AK',
959
+ style='RPC',
960
+ req_body_type='formData',
961
+ body_type='json'
962
+ )
963
+ return TeaCore.from_map(
964
+ agency_20221216_models.DeleteCouponTemplateResponse(),
965
+ await self.call_api_async(params, req, runtime)
966
+ )
967
+
968
+ def delete_coupon_template(
969
+ self,
970
+ request: agency_20221216_models.DeleteCouponTemplateRequest,
971
+ ) -> agency_20221216_models.DeleteCouponTemplateResponse:
972
+ """
973
+ @summary 作废优惠券模板
974
+
975
+ @param request: DeleteCouponTemplateRequest
976
+ @return: DeleteCouponTemplateResponse
977
+ """
978
+ runtime = util_models.RuntimeOptions()
979
+ return self.delete_coupon_template_with_options(request, runtime)
980
+
981
+ async def delete_coupon_template_async(
982
+ self,
983
+ request: agency_20221216_models.DeleteCouponTemplateRequest,
984
+ ) -> agency_20221216_models.DeleteCouponTemplateResponse:
985
+ """
986
+ @summary 作废优惠券模板
987
+
988
+ @param request: DeleteCouponTemplateRequest
989
+ @return: DeleteCouponTemplateResponse
990
+ """
991
+ runtime = util_models.RuntimeOptions()
992
+ return await self.delete_coupon_template_with_options_async(request, runtime)
993
+
994
+ def edit_end_user_status_with_options(
995
+ self,
996
+ request: agency_20221216_models.EditEndUserStatusRequest,
997
+ runtime: util_models.RuntimeOptions,
998
+ ) -> agency_20221216_models.EditEndUserStatusResponse:
999
+ """
1000
+ @summary Set the after-shutdown instance status for post-pay End Users as a Reseller.
1001
+
1002
+ @description The caller should be the Partner as identified in the Alibaba Cloud distribution model. </br>
1003
+ *This content is only published on the international site. **\
1004
+
1005
+ @param request: EditEndUserStatusRequest
1006
+ @param runtime: runtime options for this request RuntimeOptions
1007
+ @return: EditEndUserStatusResponse
1008
+ """
1009
+ UtilClient.validate_model(request)
1010
+ query = OpenApiUtilClient.query(UtilClient.to_map(request))
1011
+ req = open_api_models.OpenApiRequest(
1012
+ query=OpenApiUtilClient.query(query)
1013
+ )
1014
+ params = open_api_models.Params(
1015
+ action='EditEndUserStatus',
1016
+ version='2022-12-16',
1017
+ protocol='HTTPS',
1018
+ pathname='/',
1019
+ method='GET',
1020
+ auth_type='AK',
1021
+ style='RPC',
1022
+ req_body_type='formData',
1023
+ body_type='json'
1024
+ )
1025
+ return TeaCore.from_map(
1026
+ agency_20221216_models.EditEndUserStatusResponse(),
1027
+ self.call_api(params, req, runtime)
1028
+ )
1029
+
1030
+ async def edit_end_user_status_with_options_async(
1031
+ self,
1032
+ request: agency_20221216_models.EditEndUserStatusRequest,
1033
+ runtime: util_models.RuntimeOptions,
1034
+ ) -> agency_20221216_models.EditEndUserStatusResponse:
1035
+ """
1036
+ @summary Set the after-shutdown instance status for post-pay End Users as a Reseller.
1037
+
1038
+ @description The caller should be the Partner as identified in the Alibaba Cloud distribution model. </br>
1039
+ *This content is only published on the international site. **\
1040
+
1041
+ @param request: EditEndUserStatusRequest
1042
+ @param runtime: runtime options for this request RuntimeOptions
1043
+ @return: EditEndUserStatusResponse
1044
+ """
1045
+ UtilClient.validate_model(request)
1046
+ query = OpenApiUtilClient.query(UtilClient.to_map(request))
1047
+ req = open_api_models.OpenApiRequest(
1048
+ query=OpenApiUtilClient.query(query)
1049
+ )
1050
+ params = open_api_models.Params(
1051
+ action='EditEndUserStatus',
1052
+ version='2022-12-16',
1053
+ protocol='HTTPS',
1054
+ pathname='/',
1055
+ method='GET',
1056
+ auth_type='AK',
1057
+ style='RPC',
1058
+ req_body_type='formData',
1059
+ body_type='json'
1060
+ )
1061
+ return TeaCore.from_map(
1062
+ agency_20221216_models.EditEndUserStatusResponse(),
1063
+ await self.call_api_async(params, req, runtime)
1064
+ )
1065
+
1066
+ def edit_end_user_status(
1067
+ self,
1068
+ request: agency_20221216_models.EditEndUserStatusRequest,
1069
+ ) -> agency_20221216_models.EditEndUserStatusResponse:
1070
+ """
1071
+ @summary Set the after-shutdown instance status for post-pay End Users as a Reseller.
1072
+
1073
+ @description The caller should be the Partner as identified in the Alibaba Cloud distribution model. </br>
1074
+ *This content is only published on the international site. **\
1075
+
1076
+ @param request: EditEndUserStatusRequest
1077
+ @return: EditEndUserStatusResponse
1078
+ """
1079
+ runtime = util_models.RuntimeOptions()
1080
+ return self.edit_end_user_status_with_options(request, runtime)
1081
+
1082
+ async def edit_end_user_status_async(
1083
+ self,
1084
+ request: agency_20221216_models.EditEndUserStatusRequest,
1085
+ ) -> agency_20221216_models.EditEndUserStatusResponse:
1086
+ """
1087
+ @summary Set the after-shutdown instance status for post-pay End Users as a Reseller.
1088
+
1089
+ @description The caller should be the Partner as identified in the Alibaba Cloud distribution model. </br>
1090
+ *This content is only published on the international site. **\
1091
+
1092
+ @param request: EditEndUserStatusRequest
1093
+ @return: EditEndUserStatusResponse
1094
+ """
1095
+ runtime = util_models.RuntimeOptions()
1096
+ return await self.edit_end_user_status_with_options_async(request, runtime)
1097
+
1098
+ def edit_new_buy_status_with_options(
1099
+ self,
1100
+ request: agency_20221216_models.EditNewBuyStatusRequest,
1101
+ runtime: util_models.RuntimeOptions,
1102
+ ) -> agency_20221216_models.EditNewBuyStatusResponse:
1103
+ """
1104
+ @summary Set the New Buy status for Sub-Customer as a Partner.
1105
+
1106
+ @description The caller should be the Partner as identified in the Alibaba Cloud distribution model. </br>
1107
+ *This content is only published on the international site. **\
1108
+
1109
+ @param request: EditNewBuyStatusRequest
1110
+ @param runtime: runtime options for this request RuntimeOptions
1111
+ @return: EditNewBuyStatusResponse
1112
+ """
1113
+ UtilClient.validate_model(request)
1114
+ query = {}
1115
+ if not UtilClient.is_unset(request.new_buy_status):
1116
+ query['NewBuyStatus'] = request.new_buy_status
1117
+ if not UtilClient.is_unset(request.uid):
1118
+ query['Uid'] = request.uid
1119
+ req = open_api_models.OpenApiRequest(
1120
+ query=OpenApiUtilClient.query(query)
1121
+ )
1122
+ params = open_api_models.Params(
1123
+ action='EditNewBuyStatus',
1124
+ version='2022-12-16',
1125
+ protocol='HTTPS',
1126
+ pathname='/',
1127
+ method='POST',
1128
+ auth_type='AK',
1129
+ style='RPC',
1130
+ req_body_type='formData',
1131
+ body_type='json'
1132
+ )
1133
+ return TeaCore.from_map(
1134
+ agency_20221216_models.EditNewBuyStatusResponse(),
1135
+ self.call_api(params, req, runtime)
1136
+ )
1137
+
1138
+ async def edit_new_buy_status_with_options_async(
1139
+ self,
1140
+ request: agency_20221216_models.EditNewBuyStatusRequest,
1141
+ runtime: util_models.RuntimeOptions,
1142
+ ) -> agency_20221216_models.EditNewBuyStatusResponse:
1143
+ """
1144
+ @summary Set the New Buy status for Sub-Customer as a Partner.
1145
+
1146
+ @description The caller should be the Partner as identified in the Alibaba Cloud distribution model. </br>
1147
+ *This content is only published on the international site. **\
1148
+
1149
+ @param request: EditNewBuyStatusRequest
1150
+ @param runtime: runtime options for this request RuntimeOptions
1151
+ @return: EditNewBuyStatusResponse
1152
+ """
1153
+ UtilClient.validate_model(request)
1154
+ query = {}
1155
+ if not UtilClient.is_unset(request.new_buy_status):
1156
+ query['NewBuyStatus'] = request.new_buy_status
1157
+ if not UtilClient.is_unset(request.uid):
1158
+ query['Uid'] = request.uid
1159
+ req = open_api_models.OpenApiRequest(
1160
+ query=OpenApiUtilClient.query(query)
1161
+ )
1162
+ params = open_api_models.Params(
1163
+ action='EditNewBuyStatus',
1164
+ version='2022-12-16',
1165
+ protocol='HTTPS',
1166
+ pathname='/',
1167
+ method='POST',
1168
+ auth_type='AK',
1169
+ style='RPC',
1170
+ req_body_type='formData',
1171
+ body_type='json'
1172
+ )
1173
+ return TeaCore.from_map(
1174
+ agency_20221216_models.EditNewBuyStatusResponse(),
1175
+ await self.call_api_async(params, req, runtime)
1176
+ )
1177
+
1178
+ def edit_new_buy_status(
1179
+ self,
1180
+ request: agency_20221216_models.EditNewBuyStatusRequest,
1181
+ ) -> agency_20221216_models.EditNewBuyStatusResponse:
1182
+ """
1183
+ @summary Set the New Buy status for Sub-Customer as a Partner.
1184
+
1185
+ @description The caller should be the Partner as identified in the Alibaba Cloud distribution model. </br>
1186
+ *This content is only published on the international site. **\
1187
+
1188
+ @param request: EditNewBuyStatusRequest
1189
+ @return: EditNewBuyStatusResponse
1190
+ """
1191
+ runtime = util_models.RuntimeOptions()
1192
+ return self.edit_new_buy_status_with_options(request, runtime)
1193
+
1194
+ async def edit_new_buy_status_async(
1195
+ self,
1196
+ request: agency_20221216_models.EditNewBuyStatusRequest,
1197
+ ) -> agency_20221216_models.EditNewBuyStatusResponse:
1198
+ """
1199
+ @summary Set the New Buy status for Sub-Customer as a Partner.
1200
+
1201
+ @description The caller should be the Partner as identified in the Alibaba Cloud distribution model. </br>
1202
+ *This content is only published on the international site. **\
1203
+
1204
+ @param request: EditNewBuyStatusRequest
1205
+ @return: EditNewBuyStatusResponse
1206
+ """
1207
+ runtime = util_models.RuntimeOptions()
1208
+ return await self.edit_new_buy_status_with_options_async(request, runtime)
1209
+
1210
+ def edit_zero_credit_shutdown_with_options(
1211
+ self,
1212
+ request: agency_20221216_models.EditZeroCreditShutdownRequest,
1213
+ runtime: util_models.RuntimeOptions,
1214
+ ) -> agency_20221216_models.EditZeroCreditShutdownResponse:
1215
+ """
1216
+ @summary Modify the End User\\"s Shutdown Policy as a Reseller.
1217
+
1218
+ @description The caller should be the Partner as identified in the Alibaba Cloud distribution model. </br>
1219
+ *This content is only published on the international site. **\
1220
+
1221
+ @param request: EditZeroCreditShutdownRequest
1222
+ @param runtime: runtime options for this request RuntimeOptions
1223
+ @return: EditZeroCreditShutdownResponse
1224
+ """
1225
+ UtilClient.validate_model(request)
1226
+ query = {}
1227
+ if not UtilClient.is_unset(request.shutdown_policy):
1228
+ query['ShutdownPolicy'] = request.shutdown_policy
1229
+ if not UtilClient.is_unset(request.uid):
1230
+ query['Uid'] = request.uid
1231
+ req = open_api_models.OpenApiRequest(
1232
+ query=OpenApiUtilClient.query(query)
1233
+ )
1234
+ params = open_api_models.Params(
1235
+ action='EditZeroCreditShutdown',
1236
+ version='2022-12-16',
1237
+ protocol='HTTPS',
1238
+ pathname='/',
1239
+ method='POST',
1240
+ auth_type='AK',
1241
+ style='RPC',
1242
+ req_body_type='formData',
1243
+ body_type='json'
1244
+ )
1245
+ return TeaCore.from_map(
1246
+ agency_20221216_models.EditZeroCreditShutdownResponse(),
1247
+ self.call_api(params, req, runtime)
1248
+ )
1249
+
1250
+ async def edit_zero_credit_shutdown_with_options_async(
1251
+ self,
1252
+ request: agency_20221216_models.EditZeroCreditShutdownRequest,
1253
+ runtime: util_models.RuntimeOptions,
1254
+ ) -> agency_20221216_models.EditZeroCreditShutdownResponse:
1255
+ """
1256
+ @summary Modify the End User\\"s Shutdown Policy as a Reseller.
1257
+
1258
+ @description The caller should be the Partner as identified in the Alibaba Cloud distribution model. </br>
1259
+ *This content is only published on the international site. **\
1260
+
1261
+ @param request: EditZeroCreditShutdownRequest
1262
+ @param runtime: runtime options for this request RuntimeOptions
1263
+ @return: EditZeroCreditShutdownResponse
1264
+ """
1265
+ UtilClient.validate_model(request)
1266
+ query = {}
1267
+ if not UtilClient.is_unset(request.shutdown_policy):
1268
+ query['ShutdownPolicy'] = request.shutdown_policy
1269
+ if not UtilClient.is_unset(request.uid):
1270
+ query['Uid'] = request.uid
1271
+ req = open_api_models.OpenApiRequest(
1272
+ query=OpenApiUtilClient.query(query)
1273
+ )
1274
+ params = open_api_models.Params(
1275
+ action='EditZeroCreditShutdown',
1276
+ version='2022-12-16',
1277
+ protocol='HTTPS',
1278
+ pathname='/',
1279
+ method='POST',
1280
+ auth_type='AK',
1281
+ style='RPC',
1282
+ req_body_type='formData',
1283
+ body_type='json'
1284
+ )
1285
+ return TeaCore.from_map(
1286
+ agency_20221216_models.EditZeroCreditShutdownResponse(),
1287
+ await self.call_api_async(params, req, runtime)
1288
+ )
1289
+
1290
+ def edit_zero_credit_shutdown(
1291
+ self,
1292
+ request: agency_20221216_models.EditZeroCreditShutdownRequest,
1293
+ ) -> agency_20221216_models.EditZeroCreditShutdownResponse:
1294
+ """
1295
+ @summary Modify the End User\\"s Shutdown Policy as a Reseller.
1296
+
1297
+ @description The caller should be the Partner as identified in the Alibaba Cloud distribution model. </br>
1298
+ *This content is only published on the international site. **\
1299
+
1300
+ @param request: EditZeroCreditShutdownRequest
1301
+ @return: EditZeroCreditShutdownResponse
1302
+ """
1303
+ runtime = util_models.RuntimeOptions()
1304
+ return self.edit_zero_credit_shutdown_with_options(request, runtime)
1305
+
1306
+ async def edit_zero_credit_shutdown_async(
1307
+ self,
1308
+ request: agency_20221216_models.EditZeroCreditShutdownRequest,
1309
+ ) -> agency_20221216_models.EditZeroCreditShutdownResponse:
1310
+ """
1311
+ @summary Modify the End User\\"s Shutdown Policy as a Reseller.
1312
+
1313
+ @description The caller should be the Partner as identified in the Alibaba Cloud distribution model. </br>
1314
+ *This content is only published on the international site. **\
1315
+
1316
+ @param request: EditZeroCreditShutdownRequest
1317
+ @return: EditZeroCreditShutdownResponse
1318
+ """
1319
+ runtime = util_models.RuntimeOptions()
1320
+ return await self.edit_zero_credit_shutdown_with_options_async(request, runtime)
1321
+
1322
+ def export_customer_quota_record_with_options(
1323
+ self,
1324
+ request: agency_20221216_models.ExportCustomerQuotaRecordRequest,
1325
+ runtime: util_models.RuntimeOptions,
1326
+ ) -> agency_20221216_models.ExportCustomerQuotaRecordResponse:
1327
+ """
1328
+ @summary Export quota amount adjustment history as a Distribution Customer from International Site. Only available on International Site.
1329
+
1330
+ @description Caller must be a Partner from International Site, either Distribution or Reseller will do.
1331
+
1332
+ @param request: ExportCustomerQuotaRecordRequest
1333
+ @param runtime: runtime options for this request RuntimeOptions
1334
+ @return: ExportCustomerQuotaRecordResponse
1335
+ """
1336
+ UtilClient.validate_model(request)
1337
+ query = {}
1338
+ if not UtilClient.is_unset(request.end_date):
1339
+ query['EndDate'] = request.end_date
1340
+ if not UtilClient.is_unset(request.end_user_pk):
1341
+ query['EndUserPk'] = request.end_user_pk
1342
+ if not UtilClient.is_unset(request.language):
1343
+ query['Language'] = request.language
1344
+ if not UtilClient.is_unset(request.operation_type):
1345
+ query['OperationType'] = request.operation_type
1346
+ if not UtilClient.is_unset(request.start_date):
1347
+ query['StartDate'] = request.start_date
1348
+ req = open_api_models.OpenApiRequest(
1349
+ query=OpenApiUtilClient.query(query)
1350
+ )
1351
+ params = open_api_models.Params(
1352
+ action='ExportCustomerQuotaRecord',
1353
+ version='2022-12-16',
1354
+ protocol='HTTPS',
1355
+ pathname='/',
1356
+ method='POST',
1357
+ auth_type='AK',
1358
+ style='RPC',
1359
+ req_body_type='formData',
1360
+ body_type='json'
1361
+ )
1362
+ return TeaCore.from_map(
1363
+ agency_20221216_models.ExportCustomerQuotaRecordResponse(),
1364
+ self.call_api(params, req, runtime)
1365
+ )
1366
+
1367
+ async def export_customer_quota_record_with_options_async(
1368
+ self,
1369
+ request: agency_20221216_models.ExportCustomerQuotaRecordRequest,
1370
+ runtime: util_models.RuntimeOptions,
1371
+ ) -> agency_20221216_models.ExportCustomerQuotaRecordResponse:
1372
+ """
1373
+ @summary Export quota amount adjustment history as a Distribution Customer from International Site. Only available on International Site.
1374
+
1375
+ @description Caller must be a Partner from International Site, either Distribution or Reseller will do.
1376
+
1377
+ @param request: ExportCustomerQuotaRecordRequest
1378
+ @param runtime: runtime options for this request RuntimeOptions
1379
+ @return: ExportCustomerQuotaRecordResponse
1380
+ """
1381
+ UtilClient.validate_model(request)
1382
+ query = {}
1383
+ if not UtilClient.is_unset(request.end_date):
1384
+ query['EndDate'] = request.end_date
1385
+ if not UtilClient.is_unset(request.end_user_pk):
1386
+ query['EndUserPk'] = request.end_user_pk
1387
+ if not UtilClient.is_unset(request.language):
1388
+ query['Language'] = request.language
1389
+ if not UtilClient.is_unset(request.operation_type):
1390
+ query['OperationType'] = request.operation_type
1391
+ if not UtilClient.is_unset(request.start_date):
1392
+ query['StartDate'] = request.start_date
1393
+ req = open_api_models.OpenApiRequest(
1394
+ query=OpenApiUtilClient.query(query)
1395
+ )
1396
+ params = open_api_models.Params(
1397
+ action='ExportCustomerQuotaRecord',
1398
+ version='2022-12-16',
1399
+ protocol='HTTPS',
1400
+ pathname='/',
1401
+ method='POST',
1402
+ auth_type='AK',
1403
+ style='RPC',
1404
+ req_body_type='formData',
1405
+ body_type='json'
1406
+ )
1407
+ return TeaCore.from_map(
1408
+ agency_20221216_models.ExportCustomerQuotaRecordResponse(),
1409
+ await self.call_api_async(params, req, runtime)
1410
+ )
1411
+
1412
+ def export_customer_quota_record(
1413
+ self,
1414
+ request: agency_20221216_models.ExportCustomerQuotaRecordRequest,
1415
+ ) -> agency_20221216_models.ExportCustomerQuotaRecordResponse:
1416
+ """
1417
+ @summary Export quota amount adjustment history as a Distribution Customer from International Site. Only available on International Site.
1418
+
1419
+ @description Caller must be a Partner from International Site, either Distribution or Reseller will do.
1420
+
1421
+ @param request: ExportCustomerQuotaRecordRequest
1422
+ @return: ExportCustomerQuotaRecordResponse
1423
+ """
1424
+ runtime = util_models.RuntimeOptions()
1425
+ return self.export_customer_quota_record_with_options(request, runtime)
1426
+
1427
+ async def export_customer_quota_record_async(
1428
+ self,
1429
+ request: agency_20221216_models.ExportCustomerQuotaRecordRequest,
1430
+ ) -> agency_20221216_models.ExportCustomerQuotaRecordResponse:
1431
+ """
1432
+ @summary Export quota amount adjustment history as a Distribution Customer from International Site. Only available on International Site.
1433
+
1434
+ @description Caller must be a Partner from International Site, either Distribution or Reseller will do.
1435
+
1436
+ @param request: ExportCustomerQuotaRecordRequest
1437
+ @return: ExportCustomerQuotaRecordResponse
1438
+ """
1439
+ runtime = util_models.RuntimeOptions()
1440
+ return await self.export_customer_quota_record_with_options_async(request, runtime)
1441
+
1442
+ def export_reversed_deduction_history_with_options(
1443
+ self,
1444
+ request: agency_20221216_models.ExportReversedDeductionHistoryRequest,
1445
+ runtime: util_models.RuntimeOptions,
1446
+ ) -> agency_20221216_models.ExportReversedDeductionHistoryResponse:
1447
+ """
1448
+ @summary 额度冲减明细列表导出接口
1449
+
1450
+ @param request: ExportReversedDeductionHistoryRequest
1451
+ @param runtime: runtime options for this request RuntimeOptions
1452
+ @return: ExportReversedDeductionHistoryResponse
1453
+ """
1454
+ UtilClient.validate_model(request)
1455
+ query = {}
1456
+ if not UtilClient.is_unset(request.end_date):
1457
+ query['EndDate'] = request.end_date
1458
+ if not UtilClient.is_unset(request.export_uid):
1459
+ query['ExportUid'] = request.export_uid
1460
+ if not UtilClient.is_unset(request.language):
1461
+ query['Language'] = request.language
1462
+ if not UtilClient.is_unset(request.start_date):
1463
+ query['StartDate'] = request.start_date
1464
+ req = open_api_models.OpenApiRequest(
1465
+ query=OpenApiUtilClient.query(query)
1466
+ )
1467
+ params = open_api_models.Params(
1468
+ action='ExportReversedDeductionHistory',
1469
+ version='2022-12-16',
1470
+ protocol='HTTPS',
1471
+ pathname='/',
1472
+ method='POST',
1473
+ auth_type='AK',
1474
+ style='RPC',
1475
+ req_body_type='formData',
1476
+ body_type='json'
1477
+ )
1478
+ return TeaCore.from_map(
1479
+ agency_20221216_models.ExportReversedDeductionHistoryResponse(),
1480
+ self.call_api(params, req, runtime)
1481
+ )
1482
+
1483
+ async def export_reversed_deduction_history_with_options_async(
1484
+ self,
1485
+ request: agency_20221216_models.ExportReversedDeductionHistoryRequest,
1486
+ runtime: util_models.RuntimeOptions,
1487
+ ) -> agency_20221216_models.ExportReversedDeductionHistoryResponse:
1488
+ """
1489
+ @summary 额度冲减明细列表导出接口
1490
+
1491
+ @param request: ExportReversedDeductionHistoryRequest
1492
+ @param runtime: runtime options for this request RuntimeOptions
1493
+ @return: ExportReversedDeductionHistoryResponse
1494
+ """
1495
+ UtilClient.validate_model(request)
1496
+ query = {}
1497
+ if not UtilClient.is_unset(request.end_date):
1498
+ query['EndDate'] = request.end_date
1499
+ if not UtilClient.is_unset(request.export_uid):
1500
+ query['ExportUid'] = request.export_uid
1501
+ if not UtilClient.is_unset(request.language):
1502
+ query['Language'] = request.language
1503
+ if not UtilClient.is_unset(request.start_date):
1504
+ query['StartDate'] = request.start_date
1505
+ req = open_api_models.OpenApiRequest(
1506
+ query=OpenApiUtilClient.query(query)
1507
+ )
1508
+ params = open_api_models.Params(
1509
+ action='ExportReversedDeductionHistory',
1510
+ version='2022-12-16',
1511
+ protocol='HTTPS',
1512
+ pathname='/',
1513
+ method='POST',
1514
+ auth_type='AK',
1515
+ style='RPC',
1516
+ req_body_type='formData',
1517
+ body_type='json'
1518
+ )
1519
+ return TeaCore.from_map(
1520
+ agency_20221216_models.ExportReversedDeductionHistoryResponse(),
1521
+ await self.call_api_async(params, req, runtime)
1522
+ )
1523
+
1524
+ def export_reversed_deduction_history(
1525
+ self,
1526
+ request: agency_20221216_models.ExportReversedDeductionHistoryRequest,
1527
+ ) -> agency_20221216_models.ExportReversedDeductionHistoryResponse:
1528
+ """
1529
+ @summary 额度冲减明细列表导出接口
1530
+
1531
+ @param request: ExportReversedDeductionHistoryRequest
1532
+ @return: ExportReversedDeductionHistoryResponse
1533
+ """
1534
+ runtime = util_models.RuntimeOptions()
1535
+ return self.export_reversed_deduction_history_with_options(request, runtime)
1536
+
1537
+ async def export_reversed_deduction_history_async(
1538
+ self,
1539
+ request: agency_20221216_models.ExportReversedDeductionHistoryRequest,
1540
+ ) -> agency_20221216_models.ExportReversedDeductionHistoryResponse:
1541
+ """
1542
+ @summary 额度冲减明细列表导出接口
1543
+
1544
+ @param request: ExportReversedDeductionHistoryRequest
1545
+ @return: ExportReversedDeductionHistoryResponse
1546
+ """
1547
+ runtime = util_models.RuntimeOptions()
1548
+ return await self.export_reversed_deduction_history_with_options_async(request, runtime)
1549
+
1550
+ def get_account_info_with_options(
1551
+ self,
1552
+ request: agency_20221216_models.GetAccountInfoRequest,
1553
+ runtime: util_models.RuntimeOptions,
1554
+ ) -> agency_20221216_models.GetAccountInfoResponse:
1555
+ """
1556
+ @summary Return Distribution Customer\\"s account information.
1557
+
1558
+ @param request: GetAccountInfoRequest
1559
+ @param runtime: runtime options for this request RuntimeOptions
1560
+ @return: GetAccountInfoResponse
1561
+ """
1562
+ UtilClient.validate_model(request)
1563
+ query = OpenApiUtilClient.query(UtilClient.to_map(request))
1564
+ req = open_api_models.OpenApiRequest(
1565
+ query=OpenApiUtilClient.query(query)
1566
+ )
1567
+ params = open_api_models.Params(
1568
+ action='GetAccountInfo',
1569
+ version='2022-12-16',
1570
+ protocol='HTTPS',
1571
+ pathname='/',
1572
+ method='GET',
1573
+ auth_type='AK',
1574
+ style='RPC',
1575
+ req_body_type='formData',
1576
+ body_type='json'
1577
+ )
1578
+ return TeaCore.from_map(
1579
+ agency_20221216_models.GetAccountInfoResponse(),
1580
+ self.call_api(params, req, runtime)
1581
+ )
1582
+
1583
+ async def get_account_info_with_options_async(
1584
+ self,
1585
+ request: agency_20221216_models.GetAccountInfoRequest,
1586
+ runtime: util_models.RuntimeOptions,
1587
+ ) -> agency_20221216_models.GetAccountInfoResponse:
1588
+ """
1589
+ @summary Return Distribution Customer\\"s account information.
1590
+
1591
+ @param request: GetAccountInfoRequest
1592
+ @param runtime: runtime options for this request RuntimeOptions
1593
+ @return: GetAccountInfoResponse
1594
+ """
1595
+ UtilClient.validate_model(request)
1596
+ query = OpenApiUtilClient.query(UtilClient.to_map(request))
1597
+ req = open_api_models.OpenApiRequest(
1598
+ query=OpenApiUtilClient.query(query)
1599
+ )
1600
+ params = open_api_models.Params(
1601
+ action='GetAccountInfo',
1602
+ version='2022-12-16',
1603
+ protocol='HTTPS',
1604
+ pathname='/',
1605
+ method='GET',
1606
+ auth_type='AK',
1607
+ style='RPC',
1608
+ req_body_type='formData',
1609
+ body_type='json'
1610
+ )
1611
+ return TeaCore.from_map(
1612
+ agency_20221216_models.GetAccountInfoResponse(),
1613
+ await self.call_api_async(params, req, runtime)
1614
+ )
1615
+
1616
+ def get_account_info(
1617
+ self,
1618
+ request: agency_20221216_models.GetAccountInfoRequest,
1619
+ ) -> agency_20221216_models.GetAccountInfoResponse:
1620
+ """
1621
+ @summary Return Distribution Customer\\"s account information.
1622
+
1623
+ @param request: GetAccountInfoRequest
1624
+ @return: GetAccountInfoResponse
1625
+ """
1626
+ runtime = util_models.RuntimeOptions()
1627
+ return self.get_account_info_with_options(request, runtime)
1628
+
1629
+ async def get_account_info_async(
1630
+ self,
1631
+ request: agency_20221216_models.GetAccountInfoRequest,
1632
+ ) -> agency_20221216_models.GetAccountInfoResponse:
1633
+ """
1634
+ @summary Return Distribution Customer\\"s account information.
1635
+
1636
+ @param request: GetAccountInfoRequest
1637
+ @return: GetAccountInfoResponse
1638
+ """
1639
+ runtime = util_models.RuntimeOptions()
1640
+ return await self.get_account_info_with_options_async(request, runtime)
1641
+
1642
+ def get_commissionable_products_with_options(
1643
+ self,
1644
+ tmp_req: agency_20221216_models.GetCommissionableProductsRequest,
1645
+ runtime: util_models.RuntimeOptions,
1646
+ ) -> agency_20221216_models.GetCommissionableProductsResponse:
1647
+ """
1648
+ @summary 提供返佣商品API
1649
+
1650
+ @param tmp_req: GetCommissionableProductsRequest
1651
+ @param runtime: runtime options for this request RuntimeOptions
1652
+ @return: GetCommissionableProductsResponse
1653
+ """
1654
+ UtilClient.validate_model(tmp_req)
1655
+ request = agency_20221216_models.GetCommissionableProductsShrinkRequest()
1656
+ OpenApiUtilClient.convert(tmp_req, request)
1657
+ if not UtilClient.is_unset(tmp_req.list_show_status_list):
1658
+ request.list_show_status_list_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.list_show_status_list, 'ListShowStatusList', 'simple')
1659
+ query = {}
1660
+ if not UtilClient.is_unset(request.commodity_code_list):
1661
+ query['CommodityCodeList'] = request.commodity_code_list
1662
+ if not UtilClient.is_unset(request.fiscal_year):
1663
+ query['FiscalYear'] = request.fiscal_year
1664
+ if not UtilClient.is_unset(request.list_show_status_list_shrink):
1665
+ query['ListShowStatusList'] = request.list_show_status_list_shrink
1666
+ if not UtilClient.is_unset(request.page_no):
1667
+ query['PageNo'] = request.page_no
1668
+ if not UtilClient.is_unset(request.page_size):
1669
+ query['PageSize'] = request.page_size
1670
+ if not UtilClient.is_unset(request.pip_code_list):
1671
+ query['PipCodeList'] = request.pip_code_list
1672
+ if not UtilClient.is_unset(request.real_end_month):
1673
+ query['RealEndMonth'] = request.real_end_month
1674
+ if not UtilClient.is_unset(request.real_start_month):
1675
+ query['RealStartMonth'] = request.real_start_month
1676
+ req = open_api_models.OpenApiRequest(
1677
+ query=OpenApiUtilClient.query(query)
1678
+ )
1679
+ params = open_api_models.Params(
1680
+ action='GetCommissionableProducts',
1681
+ version='2022-12-16',
1682
+ protocol='HTTPS',
1683
+ pathname='/',
1684
+ method='POST',
1685
+ auth_type='AK',
1686
+ style='RPC',
1687
+ req_body_type='formData',
1688
+ body_type='json'
1689
+ )
1690
+ return TeaCore.from_map(
1691
+ agency_20221216_models.GetCommissionableProductsResponse(),
1692
+ self.call_api(params, req, runtime)
1693
+ )
1694
+
1695
+ async def get_commissionable_products_with_options_async(
1696
+ self,
1697
+ tmp_req: agency_20221216_models.GetCommissionableProductsRequest,
1698
+ runtime: util_models.RuntimeOptions,
1699
+ ) -> agency_20221216_models.GetCommissionableProductsResponse:
1700
+ """
1701
+ @summary 提供返佣商品API
1702
+
1703
+ @param tmp_req: GetCommissionableProductsRequest
1704
+ @param runtime: runtime options for this request RuntimeOptions
1705
+ @return: GetCommissionableProductsResponse
1706
+ """
1707
+ UtilClient.validate_model(tmp_req)
1708
+ request = agency_20221216_models.GetCommissionableProductsShrinkRequest()
1709
+ OpenApiUtilClient.convert(tmp_req, request)
1710
+ if not UtilClient.is_unset(tmp_req.list_show_status_list):
1711
+ request.list_show_status_list_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.list_show_status_list, 'ListShowStatusList', 'simple')
1712
+ query = {}
1713
+ if not UtilClient.is_unset(request.commodity_code_list):
1714
+ query['CommodityCodeList'] = request.commodity_code_list
1715
+ if not UtilClient.is_unset(request.fiscal_year):
1716
+ query['FiscalYear'] = request.fiscal_year
1717
+ if not UtilClient.is_unset(request.list_show_status_list_shrink):
1718
+ query['ListShowStatusList'] = request.list_show_status_list_shrink
1719
+ if not UtilClient.is_unset(request.page_no):
1720
+ query['PageNo'] = request.page_no
1721
+ if not UtilClient.is_unset(request.page_size):
1722
+ query['PageSize'] = request.page_size
1723
+ if not UtilClient.is_unset(request.pip_code_list):
1724
+ query['PipCodeList'] = request.pip_code_list
1725
+ if not UtilClient.is_unset(request.real_end_month):
1726
+ query['RealEndMonth'] = request.real_end_month
1727
+ if not UtilClient.is_unset(request.real_start_month):
1728
+ query['RealStartMonth'] = request.real_start_month
1729
+ req = open_api_models.OpenApiRequest(
1730
+ query=OpenApiUtilClient.query(query)
1731
+ )
1732
+ params = open_api_models.Params(
1733
+ action='GetCommissionableProducts',
1734
+ version='2022-12-16',
1735
+ protocol='HTTPS',
1736
+ pathname='/',
1737
+ method='POST',
1738
+ auth_type='AK',
1739
+ style='RPC',
1740
+ req_body_type='formData',
1741
+ body_type='json'
1742
+ )
1743
+ return TeaCore.from_map(
1744
+ agency_20221216_models.GetCommissionableProductsResponse(),
1745
+ await self.call_api_async(params, req, runtime)
1746
+ )
1747
+
1748
+ def get_commissionable_products(
1749
+ self,
1750
+ request: agency_20221216_models.GetCommissionableProductsRequest,
1751
+ ) -> agency_20221216_models.GetCommissionableProductsResponse:
1752
+ """
1753
+ @summary 提供返佣商品API
1754
+
1755
+ @param request: GetCommissionableProductsRequest
1756
+ @return: GetCommissionableProductsResponse
1757
+ """
1758
+ runtime = util_models.RuntimeOptions()
1759
+ return self.get_commissionable_products_with_options(request, runtime)
1760
+
1761
+ async def get_commissionable_products_async(
1762
+ self,
1763
+ request: agency_20221216_models.GetCommissionableProductsRequest,
1764
+ ) -> agency_20221216_models.GetCommissionableProductsResponse:
1765
+ """
1766
+ @summary 提供返佣商品API
1767
+
1768
+ @param request: GetCommissionableProductsRequest
1769
+ @return: GetCommissionableProductsResponse
1770
+ """
1771
+ runtime = util_models.RuntimeOptions()
1772
+ return await self.get_commissionable_products_with_options_async(request, runtime)
1773
+
1774
+ def get_coupon_template_detail_with_options(
1775
+ self,
1776
+ request: agency_20221216_models.GetCouponTemplateDetailRequest,
1777
+ runtime: util_models.RuntimeOptions,
1778
+ ) -> agency_20221216_models.GetCouponTemplateDetailResponse:
1779
+ """
1780
+ @summary 查询优惠券模板详情
1781
+
1782
+ @param request: GetCouponTemplateDetailRequest
1783
+ @param runtime: runtime options for this request RuntimeOptions
1784
+ @return: GetCouponTemplateDetailResponse
1785
+ """
1786
+ UtilClient.validate_model(request)
1787
+ query = {}
1788
+ if not UtilClient.is_unset(request.template_id):
1789
+ query['TemplateId'] = request.template_id
1790
+ req = open_api_models.OpenApiRequest(
1791
+ query=OpenApiUtilClient.query(query)
1792
+ )
1793
+ params = open_api_models.Params(
1794
+ action='GetCouponTemplateDetail',
1795
+ version='2022-12-16',
1796
+ protocol='HTTPS',
1797
+ pathname='/',
1798
+ method='POST',
1799
+ auth_type='AK',
1800
+ style='RPC',
1801
+ req_body_type='formData',
1802
+ body_type='json'
1803
+ )
1804
+ return TeaCore.from_map(
1805
+ agency_20221216_models.GetCouponTemplateDetailResponse(),
1806
+ self.call_api(params, req, runtime)
1807
+ )
1808
+
1809
+ async def get_coupon_template_detail_with_options_async(
1810
+ self,
1811
+ request: agency_20221216_models.GetCouponTemplateDetailRequest,
1812
+ runtime: util_models.RuntimeOptions,
1813
+ ) -> agency_20221216_models.GetCouponTemplateDetailResponse:
1814
+ """
1815
+ @summary 查询优惠券模板详情
1816
+
1817
+ @param request: GetCouponTemplateDetailRequest
1818
+ @param runtime: runtime options for this request RuntimeOptions
1819
+ @return: GetCouponTemplateDetailResponse
1820
+ """
1821
+ UtilClient.validate_model(request)
1822
+ query = {}
1823
+ if not UtilClient.is_unset(request.template_id):
1824
+ query['TemplateId'] = request.template_id
1825
+ req = open_api_models.OpenApiRequest(
1826
+ query=OpenApiUtilClient.query(query)
1827
+ )
1828
+ params = open_api_models.Params(
1829
+ action='GetCouponTemplateDetail',
1830
+ version='2022-12-16',
1831
+ protocol='HTTPS',
1832
+ pathname='/',
1833
+ method='POST',
1834
+ auth_type='AK',
1835
+ style='RPC',
1836
+ req_body_type='formData',
1837
+ body_type='json'
1838
+ )
1839
+ return TeaCore.from_map(
1840
+ agency_20221216_models.GetCouponTemplateDetailResponse(),
1841
+ await self.call_api_async(params, req, runtime)
1842
+ )
1843
+
1844
+ def get_coupon_template_detail(
1845
+ self,
1846
+ request: agency_20221216_models.GetCouponTemplateDetailRequest,
1847
+ ) -> agency_20221216_models.GetCouponTemplateDetailResponse:
1848
+ """
1849
+ @summary 查询优惠券模板详情
1850
+
1851
+ @param request: GetCouponTemplateDetailRequest
1852
+ @return: GetCouponTemplateDetailResponse
1853
+ """
1854
+ runtime = util_models.RuntimeOptions()
1855
+ return self.get_coupon_template_detail_with_options(request, runtime)
1856
+
1857
+ async def get_coupon_template_detail_async(
1858
+ self,
1859
+ request: agency_20221216_models.GetCouponTemplateDetailRequest,
1860
+ ) -> agency_20221216_models.GetCouponTemplateDetailResponse:
1861
+ """
1862
+ @summary 查询优惠券模板详情
1863
+
1864
+ @param request: GetCouponTemplateDetailRequest
1865
+ @return: GetCouponTemplateDetailResponse
1866
+ """
1867
+ runtime = util_models.RuntimeOptions()
1868
+ return await self.get_coupon_template_detail_with_options_async(request, runtime)
1869
+
1870
+ def get_coupondeduct_product_code_with_options(
1871
+ self,
1872
+ request: agency_20221216_models.GetCoupondeductProductCodeRequest,
1873
+ runtime: util_models.RuntimeOptions,
1874
+ ) -> agency_20221216_models.GetCoupondeductProductCodeResponse:
1875
+ """
1876
+ @summary 国际渠道分销优惠券可抵扣产品
1877
+
1878
+ @param request: GetCoupondeductProductCodeRequest
1879
+ @param runtime: runtime options for this request RuntimeOptions
1880
+ @return: GetCoupondeductProductCodeResponse
1881
+ """
1882
+ UtilClient.validate_model(request)
1883
+ query = OpenApiUtilClient.query(UtilClient.to_map(request))
1884
+ req = open_api_models.OpenApiRequest(
1885
+ query=OpenApiUtilClient.query(query)
1886
+ )
1887
+ params = open_api_models.Params(
1888
+ action='GetCoupondeductProductCode',
1889
+ version='2022-12-16',
1890
+ protocol='HTTPS',
1891
+ pathname='/',
1892
+ method='GET',
1893
+ auth_type='AK',
1894
+ style='RPC',
1895
+ req_body_type='formData',
1896
+ body_type='json'
1897
+ )
1898
+ return TeaCore.from_map(
1899
+ agency_20221216_models.GetCoupondeductProductCodeResponse(),
1900
+ self.call_api(params, req, runtime)
1901
+ )
1902
+
1903
+ async def get_coupondeduct_product_code_with_options_async(
1904
+ self,
1905
+ request: agency_20221216_models.GetCoupondeductProductCodeRequest,
1906
+ runtime: util_models.RuntimeOptions,
1907
+ ) -> agency_20221216_models.GetCoupondeductProductCodeResponse:
1908
+ """
1909
+ @summary 国际渠道分销优惠券可抵扣产品
1910
+
1911
+ @param request: GetCoupondeductProductCodeRequest
1912
+ @param runtime: runtime options for this request RuntimeOptions
1913
+ @return: GetCoupondeductProductCodeResponse
1914
+ """
1915
+ UtilClient.validate_model(request)
1916
+ query = OpenApiUtilClient.query(UtilClient.to_map(request))
1917
+ req = open_api_models.OpenApiRequest(
1918
+ query=OpenApiUtilClient.query(query)
1919
+ )
1920
+ params = open_api_models.Params(
1921
+ action='GetCoupondeductProductCode',
1922
+ version='2022-12-16',
1923
+ protocol='HTTPS',
1924
+ pathname='/',
1925
+ method='GET',
1926
+ auth_type='AK',
1927
+ style='RPC',
1928
+ req_body_type='formData',
1929
+ body_type='json'
1930
+ )
1931
+ return TeaCore.from_map(
1932
+ agency_20221216_models.GetCoupondeductProductCodeResponse(),
1933
+ await self.call_api_async(params, req, runtime)
1934
+ )
1935
+
1936
+ def get_coupondeduct_product_code(
1937
+ self,
1938
+ request: agency_20221216_models.GetCoupondeductProductCodeRequest,
1939
+ ) -> agency_20221216_models.GetCoupondeductProductCodeResponse:
1940
+ """
1941
+ @summary 国际渠道分销优惠券可抵扣产品
1942
+
1943
+ @param request: GetCoupondeductProductCodeRequest
1944
+ @return: GetCoupondeductProductCodeResponse
1945
+ """
1946
+ runtime = util_models.RuntimeOptions()
1947
+ return self.get_coupondeduct_product_code_with_options(request, runtime)
1948
+
1949
+ async def get_coupondeduct_product_code_async(
1950
+ self,
1951
+ request: agency_20221216_models.GetCoupondeductProductCodeRequest,
1952
+ ) -> agency_20221216_models.GetCoupondeductProductCodeResponse:
1953
+ """
1954
+ @summary 国际渠道分销优惠券可抵扣产品
1955
+
1956
+ @param request: GetCoupondeductProductCodeRequest
1957
+ @return: GetCoupondeductProductCodeResponse
1958
+ """
1959
+ runtime = util_models.RuntimeOptions()
1960
+ return await self.get_coupondeduct_product_code_with_options_async(request, runtime)
1961
+
1962
+ def get_credit_info_with_options(
1963
+ self,
1964
+ request: agency_20221216_models.GetCreditInfoRequest,
1965
+ runtime: util_models.RuntimeOptions,
1966
+ ) -> agency_20221216_models.GetCreditInfoResponse:
1967
+ """
1968
+ @summary Query Credit Control information of Distribution Customers. The PopCreditInfoJson in the Return Parameter will be empty if the Distribution Customer is an Agency. This function is only available for Resellers and Distributors.
1969
+
1970
+ @param request: GetCreditInfoRequest
1971
+ @param runtime: runtime options for this request RuntimeOptions
1972
+ @return: GetCreditInfoResponse
1973
+ """
1974
+ UtilClient.validate_model(request)
1975
+ query = OpenApiUtilClient.query(UtilClient.to_map(request))
1976
+ req = open_api_models.OpenApiRequest(
1977
+ query=OpenApiUtilClient.query(query)
1978
+ )
1979
+ params = open_api_models.Params(
1980
+ action='GetCreditInfo',
1981
+ version='2022-12-16',
1982
+ protocol='HTTPS',
1983
+ pathname='/',
1984
+ method='GET',
1985
+ auth_type='AK',
1986
+ style='RPC',
1987
+ req_body_type='formData',
1988
+ body_type='json'
1989
+ )
1990
+ return TeaCore.from_map(
1991
+ agency_20221216_models.GetCreditInfoResponse(),
1992
+ self.call_api(params, req, runtime)
1993
+ )
1994
+
1995
+ async def get_credit_info_with_options_async(
1996
+ self,
1997
+ request: agency_20221216_models.GetCreditInfoRequest,
1998
+ runtime: util_models.RuntimeOptions,
1999
+ ) -> agency_20221216_models.GetCreditInfoResponse:
2000
+ """
2001
+ @summary Query Credit Control information of Distribution Customers. The PopCreditInfoJson in the Return Parameter will be empty if the Distribution Customer is an Agency. This function is only available for Resellers and Distributors.
2002
+
2003
+ @param request: GetCreditInfoRequest
2004
+ @param runtime: runtime options for this request RuntimeOptions
2005
+ @return: GetCreditInfoResponse
2006
+ """
2007
+ UtilClient.validate_model(request)
2008
+ query = OpenApiUtilClient.query(UtilClient.to_map(request))
2009
+ req = open_api_models.OpenApiRequest(
2010
+ query=OpenApiUtilClient.query(query)
2011
+ )
2012
+ params = open_api_models.Params(
2013
+ action='GetCreditInfo',
2014
+ version='2022-12-16',
2015
+ protocol='HTTPS',
2016
+ pathname='/',
2017
+ method='GET',
2018
+ auth_type='AK',
2019
+ style='RPC',
2020
+ req_body_type='formData',
2021
+ body_type='json'
2022
+ )
2023
+ return TeaCore.from_map(
2024
+ agency_20221216_models.GetCreditInfoResponse(),
2025
+ await self.call_api_async(params, req, runtime)
2026
+ )
2027
+
2028
+ def get_credit_info(
2029
+ self,
2030
+ request: agency_20221216_models.GetCreditInfoRequest,
2031
+ ) -> agency_20221216_models.GetCreditInfoResponse:
2032
+ """
2033
+ @summary Query Credit Control information of Distribution Customers. The PopCreditInfoJson in the Return Parameter will be empty if the Distribution Customer is an Agency. This function is only available for Resellers and Distributors.
2034
+
2035
+ @param request: GetCreditInfoRequest
2036
+ @return: GetCreditInfoResponse
2037
+ """
2038
+ runtime = util_models.RuntimeOptions()
2039
+ return self.get_credit_info_with_options(request, runtime)
2040
+
2041
+ async def get_credit_info_async(
2042
+ self,
2043
+ request: agency_20221216_models.GetCreditInfoRequest,
2044
+ ) -> agency_20221216_models.GetCreditInfoResponse:
2045
+ """
2046
+ @summary Query Credit Control information of Distribution Customers. The PopCreditInfoJson in the Return Parameter will be empty if the Distribution Customer is an Agency. This function is only available for Resellers and Distributors.
2047
+
2048
+ @param request: GetCreditInfoRequest
2049
+ @return: GetCreditInfoResponse
2050
+ """
2051
+ runtime = util_models.RuntimeOptions()
2052
+ return await self.get_credit_info_with_options_async(request, runtime)
2053
+
2054
+ def get_customer_orders_with_options(
2055
+ self,
2056
+ request: agency_20221216_models.GetCustomerOrdersRequest,
2057
+ runtime: util_models.RuntimeOptions,
2058
+ ) -> agency_20221216_models.GetCustomerOrdersResponse:
2059
+ """
2060
+ @summary 客户订单查询
2061
+
2062
+ @param request: GetCustomerOrdersRequest
2063
+ @param runtime: runtime options for this request RuntimeOptions
2064
+ @return: GetCustomerOrdersResponse
2065
+ """
2066
+ UtilClient.validate_model(request)
2067
+ query = OpenApiUtilClient.query(UtilClient.to_map(request))
2068
+ req = open_api_models.OpenApiRequest(
2069
+ query=OpenApiUtilClient.query(query)
2070
+ )
2071
+ params = open_api_models.Params(
2072
+ action='GetCustomerOrders',
2073
+ version='2022-12-16',
2074
+ protocol='HTTPS',
2075
+ pathname='/',
2076
+ method='GET',
2077
+ auth_type='AK',
2078
+ style='RPC',
2079
+ req_body_type='formData',
2080
+ body_type='json'
2081
+ )
2082
+ return TeaCore.from_map(
2083
+ agency_20221216_models.GetCustomerOrdersResponse(),
2084
+ self.call_api(params, req, runtime)
2085
+ )
2086
+
2087
+ async def get_customer_orders_with_options_async(
2088
+ self,
2089
+ request: agency_20221216_models.GetCustomerOrdersRequest,
2090
+ runtime: util_models.RuntimeOptions,
2091
+ ) -> agency_20221216_models.GetCustomerOrdersResponse:
2092
+ """
2093
+ @summary 客户订单查询
2094
+
2095
+ @param request: GetCustomerOrdersRequest
2096
+ @param runtime: runtime options for this request RuntimeOptions
2097
+ @return: GetCustomerOrdersResponse
2098
+ """
2099
+ UtilClient.validate_model(request)
2100
+ query = OpenApiUtilClient.query(UtilClient.to_map(request))
2101
+ req = open_api_models.OpenApiRequest(
2102
+ query=OpenApiUtilClient.query(query)
2103
+ )
2104
+ params = open_api_models.Params(
2105
+ action='GetCustomerOrders',
2106
+ version='2022-12-16',
2107
+ protocol='HTTPS',
2108
+ pathname='/',
2109
+ method='GET',
2110
+ auth_type='AK',
2111
+ style='RPC',
2112
+ req_body_type='formData',
2113
+ body_type='json'
2114
+ )
2115
+ return TeaCore.from_map(
2116
+ agency_20221216_models.GetCustomerOrdersResponse(),
2117
+ await self.call_api_async(params, req, runtime)
2118
+ )
2119
+
2120
+ def get_customer_orders(
2121
+ self,
2122
+ request: agency_20221216_models.GetCustomerOrdersRequest,
2123
+ ) -> agency_20221216_models.GetCustomerOrdersResponse:
2124
+ """
2125
+ @summary 客户订单查询
2126
+
2127
+ @param request: GetCustomerOrdersRequest
2128
+ @return: GetCustomerOrdersResponse
2129
+ """
2130
+ runtime = util_models.RuntimeOptions()
2131
+ return self.get_customer_orders_with_options(request, runtime)
2132
+
2133
+ async def get_customer_orders_async(
2134
+ self,
2135
+ request: agency_20221216_models.GetCustomerOrdersRequest,
2136
+ ) -> agency_20221216_models.GetCustomerOrdersResponse:
2137
+ """
2138
+ @summary 客户订单查询
2139
+
2140
+ @param request: GetCustomerOrdersRequest
2141
+ @return: GetCustomerOrdersResponse
2142
+ """
2143
+ runtime = util_models.RuntimeOptions()
2144
+ return await self.get_customer_orders_with_options_async(request, runtime)
2145
+
2146
+ def get_daily_bill_with_options(
2147
+ self,
2148
+ request: agency_20221216_models.GetDailyBillRequest,
2149
+ runtime: util_models.RuntimeOptions,
2150
+ ) -> agency_20221216_models.GetDailyBillResponse:
2151
+ """
2152
+ @summary Issue Distributor\\"s daily Bill. This function is only available for Resellers and Distributors.
2153
+
2154
+ @param request: GetDailyBillRequest
2155
+ @param runtime: runtime options for this request RuntimeOptions
2156
+ @return: GetDailyBillResponse
2157
+ """
2158
+ UtilClient.validate_model(request)
2159
+ query = {}
2160
+ if not UtilClient.is_unset(request.bill_owner):
2161
+ query['BillOwner'] = request.bill_owner
2162
+ if not UtilClient.is_unset(request.bill_type):
2163
+ query['BillType'] = request.bill_type
2164
+ if not UtilClient.is_unset(request.date):
2165
+ query['Date'] = request.date
2166
+ req = open_api_models.OpenApiRequest(
2167
+ query=OpenApiUtilClient.query(query)
2168
+ )
2169
+ params = open_api_models.Params(
2170
+ action='GetDailyBill',
2171
+ version='2022-12-16',
2172
+ protocol='HTTPS',
2173
+ pathname='/',
2174
+ method='POST',
2175
+ auth_type='AK',
2176
+ style='RPC',
2177
+ req_body_type='formData',
2178
+ body_type='json'
2179
+ )
2180
+ return TeaCore.from_map(
2181
+ agency_20221216_models.GetDailyBillResponse(),
2182
+ self.call_api(params, req, runtime)
2183
+ )
2184
+
2185
+ async def get_daily_bill_with_options_async(
2186
+ self,
2187
+ request: agency_20221216_models.GetDailyBillRequest,
2188
+ runtime: util_models.RuntimeOptions,
2189
+ ) -> agency_20221216_models.GetDailyBillResponse:
2190
+ """
2191
+ @summary Issue Distributor\\"s daily Bill. This function is only available for Resellers and Distributors.
2192
+
2193
+ @param request: GetDailyBillRequest
2194
+ @param runtime: runtime options for this request RuntimeOptions
2195
+ @return: GetDailyBillResponse
2196
+ """
2197
+ UtilClient.validate_model(request)
2198
+ query = {}
2199
+ if not UtilClient.is_unset(request.bill_owner):
2200
+ query['BillOwner'] = request.bill_owner
2201
+ if not UtilClient.is_unset(request.bill_type):
2202
+ query['BillType'] = request.bill_type
2203
+ if not UtilClient.is_unset(request.date):
2204
+ query['Date'] = request.date
2205
+ req = open_api_models.OpenApiRequest(
2206
+ query=OpenApiUtilClient.query(query)
2207
+ )
2208
+ params = open_api_models.Params(
2209
+ action='GetDailyBill',
2210
+ version='2022-12-16',
2211
+ protocol='HTTPS',
2212
+ pathname='/',
2213
+ method='POST',
2214
+ auth_type='AK',
2215
+ style='RPC',
2216
+ req_body_type='formData',
2217
+ body_type='json'
2218
+ )
2219
+ return TeaCore.from_map(
2220
+ agency_20221216_models.GetDailyBillResponse(),
2221
+ await self.call_api_async(params, req, runtime)
2222
+ )
2223
+
2224
+ def get_daily_bill(
2225
+ self,
2226
+ request: agency_20221216_models.GetDailyBillRequest,
2227
+ ) -> agency_20221216_models.GetDailyBillResponse:
2228
+ """
2229
+ @summary Issue Distributor\\"s daily Bill. This function is only available for Resellers and Distributors.
2230
+
2231
+ @param request: GetDailyBillRequest
2232
+ @return: GetDailyBillResponse
2233
+ """
2234
+ runtime = util_models.RuntimeOptions()
2235
+ return self.get_daily_bill_with_options(request, runtime)
2236
+
2237
+ async def get_daily_bill_async(
2238
+ self,
2239
+ request: agency_20221216_models.GetDailyBillRequest,
2240
+ ) -> agency_20221216_models.GetDailyBillResponse:
2241
+ """
2242
+ @summary Issue Distributor\\"s daily Bill. This function is only available for Resellers and Distributors.
2243
+
2244
+ @param request: GetDailyBillRequest
2245
+ @return: GetDailyBillResponse
2246
+ """
2247
+ runtime = util_models.RuntimeOptions()
2248
+ return await self.get_daily_bill_with_options_async(request, runtime)
2249
+
2250
+ def get_invite_status_with_options(
2251
+ self,
2252
+ request: agency_20221216_models.GetInviteStatusRequest,
2253
+ runtime: util_models.RuntimeOptions,
2254
+ ) -> agency_20221216_models.GetInviteStatusResponse:
2255
+ """
2256
+ @summary Query invitation status of customer who have been created and invited.
2257
+
2258
+ @param request: GetInviteStatusRequest
2259
+ @param runtime: runtime options for this request RuntimeOptions
2260
+ @return: GetInviteStatusResponse
2261
+ """
2262
+ UtilClient.validate_model(request)
2263
+ query = {}
2264
+ if not UtilClient.is_unset(request.invite_status_list):
2265
+ query['InviteStatusList'] = request.invite_status_list
2266
+ req = open_api_models.OpenApiRequest(
2267
+ query=OpenApiUtilClient.query(query)
2268
+ )
2269
+ params = open_api_models.Params(
2270
+ action='GetInviteStatus',
2271
+ version='2022-12-16',
2272
+ protocol='HTTPS',
2273
+ pathname='/',
2274
+ method='POST',
2275
+ auth_type='AK',
2276
+ style='RPC',
2277
+ req_body_type='formData',
2278
+ body_type='json'
2279
+ )
2280
+ return TeaCore.from_map(
2281
+ agency_20221216_models.GetInviteStatusResponse(),
2282
+ self.call_api(params, req, runtime)
2283
+ )
2284
+
2285
+ async def get_invite_status_with_options_async(
2286
+ self,
2287
+ request: agency_20221216_models.GetInviteStatusRequest,
2288
+ runtime: util_models.RuntimeOptions,
2289
+ ) -> agency_20221216_models.GetInviteStatusResponse:
2290
+ """
2291
+ @summary Query invitation status of customer who have been created and invited.
2292
+
2293
+ @param request: GetInviteStatusRequest
2294
+ @param runtime: runtime options for this request RuntimeOptions
2295
+ @return: GetInviteStatusResponse
2296
+ """
2297
+ UtilClient.validate_model(request)
2298
+ query = {}
2299
+ if not UtilClient.is_unset(request.invite_status_list):
2300
+ query['InviteStatusList'] = request.invite_status_list
2301
+ req = open_api_models.OpenApiRequest(
2302
+ query=OpenApiUtilClient.query(query)
2303
+ )
2304
+ params = open_api_models.Params(
2305
+ action='GetInviteStatus',
2306
+ version='2022-12-16',
2307
+ protocol='HTTPS',
2308
+ pathname='/',
2309
+ method='POST',
2310
+ auth_type='AK',
2311
+ style='RPC',
2312
+ req_body_type='formData',
2313
+ body_type='json'
2314
+ )
2315
+ return TeaCore.from_map(
2316
+ agency_20221216_models.GetInviteStatusResponse(),
2317
+ await self.call_api_async(params, req, runtime)
2318
+ )
2319
+
2320
+ def get_invite_status(
2321
+ self,
2322
+ request: agency_20221216_models.GetInviteStatusRequest,
2323
+ ) -> agency_20221216_models.GetInviteStatusResponse:
2324
+ """
2325
+ @summary Query invitation status of customer who have been created and invited.
2326
+
2327
+ @param request: GetInviteStatusRequest
2328
+ @return: GetInviteStatusResponse
2329
+ """
2330
+ runtime = util_models.RuntimeOptions()
2331
+ return self.get_invite_status_with_options(request, runtime)
2332
+
2333
+ async def get_invite_status_async(
2334
+ self,
2335
+ request: agency_20221216_models.GetInviteStatusRequest,
2336
+ ) -> agency_20221216_models.GetInviteStatusResponse:
2337
+ """
2338
+ @summary Query invitation status of customer who have been created and invited.
2339
+
2340
+ @param request: GetInviteStatusRequest
2341
+ @return: GetInviteStatusResponse
2342
+ """
2343
+ runtime = util_models.RuntimeOptions()
2344
+ return await self.get_invite_status_with_options_async(request, runtime)
2345
+
2346
+ def get_monthly_bill_with_options(
2347
+ self,
2348
+ request: agency_20221216_models.GetMonthlyBillRequest,
2349
+ runtime: util_models.RuntimeOptions,
2350
+ ) -> agency_20221216_models.GetMonthlyBillResponse:
2351
+ """
2352
+ @summary Issue Distributor\\"s Monthly Bill. This function is only available for Resellers and Distributors.
2353
+
2354
+ @param request: GetMonthlyBillRequest
2355
+ @param runtime: runtime options for this request RuntimeOptions
2356
+ @return: GetMonthlyBillResponse
2357
+ """
2358
+ UtilClient.validate_model(request)
2359
+ query = {}
2360
+ if not UtilClient.is_unset(request.bill_owner):
2361
+ query['BillOwner'] = request.bill_owner
2362
+ if not UtilClient.is_unset(request.bill_type):
2363
+ query['BillType'] = request.bill_type
2364
+ if not UtilClient.is_unset(request.month):
2365
+ query['Month'] = request.month
2366
+ req = open_api_models.OpenApiRequest(
2367
+ query=OpenApiUtilClient.query(query)
2368
+ )
2369
+ params = open_api_models.Params(
2370
+ action='GetMonthlyBill',
2371
+ version='2022-12-16',
2372
+ protocol='HTTPS',
2373
+ pathname='/',
2374
+ method='POST',
2375
+ auth_type='AK',
2376
+ style='RPC',
2377
+ req_body_type='formData',
2378
+ body_type='json'
2379
+ )
2380
+ return TeaCore.from_map(
2381
+ agency_20221216_models.GetMonthlyBillResponse(),
2382
+ self.call_api(params, req, runtime)
2383
+ )
2384
+
2385
+ async def get_monthly_bill_with_options_async(
2386
+ self,
2387
+ request: agency_20221216_models.GetMonthlyBillRequest,
2388
+ runtime: util_models.RuntimeOptions,
2389
+ ) -> agency_20221216_models.GetMonthlyBillResponse:
2390
+ """
2391
+ @summary Issue Distributor\\"s Monthly Bill. This function is only available for Resellers and Distributors.
2392
+
2393
+ @param request: GetMonthlyBillRequest
2394
+ @param runtime: runtime options for this request RuntimeOptions
2395
+ @return: GetMonthlyBillResponse
2396
+ """
2397
+ UtilClient.validate_model(request)
2398
+ query = {}
2399
+ if not UtilClient.is_unset(request.bill_owner):
2400
+ query['BillOwner'] = request.bill_owner
2401
+ if not UtilClient.is_unset(request.bill_type):
2402
+ query['BillType'] = request.bill_type
2403
+ if not UtilClient.is_unset(request.month):
2404
+ query['Month'] = request.month
2405
+ req = open_api_models.OpenApiRequest(
2406
+ query=OpenApiUtilClient.query(query)
2407
+ )
2408
+ params = open_api_models.Params(
2409
+ action='GetMonthlyBill',
2410
+ version='2022-12-16',
2411
+ protocol='HTTPS',
2412
+ pathname='/',
2413
+ method='POST',
2414
+ auth_type='AK',
2415
+ style='RPC',
2416
+ req_body_type='formData',
2417
+ body_type='json'
2418
+ )
2419
+ return TeaCore.from_map(
2420
+ agency_20221216_models.GetMonthlyBillResponse(),
2421
+ await self.call_api_async(params, req, runtime)
2422
+ )
2423
+
2424
+ def get_monthly_bill(
2425
+ self,
2426
+ request: agency_20221216_models.GetMonthlyBillRequest,
2427
+ ) -> agency_20221216_models.GetMonthlyBillResponse:
2428
+ """
2429
+ @summary Issue Distributor\\"s Monthly Bill. This function is only available for Resellers and Distributors.
2430
+
2431
+ @param request: GetMonthlyBillRequest
2432
+ @return: GetMonthlyBillResponse
2433
+ """
2434
+ runtime = util_models.RuntimeOptions()
2435
+ return self.get_monthly_bill_with_options(request, runtime)
2436
+
2437
+ async def get_monthly_bill_async(
2438
+ self,
2439
+ request: agency_20221216_models.GetMonthlyBillRequest,
2440
+ ) -> agency_20221216_models.GetMonthlyBillResponse:
2441
+ """
2442
+ @summary Issue Distributor\\"s Monthly Bill. This function is only available for Resellers and Distributors.
2443
+
2444
+ @param request: GetMonthlyBillRequest
2445
+ @return: GetMonthlyBillResponse
2446
+ """
2447
+ runtime = util_models.RuntimeOptions()
2448
+ return await self.get_monthly_bill_with_options_async(request, runtime)
2449
+
2450
+ def get_unassociated_customer_with_options(
2451
+ self,
2452
+ request: agency_20221216_models.GetUnassociatedCustomerRequest,
2453
+ runtime: util_models.RuntimeOptions,
2454
+ ) -> agency_20221216_models.GetUnassociatedCustomerResponse:
2455
+ """
2456
+ @summary Query all the Unassociated Customer.
2457
+
2458
+ @param request: GetUnassociatedCustomerRequest
2459
+ @param runtime: runtime options for this request RuntimeOptions
2460
+ @return: GetUnassociatedCustomerResponse
2461
+ """
2462
+ UtilClient.validate_model(request)
2463
+ query = OpenApiUtilClient.query(UtilClient.to_map(request))
2464
+ req = open_api_models.OpenApiRequest(
2465
+ query=OpenApiUtilClient.query(query)
2466
+ )
2467
+ params = open_api_models.Params(
2468
+ action='GetUnassociatedCustomer',
2469
+ version='2022-12-16',
2470
+ protocol='HTTPS',
2471
+ pathname='/',
2472
+ method='GET',
2473
+ auth_type='AK',
2474
+ style='RPC',
2475
+ req_body_type='formData',
2476
+ body_type='json'
2477
+ )
2478
+ return TeaCore.from_map(
2479
+ agency_20221216_models.GetUnassociatedCustomerResponse(),
2480
+ self.call_api(params, req, runtime)
2481
+ )
2482
+
2483
+ async def get_unassociated_customer_with_options_async(
2484
+ self,
2485
+ request: agency_20221216_models.GetUnassociatedCustomerRequest,
2486
+ runtime: util_models.RuntimeOptions,
2487
+ ) -> agency_20221216_models.GetUnassociatedCustomerResponse:
2488
+ """
2489
+ @summary Query all the Unassociated Customer.
2490
+
2491
+ @param request: GetUnassociatedCustomerRequest
2492
+ @param runtime: runtime options for this request RuntimeOptions
2493
+ @return: GetUnassociatedCustomerResponse
2494
+ """
2495
+ UtilClient.validate_model(request)
2496
+ query = OpenApiUtilClient.query(UtilClient.to_map(request))
2497
+ req = open_api_models.OpenApiRequest(
2498
+ query=OpenApiUtilClient.query(query)
2499
+ )
2500
+ params = open_api_models.Params(
2501
+ action='GetUnassociatedCustomer',
2502
+ version='2022-12-16',
2503
+ protocol='HTTPS',
2504
+ pathname='/',
2505
+ method='GET',
2506
+ auth_type='AK',
2507
+ style='RPC',
2508
+ req_body_type='formData',
2509
+ body_type='json'
2510
+ )
2511
+ return TeaCore.from_map(
2512
+ agency_20221216_models.GetUnassociatedCustomerResponse(),
2513
+ await self.call_api_async(params, req, runtime)
2514
+ )
2515
+
2516
+ def get_unassociated_customer(
2517
+ self,
2518
+ request: agency_20221216_models.GetUnassociatedCustomerRequest,
2519
+ ) -> agency_20221216_models.GetUnassociatedCustomerResponse:
2520
+ """
2521
+ @summary Query all the Unassociated Customer.
2522
+
2523
+ @param request: GetUnassociatedCustomerRequest
2524
+ @return: GetUnassociatedCustomerResponse
2525
+ """
2526
+ runtime = util_models.RuntimeOptions()
2527
+ return self.get_unassociated_customer_with_options(request, runtime)
2528
+
2529
+ async def get_unassociated_customer_async(
2530
+ self,
2531
+ request: agency_20221216_models.GetUnassociatedCustomerRequest,
2532
+ ) -> agency_20221216_models.GetUnassociatedCustomerResponse:
2533
+ """
2534
+ @summary Query all the Unassociated Customer.
2535
+
2536
+ @param request: GetUnassociatedCustomerRequest
2537
+ @return: GetUnassociatedCustomerResponse
2538
+ """
2539
+ runtime = util_models.RuntimeOptions()
2540
+ return await self.get_unassociated_customer_with_options_async(request, runtime)
2541
+
2542
+ def invite_sub_account_with_options(
2543
+ self,
2544
+ request: agency_20221216_models.InviteSubAccountRequest,
2545
+ runtime: util_models.RuntimeOptions,
2546
+ ) -> agency_20221216_models.InviteSubAccountResponse:
2547
+ """
2548
+ @summary Initiate the Partner registration invitation.
2549
+
2550
+ @description The current API request rate for the Cloud Product has not been disclosed.
2551
+
2552
+ @param request: InviteSubAccountRequest
2553
+ @param runtime: runtime options for this request RuntimeOptions
2554
+ @return: InviteSubAccountResponse
2555
+ """
2556
+ UtilClient.validate_model(request)
2557
+ query = {}
2558
+ if not UtilClient.is_unset(request.account_info_list):
2559
+ query['AccountInfoList'] = request.account_info_list
2560
+ req = open_api_models.OpenApiRequest(
2561
+ query=OpenApiUtilClient.query(query)
2562
+ )
2563
+ params = open_api_models.Params(
2564
+ action='InviteSubAccount',
2565
+ version='2022-12-16',
2566
+ protocol='HTTPS',
2567
+ pathname='/',
2568
+ method='POST',
2569
+ auth_type='AK',
2570
+ style='RPC',
2571
+ req_body_type='formData',
2572
+ body_type='json'
2573
+ )
2574
+ return TeaCore.from_map(
2575
+ agency_20221216_models.InviteSubAccountResponse(),
2576
+ self.call_api(params, req, runtime)
2577
+ )
2578
+
2579
+ async def invite_sub_account_with_options_async(
2580
+ self,
2581
+ request: agency_20221216_models.InviteSubAccountRequest,
2582
+ runtime: util_models.RuntimeOptions,
2583
+ ) -> agency_20221216_models.InviteSubAccountResponse:
2584
+ """
2585
+ @summary Initiate the Partner registration invitation.
2586
+
2587
+ @description The current API request rate for the Cloud Product has not been disclosed.
2588
+
2589
+ @param request: InviteSubAccountRequest
2590
+ @param runtime: runtime options for this request RuntimeOptions
2591
+ @return: InviteSubAccountResponse
2592
+ """
2593
+ UtilClient.validate_model(request)
2594
+ query = {}
2595
+ if not UtilClient.is_unset(request.account_info_list):
2596
+ query['AccountInfoList'] = request.account_info_list
2597
+ req = open_api_models.OpenApiRequest(
2598
+ query=OpenApiUtilClient.query(query)
2599
+ )
2600
+ params = open_api_models.Params(
2601
+ action='InviteSubAccount',
2602
+ version='2022-12-16',
2603
+ protocol='HTTPS',
2604
+ pathname='/',
2605
+ method='POST',
2606
+ auth_type='AK',
2607
+ style='RPC',
2608
+ req_body_type='formData',
2609
+ body_type='json'
2610
+ )
2611
+ return TeaCore.from_map(
2612
+ agency_20221216_models.InviteSubAccountResponse(),
2613
+ await self.call_api_async(params, req, runtime)
2614
+ )
2615
+
2616
+ def invite_sub_account(
2617
+ self,
2618
+ request: agency_20221216_models.InviteSubAccountRequest,
2619
+ ) -> agency_20221216_models.InviteSubAccountResponse:
2620
+ """
2621
+ @summary Initiate the Partner registration invitation.
2622
+
2623
+ @description The current API request rate for the Cloud Product has not been disclosed.
2624
+
2625
+ @param request: InviteSubAccountRequest
2626
+ @return: InviteSubAccountResponse
2627
+ """
2628
+ runtime = util_models.RuntimeOptions()
2629
+ return self.invite_sub_account_with_options(request, runtime)
2630
+
2631
+ async def invite_sub_account_async(
2632
+ self,
2633
+ request: agency_20221216_models.InviteSubAccountRequest,
2634
+ ) -> agency_20221216_models.InviteSubAccountResponse:
2635
+ """
2636
+ @summary Initiate the Partner registration invitation.
2637
+
2638
+ @description The current API request rate for the Cloud Product has not been disclosed.
2639
+
2640
+ @param request: InviteSubAccountRequest
2641
+ @return: InviteSubAccountResponse
2642
+ """
2643
+ runtime = util_models.RuntimeOptions()
2644
+ return await self.invite_sub_account_with_options_async(request, runtime)
2645
+
2646
+ def issue_coupon_for_customer_with_options(
2647
+ self,
2648
+ request: agency_20221216_models.IssueCouponForCustomerRequest,
2649
+ runtime: util_models.RuntimeOptions,
2650
+ ) -> agency_20221216_models.IssueCouponForCustomerResponse:
2651
+ """
2652
+ @summary 发放优惠券
2653
+
2654
+ @param request: IssueCouponForCustomerRequest
2655
+ @param runtime: runtime options for this request RuntimeOptions
2656
+ @return: IssueCouponForCustomerResponse
2657
+ """
2658
+ UtilClient.validate_model(request)
2659
+ query = {}
2660
+ if not UtilClient.is_unset(request.accept_language):
2661
+ query['AcceptLanguage'] = request.accept_language
2662
+ if not UtilClient.is_unset(request.coupon_template_id):
2663
+ query['CouponTemplateId'] = request.coupon_template_id
2664
+ if not UtilClient.is_unset(request.is_use_benefit):
2665
+ query['IsUseBenefit'] = request.is_use_benefit
2666
+ if not UtilClient.is_unset(request.uidlist):
2667
+ query['Uidlist'] = request.uidlist
2668
+ req = open_api_models.OpenApiRequest(
2669
+ query=OpenApiUtilClient.query(query)
2670
+ )
2671
+ params = open_api_models.Params(
2672
+ action='IssueCouponForCustomer',
2673
+ version='2022-12-16',
2674
+ protocol='HTTPS',
2675
+ pathname='/',
2676
+ method='POST',
2677
+ auth_type='AK',
2678
+ style='RPC',
2679
+ req_body_type='formData',
2680
+ body_type='json'
2681
+ )
2682
+ return TeaCore.from_map(
2683
+ agency_20221216_models.IssueCouponForCustomerResponse(),
2684
+ self.call_api(params, req, runtime)
2685
+ )
2686
+
2687
+ async def issue_coupon_for_customer_with_options_async(
2688
+ self,
2689
+ request: agency_20221216_models.IssueCouponForCustomerRequest,
2690
+ runtime: util_models.RuntimeOptions,
2691
+ ) -> agency_20221216_models.IssueCouponForCustomerResponse:
2692
+ """
2693
+ @summary 发放优惠券
2694
+
2695
+ @param request: IssueCouponForCustomerRequest
2696
+ @param runtime: runtime options for this request RuntimeOptions
2697
+ @return: IssueCouponForCustomerResponse
2698
+ """
2699
+ UtilClient.validate_model(request)
2700
+ query = {}
2701
+ if not UtilClient.is_unset(request.accept_language):
2702
+ query['AcceptLanguage'] = request.accept_language
2703
+ if not UtilClient.is_unset(request.coupon_template_id):
2704
+ query['CouponTemplateId'] = request.coupon_template_id
2705
+ if not UtilClient.is_unset(request.is_use_benefit):
2706
+ query['IsUseBenefit'] = request.is_use_benefit
2707
+ if not UtilClient.is_unset(request.uidlist):
2708
+ query['Uidlist'] = request.uidlist
2709
+ req = open_api_models.OpenApiRequest(
2710
+ query=OpenApiUtilClient.query(query)
2711
+ )
2712
+ params = open_api_models.Params(
2713
+ action='IssueCouponForCustomer',
2714
+ version='2022-12-16',
2715
+ protocol='HTTPS',
2716
+ pathname='/',
2717
+ method='POST',
2718
+ auth_type='AK',
2719
+ style='RPC',
2720
+ req_body_type='formData',
2721
+ body_type='json'
2722
+ )
2723
+ return TeaCore.from_map(
2724
+ agency_20221216_models.IssueCouponForCustomerResponse(),
2725
+ await self.call_api_async(params, req, runtime)
2726
+ )
2727
+
2728
+ def issue_coupon_for_customer(
2729
+ self,
2730
+ request: agency_20221216_models.IssueCouponForCustomerRequest,
2731
+ ) -> agency_20221216_models.IssueCouponForCustomerResponse:
2732
+ """
2733
+ @summary 发放优惠券
2734
+
2735
+ @param request: IssueCouponForCustomerRequest
2736
+ @return: IssueCouponForCustomerResponse
2737
+ """
2738
+ runtime = util_models.RuntimeOptions()
2739
+ return self.issue_coupon_for_customer_with_options(request, runtime)
2740
+
2741
+ async def issue_coupon_for_customer_async(
2742
+ self,
2743
+ request: agency_20221216_models.IssueCouponForCustomerRequest,
2744
+ ) -> agency_20221216_models.IssueCouponForCustomerResponse:
2745
+ """
2746
+ @summary 发放优惠券
2747
+
2748
+ @param request: IssueCouponForCustomerRequest
2749
+ @return: IssueCouponForCustomerResponse
2750
+ """
2751
+ runtime = util_models.RuntimeOptions()
2752
+ return await self.issue_coupon_for_customer_with_options_async(request, runtime)
2753
+
2754
+ def list_countries_with_options(
2755
+ self,
2756
+ runtime: util_models.RuntimeOptions,
2757
+ ) -> agency_20221216_models.ListCountriesResponse:
2758
+ """
2759
+ @summary This function is available for all Distributors. It displays the corresponding region code information based on the operable countries as agreed in the Distributor\\"s contract.
2760
+
2761
+ @description The current API request rate for cloud products has not been disclosed.
2762
+
2763
+ @param request: ListCountriesRequest
2764
+ @param runtime: runtime options for this request RuntimeOptions
2765
+ @return: ListCountriesResponse
2766
+ """
2767
+ req = open_api_models.OpenApiRequest()
2768
+ params = open_api_models.Params(
2769
+ action='ListCountries',
2770
+ version='2022-12-16',
2771
+ protocol='HTTPS',
2772
+ pathname='/',
2773
+ method='GET',
2774
+ auth_type='AK',
2775
+ style='RPC',
2776
+ req_body_type='formData',
2777
+ body_type='json'
2778
+ )
2779
+ return TeaCore.from_map(
2780
+ agency_20221216_models.ListCountriesResponse(),
2781
+ self.call_api(params, req, runtime)
2782
+ )
2783
+
2784
+ async def list_countries_with_options_async(
2785
+ self,
2786
+ runtime: util_models.RuntimeOptions,
2787
+ ) -> agency_20221216_models.ListCountriesResponse:
2788
+ """
2789
+ @summary This function is available for all Distributors. It displays the corresponding region code information based on the operable countries as agreed in the Distributor\\"s contract.
2790
+
2791
+ @description The current API request rate for cloud products has not been disclosed.
2792
+
2793
+ @param request: ListCountriesRequest
2794
+ @param runtime: runtime options for this request RuntimeOptions
2795
+ @return: ListCountriesResponse
2796
+ """
2797
+ req = open_api_models.OpenApiRequest()
2798
+ params = open_api_models.Params(
2799
+ action='ListCountries',
2800
+ version='2022-12-16',
2801
+ protocol='HTTPS',
2802
+ pathname='/',
2803
+ method='GET',
2804
+ auth_type='AK',
2805
+ style='RPC',
2806
+ req_body_type='formData',
2807
+ body_type='json'
2808
+ )
2809
+ return TeaCore.from_map(
2810
+ agency_20221216_models.ListCountriesResponse(),
2811
+ await self.call_api_async(params, req, runtime)
2812
+ )
2813
+
2814
+ def list_countries(self) -> agency_20221216_models.ListCountriesResponse:
2815
+ """
2816
+ @summary This function is available for all Distributors. It displays the corresponding region code information based on the operable countries as agreed in the Distributor\\"s contract.
2817
+
2818
+ @description The current API request rate for cloud products has not been disclosed.
2819
+
2820
+ @return: ListCountriesResponse
2821
+ """
2822
+ runtime = util_models.RuntimeOptions()
2823
+ return self.list_countries_with_options(runtime)
2824
+
2825
+ async def list_countries_async(self) -> agency_20221216_models.ListCountriesResponse:
2826
+ """
2827
+ @summary This function is available for all Distributors. It displays the corresponding region code information based on the operable countries as agreed in the Distributor\\"s contract.
2828
+
2829
+ @description The current API request rate for cloud products has not been disclosed.
2830
+
2831
+ @return: ListCountriesResponse
2832
+ """
2833
+ runtime = util_models.RuntimeOptions()
2834
+ return await self.list_countries_with_options_async(runtime)
2835
+
2836
+ def list_coupon_usage_with_options(
2837
+ self,
2838
+ request: agency_20221216_models.ListCouponUsageRequest,
2839
+ runtime: util_models.RuntimeOptions,
2840
+ ) -> agency_20221216_models.ListCouponUsageResponse:
2841
+ """
2842
+ @summary 优惠券使用量列表查询
2843
+
2844
+ @param request: ListCouponUsageRequest
2845
+ @param runtime: runtime options for this request RuntimeOptions
2846
+ @return: ListCouponUsageResponse
2847
+ """
2848
+ UtilClient.validate_model(request)
2849
+ query = {}
2850
+ if not UtilClient.is_unset(request.account):
2851
+ query['Account'] = request.account
2852
+ if not UtilClient.is_unset(request.coupon_template_id):
2853
+ query['CouponTemplateId'] = request.coupon_template_id
2854
+ if not UtilClient.is_unset(request.page):
2855
+ query['Page'] = request.page
2856
+ if not UtilClient.is_unset(request.page_size):
2857
+ query['PageSize'] = request.page_size
2858
+ if not UtilClient.is_unset(request.status):
2859
+ query['Status'] = request.status
2860
+ if not UtilClient.is_unset(request.uid):
2861
+ query['Uid'] = request.uid
2862
+ req = open_api_models.OpenApiRequest(
2863
+ query=OpenApiUtilClient.query(query)
2864
+ )
2865
+ params = open_api_models.Params(
2866
+ action='ListCouponUsage',
2867
+ version='2022-12-16',
2868
+ protocol='HTTPS',
2869
+ pathname='/',
2870
+ method='POST',
2871
+ auth_type='AK',
2872
+ style='RPC',
2873
+ req_body_type='formData',
2874
+ body_type='json'
2875
+ )
2876
+ return TeaCore.from_map(
2877
+ agency_20221216_models.ListCouponUsageResponse(),
2878
+ self.call_api(params, req, runtime)
2879
+ )
2880
+
2881
+ async def list_coupon_usage_with_options_async(
2882
+ self,
2883
+ request: agency_20221216_models.ListCouponUsageRequest,
2884
+ runtime: util_models.RuntimeOptions,
2885
+ ) -> agency_20221216_models.ListCouponUsageResponse:
2886
+ """
2887
+ @summary 优惠券使用量列表查询
2888
+
2889
+ @param request: ListCouponUsageRequest
2890
+ @param runtime: runtime options for this request RuntimeOptions
2891
+ @return: ListCouponUsageResponse
2892
+ """
2893
+ UtilClient.validate_model(request)
2894
+ query = {}
2895
+ if not UtilClient.is_unset(request.account):
2896
+ query['Account'] = request.account
2897
+ if not UtilClient.is_unset(request.coupon_template_id):
2898
+ query['CouponTemplateId'] = request.coupon_template_id
2899
+ if not UtilClient.is_unset(request.page):
2900
+ query['Page'] = request.page
2901
+ if not UtilClient.is_unset(request.page_size):
2902
+ query['PageSize'] = request.page_size
2903
+ if not UtilClient.is_unset(request.status):
2904
+ query['Status'] = request.status
2905
+ if not UtilClient.is_unset(request.uid):
2906
+ query['Uid'] = request.uid
2907
+ req = open_api_models.OpenApiRequest(
2908
+ query=OpenApiUtilClient.query(query)
2909
+ )
2910
+ params = open_api_models.Params(
2911
+ action='ListCouponUsage',
2912
+ version='2022-12-16',
2913
+ protocol='HTTPS',
2914
+ pathname='/',
2915
+ method='POST',
2916
+ auth_type='AK',
2917
+ style='RPC',
2918
+ req_body_type='formData',
2919
+ body_type='json'
2920
+ )
2921
+ return TeaCore.from_map(
2922
+ agency_20221216_models.ListCouponUsageResponse(),
2923
+ await self.call_api_async(params, req, runtime)
2924
+ )
2925
+
2926
+ def list_coupon_usage(
2927
+ self,
2928
+ request: agency_20221216_models.ListCouponUsageRequest,
2929
+ ) -> agency_20221216_models.ListCouponUsageResponse:
2930
+ """
2931
+ @summary 优惠券使用量列表查询
2932
+
2933
+ @param request: ListCouponUsageRequest
2934
+ @return: ListCouponUsageResponse
2935
+ """
2936
+ runtime = util_models.RuntimeOptions()
2937
+ return self.list_coupon_usage_with_options(request, runtime)
2938
+
2939
+ async def list_coupon_usage_async(
2940
+ self,
2941
+ request: agency_20221216_models.ListCouponUsageRequest,
2942
+ ) -> agency_20221216_models.ListCouponUsageResponse:
2943
+ """
2944
+ @summary 优惠券使用量列表查询
2945
+
2946
+ @param request: ListCouponUsageRequest
2947
+ @return: ListCouponUsageResponse
2948
+ """
2949
+ runtime = util_models.RuntimeOptions()
2950
+ return await self.list_coupon_usage_with_options_async(request, runtime)
2951
+
2952
+ def list_export_tasks_with_options(
2953
+ self,
2954
+ request: agency_20221216_models.ListExportTasksRequest,
2955
+ runtime: util_models.RuntimeOptions,
2956
+ ) -> agency_20221216_models.ListExportTasksResponse:
2957
+ """
2958
+ @summary 通用查询导出任务列表
2959
+
2960
+ @param request: ListExportTasksRequest
2961
+ @param runtime: runtime options for this request RuntimeOptions
2962
+ @return: ListExportTasksResponse
2963
+ """
2964
+ UtilClient.validate_model(request)
2965
+ query = {}
2966
+ if not UtilClient.is_unset(request.language):
2967
+ query['Language'] = request.language
2968
+ if not UtilClient.is_unset(request.page_no):
2969
+ query['PageNo'] = request.page_no
2970
+ if not UtilClient.is_unset(request.page_size):
2971
+ query['PageSize'] = request.page_size
2972
+ if not UtilClient.is_unset(request.scene_code):
2973
+ query['SceneCode'] = request.scene_code
2974
+ req = open_api_models.OpenApiRequest(
2975
+ query=OpenApiUtilClient.query(query)
2976
+ )
2977
+ params = open_api_models.Params(
2978
+ action='ListExportTasks',
2979
+ version='2022-12-16',
2980
+ protocol='HTTPS',
2981
+ pathname='/',
2982
+ method='POST',
2983
+ auth_type='AK',
2984
+ style='RPC',
2985
+ req_body_type='formData',
2986
+ body_type='json'
2987
+ )
2988
+ return TeaCore.from_map(
2989
+ agency_20221216_models.ListExportTasksResponse(),
2990
+ self.call_api(params, req, runtime)
2991
+ )
2992
+
2993
+ async def list_export_tasks_with_options_async(
2994
+ self,
2995
+ request: agency_20221216_models.ListExportTasksRequest,
2996
+ runtime: util_models.RuntimeOptions,
2997
+ ) -> agency_20221216_models.ListExportTasksResponse:
2998
+ """
2999
+ @summary 通用查询导出任务列表
3000
+
3001
+ @param request: ListExportTasksRequest
3002
+ @param runtime: runtime options for this request RuntimeOptions
3003
+ @return: ListExportTasksResponse
3004
+ """
3005
+ UtilClient.validate_model(request)
3006
+ query = {}
3007
+ if not UtilClient.is_unset(request.language):
3008
+ query['Language'] = request.language
3009
+ if not UtilClient.is_unset(request.page_no):
3010
+ query['PageNo'] = request.page_no
3011
+ if not UtilClient.is_unset(request.page_size):
3012
+ query['PageSize'] = request.page_size
3013
+ if not UtilClient.is_unset(request.scene_code):
3014
+ query['SceneCode'] = request.scene_code
3015
+ req = open_api_models.OpenApiRequest(
3016
+ query=OpenApiUtilClient.query(query)
3017
+ )
3018
+ params = open_api_models.Params(
3019
+ action='ListExportTasks',
3020
+ version='2022-12-16',
3021
+ protocol='HTTPS',
3022
+ pathname='/',
3023
+ method='POST',
3024
+ auth_type='AK',
3025
+ style='RPC',
3026
+ req_body_type='formData',
3027
+ body_type='json'
3028
+ )
3029
+ return TeaCore.from_map(
3030
+ agency_20221216_models.ListExportTasksResponse(),
3031
+ await self.call_api_async(params, req, runtime)
3032
+ )
3033
+
3034
+ def list_export_tasks(
3035
+ self,
3036
+ request: agency_20221216_models.ListExportTasksRequest,
3037
+ ) -> agency_20221216_models.ListExportTasksResponse:
3038
+ """
3039
+ @summary 通用查询导出任务列表
3040
+
3041
+ @param request: ListExportTasksRequest
3042
+ @return: ListExportTasksResponse
3043
+ """
3044
+ runtime = util_models.RuntimeOptions()
3045
+ return self.list_export_tasks_with_options(request, runtime)
3046
+
3047
+ async def list_export_tasks_async(
3048
+ self,
3049
+ request: agency_20221216_models.ListExportTasksRequest,
3050
+ ) -> agency_20221216_models.ListExportTasksResponse:
3051
+ """
3052
+ @summary 通用查询导出任务列表
3053
+
3054
+ @param request: ListExportTasksRequest
3055
+ @return: ListExportTasksResponse
3056
+ """
3057
+ runtime = util_models.RuntimeOptions()
3058
+ return await self.list_export_tasks_with_options_async(request, runtime)
3059
+
3060
+ def query_reversed_deduction_history_with_options(
3061
+ self,
3062
+ request: agency_20221216_models.QueryReversedDeductionHistoryRequest,
3063
+ runtime: util_models.RuntimeOptions,
3064
+ ) -> agency_20221216_models.QueryReversedDeductionHistoryResponse:
3065
+ """
3066
+ @summary 额度冲减明细列表
3067
+
3068
+ @param request: QueryReversedDeductionHistoryRequest
3069
+ @param runtime: runtime options for this request RuntimeOptions
3070
+ @return: QueryReversedDeductionHistoryResponse
3071
+ """
3072
+ UtilClient.validate_model(request)
3073
+ query = {}
3074
+ if not UtilClient.is_unset(request.end_date):
3075
+ query['EndDate'] = request.end_date
3076
+ if not UtilClient.is_unset(request.language):
3077
+ query['Language'] = request.language
3078
+ if not UtilClient.is_unset(request.page_no):
3079
+ query['PageNo'] = request.page_no
3080
+ if not UtilClient.is_unset(request.page_size):
3081
+ query['PageSize'] = request.page_size
3082
+ if not UtilClient.is_unset(request.start_date):
3083
+ query['StartDate'] = request.start_date
3084
+ if not UtilClient.is_unset(request.uid):
3085
+ query['Uid'] = request.uid
3086
+ req = open_api_models.OpenApiRequest(
3087
+ query=OpenApiUtilClient.query(query)
3088
+ )
3089
+ params = open_api_models.Params(
3090
+ action='QueryReversedDeductionHistory',
3091
+ version='2022-12-16',
3092
+ protocol='HTTPS',
3093
+ pathname='/',
3094
+ method='POST',
3095
+ auth_type='AK',
3096
+ style='RPC',
3097
+ req_body_type='formData',
3098
+ body_type='json'
3099
+ )
3100
+ return TeaCore.from_map(
3101
+ agency_20221216_models.QueryReversedDeductionHistoryResponse(),
3102
+ self.call_api(params, req, runtime)
3103
+ )
3104
+
3105
+ async def query_reversed_deduction_history_with_options_async(
3106
+ self,
3107
+ request: agency_20221216_models.QueryReversedDeductionHistoryRequest,
3108
+ runtime: util_models.RuntimeOptions,
3109
+ ) -> agency_20221216_models.QueryReversedDeductionHistoryResponse:
3110
+ """
3111
+ @summary 额度冲减明细列表
3112
+
3113
+ @param request: QueryReversedDeductionHistoryRequest
3114
+ @param runtime: runtime options for this request RuntimeOptions
3115
+ @return: QueryReversedDeductionHistoryResponse
3116
+ """
3117
+ UtilClient.validate_model(request)
3118
+ query = {}
3119
+ if not UtilClient.is_unset(request.end_date):
3120
+ query['EndDate'] = request.end_date
3121
+ if not UtilClient.is_unset(request.language):
3122
+ query['Language'] = request.language
3123
+ if not UtilClient.is_unset(request.page_no):
3124
+ query['PageNo'] = request.page_no
3125
+ if not UtilClient.is_unset(request.page_size):
3126
+ query['PageSize'] = request.page_size
3127
+ if not UtilClient.is_unset(request.start_date):
3128
+ query['StartDate'] = request.start_date
3129
+ if not UtilClient.is_unset(request.uid):
3130
+ query['Uid'] = request.uid
3131
+ req = open_api_models.OpenApiRequest(
3132
+ query=OpenApiUtilClient.query(query)
3133
+ )
3134
+ params = open_api_models.Params(
3135
+ action='QueryReversedDeductionHistory',
3136
+ version='2022-12-16',
3137
+ protocol='HTTPS',
3138
+ pathname='/',
3139
+ method='POST',
3140
+ auth_type='AK',
3141
+ style='RPC',
3142
+ req_body_type='formData',
3143
+ body_type='json'
3144
+ )
3145
+ return TeaCore.from_map(
3146
+ agency_20221216_models.QueryReversedDeductionHistoryResponse(),
3147
+ await self.call_api_async(params, req, runtime)
3148
+ )
3149
+
3150
+ def query_reversed_deduction_history(
3151
+ self,
3152
+ request: agency_20221216_models.QueryReversedDeductionHistoryRequest,
3153
+ ) -> agency_20221216_models.QueryReversedDeductionHistoryResponse:
3154
+ """
3155
+ @summary 额度冲减明细列表
3156
+
3157
+ @param request: QueryReversedDeductionHistoryRequest
3158
+ @return: QueryReversedDeductionHistoryResponse
3159
+ """
3160
+ runtime = util_models.RuntimeOptions()
3161
+ return self.query_reversed_deduction_history_with_options(request, runtime)
3162
+
3163
+ async def query_reversed_deduction_history_async(
3164
+ self,
3165
+ request: agency_20221216_models.QueryReversedDeductionHistoryRequest,
3166
+ ) -> agency_20221216_models.QueryReversedDeductionHistoryResponse:
3167
+ """
3168
+ @summary 额度冲减明细列表
3169
+
3170
+ @param request: QueryReversedDeductionHistoryRequest
3171
+ @return: QueryReversedDeductionHistoryResponse
3172
+ """
3173
+ runtime = util_models.RuntimeOptions()
3174
+ return await self.query_reversed_deduction_history_with_options_async(request, runtime)
3175
+
3176
+ def quota_list_export_paged_with_options(
3177
+ self,
3178
+ request: agency_20221216_models.QuotaListExportPagedRequest,
3179
+ runtime: util_models.RuntimeOptions,
3180
+ ) -> agency_20221216_models.QuotaListExportPagedResponse:
3181
+ """
3182
+ @summary Check the result of export quota list as a Distribution Customer from International Site. Only available on International Site.
3183
+
3184
+ @description Caller must be a Partner from International Site, either Distribution or Reseller will do.
3185
+
3186
+ @param request: QuotaListExportPagedRequest
3187
+ @param runtime: runtime options for this request RuntimeOptions
3188
+ @return: QuotaListExportPagedResponse
3189
+ """
3190
+ UtilClient.validate_model(request)
3191
+ query = OpenApiUtilClient.query(UtilClient.to_map(request))
3192
+ req = open_api_models.OpenApiRequest(
3193
+ query=OpenApiUtilClient.query(query)
3194
+ )
3195
+ params = open_api_models.Params(
3196
+ action='QuotaListExportPaged',
3197
+ version='2022-12-16',
3198
+ protocol='HTTPS',
3199
+ pathname='/',
3200
+ method='GET',
3201
+ auth_type='AK',
3202
+ style='RPC',
3203
+ req_body_type='formData',
3204
+ body_type='json'
3205
+ )
3206
+ return TeaCore.from_map(
3207
+ agency_20221216_models.QuotaListExportPagedResponse(),
3208
+ self.call_api(params, req, runtime)
3209
+ )
3210
+
3211
+ async def quota_list_export_paged_with_options_async(
3212
+ self,
3213
+ request: agency_20221216_models.QuotaListExportPagedRequest,
3214
+ runtime: util_models.RuntimeOptions,
3215
+ ) -> agency_20221216_models.QuotaListExportPagedResponse:
3216
+ """
3217
+ @summary Check the result of export quota list as a Distribution Customer from International Site. Only available on International Site.
3218
+
3219
+ @description Caller must be a Partner from International Site, either Distribution or Reseller will do.
3220
+
3221
+ @param request: QuotaListExportPagedRequest
3222
+ @param runtime: runtime options for this request RuntimeOptions
3223
+ @return: QuotaListExportPagedResponse
3224
+ """
3225
+ UtilClient.validate_model(request)
3226
+ query = OpenApiUtilClient.query(UtilClient.to_map(request))
3227
+ req = open_api_models.OpenApiRequest(
3228
+ query=OpenApiUtilClient.query(query)
3229
+ )
3230
+ params = open_api_models.Params(
3231
+ action='QuotaListExportPaged',
3232
+ version='2022-12-16',
3233
+ protocol='HTTPS',
3234
+ pathname='/',
3235
+ method='GET',
3236
+ auth_type='AK',
3237
+ style='RPC',
3238
+ req_body_type='formData',
3239
+ body_type='json'
3240
+ )
3241
+ return TeaCore.from_map(
3242
+ agency_20221216_models.QuotaListExportPagedResponse(),
3243
+ await self.call_api_async(params, req, runtime)
3244
+ )
3245
+
3246
+ def quota_list_export_paged(
3247
+ self,
3248
+ request: agency_20221216_models.QuotaListExportPagedRequest,
3249
+ ) -> agency_20221216_models.QuotaListExportPagedResponse:
3250
+ """
3251
+ @summary Check the result of export quota list as a Distribution Customer from International Site. Only available on International Site.
3252
+
3253
+ @description Caller must be a Partner from International Site, either Distribution or Reseller will do.
3254
+
3255
+ @param request: QuotaListExportPagedRequest
3256
+ @return: QuotaListExportPagedResponse
3257
+ """
3258
+ runtime = util_models.RuntimeOptions()
3259
+ return self.quota_list_export_paged_with_options(request, runtime)
3260
+
3261
+ async def quota_list_export_paged_async(
3262
+ self,
3263
+ request: agency_20221216_models.QuotaListExportPagedRequest,
3264
+ ) -> agency_20221216_models.QuotaListExportPagedResponse:
3265
+ """
3266
+ @summary Check the result of export quota list as a Distribution Customer from International Site. Only available on International Site.
3267
+
3268
+ @description Caller must be a Partner from International Site, either Distribution or Reseller will do.
3269
+
3270
+ @param request: QuotaListExportPagedRequest
3271
+ @return: QuotaListExportPagedResponse
3272
+ """
3273
+ runtime = util_models.RuntimeOptions()
3274
+ return await self.quota_list_export_paged_with_options_async(request, runtime)
3275
+
3276
+ def resend_email_with_options(
3277
+ self,
3278
+ request: agency_20221216_models.ResendEmailRequest,
3279
+ runtime: util_models.RuntimeOptions,
3280
+ ) -> agency_20221216_models.ResendEmailResponse:
3281
+ """
3282
+ @summary Resend invitation email.
3283
+
3284
+ @param request: ResendEmailRequest
3285
+ @param runtime: runtime options for this request RuntimeOptions
3286
+ @return: ResendEmailResponse
3287
+ """
3288
+ UtilClient.validate_model(request)
3289
+ query = {}
3290
+ if not UtilClient.is_unset(request.invite_id):
3291
+ query['InviteId'] = request.invite_id
3292
+ req = open_api_models.OpenApiRequest(
3293
+ query=OpenApiUtilClient.query(query)
3294
+ )
3295
+ params = open_api_models.Params(
3296
+ action='ResendEmail',
3297
+ version='2022-12-16',
3298
+ protocol='HTTPS',
3299
+ pathname='/',
3300
+ method='POST',
3301
+ auth_type='AK',
3302
+ style='RPC',
3303
+ req_body_type='formData',
3304
+ body_type='json'
3305
+ )
3306
+ return TeaCore.from_map(
3307
+ agency_20221216_models.ResendEmailResponse(),
3308
+ self.call_api(params, req, runtime)
3309
+ )
3310
+
3311
+ async def resend_email_with_options_async(
3312
+ self,
3313
+ request: agency_20221216_models.ResendEmailRequest,
3314
+ runtime: util_models.RuntimeOptions,
3315
+ ) -> agency_20221216_models.ResendEmailResponse:
3316
+ """
3317
+ @summary Resend invitation email.
3318
+
3319
+ @param request: ResendEmailRequest
3320
+ @param runtime: runtime options for this request RuntimeOptions
3321
+ @return: ResendEmailResponse
3322
+ """
3323
+ UtilClient.validate_model(request)
3324
+ query = {}
3325
+ if not UtilClient.is_unset(request.invite_id):
3326
+ query['InviteId'] = request.invite_id
3327
+ req = open_api_models.OpenApiRequest(
3328
+ query=OpenApiUtilClient.query(query)
3329
+ )
3330
+ params = open_api_models.Params(
3331
+ action='ResendEmail',
3332
+ version='2022-12-16',
3333
+ protocol='HTTPS',
3334
+ pathname='/',
3335
+ method='POST',
3336
+ auth_type='AK',
3337
+ style='RPC',
3338
+ req_body_type='formData',
3339
+ body_type='json'
3340
+ )
3341
+ return TeaCore.from_map(
3342
+ agency_20221216_models.ResendEmailResponse(),
3343
+ await self.call_api_async(params, req, runtime)
3344
+ )
3345
+
3346
+ def resend_email(
3347
+ self,
3348
+ request: agency_20221216_models.ResendEmailRequest,
3349
+ ) -> agency_20221216_models.ResendEmailResponse:
3350
+ """
3351
+ @summary Resend invitation email.
3352
+
3353
+ @param request: ResendEmailRequest
3354
+ @return: ResendEmailResponse
3355
+ """
3356
+ runtime = util_models.RuntimeOptions()
3357
+ return self.resend_email_with_options(request, runtime)
3358
+
3359
+ async def resend_email_async(
3360
+ self,
3361
+ request: agency_20221216_models.ResendEmailRequest,
3362
+ ) -> agency_20221216_models.ResendEmailResponse:
3363
+ """
3364
+ @summary Resend invitation email.
3365
+
3366
+ @param request: ResendEmailRequest
3367
+ @return: ResendEmailResponse
3368
+ """
3369
+ runtime = util_models.RuntimeOptions()
3370
+ return await self.resend_email_with_options_async(request, runtime)
3371
+
3372
+ def set_account_info_with_options(
3373
+ self,
3374
+ request: agency_20221216_models.SetAccountInfoRequest,
3375
+ runtime: util_models.RuntimeOptions,
3376
+ ) -> agency_20221216_models.SetAccountInfoResponse:
3377
+ """
3378
+ @summary This function is designed for Sub Account information maintenance, including Nickname and Remark.
3379
+
3380
+ @param request: SetAccountInfoRequest
3381
+ @param runtime: runtime options for this request RuntimeOptions
3382
+ @return: SetAccountInfoResponse
3383
+ """
3384
+ UtilClient.validate_model(request)
3385
+ query = {}
3386
+ if not UtilClient.is_unset(request.account_nickname):
3387
+ query['AccountNickname'] = request.account_nickname
3388
+ if not UtilClient.is_unset(request.customer_bd):
3389
+ query['CustomerBd'] = request.customer_bd
3390
+ if not UtilClient.is_unset(request.remark):
3391
+ query['Remark'] = request.remark
3392
+ if not UtilClient.is_unset(request.uid):
3393
+ query['Uid'] = request.uid
3394
+ req = open_api_models.OpenApiRequest(
3395
+ query=OpenApiUtilClient.query(query)
3396
+ )
3397
+ params = open_api_models.Params(
3398
+ action='SetAccountInfo',
3399
+ version='2022-12-16',
3400
+ protocol='HTTPS',
3401
+ pathname='/',
3402
+ method='POST',
3403
+ auth_type='AK',
3404
+ style='RPC',
3405
+ req_body_type='formData',
3406
+ body_type='json'
3407
+ )
3408
+ return TeaCore.from_map(
3409
+ agency_20221216_models.SetAccountInfoResponse(),
3410
+ self.call_api(params, req, runtime)
3411
+ )
3412
+
3413
+ async def set_account_info_with_options_async(
3414
+ self,
3415
+ request: agency_20221216_models.SetAccountInfoRequest,
3416
+ runtime: util_models.RuntimeOptions,
3417
+ ) -> agency_20221216_models.SetAccountInfoResponse:
3418
+ """
3419
+ @summary This function is designed for Sub Account information maintenance, including Nickname and Remark.
3420
+
3421
+ @param request: SetAccountInfoRequest
3422
+ @param runtime: runtime options for this request RuntimeOptions
3423
+ @return: SetAccountInfoResponse
3424
+ """
3425
+ UtilClient.validate_model(request)
3426
+ query = {}
3427
+ if not UtilClient.is_unset(request.account_nickname):
3428
+ query['AccountNickname'] = request.account_nickname
3429
+ if not UtilClient.is_unset(request.customer_bd):
3430
+ query['CustomerBd'] = request.customer_bd
3431
+ if not UtilClient.is_unset(request.remark):
3432
+ query['Remark'] = request.remark
3433
+ if not UtilClient.is_unset(request.uid):
3434
+ query['Uid'] = request.uid
3435
+ req = open_api_models.OpenApiRequest(
3436
+ query=OpenApiUtilClient.query(query)
3437
+ )
3438
+ params = open_api_models.Params(
3439
+ action='SetAccountInfo',
3440
+ version='2022-12-16',
3441
+ protocol='HTTPS',
3442
+ pathname='/',
3443
+ method='POST',
3444
+ auth_type='AK',
3445
+ style='RPC',
3446
+ req_body_type='formData',
3447
+ body_type='json'
3448
+ )
3449
+ return TeaCore.from_map(
3450
+ agency_20221216_models.SetAccountInfoResponse(),
3451
+ await self.call_api_async(params, req, runtime)
3452
+ )
3453
+
3454
+ def set_account_info(
3455
+ self,
3456
+ request: agency_20221216_models.SetAccountInfoRequest,
3457
+ ) -> agency_20221216_models.SetAccountInfoResponse:
3458
+ """
3459
+ @summary This function is designed for Sub Account information maintenance, including Nickname and Remark.
3460
+
3461
+ @param request: SetAccountInfoRequest
3462
+ @return: SetAccountInfoResponse
3463
+ """
3464
+ runtime = util_models.RuntimeOptions()
3465
+ return self.set_account_info_with_options(request, runtime)
3466
+
3467
+ async def set_account_info_async(
3468
+ self,
3469
+ request: agency_20221216_models.SetAccountInfoRequest,
3470
+ ) -> agency_20221216_models.SetAccountInfoResponse:
3471
+ """
3472
+ @summary This function is designed for Sub Account information maintenance, including Nickname and Remark.
3473
+
3474
+ @param request: SetAccountInfoRequest
3475
+ @return: SetAccountInfoResponse
3476
+ """
3477
+ runtime = util_models.RuntimeOptions()
3478
+ return await self.set_account_info_with_options_async(request, runtime)
3479
+
3480
+ def set_credit_line_with_options(
3481
+ self,
3482
+ request: agency_20221216_models.SetCreditLineRequest,
3483
+ runtime: util_models.RuntimeOptions,
3484
+ ) -> agency_20221216_models.SetCreditLineResponse:
3485
+ """
3486
+ @summary Set Credit Line for Distribution Customers. This function is only available for Resellers and Distributors.
3487
+
3488
+ @param request: SetCreditLineRequest
3489
+ @param runtime: runtime options for this request RuntimeOptions
3490
+ @return: SetCreditLineResponse
3491
+ """
3492
+ UtilClient.validate_model(request)
3493
+ query = {}
3494
+ if not UtilClient.is_unset(request.credit_line):
3495
+ query['CreditLine'] = request.credit_line
3496
+ if not UtilClient.is_unset(request.uid):
3497
+ query['Uid'] = request.uid
3498
+ req = open_api_models.OpenApiRequest(
3499
+ query=OpenApiUtilClient.query(query)
3500
+ )
3501
+ params = open_api_models.Params(
3502
+ action='SetCreditLine',
3503
+ version='2022-12-16',
3504
+ protocol='HTTPS',
3505
+ pathname='/',
3506
+ method='POST',
3507
+ auth_type='AK',
3508
+ style='RPC',
3509
+ req_body_type='formData',
3510
+ body_type='json'
3511
+ )
3512
+ return TeaCore.from_map(
3513
+ agency_20221216_models.SetCreditLineResponse(),
3514
+ self.call_api(params, req, runtime)
3515
+ )
3516
+
3517
+ async def set_credit_line_with_options_async(
3518
+ self,
3519
+ request: agency_20221216_models.SetCreditLineRequest,
3520
+ runtime: util_models.RuntimeOptions,
3521
+ ) -> agency_20221216_models.SetCreditLineResponse:
3522
+ """
3523
+ @summary Set Credit Line for Distribution Customers. This function is only available for Resellers and Distributors.
3524
+
3525
+ @param request: SetCreditLineRequest
3526
+ @param runtime: runtime options for this request RuntimeOptions
3527
+ @return: SetCreditLineResponse
3528
+ """
3529
+ UtilClient.validate_model(request)
3530
+ query = {}
3531
+ if not UtilClient.is_unset(request.credit_line):
3532
+ query['CreditLine'] = request.credit_line
3533
+ if not UtilClient.is_unset(request.uid):
3534
+ query['Uid'] = request.uid
3535
+ req = open_api_models.OpenApiRequest(
3536
+ query=OpenApiUtilClient.query(query)
3537
+ )
3538
+ params = open_api_models.Params(
3539
+ action='SetCreditLine',
3540
+ version='2022-12-16',
3541
+ protocol='HTTPS',
3542
+ pathname='/',
3543
+ method='POST',
3544
+ auth_type='AK',
3545
+ style='RPC',
3546
+ req_body_type='formData',
3547
+ body_type='json'
3548
+ )
3549
+ return TeaCore.from_map(
3550
+ agency_20221216_models.SetCreditLineResponse(),
3551
+ await self.call_api_async(params, req, runtime)
3552
+ )
3553
+
3554
+ def set_credit_line(
3555
+ self,
3556
+ request: agency_20221216_models.SetCreditLineRequest,
3557
+ ) -> agency_20221216_models.SetCreditLineResponse:
3558
+ """
3559
+ @summary Set Credit Line for Distribution Customers. This function is only available for Resellers and Distributors.
3560
+
3561
+ @param request: SetCreditLineRequest
3562
+ @return: SetCreditLineResponse
3563
+ """
3564
+ runtime = util_models.RuntimeOptions()
3565
+ return self.set_credit_line_with_options(request, runtime)
3566
+
3567
+ async def set_credit_line_async(
3568
+ self,
3569
+ request: agency_20221216_models.SetCreditLineRequest,
3570
+ ) -> agency_20221216_models.SetCreditLineResponse:
3571
+ """
3572
+ @summary Set Credit Line for Distribution Customers. This function is only available for Resellers and Distributors.
3573
+
3574
+ @param request: SetCreditLineRequest
3575
+ @return: SetCreditLineResponse
3576
+ """
3577
+ runtime = util_models.RuntimeOptions()
3578
+ return await self.set_credit_line_with_options_async(request, runtime)
3579
+
3580
+ def set_warning_threshold_with_options(
3581
+ self,
3582
+ request: agency_20221216_models.SetWarningThresholdRequest,
3583
+ runtime: util_models.RuntimeOptions,
3584
+ ) -> agency_20221216_models.SetWarningThresholdResponse:
3585
+ """
3586
+ @summary You can use this API to set the threshold for the use of credit control. When the customer credit control reaches below the threshold, it will pass through the notification email distributor. This feature is for Reseller and Distributor only.
3587
+
3588
+ @param request: SetWarningThresholdRequest
3589
+ @param runtime: runtime options for this request RuntimeOptions
3590
+ @return: SetWarningThresholdResponse
3591
+ """
3592
+ UtilClient.validate_model(request)
3593
+ query = {}
3594
+ if not UtilClient.is_unset(request.uid):
3595
+ query['Uid'] = request.uid
3596
+ if not UtilClient.is_unset(request.warning_value):
3597
+ query['WarningValue'] = request.warning_value
3598
+ req = open_api_models.OpenApiRequest(
3599
+ query=OpenApiUtilClient.query(query)
3600
+ )
3601
+ params = open_api_models.Params(
3602
+ action='SetWarningThreshold',
3603
+ version='2022-12-16',
3604
+ protocol='HTTPS',
3605
+ pathname='/',
3606
+ method='POST',
3607
+ auth_type='AK',
3608
+ style='RPC',
3609
+ req_body_type='formData',
3610
+ body_type='json'
3611
+ )
3612
+ return TeaCore.from_map(
3613
+ agency_20221216_models.SetWarningThresholdResponse(),
3614
+ self.call_api(params, req, runtime)
3615
+ )
3616
+
3617
+ async def set_warning_threshold_with_options_async(
3618
+ self,
3619
+ request: agency_20221216_models.SetWarningThresholdRequest,
3620
+ runtime: util_models.RuntimeOptions,
3621
+ ) -> agency_20221216_models.SetWarningThresholdResponse:
3622
+ """
3623
+ @summary You can use this API to set the threshold for the use of credit control. When the customer credit control reaches below the threshold, it will pass through the notification email distributor. This feature is for Reseller and Distributor only.
3624
+
3625
+ @param request: SetWarningThresholdRequest
3626
+ @param runtime: runtime options for this request RuntimeOptions
3627
+ @return: SetWarningThresholdResponse
3628
+ """
3629
+ UtilClient.validate_model(request)
3630
+ query = {}
3631
+ if not UtilClient.is_unset(request.uid):
3632
+ query['Uid'] = request.uid
3633
+ if not UtilClient.is_unset(request.warning_value):
3634
+ query['WarningValue'] = request.warning_value
3635
+ req = open_api_models.OpenApiRequest(
3636
+ query=OpenApiUtilClient.query(query)
3637
+ )
3638
+ params = open_api_models.Params(
3639
+ action='SetWarningThreshold',
3640
+ version='2022-12-16',
3641
+ protocol='HTTPS',
3642
+ pathname='/',
3643
+ method='POST',
3644
+ auth_type='AK',
3645
+ style='RPC',
3646
+ req_body_type='formData',
3647
+ body_type='json'
3648
+ )
3649
+ return TeaCore.from_map(
3650
+ agency_20221216_models.SetWarningThresholdResponse(),
3651
+ await self.call_api_async(params, req, runtime)
3652
+ )
3653
+
3654
+ def set_warning_threshold(
3655
+ self,
3656
+ request: agency_20221216_models.SetWarningThresholdRequest,
3657
+ ) -> agency_20221216_models.SetWarningThresholdResponse:
3658
+ """
3659
+ @summary You can use this API to set the threshold for the use of credit control. When the customer credit control reaches below the threshold, it will pass through the notification email distributor. This feature is for Reseller and Distributor only.
3660
+
3661
+ @param request: SetWarningThresholdRequest
3662
+ @return: SetWarningThresholdResponse
3663
+ """
3664
+ runtime = util_models.RuntimeOptions()
3665
+ return self.set_warning_threshold_with_options(request, runtime)
3666
+
3667
+ async def set_warning_threshold_async(
3668
+ self,
3669
+ request: agency_20221216_models.SetWarningThresholdRequest,
3670
+ ) -> agency_20221216_models.SetWarningThresholdResponse:
3671
+ """
3672
+ @summary You can use this API to set the threshold for the use of credit control. When the customer credit control reaches below the threshold, it will pass through the notification email distributor. This feature is for Reseller and Distributor only.
3673
+
3674
+ @param request: SetWarningThresholdRequest
3675
+ @return: SetWarningThresholdResponse
3676
+ """
3677
+ runtime = util_models.RuntimeOptions()
3678
+ return await self.set_warning_threshold_with_options_async(request, runtime)
3679
+
3680
+ def subscription_bill_with_options(
3681
+ self,
3682
+ request: agency_20221216_models.SubscriptionBillRequest,
3683
+ runtime: util_models.RuntimeOptions,
3684
+ ) -> agency_20221216_models.SubscriptionBillResponse:
3685
+ """
3686
+ @summary Generates the subscription to multi-level bills as an Alibaba Cloud eco-partner.
3687
+
3688
+ @description Make sure that you are a distributor of the Alibaba Cloud international ecosystem.
3689
+ You can call this operation to subscribe to only one type of bill at a time.
3690
+ After the subscription to a type of bill is generated, the bill for the previous day is pushed on a daily basis from the next day. On the fifth day of each month, the full-data bill for the previous month is pushed.
3691
+ A daily bill may be delayed. The delayed bill is pushed the next day after it is generated. The delayed bill may contain the bill data that is delayed until the previous day. We recommend that you query the full-data bill for the previous month at the beginning of each month.
3692
+ Your account must be granted the [AliyunConsumeDump2OSSRole](https://ram.console.aliyun.com/?spm=api-workbench.API%20Document.0.0.68c71e0fhmTSJp#/role/authorize?request=%7B%22Requests%22:%20%7B%22request1%22:%20%7B%22RoleName%22:%20%22AliyunConsumeDump2OSSRole%22,%20%22TemplateId%22:%20%22Dump2OSSRole%22%7D%7D,%20%22ReturnUrl%22:%20%22https:%2F%2Fusercenter2.aliyun.com%22,%20%22Service%22:%20%22Consume%22%7D) permission.
3693
+ The following file name formats are supported for bills:
3694
+ ```
3695
+ BillingItemDetailForBillingPeriod
3696
+
3697
+ File name format of a daily bill: UID_PartnerBillingItemDetail_YYYYMMDD_SquenceNo_fileNo. Example: 169*_BillingItemDetail_20190310_0001_01.
3698
+
3699
+ File name format of a monthly full-data bill: UID_PartnerBillingItemDetail_YYYYMM_SquenceNo_fileNo. Example: 169*_BillingItemDetail_201903_0001_01.
3700
+ InstanceDetailForBillingPeriod
3701
+
3702
+ File name format of a daily bill: UID_PartnerInstanceDetail_YYYYMMDD_SquenceNo_fileNo. Example: 169*_InstanceDetail_20190310_0001_01.
3703
+
3704
+ File name format of a monthly full-data bill: UID_PartnerInstanceDetail_YYYYMM_SquenceNo_fileNo. Example: 169*_InstanceDetail_201903_1999-0001_01.
3705
+ BillingItemDetailMonthly
3706
+
3707
+ File name format of a daily bill: UID_PartnerBillingItemDetailMonthly_YYYYMM_SquenceNo_fileNo. Example: 169*_BillingItemDetailMonthly_201903_0001_01. This bill contains the bill data that is generated from the beginning of the current month to the fifth day of the next month.
3708
+ InstanceDetailMonthly
3709
+
3710
+ File name format of a daily bill: UID_PartnerInstanceDetailMonthly_YYYYMM_SquenceNo_fileNo. Example: 169*_InstanceDetailMonthly_201903_0001_01. This bill contains the bill data that is generated from the beginning of the current month to the fifth day of the next month.
3711
+ The fileNo field exists only when the number of bill rows reaches the maximum rows in a single bill file and the bill is split into multiple files.
3712
+ ```
3713
+ *This topic is published only on the international site (alibabacloud.com).
3714
+
3715
+ @param request: SubscriptionBillRequest
3716
+ @param runtime: runtime options for this request RuntimeOptions
3717
+ @return: SubscriptionBillResponse
3718
+ """
3719
+ UtilClient.validate_model(request)
3720
+ query = {}
3721
+ if not UtilClient.is_unset(request.begin_billing_cycle):
3722
+ query['BeginBillingCycle'] = request.begin_billing_cycle
3723
+ if not UtilClient.is_unset(request.bill_format):
3724
+ query['BillFormat'] = request.bill_format
3725
+ if not UtilClient.is_unset(request.bucket_owner_id):
3726
+ query['BucketOwnerId'] = request.bucket_owner_id
3727
+ if not UtilClient.is_unset(request.subscribe_bucket):
3728
+ query['SubscribeBucket'] = request.subscribe_bucket
3729
+ if not UtilClient.is_unset(request.subscribe_segment_size):
3730
+ query['SubscribeSegmentSize'] = request.subscribe_segment_size
3731
+ if not UtilClient.is_unset(request.subscribe_type):
3732
+ query['SubscribeType'] = request.subscribe_type
3733
+ req = open_api_models.OpenApiRequest(
3734
+ query=OpenApiUtilClient.query(query)
3735
+ )
3736
+ params = open_api_models.Params(
3737
+ action='SubscriptionBill',
3738
+ version='2022-12-16',
3739
+ protocol='HTTPS',
3740
+ pathname='/',
3741
+ method='POST',
3742
+ auth_type='AK',
3743
+ style='RPC',
3744
+ req_body_type='formData',
3745
+ body_type='json'
3746
+ )
3747
+ return TeaCore.from_map(
3748
+ agency_20221216_models.SubscriptionBillResponse(),
3749
+ self.call_api(params, req, runtime)
3750
+ )
3751
+
3752
+ async def subscription_bill_with_options_async(
3753
+ self,
3754
+ request: agency_20221216_models.SubscriptionBillRequest,
3755
+ runtime: util_models.RuntimeOptions,
3756
+ ) -> agency_20221216_models.SubscriptionBillResponse:
3757
+ """
3758
+ @summary Generates the subscription to multi-level bills as an Alibaba Cloud eco-partner.
3759
+
3760
+ @description Make sure that you are a distributor of the Alibaba Cloud international ecosystem.
3761
+ You can call this operation to subscribe to only one type of bill at a time.
3762
+ After the subscription to a type of bill is generated, the bill for the previous day is pushed on a daily basis from the next day. On the fifth day of each month, the full-data bill for the previous month is pushed.
3763
+ A daily bill may be delayed. The delayed bill is pushed the next day after it is generated. The delayed bill may contain the bill data that is delayed until the previous day. We recommend that you query the full-data bill for the previous month at the beginning of each month.
3764
+ Your account must be granted the [AliyunConsumeDump2OSSRole](https://ram.console.aliyun.com/?spm=api-workbench.API%20Document.0.0.68c71e0fhmTSJp#/role/authorize?request=%7B%22Requests%22:%20%7B%22request1%22:%20%7B%22RoleName%22:%20%22AliyunConsumeDump2OSSRole%22,%20%22TemplateId%22:%20%22Dump2OSSRole%22%7D%7D,%20%22ReturnUrl%22:%20%22https:%2F%2Fusercenter2.aliyun.com%22,%20%22Service%22:%20%22Consume%22%7D) permission.
3765
+ The following file name formats are supported for bills:
3766
+ ```
3767
+ BillingItemDetailForBillingPeriod
3768
+
3769
+ File name format of a daily bill: UID_PartnerBillingItemDetail_YYYYMMDD_SquenceNo_fileNo. Example: 169*_BillingItemDetail_20190310_0001_01.
3770
+
3771
+ File name format of a monthly full-data bill: UID_PartnerBillingItemDetail_YYYYMM_SquenceNo_fileNo. Example: 169*_BillingItemDetail_201903_0001_01.
3772
+ InstanceDetailForBillingPeriod
3773
+
3774
+ File name format of a daily bill: UID_PartnerInstanceDetail_YYYYMMDD_SquenceNo_fileNo. Example: 169*_InstanceDetail_20190310_0001_01.
3775
+
3776
+ File name format of a monthly full-data bill: UID_PartnerInstanceDetail_YYYYMM_SquenceNo_fileNo. Example: 169*_InstanceDetail_201903_1999-0001_01.
3777
+ BillingItemDetailMonthly
3778
+
3779
+ File name format of a daily bill: UID_PartnerBillingItemDetailMonthly_YYYYMM_SquenceNo_fileNo. Example: 169*_BillingItemDetailMonthly_201903_0001_01. This bill contains the bill data that is generated from the beginning of the current month to the fifth day of the next month.
3780
+ InstanceDetailMonthly
3781
+
3782
+ File name format of a daily bill: UID_PartnerInstanceDetailMonthly_YYYYMM_SquenceNo_fileNo. Example: 169*_InstanceDetailMonthly_201903_0001_01. This bill contains the bill data that is generated from the beginning of the current month to the fifth day of the next month.
3783
+ The fileNo field exists only when the number of bill rows reaches the maximum rows in a single bill file and the bill is split into multiple files.
3784
+ ```
3785
+ *This topic is published only on the international site (alibabacloud.com).
3786
+
3787
+ @param request: SubscriptionBillRequest
3788
+ @param runtime: runtime options for this request RuntimeOptions
3789
+ @return: SubscriptionBillResponse
3790
+ """
3791
+ UtilClient.validate_model(request)
3792
+ query = {}
3793
+ if not UtilClient.is_unset(request.begin_billing_cycle):
3794
+ query['BeginBillingCycle'] = request.begin_billing_cycle
3795
+ if not UtilClient.is_unset(request.bill_format):
3796
+ query['BillFormat'] = request.bill_format
3797
+ if not UtilClient.is_unset(request.bucket_owner_id):
3798
+ query['BucketOwnerId'] = request.bucket_owner_id
3799
+ if not UtilClient.is_unset(request.subscribe_bucket):
3800
+ query['SubscribeBucket'] = request.subscribe_bucket
3801
+ if not UtilClient.is_unset(request.subscribe_segment_size):
3802
+ query['SubscribeSegmentSize'] = request.subscribe_segment_size
3803
+ if not UtilClient.is_unset(request.subscribe_type):
3804
+ query['SubscribeType'] = request.subscribe_type
3805
+ req = open_api_models.OpenApiRequest(
3806
+ query=OpenApiUtilClient.query(query)
3807
+ )
3808
+ params = open_api_models.Params(
3809
+ action='SubscriptionBill',
3810
+ version='2022-12-16',
3811
+ protocol='HTTPS',
3812
+ pathname='/',
3813
+ method='POST',
3814
+ auth_type='AK',
3815
+ style='RPC',
3816
+ req_body_type='formData',
3817
+ body_type='json'
3818
+ )
3819
+ return TeaCore.from_map(
3820
+ agency_20221216_models.SubscriptionBillResponse(),
3821
+ await self.call_api_async(params, req, runtime)
3822
+ )
3823
+
3824
+ def subscription_bill(
3825
+ self,
3826
+ request: agency_20221216_models.SubscriptionBillRequest,
3827
+ ) -> agency_20221216_models.SubscriptionBillResponse:
3828
+ """
3829
+ @summary Generates the subscription to multi-level bills as an Alibaba Cloud eco-partner.
3830
+
3831
+ @description Make sure that you are a distributor of the Alibaba Cloud international ecosystem.
3832
+ You can call this operation to subscribe to only one type of bill at a time.
3833
+ After the subscription to a type of bill is generated, the bill for the previous day is pushed on a daily basis from the next day. On the fifth day of each month, the full-data bill for the previous month is pushed.
3834
+ A daily bill may be delayed. The delayed bill is pushed the next day after it is generated. The delayed bill may contain the bill data that is delayed until the previous day. We recommend that you query the full-data bill for the previous month at the beginning of each month.
3835
+ Your account must be granted the [AliyunConsumeDump2OSSRole](https://ram.console.aliyun.com/?spm=api-workbench.API%20Document.0.0.68c71e0fhmTSJp#/role/authorize?request=%7B%22Requests%22:%20%7B%22request1%22:%20%7B%22RoleName%22:%20%22AliyunConsumeDump2OSSRole%22,%20%22TemplateId%22:%20%22Dump2OSSRole%22%7D%7D,%20%22ReturnUrl%22:%20%22https:%2F%2Fusercenter2.aliyun.com%22,%20%22Service%22:%20%22Consume%22%7D) permission.
3836
+ The following file name formats are supported for bills:
3837
+ ```
3838
+ BillingItemDetailForBillingPeriod
3839
+
3840
+ File name format of a daily bill: UID_PartnerBillingItemDetail_YYYYMMDD_SquenceNo_fileNo. Example: 169*_BillingItemDetail_20190310_0001_01.
3841
+
3842
+ File name format of a monthly full-data bill: UID_PartnerBillingItemDetail_YYYYMM_SquenceNo_fileNo. Example: 169*_BillingItemDetail_201903_0001_01.
3843
+ InstanceDetailForBillingPeriod
3844
+
3845
+ File name format of a daily bill: UID_PartnerInstanceDetail_YYYYMMDD_SquenceNo_fileNo. Example: 169*_InstanceDetail_20190310_0001_01.
3846
+
3847
+ File name format of a monthly full-data bill: UID_PartnerInstanceDetail_YYYYMM_SquenceNo_fileNo. Example: 169*_InstanceDetail_201903_1999-0001_01.
3848
+ BillingItemDetailMonthly
3849
+
3850
+ File name format of a daily bill: UID_PartnerBillingItemDetailMonthly_YYYYMM_SquenceNo_fileNo. Example: 169*_BillingItemDetailMonthly_201903_0001_01. This bill contains the bill data that is generated from the beginning of the current month to the fifth day of the next month.
3851
+ InstanceDetailMonthly
3852
+
3853
+ File name format of a daily bill: UID_PartnerInstanceDetailMonthly_YYYYMM_SquenceNo_fileNo. Example: 169*_InstanceDetailMonthly_201903_0001_01. This bill contains the bill data that is generated from the beginning of the current month to the fifth day of the next month.
3854
+ The fileNo field exists only when the number of bill rows reaches the maximum rows in a single bill file and the bill is split into multiple files.
3855
+ ```
3856
+ *This topic is published only on the international site (alibabacloud.com).
3857
+
3858
+ @param request: SubscriptionBillRequest
3859
+ @return: SubscriptionBillResponse
3860
+ """
3861
+ runtime = util_models.RuntimeOptions()
3862
+ return self.subscription_bill_with_options(request, runtime)
3863
+
3864
+ async def subscription_bill_async(
3865
+ self,
3866
+ request: agency_20221216_models.SubscriptionBillRequest,
3867
+ ) -> agency_20221216_models.SubscriptionBillResponse:
3868
+ """
3869
+ @summary Generates the subscription to multi-level bills as an Alibaba Cloud eco-partner.
3870
+
3871
+ @description Make sure that you are a distributor of the Alibaba Cloud international ecosystem.
3872
+ You can call this operation to subscribe to only one type of bill at a time.
3873
+ After the subscription to a type of bill is generated, the bill for the previous day is pushed on a daily basis from the next day. On the fifth day of each month, the full-data bill for the previous month is pushed.
3874
+ A daily bill may be delayed. The delayed bill is pushed the next day after it is generated. The delayed bill may contain the bill data that is delayed until the previous day. We recommend that you query the full-data bill for the previous month at the beginning of each month.
3875
+ Your account must be granted the [AliyunConsumeDump2OSSRole](https://ram.console.aliyun.com/?spm=api-workbench.API%20Document.0.0.68c71e0fhmTSJp#/role/authorize?request=%7B%22Requests%22:%20%7B%22request1%22:%20%7B%22RoleName%22:%20%22AliyunConsumeDump2OSSRole%22,%20%22TemplateId%22:%20%22Dump2OSSRole%22%7D%7D,%20%22ReturnUrl%22:%20%22https:%2F%2Fusercenter2.aliyun.com%22,%20%22Service%22:%20%22Consume%22%7D) permission.
3876
+ The following file name formats are supported for bills:
3877
+ ```
3878
+ BillingItemDetailForBillingPeriod
3879
+
3880
+ File name format of a daily bill: UID_PartnerBillingItemDetail_YYYYMMDD_SquenceNo_fileNo. Example: 169*_BillingItemDetail_20190310_0001_01.
3881
+
3882
+ File name format of a monthly full-data bill: UID_PartnerBillingItemDetail_YYYYMM_SquenceNo_fileNo. Example: 169*_BillingItemDetail_201903_0001_01.
3883
+ InstanceDetailForBillingPeriod
3884
+
3885
+ File name format of a daily bill: UID_PartnerInstanceDetail_YYYYMMDD_SquenceNo_fileNo. Example: 169*_InstanceDetail_20190310_0001_01.
3886
+
3887
+ File name format of a monthly full-data bill: UID_PartnerInstanceDetail_YYYYMM_SquenceNo_fileNo. Example: 169*_InstanceDetail_201903_1999-0001_01.
3888
+ BillingItemDetailMonthly
3889
+
3890
+ File name format of a daily bill: UID_PartnerBillingItemDetailMonthly_YYYYMM_SquenceNo_fileNo. Example: 169*_BillingItemDetailMonthly_201903_0001_01. This bill contains the bill data that is generated from the beginning of the current month to the fifth day of the next month.
3891
+ InstanceDetailMonthly
3892
+
3893
+ File name format of a daily bill: UID_PartnerInstanceDetailMonthly_YYYYMM_SquenceNo_fileNo. Example: 169*_InstanceDetailMonthly_201903_0001_01. This bill contains the bill data that is generated from the beginning of the current month to the fifth day of the next month.
3894
+ The fileNo field exists only when the number of bill rows reaches the maximum rows in a single bill file and the bill is split into multiple files.
3895
+ ```
3896
+ *This topic is published only on the international site (alibabacloud.com).
3897
+
3898
+ @param request: SubscriptionBillRequest
3899
+ @return: SubscriptionBillResponse
3900
+ """
3901
+ runtime = util_models.RuntimeOptions()
3902
+ return await self.subscription_bill_with_options_async(request, runtime)