Skip to content

Commit

Permalink
CodeGen from PR 12275 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge a857e07ad5c3f028ba86e4c3009078f4a4351e5d into bda39d9
  • Loading branch information
SDKAuto committed Jan 4, 2021
1 parent fafe4a9 commit 92a01a4
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 25 deletions.
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'}

0 comments on commit 92a01a4

Please sign in to comment.