Skip to content

Commit d32edcb

Browse files
author
BitsAdmin
committed
Merge branch 'billing-Python-2022-01-01-online-1454-2025_08_14_11_59_00' into 'integration_2025-08-14_1032949698818'
feat: [development task] billing-1454-Python (1552905) See merge request iaasng/volcengine-python-sdk!748
2 parents d5a1e5a + b0ee1be commit d32edcb

10 files changed

+2266
-0
lines changed

volcenginesdkbilling/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@
6161
from volcenginesdkbilling.models.list_bill_overview_by_prod_response import ListBillOverviewByProdResponse
6262
from volcenginesdkbilling.models.list_bill_request import ListBillRequest
6363
from volcenginesdkbilling.models.list_bill_response import ListBillResponse
64+
from volcenginesdkbilling.models.list_coupon_usage_records_request import ListCouponUsageRecordsRequest
65+
from volcenginesdkbilling.models.list_coupon_usage_records_response import ListCouponUsageRecordsResponse
66+
from volcenginesdkbilling.models.list_coupons_request import ListCouponsRequest
67+
from volcenginesdkbilling.models.list_coupons_response import ListCouponsResponse
6468
from volcenginesdkbilling.models.list_financial_relation_request import ListFinancialRelationRequest
6569
from volcenginesdkbilling.models.list_financial_relation_response import ListFinancialRelationResponse
6670
from volcenginesdkbilling.models.list_for_list_amortized_cost_bill_daily_output import ListForListAmortizedCostBillDailyOutput
@@ -70,6 +74,8 @@
7074
from volcenginesdkbilling.models.list_for_list_bill_output import ListForListBillOutput
7175
from volcenginesdkbilling.models.list_for_list_bill_overview_by_category_output import ListForListBillOverviewByCategoryOutput
7276
from volcenginesdkbilling.models.list_for_list_bill_overview_by_prod_output import ListForListBillOverviewByProdOutput
77+
from volcenginesdkbilling.models.list_for_list_coupon_usage_records_output import ListForListCouponUsageRecordsOutput
78+
from volcenginesdkbilling.models.list_for_list_coupons_output import ListForListCouponsOutput
7379
from volcenginesdkbilling.models.list_for_list_financial_relation_output import ListForListFinancialRelationOutput
7480
from volcenginesdkbilling.models.list_for_list_invitation_output import ListForListInvitationOutput
7581
from volcenginesdkbilling.models.list_for_list_package_usage_details_output import ListForListPackageUsageDetailsOutput
@@ -95,6 +101,7 @@
95101
from volcenginesdkbilling.models.order_product_info_for_list_order_product_details_output import OrderProductInfoForListOrderProductDetailsOutput
96102
from volcenginesdkbilling.models.pay_order_request import PayOrderRequest
97103
from volcenginesdkbilling.models.pay_order_response import PayOrderResponse
104+
from volcenginesdkbilling.models.product_limit_list_for_list_coupons_output import ProductLimitListForListCouponsOutput
98105
from volcenginesdkbilling.models.query_balance_acct_request import QueryBalanceAcctRequest
99106
from volcenginesdkbilling.models.query_balance_acct_response import QueryBalanceAcctResponse
100107
from volcenginesdkbilling.models.query_price_for_pay_as_you_go_request import QueryPriceForPayAsYouGoRequest

volcenginesdkbilling/api/billing_api.py

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,6 +1488,200 @@ def list_bill_overview_by_prod_with_http_info(self, body, **kwargs): # noqa: E5
14881488
_request_timeout=params.get('_request_timeout'),
14891489
collection_formats=collection_formats)
14901490

