From 909b23236daebaebff131c546fa19a383d2d790b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 25 Mar 2021 15:05:22 +0000 Subject: [PATCH] CodeGen from PR 13644 in Azure/azure-rest-api-specs Merge c81edae22fe92ec1678d5509fda035c0829c3e7e into f8e0dbd6ec8cc5c5bad8a79a584d197775fe94cc --- .../_billing_management_client_enums.py | 22 +++++++++++++---- .../azure/mgmt/billing/models/_models.py | 14 +++++++---- .../azure/mgmt/billing/models/_models_py3.py | 14 +++++++---- .../operations/_invoices_operations.py | 24 +++++++++---------- 4 files changed, 49 insertions(+), 25 deletions(-) diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_billing_management_client_enums.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_billing_management_client_enums.py index 52b9d53545ed..b8c12d6566d0 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_billing_management_client_enums.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_billing_management_client_enums.py @@ -20,14 +20,26 @@ class AddressValidationStatus(str, Enum): class SubscriptionTransferValidationErrorCode(str, Enum): + billing_account_inactive = "BillingAccountInactive" + cross_billing_account_not_allowed = "CrossBillingAccountNotAllowed" + destination_billing_profile_inactive = "DestinationBillingProfileInactive" + destination_billing_profile_not_found = "DestinationBillingProfileNotFound" + destination_billing_profile_past_due = "DestinationBillingProfilePastDue" + destination_invoice_section_inactive = "DestinationInvoiceSectionInactive" + destination_invoice_section_not_found = "DestinationInvoiceSectionNotFound" + insufficient_permission_on_destination = "InsufficientPermissionOnDestination" + insufficient_permission_on_source = "InsufficientPermissionOnSource" + invalid_destination = "InvalidDestination" invalid_source = "InvalidSource" + marketplace_not_enabled_on_destination = "MarketplaceNotEnabledOnDestination" + not_available_for_destination_market = "NotAvailableForDestinationMarket" + product_inactive = "ProductInactive" + product_not_found = "ProductNotFound" + product_type_not_supported = "ProductTypeNotSupported" + source_billing_profile_past_due = "SourceBillingProfilePastDue" + source_invoice_section_inactive = "SourceInvoiceSectionInactive" subscription_not_active = "SubscriptionNotActive" - insufficient_permission_on_source = "InsufficientPermissionOnSource" - insufficient_permission_on_destination = "InsufficientPermissionOnDestination" - destination_billing_profile_past_due = "DestinationBillingProfilePastDue" subscription_type_not_supported = "SubscriptionTypeNotSupported" - cross_billing_account_not_allowed = "CrossBillingAccountNotAllowed" - not_available_for_destination_market = "NotAvailableForDestinationMarket" class AgreementType(str, Enum): diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_models.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_models.py index 9a2a589e732c..2620f64c45c9 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_models.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_models.py @@ -2828,10 +2828,16 @@ class ValidateSubscriptionTransferEligibilityError(Model): """Error details of the transfer eligibility validation. :param code: Error code for the product transfer validation. Possible - values include: 'InvalidSource', 'SubscriptionNotActive', - 'InsufficientPermissionOnSource', 'InsufficientPermissionOnDestination', - 'DestinationBillingProfilePastDue', 'SubscriptionTypeNotSupported', - 'CrossBillingAccountNotAllowed', 'NotAvailableForDestinationMarket' + values include: 'BillingAccountInactive', 'CrossBillingAccountNotAllowed', + 'DestinationBillingProfileInactive', 'DestinationBillingProfileNotFound', + 'DestinationBillingProfilePastDue', 'DestinationInvoiceSectionInactive', + 'DestinationInvoiceSectionNotFound', + 'InsufficientPermissionOnDestination', 'InsufficientPermissionOnSource', + 'InvalidDestination', 'InvalidSource', + 'MarketplaceNotEnabledOnDestination', 'NotAvailableForDestinationMarket', + 'ProductInactive', 'ProductNotFound', 'ProductTypeNotSupported', + 'SourceBillingProfilePastDue', 'SourceInvoiceSectionInactive', + 'SubscriptionNotActive', 'SubscriptionTypeNotSupported' :type code: str or ~azure.mgmt.billing.models.SubscriptionTransferValidationErrorCode :param message: The error message. diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_models_py3.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_models_py3.py index 995bf4c4e743..8285d0b89a3c 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_models_py3.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_models_py3.py @@ -2828,10 +2828,16 @@ class ValidateSubscriptionTransferEligibilityError(Model): """Error details of the transfer eligibility validation. :param code: Error code for the product transfer validation. Possible - values include: 'InvalidSource', 'SubscriptionNotActive', - 'InsufficientPermissionOnSource', 'InsufficientPermissionOnDestination', - 'DestinationBillingProfilePastDue', 'SubscriptionTypeNotSupported', - 'CrossBillingAccountNotAllowed', 'NotAvailableForDestinationMarket' + values include: 'BillingAccountInactive', 'CrossBillingAccountNotAllowed', + 'DestinationBillingProfileInactive', 'DestinationBillingProfileNotFound', + 'DestinationBillingProfilePastDue', 'DestinationInvoiceSectionInactive', + 'DestinationInvoiceSectionNotFound', + 'InsufficientPermissionOnDestination', 'InsufficientPermissionOnSource', + 'InvalidDestination', 'InvalidSource', + 'MarketplaceNotEnabledOnDestination', 'NotAvailableForDestinationMarket', + 'ProductInactive', 'ProductNotFound', 'ProductTypeNotSupported', + 'SourceBillingProfilePastDue', 'SourceInvoiceSectionInactive', + 'SubscriptionNotActive', 'SubscriptionTypeNotSupported' :type code: str or ~azure.mgmt.billing.models.SubscriptionTransferValidationErrorCode :param message: The error message. 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 d8bcbe29d84f..04c84f19fb9b 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 @@ -431,10 +431,10 @@ def get_long_running_output(response): download_invoice.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download'} - def _download_multiple_modern_invoice_initial( + def _download_multiple_billing_profile_invoices_initial( self, billing_account_name, download_urls, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.download_multiple_modern_invoice.metadata['url'] + url = self.download_multiple_billing_profile_invoices.metadata['url'] path_format_arguments = { 'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str') } @@ -482,9 +482,9 @@ def _download_multiple_modern_invoice_initial( return deserialized - def download_multiple_modern_invoice( + def download_multiple_billing_profile_invoices( self, billing_account_name, download_urls, custom_headers=None, raw=False, polling=True, **operation_config): - """Gets a URL to download an multiple invoices documents (invoice pdf, tax + """Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. @@ -509,7 +509,7 @@ def download_multiple_modern_invoice( :raises: :class:`ErrorResponseException` """ - raw_result = self._download_multiple_modern_invoice_initial( + raw_result = self._download_multiple_billing_profile_invoices_initial( billing_account_name=billing_account_name, download_urls=download_urls, custom_headers=custom_headers, @@ -538,7 +538,7 @@ 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_multiple_modern_invoice.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/downloadDocuments'} + download_multiple_billing_profile_invoices.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/downloadDocuments'} def list_by_billing_subscription( self, period_start_date, period_end_date, custom_headers=None, raw=False, **operation_config): @@ -773,10 +773,10 @@ def get_long_running_output(response): download_billing_subscription_invoice.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}/download'} - def _download_multiple_billing_subscription_invoice_initial( + def _download_multiple_billing_subscription_invoices_initial( self, download_urls, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.download_multiple_billing_subscription_invoice.metadata['url'] + url = self.download_multiple_billing_subscription_invoices.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -824,9 +824,9 @@ def _download_multiple_billing_subscription_invoice_initial( return deserialized - def download_multiple_billing_subscription_invoice( + def download_multiple_billing_subscription_invoices( self, download_urls, custom_headers=None, raw=False, polling=True, **operation_config): - """Gets a URL to download multiple invoices documents (invoice pdf, tax + """Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. :param download_urls: An array of download urls for individual @@ -846,7 +846,7 @@ def download_multiple_billing_subscription_invoice( :raises: :class:`ErrorResponseException` """ - raw_result = self._download_multiple_billing_subscription_invoice_initial( + raw_result = self._download_multiple_billing_subscription_invoices_initial( download_urls=download_urls, custom_headers=custom_headers, raw=True, @@ -874,4 +874,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_multiple_billing_subscription_invoice.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/downloadDocuments'} + download_multiple_billing_subscription_invoices.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/downloadDocuments'}