transactions

package
v0.20240130.1163644 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/transactions Documentation

The transactions SDK allows for interaction with the Azure Resource Manager Service billing (API Version 2019-10-01-preview).

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/2019-10-01-preview/transactions"

Client Initialization

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

Example Usage: TransactionsClient.Get

ctx := context.TODO()
id := transactions.NewTransactionID("billingAccountValue", "billingProfileValue", "transactionValue")

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

Example Usage: TransactionsClient.ListByBillingAccount

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

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

Example Usage: TransactionsClient.ListByBillingProfile

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

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

Example Usage: TransactionsClient.ListByCustomer

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

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

Example Usage: TransactionsClient.ListByInvoice

ctx := context.TODO()
id := transactions.NewBillingProfileInvoiceID("billingAccountValue", "billingProfileValue", "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
}

Example Usage: TransactionsClient.ListByInvoiceSection

ctx := context.TODO()
id := transactions.NewInvoiceSectionID("billingAccountValue", "billingProfileValue", "invoiceSectionValue")

read, err := client.ListByInvoiceSection(ctx, id, transactions.DefaultListByInvoiceSectionOperationOptions())
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 PossibleValuesForReservationType

func PossibleValuesForReservationType() []string

func PossibleValuesForTransactionTypeKind

func PossibleValuesForTransactionTypeKind() []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 ValidateBillingProfileID

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

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

func ValidateBillingProfileInvoiceID

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

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

func ValidateCustomerID

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

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

func ValidateInvoiceSectionID

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

ValidateInvoiceSectionID checks that 'input' can be parsed as a Invoice Section ID

func ValidateTransactionID

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

ValidateTransactionID checks that 'input' can be parsed as a Transaction ID

Types

type Amount

