client

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Equals comparisonOperator = "eq"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	Field    string
	Operator comparisonOperator
	Value    string
}

https://learn.microsoft.com/en-us/graph/filter-query-parameter?tabs=http

Note: this is only for storing basic operators

func (*Filter) String

func (f *Filter) String() string

type Item

type Item struct {
	CurrencyCode         string    `json:"currencyCode"`
	TierMinimumUnits     float64   `json:"tierMinimumUnits"`
	RetailPrice          float64   `json:"retailPrice"`
	UnitPrice            float64   `json:"unitPrice"`
	ArmRegionName        string    `json:"armRegionName"`
	Location             string    `json:"location"`
	EffectiveStartDate   time.Time `json:"effectiveStartDate"`
	MeterID              string    `json:"meterId"`
	MeterName            string    `json:"meterName"`
	ProductID            string    `json:"productId"`
	SkuID                string    `json:"skuId"`
	AvailabilityID       any       `json:"availabilityId"`
	ProductName          string    `json:"productName"`
	SkuName              string    `json:"skuName"`
	ServiceName          string    `json:"serviceName"`
	ServiceID            string    `json:"serviceId"`
	ServiceFamily        string    `json:"serviceFamily"`
	UnitOfMeasure        string    `json:"unitOfMeasure"`
	Type                 string    `json:"type"`
	IsPrimaryMeterRegion bool      `json:"isPrimaryMeterRegion"`
	ArmSkuName           string    `json:"armSkuName"`
	EffectiveEndDate     time.Time `json:"effectiveEndDate,omitempty"`
	ReservationTerm      string    `json:"reservationTerm,omitempty"`
}

type PricingAPI

type PricingAPI interface {
	GetProductsPricePages(context.Context, []*Filter, func(output *ProductsPricePage)) error
}

func New

func New() PricingAPI

type ProductsPricePage

type ProductsPricePage struct {
	BillingCurrency    string `json:"BillingCurrency"`
	CustomerEntityID   string `json:"CustomerEntityId"`
	CustomerEntityType string `json:"CustomerEntityType"`
	Items              []Item `json:"Items"`
	NextPageLink       string `json:"NextPageLink"`
	Count              int    `json:"Count"`
}

Jump to

Keyboard shortcuts

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