package
0.20240715.1103416
Repository: https://github.com/hashicorp/go-azure-sdk.git
Documentation: pkg.go.dev

# README

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

The paymentmethods 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/paymentmethods"

Client Initialization

client := paymentmethods.NewPaymentMethodsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PaymentMethodsClient.DeleteAtBillingProfile

ctx := context.TODO()
id := paymentmethods.NewPaymentMethodLinkID("billingAccountValue", "billingProfileValue", "paymentMethodLinkValue")

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

Example Usage: PaymentMethodsClient.DeleteByUser

ctx := context.TODO()
id := paymentmethods.NewPaymentMethodID("paymentMethodValue")

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

Example Usage: PaymentMethodsClient.GetByBillingAccount

ctx := context.TODO()
id := paymentmethods.NewBillingAccountPaymentMethodID("billingAccountValue", "paymentMethodValue")

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: PaymentMethodsClient.GetByBillingProfile

ctx := context.TODO()
id := paymentmethods.NewPaymentMethodLinkID("billingAccountValue", "billingProfileValue", "paymentMethodLinkValue")

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

Example Usage: PaymentMethodsClient.GetByUser

ctx := context.TODO()
id := paymentmethods.NewPaymentMethodID("paymentMethodValue")

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

Example Usage: PaymentMethodsClient.ListByBillingAccount

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

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

Example Usage: PaymentMethodsClient.ListByBillingProfile

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

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

Example Usage: PaymentMethodsClient.ListByUser

ctx := context.TODO()


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

# Functions

NewBillingAccountID returns a new BillingAccountId struct.
NewBillingAccountPaymentMethodID returns a new BillingAccountPaymentMethodId struct.
NewBillingProfileID returns a new BillingProfileId struct.
NewPaymentMethodID returns a new PaymentMethodId struct.
NewPaymentMethodLinkID returns a new PaymentMethodLinkId struct.
No description provided by the author
ParseBillingAccountID parses 'input' into a BillingAccountId.
ParseBillingAccountIDInsensitively parses 'input' case-insensitively into a BillingAccountId note: this method should only be used for API response data and not user input.
ParseBillingAccountPaymentMethodID parses 'input' into a BillingAccountPaymentMethodId.
ParseBillingAccountPaymentMethodIDInsensitively parses 'input' case-insensitively into a BillingAccountPaymentMethodId note: this method should only be used for API response data and not user input.
ParseBillingProfileID parses 'input' into a BillingProfileId.
ParseBillingProfileIDInsensitively parses 'input' case-insensitively into a BillingProfileId note: this method should only be used for API response data and not user input.
ParsePaymentMethodID parses 'input' into a PaymentMethodId.
ParsePaymentMethodIDInsensitively parses 'input' case-insensitively into a PaymentMethodId note: this method should only be used for API response data and not user input.
ParsePaymentMethodLinkID parses 'input' into a PaymentMethodLinkId.
ParsePaymentMethodLinkIDInsensitively parses 'input' case-insensitively into a PaymentMethodLinkId note: this method should only be used for API response data and not user input.
No description provided by the author
No description provided by the author
ValidateBillingAccountID checks that 'input' can be parsed as a Billing Account ID.
ValidateBillingAccountPaymentMethodID checks that 'input' can be parsed as a Billing Account Payment Method ID.
ValidateBillingProfileID checks that 'input' can be parsed as a Billing Profile ID.
ValidatePaymentMethodID checks that 'input' can be parsed as a Payment Method ID.
ValidatePaymentMethodLinkID checks that 'input' can be parsed as a Payment Method Link ID.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

BillingAccountId is a struct representing the Resource ID for a Billing Account.
BillingAccountPaymentMethodId is a struct representing the Resource ID for a Billing Account Payment Method.
BillingProfileId is a struct representing the Resource ID for a Billing Profile.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PaymentMethodId is a struct representing the Resource ID for a Payment Method.
No description provided by the author
PaymentMethodLinkId is a struct representing the Resource ID for a Payment Method Link.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author