Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -36,7 +36,7 @@
__all__ = [
'BillingAccountsOperations',
'PaymentMethodsOperations',
'BillingAccountsValidateAddressOperations',
'AddressesOperations',
'AvailableBalancesOperations',
'BillingProfilesOperations',
'InvoiceSectionsOperations',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -56,11 +54,7 @@ def post(
:class:`ErrorResponseException<azure.mgmt.billing.models.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 = {}
Expand Down Expand Up @@ -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'}