我使用Product_Order.placeOrder方法来订购许可证 . 问题是complexType和packageId的关系是什么 . 我可以同时指定complexType和packageId吗?我在哪里可以找到API文档?谢谢 .
{'complexType': 'SoftLayer_Container_Product_Order_Software_License',
'quantity': xxx,
'packageId': xxx,
'prices': [{'id': xxx}]
}
1 回答
complexType允许服务器知道您要发送的数据类型结构是什么 . https://softlayer.github.io/article/soap/
调用placeOrder时,您需要发送 SoftLayer_Container_Product_Order 数据类型(基本orderData),并且某些产品/设备需要设置其他信息,但它们不在 SoftLayer_Container_Product_Order 中,因为它们属于从 SoftLayer_Container_Product_Order 继承的另一种数据类型 .
SoftLayer_Container_Product_Order_Software_License 继承自 SoftLayer_Container_Product_Order ,除非存在不属于 SoftLayer_Container_Product_Order 的必需数据或者您获得异常,否则可能无需设置complexType .
packageId定义了您订购所需产品的价格 . 现在,某些产品可以使用相同的complexType进行订购,但使用不同的packageId,例如硬件服务器(请参阅placeOrder中的表):
建议同时设置 complexType 和 packageId ,这有助于服务器更快地处理请求 .