Previewing Pending Usage Inputs
previewPendingUsageInputs API is used to preview the rating amount of usage inputs without altering the Billing Schedules, Usage Schedules, and Usage Inputs. You can rate a maximum of 2000 Usage Inputs at a time.
API |
Signature |
---|---|
previewPendingUsageInputs |
|
The API accepts a set of Usage Input IDs as input. It validates the number of Usage Inputs to process. If the number of Usage Input Ids entered is less than 2000, it returns a map containing the rating amount for each Usage Input ID. If the number of Usage Input IDs given is more than 2000, Billing Management system throws an error.
Request |
|||
---|---|---|---|
Field |
Type |
Required? |
Description |
usageInputIds |
Set <Id> |
Yes |
Set of Usage Input IDs |
Response |
||
---|---|---|
Field |
Type |
Description |
mapRatedUsagInputIds |
Map |
Map containing Usage Inputs for each UsageInputId |
Set<ID> usageInputIDs = new Set<ID>();
Map<ID, Apttus_Billing__UsageInput__c> mapRatedUsageInputs = Apttus_Billing.BillingService.previewPendingUsageInputs(usageInputIDs);
for(Apttus_Billing__UsageInput__c usageInput : mapRatedUsageInputs.values()) {
//Use usageInput.Apttus_Billing__RatedAmount__c
}