Operation: ManageCalculateBillCostV3
Manage calculated bill’s cost
If cost does not exist on the distribution it will be added
If one exists it will be saved as the option sent in
Since cost is required for the calculated bill distribution to work. One option is always required and cannot be deleted
Parameter | Description | Type | Location |
---|---|---|---|
accountId | ID of the account to receive calculated bill detailsRequired | integer | Path |
meterId | ID of the meter to receive calculated bill detailsRequired | integer | Path |
versionId | ID of the calculated bill distribution versionRequired | integer | Path |
Type Reference: CalculatedBillCostRequest
Defines how use is calculated for a calculated bill distribution
Parameter | Description | Type |
---|---|---|
useCurrentMetersRateSchedule | Apply the meter’s current rate when calculating bill cost “true” is the only valid value for this property One of ‘True’ Case sensitive Required (defined) Only one of UseCurrentMetersRateSchedule, FixedUnitCost, UnitCostMeterId, FixedAmount, CopyCostFromMeter, CostCalculation, CalendarizedCostCalculation can be set |
boolean |
fixedUnitCost | Fixed amount per unit to apply during bill calculation | FixedUnitCostRequest |
unitCost | Fixed unit cost Required Max scale of 8 | number |
unitId | Unit to which unit cost is applied Required | integer |
unitCostMeterId | MeterId from where to get the unit cost Required (defined) Only one of UseCurrentMetersRateSchedule, FixedUnitCost, UnitCostMeterId, FixedAmount, CopyCostFromMeter, CostCalculation, CalendarizedCostCalculation can be set | integer |
fixedAmount | Use a fixed amount for bill cost Max scale of 2 NULL Valid Required (defined) Only one of UseCurrentMetersRateSchedule, FixedUnitCost, UnitCostMeterId, FixedAmount, CopyCostFromMeter, CostCalculation, CalendarizedCostCalculation can be set | number |
copyCostFromMeter | Defines a meter whose use or cost will be copied when calculating a bill The meter may have a commodity which is different than the destination meter When doing the calculation we will sum the use or cost across all accounts this meter is associated with for the billing period begin run |
CopyMeterRequest |
meterId | Meter from which use or cost will be copied Required Topmost (LogicalDevice) | integer |
percentage | Percentage of use or cost to copy Pass the percentage value For example 50.5% should be 50.5 Required Max scale of 8 |
number |
costCalculation | Adding/subtracting calculation involving meters and/or meter groups You must pass in at least 1 thing to sum or subtract |
CalculationRequest |
sum | SumRequest | |
sumMeterIds | Meters in this list will have their use or cost added together during the bill calculation Required (defined) Only one of SumMeterIds, SumMeterGroupIds can be set | array |
sumMeterGroupIds | Distinct meters from these meter groups will have their use or cost added together during the bill calculation System auto groups cannot be used Required (defined) Only one of SumMeterIds, SumMeterGroupIds can be set |
array |
subtract | SubtractRequest | |
subtractMeterIds | Meters in this list will have their use or cost subtracted during bill calculation Required (defined) Only one of SubtractMeterIds, SubtractMeterGroupIds can be set | array |
subtractMeterGroupIds | Distinct meters from these meter groups will have their use or cost subtracted together during the bill calculation System auto groups cannot be used Required (defined) Only one of SubtractMeterIds, SubtractMeterGroupIds can be set |
array |
calendarizedCostCalculation | Adding calculation involving meters You must pass in at least 1 thing to sum |
CalendarizedCalculationRequest |
sum | CalendarizedSumRequest | |
sumMeterIds | Meters in this list will have their use or cost added together during the bill calculation Cannot be Empty Required | array |
{
"useCurrentMetersRateSchedule": false,
"fixedUnitCost": {
"unitCost": 1.0,
"unitId": 1
},
"unitCostMeterId": 1,
"fixedAmount": 1.0,
"copyCostFromMeter": {
"meterId": 1,
"percentage": 1.0
},
"costCalculation": {
"sum": {
"sumMeterIds": [
1
],
"sumMeterGroupIds": [
1
]
},
"subtract": {
"subtractMeterIds": [
1
],
"subtractMeterGroupIds": [
1
]
}
},
"calendarizedCostCalculation": {
"sum": {
"sumMeterIds": [
1
]
}
}
}
Type Reference: CalculatedBillCostResponse
Definition of how a calculated bill will get its cost
Parameter | Description | Type |
---|---|---|
rateSchedule | RateChildResponse | |
rateId | integer | |
name | string | |
commodity | CommodityChild | |
commodityId | The commodity identifier Required (defined) | integer |
commodityCode | The commodity code Required (defined) | string |
commodityInfo | The commodity info Required (defined) | string |
commodityIcon | Icon | |
code | The icon code Must be between 0 and 64 characters Required when Color is set | string |
color | The icon color Must be between 0 and 32 characters Required when Code is set | string |
fixedUnitCost | Fixed amount per unit to apply during bill calculation | FixedAmountResponse |
amount | Fixed amount | number |
unit | UnitChild | |
unitId | The unit identifier | integer |
unitCode | The unit code | string |
unitInfo | The unit info | string |
unitCostFromMeter | MeterChild | |
meterId | The meter identifier | integer |
meterCode | The meter code | string |
meterInfo | The meter info | string |
meterType | MeterTypeChild | |
meterTypeId | integer | |
meterTypeCode | string | |
meterTypeInfo | string | |
commodity | CommodityChild | |
commodityId | The commodity identifier Required (defined) | integer |
commodityCode | The commodity code Required (defined) | string |
commodityInfo | The commodity info Required (defined) | string |
commodityIcon | Icon | |
code | The icon code Must be between 0 and 64 characters Required when Color is set | string |
color | The icon color Must be between 0 and 32 characters Required when Code is set | string |
active | Indicates whether the Meter is Active | boolean |
isCalculatedMeter | Indicates whether the meter is a calculated meter | boolean |
isSplitParentMeter | Indicates whether the meter is a parent of a split | boolean |
isSplitChildMeter | Indicates whether the meter is a child of a split | boolean |
serialNumber | The meter’s current serial number | string |
fixedAmount | Use a fixed amount for bill cost | number |
copyCostFromMeter | Defines an account and meter whose use or cost will be copied when calculating a bill | CopyFromMeterResponse |
meter | MeterChild | |
meterId | The meter identifier | integer |
meterCode | The meter code | string |
meterInfo | The meter info | string |
meterType | MeterTypeChild | |
meterTypeId | integer | |
meterTypeCode | string | |
meterTypeInfo | string | |
commodity | CommodityChild | |
commodityId | The commodity identifier Required (defined) | integer |
commodityCode | The commodity code Required (defined) | string |
commodityInfo | The commodity info Required (defined) | string |
commodityIcon | Icon | |
code | The icon code Must be between 0 and 64 characters Required when Color is set | string |
color | The icon color Must be between 0 and 32 characters Required when Code is set | string |
active | Indicates whether the Meter is Active | boolean |
isCalculatedMeter | Indicates whether the meter is a calculated meter | boolean |
isSplitParentMeter | Indicates whether the meter is a parent of a split | boolean |
isSplitChildMeter | Indicates whether the meter is a child of a split | boolean |
serialNumber | The meter’s current serial number | string |
percentage | Percentage of use or cost to copy | number |
costCalculation | Adding/subtracting calculation involving meters and/or meter groups For each type (sum or subtract), expect only one of the properties to be populated (e.g. if SumMeters has values, then SumMeterGroups should not) |
CalculationResponse |
sum | SumResponse | |
sumMeters | Meters in this list will have their use or cost added together during the bill calculation | MeterChild [Array] |
meterId | The meter identifier | integer |
meterCode | The meter code | string |
meterInfo | The meter info | string |
meterType | MeterTypeChild | |
meterTypeId | integer | |
meterTypeCode | string | |
meterTypeInfo | string | |
commodity | CommodityChild | |
commodityId | The commodity identifier Required (defined) | integer |
commodityCode | The commodity code Required (defined) | string |
commodityInfo | The commodity info Required (defined) | string |
commodityIcon | Icon | |
code | The icon code Must be between 0 and 64 characters Required when Color is set | string |
color | The icon color Must be between 0 and 32 characters Required when Code is set | string |
active | Indicates whether the Meter is Active | boolean |
isCalculatedMeter | Indicates whether the meter is a calculated meter | boolean |
isSplitParentMeter | Indicates whether the meter is a parent of a split | boolean |
isSplitChildMeter | Indicates whether the meter is a child of a split | boolean |
serialNumber | The meter’s current serial number | string |
sumMeterGroups | Distinct meters from these meter groups will have their use or cost added together during the bill calculation | MeterGroupChild [Array] |
meterGroupId | The meter group identifier | integer |
meterGroupCode | The meter group code | string |
meterGroupInfo | The meter group info | string |
autoGroup | Indicates if this meter group is an autogroup | boolean |
userDefinedAutoGroup | Indicates if this meter group is an user defined auto group | boolean |
subtract | SubtractResponse | |
subtractMeters | Meters in this list will have their use or cost subtracted during bill calculation | MeterChild [Array] |
meterId | The meter identifier | integer |
meterCode | The meter code | string |
meterInfo | The meter info | string |
meterType | MeterTypeChild | |
meterTypeId | integer | |
meterTypeCode | string | |
meterTypeInfo | string | |
commodity | CommodityChild | |
commodityId | The commodity identifier Required (defined) | integer |
commodityCode | The commodity code Required (defined) | string |
commodityInfo | The commodity info Required (defined) | string |
commodityIcon | Icon | |
code | The icon code Must be between 0 and 64 characters Required when Color is set | string |
color | The icon color Must be between 0 and 32 characters Required when Code is set | string |
active | Indicates whether the Meter is Active | boolean |
isCalculatedMeter | Indicates whether the meter is a calculated meter | boolean |
isSplitParentMeter | Indicates whether the meter is a parent of a split | boolean |
isSplitChildMeter | Indicates whether the meter is a child of a split | boolean |
serialNumber | The meter’s current serial number | string |
subtractMeterGroups | Distinct meters from these meter groups will have their use or cost subtracted together during the bill calculation | MeterGroupChild [Array] |
meterGroupId | The meter group identifier | integer |
meterGroupCode | The meter group code | string |
meterGroupInfo | The meter group info | string |
autoGroup | Indicates if this meter group is an autogroup | boolean |
userDefinedAutoGroup | Indicates if this meter group is an user defined auto group | boolean |
calendarizedCostCalculation | Adding calendarized calculation involving meters | CalendarizedCalculationResponse |
calendarizedSum | Addition calculation involving meters | MeterChild [Array] |
meterId | The meter identifier | integer |
meterCode | The meter code | string |
meterInfo | The meter info | string |
meterType | MeterTypeChild | |
meterTypeId | integer | |
meterTypeCode | string | |
meterTypeInfo | string | |
commodity | CommodityChild | |
commodityId | The commodity identifier Required (defined) | integer |
commodityCode | The commodity code Required (defined) | string |
commodityInfo | The commodity info Required (defined) | string |
commodityIcon | Icon | |
code | The icon code Must be between 0 and 64 characters Required when Color is set | string |
color | The icon color Must be between 0 and 32 characters Required when Code is set | string |
active | Indicates whether the Meter is Active | boolean |
isCalculatedMeter | Indicates whether the meter is a calculated meter | boolean |
isSplitParentMeter | Indicates whether the meter is a parent of a split | boolean |
isSplitChildMeter | Indicates whether the meter is a child of a split | boolean |
serialNumber | The meter’s current serial number | string |
{
"rateSchedule": {
"rateId": 1,
"name": "string",
"commodity": {
"commodityId": 1,
"commodityCode": "string",
"commodityInfo": "string",
"commodityIcon": {
"code": "string",
"color": "string"
}
}
},
"fixedUnitCost": {
"amount": 1.0,
"unit": {
"unitId": 1,
"unitCode": "string",
"unitInfo": "string"
}
},
"unitCostFromMeter": {
"meterId": 1,
"meterCode": "string",
"meterInfo": "string",
"meterType": {
"meterTypeId": 1,
"meterTypeCode": "string",
"meterTypeInfo": "string"
},
"commodity": {
"commodityId": 1,
"commodityCode": "string",
"commodityInfo": "string",
"commodityIcon": {
"code": "string",
"color": "string"
}
},
"active": false,
"isCalculatedMeter": false,
"isSplitParentMeter": false,
"isSplitChildMeter": false,
"serialNumber": "string"
},
"fixedAmount": 1.0,
"copyCostFromMeter": {
"meter": {
"meterId": 1,
"meterCode": "string",
"meterInfo": "string",
"meterType": {
"meterTypeId": 1,
"meterTypeCode": "string",
"meterTypeInfo": "string"
},
"commodity": {
"commodityId": 1,
"commodityCode": "string",
"commodityInfo": "string",
"commodityIcon": {
"code": "string",
"color": "string"
}
},
"active": false,
"isCalculatedMeter": false,
"isSplitParentMeter": false,
"isSplitChildMeter": false,
"serialNumber": "string"
},
"percentage": 1.0
},
"costCalculation": {
"sum": {
"sumMeters": [
{
"meterId": 1,
"meterCode": "string",
"meterInfo": "string",
"meterType": {
"meterTypeId": 1,
"meterTypeCode": "string",
"meterTypeInfo": "string"
},
"commodity": {
"commodityId": 1,
"commodityCode": "string",
"commodityInfo": "string",
"commodityIcon": {
"code": "string",
"color": "string"
}
},
"active": false,
"isCalculatedMeter": false,
"isSplitParentMeter": false,
"isSplitChildMeter": false,
"serialNumber": "string"
}
],
"sumMeterGroups": [
{
"meterGroupId": 1,
"meterGroupCode": "string",
"meterGroupInfo": "string",
"autoGroup": false,
"userDefinedAutoGroup": false
}
]
},
"subtract": {
"subtractMeters": [
{
"meterId": 1,
"meterCode": "string",
"meterInfo": "string",
"meterType": {
"meterTypeId": 1,
"meterTypeCode": "string",
"meterTypeInfo": "string"
},
"commodity": {
"commodityId": 1,
"commodityCode": "string",
"commodityInfo": "string",
"commodityIcon": {
"code": "string",
"color": "string"
}
},
"active": false,
"isCalculatedMeter": false,
"isSplitParentMeter": false,
"isSplitChildMeter": false,
"serialNumber": "string"
}
],
"subtractMeterGroups": [
{
"meterGroupId": 1,
"meterGroupCode": "string",
"meterGroupInfo": "string",
"autoGroup": false,
"userDefinedAutoGroup": false
}
]
}
},
"calendarizedCostCalculation": {
"calendarizedSum": [
{
"meterId": 1,
"meterCode": "string",
"meterInfo": "string",
"meterType": {
"meterTypeId": 1,
"meterTypeCode": "string",
"meterTypeInfo": "string"
},
"commodity": {
"commodityId": 1,
"commodityCode": "string",
"commodityInfo": "string",
"commodityIcon": {
"code": "string",
"color": "string"
}
},
"active": false,
"isCalculatedMeter": false,
"isSplitParentMeter": false,
"isSplitChildMeter": false,
"serialNumber": "string"
}
]
}
}