Skip to content
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 @@ -38,6 +38,7 @@
from ._models_py3 import EnrollmentPolicies
from ._models_py3 import ErrorDetails
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import IndirectRelationshipInfo
from ._models_py3 import Instruction
from ._models_py3 import Invoice
from ._models_py3 import InvoiceSection
Expand Down Expand Up @@ -89,6 +90,7 @@
from ._models import EnrollmentPolicies
from ._models import ErrorDetails
from ._models import ErrorResponse, ErrorResponseException
from ._models import IndirectRelationshipInfo
from ._models import Instruction
from ._models import Invoice
from ._models import InvoiceSection
Expand Down Expand Up @@ -134,6 +136,9 @@
AgreementType,
AccountType,
AccountStatus,
BillingRelationshipType,
InvoiceSectionState,
TargetCloud,
BillingProfileStatus,
StatusReasonCode,
SpendingLimit,
Expand Down Expand Up @@ -190,6 +195,7 @@
'EnrollmentPolicies',
'ErrorDetails',
'ErrorResponse', 'ErrorResponseException',
'IndirectRelationshipInfo',
'Instruction',
'Invoice',
'InvoiceSection',
Expand Down Expand Up @@ -234,6 +240,9 @@
'AgreementType',
'AccountType',
'AccountStatus',
'BillingRelationshipType',
'InvoiceSectionState',
'TargetCloud',
'BillingProfileStatus',
'StatusReasonCode',
'SpendingLimit',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,27 @@ class AccountStatus(str, Enum):
terminated = "Terminated"


class BillingRelationshipType(str, Enum):

direct = "Direct"
indirect_customer = "IndirectCustomer"
indirect_partner = "IndirectPartner"
csp_partner = "CSPPartner"


class InvoiceSectionState(str, Enum):

active = "Active"
restricted = "Restricted"


class TargetCloud(str, Enum):

us_gov = "USGov"
us_nat = "USNat"
us_sec = "USSec"


class BillingProfileStatus(str, Enum):

active = "Active"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,17 @@ class BillingProfile(Resource):
:param po_number: The purchase order name that will appear on the invoices
generated for the billing profile.
:type po_number: str
:ivar billing_relationship_type: Identifies which services and purchases
are paid by a billing profile. Possible values include: 'Direct',
'IndirectCustomer', 'IndirectPartner', 'CSPPartner'
:vartype billing_relationship_type: str or
~azure.mgmt.billing.models.BillingRelationshipType
:param bill_to: Billing address.
:type bill_to: ~azure.mgmt.billing.models.AddressDetails
:ivar indirect_relationship_info: Identifies the billing profile that is
linked to another billing profile in indirect purchase motion.
:vartype indirect_relationship_info:
~azure.mgmt.billing.models.IndirectRelationshipInfo
:param invoice_email_opt_in: Flag controlling whether the invoices for the
billing profile are sent through email.
:type invoice_email_opt_in: bool
Expand Down Expand Up @@ -564,19 +573,28 @@ class BillingProfile(Resource):
:ivar spending_limit: The billing profile spending limit. Possible values
include: 'Off', 'On'
:vartype spending_limit: str or ~azure.mgmt.billing.models.SpendingLimit
:ivar target_clouds: Identifies the cloud environments that are associated
with a billing profile. This is a system managed optional field and gets
updated as the billing profile gets associated with accounts in various
clouds.
:vartype target_clouds: list[str or
~azure.mgmt.billing.models.TargetCloud]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'billing_relationship_type': {'readonly': True},
'indirect_relationship_info': {'readonly': True},
'invoice_day': {'readonly': True},
'currency': {'readonly': True},
'has_read_access': {'readonly': True},
'system_id': {'readonly': True},
'status': {'readonly': True},
'status_reason_code': {'readonly': True},
'spending_limit': {'readonly': True},
'target_clouds': {'readonly': True},
}

_attribute_map = {
Expand All @@ -585,7 +603,9 @@ class BillingProfile(Resource):
'type': {'key': 'type', 'type': 'str'},
'display_name': {'key': 'properties.displayName', 'type': 'str'},
'po_number': {'key': 'properties.poNumber', 'type': 'str'},
'billing_relationship_type': {'key': 'properties.billingRelationshipType', 'type': 'str'},
'bill_to': {'key': 'properties.billTo', 'type': 'AddressDetails'},
'indirect_relationship_info': {'key': 'properties.indirectRelationshipInfo', 'type': 'IndirectRelationshipInfo'},
'invoice_email_opt_in': {'key': 'properties.invoiceEmailOptIn', 'type': 'bool'},
'invoice_day': {'key': 'properties.invoiceDay', 'type': 'int'},
'currency': {'key': 'properties.currency', 'type': 'str'},
Expand All @@ -596,13 +616,16 @@ class BillingProfile(Resource):
'status': {'key': 'properties.status', 'type': 'str'},
'status_reason_code': {'key': 'properties.statusReasonCode', 'type': 'str'},
'spending_limit': {'key': 'properties.spendingLimit', 'type': 'str'},
'target_clouds': {'key': 'properties.targetClouds', 'type': '[str]'},
}

