svbilling

package
v3.0.0-...-76fd240 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BillingService

type BillingService struct {
	Session  session.Session
	Response *http.Response
}

func NewBillingService

func NewBillingService(s session.Session) (bs *BillingService)

func (*BillingService) GetContractInfo

func (bs *BillingService) GetContractInfo(contractId string, startMonth, toMonth string) (cinfo *ContractInfo)

func (*BillingService) GetMonthlySummary

func (bs *BillingService) GetMonthlySummary(contractId string, rgroupId int, productId string, startMonth string, endMonth string) (msum *GetMonthlySummaryResponse, err error)

func (*BillingService) GetUsageCpcode

func (bs *BillingService) GetUsageCpcode(contractId, productId, startMonth, endMonth string) (msum *GetMonthlySummaryResponse, err error)

func (*BillingService) GetUsageProducts

func (bs *BillingService) GetUsageProducts(contractId string, startMonth, endMonth string) (products *GetUsageProductsResponse, err error)

type ContractInfo

type ContractInfo struct {
	ContractID string
	ProductMap map[string]ProductInfo
}

type CpCodeStats

type CpCodeStats struct {
	Stats  []Stats `json:"stats"`
	CpCode int     `json:"cpCode"`
}

type GetMonthlySummaryResponse

type GetMonthlySummaryResponse struct {
	Start              string         `json:"start"`
	End                string         `json:"end"`
	RequestDate        time.Time      `json:"requestDate"`
	AccountID          string         `json:"accountId"`
	ContractID         string         `json:"contractId"`
	ProductID          string         `json:"productId"`
	ProductName        string         `json:"productName"`
	ReportingGroupID   int            `json:"reportingGroupId,omitempty"`
	ReportingGroupName string         `json:"reportingGroupName,omitempty"`
	UsagePeriods       []UsagePeriods `json:"usagePeriods"`
}

type GetUsageProductsResponse

type GetUsageProductsResponse struct {
	Start        string    `json:"start"`
	End          string    `json:"end"`
	RequestDate  time.Time `json:"requestDate"`
	AccountID    string    `json:"accountId"`
	ContractID   string    `json:"contractId"`
	UsagePeriods []struct {
		Month         string    `json:"month"`
		UsageProducts []Product `json:"usageProducts"`
	} `json:"usagePeriods"`
}

type Product

type Product struct {
	ProductID   string `json:"productId"`
	ProductName string `json:"productName"`
}

type ProductInfo

type ProductInfo struct {
	ProductName string
	StartMonth  string
	EndMonth    string
}

type Stats

type Stats struct {
	StatType   string  `json:"statType"`
	Unit       string  `json:"unit"`
	IsBillable bool    `json:"isBillable"`
	Value      float64 `json:"value"`
}

type UsagePeriods

type UsagePeriods struct {
	Month       string        `json:"month"`
	Start       string        `json:"start"`
	End         string        `json:"end"`
	Region      string        `json:"region"`
	DataStatus  string        `json:"dataStatus"`
	CpCodes     []int         `json:"cpCodes,omitempty"`
	Stats       []Stats       `json:"stats,omitempty"`
	CpCodeStats []CpCodeStats `json:"cpCodeStats,omitempty"`
}

Jump to

Keyboard shortcuts

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