diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/billing_management_client.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/billing_management_client.py index d04e5f0d8297..95cf1a9c0b59 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/billing_management_client.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/billing_management_client.py @@ -15,7 +15,7 @@ from .version import VERSION from .operations.billing_accounts_operations import BillingAccountsOperations from .operations.payment_methods_operations import PaymentMethodsOperations -from .operations.billing_accounts_validate_address_operations import BillingAccountsValidateAddressOperations +from .operations.addresses_operations import AddressesOperations from .operations.available_balances_operations import AvailableBalancesOperations from .operations.billing_profiles_operations import BillingProfilesOperations from .operations.invoice_sections_operations import InvoiceSectionsOperations @@ -81,8 +81,8 @@ class BillingManagementClient(SDKClient): :vartype billing_accounts: azure.mgmt.billing.operations.BillingAccountsOperations :ivar payment_methods: PaymentMethods operations :vartype payment_methods: azure.mgmt.billing.operations.PaymentMethodsOperations - :ivar billing_accounts_validate_address: BillingAccountsValidateAddress operations - :vartype billing_accounts_validate_address: azure.mgmt.billing.operations.BillingAccountsValidateAddressOperations + :ivar addresses: Addresses operations + :vartype addresses: azure.mgmt.billing.operations.AddressesOperations :ivar available_balances: AvailableBalances operations :vartype available_balances: azure.mgmt.billing.operations.AvailableBalancesOperations :ivar billing_profiles: BillingProfiles operations @@ -147,7 +147,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.payment_methods = PaymentMethodsOperations( self._client, self.config, self._serialize, self._deserialize) - self.billing_accounts_validate_address = BillingAccountsValidateAddressOperations( + self.addresses = AddressesOperations( self._client, self.config, self._serialize, self._deserialize) self.available_balances = AvailableBalancesOperations( self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/__init__.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/__init__.py index d9a2ca49fe76..1afb90bce96d 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/__init__.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/__init__.py @@ -11,7 +11,7 @@ from .billing_accounts_operations import BillingAccountsOperations from .payment_methods_operations import PaymentMethodsOperations -from .billing_accounts_validate_address_operations import BillingAccountsValidateAddressOperations +from .addresses_operations import AddressesOperations from .available_balances_operations import AvailableBalancesOperations from .billing_profiles_operations import BillingProfilesOperations from .invoice_sections_operations import InvoiceSectionsOperations @@ -36,7 +36,7 @@ __all__ = [ 'BillingAccountsOperations', 'PaymentMethodsOperations', - 'BillingAccountsValidateAddressOperations', + 'AddressesOperations', 'AvailableBalancesOperations', 'BillingProfilesOperations', 'InvoiceSectionsOperations', diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_accounts_validate_address_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/addresses_operations.py similarity index 83% rename from sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_accounts_validate_address_operations.py rename to sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/addresses_operations.py index d9d42f694909..d2a69e73def5 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_accounts_validate_address_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/addresses_operations.py @@ -15,8 +15,8 @@ from .. import models -class BillingAccountsValidateAddressOperations(object): - """BillingAccountsValidateAddressOperations operations. +class AddressesOperations(object): + """AddressesOperations operations. :param client: Client for service requests. :param config: Configuration of service client. @@ -36,12 +36,10 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def post( - self, billing_account_name, address, custom_headers=None, raw=False, **operation_config): + def validate( + self, address, custom_headers=None, raw=False, **operation_config): """Validates the address. - :param billing_account_name: billing Account Id. - :type billing_account_name: str :param address: :type address: ~azure.mgmt.billing.models.Address :param dict custom_headers: headers that will be added to the request @@ -56,11 +54,7 @@ def post( :class:`ErrorResponseException` """ # Construct URL - url = self.post.metadata['url'] - path_format_arguments = { - 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) + url = self.validate.metadata['url'] # Construct parameters query_parameters = {} @@ -97,4 +91,4 @@ def post( return client_raw_response return deserialized - post.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/validateAddress'} + validate.metadata = {'url': '/providers/Microsoft.Billing/validateAddress'}