def __init__(self, **kwargs):
super(BillingProfile, self).__init__(**kwargs)
self.display_name = kwargs.get('display_name', None)
self.po_number = kwargs.get('po_number', None)
self.billing_relationship_type = None
self.bill_to = kwargs.get('bill_to', None)
self.indirect_relationship_info = None
self.invoice_email_opt_in = kwargs.get('invoice_email_opt_in', None)
self.invoice_day = None
self.currency = None
Expand All @@ -613,6 +636,7 @@ def __init__(self, **kwargs):
self.status = None
self.status_reason_code = None
self.spending_limit = None
self.target_clouds = None


class BillingProfileCreationRequest(Model):
Expand Down Expand Up @@ -1550,6 +1574,34 @@ def __init__(self, deserialize, response, *args):
super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)


class IndirectRelationshipInfo(Model):
"""The billing profile details of the partner of the customer for an indirect
motion.

:param billing_account_name: The billing account name of the partner or
the customer for an indirect motion.
:type billing_account_name: str
:param billing_profile_name: The billing profile name of the partner or
the customer for an indirect motion.
:type billing_profile_name: str
:param display_name: The display name of the partner or customer for an
indirect motion.
:type display_name: str
"""

_attribute_map = {
'billing_account_name': {'key': 'billingAccountName', 'type': 'str'},
'billing_profile_name': {'key': 'billingProfileName', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
}

def __init__(self, **kwargs):
super(IndirectRelationshipInfo, self).__init__(**kwargs)
self.billing_account_name = kwargs.get('billing_account_name', None)
self.billing_profile_name = kwargs.get('billing_profile_name', None)
self.display_name = kwargs.get('display_name', None)


class Instruction(Resource):
"""An instruction.

Expand Down Expand Up @@ -1776,16 +1828,26 @@ class InvoiceSection(Resource):
:type display_name: str
:param labels: Dictionary of metadata associated with the invoice section.
:type labels: dict[str, str]
:ivar state: Identifies the state of an invoice section. Possible values
include: 'Active', 'Restricted'
:vartype state: str or ~azure.mgmt.billing.models.InvoiceSectionState
:ivar system_id: The system generated unique identifier for an invoice
section.
:vartype system_id: str
:ivar target_cloud: Identifies the cloud environments that are associated
with an invoice section. This is a system managed optional field and gets
updated as the invoice section gets associated with accounts in various
clouds. Possible values include: 'USGov', 'USNat', 'USSec'
:vartype target_cloud: str or ~azure.mgmt.billing.models.TargetCloud
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'state': {'readonly': True},
'system_id': {'readonly': True},
'target_cloud': {'readonly': True},
}

_attribute_map = {
Expand All @@ -1794,14 +1856,18 @@ class InvoiceSection(Resource):
'type': {'key': 'type', 'type': 'str'},
'display_name': {'key': 'properties.displayName', 'type': 'str'},
'labels': {'key': 'properties.labels', 'type': '{str}'},
'state': {'key': 'properties.state', 'type': 'str'},
'system_id': {'key': 'properties.systemId', 'type': 'str'},
'target_cloud': {'key': 'properties.targetCloud', 'type': 'str'},
}

def __init__(self, **kwargs):
super(InvoiceSection, self).__init__(**kwargs)
self.display_name = kwargs.get('display_name', None)
self.labels = kwargs.get('labels', None)
self.state = None
self.system_id = None
self.target_cloud = None


class InvoiceSectionCreationRequest(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,17 @@ class BillingProfile(Resource):
:param po_number: The purchase order name that will appear on the invoices
generated for the billing profile.
:type po_number: str
:ivar billing_relationship_type: Identifies which services and purchases
are paid by a billing profile. Possible values include: 'Direct',
'IndirectCustomer', 'IndirectPartner', 'CSPPartner'
:vartype billing_relationship_type: str or
~azure.mgmt.billing.models.BillingRelationshipType
:param bill_to: Billing address.
:type bill_to: ~azure.mgmt.billing.models.AddressDetails
:ivar indirect_relationship_info: Identifies the billing profile that is
linked to another billing profile in indirect purchase motion.
:vartype indirect_relationship_info:
~azure.mgmt.billing.models.IndirectRelationshipInfo
:param invoice_email_opt_in: Flag controlling whether the invoices for the
billing profile are sent through email.
:type invoice_email_opt_in: bool
Expand Down Expand Up @@ -564,19 +573,28 @@ class BillingProfile(Resource):
:ivar spending_limit: The billing profile spending limit. Possible values
include: 'Off', 'On'
:vartype spending_limit: str or ~azure.mgmt.billing.models.SpendingLimit
:ivar target_clouds: Identifies the cloud environments that are associated
with a billing profile. This is a system managed optional field and gets
updated as the billing profile gets associated with accounts in various
clouds.
:vartype target_clouds: list[str or
~azure.mgmt.billing.models.TargetCloud]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'billing_relationship_type': {'readonly': True},
'indirect_relationship_info': {'readonly': True},
'invoice_day': {'readonly': True},
'currency': {'readonly': True},
'has_read_access': {'readonly': True},
'system_id': {'readonly': True},
'status': {'readonly': True},
'status_reason_code': {'readonly': True},
'spending_limit': {'readonly': True},
'target_clouds': {'readonly': True},
}

_attribute_map = {
Expand All @@ -585,7 +603,9 @@ class BillingProfile(Resource):
'type': {'key': 'type', 'type': 'str'},
'display_name': {'key': 'properties.displayName', 'type': 'str'},
'po_number': {'key': 'properties.poNumber', 'type': 'str'},
'billing_relationship_type': {'key': 'properties.billingRelationshipType', 'type': 'str'},
'bill_to': {'key': 'properties.billTo', 'type': 'AddressDetails'},
'indirect_relationship_info': {'key': 'properties.indirectRelationshipInfo', 'type': 'IndirectRelationshipInfo'},
'invoice_email_opt_in': {'key': 'properties.invoiceEmailOptIn', 'type': 'bool'},
'invoice_day': {'key': 'properties.invoiceDay', 'type': 'int'},
'currency': {'key': 'properties.currency', 'type': 'str'},
Expand All @@ -596,13 +616,16 @@ class BillingProfile(Resource):
'status': {'key': 'properties.status', 'type': 'str'},
'status_reason_code': {'key': 'properties.statusReasonCode', 'type': 'str'},
'spending_limit': {'key': 'properties.spendingLimit', 'type': 'str'},
'target_clouds': {'key': 'properties.targetClouds', 'type': '[str]'},
}

def __init__(self, *, display_name: str=None, po_number: str=None, bill_to=None, invoice_email_opt_in: bool=None, enabled_azure_plans=None, invoice_sections=None, **kwargs) -> None:
super(BillingProfile, self).__init__(**kwargs)
self.display_name = display_name
self.po_number = po_number
self.billing_relationship_type = None
self.bill_to = bill_to
self.indirect_relationship_info = None
self.invoice_email_opt_in = invoice_email_opt_in
self.invoice_day = None
self.currency = None
Expand All @@ -613,6 +636,7 @@ def __init__(self, *, display_name: str=None, po_number: str=None, bill_to=None,
self.status = None
self.status_reason_code = None
self.spending_limit = None
self.target_clouds = None


class BillingProfileCreationRequest(Model):
Expand Down Expand Up @@ -1550,6 +1574,34 @@ def __init__(self, deserialize, response, *args):
super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)


class IndirectRelationshipInfo(Model):
"""The billing profile details of the partner of the customer for an indirect
motion.

:param billing_account_name: The billing account name of the partner or
the customer for an indirect motion.
:type billing_account_name: str
:param billing_profile_name: The billing profile name of the partner or
the customer for an indirect motion.
:type billing_profile_name: str
:param display_name: The display name of the partner or customer for an
indirect motion.
:type display_name: str
"""

_attribute_map = {
'billing_account_name': {'key': 'billingAccountName', 'type': 'str'},
'billing_profile_name': {'key': 'billingProfileName', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
}

def __init__(self, *, billing_account_name: str=None, billing_profile_name: str=None, display_name: str=None, **kwargs) -> None:
super(IndirectRelationshipInfo, self).__init__(**kwargs)
self.billing_account_name = billing_account_name
self.billing_profile_name = billing_profile_name
self.display_name = display_name


class Instruction(Resource):
"""An instruction.

Expand Down Expand Up @@ -1776,16 +1828,26 @@ class InvoiceSection(Resource):
:type display_name: str
:param labels: Dictionary of metadata associated with the invoice section.
:type labels: dict[str, str]
:ivar state: Identifies the state of an invoice section. Possible values
include: 'Active', 'Restricted'
:vartype state: str or ~azure.mgmt.billing.models.InvoiceSectionState
:ivar system_id: The system generated unique identifier for an invoice
section.
:vartype system_id: str
:ivar target_cloud: Identifies the cloud environments that are associated
with an invoice section. This is a system managed optional field and gets
updated as the invoice section gets associated with accounts in various
clouds. Possible values include: 'USGov', 'USNat', 'USSec'
:vartype target_cloud: str or ~azure.mgmt.billing.models.TargetCloud
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'state': {'readonly': True},
'system_id': {'readonly': True},
'target_cloud': {'readonly': True},
}

_attribute_map = {
Expand All @@ -1794,14 +1856,18 @@ class InvoiceSection(Resource):
'type': {'key': 'type', 'type': 'str'},
'display_name': {'key': 'properties.displayName', 'type': 'str'},
'labels': {'key': 'properties.labels', 'type': '{str}'},
'state': {'key': 'properties.state', 'type': 'str'},
'system_id': {'key': 'properties.systemId', 'type': 'str'},
'target_cloud': {'key': 'properties.targetCloud', 'type': 'str'},
}

def __init__(self, *, display_name: str=None, labels=None, **kwargs) -> None:
super(InvoiceSection, self).__init__(**kwargs)
self.display_name = display_name
self.labels = labels
self.state = None
self.system_id = None
self.target_cloud = None


class InvoiceSectionCreationRequest(Model):
Expand Down