transactions

package
v0.20240201.1155633 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

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

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

Client Initialization

client := transactions.NewTransactionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: TransactionsClient.ListByInvoice

ctx := context.TODO()
id := transactions.NewBillingAccountInvoiceID("billingAccountValue", "invoiceValue")

// alternatively `client.ListByInvoice(ctx, id)` can be used to do batched pagination
items, err := client.ListByInvoiceComplete(ctx, id)
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 PossibleValuesForReservationType

func PossibleValuesForReservationType() []string

func PossibleValuesForTransactionTypeKind

func PossibleValuesForTransactionTypeKind() []string

func ValidateBillingAccountInvoiceID

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

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

Types

type Amount

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

type BillingAccountInvoiceId

type BillingAccountInvoiceId struct {
	BillingAccountName string
	InvoiceName        string
}

BillingAccountInvoiceId is a struct representing the Resource ID for a Billing Account Invoice

func NewBillingAccountInvoiceID

func NewBillingAccountInvoiceID(billingAccountName string, invoiceName string) BillingAccountInvoiceId

NewBillingAccountInvoiceID returns a new BillingAccountInvoiceId struct

func ParseBillingAccountInvoiceID

func ParseBillingAccountInvoiceID(input string) (*BillingAccountInvoiceId, error)

ParseBillingAccountInvoiceID parses 'input' into a BillingAccountInvoiceId

func ParseBillingAccountInvoiceIDInsensitively

func ParseBillingAccountInvoiceIDInsensitively(input string) (*BillingAccountInvoiceId, error)

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

func (*BillingAccountInvoiceId) FromParseResult

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

func (BillingAccountInvoiceId) ID

ID returns the formatted Billing Account Invoice ID

func (BillingAccountInvoiceId) Segments

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

func (BillingAccountInvoiceId) String

func (id BillingAccountInvoiceId) String() string

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

type ListByInvoiceCompleteResult

type ListByInvoiceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Transaction
}

type ListByInvoiceOperationResponse

type ListByInvoiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Transaction
}

type ReservationType

type ReservationType string
const (
	ReservationTypePurchase    ReservationType = "Purchase"
	ReservationTypeUsageCharge ReservationType = "Usage Charge"
)

func (*ReservationType) UnmarshalJSON

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

type Transaction

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

type TransactionOperationPredicate

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

func (TransactionOperationPredicate) Matches

type TransactionProperties

type TransactionProperties struct {
	AzureCreditApplied        *Amount              `json:"azureCreditApplied,omitempty"`
	AzurePlan                 *string              `json:"azurePlan,omitempty"`
	BillingCurrency           *string              `json:"billingCurrency,omitempty"`
	BillingProfileDisplayName *string              `json:"billingProfileDisplayName,omitempty"`
	BillingProfileId          *string              `json:"billingProfileId,omitempty"`
	CustomerDisplayName       *string              `json:"customerDisplayName,omitempty"`
	CustomerId                *string              `json:"customerId,omitempty"`
	Date                      *string              `json:"date,omitempty"`
	Discount                  *float64             `json:"discount,omitempty"`
	EffectivePrice            *Amount              `json:"effectivePrice,omitempty"`
	ExchangeRate              *float64             `json:"exchangeRate,omitempty"`
	Invoice                   *string              `json:"invoice,omitempty"`
	InvoiceId                 *string              `json:"invoiceId,omitempty"`
	InvoiceSectionDisplayName *string              `json:"invoiceSectionDisplayName,omitempty"`
	InvoiceSectionId          *string              `json:"invoiceSectionId,omitempty"`
	Kind                      *TransactionTypeKind `json:"kind,omitempty"`
	MarketPrice               *Amount              `json:"marketPrice,omitempty"`
	OrderId                   *string              `json:"orderId,omitempty"`
	OrderName                 *string              `json:"orderName,omitempty"`
	PricingCurrency           *string              `json:"pricingCurrency,omitempty"`
	ProductDescription        *string              `json:"productDescription,omitempty"`
	ProductFamily             *string              `json:"productFamily,omitempty"`
	ProductType               *string              `json:"productType,omitempty"`
	ProductTypeId             *string              `json:"productTypeId,omitempty"`
	Quantity                  *int64               `json:"quantity,omitempty"`
	ServicePeriodEndDate      *string              `json:"servicePeriodEndDate,omitempty"`
	ServicePeriodStartDate    *string              `json:"servicePeriodStartDate,omitempty"`
	SubTotal                  *Amount              `json:"subTotal,omitempty"`
	SubscriptionId            *string              `json:"subscriptionId,omitempty"`
	SubscriptionName          *string              `json:"subscriptionName,omitempty"`
	Tax                       *Amount              `json:"tax,omitempty"`
	TransactionAmount         *Amount              `json:"transactionAmount,omitempty"`
	TransactionType           *ReservationType     `json:"transactionType,omitempty"`
	UnitOfMeasure             *string              `json:"unitOfMeasure,omitempty"`
	UnitType                  *string              `json:"unitType,omitempty"`
	Units                     *float64             `json:"units,omitempty"`
}

func (*TransactionProperties) GetDateAsTime

func (o *TransactionProperties) GetDateAsTime() (*time.Time, error)

func (*TransactionProperties) GetServicePeriodEndDateAsTime

func (o *TransactionProperties) GetServicePeriodEndDateAsTime() (*time.Time, error)

func (*TransactionProperties) GetServicePeriodStartDateAsTime

func (o *TransactionProperties) GetServicePeriodStartDateAsTime() (*time.Time, error)

func (*TransactionProperties) SetDateAsTime

func (o *TransactionProperties) SetDateAsTime(input time.Time)

func (*TransactionProperties) SetServicePeriodEndDateAsTime

func (o *TransactionProperties) SetServicePeriodEndDateAsTime(input time.Time)

func (*TransactionProperties) SetServicePeriodStartDateAsTime

func (o *TransactionProperties) SetServicePeriodStartDateAsTime(input time.Time)

type TransactionTypeKind

type TransactionTypeKind string
const (
	TransactionTypeKindAll         TransactionTypeKind = "all"
	TransactionTypeKindReservation TransactionTypeKind = "reservation"
)

func (*TransactionTypeKind) UnmarshalJSON

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

type TransactionsClient

type TransactionsClient struct {
	Client *resourcemanager.Client
}

func NewTransactionsClientWithBaseURI

func NewTransactionsClientWithBaseURI(sdkApi sdkEnv.Api) (*TransactionsClient, error)

func (TransactionsClient) ListByInvoice

ListByInvoice ...

func (TransactionsClient) ListByInvoiceComplete

ListByInvoiceComplete retrieves all the results into a single object

func (TransactionsClient) ListByInvoiceCompleteMatchingPredicate

func (c TransactionsClient) ListByInvoiceCompleteMatchingPredicate(ctx context.Context, id BillingAccountInvoiceId, predicate TransactionOperationPredicate) (result ListByInvoiceCompleteResult, err error)

ListByInvoiceCompleteMatchingPredicate 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