Help us shape the future of Go! Take the 2026 Go Developer Survey

bill

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 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 BalanceTypePay

type BalanceTypePay struct {
	//Account type
	BalanceTypeId string `json:"balance_type_id,omitempty"`

	//Deducted amount
	DeductAmount float64 `json:"deduct_amount,omitempty"`
}

type BillSumRecordInfo

type BillSumRecordInfo struct {
	//Customer ID.
	CustomerId string `json:"customer_id"`

	//Resource type code
	ResourceTypeCode string `json:"resource_type_code"`

	//Cloud service region
	RegionCode string `json:"region_code"`

	//Cloud service type code
	CloudServiceTypeCode string `json:"cloud_service_type_code"`

	//Expenditure data collection period
	ConsumeTime string `json:"consume_time"`

	//Expenditure type
	PayMethod string `json:"pay_method"`

	//Consumption amount
	ConsumeAmount *float64 `json:"consume_amount,omitempty"`

	//Outstanding amount
	Debt *float64 `json:"debt,omitempty"`

	//Discounted amount
	Discount *float64 `json:"discount,omitempty"`

	//Unit
	MeasureId *int `json:"measure_id,omitempty"`

	//Expenditure type
	BillType *int `json:"bill_type,omitempty"`

	//Total payment amount distinguished by expenditure type and payment method of an account.
	AccountDetails []BalanceTypePay `json:"account_details"`

	//Discounted amount details
	DiscountDetailInfos []DiscountDetailInfo `json:"discount_detail_infos"`

	//Enterprise project ID
	EnterpriseProjectId string `json:"enterpriseProjectId"`
}

type DiscountDetailInfo

type DiscountDetailInfo struct {
	//Discount type
	PromotionType string `json:"promotion_type"`

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

	//Discount type ID
	PromotionId string `json:"promotion_id"`

	//Unit
	MeasureId *int `json:"measure_id,omitempty"`
}

type MonthlyRecord

type MonthlyRecord struct {
	//Cloud service type code
	CloudServiceTypeCode string `json:"cloudServiceTypeCode"`

	//Cloud service region code
	ResourceTypeCode string `json:"resourceTypeCode"`

	//Resource type code
	RegionCode string `json:"regionCode"`

	//Resource instance ID
	ResInstanceId string `json:"resInstanceId"`

	//Resource name
	ResourceName string `json:"resourceName"`

	//Resource tag
	ResourceTag string `json:"resourceTag"`

	//Consumption amount of a cloud service, including the amount of cash coupons.
	ConsumeAmount *float64 `json:"consumeAmount,omitempty"`

	//Expenditure month
	Cycle string `json:"cycle"`

	//Unit
	MeasureId *int `json:"measureId,omitempty"`

	//Enterprise project ID
	EnterpriseProjectId string `json:"enterpriseProjectId"`

	//Billing mode
	PayMethod string `json:"payMethod"`
}

type PostpaidBillInfo

type PostpaidBillInfo struct {
	//Bill type
	BillType string `json:"billType"`

	//Cloud service type code.
	CloudServiceTypeCode string `json:"cloudServiceTypeCode"`

	//Resource type code.
	ResourceTypeCode string `json:"resourceTypeCode"`

	//Billing mode.
	PayMethod string `json:"payMethod"`

	//Transaction amount/unsubscription amount/refund amount of the customer, including the vouchers, flexi-purchase coupons, reserved flexi-purchase coupons, and stored-value cards.
	CreditDebtAmount *float64 `json:"creditDebtAmount"`

	//Transaction amount/unsubscription amount/refund amount of the customer,not including the vouchers, flexi-purchase coupons, reserved flexi-purchase coupons, or stored-value cards.
	CustomerAmountDue *float64 `json:"customerAmountDue"`

	//Settlement product type.
	SettlementType *int `json:"settlementType,omitempty"`

	//Partner discount percentage
	PartnerRatio *float64 `json:"partnerRatio,omitempty"`

	//Amount that the partner needs to refund/Amount that the partner has refund
	PartnerAmount *float64 `json:"partnerAmount,omitempty"`

	//Yearly/monthly unit.
	PeriodType *int `json:"periodType,omitempty"`

	//Number of yearly/month periods.
	PeriodNum *int `json:"periodNum,omitempty"`

	//Product category code.
	CategoryCode string `json:"categoryCode"`
}

type QueryMonthlyExpenditureSummaryOpts

type QueryMonthlyExpenditureSummaryOpts struct {
	//Query cycle
	Cycle string `q:"cycle" required:"true"`

	//Cloud service type code
	CloudServiceTypeCode string `q:"cloud_service_type_code,omitempty"`

	//Account type
	Type string `q:"type,omitempty"`

	//Enterprise project ID.
	EnterpriseProjectId string `q:"enterpriseProjectId,omitempty"`
}

func (QueryMonthlyExpenditureSummaryOpts) ToQueryMonthlyExpenditureSummaryMap

