enquiry

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProductInfo

type ProductInfo struct {
	//ID.
	Id string `json:"id" required:"true"`

	//Cloud service type code
	CloudServiceType string `json:"cloudServiceType" required:"true"`

	//Resource type code
	ResourceType string `json:"resourceType" required:"true"`

	//Resource Spec Code
	ResourceSpecCode string `json:"resourceSpecCode" required:"true"`

	//Resource capacity, which is used together with resouceSizeMeasureId.
	ResourceSize int `json:"resourceSize"`

	//Resource capacity measurement ID
	ResouceSizeMeasureId int `json:"resouceSizeMeasureId"`

	//Usage value
	UsageFactor string `json:"usageFactor"`

	//Usage value
	UsageValue float64 `json:"usageValue"`

	//Usage measurement ID
	UsageMeasureId int `json:"usageMeasureId"`

	//Extended parameter, optional
	ExtendParams string `json:"extendParams"`
}

type ProductRatingResult

type ProductRatingResult struct {
	//ID, which comes from the ID in the request.
	Id string `json:"id"`

	//Product ID.
	ProductId string `json:"productId"`

	//Total amount (final amount after discount)
	Amount *float64 `json:"amount,omitempty"`

	//Original total amount.
	OriginalAmount *float64 `json:"originalAmount,omitempty"`

	//Discounted amount.
	DiscountAmount *float64 `json:"discountAmount,omitempty"`

	//Measurement unit ID.
	MeasureId *int `json:"measureId,omitempty"`

	//Extended parameter.
	ExtendParams string `json:"extendParams"`
}

type QueryRatingOpts

type QueryRatingOpts struct {
	//Project ID.
	TenantId string `json:"tenantId" required:"true"`

	//Region ID
	RegionId string `json:"regionId" required:"true"`

	//AZ ID.
	AvaliableZoneId string `json:"avaliableZoneId"`

	//Billing mode
	ChargingMode *int `json:"chargingMode" required:"true"`

	//Order period type
	PeriodType int `json:"periodType"`

	//Number of subscription periods.
	PeriodNum int `json:"periodNum"`

	//Expiration date.
	PeriodEndDate string `json:"periodEndDate"`

	//Associated resource ID
	RelativeResourceId string `json:"relativeResourceId"`

	//Period type of the associated resource
	RelativeResourcePeriodType int `json:"relativeResourcePeriodType"`

	//Number of subscriptions
	SubscriptionNum int `json:"subscriptionNum"`

	//Product information
	ProductInfo []ProductInfo `json:"productInfos"`

	//Inquiry date.
	InquiryTime string `json:"inquiryTime"`
}

func (QueryRatingOpts) ToQueryRatingOptsMap

func (opts QueryRatingOpts) ToQueryRatingOptsMap() (map[string]interface{}, error)

type QueryRatingOptsBuilder

type QueryRatingOptsBuilder interface {
	ToQueryRatingOptsMap() (map[string]interface{}, error)
}

type QueryRatingResp

type QueryRatingResp struct {
	//Status code
	ErrorCode string `json:"error_code"`

	//Error description.
	ErrorMsg string `json:"error_msg"`

	//Inquiry result
	RatingResult RatingResult `json:"ratingResult"`
}

type QueryRatingResult

type QueryRatingResult struct {
	gophercloud.Result
}

func QueryRating

*

  • The customer platform obtains the product prices on the HUAWEI CLOUD official website based on the product catalog
  • This API can be invoked using the customer token, or the partner's AK/SK or token.

func (QueryRatingResult) Extract

func (r QueryRatingResult) Extract() (*QueryRatingResp, error)

type RatingResult

type RatingResult struct {
	//Total order amount (final order amount after discount)
	Amount *float64 `json:"amount"`

	//Discounted amount in an order.
	DiscountAmount *float64 `json:"discountAmount"`

	//Original order amount (order amount before discount).
	OriginalAmount *float64 `json:"originalAmount"`

	//Measurement unit ID.
	MeasureId *int `json:"measureId"`

	//Currency unit code (complying with the ISO 4217 standard)
	Currency string `json:"currency"`

	//Product price inquiry result.
	ProductRatingResult []ProductRatingResult `json:"productRatingResult"`

	//Extended parameter.
	ExtendParams string `json:"extendParams"`
}

Jump to

Keyboard shortcuts

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