customer

package
v0.20240708.1080555 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/customer Documentation

The customer SDK allows for interaction with the Azure Resource Manager Service billing (API Version 2024-04-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/2024-04-01/customer"

Client Initialization

client := customer.NewCustomerClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CustomerClient.Get

ctx := context.TODO()
id := customer.NewBillingProfileCustomerID("billingAccountValue", "billingProfileValue", "customerValue")

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

Example Usage: CustomerClient.GetByBillingAccount

ctx := context.TODO()
id := customer.NewCustomerID("billingAccountValue", "customerValue")

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

Example Usage: CustomerClient.ListByBillingAccount

ctx := context.TODO()
id := customer.NewBillingAccountID("billingAccountValue")

// alternatively `client.ListByBillingAccount(ctx, id, customer.DefaultListByBillingAccountOperationOptions())` can be used to do batched pagination
items, err := client.ListByBillingAccountComplete(ctx, id, customer.DefaultListByBillingAccountOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: CustomerClient.ListByBillingProfile

ctx := context.TODO()
id := customer.NewBillingProfileID("billingAccountValue", "billingProfileValue")

// alternatively `client.ListByBillingProfile(ctx, id, customer.DefaultListByBillingProfileOperationOptions())` can be used to do batched pagination
items, err := client.ListByBillingProfileComplete(ctx, id, customer.DefaultListByBillingProfileOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForCustomerStatus

func PossibleValuesForCustomerStatus() []string

func ValidateBillingAccountID

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

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

func ValidateBillingProfileCustomerID

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

ValidateBillingProfileCustomerID checks that 'input' can be parsed as a Billing Profile Customer ID

func ValidateBillingProfileID

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

ValidateBillingProfileID checks that 'input' can be parsed as a Billing Profile ID

func ValidateCustomerID

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

ValidateCustomerID checks that 'input' can be parsed as a Customer ID

Types

type AzurePlan

type AzurePlan struct {
	ProductId      *string `json:"productId,omitempty"`
	SkuDescription *string `json:"skuDescription,omitempty"`
	SkuId          *string `json:"skuId,omitempty"`
}

type BillingAccountId

type BillingAccountId struct {
	BillingAccountName string
}

BillingAccountId is a struct representing the Resource ID for a Billing Account

func NewBillingAccountID

func NewBillingAccountID(billingAccountName string) BillingAccountId

NewBillingAccountID returns a new BillingAccountId struct

func ParseBillingAccountID

func ParseBillingAccountID(input string) (*BillingAccountId, error)

ParseBillingAccountID parses 'input' into a BillingAccountId

func ParseBillingAccountIDInsensitively

func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error)

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

func (*BillingAccountId) FromParseResult

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

func (BillingAccountId) ID

func (id BillingAccountId) ID() string

ID returns the formatted Billing Account ID

func (BillingAccountId) Segments

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

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

func (BillingAccountId) String

func (id BillingAccountId) String() string

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

type BillingProfileCustomerId

type BillingProfileCustomerId struct {
	BillingAccountName string
	BillingProfileName string
	CustomerName       string
}

BillingProfileCustomerId is a struct representing the Resource ID for a Billing Profile Customer

func NewBillingProfileCustomerID

func NewBillingProfileCustomerID(billingAccountName string, billingProfileName string, customerName string) BillingProfileCustomerId

NewBillingProfileCustomerID returns a new BillingProfileCustomerId struct

func ParseBillingProfileCustomerID

func ParseBillingProfileCustomerID(input string) (*BillingProfileCustomerId, error)

ParseBillingProfileCustomerID parses 'input' into a BillingProfileCustomerId

func ParseBillingProfileCustomerIDInsensitively

func ParseBillingProfileCustomerIDInsensitively(input string) (*BillingProfileCustomerId, error)

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

func (*BillingProfileCustomerId) FromParseResult

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

func (BillingProfileCustomerId) ID

ID returns the formatted Billing Profile Customer ID

func (BillingProfileCustomerId) Segments

Segments returns a slice of Resource ID Segments which comprise this Billing Profile Customer ID

func (BillingProfileCustomerId) String

func (id BillingProfileCustomerId) String() string

String returns a human-readable description of this Billing Profile Customer ID

type BillingProfileId

type BillingProfileId struct {
	BillingAccountName string
	BillingProfileName string
}

BillingProfileId is a struct representing the Resource ID for a Billing Profile

func NewBillingProfileID

func NewBillingProfileID(billingAccountName string, billingProfileName string) BillingProfileId

NewBillingProfileID returns a new BillingProfileId struct

func ParseBillingProfileID

func ParseBillingProfileID(input string) (*BillingProfileId, error)

ParseBillingProfileID parses 'input' into a BillingProfileId

func ParseBillingProfileIDInsensitively

func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error)

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

func (*BillingProfileId) FromParseResult

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

func (BillingProfileId) ID

func (id BillingProfileId) ID() string

ID returns the formatted Billing Profile ID

func (BillingProfileId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Billing Profile ID

func (BillingProfileId) String

func (id BillingProfileId) String() string

String returns a human-readable description of this Billing Profile ID

type Customer

type Customer struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *CustomerProperties    `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type CustomerClient

type CustomerClient struct {
	Client *resourcemanager.Client
}

func NewCustomerClientWithBaseURI

func NewCustomerClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomerClient, error)

func (CustomerClient) Get

Get ...

func (CustomerClient) GetByBillingAccount

func (c CustomerClient) GetByBillingAccount(ctx context.Context, id CustomerId) (result GetByBillingAccountOperationResponse, err error)

GetByBillingAccount ...

func (CustomerClient) ListByBillingAccount

ListByBillingAccount ...

func (CustomerClient) ListByBillingAccountComplete

ListByBillingAccountComplete retrieves all the results into a single object

func (CustomerClient) ListByBillingAccountCompleteMatchingPredicate

func (c CustomerClient) ListByBillingAccountCompleteMatchingPredicate(ctx context.Context, id BillingAccountId, options ListByBillingAccountOperationOptions, predicate CustomerOperationPredicate) (result ListByBillingAccountCompleteResult, err error)

ListByBillingAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CustomerClient) ListByBillingProfile

ListByBillingProfile ...

func (CustomerClient) ListByBillingProfileComplete

ListByBillingProfileComplete retrieves all the results into a single object

func (CustomerClient) ListByBillingProfileCompleteMatchingPredicate

func (c CustomerClient) ListByBillingProfileCompleteMatchingPredicate(ctx context.Context, id BillingProfileId, options ListByBillingProfileOperationOptions, predicate CustomerOperationPredicate) (result ListByBillingProfileCompleteResult, err error)

ListByBillingProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate

type CustomerId

type CustomerId struct {
	BillingAccountName string
	CustomerName       string
}

CustomerId is a struct representing the Resource ID for a Customer

func NewCustomerID

func NewCustomerID(billingAccountName string, customerName string) CustomerId

NewCustomerID returns a new CustomerId struct

func ParseCustomerID

func ParseCustomerID(input string) (*CustomerId, error)

ParseCustomerID parses 'input' into a CustomerId

func ParseCustomerIDInsensitively

func ParseCustomerIDInsensitively(input string) (*CustomerId, error)

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

func (*CustomerId) FromParseResult

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

func (CustomerId) ID

func (id CustomerId) ID() string

ID returns the formatted Customer ID

func (CustomerId) Segments

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

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

func (CustomerId) String

func (id CustomerId) String() string

String returns a human-readable description of this Customer ID

type CustomerOperationPredicate

type CustomerOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (CustomerOperationPredicate) Matches

func (p CustomerOperationPredicate) Matches(input Customer) bool

type CustomerProperties

type CustomerProperties struct {
	BillingProfileDisplayName *string            `json:"billingProfileDisplayName,omitempty"`
	BillingProfileId          *string            `json:"billingProfileId,omitempty"`
	DisplayName               *string            `json:"displayName,omitempty"`
	EnabledAzurePlans         *[]AzurePlan       `json:"enabledAzurePlans,omitempty"`
	Resellers                 *[]Reseller        `json:"resellers,omitempty"`
	Status                    *CustomerStatus    `json:"status,omitempty"`
	SystemId                  *string            `json:"systemId,omitempty"`
	Tags                      *map[string]string `json:"tags,omitempty"`
}

type CustomerStatus

type CustomerStatus string
const (
	CustomerStatusActive      CustomerStatus = "Active"
	CustomerStatusDeleted     CustomerStatus = "Deleted"
	CustomerStatusDisabled    CustomerStatus = "Disabled"
	CustomerStatusOther       CustomerStatus = "Other"
	CustomerStatusPending     CustomerStatus = "Pending"
	CustomerStatusUnderReview CustomerStatus = "UnderReview"
	CustomerStatusWarned      CustomerStatus = "Warned"
)

func (*CustomerStatus) UnmarshalJSON

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

type GetByBillingAccountOperationResponse

type GetByBillingAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Customer
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Customer
}

type ListByBillingAccountCompleteResult

type ListByBillingAccountCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Customer
}

type ListByBillingAccountCustomPager added in v0.20240628.1153531

type ListByBillingAccountCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByBillingAccountCustomPager) NextPageLink() *odata.Link

type ListByBillingAccountOperationOptions

type ListByBillingAccountOperationOptions struct {
	Count   *bool
	Expand  *string
	Filter  *string
	OrderBy *string
	Search  *string
	Skip    *int64
	Top     *int64
}

func DefaultListByBillingAccountOperationOptions

func DefaultListByBillingAccountOperationOptions() ListByBillingAccountOperationOptions

func (ListByBillingAccountOperationOptions) ToHeaders

func (ListByBillingAccountOperationOptions) ToOData

func (ListByBillingAccountOperationOptions) ToQuery

type ListByBillingAccountOperationResponse

type ListByBillingAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Customer
}

type ListByBillingProfileCompleteResult

type ListByBillingProfileCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Customer
}

type ListByBillingProfileCustomPager added in v0.20240628.1153531

type ListByBillingProfileCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByBillingProfileCustomPager) NextPageLink() *odata.Link

type ListByBillingProfileOperationOptions

type ListByBillingProfileOperationOptions struct {
	Count   *bool
	Expand  *string
	Filter  *string
	OrderBy *string
	Search  *string
	Skip    *int64
	Top     *int64
}

func DefaultListByBillingProfileOperationOptions

func DefaultListByBillingProfileOperationOptions() ListByBillingProfileOperationOptions

func (ListByBillingProfileOperationOptions) ToHeaders

func (ListByBillingProfileOperationOptions) ToOData

func (ListByBillingProfileOperationOptions) ToQuery

type ListByBillingProfileOperationResponse

type ListByBillingProfileOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Customer
}

type Reseller

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

Jump to

Keyboard shortcuts

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