问题是为什么对于诸如guest_storage之类的资产,我们无法从API响应中获得估计发票的所有信息[使用的API:'BillingItem''getNextInvoiceChildren']。例如。估算的帐单发票json中完全缺少resourceTableId。
Json转储的预计发票: 用于访客存储: 预计的帐单ID:185101227
计费API转储:
{'modifyDate': '2019-03-01T19:28:37-06:00', 'recurringMonths': 1,
'id': 293978447, 'setupFee': '0', 'recurringFee': '0', 'lastBillDate': '2019-03-01T19:28:37-06:00',
'nextBillDate': '2019-03-31T23:00:00-06:00', 'createDate': '2018-04-06T20:33:41-06:00',
'oneTimeFeeTaxRate': '0', 'laborFeeTaxRate': '0', 'parentId': '', 'cancellationDate': '',
'cycleStartDate': '2019-03-01T19:28:37-06:00', 'description': 'Image Template Storage',
'laborFee': '0', 'oneTimeFee': '0', 'setupFeeTaxRate': '0', 'categoryCode':
'guest_storage', 'allowCancellationFlag': 1, 'serviceProviderId': 1, 'orderItemId': '',
'nextInvoiceChildrenCount': 0, 'recurringFeeTaxRate': '0'}
另一方面,在某些情况下,我们可以获得相关信息
对于硬件资产:
估计的帐单ID:185470395
计费API转储:
{'modifyDate': '2019-03-01T19:26:56-06:00', 'resourceTableId': 1163849,
'hostName': 'dal02sl12ibm015', 'recurringMonths': 1, 'id': 195858725,
'setupFee': '0', 'recurringFee': '405', 'lastBillDate': '2019-03-01T19:26:56-06:00',
'nextBillDate': '2019-03-31T23:00:00-06:00', 'createDate': '2017-07-04T01:53:23-06:00',
'oneTimeFeeTaxRate': '0', 'laborFeeTaxRate': '0', 'parentId': '', 'cancellationDate': '',
'cycleStartDate': '2019-03-01T19:26:56-06:00', 'description':
'Dual Intel Xeon E5-2620 v4 (16 Cores, 2.10 GHz)', 'laborFee': '0', 'oneTimeFee': '0',
'setupFeeTaxRate': '0', 'categoryCode': 'server', 'allowCancellationFlag': 1,
'serviceProviderId': 1, 'orderItemId': 222901003, 'domainName': 'ibmbhfmgmt.local',
'nextInvoiceChildrenCount': 26, 'recurringFeeTaxRate': '0'}
硬件资产的资产API转储:
[{'datacenter': {'name': 'dal12'}, 'memoryCapacity': 64, 'provisionDate': '2017-07-04T04:18:03-06:00',
'hardwareStatus': {'status': 'ACTIVE'}, 'tagReferences': [{'usrRecordId': 6862893, 'resourceTableId': 1163849,
'tagId': 2504017, 'tagType': {'keyName': 'HARDWARE', 'description': 'Hardware'},
'tag': {'internal': 0, 'id': 2504017, 'name': 'backup:idera server', 'accountId': 9373713}, 'id': 129847405,
'tagTypeId': 1, 'empRecordId': ''}], 'id': 1163849, 'fullyQualifiedDomainName': 'dal02sl12ibm015.ibmbhfmgmt.local'},....]