type Amount struct {
	Currency *string  `json:"currency,omitempty"`
	Value    *float64 `json:"value,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 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 BillingProfileInvoiceId

type BillingProfileInvoiceId struct {
	BillingAccountName string
	BillingProfileName string
	InvoiceName        string
}

BillingProfileInvoiceId is a struct representing the Resource ID for a Billing Profile Invoice

func NewBillingProfileInvoiceID

func NewBillingProfileInvoiceID(billingAccountName string, billingProfileName string, invoiceName string) BillingProfileInvoiceId

NewBillingProfileInvoiceID returns a new BillingProfileInvoiceId struct

func ParseBillingProfileInvoiceID

func ParseBillingProfileInvoiceID(input string) (*BillingProfileInvoiceId, error)

ParseBillingProfileInvoiceID parses 'input' into a BillingProfileInvoiceId

func ParseBillingProfileInvoiceIDInsensitively

func ParseBillingProfileInvoiceIDInsensitively(input string) (*BillingProfileInvoiceId, error)

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

func (*BillingProfileInvoiceId) FromParseResult

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

func (BillingProfileInvoiceId) ID

ID returns the formatted Billing Profile Invoice ID

func (BillingProfileInvoiceId) Segments

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

func (BillingProfileInvoiceId) String

func (id BillingProfileInvoiceId) String() string

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

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 GetOperationOptions

type GetOperationOptions struct {
	PeriodEndDate   *string
	PeriodStartDate *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders

func (o GetOperationOptions) ToHeaders() *client.Headers

func (GetOperationOptions) ToOData

func (o GetOperationOptions) ToOData() *odata.Query

func (GetOperationOptions) ToQuery

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

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

type InvoiceSectionId

type InvoiceSectionId struct {
	BillingAccountName string
	BillingProfileName string
	InvoiceSectionName string
}

InvoiceSectionId is a struct representing the Resource ID for a Invoice Section

func NewInvoiceSectionID

func NewInvoiceSectionID(billingAccountName string, billingProfileName string, invoiceSectionName string) InvoiceSectionId

NewInvoiceSectionID returns a new InvoiceSectionId struct

func ParseInvoiceSectionID

func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error)

ParseInvoiceSectionID parses 'input' into a InvoiceSectionId

func ParseInvoiceSectionIDInsensitively

func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error)

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

func (*InvoiceSectionId) FromParseResult

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

func (InvoiceSectionId) ID

func (id InvoiceSectionId) ID() string

ID returns the formatted Invoice Section ID

func (InvoiceSectionId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Invoice Section ID

func (InvoiceSectionId) String

func (id InvoiceSectionId) String() string

String returns a human-readable description of this Invoice Section ID

type ListByBillingAccountCompleteResult

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

type ListByBillingAccountOperationOptions

type ListByBillingAccountOperationOptions struct {
	Filter          *string
	PeriodEndDate   *string
	PeriodStartDate *string
}

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        *[]Transaction
}

type ListByBillingProfileOperationOptions

type ListByBillingProfileOperationOptions struct {
	Filter          *string
	PeriodEndDate   *string
	PeriodStartDate *string
}

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        *TransactionListResult
}

type ListByCustomerCompleteResult

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

type ListByCustomerOperationOptions

type ListByCustomerOperationOptions struct {
	Filter          *string
	PeriodEndDate   *string
	PeriodStartDate *string
}

func DefaultListByCustomerOperationOptions

func DefaultListByCustomerOperationOptions() ListByCustomerOperationOptions

func (ListByCustomerOperationOptions) ToHeaders

func (ListByCustomerOperationOptions) ToOData

func (ListByCustomerOperationOptions) ToQuery

type ListByCustomerOperationResponse

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

type ListByInvoiceCompleteResult

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

type ListByInvoiceOperationResponse

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

type ListByInvoiceSectionOperationOptions

type ListByInvoiceSectionOperationOptions struct {
	Filter          *string
	PeriodEndDate   *string
	PeriodStartDate *string
}

func DefaultListByInvoiceSectionOperationOptions

func DefaultListByInvoiceSectionOperationOptions() ListByInvoiceSectionOperationOptions

func (ListByInvoiceSectionOperationOptions) ToHeaders

func (ListByInvoiceSectionOperationOptions) ToOData

func (ListByInvoiceSectionOperationOptions) ToQuery

type ListByInvoiceSectionOperationResponse

type ListByInvoiceSectionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *TransactionListResult
}

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 TransactionId

type TransactionId struct {
	BillingAccountName string
	BillingProfileName string
	TransactionName    string
}

TransactionId is a struct representing the Resource ID for a Transaction

func NewTransactionID

func NewTransactionID(billingAccountName string, billingProfileName string, transactionName string) TransactionId

NewTransactionID returns a new TransactionId struct

func ParseTransactionID

func ParseTransactionID(input string) (*TransactionId, error)

ParseTransactionID parses 'input' into a TransactionId

func ParseTransactionIDInsensitively

func ParseTransactionIDInsensitively(input string) (*TransactionId, error)

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

func (*TransactionId) FromParseResult

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

func (TransactionId) ID

func (id TransactionId) ID() string

ID returns the formatted Transaction ID

func (TransactionId) Segments

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

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

func (TransactionId) String

func (id TransactionId) String() string

String returns a human-readable description of this Transaction ID

type TransactionListResult

type TransactionListResult struct {
	NextLink *string        `json:"nextLink,omitempty"`
	Value    *[]Transaction `json:"value,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"`
	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"`
	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) Get

Get ...

func (TransactionsClient) ListByBillingAccount

ListByBillingAccount ...

func (TransactionsClient) ListByBillingAccountComplete

ListByBillingAccountComplete retrieves all the results into a single object

func (TransactionsClient) ListByBillingAccountCompleteMatchingPredicate

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

ListByBillingAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (TransactionsClient) ListByBillingProfile

ListByBillingProfile ...

func (TransactionsClient) ListByCustomer

ListByCustomer ...

func (TransactionsClient) ListByCustomerComplete

ListByCustomerComplete retrieves all the results into a single object

func (TransactionsClient) ListByCustomerCompleteMatchingPredicate

func (c TransactionsClient) ListByCustomerCompleteMatchingPredicate(ctx context.Context, id CustomerId, options ListByCustomerOperationOptions, predicate TransactionOperationPredicate) (result ListByCustomerCompleteResult, err error)

ListByCustomerCompleteMatchingPredicate retrieves all the results and then applies the predicate

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 BillingProfileInvoiceId, predicate TransactionOperationPredicate) (result ListByInvoiceCompleteResult, err error)

ListByInvoiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (TransactionsClient) ListByInvoiceSection

ListByInvoiceSection ...

Jump to

Keyboard shortcuts

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