Skip to content

Commit 62d6a81

Browse files
msyycSDK Automation
andauthored
【T1】 billing (Azure#14491)
* Generated from eb835f618f791a74a3a2b85b7fcf3425229aed58 * version and changelog * version,changelog,live test * version 0.2.0=>1.0.0 * live test fix * Update CHANGELOG.md Co-authored-by: SDK Automation <[email protected]>
1 parent 7000983 commit 62d6a81

File tree

57 files changed

+13100
-1206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+13100
-1206
lines changed

sdk/billing/azure-mgmt-billing/CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# Release History
22

3+
## 1.0.0 (2020-10-19)
4+
5+
**Features**
6+
7+
- Model ErrorDetails has a new parameter details
8+
- Added operation InvoicesOperations.download_multiple_billing_subscription_invoice
9+
- Added operation InvoicesOperations.get_by_id
10+
- Added operation InvoicesOperations.download_invoice
11+
- Added operation InvoicesOperations.list_by_billing_subscription
12+
- Added operation InvoicesOperations.list_by_billing_account
13+
- Added operation InvoicesOperations.download_billing_subscription_invoice
14+
- Added operation InvoicesOperations.download_multiple_modern_invoice
15+
- Added operation InvoicesOperations.list_by_billing_profile
16+
- Added operation InvoicesOperations.get_by_subscription_and_invoice_id
17+
- Added operation group InvoiceSectionsOperations
18+
- Added operation group PoliciesOperations
19+
- Added operation group InstructionsOperations
20+
- Added operation group ProductsOperations
21+
- Added operation group AddressOperations
22+
- Added operation group BillingProfilesOperations
23+
- Added operation group TransactionsOperations
24+
- Added operation group BillingPermissionsOperations
25+
- Added operation group BillingRoleDefinitionsOperations
26+
- Added operation group BillingRoleAssignmentsOperations
27+
- Added operation group BillingSubscriptionsOperations
28+
- Added operation group AvailableBalancesOperations
29+
- Added operation group CustomersOperations
30+
- Added operation group AgreementsOperations
31+
- Added operation group BillingAccountsOperations
32+
- Added operation group BillingPropertyOperations
33+
34+
**Breaking changes**
35+
36+
- Model Invoice has a new signature
37+
- Model EnrollmentAccount has a new signature
38+
- Removed operation InvoicesOperations.get_latest
39+
- Removed operation InvoicesOperations.list
40+
341
## 0.2.0 (2018-03-29)
442

543
- Add new nrollment_accounts operation groups
Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
1-
## Microsoft Azure SDK for Python
1+
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Billing Client Library.
4+
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
5+
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
46

5-
Azure Resource Manager (ARM) is the next generation of management APIs
6-
that replace the old Azure Service Management (ASM).
77

8-
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
8+
# Usage
99

10-
For the older Azure Service Management (ASM) libraries, see
11-
[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy)
12-
library.
13-
14-
For a more complete set of Azure libraries, see the
15-
[azure sdk python release](https://aka.ms/azsdk/python/all).
16-
17-
## Usage
18-
19-
For code examples, see
20-
[Billing](https://docs.microsoft.com/python/api/overview/azure/billing)
10+
For code examples, see [Billing](https://docs.microsoft.com/python/api/overview/azure/billing)
2111
on docs.microsoft.com.
2212

23-
## Provide Feedback
2413

25-
If you encounter any bugs or have suggestions, please file an issue in
26-
the [Issues](https://github.com/Azure/azure-sdk-for-python/issues)
14+
# Provide Feedback
15+
16+
If you encounter any bugs or have suggestions, please file an issue in the
17+
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
2718
section of the project.
2819

29-
![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-billing%2FREADME.png)
20+
21+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-billing%2FREADME.png)

sdk/billing/azure-mgmt-billing/azure/mgmt/billing/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from .billing_management_client import BillingManagementClient
13-
from .version import VERSION
12+
from ._configuration import BillingManagementClientConfiguration
13+
from ._billing_management_client import BillingManagementClient
14+
__all__ = ['BillingManagementClient', 'BillingManagementClientConfiguration']
1415

15-
__all__ = ['BillingManagementClient']
16+
from .version import VERSION
1617

1718
__version__ = VERSION
1819

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.service_client import SDKClient
13+
from msrest import Serializer, Deserializer
14+
15+
from ._configuration import BillingManagementClientConfiguration
16+
from .operations import BillingAccountsOperations
17+
from .operations import AddressOperations
18+
from .operations import AvailableBalancesOperations
19+
from .operations import InstructionsOperations
20+
from .operations import BillingProfilesOperations
21+
from .operations import CustomersOperations
22+
from .operations import InvoiceSectionsOperations
23+
from .operations import BillingPermissionsOperations
24+
from .operations import BillingSubscriptionsOperations
25+
from .operations import ProductsOperations
26+
from .operations import InvoicesOperations
27+
from .operations import TransactionsOperations
28+
from .operations import PoliciesOperations
29+
from .operations import BillingPropertyOperations
30+
from .operations import Operations
31+
from .operations import BillingRoleDefinitionsOperations
32+
from .operations import BillingRoleAssignmentsOperations
33+
from .operations import AgreementsOperations
34+
from .operations import EnrollmentAccountsOperations
35+
from .operations import BillingPeriodsOperations
36+
from . import models
37+
38+
39+
class BillingManagementClient(SDKClient):
40+
"""Billing client provides access to billing resources for Azure subscriptions.
41+
42+
:ivar config: Configuration for client.
43+
:vartype config: BillingManagementClientConfiguration
44+
45+
:ivar billing_accounts: BillingAccounts operations
46+
:vartype billing_accounts: azure.mgmt.billing.operations.BillingAccountsOperations
47+
:ivar address: Address operations
48+
:vartype address: azure.mgmt.billing.operations.AddressOperations
49+
:ivar available_balances: AvailableBalances operations
50+
:vartype available_balances: azure.mgmt.billing.operations.AvailableBalancesOperations
51+
:ivar instructions: Instructions operations
52+
:vartype instructions: azure.mgmt.billing.operations.InstructionsOperations
53+
:ivar billing_profiles: BillingProfiles operations
54+
:vartype billing_profiles: azure.mgmt.billing.operations.BillingProfilesOperations
55+
:ivar customers: Customers operations
56+
:vartype customers: azure.mgmt.billing.operations.CustomersOperations
57+
:ivar invoice_sections: InvoiceSections operations
58+
:vartype invoice_sections: azure.mgmt.billing.operations.InvoiceSectionsOperations
59+
:ivar billing_permissions: BillingPermissions operations
60+
:vartype billing_permissions: azure.mgmt.billing.operations.BillingPermissionsOperations
61+
:ivar billing_subscriptions: BillingSubscriptions operations
62+
:vartype billing_subscriptions: azure.mgmt.billing.operations.BillingSubscriptionsOperations
63+
:ivar products: Products operations
64+
:vartype products: azure.mgmt.billing.operations.ProductsOperations
65+
:ivar invoices: Invoices operations
66+
:vartype invoices: azure.mgmt.billing.operations.InvoicesOperations
67+
:ivar transactions: Transactions operations
68+
:vartype transactions: azure.mgmt.billing.operations.TransactionsOperations
69+
:ivar policies: Policies operations
70+
:vartype policies: azure.mgmt.billing.operations.PoliciesOperations
71+
:ivar billing_property: BillingProperty operations
72+
:vartype billing_property: azure.mgmt.billing.operations.BillingPropertyOperations
73+
:ivar operations: Operations operations
74+
:vartype operations: azure.mgmt.billing.operations.Operations
75+
:ivar billing_role_definitions: BillingRoleDefinitions operations
76+
:vartype billing_role_definitions: azure.mgmt.billing.operations.BillingRoleDefinitionsOperations
77+
:ivar billing_role_assignments: BillingRoleAssignments operations
78+
:vartype billing_role_assignments: azure.mgmt.billing.operations.BillingRoleAssignmentsOperations
79+
:ivar agreements: Agreements operations
80+
:vartype agreements: azure.mgmt.billing.operations.AgreementsOperations
81+
:ivar enrollment_accounts: EnrollmentAccounts operations
82+
:vartype enrollment_accounts: azure.mgmt.billing.operations.EnrollmentAccountsOperations
83+
:ivar billing_periods: BillingPeriods operations
84+
:vartype billing_periods: azure.mgmt.billing.operations.BillingPeriodsOperations
85+
86+
:param credentials: Credentials needed for the client to connect to Azure.
87+
:type credentials: :mod:`A msrestazure Credentials
88+
object<msrestazure.azure_active_directory>`
89+
:param subscription_id: The ID that uniquely identifies an Azure
90+
subscription.
91+
:type subscription_id: str
92+
:param str base_url: Service URL
93+
"""
94+
95+
def __init__(
96+
self, credentials, subscription_id, base_url=None):
97+
98+
self.config = BillingManagementClientConfiguration(credentials, subscription_id, base_url)
99+
super(BillingManagementClient, self).__init__(self.config.credentials, self.config)
100+
101+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
102+
self._serialize = Serializer(client_models)
103+
self._deserialize = Deserializer(client_models)
104+
105+
self.billing_accounts = BillingAccountsOperations(
106+
self._client, self.config, self._serialize, self._deserialize)
107+
self.address = AddressOperations(
108+
self._client, self.config, self._serialize, self._deserialize)
109+
self.available_balances = AvailableBalancesOperations(
110+
self._client, self.config, self._serialize, self._deserialize)
111+
self.instructions = InstructionsOperations(
112+
self._client, self.config, self._serialize, self._deserialize)
113+
self.billing_profiles = BillingProfilesOperations(
114+
self._client, self.config, self._serialize, self._deserialize)
115+
self.customers = CustomersOperations(
116+
self._client, self.config, self._serialize, self._deserialize)
117+
self.invoice_sections = InvoiceSectionsOperations(
118+
self._client, self.config, self._serialize, self._deserialize)
119+
self.billing_permissions = BillingPermissionsOperations(
120+
self._client, self.config, self._serialize, self._deserialize)
121+
self.billing_subscriptions = BillingSubscriptionsOperations(
122+
self._client, self.config, self._serialize, self._deserialize)
123+
self.products = ProductsOperations(
124+
self._client, self.config, self._serialize, self._deserialize)
125+
self.invoices = InvoicesOperations(
126+
self._client, self.config, self._serialize, self._deserialize)
127+
self.transactions = TransactionsOperations(
128+
self._client, self.config, self._serialize, self._deserialize)
129+
self.policies = PoliciesOperations(
130+
self._client, self.config, self._serialize, self._deserialize)
131+
self.billing_property = BillingPropertyOperations(
132+
self._client, self.config, self._serialize, self._deserialize)
133+
self.operations = Operations(
134+
self._client, self.config, self._serialize, self._deserialize)
135+
self.billing_role_definitions = BillingRoleDefinitionsOperations(
136+
self._client, self.config, self._serialize, self._deserialize)
137+
self.billing_role_assignments = BillingRoleAssignmentsOperations(
138+
self._client, self.config, self._serialize, self._deserialize)
139+
self.agreements = AgreementsOperations(
140+
self._client, self.config, self._serialize, self._deserialize)
141+
self.enrollment_accounts = EnrollmentAccountsOperations(
142+
self._client, self.config, self._serialize, self._deserialize)
143+
self.billing_periods = BillingPeriodsOperations(
144+
self._client, self.config, self._serialize, self._deserialize)
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
from msrestazure import AzureConfiguration
12+
13+
from .version import VERSION
14+
15+
16+
class BillingManagementClientConfiguration(AzureConfiguration):
17+
"""Configuration for BillingManagementClient
18+
Note that all parameters used to create this instance are saved as instance
19+
attributes.
20+
21+
:param credentials: Credentials needed for the client to connect to Azure.
22+
:type credentials: :mod:`A msrestazure Credentials
23+
object<msrestazure.azure_active_directory>`
24+
:param subscription_id: The ID that uniquely identifies an Azure
25+
subscription.
26+
:type subscription_id: str
27+
:param str base_url: Service URL
28+
"""
29+
30+
def __init__(
31+
self, credentials, subscription_id, base_url=None):
32+
33+
if credentials is None:
34+
raise ValueError("Parameter 'credentials' must not be None.")
35+
if subscription_id is None:
36+
raise ValueError("Parameter 'subscription_id' must not be None.")
37+
if not base_url:
38+
base_url = 'https://management.azure.com'
39+
40+
super(BillingManagementClientConfiguration, self).__init__(base_url)
41+
42+
# Starting Autorest.Python 4.0.64, make connection pool activated by default
43+
self.keep_alive = True
44+
45+
self.add_user_agent('azure-mgmt-billing/{}'.format(VERSION))
46+
self.add_user_agent('Azure-SDK-For-Python')
47+
48+
self.credentials = credentials
49+
self.subscription_id = subscription_id

sdk/billing/azure-mgmt-billing/azure/mgmt/billing/billing_management_client.py

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)