Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-mgmt-billing] Added new move product validation error codes #3560

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
Expand Down Expand Up @@ -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.
Expand All @@ -509,7 +509,7 @@ def download_multiple_modern_invoice(
:raises:
:class:`ErrorResponseException<azure.mgmt.billing.models.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,
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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')
}
Expand Down Expand Up @@ -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
Expand All @@ -846,7 +846,7 @@ def download_multiple_billing_subscription_invoice(
:raises:
:class:`ErrorResponseException<azure.mgmt.billing.models.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,
Expand Down Expand Up @@ -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'}