func (opts QueryMonthlyExpenditureSummaryOpts) ToQueryMonthlyExpenditureSummaryMap() (string, error)

type QueryMonthlyExpenditureSummaryOptsBuilder

type QueryMonthlyExpenditureSummaryOptsBuilder interface {
	ToQueryMonthlyExpenditureSummaryMap() (string, error)
}

type QueryMonthlyExpenditureSummaryResp

type QueryMonthlyExpenditureSummaryResp struct {
	//Error code
	ErrorCode string `json:"error_code"`

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

	//Currency.
	Currency string `json:"currency"`

	//Number of the total records
	TotalCount *int `json:"total_count,omitempty"`

	//Record information
	BillSums []BillSumRecordInfo `json:"bill_sums"`
}

type QueryMonthlyExpenditureSummaryResult

type QueryMonthlyExpenditureSummaryResult struct {
	gophercloud.Result
}

func QueryMonthlyExpenditureSummary

*

  • This API can be used to query the expenditure summary bills of a customer on the customer platform. The bills summarize the summary data by month. The expenditure summary contains only the data generated before 24:00 of the previous day.
  • This API can be invoked using the customer AK/SK or token only.

func (QueryMonthlyExpenditureSummaryResult) Extract

type QueryPartnerMonthlyBillsOpts

type QueryPartnerMonthlyBillsOpts struct {
	//Month in the yyyy-MM format.
	ConsumeMonth string `q:"consume_month" required:"true"`
}

func (QueryPartnerMonthlyBillsOpts) ToQueryPartnerMonthlyBillsMap

func (opts QueryPartnerMonthlyBillsOpts) ToQueryPartnerMonthlyBillsMap() (string, error)

type QueryPartnerMonthlyBillsOptsBuilder

type QueryPartnerMonthlyBillsOptsBuilder interface {
	ToQueryPartnerMonthlyBillsMap() (string, error)
}

type QueryPartnerMonthlyBillsResp

type QueryPartnerMonthlyBillsResp struct {
	//Error code.
	ErrorCode string `json:"error_code"`

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

	//Billing cycle
	BillCycle string `json:"billCycle"`

	//Bill amount, which is calculated based on the special commercial discount of the partner.
	CreditDebtAmount *float64 `json:"creditDebtAmount,omitempty"`

	//Consumption amount, which is calculated based on the special commercial discount of the partner.
	ConsumeAmount *float64 `json:"consumeAmount,omitempty"`

	//Write-off amount (negative value), which is calculated based on the special commercial discount of the partner.
	Writeoffdebt *float64 `json:"writeoffdebt,omitempty"`

	//This parameter is returned only when the query is successful.
	Currency string `json:"currency"`

	//Tax amount, which is the tax amount in the creditDebtAmount field.
	TaxAmount *float64 `json:"taxAmount,omitempty"`

	//Bill amount that is not settled, which is calculated based on the special commercial discount of the partner.
	UnclearedAmount *float64 `json:"unclearedAmount,omitempty"`

	//Due date for bills.
	DueDate string `json:"dueDate"`

	//Bill list.
	BillList []PostpaidBillInfo `json:"billList"`
	// contains filtered or unexported fields
}

type QueryPartnerMonthlyBillsResult

type QueryPartnerMonthlyBillsResult struct {
	gophercloud.Result
}

func QueryPartnerMonthlyBills

*

  • This API is used to query monthly bills.
  • This API can be invoked only by the partner account AK/SK or token.

func (QueryPartnerMonthlyBillsResult) Extract

type QueryResourceUsageDetailsOpts

type QueryResourceUsageDetailsOpts struct {
	//Expenditure month
	Cycle string `q:"cycle" required:"true"`

	//Cloud service type code
	CloudServiceTypeCode string `q:"cloudServiceTypeCode,omitempty"`

	//Resource type code
	ResourceTypeCode string `q:"resourceTypeCode,omitempty"`

	//Cloud service region code
	RegionCode string `q:"regionCode,omitempty"`

	//Resource instance ID
	ResInstanceId string `q:"resInstanceId,omitempty"`

	//Payment method
	PayMethod string `q:"payMethod" required:"true"`

	//Enterprise project ID
	EnterpriseProjectId string `q:"enterpriseProjectId,omitempty"`

	//Page number.
	Offset *int `q:"offset" required:"true"`

	//Indicates the page limit
	Limit *int `q:"limit" required:"true"`
}

func (QueryResourceUsageDetailsOpts) ToQueryResourceUsageDetailsMap

func (opts QueryResourceUsageDetailsOpts) ToQueryResourceUsageDetailsMap() (string, error)

type QueryResourceUsageDetailsOptsBuilder

type QueryResourceUsageDetailsOptsBuilder interface {
	ToQueryResourceUsageDetailsMap() (string, error)
}

type QueryResourceUsageDetailsResp

