Billing Central Apex API Developer Reference

ffbc.SoftDatesService

global with sharing class SoftDatesService

This class provides service functionality for the Soft Date object.

Methods

calculateEndDates

global static List<ffbc.SoftDatesService.EndDateResponse> calculateEndDates(List<ffbc.SoftDatesService.EndDateCalculation> endDateCalculations)

Calculates end dates from the given start dates, soft date definitions, and numbers of terms.

Input Parameters

Name Type Description
endDateCalculations List<ffbc.SoftDatesService.EndDateCalculation> Objects containing the start date, soft date definition and number of terms for each end date to be calculated.

Exceptions Thrown

Value Description
BillingCentralException An exception is thrown if:
- The soft date definition is invalid
- No start date is specified
- The target date is before the start date
- No target date or number of terms are specified
- The number of terms is negative

Return Value

A list of objects in an order corresponding to the order of those passed in, containing the end dates and any error messages that arose.

calculateNextDates

global static List<ffbc.SoftDatesService.NextDateResponse> calculateNextDates(List<ffbc.SoftDatesService.NextDateCalculation> nextDateCalculations)

Calculates the sequence of dates after the start date that match the soft date definition, up to a target date or a specified number of dates.

Input Parameters

Name Type Description
nextDateCalculations List<ffbc.SoftDatesService.NextDateCalculation> Objects that contain the start date, soft date definition and the constraints that define how many dates are to be calculated.

Exceptions Thrown

Value Description
BillingCentralException An exception is thrown if:
- The soft date definition is invalid
- No start date is specified
- The target date is before the start date
- No target date or number of terms are specified
- The number of terms is negative

Return Value

A list of objects in an order that corresponds with the objects passed in, which contains the lists of calculated dates and error messages that arose.

getSoftDateSummaries

global static List<ffbc.SoftDatesService.SoftDateSummary> getSoftDateSummaries()

Retrieves a list of all soft dates.

Return Value

A list of wrapper objects that represent soft dates.

ffbc.SoftDatesService.DateCalculation

global with sharing abstract class DateCalculation

Properties

Name Type Description
StartDate Date The date to which the soft date is to be applied to derive subsequent dates.
TargetDate Date Dates are calculated up to the earliest date, which is later than or equal to this date. If this value is not assigned, you must enter a number of dates.

ffbc.SoftDatesService.EndDateCalculation

global with sharing class EndDateCalculation extends DateCalculation

Wrapper for a request to calculate the end date of a series of billing terms.

This class extends ffbc.SoftDatesService.DateCalculation

Properties

Name Type Description
SoftDateId Id The Soft Date to be used to derive the end date.
NumberOfTerms Integer The Number Of Terms to be applied when calculating this end date. This is the number of times to apply the Soft Date.

Methods

EndDateCalculation

global EndDateCalculation()

The default constructor for an EndDateCalculation object.

ffbc.SoftDatesService.EndDateResponse

global with sharing class EndDateResponse

Wrapper for a response to an end date calculation request.

Properties

Name Type Description
EndDate Date Read only. The end date returned.
ErrorMessage String Read only. The error message encountered while deriving the end date, if any.

ffbc.SoftDatesService.NextDateCalculation

global with sharing class NextDateCalculation extends DateCalculation

Wrapper for a request to calculate a series of billing term dates.

This class extends ffbc.SoftDatesService.DateCalculation

Properties

Name Type Description
SoftDateDefinition String The soft date definition to calculate dates for.
NumberOfDates Integer The number of dates to calculate. This is the number of times to apply the Soft Date. If this value is not assigned, you must enter a target date.

Methods

NextDateCalculation

global NextDateCalculation()

The default constructor for a NextDateCalculation object.

ffbc.SoftDatesService.NextDateResponse

global with sharing class NextDateResponse

Wrapper for a response to a date calculation request.

Properties

Name Type Description
Dates List<Date> Read only. The list of dates derived from the date calculation criteria, from earliest to latest.
Error String Read only. The error message associated with the date calculation. If the calculation is successful, this is null.

ffbc.SoftDatesService.SoftDateSummary

global with sharing class SoftDateSummary

A wrapper object which represents a soft date.

Properties

Name Type Description
DaysPerTerm Integer The estimated number of days in a single term of the soft date.
Id Id The ID of the soft date
Name String Name of the soft date.
Definition String Definition of the soft date.
ViewUrl String The URL of the view page for the SObject being represented.
© Copyright 2009–2023 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.