Operation: ManageCalculatedBillVersionHistoryV3
Manage a calculated bill’s version history
All calculated bill versions to save on this account and meter relationship should be passed
If versionId is passed, this version will be updated to the request body values
If copyVersionId is passed, a new version will be created and all instructions and inputs on the copyVersionId will be copied
If versionId and copyVersionId are null a new version will be created
Versions cannot overlap
If a calculated bill version currently exists in the database, but is not passed in it will be deleted
Only versions that are not currently associated with any bills can be deleted
If any part of the create, update, or delete process fails, the entire process is rolled back
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 |
Type Reference: DistributionVersionManage [Array]
Parameter | Description | Type |
---|---|---|
versionId | Version id to update VersionId must exist on the account and meter relationship being updated Required (defined) Only one of VersionId, CopyVersionId can be set |
integer |
copyVersionId | An existing version id on this account meter to copy A new version will be created and all instructions will be copied to the new version CopyVersionId chargeback type must match the chargeback type being managed (Either “Split” or “Calculation”). CopyVersionId must exist on the account and meter relationship being updated Required (defined) Only one of VersionId, CopyVersionId can be set |
integer |
name | Name given to the version Name must be unique for a particular account and meter Required Must be between 0 and 64 characters |
string |
workflowStepId | Workflow step this version will belong to The workflow step type must match the chargeback type being managed (Either “Split” or “Calculation”) Required (defined) |
integer |
beginPeriod | Begin period for the version in the format YYYYMM Cannot overlap any existing versions on this account and meter for the chargeback type being managed Required Valid billing period between 190001 and 300001 |
integer |
endPeriod | End period for the version in the format YYYYMM null value means continuing indefinitely Cannot overlap any existing versions on this account and meter for the chargeback type being managed Valid billing period between 190001 and 300001 NULL Valid Must be greater than or equal to BeginPeriod Required (defined) |
integer |
Request Body Array | object [Array] |
[
{
"versionId": 1,
"copyVersionId": 1,
"name": "string",
"workflowStepId": 1,
"beginPeriod": 1,
"endPeriod": 1
}
]
Type Reference: DistributionVersionResponse [Array]
Parameter | Description | Type |
---|---|---|
array | ||
versionId | Identifier for the version | integer |
versionInfo | Name given to a version | string |
chargebackType | The chargeback type. Either “Split” or “Calculation” | string |
beginPeriod | Begin period for the version | integer |
endPeriod | End period for the version null value means continuing indefinitely |
integer |
account | AccountChildWithType | |
accountType | AccountTypeChild | |
accountTypeId | The account type identifier | integer |
accountTypeCode | The account type code | string |
accountTypeInfo | The account type info | string |
accountId | integer | |
accountCode | string | |
accountInfo | string | |
vendor | VendorChild | |
vendorId | The vendor identifier | integer |
vendorCode | The vendor code | string |
vendorInfo | The vendor info | string |
active | boolean | |
hasCalculatedMeter | boolean | |
hasSplitParentMeter | boolean | |
hasSplitChildMeter | boolean | |
isSubAccount | boolean | |
hasSubAccount | boolean | |
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 |
workflow | ChargebackWorkflowStepChild | |
chargebackWorkflowStepId | Identifier for the chargeback workflow step | integer |
chargebackWorkflowStepInfo | Name given to the chargeback workflow step | string |
chargebackWorkflowStepDescription | Description for the chargeback workflow step | string |
chargebackWorkflowStepType | The chargeback type that can be assign to this chargeback workflow step. One of ‘Split’, ‘Calculation’ One of ‘Split’, ‘Calculation’ | string |
chargebackWorkflowStepOrder | The order for this step within the chargeback workflow | integer |
chargebackWorkflow | ChargebackWorkflowBase | |
chargebackWorkflowId | Identifier for the chargeback workflow | integer |
chargebackWorkflowInfo | Name given to the chargeback workflow | string |
hasBills | Do any bills exist that were created by this version? A version cannot be deleted if there are any existing bills that were created using this version |
boolean |
[
{
"versionId": 1,
"versionInfo": "string",
"chargebackType": "string",
"beginPeriod": 1,
"endPeriod": 1,
"account": {
"accountType": {
"accountTypeId": 1,
"accountTypeCode": "string",
"accountTypeInfo": "string"
},
"accountId": 1,
"accountCode": "string",
"accountInfo": "string",
"vendor": {
"vendorId": 1,
"vendorCode": "string",
"vendorInfo": "string"
},
"active": false,
"hasCalculatedMeter": false,
"hasSplitParentMeter": false,
"hasSplitChildMeter": false,
"isSubAccount": false,
"hasSubAccount": false
},
"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"
},
"workflow": {
"chargebackWorkflowStepId": 1,
"chargebackWorkflowStepInfo": "string",
"chargebackWorkflowStepDescription": "string",
"chargebackWorkflowStepType": "string",
"chargebackWorkflowStepOrder": 1,
"chargebackWorkflow": {
"chargebackWorkflowId": 1,
"chargebackWorkflowInfo": "string"
}
},
"hasBills": false
}
]