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 846f1ba24dce..c5a3100452db 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 @@ -18,14 +18,16 @@ from .operations.address_operations import AddressOperations from .operations.available_balances_operations import AvailableBalancesOperations from .operations.billing_profiles_operations import BillingProfilesOperations +from .operations.customers_operations import CustomersOperations from .operations.invoice_sections_operations import InvoiceSectionsOperations +from .operations.billing_permissions_operations import BillingPermissionsOperations +from .operations.billing_subscriptions_operations import BillingSubscriptionsOperations +from .operations.products_operations import ProductsOperations +from .operations.transactions_operations import TransactionsOperations from .operations.departments_operations import DepartmentsOperations from .operations.enrollment_accounts_operations import EnrollmentAccountsOperations from .operations.invoices_operations import InvoicesOperations from .operations.price_sheet_operations import PriceSheetOperations -from .operations.billing_subscriptions_operations import BillingSubscriptionsOperations -from .operations.products_operations import ProductsOperations -from .operations.transactions_operations import TransactionsOperations from .operations.policies_operations import PoliciesOperations from .operations.billing_property_operations import BillingPropertyOperations from .operations.transfers_operations import TransfersOperations @@ -33,7 +35,6 @@ from .operations.partner_transfers_transfers_operations import PartnerTransfersTransfersOperations from .operations.recipient_transfers_operations import RecipientTransfersOperations from .operations.operations import Operations -from .operations.billing_permissions_operations import BillingPermissionsOperations from .operations.billing_role_definitions_operations import BillingRoleDefinitionsOperations from .operations.billing_role_assignments_operations import BillingRoleAssignmentsOperations from .operations.agreements_operations import AgreementsOperations @@ -89,8 +90,18 @@ class BillingManagementClient(SDKClient): :vartype available_balances: azure.mgmt.billing.operations.AvailableBalancesOperations :ivar billing_profiles: BillingProfiles operations :vartype billing_profiles: azure.mgmt.billing.operations.BillingProfilesOperations + :ivar customers: Customers operations + :vartype customers: azure.mgmt.billing.operations.CustomersOperations :ivar invoice_sections: InvoiceSections operations :vartype invoice_sections: azure.mgmt.billing.operations.InvoiceSectionsOperations + :ivar billing_permissions: BillingPermissions operations + :vartype billing_permissions: azure.mgmt.billing.operations.BillingPermissionsOperations + :ivar billing_subscriptions: BillingSubscriptions operations + :vartype billing_subscriptions: azure.mgmt.billing.operations.BillingSubscriptionsOperations + :ivar products: Products operations + :vartype products: azure.mgmt.billing.operations.ProductsOperations + :ivar transactions: Transactions operations + :vartype transactions: azure.mgmt.billing.operations.TransactionsOperations :ivar departments: Departments operations :vartype departments: azure.mgmt.billing.operations.DepartmentsOperations :ivar enrollment_accounts: EnrollmentAccounts operations @@ -99,12 +110,6 @@ class BillingManagementClient(SDKClient): :vartype invoices: azure.mgmt.billing.operations.InvoicesOperations :ivar price_sheet: PriceSheet operations :vartype price_sheet: azure.mgmt.billing.operations.PriceSheetOperations - :ivar billing_subscriptions: BillingSubscriptions operations - :vartype billing_subscriptions: azure.mgmt.billing.operations.BillingSubscriptionsOperations - :ivar products: Products operations - :vartype products: azure.mgmt.billing.operations.ProductsOperations - :ivar transactions: Transactions operations - :vartype transactions: azure.mgmt.billing.operations.TransactionsOperations :ivar policies: Policies operations :vartype policies: azure.mgmt.billing.operations.PoliciesOperations :ivar billing_property: BillingProperty operations @@ -119,8 +124,6 @@ class BillingManagementClient(SDKClient): :vartype recipient_transfers: azure.mgmt.billing.operations.RecipientTransfersOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.billing.operations.Operations - :ivar billing_permissions: BillingPermissions operations - :vartype billing_permissions: azure.mgmt.billing.operations.BillingPermissionsOperations :ivar billing_role_definitions: BillingRoleDefinitions operations :vartype billing_role_definitions: azure.mgmt.billing.operations.BillingRoleDefinitionsOperations :ivar billing_role_assignments: BillingRoleAssignments operations @@ -159,8 +162,18 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.billing_profiles = BillingProfilesOperations( self._client, self.config, self._serialize, self._deserialize) + self.customers = CustomersOperations( + self._client, self.config, self._serialize, self._deserialize) self.invoice_sections = InvoiceSectionsOperations( self._client, self.config, self._serialize, self._deserialize) + self.billing_permissions = BillingPermissionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.billing_subscriptions = BillingSubscriptionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.products = ProductsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.transactions = TransactionsOperations( + self._client, self.config, self._serialize, self._deserialize) self.departments = DepartmentsOperations( self._client, self.config, self._serialize, self._deserialize) self.enrollment_accounts = EnrollmentAccountsOperations( @@ -169,12 +182,6 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.price_sheet = PriceSheetOperations( self._client, self.config, self._serialize, self._deserialize) - self.billing_subscriptions = BillingSubscriptionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.products = ProductsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.transactions = TransactionsOperations( - self._client, self.config, self._serialize, self._deserialize) self.policies = PoliciesOperations( self._client, self.config, self._serialize, self._deserialize) self.billing_property = BillingPropertyOperations( @@ -189,8 +196,6 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) - self.billing_permissions = BillingPermissionsOperations( - self._client, self.config, self._serialize, self._deserialize) self.billing_role_definitions = BillingRoleDefinitionsOperations( self._client, self.config, self._serialize, self._deserialize) self.billing_role_assignments = BillingRoleAssignmentsOperations( diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/__init__.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/__init__.py index 8262396dc255..6d3fe3f9e95e 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/__init__.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/__init__.py @@ -10,6 +10,9 @@ # -------------------------------------------------------------------------- try: + from .azure_plan_py3 import AzurePlan + from .reseller_py3 import Reseller + from .customer_py3 import Customer from .initiate_transfer_request_py3 import InitiateTransferRequest from .address_details_py3 import AddressDetails from .validate_address_response_py3 import ValidateAddressResponse @@ -26,7 +29,6 @@ from .validate_subscription_transfer_eligibility_error_py3 import ValidateSubscriptionTransferEligibilityError from .validate_subscription_transfer_eligibility_result_py3 import ValidateSubscriptionTransferEligibilityResult from .update_auto_renew_operation_py3 import UpdateAutoRenewOperation - from .azure_plan_py3 import AzurePlan from .invoice_section_py3 import InvoiceSection from .billing_profile_py3 import BillingProfile from .enrollment_policies_py3 import EnrollmentPolicies @@ -77,8 +79,14 @@ from .participants_py3 import Participants from .agreement_py3 import Agreement from .agreement_list_result_py3 import AgreementListResult + from .validation_result_properties_py3 import ValidationResultProperties + from .validate_transfer_response_py3 import ValidateTransferResponse + from .validate_transfer_list_response_py3 import ValidateTransferListResponse from .line_of_credit_py3 import LineOfCredit except (SyntaxError, ImportError): + from .azure_plan import AzurePlan + from .reseller import Reseller + from .customer import Customer from .initiate_transfer_request import InitiateTransferRequest from .address_details import AddressDetails from .validate_address_response import ValidateAddressResponse @@ -95,7 +103,6 @@ from .validate_subscription_transfer_eligibility_error import ValidateSubscriptionTransferEligibilityError from .validate_subscription_transfer_eligibility_result import ValidateSubscriptionTransferEligibilityResult from .update_auto_renew_operation import UpdateAutoRenewOperation - from .azure_plan import AzurePlan from .invoice_section import InvoiceSection from .billing_profile import BillingProfile from .enrollment_policies import EnrollmentPolicies @@ -146,8 +153,12 @@ from .participants import Participants from .agreement import Agreement from .agreement_list_result import AgreementListResult + from .validation_result_properties import ValidationResultProperties + from .validate_transfer_response import ValidateTransferResponse + from .validate_transfer_list_response import ValidateTransferListResponse from .line_of_credit import LineOfCredit from .payment_method_paged import PaymentMethodPaged +from .customer_paged import CustomerPaged from .billing_subscription_paged import BillingSubscriptionPaged from .product_paged import ProductPaged from .transaction_paged import TransactionPaged @@ -180,6 +191,9 @@ ) __all__ = [ + 'AzurePlan', + 'Reseller', + 'Customer', 'InitiateTransferRequest', 'AddressDetails', 'ValidateAddressResponse', @@ -196,7 +210,6 @@ 'ValidateSubscriptionTransferEligibilityError', 'ValidateSubscriptionTransferEligibilityResult', 'UpdateAutoRenewOperation', - 'AzurePlan', 'InvoiceSection', 'BillingProfile', 'EnrollmentPolicies', @@ -247,8 +260,12 @@ 'Participants', 'Agreement', 'AgreementListResult', + 'ValidationResultProperties', + 'ValidateTransferResponse', + 'ValidateTransferListResponse', 'LineOfCredit', 'PaymentMethodPaged', + 'CustomerPaged', 'BillingSubscriptionPaged', 'ProductPaged', 'TransactionPaged', diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_permissions_list_result.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_permissions_list_result.py index d260a69513d0..c60d01df406b 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_permissions_list_result.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_permissions_list_result.py @@ -18,7 +18,7 @@ class BillingPermissionsListResult(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: The list OF billingPermissions a caller has on a billing + :ivar value: The list of billingPermissions a caller has on a billing account. :vartype value: list[~azure.mgmt.billing.models.BillingPermissionsProperties] diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_permissions_list_result_py3.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_permissions_list_result_py3.py index 8a8ccfb428cf..5870154ed2ee 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_permissions_list_result_py3.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_permissions_list_result_py3.py @@ -18,7 +18,7 @@ class BillingPermissionsListResult(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: The list OF billingPermissions a caller has on a billing + :ivar value: The list of billingPermissions a caller has on a billing account. :vartype value: list[~azure.mgmt.billing.models.BillingPermissionsProperties] diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_role_definition.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_role_definition.py index ce3773364f39..f13b0415a2dd 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_role_definition.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_role_definition.py @@ -26,7 +26,7 @@ class BillingRoleDefinition(Resource): :vartype type: str :ivar description: The role description :vartype description: str - :ivar value: The list OF billingPermissions a caller has on a billing + :ivar value: The list of billingPermissions a caller has on a billing account. :vartype value: list[~azure.mgmt.billing.models.BillingPermissionsProperties] diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_role_definition_py3.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_role_definition_py3.py index c20af66e272f..a38206d5408e 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_role_definition_py3.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_role_definition_py3.py @@ -26,7 +26,7 @@ class BillingRoleDefinition(Resource): :vartype type: str :ivar description: The role description :vartype description: str - :ivar value: The list OF billingPermissions a caller has on a billing + :ivar value: The list of billingPermissions a caller has on a billing account. :vartype value: list[~azure.mgmt.billing.models.BillingPermissionsProperties] diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_subscription.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_subscription.py index 7054405293d8..ec190474d48c 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_subscription.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_subscription.py @@ -42,12 +42,19 @@ class BillingSubscription(Resource): :ivar billing_profile_display_name: Billing Profile display name to which this product belongs. :vartype billing_profile_display_name: str + :ivar customer_id: Customer id to which this product belongs. + :vartype customer_id: str + :ivar customer_display_name: Display name of customer to which this + product belongs. + :vartype customer_display_name: str :ivar invoice_section_id: Invoice section id to which this product belongs. :vartype invoice_section_id: str :ivar invoice_section_display_name: Invoice section display name to which this product belongs. :vartype invoice_section_display_name: str + :ivar reseller: Reseller for this subscription. + :vartype reseller: ~azure.mgmt.billing.models.Reseller :param sku_id: The sku id. :type sku_id: str :ivar sku_description: The sku description. @@ -64,8 +71,11 @@ class BillingSubscription(Resource): 'month_to_date_charges': {'readonly': True}, 'billing_profile_id': {'readonly': True}, 'billing_profile_display_name': {'readonly': True}, + 'customer_id': {'readonly': True}, + 'customer_display_name': {'readonly': True}, 'invoice_section_id': {'readonly': True}, 'invoice_section_display_name': {'readonly': True}, + 'reseller': {'readonly': True}, 'sku_description': {'readonly': True}, } @@ -80,8 +90,11 @@ class BillingSubscription(Resource): 'month_to_date_charges': {'key': 'properties.monthToDateCharges', 'type': 'Amount'}, 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, 'billing_profile_display_name': {'key': 'properties.billingProfileDisplayName', 'type': 'str'}, + 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, + 'customer_display_name': {'key': 'properties.customerDisplayName', 'type': 'str'}, 'invoice_section_id': {'key': 'properties.invoiceSectionId', 'type': 'str'}, 'invoice_section_display_name': {'key': 'properties.invoiceSectionDisplayName', 'type': 'str'}, + 'reseller': {'key': 'properties.reseller', 'type': 'Reseller'}, 'sku_id': {'key': 'properties.skuId', 'type': 'str'}, 'sku_description': {'key': 'properties.skuDescription', 'type': 'str'}, } @@ -95,7 +108,10 @@ def __init__(self, **kwargs): self.month_to_date_charges = None self.billing_profile_id = None self.billing_profile_display_name = None + self.customer_id = None + self.customer_display_name = None self.invoice_section_id = None self.invoice_section_display_name = None + self.reseller = None self.sku_id = kwargs.get('sku_id', None) self.sku_description = None diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_subscription_py3.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_subscription_py3.py index 114e7e970685..0588b67f5595 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_subscription_py3.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/billing_subscription_py3.py @@ -42,12 +42,19 @@ class BillingSubscription(Resource): :ivar billing_profile_display_name: Billing Profile display name to which this product belongs. :vartype billing_profile_display_name: str + :ivar customer_id: Customer id to which this product belongs. + :vartype customer_id: str + :ivar customer_display_name: Display name of customer to which this + product belongs. + :vartype customer_display_name: str :ivar invoice_section_id: Invoice section id to which this product belongs. :vartype invoice_section_id: str :ivar invoice_section_display_name: Invoice section display name to which this product belongs. :vartype invoice_section_display_name: str + :ivar reseller: Reseller for this subscription. + :vartype reseller: ~azure.mgmt.billing.models.Reseller :param sku_id: The sku id. :type sku_id: str :ivar sku_description: The sku description. @@ -64,8 +71,11 @@ class BillingSubscription(Resource): 'month_to_date_charges': {'readonly': True}, 'billing_profile_id': {'readonly': True}, 'billing_profile_display_name': {'readonly': True}, + 'customer_id': {'readonly': True}, + 'customer_display_name': {'readonly': True}, 'invoice_section_id': {'readonly': True}, 'invoice_section_display_name': {'readonly': True}, + 'reseller': {'readonly': True}, 'sku_description': {'readonly': True}, } @@ -80,8 +90,11 @@ class BillingSubscription(Resource): 'month_to_date_charges': {'key': 'properties.monthToDateCharges', 'type': 'Amount'}, 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, 'billing_profile_display_name': {'key': 'properties.billingProfileDisplayName', 'type': 'str'}, + 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, + 'customer_display_name': {'key': 'properties.customerDisplayName', 'type': 'str'}, 'invoice_section_id': {'key': 'properties.invoiceSectionId', 'type': 'str'}, 'invoice_section_display_name': {'key': 'properties.invoiceSectionDisplayName', 'type': 'str'}, + 'reseller': {'key': 'properties.reseller', 'type': 'Reseller'}, 'sku_id': {'key': 'properties.skuId', 'type': 'str'}, 'sku_description': {'key': 'properties.skuDescription', 'type': 'str'}, } @@ -95,7 +108,10 @@ def __init__(self, *, subscription_billing_status=None, sku_id: str=None, **kwar self.month_to_date_charges = None self.billing_profile_id = None self.billing_profile_display_name = None + self.customer_id = None + self.customer_display_name = None self.invoice_section_id = None self.invoice_section_display_name = None + self.reseller = None self.sku_id = sku_id self.sku_description = None diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/customer.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/customer.py new file mode 100644 index 000000000000..de4f86f64204 --- /dev/null +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/customer.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class Customer(Resource): + """A partner's customer. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param display_name: The name of the customer. + :type display_name: str + :param enabled_azure_plans: Information about the product. + :type enabled_azure_plans: list[~azure.mgmt.billing.models.AzurePlan] + :param resellers: The resellers which are allowed to provide service to + this customer. + :type resellers: list[~azure.mgmt.billing.models.Reseller] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'enabled_azure_plans': {'key': 'properties.enabledAzurePlans', 'type': '[AzurePlan]'}, + 'resellers': {'key': 'properties.resellers', 'type': '[Reseller]'}, + } + + def __init__(self, **kwargs): + super(Customer, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.enabled_azure_plans = kwargs.get('enabled_azure_plans', None) + self.resellers = kwargs.get('resellers', None) diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/customer_paged.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/customer_paged.py new file mode 100644 index 000000000000..a0fc9a405887 --- /dev/null +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/customer_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class CustomerPaged(Paged): + """ + A paging container for iterating over a list of :class:`Customer ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Customer]'} + } + + def __init__(self, *args, **kwargs): + + super(CustomerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/customer_py3.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/customer_py3.py new file mode 100644 index 000000000000..791294f68b8c --- /dev/null +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/customer_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class Customer(Resource): + """A partner's customer. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param display_name: The name of the customer. + :type display_name: str + :param enabled_azure_plans: Information about the product. + :type enabled_azure_plans: list[~azure.mgmt.billing.models.AzurePlan] + :param resellers: The resellers which are allowed to provide service to + this customer. + :type resellers: list[~azure.mgmt.billing.models.Reseller] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'enabled_azure_plans': {'key': 'properties.enabledAzurePlans', 'type': '[AzurePlan]'}, + 'resellers': {'key': 'properties.resellers', 'type': '[Reseller]'}, + } + + def __init__(self, *, display_name: str=None, enabled_azure_plans=None, resellers=None, **kwargs) -> None: + super(Customer, self).__init__(**kwargs) + self.display_name = display_name + self.enabled_azure_plans = enabled_azure_plans + self.resellers = resellers diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/product.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/product.py index 480154f9d3a8..88e1c44afa8b 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/product.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/product.py @@ -68,6 +68,11 @@ class Product(Resource): :ivar billing_profile_display_name: Billing Profile display name to which this product belongs. :vartype billing_profile_display_name: str + :ivar customer_id: Customer id to which this product belongs. + :vartype customer_id: str + :ivar customer_display_name: Display name of customer to which this + product belongs. + :vartype customer_display_name: str """ _validation = { @@ -90,6 +95,8 @@ class Product(Resource): 'invoice_section_display_name': {'readonly': True}, 'billing_profile_id': {'readonly': True}, 'billing_profile_display_name': {'readonly': True}, + 'customer_id': {'readonly': True}, + 'customer_display_name': {'readonly': True}, } _attribute_map = { @@ -114,6 +121,8 @@ class Product(Resource): 'invoice_section_display_name': {'key': 'properties.invoiceSectionDisplayName', 'type': 'str'}, 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, 'billing_profile_display_name': {'key': 'properties.billingProfileDisplayName', 'type': 'str'}, + 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, + 'customer_display_name': {'key': 'properties.customerDisplayName', 'type': 'str'}, } def __init__(self, **kwargs): @@ -136,3 +145,5 @@ def __init__(self, **kwargs): self.invoice_section_display_name = None self.billing_profile_id = None self.billing_profile_display_name = None + self.customer_id = None + self.customer_display_name = None diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/product_py3.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/product_py3.py index dbbc497aa68a..b55a1f0d658a 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/product_py3.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/product_py3.py @@ -68,6 +68,11 @@ class Product(Resource): :ivar billing_profile_display_name: Billing Profile display name to which this product belongs. :vartype billing_profile_display_name: str + :ivar customer_id: Customer id to which this product belongs. + :vartype customer_id: str + :ivar customer_display_name: Display name of customer to which this + product belongs. + :vartype customer_display_name: str """ _validation = { @@ -90,6 +95,8 @@ class Product(Resource): 'invoice_section_display_name': {'readonly': True}, 'billing_profile_id': {'readonly': True}, 'billing_profile_display_name': {'readonly': True}, + 'customer_id': {'readonly': True}, + 'customer_display_name': {'readonly': True}, } _attribute_map = { @@ -114,6 +121,8 @@ class Product(Resource): 'invoice_section_display_name': {'key': 'properties.invoiceSectionDisplayName', 'type': 'str'}, 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, 'billing_profile_display_name': {'key': 'properties.billingProfileDisplayName', 'type': 'str'}, + 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, + 'customer_display_name': {'key': 'properties.customerDisplayName', 'type': 'str'}, } def __init__(self, *, status=None, billing_frequency=None, **kwargs) -> None: @@ -136,3 +145,5 @@ def __init__(self, *, status=None, billing_frequency=None, **kwargs) -> None: self.invoice_section_display_name = None self.billing_profile_id = None self.billing_profile_display_name = None + self.customer_id = None + self.customer_display_name = None diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/reseller.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/reseller.py new file mode 100644 index 000000000000..2e2362939ba8 --- /dev/null +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/reseller.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Reseller(Model): + """Details about a reseller. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar reseller_id: The reseller id. + :vartype reseller_id: str + :ivar description: A description of the reseller. + :vartype description: str + """ + + _validation = { + 'reseller_id': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'reseller_id': {'key': 'resellerId', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Reseller, self).__init__(**kwargs) + self.reseller_id = None + self.description = None diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/reseller_py3.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/reseller_py3.py new file mode 100644 index 000000000000..42ef09d210de --- /dev/null +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/reseller_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Reseller(Model): + """Details about a reseller. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar reseller_id: The reseller id. + :vartype reseller_id: str + :ivar description: A description of the reseller. + :vartype description: str + """ + + _validation = { + 'reseller_id': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'reseller_id': {'key': 'resellerId', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Reseller, self).__init__(**kwargs) + self.reseller_id = None + self.description = None diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/transaction.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/transaction.py index e1a932bef24e..8eae5338e46e 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/transaction.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/transaction.py @@ -62,6 +62,11 @@ class Transaction(Resource): :ivar billing_profile_display_name: Billing Profile display name to which this product belongs. :vartype billing_profile_display_name: str + :ivar customer_id: Customer id to which this product belongs. + :vartype customer_id: str + :ivar customer_display_name: Display name of customer to which this + product belongs. + :vartype customer_display_name: str :ivar subscription_id: The subscription id. :vartype subscription_id: str :ivar subscription_name: The subscription name. @@ -86,6 +91,8 @@ class Transaction(Resource): 'invoice_section_display_name': {'readonly': True}, 'billing_profile_id': {'readonly': True}, 'billing_profile_display_name': {'readonly': True}, + 'customer_id': {'readonly': True}, + 'customer_display_name': {'readonly': True}, 'subscription_id': {'readonly': True}, 'subscription_name': {'readonly': True}, } @@ -110,6 +117,8 @@ class Transaction(Resource): 'invoice_section_display_name': {'key': 'properties.invoiceSectionDisplayName', 'type': 'str'}, 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, 'billing_profile_display_name': {'key': 'properties.billingProfileDisplayName', 'type': 'str'}, + 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, + 'customer_display_name': {'key': 'properties.customerDisplayName', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, } @@ -132,5 +141,7 @@ def __init__(self, **kwargs): self.invoice_section_display_name = None self.billing_profile_id = None self.billing_profile_display_name = None + self.customer_id = None + self.customer_display_name = None self.subscription_id = None self.subscription_name = None diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/transaction_py3.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/transaction_py3.py index a3058621988e..84a620180c84 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/transaction_py3.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/transaction_py3.py @@ -62,6 +62,11 @@ class Transaction(Resource): :ivar billing_profile_display_name: Billing Profile display name to which this product belongs. :vartype billing_profile_display_name: str + :ivar customer_id: Customer id to which this product belongs. + :vartype customer_id: str + :ivar customer_display_name: Display name of customer to which this + product belongs. + :vartype customer_display_name: str :ivar subscription_id: The subscription id. :vartype subscription_id: str :ivar subscription_name: The subscription name. @@ -86,6 +91,8 @@ class Transaction(Resource): 'invoice_section_display_name': {'readonly': True}, 'billing_profile_id': {'readonly': True}, 'billing_profile_display_name': {'readonly': True}, + 'customer_id': {'readonly': True}, + 'customer_display_name': {'readonly': True}, 'subscription_id': {'readonly': True}, 'subscription_name': {'readonly': True}, } @@ -110,6 +117,8 @@ class Transaction(Resource): 'invoice_section_display_name': {'key': 'properties.invoiceSectionDisplayName', 'type': 'str'}, 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, 'billing_profile_display_name': {'key': 'properties.billingProfileDisplayName', 'type': 'str'}, + 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, + 'customer_display_name': {'key': 'properties.customerDisplayName', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, } @@ -132,5 +141,7 @@ def __init__(self, *, kind=None, transaction_type=None, **kwargs) -> None: self.invoice_section_display_name = None self.billing_profile_id = None self.billing_profile_display_name = None + self.customer_id = None + self.customer_display_name = None self.subscription_id = None self.subscription_name = None diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validate_transfer_list_response.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validate_transfer_list_response.py new file mode 100644 index 000000000000..29704a4e055c --- /dev/null +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validate_transfer_list_response.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateTransferListResponse(Model): + """Result of transfer validation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of transfer validation results. + :vartype value: list[~azure.mgmt.billing.models.ValidateTransferResponse] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ValidateTransferResponse]'}, + } + + def __init__(self, **kwargs): + super(ValidateTransferListResponse, self).__init__(**kwargs) + self.value = None diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validate_transfer_list_response_py3.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validate_transfer_list_response_py3.py new file mode 100644 index 000000000000..88e2f5588148 --- /dev/null +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validate_transfer_list_response_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateTransferListResponse(Model): + """Result of transfer validation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of transfer validation results. + :vartype value: list[~azure.mgmt.billing.models.ValidateTransferResponse] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ValidateTransferResponse]'}, + } + + def __init__(self, **kwargs) -> None: + super(ValidateTransferListResponse, self).__init__(**kwargs) + self.value = None diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validate_transfer_response.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validate_transfer_response.py new file mode 100644 index 000000000000..6d7006eb04db --- /dev/null +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validate_transfer_response.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateTransferResponse(Model): + """Transfer validation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The status of validation + :vartype status: str + :ivar product_id: The product id for which this result applies. + :vartype product_id: str + :param results: Array of validation results. + :type results: list[~azure.mgmt.billing.models.ValidationResultProperties] + """ + + _validation = { + 'status': {'readonly': True}, + 'product_id': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'product_id': {'key': 'properties.productId', 'type': 'str'}, + 'results': {'key': 'properties.results', 'type': '[ValidationResultProperties]'}, + } + + def __init__(self, **kwargs): + super(ValidateTransferResponse, self).__init__(**kwargs) + self.status = None + self.product_id = None + self.results = kwargs.get('results', None) diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validate_transfer_response_py3.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validate_transfer_response_py3.py new file mode 100644 index 000000000000..f9b2c97ab9f1 --- /dev/null +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validate_transfer_response_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateTransferResponse(Model): + """Transfer validation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The status of validation + :vartype status: str + :ivar product_id: The product id for which this result applies. + :vartype product_id: str + :param results: Array of validation results. + :type results: list[~azure.mgmt.billing.models.ValidationResultProperties] + """ + + _validation = { + 'status': {'readonly': True}, + 'product_id': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'product_id': {'key': 'properties.productId', 'type': 'str'}, + 'results': {'key': 'properties.results', 'type': '[ValidationResultProperties]'}, + } + + def __init__(self, *, results=None, **kwargs) -> None: + super(ValidateTransferResponse, self).__init__(**kwargs) + self.status = None + self.product_id = None + self.results = results diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validation_result_properties.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validation_result_properties.py new file mode 100644 index 000000000000..b9085ac85ca6 --- /dev/null +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validation_result_properties.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidationResultProperties(Model): + """The properties of the validation result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar level: Result Level. + :vartype level: str + :ivar code: Result Code. + :vartype code: str + :ivar message: The validation message. + :vartype message: str + """ + + _validation = { + 'level': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'level': {'key': 'level', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ValidationResultProperties, self).__init__(**kwargs) + self.level = None + self.code = None + self.message = None diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validation_result_properties_py3.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validation_result_properties_py3.py new file mode 100644 index 000000000000..0ecc612d4219 --- /dev/null +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/validation_result_properties_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidationResultProperties(Model): + """The properties of the validation result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar level: Result Level. + :vartype level: str + :ivar code: Result Code. + :vartype code: str + :ivar message: The validation message. + :vartype message: str + """ + + _validation = { + 'level': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'level': {'key': 'level', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ValidationResultProperties, self).__init__(**kwargs) + self.level = None + self.code = None + self.message = None 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 c95b14cbb6a4..b2620e729e34 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 @@ -14,14 +14,16 @@ from .address_operations import AddressOperations from .available_balances_operations import AvailableBalancesOperations from .billing_profiles_operations import BillingProfilesOperations +from .customers_operations import CustomersOperations from .invoice_sections_operations import InvoiceSectionsOperations +from .billing_permissions_operations import BillingPermissionsOperations +from .billing_subscriptions_operations import BillingSubscriptionsOperations +from .products_operations import ProductsOperations +from .transactions_operations import TransactionsOperations from .departments_operations import DepartmentsOperations from .enrollment_accounts_operations import EnrollmentAccountsOperations from .invoices_operations import InvoicesOperations from .price_sheet_operations import PriceSheetOperations -from .billing_subscriptions_operations import BillingSubscriptionsOperations -from .products_operations import ProductsOperations -from .transactions_operations import TransactionsOperations from .policies_operations import PoliciesOperations from .billing_property_operations import BillingPropertyOperations from .transfers_operations import TransfersOperations @@ -29,7 +31,6 @@ from .partner_transfers_transfers_operations import PartnerTransfersTransfersOperations from .recipient_transfers_operations import RecipientTransfersOperations from .operations import Operations -from .billing_permissions_operations import BillingPermissionsOperations from .billing_role_definitions_operations import BillingRoleDefinitionsOperations from .billing_role_assignments_operations import BillingRoleAssignmentsOperations from .agreements_operations import AgreementsOperations @@ -41,14 +42,16 @@ 'AddressOperations', 'AvailableBalancesOperations', 'BillingProfilesOperations', + 'CustomersOperations', 'InvoiceSectionsOperations', + 'BillingPermissionsOperations', + 'BillingSubscriptionsOperations', + 'ProductsOperations', + 'TransactionsOperations', 'DepartmentsOperations', 'EnrollmentAccountsOperations', 'InvoicesOperations', 'PriceSheetOperations', - 'BillingSubscriptionsOperations', - 'ProductsOperations', - 'TransactionsOperations', 'PoliciesOperations', 'BillingPropertyOperations', 'TransfersOperations', @@ -56,7 +59,6 @@ 'PartnerTransfersTransfersOperations', 'RecipientTransfersOperations', 'Operations', - 'BillingPermissionsOperations', 'BillingRoleDefinitionsOperations', 'BillingRoleAssignmentsOperations', 'AgreementsOperations', diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/agreements_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/agreements_operations.py index eaf36ff6e056..e7be5dd5737e 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/agreements_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/agreements_operations.py @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def list_by_billing_account_name( + def list_by_billing_account( self, billing_account_name, expand=None, custom_headers=None, raw=False, **operation_config): """Lists all agreements for a billing account. @@ -56,7 +56,7 @@ def list_by_billing_account_name( :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_billing_account_name.metadata['url'] + url = self.list_by_billing_account.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str') } @@ -95,7 +95,7 @@ def list_by_billing_account_name( return client_raw_response return deserialized - list_by_billing_account_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements'} + list_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements'} def get( self, billing_account_name, agreement_name, expand=None, custom_headers=None, raw=False, **operation_config): diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_permissions_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_permissions_operations.py index d30310e261d2..c3c62b317396 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_permissions_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_permissions_operations.py @@ -36,6 +36,66 @@ def __init__(self, client, config, serializer, deserializer): self.config = config + def list_by_customer( + self, billing_account_name, customer_name, custom_headers=None, raw=False, **operation_config): + """Lists all billing permissions the caller has for a customer. + + :param billing_account_name: billing Account Id. + :type billing_account_name: str + :param customer_name: Customer name. + :type customer_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BillingPermissionsListResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.billing.models.BillingPermissionsListResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_customer.metadata['url'] + path_format_arguments = { + 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), + 'customerName': self._serialize.url("customer_name", customer_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BillingPermissionsListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_customer.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingPermissions'} + def list_by_billing_account( self, billing_account_name, custom_headers=None, raw=False, **operation_config): """Lists all billing permissions for the caller under a billing account. @@ -158,7 +218,7 @@ def list_by_invoice_sections( def list_by_billing_profile( self, billing_account_name, billing_profile_name, custom_headers=None, raw=False, **operation_config): - """Lists all billing permissions for the caller has for a billing account. + """Lists all billing permissions the caller has for a billing account. :param billing_account_name: billing Account Id. :type billing_account_name: str diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_profiles_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_profiles_operations.py index 8e12a121031c..ebb175f0ca2c 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_profiles_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_profiles_operations.py @@ -38,7 +38,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def list_by_billing_account_name( + def list_by_billing_account( self, billing_account_name, expand=None, custom_headers=None, raw=False, **operation_config): """Lists all billing profiles for a user which that user has access to. @@ -58,7 +58,7 @@ def list_by_billing_account_name( :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_billing_account_name.metadata['url'] + url = self.list_by_billing_account.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str') } @@ -97,7 +97,7 @@ def list_by_billing_account_name( return client_raw_response return deserialized - list_by_billing_account_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles'} + list_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles'} def get( self, billing_account_name, billing_profile_name, expand=None, custom_headers=None, raw=False, **operation_config): diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_role_assignments_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_role_assignments_operations.py index 9268b1bdd766..eccbd21f94bc 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_role_assignments_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_role_assignments_operations.py @@ -96,7 +96,7 @@ def get_by_billing_account( return deserialized get_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments/{billingRoleAssignmentName}'} - def delete_by_billing_account_name( + def delete_by_billing_account( self, billing_account_name, billing_role_assignment_name, custom_headers=None, raw=False, **operation_config): """Delete the role assignment on this billing account. @@ -116,7 +116,7 @@ def delete_by_billing_account_name( :class:`ErrorResponseException` """ # Construct URL - url = self.delete_by_billing_account_name.metadata['url'] + url = self.delete_by_billing_account.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingRoleAssignmentName': self._serialize.url("billing_role_assignment_name", billing_role_assignment_name, 'str') @@ -154,9 +154,9 @@ def delete_by_billing_account_name( return client_raw_response return deserialized - delete_by_billing_account_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments/{billingRoleAssignmentName}'} + delete_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments/{billingRoleAssignmentName}'} - def get_by_invoice_section_name( + def get_by_invoice_section( self, billing_account_name, billing_profile_name, invoice_section_name, billing_role_assignment_name, custom_headers=None, raw=False, **operation_config): """Get the role assignment for the caller on the invoice Section. @@ -180,7 +180,7 @@ def get_by_invoice_section_name( :class:`ErrorResponseException` """ # Construct URL - url = self.get_by_invoice_section_name.metadata['url'] + url = self.get_by_invoice_section.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str'), @@ -220,9 +220,9 @@ def get_by_invoice_section_name( return client_raw_response return deserialized - get_by_invoice_section_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments/{billingRoleAssignmentName}'} + get_by_invoice_section.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments/{billingRoleAssignmentName}'} - def delete_by_invoice_section_name( + def delete_by_invoice_section( self, billing_account_name, billing_profile_name, invoice_section_name, billing_role_assignment_name, custom_headers=None, raw=False, **operation_config): """Delete the role assignment on the invoice Section. @@ -246,7 +246,7 @@ def delete_by_invoice_section_name( :class:`ErrorResponseException` """ # Construct URL - url = self.delete_by_invoice_section_name.metadata['url'] + url = self.delete_by_invoice_section.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str'), @@ -286,9 +286,9 @@ def delete_by_invoice_section_name( return client_raw_response return deserialized - delete_by_invoice_section_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments/{billingRoleAssignmentName}'} + delete_by_invoice_section.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments/{billingRoleAssignmentName}'} - def get_by_billing_profile_name( + def get_by_billing_profile( self, billing_account_name, billing_profile_name, billing_role_assignment_name, custom_headers=None, raw=False, **operation_config): """Get the role assignment for the caller on the Billing Profile. @@ -310,7 +310,7 @@ def get_by_billing_profile_name( :class:`ErrorResponseException` """ # Construct URL - url = self.get_by_billing_profile_name.metadata['url'] + url = self.get_by_billing_profile.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str'), @@ -349,9 +349,9 @@ def get_by_billing_profile_name( return client_raw_response return deserialized - get_by_billing_profile_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments/{billingRoleAssignmentName}'} + get_by_billing_profile.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments/{billingRoleAssignmentName}'} - def delete_by_billing_profile_name( + def delete_by_billing_profile( self, billing_account_name, billing_profile_name, billing_role_assignment_name, custom_headers=None, raw=False, **operation_config): """Delete the role assignment on this Billing Profile. @@ -373,7 +373,7 @@ def delete_by_billing_profile_name( :class:`ErrorResponseException` """ # Construct URL - url = self.delete_by_billing_profile_name.metadata['url'] + url = self.delete_by_billing_profile.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str'), @@ -412,9 +412,9 @@ def delete_by_billing_profile_name( return client_raw_response return deserialized - delete_by_billing_profile_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments/{billingRoleAssignmentName}'} + delete_by_billing_profile.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments/{billingRoleAssignmentName}'} - def list_by_billing_account_name( + def list_by_billing_account( self, billing_account_name, custom_headers=None, raw=False, **operation_config): """Get the role assignments on the Billing Account. @@ -433,7 +433,7 @@ def list_by_billing_account_name( :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_billing_account_name.metadata['url'] + url = self.list_by_billing_account.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str') } @@ -470,9 +470,9 @@ def list_by_billing_account_name( return client_raw_response return deserialized - list_by_billing_account_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments'} + list_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments'} - def add_by_billing_account_name( + def add_by_billing_account( self, billing_account_name, principal_id=None, billing_role_definition_id=None, custom_headers=None, raw=False, **operation_config): """The operation to add a role assignment to a billing account. @@ -498,7 +498,7 @@ def add_by_billing_account_name( parameters = models.BillingRoleAssignmentPayload(principal_id=principal_id, billing_role_definition_id=billing_role_definition_id) # Construct URL - url = self.add_by_billing_account_name.metadata['url'] + url = self.add_by_billing_account.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str') } @@ -539,9 +539,9 @@ def add_by_billing_account_name( return client_raw_response return deserialized - add_by_billing_account_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/createBillingRoleAssignment'} + add_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/createBillingRoleAssignment'} - def list_by_invoice_section_name( + def list_by_invoice_section( self, billing_account_name, billing_profile_name, invoice_section_name, custom_headers=None, raw=False, **operation_config): """Get the role assignments on the invoice Section. @@ -564,7 +564,7 @@ def list_by_invoice_section_name( :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_invoice_section_name.metadata['url'] + url = self.list_by_invoice_section.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str'), @@ -603,9 +603,9 @@ def list_by_invoice_section_name( return client_raw_response return deserialized - list_by_invoice_section_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments'} + list_by_invoice_section.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments'} - def add_by_invoice_section_name( + def add_by_invoice_section( self, billing_account_name, billing_profile_name, invoice_section_name, principal_id=None, billing_role_definition_id=None, custom_headers=None, raw=False, **operation_config): """The operation to add a role assignment to a invoice Section. @@ -635,7 +635,7 @@ def add_by_invoice_section_name( parameters = models.BillingRoleAssignmentPayload(principal_id=principal_id, billing_role_definition_id=billing_role_definition_id) # Construct URL - url = self.add_by_invoice_section_name.metadata['url'] + url = self.add_by_invoice_section.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str'), @@ -678,9 +678,9 @@ def add_by_invoice_section_name( return client_raw_response return deserialized - add_by_invoice_section_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/createBillingRoleAssignment'} + add_by_invoice_section.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/createBillingRoleAssignment'} - def list_by_billing_profile_name( + def list_by_billing_profile( self, billing_account_name, billing_profile_name, custom_headers=None, raw=False, **operation_config): """Get the role assignments on the Billing Profile. @@ -701,7 +701,7 @@ def list_by_billing_profile_name( :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_billing_profile_name.metadata['url'] + url = self.list_by_billing_profile.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str') @@ -739,9 +739,9 @@ def list_by_billing_profile_name( return client_raw_response return deserialized - list_by_billing_profile_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments'} + list_by_billing_profile.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments'} - def add_by_billing_profile_name( + def add_by_billing_profile( self, billing_account_name, billing_profile_name, principal_id=None, billing_role_definition_id=None, custom_headers=None, raw=False, **operation_config): """The operation to add a role assignment to a billing profile. @@ -769,7 +769,7 @@ def add_by_billing_profile_name( parameters = models.BillingRoleAssignmentPayload(principal_id=principal_id, billing_role_definition_id=billing_role_definition_id) # Construct URL - url = self.add_by_billing_profile_name.metadata['url'] + url = self.add_by_billing_profile.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str') @@ -811,4 +811,4 @@ def add_by_billing_profile_name( return client_raw_response return deserialized - add_by_billing_profile_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/createBillingRoleAssignment'} + add_by_billing_profile.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/createBillingRoleAssignment'} diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_role_definitions_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_role_definitions_operations.py index 1bc1fe026f32..672f2831ad61 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_role_definitions_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_role_definitions_operations.py @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def get_by_billing_account_name( + def get_by_billing_account( self, billing_account_name, billing_role_definition_name, custom_headers=None, raw=False, **operation_config): """Gets the role definition for a role. @@ -56,7 +56,7 @@ def get_by_billing_account_name( :class:`ErrorResponseException` """ # Construct URL - url = self.get_by_billing_account_name.metadata['url'] + url = self.get_by_billing_account.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingRoleDefinitionName': self._serialize.url("billing_role_definition_name", billing_role_definition_name, 'str') @@ -94,9 +94,9 @@ def get_by_billing_account_name( return client_raw_response return deserialized - get_by_billing_account_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/{billingRoleDefinitionName}'} + get_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/{billingRoleDefinitionName}'} - def get_by_invoice_section_name( + def get_by_invoice_section( self, billing_account_name, billing_profile_name, invoice_section_name, billing_role_definition_name, custom_headers=None, raw=False, **operation_config): """Gets the role definition for a role. @@ -120,7 +120,7 @@ def get_by_invoice_section_name( :class:`ErrorResponseException` """ # Construct URL - url = self.get_by_invoice_section_name.metadata['url'] + url = self.get_by_invoice_section.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str'), @@ -160,9 +160,9 @@ def get_by_invoice_section_name( return client_raw_response return deserialized - get_by_invoice_section_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions/{billingRoleDefinitionName}'} + get_by_invoice_section.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions/{billingRoleDefinitionName}'} - def get_by_billing_profile_name( + def get_by_billing_profile( self, billing_account_name, billing_profile_name, billing_role_definition_name, custom_headers=None, raw=False, **operation_config): """Gets the role definition for a role. @@ -184,7 +184,7 @@ def get_by_billing_profile_name( :class:`ErrorResponseException` """ # Construct URL - url = self.get_by_billing_profile_name.metadata['url'] + url = self.get_by_billing_profile.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str'), @@ -223,9 +223,9 @@ def get_by_billing_profile_name( return client_raw_response return deserialized - get_by_billing_profile_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions/{billingRoleDefinitionName}'} + get_by_billing_profile.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions/{billingRoleDefinitionName}'} - def list_by_billing_account_name( + def list_by_billing_account( self, billing_account_name, custom_headers=None, raw=False, **operation_config): """Lists the role definition for a billing account. @@ -244,7 +244,7 @@ def list_by_billing_account_name( :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_billing_account_name.metadata['url'] + url = self.list_by_billing_account.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str') } @@ -281,9 +281,9 @@ def list_by_billing_account_name( return client_raw_response return deserialized - list_by_billing_account_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions'} + list_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions'} - def list_by_invoice_section_name( + def list_by_invoice_section( self, billing_account_name, billing_profile_name, invoice_section_name, custom_headers=None, raw=False, **operation_config): """Lists the role definition for an invoice Section. @@ -306,7 +306,7 @@ def list_by_invoice_section_name( :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_invoice_section_name.metadata['url'] + url = self.list_by_invoice_section.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str'), @@ -345,9 +345,9 @@ def list_by_invoice_section_name( return client_raw_response return deserialized - list_by_invoice_section_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions'} + list_by_invoice_section.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions'} - def list_by_billing_profile_name( + def list_by_billing_profile( self, billing_account_name, billing_profile_name, custom_headers=None, raw=False, **operation_config): """Lists the role definition for a Billing Profile. @@ -368,7 +368,7 @@ def list_by_billing_profile_name( :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_billing_profile_name.metadata['url'] + url = self.list_by_billing_profile.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str') @@ -406,4 +406,4 @@ def list_by_billing_profile_name( return client_raw_response return deserialized - list_by_billing_profile_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions'} + list_by_billing_profile.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions'} diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_subscriptions_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_subscriptions_operations.py index 65232a578453..18a590aa5ca7 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_subscriptions_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/billing_subscriptions_operations.py @@ -38,7 +38,138 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def list_by_billing_account_name( + def list_by_customer( + self, billing_account_name, customer_name, custom_headers=None, raw=False, **operation_config): + """Lists billing subscription by customer id. + + :param billing_account_name: billing Account Id. + :type billing_account_name: str + :param customer_name: Customer name. + :type customer_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BillingSubscription + :rtype: + ~azure.mgmt.billing.models.BillingSubscriptionPaged[~azure.mgmt.billing.models.BillingSubscription] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_customer.metadata['url'] + path_format_arguments = { + 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), + 'customerName': self._serialize.url("customer_name", customer_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.BillingSubscriptionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.BillingSubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_customer.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions'} + + def get_by_customer( + self, billing_account_name, customer_name, billing_subscription_name, custom_headers=None, raw=False, **operation_config): + """Get a single billing subscription by id. + + :param billing_account_name: billing Account Id. + :type billing_account_name: str + :param customer_name: Customer name. + :type customer_name: str + :param billing_subscription_name: Billing Subscription Id. + :type billing_subscription_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BillingSubscription or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.billing.models.BillingSubscription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_customer.metadata['url'] + path_format_arguments = { + 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), + 'customerName': self._serialize.url("customer_name", customer_name, 'str'), + 'billingSubscriptionName': self._serialize.url("billing_subscription_name", billing_subscription_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BillingSubscription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_customer.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/{billingSubscriptionName}'} + + def list_by_billing_account( self, billing_account_name, custom_headers=None, raw=False, **operation_config): """Lists billing subscriptions by billing account name. @@ -59,7 +190,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_billing_account_name.metadata['url'] + url = self.list_by_billing_account.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str') } @@ -101,9 +232,9 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_billing_account_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions'} + list_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions'} - def list_by_billing_profile_name( + def list_by_billing_profile( self, billing_account_name, billing_profile_name, custom_headers=None, raw=False, **operation_config): """Lists billing subscriptions by billing profile name. @@ -124,7 +255,7 @@ def list_by_billing_profile_name( :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_billing_profile_name.metadata['url'] + url = self.list_by_billing_profile.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str') @@ -162,9 +293,9 @@ def list_by_billing_profile_name( return client_raw_response return deserialized - list_by_billing_profile_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingSubscriptions'} + list_by_billing_profile.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingSubscriptions'} - def list_by_invoice_section_name( + def list_by_invoice_section( self, billing_account_name, billing_profile_name, invoice_section_name, custom_headers=None, raw=False, **operation_config): """Lists billing subscription by invoice section name. @@ -187,7 +318,7 @@ def list_by_invoice_section_name( :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_invoice_section_name.metadata['url'] + url = self.list_by_invoice_section.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str'), @@ -226,7 +357,7 @@ def list_by_invoice_section_name( return client_raw_response return deserialized - list_by_invoice_section_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions'} + list_by_invoice_section.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions'} def get( self, billing_account_name, billing_profile_name, invoice_section_name, billing_subscription_name, custom_headers=None, raw=False, **operation_config): diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/customers_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/customers_operations.py new file mode 100644 index 000000000000..ab3de9481969 --- /dev/null +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/customers_operations.py @@ -0,0 +1,258 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class CustomersOperations(object): + """CustomersOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-10-01-preview. Constant value: "2019-10-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-10-01-preview" + + self.config = config + + def list_by_billing_profile( + self, billing_account_name, billing_profile_name, filter=None, skiptoken=None, custom_headers=None, raw=False, **operation_config): + """Lists customers by billing profile which the current user can work with + on-behalf of a partner. + + :param billing_account_name: billing Account Id. + :type billing_account_name: str + :param billing_profile_name: Billing Profile Id. + :type billing_profile_name: str + :param filter: May be used to filter the list of customers. + :type filter: str + :param skiptoken: Skiptoken is only used if a previous operation + returned a partial result. If a previous response contains a nextLink + element, the value of the nextLink element will include a skiptoken + parameter that specifies a starting point to use for subsequent calls. + :type skiptoken: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Customer + :rtype: + ~azure.mgmt.billing.models.CustomerPaged[~azure.mgmt.billing.models.Customer] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_billing_profile.metadata['url'] + path_format_arguments = { + 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), + 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.CustomerPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.CustomerPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_billing_profile.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers'} + + def list_by_billing_account( + self, billing_account_name, filter=None, skiptoken=None, custom_headers=None, raw=False, **operation_config): + """Lists customers which the current user can work with on-behalf of a + partner. + + :param billing_account_name: billing Account Id. + :type billing_account_name: str + :param filter: May be used to filter the list of customers. + :type filter: str + :param skiptoken: Skiptoken is only used if a previous operation + returned a partial result. If a previous response contains a nextLink + element, the value of the nextLink element will include a skiptoken + parameter that specifies a starting point to use for subsequent calls. + :type skiptoken: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Customer + :rtype: + ~azure.mgmt.billing.models.CustomerPaged[~azure.mgmt.billing.models.Customer] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_billing_account.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) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.CustomerPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.CustomerPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers'} + + def get( + self, billing_account_name, customer_name, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets a customer by its id. + + :param billing_account_name: billing Account Id. + :type billing_account_name: str + :param customer_name: Customer name. + :type customer_name: str + :param expand: May be used to expand enabledAzurePlans, resellers. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Customer or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.billing.models.Customer or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), + 'customerName': self._serialize.url("customer_name", customer_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Customer', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}'} diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/invoice_sections_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/invoice_sections_operations.py index b2ce85ebd58c..681939b435e7 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/invoice_sections_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/invoice_sections_operations.py @@ -38,7 +38,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def list_by_billing_profile_name( + def list_by_billing_profile( self, billing_account_name, billing_profile_name, custom_headers=None, raw=False, **operation_config): """Lists all invoice sections for a user which he has access to. @@ -58,7 +58,7 @@ def list_by_billing_profile_name( :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_billing_profile_name.metadata['url'] + url = self.list_by_billing_profile.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str') @@ -96,7 +96,7 @@ def list_by_billing_profile_name( return client_raw_response return deserialized - list_by_billing_profile_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections'} + list_by_billing_profile.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections'} def get( self, billing_account_name, billing_profile_name, invoice_section_name, custom_headers=None, raw=False, **operation_config): diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/invoices_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/invoices_operations.py index 9af57c027d62..06ba09c882da 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/invoices_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/invoices_operations.py @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def list_by_billing_account_name( + def list_by_billing_account( self, billing_account_name, period_start_date, period_end_date, custom_headers=None, raw=False, **operation_config): """List of invoices for a billing account. @@ -58,7 +58,7 @@ def list_by_billing_account_name( :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_billing_account_name.metadata['url'] + url = self.list_by_billing_account.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str') } @@ -97,7 +97,7 @@ def list_by_billing_account_name( return client_raw_response return deserialized - list_by_billing_account_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices'} + list_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices'} def list_by_billing_profile( self, billing_account_name, billing_profile_name, period_start_date, period_end_date, custom_headers=None, raw=False, **operation_config): diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/payment_methods_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/payment_methods_operations.py index 5babbbd9bcda..8ca3cd614c60 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/payment_methods_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/payment_methods_operations.py @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def list_by_billing_account_name( + def list_by_billing_account( self, billing_account_name, custom_headers=None, raw=False, **operation_config): """Lists the Payment Methods by billing account Id. @@ -57,7 +57,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_billing_account_name.metadata['url'] + url = self.list_by_billing_account.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str') } @@ -99,9 +99,9 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_billing_account_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/paymentMethods'} + list_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/paymentMethods'} - def list_by_billing_profile_name( + def list_by_billing_profile( self, billing_account_name, billing_profile_name, custom_headers=None, raw=False, **operation_config): """Lists the Payment Methods by billing profile Id. @@ -124,7 +124,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_billing_profile_name.metadata['url'] + url = self.list_by_billing_profile.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str') @@ -167,4 +167,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_billing_profile_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/paymentMethods'} + list_by_billing_profile.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/paymentMethods'} diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/policies_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/policies_operations.py index 14c4cf690934..09b579225e90 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/policies_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/policies_operations.py @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def get_by_billing_profile_name( + def get_by_billing_profile( self, billing_account_name, billing_profile_name, custom_headers=None, raw=False, **operation_config): """The policy for a given billing account name and billing profile name. @@ -56,7 +56,7 @@ def get_by_billing_profile_name( :class:`ErrorResponseException` """ # Construct URL - url = self.get_by_billing_profile_name.metadata['url'] + url = self.get_by_billing_profile.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str') @@ -94,7 +94,7 @@ def get_by_billing_profile_name( return client_raw_response return deserialized - get_by_billing_profile_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default'} + get_by_billing_profile.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default'} def update( self, billing_account_name, billing_profile_name, parameters, custom_headers=None, raw=False, **operation_config): diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/price_sheet_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/price_sheet_operations.py index d92cbdeaf76b..dfb35b938cd7 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/price_sheet_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/price_sheet_operations.py @@ -147,10 +147,10 @@ def get_long_running_output(response): download.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/pricesheet/default/download'} - def _download_by_billing_profile_name_initial( + def _download_by_billing_profile_initial( self, billing_account_name, billing_profile_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.download_by_billing_profile_name.metadata['url'] + url = self.download_by_billing_profile.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str') @@ -196,7 +196,7 @@ def _download_by_billing_profile_name_initial( return deserialized - def download_by_billing_profile_name( + def download_by_billing_profile( self, billing_account_name, billing_profile_name, custom_headers=None, raw=False, polling=True, **operation_config): """Download price sheet for a billing profile. @@ -218,7 +218,7 @@ def download_by_billing_profile_name( :raises: :class:`ErrorResponseException` """ - raw_result = self._download_by_billing_profile_name_initial( + raw_result = self._download_by_billing_profile_initial( billing_account_name=billing_account_name, billing_profile_name=billing_profile_name, custom_headers=custom_headers, @@ -248,4 +248,4 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - download_by_billing_profile_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/pricesheet/default/download'} + download_by_billing_profile.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/pricesheet/default/download'} diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/products_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/products_operations.py index da73ea5fd031..807af14a13ff 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/products_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/products_operations.py @@ -36,7 +36,137 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def list_by_billing_account_name( + def list_by_customer( + self, billing_account_name, customer_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists products by customer id. + + :param billing_account_name: billing Account Id. + :type billing_account_name: str + :param customer_name: Customer name. + :type customer_name: str + :param filter: May be used to filter by product type. The filter + supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not + currently support 'ne', 'or', or 'not'. Tag filter is a key value pair + string where key and value is separated by a colon (:). + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProductsListResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.billing.models.ProductsListResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_customer.metadata['url'] + path_format_arguments = { + 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), + 'customerName': self._serialize.url("customer_name", customer_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ProductsListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_customer.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/products'} + + def get_by_customer( + self, billing_account_name, customer_name, product_name, custom_headers=None, raw=False, **operation_config): + """Get a customer's product by name. + + :param billing_account_name: billing Account Id. + :type billing_account_name: str + :param customer_name: Customer name. + :type customer_name: str + :param product_name: Invoice Id. + :type product_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Product or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.billing.models.Product or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_customer.metadata['url'] + path_format_arguments = { + 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), + 'customerName': self._serialize.url("customer_name", customer_name, 'str'), + 'productName': self._serialize.url("product_name", product_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Product', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_customer.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/products/{productName}'} + + def list_by_billing_account( self, billing_account_name, filter=None, custom_headers=None, raw=False, **operation_config): """Lists products by billing account name. @@ -62,7 +192,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_billing_account_name.metadata['url'] + url = self.list_by_billing_account.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str') } @@ -106,9 +236,9 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_billing_account_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products'} + list_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products'} - def list_by_invoice_section_name( + def list_by_invoice_section( self, billing_account_name, billing_profile_name, invoice_section_name, filter=None, custom_headers=None, raw=False, **operation_config): """Lists products by invoice section name. @@ -135,7 +265,7 @@ def list_by_invoice_section_name( :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_invoice_section_name.metadata['url'] + url = self.list_by_invoice_section.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str'), @@ -176,7 +306,7 @@ def list_by_invoice_section_name( return client_raw_response return deserialized - list_by_invoice_section_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products'} + list_by_invoice_section.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products'} def get( self, billing_account_name, billing_profile_name, invoice_section_name, product_name, custom_headers=None, raw=False, **operation_config): @@ -407,7 +537,7 @@ def validate_transfer( return deserialized validate_transfer.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/{productName}/validateTransferEligibility'} - def update_auto_renew_by_billing_account_name( + def update_auto_renew_by_billing_account( self, billing_account_name, product_name, auto_renew=None, custom_headers=None, raw=False, **operation_config): """Cancel auto renew for product by product id and billing account name. @@ -432,7 +562,7 @@ def update_auto_renew_by_billing_account_name( body = models.UpdateAutoRenewRequest(auto_renew=auto_renew) # Construct URL - url = self.update_auto_renew_by_billing_account_name.metadata['url'] + url = self.update_auto_renew_by_billing_account.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'productName': self._serialize.url("product_name", product_name, 'str') @@ -474,9 +604,9 @@ def update_auto_renew_by_billing_account_name( return client_raw_response return deserialized - update_auto_renew_by_billing_account_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}/updateAutoRenew'} + update_auto_renew_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}/updateAutoRenew'} - def update_auto_renew_by_invoice_section_name( + def update_auto_renew_by_invoice_section( self, billing_account_name, billing_profile_name, invoice_section_name, product_name, auto_renew=None, custom_headers=None, raw=False, **operation_config): """Cancel auto renew for product by product id and invoice section name. @@ -505,7 +635,7 @@ def update_auto_renew_by_invoice_section_name( body = models.UpdateAutoRenewRequest(auto_renew=auto_renew) # Construct URL - url = self.update_auto_renew_by_invoice_section_name.metadata['url'] + url = self.update_auto_renew_by_invoice_section.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str'), @@ -549,4 +679,4 @@ def update_auto_renew_by_invoice_section_name( return client_raw_response return deserialized - update_auto_renew_by_invoice_section_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/{productName}/updateAutoRenew'} + update_auto_renew_by_invoice_section.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/{productName}/updateAutoRenew'} diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/recipient_transfers_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/recipient_transfers_operations.py index 14981f5c037e..f1fbb6eb99cf 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/recipient_transfers_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/recipient_transfers_operations.py @@ -98,6 +98,71 @@ def accept( return deserialized accept.metadata = {'url': '/providers/Microsoft.Billing/transfers/{transferName}/acceptTransfer'} + def validate( + self, transfer_name, product_details=None, custom_headers=None, raw=False, **operation_config): + """Validates if the products can be transferred in the context of the + given transfer name. + + :param transfer_name: Transfer Name. + :type transfer_name: str + :param product_details: Request parameters to accept transfer. + :type product_details: list[~azure.mgmt.billing.models.ProductDetails] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ValidateTransferListResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.billing.models.ValidateTransferListResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.AcceptTransferRequest(product_details=product_details) + + # Construct URL + url = self.validate.metadata['url'] + path_format_arguments = { + 'transferName': self._serialize.url("transfer_name", transfer_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AcceptTransferRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ValidateTransferListResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate.metadata = {'url': '/providers/Microsoft.Billing/transfers/{transferName}/validateTransfer'} + def decline( self, transfer_name, custom_headers=None, raw=False, **operation_config): """Declines the transfer with given transfer Id. diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/transactions_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/transactions_operations.py index b113bf635835..f9b162903961 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/transactions_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/transactions_operations.py @@ -36,7 +36,89 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def list_by_billing_account_name( + def list_by_customer( + self, billing_account_name, customer_name, start_date, end_date, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists the transactions by customer id for given start date and end + date. + + :param billing_account_name: billing Account Id. + :type billing_account_name: str + :param customer_name: Customer name. + :type customer_name: str + :param start_date: Start date + :type start_date: str + :param end_date: End date + :type end_date: str + :param filter: May be used to filter by transaction kind. The filter + supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not + currently support 'ne', 'or', or 'not'. Tag filter is a key value pair + string where key and value is separated by a colon (:). + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Transaction + :rtype: + ~azure.mgmt.billing.models.TransactionPaged[~azure.mgmt.billing.models.Transaction] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_customer.metadata['url'] + path_format_arguments = { + 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), + 'customerName': self._serialize.url("customer_name", customer_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['startDate'] = self._serialize.query("start_date", start_date, 'str') + query_parameters['endDate'] = self._serialize.query("end_date", end_date, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.TransactionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.TransactionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_customer.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/transactions'} + + def list_by_billing_account( self, billing_account_name, start_date, end_date, filter=None, custom_headers=None, raw=False, **operation_config): """Lists the transactions by billing account name for given start and end date. @@ -67,7 +149,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_billing_account_name.metadata['url'] + url = self.list_by_billing_account.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str') } @@ -113,9 +195,9 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_billing_account_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/transactions'} + list_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/transactions'} - def list_by_billing_profile_name( + def list_by_billing_profile( self, billing_account_name, billing_profile_name, start_date, end_date, filter=None, custom_headers=None, raw=False, **operation_config): """Lists the transactions by billing profile name for given start date and end date. @@ -145,7 +227,7 @@ def list_by_billing_profile_name( :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_billing_profile_name.metadata['url'] + url = self.list_by_billing_profile.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str') @@ -187,9 +269,9 @@ def list_by_billing_profile_name( return client_raw_response return deserialized - list_by_billing_profile_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions'} + list_by_billing_profile.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions'} - def list_by_invoice_section_name( + def list_by_invoice_section( self, billing_account_name, billing_profile_name, invoice_section_name, start_date, end_date, filter=None, custom_headers=None, raw=False, **operation_config): """Lists the transactions by invoice section name for given start date and end date. @@ -221,7 +303,7 @@ def list_by_invoice_section_name( :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_invoice_section_name.metadata['url'] + url = self.list_by_invoice_section.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str'), 'billingProfileName': self._serialize.url("billing_profile_name", billing_profile_name, 'str'), @@ -264,7 +346,7 @@ def list_by_invoice_section_name( return client_raw_response return deserialized - list_by_invoice_section_name.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/transactions'} + list_by_invoice_section.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/transactions'} def get( self, billing_account_name, billing_profile_name, transaction_name, start_date, end_date, custom_headers=None, raw=False, **operation_config):