type QueryResourceUsageDetailsResp struct {
	//Error code
	ErrorCode string `json:"error_code"`

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

	//Currency unit
	Currency string `json:"currency"`

	//Number of result sets
	TotalCount *int `json:"total_count,omitempty"`

	//Resource usage record
	MonthlyRecords []MonthlyRecord `json:"monthlyRecords"`
}

type QueryResourceUsageDetailsResult

type QueryResourceUsageDetailsResult struct {
	gophercloud.Result
}

func QueryResourceUsageDetails

*

  • This API can be used to query usage details of each resource for a customer on the customer platform. The resource details have a latency (a maximum of 24 hours).
  • This API can be invoked using the customer AK/SK or token only.

func (QueryResourceUsageDetailsResult) Extract

type QueryResourceUsageRecordOpts

type QueryResourceUsageRecordOpts struct {
	//Start time.
	StartTime string `q:"startTime" required:"true"`

	//End time
	EndTime string `q:"endTime" required:"true"`

	//Cloud service type code
	CloudServiceTypeCode string `q:"cloudServiceTypeCode,omitempty"`

	//Cloud service region code
	RegionCode string `q:"regionCode,omitempty"`

	//Order ID.
	OrderId string `q:"orderId,omitempty"`

	//Payment method
	PayMethod string `q:"payMethod" required:"true"`

	//Page number
	Offset int `q:"offset,omitempty"`

	//Number of records per page
	Limit int `q:"limit,omitempty"`

	//Resource ID.
	ResourceId string `q:"resourceId,omitempty"`

	//Enterprise project ID
	EnterpriseProjectId string `q:"enterpriseProjectId,omitempty"`
}

func (QueryResourceUsageRecordOpts) ToQueryResourceUsageRecordMap

func (opts QueryResourceUsageRecordOpts) ToQueryResourceUsageRecordMap() (string, error)

type QueryResourceUsageRecordOptsBuilder

type QueryResourceUsageRecordOptsBuilder interface {
	ToQueryResourceUsageRecordMap() (string, error)
}

type QueryResourceUsageRecordResp

type QueryResourceUsageRecordResp struct {
	//Error code
	ErrorCode string `json:"error_code"`

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

	//Currency unit.
	Currency string `json:"currency"`

	//Number of result sets
	TotalCount *int `json:"totalCount,omitempty"`

	//Resource usage record
	FeeRecords []ResFeeRecord `json:"feeRecords"`
}

type QueryResourceUsageRecordResult

type QueryResourceUsageRecordResult struct {
	gophercloud.Result
}

func QueryResourceUsageRecord

*

  • This API can be used to query the usage details of each resource for a customer on the customer platform.
  • This API can be invoked using the customer AK/SK or token only.

func (QueryResourceUsageRecordResult) Extract

type ResFeeRecord

type ResFeeRecord struct {
	//Fee generation time
	CreateTime string `json:"createTime"`

	//Start time of using the resource corresponding to the fee.
	EffectiveTime string `json:"effectiveTime"`

	//End time of using the resource corresponding to the fee
	ExpireTime string `json:"expireTime"`

	//Fee record serial number
	FeeId string `json:"feeId"`

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

	//Product name
	ProductName string `json:"productName"`

	//Order ID
	OrderId string `json:"orderId"`

	//Consumption amount, including the amount of cash coupons.
	Amount *float64 `json:"amount,omitempty"`

	//Unit
	MeasureId *int `json:"measureId,omitempty"`

	//Usage
	UsageAmount *float64 `json:"usageAmount,omitempty"`

	//Usage unit
	UsageMeasureId *int `json:"usageMeasureId,omitempty"`

	//Package usage.
	FreeResourceAmount *float64 `json:"freeResourceAmount,omitempty"`

	//Unit (package usage)
	FreeResourceMeasureId *int `json:"freeResourceMeasureId,omitempty"`

	//Cloud service type code
	CloudServiceTypeCode string `json:"cloudServiceTypeCode"`

	//Resource type code
	ResourceTypeCode string `json:"resourceTypeCode"`

	//Cloud service region code
	RegionCode string `json:"regionCode"`

	//Payment method
	PayMethod string `json:"payMethod"`

	//Project ID.
	ProjectID string `json:"projectID"`

	//Project name.
	ProjectName string `json:"projectName"`

	//Resource tag
	ResourceTag string `json:"resourceTag"`

	//Resource name
	ResourceName string `json:"resourceName"`

	//Resource ID.
	ResourceId string `json:"resourceId"`

	//Expenditure type
	FeeSourceOperation *int `json:"feeSourceOperation,omitempty"`

	//Enterprise project ID.
	EnterpriseProjectId string `json:"enterpriseProjectId"`

	//Period type
	PeriodType string `json:"periodType"`

	//Spot instance ID
	Spot string `json:"spot"`

	//Reserved instance usage
	RIAmount *float64 `json:"rIAmount,omitempty"`

	//Unit (reserved instance usage)
	RIMeasureId *int `json:"rIMeasureId,omitempty"`
}

Jump to

Keyboard shortcuts

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