paymentmethods

package
v0.20240320.1105218 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/billing/2021-10-01/paymentmethods Documentation

The paymentmethods SDK allows for interaction with the Azure Resource Manager Service billing (API Version 2021-10-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/2021-10-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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForPaymentMethodFamily

func PossibleValuesForPaymentMethodFamily() []string

func PossibleValuesForPaymentMethodStatus

func PossibleValuesForPaymentMethodStatus() []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 ValidateBillingAccountPaymentMethodID

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

ValidateBillingAccountPaymentMethodID checks that 'input' can be parsed as a Billing Account Payment Method 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 ValidatePaymentMethodID

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

ValidatePaymentMethodID checks that 'input' can be parsed as a Payment Method ID

func ValidatePaymentMethodLinkID

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

ValidatePaymentMethodLinkID checks that 'input' can be parsed as a Payment Method Link ID

Types

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 BillingAccountPaymentMethodId

type BillingAccountPaymentMethodId struct {
	BillingAccountName string
	PaymentMethodName  string
}

BillingAccountPaymentMethodId is a struct representing the Resource ID for a Billing Account Payment Method

func NewBillingAccountPaymentMethodID

func NewBillingAccountPaymentMethodID(billingAccountName string, paymentMethodName string) BillingAccountPaymentMethodId

NewBillingAccountPaymentMethodID returns a new BillingAccountPaymentMethodId struct

func ParseBillingAccountPaymentMethodID

func ParseBillingAccountPaymentMethodID(input string) (*BillingAccountPaymentMethodId, error)

ParseBillingAccountPaymentMethodID parses 'input' into a BillingAccountPaymentMethodId

func ParseBillingAccountPaymentMethodIDInsensitively

func ParseBillingAccountPaymentMethodIDInsensitively(input string) (*BillingAccountPaymentMethodId, error)

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

func (*BillingAccountPaymentMethodId) FromParseResult

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

func (BillingAccountPaymentMethodId) ID

ID returns the formatted Billing Account Payment Method ID

func (BillingAccountPaymentMethodId) Segments

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

func (BillingAccountPaymentMethodId) String

String returns a human-readable description of this Billing Account Payment Method 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 DeleteAtBillingProfileOperationResponse

type DeleteAtBillingProfileOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type DeleteByUserOperationResponse

type DeleteByUserOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetByBillingAccountOperationResponse

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

type GetByBillingProfileOperationResponse

type GetByBillingProfileOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PaymentMethodLink
}

type GetByUserOperationResponse

type GetByUserOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PaymentMethod
}

type ListByBillingAccountCompleteResult

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

type ListByBillingAccountOperationResponse

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

type ListByBillingProfileCompleteResult

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

type ListByBillingProfileOperationResponse

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

type ListByUserCompleteResult

type ListByUserCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []PaymentMethod
}

type ListByUserOperationResponse

type ListByUserOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]PaymentMethod
}

type PaymentMethod

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

type PaymentMethodFamily

type PaymentMethodFamily string
const (
	PaymentMethodFamilyCheckWire  PaymentMethodFamily = "CheckWire"
	PaymentMethodFamilyCreditCard PaymentMethodFamily = "CreditCard"
)

func (*PaymentMethodFamily) UnmarshalJSON

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

type PaymentMethodId

type PaymentMethodId struct {
	PaymentMethodName string
}

PaymentMethodId is a struct representing the Resource ID for a Payment Method

func NewPaymentMethodID

func NewPaymentMethodID(paymentMethodName string) PaymentMethodId

NewPaymentMethodID returns a new PaymentMethodId struct

func ParsePaymentMethodID

func ParsePaymentMethodID(input string) (*PaymentMethodId, error)

ParsePaymentMethodID parses 'input' into a PaymentMethodId

func ParsePaymentMethodIDInsensitively

func ParsePaymentMethodIDInsensitively(input string) (*PaymentMethodId, error)

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

func (*PaymentMethodId) FromParseResult

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

func (PaymentMethodId) ID

func (id PaymentMethodId) ID() string

ID returns the formatted Payment Method ID

