billings

package
v0.20240125.1122928 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/billings Documentation

The billings SDK allows for interaction with the Azure Resource Manager Service billing (API Version 2020-05-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/billings"

Client Initialization

client := billings.NewBillingsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BillingsClient.BillingSubscriptionsMove

ctx := context.TODO()
id := billings.NewBillingAccountBillingSubscriptionID("billingAccountValue", "subscriptionIdValue")

payload := billings.TransferBillingSubscriptionRequestProperties{
	// ...
}


if err := client.BillingSubscriptionsMoveThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: BillingsClient.BillingSubscriptionsValidateMove

ctx := context.TODO()
id := billings.NewBillingAccountBillingSubscriptionID("billingAccountValue", "subscriptionIdValue")

payload := billings.TransferBillingSubscriptionRequestProperties{
	// ...
}


read, err := client.BillingSubscriptionsValidateMove(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: BillingsClient.ProductsValidateMove

ctx := context.TODO()
id := billings.NewProductID("billingAccountValue", "productValue")

payload := billings.TransferProductRequestProperties{
	// ...
}


read, err := client.ProductsValidateMove(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForBillingSubscriptionStatusType

func PossibleValuesForBillingSubscriptionStatusType() []string

func PossibleValuesForProductTransferValidationErrorCode

func PossibleValuesForProductTransferValidationErrorCode() []string

func PossibleValuesForSubscriptionTransferValidationErrorCode

func PossibleValuesForSubscriptionTransferValidationErrorCode() []string

func ValidateBillingAccountBillingSubscriptionID

func ValidateBillingAccountBillingSubscriptionID(input interface{}, key string) (warnings []string, errors []error)

ValidateBillingAccountBillingSubscriptionID checks that 'input' can be parsed as a Billing Account Billing Subscription ID

func ValidateProductID

func ValidateProductID(input interface{}, key string) (warnings []string, errors []error)

ValidateProductID checks that 'input' can be parsed as a Product ID

Types

type Amount

type Amount struct {
	Currency *string  `json:"currency,omitempty"`
	Value    *float64 `json:"value,omitempty"`
}

type BillingAccountBillingSubscriptionId

type BillingAccountBillingSubscriptionId struct {
	BillingAccountName string
	SubscriptionId     string
}

BillingAccountBillingSubscriptionId is a struct representing the Resource ID for a Billing Account Billing Subscription

func NewBillingAccountBillingSubscriptionID

func NewBillingAccountBillingSubscriptionID(billingAccountName string, subscriptionId string) BillingAccountBillingSubscriptionId

NewBillingAccountBillingSubscriptionID returns a new BillingAccountBillingSubscriptionId struct

func ParseBillingAccountBillingSubscriptionID

func ParseBillingAccountBillingSubscriptionID(input string) (*BillingAccountBillingSubscriptionId, error)

ParseBillingAccountBillingSubscriptionID parses 'input' into a BillingAccountBillingSubscriptionId

func ParseBillingAccountBillingSubscriptionIDInsensitively

func ParseBillingAccountBillingSubscriptionIDInsensitively(input string) (*BillingAccountBillingSubscriptionId, error)

ParseBillingAccountBillingSubscriptionIDInsensitively parses 'input' case-insensitively into a BillingAccountBillingSubscriptionId note: this method should only be used for API response data and not user input

func (*BillingAccountBillingSubscriptionId) FromParseResult

func (BillingAccountBillingSubscriptionId) ID

ID returns the formatted Billing Account Billing Subscription ID

func (BillingAccountBillingSubscriptionId) Segments

Segments returns a slice of Resource ID Segments which comprise this Billing Account Billing Subscription ID

func (BillingAccountBillingSubscriptionId) String

String returns a human-readable description of this Billing Account Billing Subscription ID

type BillingSubscription

type BillingSubscription struct {
	Id         *string                        `json:"id,omitempty"`
	Name       *string                        `json:"name,omitempty"`
	Properties *BillingSubscriptionProperties `json:"properties,omitempty"`
	Type       *string                        `json:"type,omitempty"`
}

type BillingSubscriptionProperties

type BillingSubscriptionProperties struct {
	BillingProfileDisplayName *string                        `json:"billingProfileDisplayName,omitempty"`
	BillingProfileId          *string                        `json:"billingProfileId,omitempty"`
	CostCenter                *string                        `json:"costCenter,omitempty"`
	CustomerDisplayName       *string                        `json:"customerDisplayName,omitempty"`
	CustomerId                *string                        `json:"customerId,omitempty"`
	DisplayName               *string                        `json:"displayName,omitempty"`
	InvoiceSectionDisplayName *string                        `json:"invoiceSectionDisplayName,omitempty"`
	InvoiceSectionId          *string                        `json:"invoiceSectionId,omitempty"`
	LastMonthCharges          *Amount                        `json:"lastMonthCharges,omitempty"`
	MonthToDateCharges        *Amount                        `json:"monthToDateCharges,omitempty"`
	Reseller                  *Reseller                      `json:"reseller,omitempty"`
	SkuDescription            *string                        `json:"skuDescription,omitempty"`
	SkuId                     *string                        `json:"skuId,omitempty"`
	SubscriptionBillingStatus *BillingSubscriptionStatusType `json:"subscriptionBillingStatus,omitempty"`
	SubscriptionId            *string                        `json:"subscriptionId,omitempty"`
	SuspensionReasons         *[]string                      `json:"suspensionReasons,omitempty"`
}

type BillingSubscriptionStatusType

type BillingSubscriptionStatusType string
const (
	BillingSubscriptionStatusTypeAbandoned BillingSubscriptionStatusType = "Abandoned"
	BillingSubscriptionStatusTypeActive    BillingSubscriptionStatusType = "Active"
	BillingSubscriptionStatusTypeDeleted   BillingSubscriptionStatusType = "Deleted"
	BillingSubscriptionStatusTypeInactive  BillingSubscriptionStatusType = "Inactive"
	BillingSubscriptionStatusTypeWarning   BillingSubscriptionStatusType = "Warning"
)

func (*BillingSubscriptionStatusType) UnmarshalJSON

func (s *BillingSubscriptionStatusType) UnmarshalJSON(bytes []byte) error

type BillingSubscriptionsMoveOperationResponse

type BillingSubscriptionsMoveOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *BillingSubscription
}

type BillingSubscriptionsValidateMoveOperationResponse

type BillingSubscriptionsValidateMoveOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ValidateSubscriptionTransferEligibilityResult
}

type BillingsClient

type BillingsClient struct {
	Client *resourcemanager.Client
}

func NewBillingsClientWithBaseURI

func NewBillingsClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingsClient, error)