1491+
def list_coupon_usage_records(self, body, **kwargs): # noqa: E501
1492+
"""list_coupon_usage_records # noqa: E501
1493+
1494+
This method makes a synchronous HTTP request by default. To make an
1495+
asynchronous HTTP request, please pass async_req=True
1496+
>>> thread = api.list_coupon_usage_records(body, async_req=True)
1497+
>>> result = thread.get()
1498+
1499+
:param async_req bool
1500+
:param ListCouponUsageRecordsRequest body: (required)
1501+
:return: ListCouponUsageRecordsResponse
1502+
If the method is called asynchronously,
1503+
returns the request thread.
1504+
"""
1505+
kwargs['_return_http_data_only'] = True
1506+
if kwargs.get('async_req'):
1507+
return self.list_coupon_usage_records_with_http_info(body, **kwargs) # noqa: E501
1508+
else:
1509+
(data) = self.list_coupon_usage_records_with_http_info(body, **kwargs) # noqa: E501
1510+
return data
1511+
1512+
def list_coupon_usage_records_with_http_info(self, body, **kwargs): # noqa: E501
1513+
"""list_coupon_usage_records # noqa: E501
1514+
1515+
This method makes a synchronous HTTP request by default. To make an
1516+
asynchronous HTTP request, please pass async_req=True
1517+
>>> thread = api.list_coupon_usage_records_with_http_info(body, async_req=True)
1518+
>>> result = thread.get()
1519+
1520+
:param async_req bool
1521+
:param ListCouponUsageRecordsRequest body: (required)
1522+
:return: ListCouponUsageRecordsResponse
1523+
If the method is called asynchronously,
1524+
returns the request thread.
1525+
"""
1526+
1527+
all_params = ['body'] # noqa: E501
1528+
all_params.append('async_req')
1529+
all_params.append('_return_http_data_only')
1530+
all_params.append('_preload_content')
1531+
all_params.append('_request_timeout')
1532+
1533+
params = locals()
1534+
for key, val in six.iteritems(params['kwargs']):
1535+
if key not in all_params:
1536+
raise TypeError(
1537+
"Got an unexpected keyword argument '%s'"
1538+
" to method list_coupon_usage_records" % key
1539+
)
1540+
params[key] = val
1541+
del params['kwargs']
1542+
# verify the required parameter 'body' is set
1543+
if self.api_client.client_side_validation and ('body' not in params or
1544+
params['body'] is None): # noqa: E501
1545+
raise ValueError("Missing the required parameter `body` when calling `list_coupon_usage_records`") # noqa: E501
1546+
1547+
collection_formats = {}
1548+
1549+
path_params = {}
1550+
1551+
query_params = []
1552+
1553+
header_params = {}
1554+
1555+
form_params = []
1556+
local_var_files = {}
1557+
1558+
body_params = None
1559+
if 'body' in params:
1560+
body_params = params['body']
1561+
# HTTP header `Accept`
1562+
header_params['Accept'] = self.api_client.select_header_accept(
1563+
['application/json']) # noqa: E501
1564+
1565+
# HTTP header `Content-Type`
1566+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1567+
['application/json']) # noqa: E501
1568+
1569+
# Authentication setting
1570+
auth_settings = ['volcengineSign'] # noqa: E501
1571+
1572+
return self.api_client.call_api(
1573+
'/ListCouponUsageRecords/2022-01-01/billing/post/application_json/', 'POST',
1574+
path_params,
1575+
query_params,
1576+
header_params,
1577+
body=body_params,
1578+
post_params=form_params,
1579+
files=local_var_files,
1580+
response_type='ListCouponUsageRecordsResponse', # noqa: E501
1581+
auth_settings=auth_settings,
1582+
async_req=params.get('async_req'),
1583+
_return_http_data_only=params.get('_return_http_data_only'),
1584+
_preload_content=params.get('_preload_content', True),
1585+
_request_timeout=params.get('_request_timeout'),
1586+
collection_formats=collection_formats)
1587+
1588+
def list_coupons(self, body, **kwargs): # noqa: E501
1589+
"""list_coupons # noqa: E501
1590+
1591+
This method makes a synchronous HTTP request by default. To make an
1592+
asynchronous HTTP request, please pass async_req=True
1593+
>>> thread = api.list_coupons(body, async_req=True)
1594+
>>> result = thread.get()
1595+
1596+
:param async_req bool
1597+
:param ListCouponsRequest body: (required)
1598+
:return: ListCouponsResponse
1599+
If the method is called asynchronously,
1600+
returns the request thread.
1601+
"""
1602+
kwargs['_return_http_data_only'] = True
1603+
if kwargs.get('async_req'):
1604+
return self.list_coupons_with_http_info(body, **kwargs) # noqa: E501
1605+
else:
1606+
(data) = self.list_coupons_with_http_info(body, **kwargs) # noqa: E501
1607+
return data
1608+
1609+
def list_coupons_with_http_info(self, body, **kwargs): # noqa: E501
1610+
"""list_coupons # noqa: E501
1611+
1612+
This method makes a synchronous HTTP request by default. To make an
1613+
asynchronous HTTP request, please pass async_req=True
1614+
>>> thread = api.list_coupons_with_http_info(body, async_req=True)
1615+
>>> result = thread.get()
1616+
1617+
:param async_req bool
1618+
:param ListCouponsRequest body: (required)
1619+
:return: ListCouponsResponse
1620+
If the method is called asynchronously,
1621+
returns the request thread.
1622+
"""
1623+
1624+
all_params = ['body'] # noqa: E501
1625+
all_params.append('async_req')
1626+
all_params.append('_return_http_data_only')
1627+
all_params.append('_preload_content')
1628+
all_params.append('_request_timeout')
1629+
1630+
params = locals()
1631+
for key, val in six.iteritems(params['kwargs']):
1632+
if key not in all_params:
1633+
raise TypeError(
1634+
"Got an unexpected keyword argument '%s'"
1635+
" to method list_coupons" % key
1636+
)
1637+
params[key] = val
1638+
del params['kwargs']
1639+
# verify the required parameter 'body' is set
1640+
if self.api_client.client_side_validation and ('body' not in params or
1641+
params['body'] is None): # noqa: E501
1642+
raise ValueError("Missing the required parameter `body` when calling `list_coupons`") # noqa: E501
1643+
1644+
collection_formats = {}
1645+
1646+
path_params = {}
1647+
1648+
query_params = []
1649+
1650+
header_params = {}
1651+
1652+
form_params = []
1653+
local_var_files = {}
1654+
1655+
body_params = None
1656+
if 'body' in params:
1657+
body_params = params['body']
1658+
# HTTP header `Accept`
1659+
header_params['Accept'] = self.api_client.select_header_accept(
1660+
['application/json']) # noqa: E501
1661+
1662+
# HTTP header `Content-Type`
1663+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1664+
['application/json']) # noqa: E501
1665+
1666+
# Authentication setting
1667+
auth_settings = ['volcengineSign'] # noqa: E501
1668+
1669+
return self.api_client.call_api(
1670+
'/ListCoupons/2022-01-01/billing/post/application_json/', 'POST',
1671+
path_params,
1672+
query_params,
1673+
header_params,
1674+
body=body_params,
1675+
post_params=form_params,
1676+
files=local_var_files,
1677+
response_type='ListCouponsResponse', # noqa: E501
1678+
auth_settings=auth_settings,
1679+
async_req=params.get('async_req'),
1680+
_return_http_data_only=params.get('_return_http_data_only'),
1681+
_preload_content=params.get('_preload_content', True),
1682+
_request_timeout=params.get('_request_timeout'),
1683+
collection_formats=collection_formats)
1684+
14911685
def list_financial_relation(self, body, **kwargs): # noqa: E501
14921686
"""list_financial_relation # noqa: E501
14931687

volcenginesdkbilling/models/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@
5757
from volcenginesdkbilling.models.list_bill_overview_by_prod_response import ListBillOverviewByProdResponse
5858
from volcenginesdkbilling.models.list_bill_request import ListBillRequest
5959
from volcenginesdkbilling.models.list_bill_response import ListBillResponse
60+
from volcenginesdkbilling.models.list_coupon_usage_records_request import ListCouponUsageRecordsRequest
61+
from volcenginesdkbilling.models.list_coupon_usage_records_response import ListCouponUsageRecordsResponse
62+
from volcenginesdkbilling.models.list_coupons_request import ListCouponsRequest
63+
from volcenginesdkbilling.models.list_coupons_response import ListCouponsResponse
6064
from volcenginesdkbilling.models.list_financial_relation_request import ListFinancialRelationRequest
6165
from volcenginesdkbilling.models.list_financial_relation_response import ListFinancialRelationResponse
6266
from volcenginesdkbilling.models.list_for_list_amortized_cost_bill_daily_output import ListForListAmortizedCostBillDailyOutput
@@ -66,6 +70,8 @@
6670
from volcenginesdkbilling.models.list_for_list_bill_output import ListForListBillOutput
6771
from volcenginesdkbilling.models.list_for_list_bill_overview_by_category_output import ListForListBillOverviewByCategoryOutput
6872
from volcenginesdkbilling.models.list_for_list_bill_overview_by_prod_output import ListForListBillOverviewByProdOutput
73+
from volcenginesdkbilling.models.list_for_list_coupon_usage_records_output import ListForListCouponUsageRecordsOutput
74+
from volcenginesdkbilling.models.list_for_list_coupons_output import ListForListCouponsOutput
6975
from volcenginesdkbilling.models.list_for_list_financial_relation_output import ListForListFinancialRelationOutput
7076
from volcenginesdkbilling.models.list_for_list_invitation_output import ListForListInvitationOutput
7177
from volcenginesdkbilling.models.list_for_list_package_usage_details_output import ListForListPackageUsageDetailsOutput
@@ -91,6 +97,7 @@
9197
from volcenginesdkbilling.models.order_product_info_for_list_order_product_details_output import OrderProductInfoForListOrderProductDetailsOutput
9298
from volcenginesdkbilling.models.pay_order_request import PayOrderRequest
9399
from volcenginesdkbilling.models.pay_order_response import PayOrderResponse
100+
from volcenginesdkbilling.models.product_limit_list_for_list_coupons_output import ProductLimitListForListCouponsOutput
94101
from volcenginesdkbilling.models.query_balance_acct_request import QueryBalanceAcctRequest
95102
from volcenginesdkbilling.models.query_balance_acct_response import QueryBalanceAcctResponse
96103
from volcenginesdkbilling.models.query_price_for_pay_as_you_go_request import QueryPriceForPayAsYouGoRequest

0 commit comments

Comments
 (0)