func (PaymentMethodId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Payment Method ID

func (PaymentMethodId) String

func (id PaymentMethodId) String() string

String returns a human-readable description of this Payment Method ID

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

type PaymentMethodLinkId

type PaymentMethodLinkId struct {
	BillingAccountName    string
	BillingProfileName    string
	PaymentMethodLinkName string
}

PaymentMethodLinkId is a struct representing the Resource ID for a Payment Method Link

func NewPaymentMethodLinkID

func NewPaymentMethodLinkID(billingAccountName string, billingProfileName string, paymentMethodLinkName string) PaymentMethodLinkId

NewPaymentMethodLinkID returns a new PaymentMethodLinkId struct

func ParsePaymentMethodLinkID

func ParsePaymentMethodLinkID(input string) (*PaymentMethodLinkId, error)

ParsePaymentMethodLinkID parses 'input' into a PaymentMethodLinkId

func ParsePaymentMethodLinkIDInsensitively

func ParsePaymentMethodLinkIDInsensitively(input string) (*PaymentMethodLinkId, error)

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

func (*PaymentMethodLinkId) FromParseResult

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

func (PaymentMethodLinkId) ID

func (id PaymentMethodLinkId) ID() string

ID returns the formatted Payment Method Link ID

func (PaymentMethodLinkId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Payment Method Link ID

func (PaymentMethodLinkId) String

func (id PaymentMethodLinkId) String() string

String returns a human-readable description of this Payment Method Link ID

type PaymentMethodLinkOperationPredicate

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

func (PaymentMethodLinkOperationPredicate) Matches

type PaymentMethodLinkProperties

type PaymentMethodLinkProperties struct {
	PaymentMethod *PaymentMethodProjectionProperties `json:"paymentMethod,omitempty"`
}
type PaymentMethodLogo struct {
	MimeType *string `json:"mimeType,omitempty"`
	Url      *string `json:"url,omitempty"`
}

type PaymentMethodOperationPredicate

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

func (PaymentMethodOperationPredicate) Matches

type PaymentMethodProjectionProperties

type PaymentMethodProjectionProperties struct {
	AccountHolderName *string              `json:"accountHolderName,omitempty"`
	DisplayName       *string              `json:"displayName,omitempty"`
	Expiration        *string              `json:"expiration,omitempty"`
	Family            *PaymentMethodFamily `json:"family,omitempty"`
	Id                *string              `json:"id,omitempty"`
	LastFourDigits    *string              `json:"lastFourDigits,omitempty"`
	Logos             *[]PaymentMethodLogo `json:"logos,omitempty"`
	Status            *PaymentMethodStatus `json:"status,omitempty"`
	Type              *string              `json:"type,omitempty"`
}

type PaymentMethodProperties

type PaymentMethodProperties struct {
	AccountHolderName *string              `json:"accountHolderName,omitempty"`
	DisplayName       *string              `json:"displayName,omitempty"`
	Expiration        *string              `json:"expiration,omitempty"`
	Family            *PaymentMethodFamily `json:"family,omitempty"`
	LastFourDigits    *string              `json:"lastFourDigits,omitempty"`
	Logos             *[]PaymentMethodLogo `json:"logos,omitempty"`
	Status            *PaymentMethodStatus `json:"status,omitempty"`
	Type              *string              `json:"type,omitempty"`
}

type PaymentMethodStatus

type PaymentMethodStatus string
const (
	PaymentMethodStatusActive   PaymentMethodStatus = "active"
	PaymentMethodStatusInactive PaymentMethodStatus = "inactive"
)

func (*PaymentMethodStatus) UnmarshalJSON

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

type PaymentMethodsClient

type PaymentMethodsClient struct {
	Client *resourcemanager.Client
}

func NewPaymentMethodsClientWithBaseURI

func NewPaymentMethodsClientWithBaseURI(sdkApi sdkEnv.Api) (*PaymentMethodsClient, error)

func (PaymentMethodsClient) DeleteAtBillingProfile

DeleteAtBillingProfile ...

func (PaymentMethodsClient) DeleteAtBillingProfileThenPoll

func (c PaymentMethodsClient) DeleteAtBillingProfileThenPoll(ctx context.Context, id PaymentMethodLinkId) error

DeleteAtBillingProfileThenPoll performs DeleteAtBillingProfile then polls until it's completed

func (PaymentMethodsClient) DeleteByUser

DeleteByUser ...

func (PaymentMethodsClient) GetByBillingAccount

GetByBillingAccount ...

func (PaymentMethodsClient) GetByBillingProfile

GetByBillingProfile ...

func (PaymentMethodsClient) GetByUser

GetByUser ...

func (PaymentMethodsClient) ListByBillingAccount

ListByBillingAccount ...

func (PaymentMethodsClient) ListByBillingAccountComplete

ListByBillingAccountComplete retrieves all the results into a single object

func (PaymentMethodsClient) ListByBillingAccountCompleteMatchingPredicate

func (c PaymentMethodsClient) ListByBillingAccountCompleteMatchingPredicate(ctx context.Context, id BillingAccountId, predicate PaymentMethodOperationPredicate) (result ListByBillingAccountCompleteResult, err error)

ListByBillingAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (PaymentMethodsClient) ListByBillingProfile

ListByBillingProfile ...

func (PaymentMethodsClient) ListByBillingProfileComplete

ListByBillingProfileComplete retrieves all the results into a single object

func (PaymentMethodsClient) ListByBillingProfileCompleteMatchingPredicate

func (c PaymentMethodsClient) ListByBillingProfileCompleteMatchingPredicate(ctx context.Context, id BillingProfileId, predicate PaymentMethodLinkOperationPredicate) (result ListByBillingProfileCompleteResult, err error)

ListByBillingProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (PaymentMethodsClient) ListByUser

func (c PaymentMethodsClient) ListByUser(ctx context.Context) (result ListByUserOperationResponse, err error)

ListByUser ...

func (PaymentMethodsClient) ListByUserComplete

func (c PaymentMethodsClient) ListByUserComplete(ctx context.Context) (ListByUserCompleteResult, error)

ListByUserComplete retrieves all the results into a single object

func (PaymentMethodsClient) ListByUserCompleteMatchingPredicate

func (c PaymentMethodsClient) ListByUserCompleteMatchingPredicate(ctx context.Context, predicate PaymentMethodOperationPredicate) (result ListByUserCompleteResult, err error)

ListByUserCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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