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 @@ -15,6 +15,7 @@
from .version import VERSION
from .operations.billing_accounts_operations import BillingAccountsOperations
from .operations.payment_methods_operations import PaymentMethodsOperations
from .operations.billing_accounts_validate_address_operations import BillingAccountsValidateAddressOperations
from .operations.available_balances_operations import AvailableBalancesOperations
from .operations.billing_profiles_operations import BillingProfilesOperations
from .operations.invoice_sections_operations import InvoiceSectionsOperations
Expand All @@ -34,6 +35,7 @@
from .operations.billing_role_definitions_operations import BillingRoleDefinitionsOperations
from .operations.billing_role_assignments_operations import BillingRoleAssignmentsOperations
from .operations.agreements_operations import AgreementsOperations
from .operations.line_of_credits_operations import LineOfCreditsOperations
from . import models


Expand Down Expand Up @@ -79,6 +81,8 @@ class BillingManagementClient(SDKClient):
:vartype billing_accounts: azure.mgmt.billing.operations.BillingAccountsOperations
:ivar payment_methods: PaymentMethods operations
:vartype payment_methods: azure.mgmt.billing.operations.PaymentMethodsOperations
:ivar billing_accounts_validate_address: BillingAccountsValidateAddress operations
:vartype billing_accounts_validate_address: azure.mgmt.billing.operations.BillingAccountsValidateAddressOperations
:ivar available_balances: AvailableBalances operations
:vartype available_balances: azure.mgmt.billing.operations.AvailableBalancesOperations
:ivar billing_profiles: BillingProfiles operations
Expand Down Expand Up @@ -117,6 +121,8 @@ class BillingManagementClient(SDKClient):
:vartype billing_role_assignments: azure.mgmt.billing.operations.BillingRoleAssignmentsOperations
:ivar agreements: Agreements operations
:vartype agreements: azure.mgmt.billing.operations.AgreementsOperations
:ivar line_of_credits: LineOfCredits operations
:vartype line_of_credits: azure.mgmt.billing.operations.LineOfCreditsOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -141,6 +147,8 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.payment_methods = PaymentMethodsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.billing_accounts_validate_address = BillingAccountsValidateAddressOperations(
self._client, self.config, self._serialize, self._deserialize)
self.available_balances = AvailableBalancesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.billing_profiles = BillingProfilesOperations(
Expand Down Expand Up @@ -179,3 +187,5 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.agreements = AgreementsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.line_of_credits = LineOfCreditsOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

try:
from .initiate_transfer_request_py3 import InitiateTransferRequest
from .address_py3 import Address
from .validate_address_response_py3 import ValidateAddressResponse
from .product_details_py3 import ProductDetails
from .accept_transfer_request_py3 import AcceptTransferRequest
from .error_py3 import Error
Expand All @@ -22,7 +24,6 @@
from .transfer_billing_subscription_request_properties_py3 import TransferBillingSubscriptionRequestProperties
from .transfer_billing_subscription_request_py3 import TransferBillingSubscriptionRequest
from .update_auto_renew_operation_summary_py3 import UpdateAutoRenewOperationSummary
from .address_py3 import Address
from .enabled_azure_sk_us_py3 import EnabledAzureSKUs
from .billing_profile_py3 import BillingProfile
from .invoice_section_properties_py3 import InvoiceSectionProperties
Expand Down Expand Up @@ -71,8 +72,12 @@
from .participants_py3 import Participants
from .agreement_py3 import Agreement
from .agreement_list_result_py3 import AgreementListResult
from .line_of_credit_py3 import LineOfCredit
from .increase_line_of_credit_request_properties_py3 import IncreaseLineOfCreditRequestProperties
except (SyntaxError, ImportError):
from .initiate_transfer_request import InitiateTransferRequest
from .address import Address
from .validate_address_response import ValidateAddressResponse
from .product_details import ProductDetails
from .accept_transfer_request import AcceptTransferRequest
from .error import Error
Expand All @@ -84,7 +89,6 @@
from .transfer_billing_subscription_request_properties import TransferBillingSubscriptionRequestProperties
from .transfer_billing_subscription_request import TransferBillingSubscriptionRequest
from .update_auto_renew_operation_summary import UpdateAutoRenewOperationSummary
from .address import Address
from .enabled_azure_sk_us import EnabledAzureSKUs
from .billing_profile import BillingProfile
from .invoice_section_properties import InvoiceSectionProperties
Expand Down Expand Up @@ -133,6 +137,8 @@
from .participants import Participants
from .agreement import Agreement
from .agreement_list_result import AgreementListResult
from .line_of_credit import LineOfCredit
from .increase_line_of_credit_request_properties import IncreaseLineOfCreditRequestProperties
from .payment_method_paged import PaymentMethodPaged
from .billing_subscription_summary_paged import BillingSubscriptionSummaryPaged
from .product_summary_paged import ProductSummaryPaged
Expand All @@ -141,6 +147,7 @@
from .recipient_transfer_details_paged import RecipientTransferDetailsPaged
from .operation_paged import OperationPaged
from .billing_management_client_enums import (
AddressValidationStatus,
ProductType,
TransferStatus,
ProductTransferStatus,
Expand All @@ -152,10 +159,13 @@
ReservationType,
PaymentMethodType,
UpdateAutoRenew,
Status,
)

__all__ = [
'InitiateTransferRequest',
'Address',
'ValidateAddressResponse',
'ProductDetails',
'AcceptTransferRequest',
'Error',
Expand All @@ -167,7 +177,6 @@
'TransferBillingSubscriptionRequestProperties',
'TransferBillingSubscriptionRequest',
'UpdateAutoRenewOperationSummary',
'Address',
'EnabledAzureSKUs',
'BillingProfile',
'InvoiceSectionProperties',
Expand Down Expand Up @@ -216,13 +225,16 @@
'Participants',
'Agreement',
'AgreementListResult',
'LineOfCredit',
'IncreaseLineOfCreditRequestProperties',
'PaymentMethodPaged',
'BillingSubscriptionSummaryPaged',
'ProductSummaryPaged',
'TransactionsSummaryPaged',
'TransferDetailsPaged',
'RecipientTransferDetailsPaged',
'OperationPaged',
'AddressValidationStatus',
'ProductType',
'TransferStatus',
'ProductTransferStatus',
Expand All @@ -234,4 +246,5 @@
'ReservationType',
'PaymentMethodType',
'UpdateAutoRenew',
'Status',
]
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
from enum import Enum


class AddressValidationStatus(str, Enum):

valid = "Valid"
invalid = "Invalid"


class ProductType(str, Enum):

azure_subscription = "AzureSubscription"
Expand Down Expand Up @@ -94,3 +100,9 @@ class UpdateAutoRenew(str, Enum):

true = "true"
false = "false"


class Status(str, Enum):

approved = "Approved"
rejected = "Rejected"
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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 IncreaseLineOfCreditRequestProperties(Model):
"""Request parameters to increase line of credit.

:param desired_credit_limit: The desired credit limit.
:type desired_credit_limit: float
"""

_attribute_map = {
'desired_credit_limit': {'key': 'desiredCreditLimit', 'type': 'float'},
}

def __init__(self, **kwargs):
super(IncreaseLineOfCreditRequestProperties, self).__init__(**kwargs)
self.desired_credit_limit = kwargs.get('desired_credit_limit', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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 IncreaseLineOfCreditRequestProperties(Model):
"""Request parameters to increase line of credit.

:param desired_credit_limit: The desired credit limit.
:type desired_credit_limit: float
"""

_attribute_map = {
'desired_credit_limit': {'key': 'desiredCreditLimit', 'type': 'float'},
}

def __init__(self, *, desired_credit_limit: float=None, **kwargs) -> None:
super(IncreaseLineOfCreditRequestProperties, self).__init__(**kwargs)
self.desired_credit_limit = desired_credit_limit
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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 LineOfCredit(Resource):
"""Line of credit resource.

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
:ivar credit_limit: The current credit limit.
:vartype credit_limit: ~azure.mgmt.billing.models.Amount
:ivar reason: The reason for the line of credit status when not approved.
:vartype reason: str
:ivar remaining_balance: Remaining balance.
:vartype remaining_balance: ~azure.mgmt.billing.models.Amount
:param status: The line of credit status. Possible values include:
'Approved', 'Rejected'
:type status: str or ~azure.mgmt.billing.models.Status
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'credit_limit': {'readonly': True},
'reason': {'readonly': True},
'remaining_balance': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'credit_limit': {'key': 'properties.creditLimit', 'type': 'Amount'},
'reason': {'key': 'properties.reason', 'type': 'str'},
'remaining_balance': {'key': 'properties.remainingBalance', 'type': 'Amount'},
'status': {'key': 'properties.status', 'type': 'str'},
}

def __init__(self, **kwargs):
super(LineOfCredit, self).__init__(**kwargs)
self.credit_limit = None
self.reason = None
self.remaining_balance = None
self.status = kwargs.get('status', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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 LineOfCredit(Resource):
"""Line of credit resource.

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
:ivar credit_limit: The current credit limit.
:vartype credit_limit: ~azure.mgmt.billing.models.Amount
:ivar reason: The reason for the line of credit status when not approved.
:vartype reason: str
:ivar remaining_balance: Remaining balance.
:vartype remaining_balance: ~azure.mgmt.billing.models.Amount
:param status: The line of credit status. Possible values include:
'Approved', 'Rejected'
:type status: str or ~azure.mgmt.billing.models.Status
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'credit_limit': {'readonly': True},
'reason': {'readonly': True},
'remaining_balance': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'credit_limit': {'key': 'properties.creditLimit', 'type': 'Amount'},
'reason': {'key': 'properties.reason', 'type': 'str'},
'remaining_balance': {'key': 'properties.remainingBalance', 'type': 'Amount'},
'status': {'key': 'properties.status', 'type': 'str'},
}

def __init__(self, *, status=None, **kwargs) -> None:
super(LineOfCredit, self).__init__(**kwargs)
self.credit_limit = None
self.reason = None
self.remaining_balance = None
self.status = status
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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 ValidateAddressResponse(Model):
"""Result of the address validation.

:param status: status of the address validation. Possible values include:
'Valid', 'Invalid'
:type status: str or ~azure.mgmt.billing.models.AddressValidationStatus
:param suggested_addresses: list of suggested addresses.
:type suggested_addresses: list[~azure.mgmt.billing.models.Address]
:param validation_message: Validation error message.
:type validation_message: str
"""

_attribute_map = {
'status': {'key': 'status', 'type': 'str'},
'suggested_addresses': {'key': 'suggestedAddresses', 'type': '[Address]'},
'validation_message': {'key': 'validationMessage', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ValidateAddressResponse, self).__init__(**kwargs)
self.status = kwargs.get('status', None)
self.suggested_addresses = kwargs.get('suggested_addresses', None)
self.validation_message = kwargs.get('validation_message', None)
Loading