func (BillingsClient) BillingSubscriptionsMove

BillingSubscriptionsMove ...

func (BillingsClient) BillingSubscriptionsMoveThenPoll

BillingSubscriptionsMoveThenPoll performs BillingSubscriptionsMove then polls until it's completed

func (BillingsClient) BillingSubscriptionsValidateMove

BillingSubscriptionsValidateMove ...

func (BillingsClient) ProductsValidateMove

ProductsValidateMove ...

type ProductId

type ProductId struct {
	BillingAccountName string
	ProductName        string
}

ProductId is a struct representing the Resource ID for a Product

func NewProductID

func NewProductID(billingAccountName string, productName string) ProductId

NewProductID returns a new ProductId struct

func ParseProductID

func ParseProductID(input string) (*ProductId, error)

ParseProductID parses 'input' into a ProductId

func ParseProductIDInsensitively

func ParseProductIDInsensitively(input string) (*ProductId, error)

ParseProductIDInsensitively parses 'input' case-insensitively into a ProductId note: this method should only be used for API response data and not user input

func (*ProductId) FromParseResult

func (id *ProductId) FromParseResult(input resourceids.ParseResult) error

func (ProductId) ID

func (id ProductId) ID() string

ID returns the formatted Product ID

func (ProductId) Segments

func (id ProductId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Product ID

func (ProductId) String

func (id ProductId) String() string

String returns a human-readable description of this Product ID

type ProductTransferValidationErrorCode

type ProductTransferValidationErrorCode string
const (
	ProductTransferValidationErrorCodeCrossBillingAccountNotAllowed            ProductTransferValidationErrorCode = "CrossBillingAccountNotAllowed"
	ProductTransferValidationErrorCodeDestinationBillingProfilePastDue         ProductTransferValidationErrorCode = "DestinationBillingProfilePastDue"
	ProductTransferValidationErrorCodeInsufficientPermissionOnDestination      ProductTransferValidationErrorCode = "InsufficientPermissionOnDestination"
	ProductTransferValidationErrorCodeInsufficientPermissionOnSource           ProductTransferValidationErrorCode = "InsufficientPermissionOnSource"
	ProductTransferValidationErrorCodeInvalidSource                            ProductTransferValidationErrorCode = "InvalidSource"
	ProductTransferValidationErrorCodeNotAvailableForDestinationMarket         ProductTransferValidationErrorCode = "NotAvailableForDestinationMarket"
	ProductTransferValidationErrorCodeOneTimePurchaseProductTransferNotAllowed ProductTransferValidationErrorCode = "OneTimePurchaseProductTransferNotAllowed"
	ProductTransferValidationErrorCodeProductNotActive                         ProductTransferValidationErrorCode = "ProductNotActive"
	ProductTransferValidationErrorCodeProductTypeNotSupported                  ProductTransferValidationErrorCode = "ProductTypeNotSupported"
)

func (*ProductTransferValidationErrorCode) UnmarshalJSON

func (s *ProductTransferValidationErrorCode) UnmarshalJSON(bytes []byte) error

type ProductsValidateMoveOperationResponse

type ProductsValidateMoveOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ValidateProductTransferEligibilityResult
}

type Reseller

type Reseller struct {
	Description *string `json:"description,omitempty"`
	ResellerId  *string `json:"resellerId,omitempty"`
}

type SubscriptionTransferValidationErrorCode

