POST api/Buy

提交订单信息

Request Information

URI Parameters

None.

Body Parameters

订单提交信息

OneBuy
NameDescriptionTypeAdditional information
BizArgs

订单商务参数

OrderRecord

Required

NewVm

新购买主机配置参数

NewVm

None.

NewDisk

新购买硬盘参数

NewDisk

None.

NewIp

新购买IP参数

NewDisk

None.

UpVm

升级主机参数

UpVm

None.

UpDisk

升级硬盘参数

UpDisk

None.

UpBandwidth

升级带宽参数

UpBandwidth

None.

UpProtectBW

升级防护带宽参数

UpProtectBW

None.

RenewVm

续费主机参数

RenewVm

None.

RenewDisk

续费磁盘参数

RenewDisk

None.

RenewIp

续费IP参数

RenewIp

None.

RenewGroup

多个对象续费组

RenewGroup

None.

Id

Onebuy编号

integer

None.

UsedDiscountRule

输入值,优惠详情id

Collection of integer

None.

Request Formats

application/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'application/json'. Exception message: Self referencing loop detected with type 'Ecloud.IoObjects.Order.RenewIp'. Path 'RenewVm.Ips[0].GroupIps'.

text/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'text/json'. Exception message: Self referencing loop detected with type 'Ecloud.IoObjects.Order.RenewIp'. Path 'RenewVm.Ips[0].GroupIps'.

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: 不应为数据协定名称为“VolumeCreateInput:http://schemas.datacontract.org/2004/07/Ecloud.IoObjects.Order”的类型“Ecloud.IoObjects.Order.VolumeCreateInput”。请考虑使用 DataContractResolver,或将任何未知类型以静态方式添加到已知类型的列表。例如,可以使用 KnownTypeAttribute 特性,或者将未知类型添加到传递给 DataContractSerializer 的已知类型列表。

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: 不应为数据协定名称为“VolumeCreateInput:http://schemas.datacontract.org/2004/07/Ecloud.IoObjects.Order”的类型“Ecloud.IoObjects.Order.VolumeCreateInput”。请考虑使用 DataContractResolver,或将任何未知类型以静态方式添加到已知类型的列表。例如,可以使用 KnownTypeAttribute 特性,或者将未知类型添加到传递给 DataContractSerializer 的已知类型列表。

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'OneBuy'.

Response Information

Resource Description

订单项详情

DetailBrief
NameDescriptionTypeAdditional information
Id

Id

integer

None.

OrderId

订单Id

integer

None.

Period

购买时长

integer

None.

TimeUnit

购买时长单位

TimeUnit

None.

Amount

购买数量

integer

None.

CreateAt

创建时间

date

None.

AccountAt

开始计费时间

date

None.

TotalPrice

订单项总价

decimal number

None.

OrigPrice

订单项原价

decimal number

None.

DiscountDetail

订单项优惠详情

DiscountView

None.

UnitPrice

订单项单价

decimal number

None.

ProductCatalog

产品类别

ProductCatalog

None.

OrderCatalog

订单操作类型,如续费、新增、升级、降级等订单

OrderCatalog

None.

Config

订单参数类型

IDetailConfig

None.

PriceDetails

订单具体价格

Collection of PriceDetail

None.

Services

服务记录

Collection of ServiceBrief

None.

Response Formats

application/json, text/json

Sample:

Sample not available.