ubill

package
v0.21.37 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package ubill include resources of ucloud ubill product

See also

for detail.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountInfo added in v0.21.2

type AccountInfo struct {

	// 账户余额
	Amount string

	// 账户可用余额
	AmountAvailable string

	// 信用账户余额
	AmountCredit string

	// 赠送账户余额
	AmountFree string

	// 冻结账户金额
	AmountFreeze string
}

AccountInfo - 账户信息

type BillDetailItem added in v0.21.32

type BillDetailItem struct {

	// 是否为主账号
	Admin int

	// 订单总金额
	Amount string

	// 代金券抵扣
	AmountCoupon string

	// 赠送金额抵扣
	AmountFree string

	// 现金账户支付
	AmountReal string

	// 可用区
	AzGroupCName string

	// 计费方式
	ChargeType string

	// 创建时间(时间戳)
	CreateTime int

	// 产品配置
	ItemDetails []ItemDetail

	// 订单号
	OrderNo string

	// 订单类型
	OrderType string

	// 项目名称
	ProjectName string

	// 资源标识
	ResourceExtendInfo []ResourceExtendInfo

	// 资源ID
	ResourceId string

	// 产品类型
	ResourceType string

	// 产品类型代码
	ResourceTypeCode int

	// 订单支付状态
	ShowHover int

	// 开始时间(时间戳)
	StartTime int

	// 账户昵称
	UserDisplayName string

	// 账户邮箱
	UserEmail string

	// 账户名
	UserName string
}

BillDetailItem - 账单详情数据

type BillOverviewItem added in v0.21.32

type BillOverviewItem struct {

	// 该账户是否为主账号,1 主账号,0 子账号(账单维度按子账号筛选时显示)
	Admin int

	// 订单总金额
	Amount string

	// 代金券抵扣(已入账时显示)
	AmountCoupon string

	// 赠送金额抵扣(已入账时显示)
	AmountFree string

	// 现金账户支付(已入账时显示)
	AmountReal string

	// 账单维度, product 按产品维度聚合,project 按项目维度聚合,user 按子账号维度聚合
	Dimension string

	// 产品分类	(账单维度按产品筛选时显示)
	ProductCategory string

	// 项目名称(账单维度按项目筛选时显示)
	ProjectName string

	// 产品类型	(账单维度按产品筛选时显示)
	ResourceType string

	// 产品类型代码(账单维度按产品筛选时显示)
	ResourceTypeCode int

	// 账户昵称(账单维度按子账号筛选时显示)
	UserDisplayName string

	// 账户邮箱(账单维度按子账号筛选时显示)
	UserEmail string

	// 账户名   (账单维度按子账号筛选时显示)
	UserName string
}

BillOverviewItem - 账单总览数组内单个结构体数据

type DescribeOrderDetailInfoRequest

type DescribeOrderDetailInfoRequest struct {
	request.CommonBase

	//
	AzGroups []string `required:"false"`

	//
	BeginTime *int `required:"true"`

	//
	ChargeTypes []string `required:"false"`

	//
	EndTime *int `required:"true"`

	//
	Invoiceds []string `required:"false"`

	//
	Limit *int `required:"false"`

	//
	Offset *int `required:"false"`

	//
	OrderStates []string `required:"false"`

	//
	OrderTypes []string `required:"false"`

	//
	QueryAll *string `required:"false"`

	//
	Regions []string `required:"false"`

	//
	ResourceIds []string `required:"false"`

	//
	ResourceTypes []string `required:"false"`

	//
	Tags []string `required:"false"`

	//
	TradeNos []string `required:"false"`
}

DescribeOrderDetailInfoRequest is request schema for DescribeOrderDetailInfo action

type DescribeOrderDetailInfoResponse

type DescribeOrderDetailInfoResponse struct {
	response.CommonBase

	//
	OrderInfos []OrderInfo
}

DescribeOrderDetailInfoResponse is response schema for DescribeOrderDetailInfo action

type GetBalanceRequest added in v0.21.2

type GetBalanceRequest struct {
	request.CommonBase
}

GetBalanceRequest is request schema for GetBalance action

type GetBalanceResponse added in v0.21.2

type GetBalanceResponse struct {
	response.CommonBase

	// 账户余额信息
	AccountInfo AccountInfo
}

GetBalanceResponse is response schema for GetBalance action

type GetBillDataFileUrlRequest added in v0.11.2

type GetBillDataFileUrlRequest struct {
	request.CommonBase

	// 此字段不推荐使用,建议使用BillingCycle.   若BillingCycle 和 BillPeriod同时存在,BillingCycle 优先
	BillPeriod *int `required:"false"`

	// 账单类型,传 0 时获取账单总览报表,传 1 获取账单明细报表
	BillType *int `required:"true"`

	// 账期(字符串格式,YYYY-MM,例如2021-08).   若BillingCycle 和 BillPeriod同时存在,BillingCycle 优先
	BillingCycle *string `required:"true"`

	// 获取账单总览报表时,账单的支付状态,传 0 时获取待支付账单,传 1 时获取已支付账单。获取账单明细报表时该参数无效
	PaidType *int `required:"false"`

	// 如需求其他语言版本的账单则使用此参数。默认中文。如 RequireVersion = "EN",则提供英文版本账单。
	RequireVersion *string `required:"false"`

	// 文件版本,若为"v1"表示获取带有子用户信息的账单,可以为空
	Version *string `required:"false"`
}

GetBillDataFileUrlRequest is request schema for GetBillDataFileUrl action

type GetBillDataFileUrlResponse added in v0.11.2

type GetBillDataFileUrlResponse struct {
	response.CommonBase

	// 交易账单数据下载URL
	FileUrl string

	// 生成的 URL是否有效,即有对应数据文件
	IsValid string
}

GetBillDataFileUrlResponse is response schema for GetBillDataFileUrl action

type ItemDetail added in v0.21.32

type ItemDetail struct {

	// 产品小类名称
	ProductName string

	// 产品小类规格
	Value string
}

ItemDetail - 产品配置

type ListUBillDetailRequest added in v0.21.32

type ListUBillDetailRequest struct {
	request.CommonBase

	// 账期,YYYY-MM,比如2021-08,只支持2018-05之后的查询
	BillingCycle *string `required:"true"`

	// 计费方式 (筛选项, 默认全部)
	ChargeType *string `required:"false"`

	// 每页数量,默认值25,最大值:100。
	Limit *int `required:"false"`

	// 数据偏移量 (默认0)
	Offset *int `required:"false"`

	// 订单类型 (筛选项, 默认全部)
	OrderType *string `required:"false"`

	// 支付状态 (筛选项, 1:仅显示未支付订单; 2:仅显示已支付订单; 0:两者都显示)
	PaidState *int `required:"false"`

	// 项目名称 (筛选项, 默认全部)
	ProjectName *string `required:"false"`

	// 资源ID(筛选项, 默认全部)	支持多筛选,多筛选请在请求参数中添加多个字段例ResourceIds.0: uhost-bzgf1gh5,ResourceIds.1: uhost-gu1xpspa,
	ResourceIds []string `required:"false"`

	// 产品类型 (筛选项, 默认全部),支持多筛选,多筛选请在请求参数中添加多个字段例ResourceTypes.0: uhost,ResourceTypes.1: udisk,ResourceTypes.2: udb,
	ResourceTypes []string `required:"false"`

	// 是否显示0元订单 (0 不显示, 1 显示, 默认0)
	ShowZero *int `required:"false"`

	// 用户邮箱,可以根据用户邮箱来进行筛选
	UserEmail *string `required:"false"`
}

ListUBillDetailRequest is request schema for ListUBillDetail action

type ListUBillDetailResponse added in v0.21.32

type ListUBillDetailResponse struct {
	response.CommonBase

	// 账单明细数组
	Items []BillDetailItem

	// 账单明细总长度
	TotalCount int
}

ListUBillDetailResponse is response schema for ListUBillDetail action

type ListUBillOverviewRequest added in v0.21.32

type ListUBillOverviewRequest struct {
	request.CommonBase

	// 账期,YYYY-MM格式,例如2022-02,只支持2018-05之后的查询
	BillingCycle *string `required:"true"`

	// 账单维度, product 按产品聚合,project 按项目聚合,user 按子账号聚合
	Dimension *string `required:"true"`

	// 是否显示已入账账单, 1 已入账, 0 待入账 (默认0 )
	HideUnpaid *int `required:"false"`
}

ListUBillOverviewRequest is request schema for ListUBillOverview action

type ListUBillOverviewResponse added in v0.21.32

type ListUBillOverviewResponse struct {
	response.CommonBase

	// 账单聚合数据
	Items []BillOverviewItem

	// 账单总览数据总数
	TotalCount int

	// 已入账订单总额(已入账时显示)
	TotalPaidAmount string

	// 现金账户扣款总额	(已入账时显示)
	TotalPaidAmountReal string

	// 待入账订单总额(待入账时显示)
	TotalUnpaidAmount string
}

ListUBillOverviewResponse is response schema for ListUBillOverview action

type OrderDetail

type OrderDetail struct {

	//
	ProductName string

	//
	Value string
}

OrderDetail -

type OrderInfo

type OrderInfo struct {

	//
	Amount string

	//
	AmountCoupon string

	//
	AmountFree string

	//
	AmountReal string

	//
	ChargeType string

	//
	Count int

	//
	CouponCode string

	//
	CreateTime int

	//
	EndTime int

	//
	Invoiced string

	//
	OrderDetails []OrderDetail

	//
	OrderNo string

	//
	OrderState string

	//
	OrderType string

	//
	Quantity string

	//
	RegionId string

	//
	ResourceId string

	//
	ResourceTag []ResourceTag

	//
	ResourceType string

	//
	StartTime int

	//
	TradeNo string

	//
	UpdateTime int
}

OrderInfo -

type ResourceExtendInfo added in v0.21.32

type ResourceExtendInfo struct {

	// 资源标识健
	KeyId string

	// 资源标识值
	Value string
}

ResourceExtendInfo - 资源标识

type ResourceTag

type ResourceTag struct {

	//
	KeyId string

	//
	Value string
}

ResourceTag -

type UBillClient

type UBillClient struct {
	*ucloud.Client
}

UBillClient is the client of UBill

func NewClient

func NewClient(config *ucloud.Config, credential *auth.Credential) *UBillClient

NewClient will return a instance of UBillClient

func (*UBillClient) DescribeOrderDetailInfo

API: DescribeOrderDetailInfo

func (*UBillClient) GetBalance added in v0.21.2

func (c *UBillClient) GetBalance(req *GetBalanceRequest) (*GetBalanceResponse, error)

API: GetBalance

获取账户余额

func (*UBillClient) GetBillDataFileUrl added in v0.11.2

API: GetBillDataFileUrl

生成账单数据文件下载的 url

func (*UBillClient) ListUBillDetail added in v0.21.32

func (c *UBillClient) ListUBillDetail(req *ListUBillDetailRequest) (*ListUBillDetailResponse, error)

API: ListUBillDetail

获取某个账期内的所有消费。

func (*UBillClient) ListUBillOverview added in v0.21.32

API: ListUBillOverview

账单总览。可按产品/项目/用户纬度获取某个账期内账单总览信息。

func (*UBillClient) NewDescribeOrderDetailInfoRequest

func (c *UBillClient) NewDescribeOrderDetailInfoRequest() *DescribeOrderDetailInfoRequest

NewDescribeOrderDetailInfoRequest will create request of DescribeOrderDetailInfo action.

func (*UBillClient) NewGetBalanceRequest added in v0.21.2

func (c *UBillClient) NewGetBalanceRequest() *GetBalanceRequest

NewGetBalanceRequest will create request of GetBalance action.

func (*UBillClient) NewGetBillDataFileUrlRequest added in v0.11.2

func (c *UBillClient) NewGetBillDataFileUrlRequest() *GetBillDataFileUrlRequest

NewGetBillDataFileUrlRequest will create request of GetBillDataFileUrl action.

func (*UBillClient) NewListUBillDetailRequest added in v0.21.32

func (c *UBillClient) NewListUBillDetailRequest() *ListUBillDetailRequest

NewListUBillDetailRequest will create request of ListUBillDetail action.

func (*UBillClient) NewListUBillOverviewRequest added in v0.21.32

func (c *UBillClient) NewListUBillOverviewRequest() *ListUBillOverviewRequest

NewListUBillOverviewRequest will create request of ListUBillOverview action.

Jump to

Keyboard shortcuts

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