type SubscriptionTransferValidationErrorCode string
const (
	SubscriptionTransferValidationErrorCodeBillingAccountInactive              SubscriptionTransferValidationErrorCode = "BillingAccountInactive"
	SubscriptionTransferValidationErrorCodeCrossBillingAccountNotAllowed       SubscriptionTransferValidationErrorCode = "CrossBillingAccountNotAllowed"
	SubscriptionTransferValidationErrorCodeDestinationBillingProfileInactive   SubscriptionTransferValidationErrorCode = "DestinationBillingProfileInactive"
	SubscriptionTransferValidationErrorCodeDestinationBillingProfileNotFound   SubscriptionTransferValidationErrorCode = "DestinationBillingProfileNotFound"
	SubscriptionTransferValidationErrorCodeDestinationBillingProfilePastDue    SubscriptionTransferValidationErrorCode = "DestinationBillingProfilePastDue"
	SubscriptionTransferValidationErrorCodeDestinationInvoiceSectionInactive   SubscriptionTransferValidationErrorCode = "DestinationInvoiceSectionInactive"
	SubscriptionTransferValidationErrorCodeDestinationInvoiceSectionNotFound   SubscriptionTransferValidationErrorCode = "DestinationInvoiceSectionNotFound"
	SubscriptionTransferValidationErrorCodeInsufficientPermissionOnDestination SubscriptionTransferValidationErrorCode = "InsufficientPermissionOnDestination"
	SubscriptionTransferValidationErrorCodeInsufficientPermissionOnSource      SubscriptionTransferValidationErrorCode = "InsufficientPermissionOnSource"
	SubscriptionTransferValidationErrorCodeInvalidDestination                  SubscriptionTransferValidationErrorCode = "InvalidDestination"
	SubscriptionTransferValidationErrorCodeInvalidSource                       SubscriptionTransferValidationErrorCode = "InvalidSource"
	SubscriptionTransferValidationErrorCodeMarketplaceNotEnabledOnDestination  SubscriptionTransferValidationErrorCode = "MarketplaceNotEnabledOnDestination"
	SubscriptionTransferValidationErrorCodeNotAvailableForDestinationMarket    SubscriptionTransferValidationErrorCode = "NotAvailableForDestinationMarket"
	SubscriptionTransferValidationErrorCodeProductInactive                     SubscriptionTransferValidationErrorCode = "ProductInactive"
	SubscriptionTransferValidationErrorCodeProductNotFound                     SubscriptionTransferValidationErrorCode = "ProductNotFound"
	SubscriptionTransferValidationErrorCodeProductTypeNotSupported             SubscriptionTransferValidationErrorCode = "ProductTypeNotSupported"
	SubscriptionTransferValidationErrorCodeSourceBillingProfilePastDue         SubscriptionTransferValidationErrorCode = "SourceBillingProfilePastDue"
	SubscriptionTransferValidationErrorCodeSourceInvoiceSectionInactive        SubscriptionTransferValidationErrorCode = "SourceInvoiceSectionInactive"
	SubscriptionTransferValidationErrorCodeSubscriptionNotActive               SubscriptionTransferValidationErrorCode = "SubscriptionNotActive"
	SubscriptionTransferValidationErrorCodeSubscriptionTypeNotSupported        SubscriptionTransferValidationErrorCode = "SubscriptionTypeNotSupported"
)

func (*SubscriptionTransferValidationErrorCode) UnmarshalJSON

func (s *SubscriptionTransferValidationErrorCode) UnmarshalJSON(bytes []byte) error

type TransferBillingSubscriptionRequestProperties

type TransferBillingSubscriptionRequestProperties struct {
	DestinationInvoiceSectionId string `json:"destinationInvoiceSectionId"`
}

type TransferProductRequestProperties

type TransferProductRequestProperties struct {
	DestinationInvoiceSectionId *string `json:"destinationInvoiceSectionId,omitempty"`
}

type ValidateProductTransferEligibilityError

type ValidateProductTransferEligibilityError struct {
	Code    *ProductTransferValidationErrorCode `json:"code,omitempty"`
	Details *string                             `json:"details,omitempty"`
	Message *string                             `json:"message,omitempty"`
}

type ValidateProductTransferEligibilityResult

type ValidateProductTransferEligibilityResult struct {
	ErrorDetails   *ValidateProductTransferEligibilityError `json:"errorDetails,omitempty"`
	IsMoveEligible *bool                                    `json:"isMoveEligible,omitempty"`
}

type ValidateSubscriptionTransferEligibilityError

type ValidateSubscriptionTransferEligibilityError struct {
	Code    *SubscriptionTransferValidationErrorCode `json:"code,omitempty"`
	Details *string                                  `json:"details,omitempty"`
	Message *string                                  `json:"message,omitempty"`
}

type ValidateSubscriptionTransferEligibilityResult

type ValidateSubscriptionTransferEligibilityResult struct {
	ErrorDetails   *ValidateSubscriptionTransferEligibilityError `json:"errorDetails,omitempty"`
	IsMoveEligible *bool                                         `json:"isMoveEligible,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL